diff options
author | flop25 <flop25@piwigo.org> | 2013-06-30 14:24:42 +0000 |
---|---|---|
committer | flop25 <flop25@piwigo.org> | 2013-06-30 14:24:42 +0000 |
commit | 3e9d3ab6865dde6a9a8b2a7aa181703dc56f1abd (patch) | |
tree | 5f30810edd57d9fd62eede09dea3be9ee53903f5 /themes/smartpocket/js/smartpocket.js | |
parent | b1a2127aef8189c48013c0540d649acee1480308 (diff) |
bug:2848
jquery.mobile updated
photoswipe updated
menubar is now a right panel, with almost all the usual links
added comment, search, picture, about and tags pages
ToDo:
*bug correction of the link added to the photoswipe toolbar (link doesn't triggered)
*display the calculated size on the picture page
limitations: no calendar view
git-svn-id: http://piwigo.org/svn/trunk@23713 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'themes/smartpocket/js/smartpocket.js')
-rw-r--r-- | themes/smartpocket/js/smartpocket.js | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/themes/smartpocket/js/smartpocket.js b/themes/smartpocket/js/smartpocket.js index ab7874453..0b076fcc0 100644 --- a/themes/smartpocket/js/smartpocket.js +++ b/themes/smartpocket/js/smartpocket.js @@ -2,10 +2,24 @@ $(document).ready(function(){
var options = {
jQueryMobile: true,
- imageScaleMethod: "fitNoUpscale"
+ captionAndToolbarAutoHideDelay: 0,
+ imageScaleMethod: "fitNoUpscale",
+ getToolbar: function(){
+return '<div class="ps-toolbar-close"><div class="ps-toolbar-content"></div></div><div class="ps-toolbar-play"><div class="ps-toolbar-content"></div></div><a href="#" id="more_link">More Information</a><div class="ps-toolbar-previous"><div class="ps-toolbar-content"></div></div><div class="ps-toolbar-next"><div class="ps-toolbar-content"></div></div>';},
+ getImageMetaData:function(el){
+ return {
+ picture_url: $(el).attr('data-picture-url')
+ };}
};
- $(".thumbnails a").photoSwipe(options);
+ var myPhotoSwipe = $(".thumbnails a").photoSwipe(options);
+ myPhotoSwipe.addEventHandler(PhotoSwipe.EventTypes.onDisplayImage, function(e){
+ var currentImage = myPhotoSwipe.getCurrentImage();
+ $("#more_link").attr("href", currentImage.metaData.picture_url);
+ });
$(document).bind('orientationchange', set_thumbnails_width);
+ $("#more_link").click(function(){
+ console.log($(this).attr('href'));
+ });
set_thumbnails_width();
});
}(window, window.jQuery, window.Code.PhotoSwipe));
@@ -14,4 +28,5 @@ function set_thumbnails_width() { nb_thumbs = Math.max(3, Math.ceil($('.thumbnails').width() / 130));
width = Math.floor(1000000 / nb_thumbs) / 10000;
$('.thumbnails li').css('width', width+'%');
-}
\ No newline at end of file +}
+
|