framework7

Open full view…

How can I change the photo brower close link text ?

king-of-questions
Mon, 23 Jun 2014 11:12:14 GMT

--- var PhotoBrowser = function (params) { var defaults = { backLinkText: 'Close like a boss' }; }; --- not working !

king-of-questions
Mon, 23 Jun 2014 11:18:07 GMT

---var photoBrowserPopup = myApp.photoBrowser({ backLinkText: 'Close like a boss', photos: photoBrowserPopup, type: 'popup' }); --- It works !

Vladimir Kharlampidi
Mon, 23 Jun 2014 11:58:08 GMT

Yep, this is the correct way

king-of-questions
Mon, 23 Jun 2014 14:08:46 GMT

How to enable photo browser in both "main view" and "inside view" ? Now I'm writing two code to enable both page like this : --- $$('.photo').on('click', function () { photo.open(); }); var photo = myApp.photoBrowser({ photos: [ 'photo1.jpg', 'photo2.jpg', 'photo3.jpg'] }); $$(document).on('pageInit', function (e) { var page = e.detail.page; $$('.photo').on('click', function () { photo.open(); }); var photo = myApp.photoBrowser({ photos: [ 'photo1.jpg', 'photo2.jpg', 'photo3.jpg'] }); }); ---

Vladimir Kharlampidi
Tue, 24 Jun 2014 11:30:50 GMT

You need to use just this code instead of all that you have: --- var photo = myApp.photoBrowser({ photos: [ 'photo1.jpg', 'photo2.jpg', 'photo3.jpg'] }); $$(document).on('click', '.photo', function() { photo.open() });