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
This commit is contained in:
flop25
2013-06-30 14:24:42 +00:00
parent b1a2127aef
commit 3e9d3ab686
33 changed files with 3303 additions and 1464 deletions
Binary file not shown.

After

Width:  |  Height:  |  Size: 7.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 3.8 KiB

File diff suppressed because it is too large Load Diff
+7 -7
View File
@@ -1,7 +1,7 @@
// PhotoSwipe - http://www.photoswipe.com/
// Copyright (c) 2011 by Code Computerlove (http://www.codecomputerlove.com)
// Copyright (c) 2012 by Code Computerlove (http://www.codecomputerlove.com)
// Licensed under the MIT license
// version: 3.0.4
// version: 3.0.5
(function(e){if(!Function.prototype.bind)Function.prototype.bind=function(c){var a=[].slice,b=a.call(arguments,1),d=this,f=function(){},g=function(){return d.apply(this instanceof f?this:c||{},b.concat(a.call(arguments)))};f.prototype=d.prototype;g.prototype=new f;return g};if(typeof e.Code==="undefined")e.Code={};e.Code.Util={registerNamespace:function(){var c=arguments,a=null,b,d,f,g,h;b=0;for(g=c.length;b<g;b++){f=c[b];f=f.split(".");a=f[0];typeof e[a]==="undefined"&&(e[a]={});a=e[a];d=1;for(h=
f.length;d<h;++d)a[f[d]]=a[f[d]]||{},a=a[f[d]]}},coalesce:function(){var c,a;c=0;for(a=arguments.length;c<a;c++)if(!this.isNothing(arguments[c]))return arguments[c];return null},extend:function(c,a,b){var d;this.isNothing(b)&&(b=!0);if(c&&a&&this.isObject(a))for(d in a)this.objectHasProperty(a,d)&&(b?c[d]=a[d]:typeof c[d]==="undefined"&&(c[d]=a[d]))},clone:function(c){var a={};this.extend(a,c);return a},isObject:function(c){return c instanceof Object},isFunction:function(c){return{}.toString.call(c)===
"[object Function]"},isArray:function(c){return c instanceof Array},isLikeArray:function(c){return typeof c.length==="number"},isNumber:function(c){return typeof c==="number"},isString:function(c){return typeof c==="string"},isNothing:function(c){if(typeof c==="undefined"||c===null)return!0;return!1},swapArrayElements:function(c,a,b){var d=c[a];c[a]=c[b];c[b]=d},trim:function(c){return c.replace(/^\s\s*/,"").replace(/\s\s*$/,"")},toCamelCase:function(c){return c.replace(/(\-[a-z])/g,function(a){return a.toUpperCase().replace("-",
@@ -120,7 +120,7 @@ left:0,top:0,overflow:"hidden",zIndex:this.settings.zIndex,opacity:0});a.DOM.hid
(function(e,c,a){a.registerNamespace("Code.PhotoSwipe.ZoomPanRotate");e=e.Code.PhotoSwipe;e.ZoomPanRotate.CssClasses={zoomPanRotate:"ps-zoom-pan-rotate"};e.ZoomPanRotate.EventTypes={onTransform:"PhotoSwipeZoomPanRotateOnTransform"}})(window,window.klass,window.Code.Util);
(function(e,c,a){a.registerNamespace("Code.PhotoSwipe.ZoomPanRotate");var b=e.Code.PhotoSwipe;b.ZoomPanRotate.ZoomPanRotateClass=c({el:null,settings:null,containerEl:null,imageEl:null,transformSettings:null,panStartingPoint:null,transformEl:null,dispose:function(){var b;a.DOM.removeChild(this.el,this.el.parentNode);for(b in this)a.objectHasProperty(this,b)&&(this[b]=null)},initialize:function(c,f,g){var h,j,i;this.settings=c;this.settings.target===e?(c=document.body,h=a.DOM.windowWidth(),j=a.DOM.windowHeight(),
i=a.DOM.windowScrollTop()+"px"):(c=this.settings.target,h=a.DOM.width(c),j=a.DOM.height(c),i="0px");this.imageEl=f.imageEl.cloneNode(!1);a.DOM.setStyle(this.imageEl,{zIndex:1});this.transformSettings={startingScale:1,scale:1,startingRotation:0,rotation:0,startingTranslateX:0,startingTranslateY:0,translateX:0,translateY:0};this.el=a.DOM.createElement("div",{"class":b.ZoomPanRotate.CssClasses.zoomPanRotate},"");a.DOM.setStyle(this.el,{left:0,top:i,position:"absolute",width:h,height:j,zIndex:this.settings.zIndex,
display:"block"});a.DOM.insertBefore(this.el,g.el,c);a.Browser.iOS?(this.containerEl=a.DOM.createElement("div"),a.DOM.setStyle(this.containerEl,{left:0,top:0,width:h,height:j,position:"absolute",zIndex:1}),a.DOM.appendChild(this.imageEl,this.containerEl),a.DOM.appendChild(this.containerEl,this.el),a.Animation.resetTranslate(this.containerEl),a.Animation.resetTranslate(this.imageEl),this.transformEl=this.containerEl):(a.DOM.appendChild(this.imageEl,this.el),this.transformEl=this.imageEl)},setStartingTranslateFromCurrentTransform:function(){var b=
display:"block"});a.DOM.insertBefore(this.el,g.el,c);a.Browser.iOS?(this.containerEl=a.DOM.createElement("div","",""),a.DOM.setStyle(this.containerEl,{left:0,top:0,width:h,height:j,position:"absolute",zIndex:1}),a.DOM.appendChild(this.imageEl,this.containerEl),a.DOM.appendChild(this.containerEl,this.el),a.Animation.resetTranslate(this.containerEl),a.Animation.resetTranslate(this.imageEl),this.transformEl=this.containerEl):(a.DOM.appendChild(this.imageEl,this.el),this.transformEl=this.imageEl)},setStartingTranslateFromCurrentTransform:function(){var b=
a.coalesce(this.transformEl.style.webkitTransform,this.transformEl.style.MozTransform,this.transformEl.style.transform);if(!a.isNothing(b)&&(b=b.match(/translate\((.*?)\)/),!a.isNothing(b)))b=b[1].split(", "),this.transformSettings.startingTranslateX=e.parseInt(b[0],10),this.transformSettings.startingTranslateY=e.parseInt(b[1],10)},getScale:function(a){a*=this.transformSettings.startingScale;if(this.settings.minUserZoom!==0&&a<this.settings.minUserZoom)a=this.settings.minUserZoom;else if(this.settings.maxUserZoom!==
0&&a>this.settings.maxUserZoom)a=this.settings.maxUserZoom;return a},setStartingScaleAndRotation:function(a,b){this.transformSettings.startingScale=this.getScale(a);this.transformSettings.startingRotation=(this.transformSettings.startingRotation+b)%360},zoomRotate:function(a,b){this.transformSettings.scale=this.getScale(a);this.transformSettings.rotation=this.transformSettings.startingRotation+b;this.applyTransform()},panStart:function(a){this.setStartingTranslateFromCurrentTransform();this.panStartingPoint=
{x:a.x,y:a.y}},pan:function(a){var b=(a.y-this.panStartingPoint.y)/this.transformSettings.scale;this.transformSettings.translateX=this.transformSettings.startingTranslateX+(a.x-this.panStartingPoint.x)/this.transformSettings.scale;this.transformSettings.translateY=this.transformSettings.startingTranslateY+b;this.applyTransform()},zoomAndPanToPoint:function(b,c){if(this.settings.target===e){this.panStart({x:a.DOM.windowWidth()/2,y:a.DOM.windowHeight()/2});var g=(c.y-this.panStartingPoint.y)/this.transformSettings.scale;
@@ -137,10 +137,10 @@ b){g=c;break}return g}})(window,window.Code.Util);
uiLayerTouchHandler:null,carouselSlideByEndHandler:null,carouselSlideshowStartHandler:null,carouselSlideshowStopHandler:null,toolbarTapHandler:null,toolbarBeforeShowHandler:null,toolbarShowHandler:null,toolbarBeforeHideHandler:null,toolbarHideHandler:null,mouseWheelHandler:null,zoomPanRotateTransformHandler:null,_isResettingPosition:null,_uiWebViewResetPositionTimeout:null,dispose:function(){var b;a.Events.remove(this,i.EventTypes.onBeforeShow);a.Events.remove(this,i.EventTypes.onShow);a.Events.remove(this,
i.EventTypes.onBeforeHide);a.Events.remove(this,i.EventTypes.onHide);a.Events.remove(this,i.EventTypes.onDisplayImage);a.Events.remove(this,i.EventTypes.onResetPosition);a.Events.remove(this,i.EventTypes.onSlideshowStart);a.Events.remove(this,i.EventTypes.onSlideshowStop);a.Events.remove(this,i.EventTypes.onTouch);a.Events.remove(this,i.EventTypes.onBeforeCaptionAndToolbarShow);a.Events.remove(this,i.EventTypes.onCaptionAndToolbarShow);a.Events.remove(this,i.EventTypes.onBeforeCaptionAndToolbarHide);
a.Events.remove(this,i.EventTypes.onCaptionAndToolbarHide);a.Events.remove(this,i.EventTypes.onZoomPanRotateTransform);this.removeEventHandlers();a.isNothing(this.documentOverlay)||this.documentOverlay.dispose();a.isNothing(this.carousel)||this.carousel.dispose();a.isNothing(this.uiLayer)||this.uiLayer.dispose();a.isNothing(this.toolbar)||this.toolbar.dispose();this.destroyZoomPanRotate();a.isNothing(this.cache)||this.cache.dispose();for(b in this)a.objectHasProperty(this,b)&&(this[b]=null)},initialize:function(c,
d,f){this.id=a.isNothing(f)?"PhotoSwipe"+(new Date).getTime().toString():f;this.originalImages=c;if(a.Browser.android&&e.navigator.userAgent.match(/Android (\d+.\d+)/).toString().replace(/^.*\,/,"")>=2.1)this.isBackEventSupported=!0;if(!this.isBackEventSupported)this.isBackEventSupported=a.objectHasProperty(e,"onhashchange");this.settings={fadeInSpeed:250,fadeOutSpeed:250,preventHide:!1,preventSlideshow:!1,zIndex:1E3,backButtonHideEnabled:!0,enableKeyboard:!0,enableMouseWheel:!0,mouseWheelSpeed:350,
autoStartSlideshow:!1,jQueryMobile:!a.isNothing(e.jQuery)&&!a.isNothing(e.jQuery.mobile),jQueryMobileDialogHash:"&ui-state=dialog",enableUIWebViewRepositionTimeout:!1,uiWebViewResetPositionDelay:500,target:e,preventDefaultTouchEvents:!0,loop:!0,slideSpeed:250,nextPreviousSlideSpeed:0,enableDrag:!0,swipeThreshold:50,swipeTimeThreshold:250,slideTimingFunction:"ease-out",slideshowDelay:3E3,doubleTapSpeed:250,margin:20,imageScaleMethod:"fit",captionAndToolbarHide:!1,captionAndToolbarFlipPosition:!1,captionAndToolbarAutoHideDelay:5E3,
captionAndToolbarOpacity:0.8,captionAndToolbarShowEmptyCaptions:!0,getToolbar:i.Toolbar.getToolbar,allowUserZoom:!0,allowRotationOnUserZoom:!1,maxUserZoom:5,minUserZoom:0.5,doubleTapZoomLevel:2.5,getImageSource:i.Cache.Functions.getImageSource,getImageCaption:i.Cache.Functions.getImageCaption,getImageMetaData:i.Cache.Functions.getImageMetaData,cacheMode:i.Cache.Mode.normal};a.extend(this.settings,d);this.settings.target!==e&&(d=a.DOM.getStyle(this.settings.target,"position"),(d!=="relative"||d!==
"absolute")&&a.DOM.setStyle(this.settings.target,"position","relative"));if(this.settings.target!==e)this.isBackEventSupported=!1,this.settings.backButtonHideEnabled=!1;else if(this.settings.preventHide)this.settings.backButtonHideEnabled=!1;this.cache=new b.CacheClass(c,this.settings)},show:function(b){var c,d;this.backButtonClicked=this._isResettingPosition=!1;if(a.isNumber(b))this.currentIndex=b;else{this.currentIndex=-1;c=0;for(d=this.originalImages.length;c<d;c++)if(this.originalImages[c]===
d,f){this.id=a.isNothing(f)?"PhotoSwipe"+(new Date).getTime().toString():f;this.originalImages=c;if(a.Browser.android&&!a.Browser.firefox&&e.navigator.userAgent.match(/Android (\d+.\d+)/).toString().replace(/^.*\,/,"")>=2.1)this.isBackEventSupported=!0;if(!this.isBackEventSupported)this.isBackEventSupported=a.objectHasProperty(e,"onhashchange");this.settings={fadeInSpeed:250,fadeOutSpeed:250,preventHide:!1,preventSlideshow:!1,zIndex:1E3,backButtonHideEnabled:!0,enableKeyboard:!0,enableMouseWheel:!0,
mouseWheelSpeed:350,autoStartSlideshow:!1,jQueryMobile:!a.isNothing(e.jQuery)&&!a.isNothing(e.jQuery.mobile),jQueryMobileDialogHash:"&ui-state=dialog",enableUIWebViewRepositionTimeout:!1,uiWebViewResetPositionDelay:500,target:e,preventDefaultTouchEvents:!0,loop:!0,slideSpeed:250,nextPreviousSlideSpeed:0,enableDrag:!0,swipeThreshold:50,swipeTimeThreshold:250,slideTimingFunction:"ease-out",slideshowDelay:3E3,doubleTapSpeed:250,margin:20,imageScaleMethod:"fit",captionAndToolbarHide:!1,captionAndToolbarFlipPosition:!1,
captionAndToolbarAutoHideDelay:5E3,captionAndToolbarOpacity:0.8,captionAndToolbarShowEmptyCaptions:!0,getToolbar:i.Toolbar.getToolbar,allowUserZoom:!0,allowRotationOnUserZoom:!1,maxUserZoom:5,minUserZoom:0.5,doubleTapZoomLevel:2.5,getImageSource:i.Cache.Functions.getImageSource,getImageCaption:i.Cache.Functions.getImageCaption,getImageMetaData:i.Cache.Functions.getImageMetaData,cacheMode:i.Cache.Mode.normal};a.extend(this.settings,d);this.settings.target!==e&&(d=a.DOM.getStyle(this.settings.target,
"position"),(d!=="relative"||d!=="absolute")&&a.DOM.setStyle(this.settings.target,"position","relative"));if(this.settings.target!==e)this.isBackEventSupported=!1,this.settings.backButtonHideEnabled=!1;else if(this.settings.preventHide)this.settings.backButtonHideEnabled=!1;this.cache=new b.CacheClass(c,this.settings)},show:function(b){var c,d;this.backButtonClicked=this._isResettingPosition=!1;if(a.isNumber(b))this.currentIndex=b;else{this.currentIndex=-1;c=0;for(d=this.originalImages.length;c<d;c++)if(this.originalImages[c]===
b){this.currentIndex=c;break}}if(this.currentIndex<0||this.currentIndex>this.originalImages.length-1)throw"Code.PhotoSwipe.PhotoSwipeClass.show: Starting index out of range";this.isAlreadyGettingPage=this.getWindowDimensions();i.setActivateInstance(this);this.windowDimensions=this.getWindowDimensions();this.settings.target===e?a.DOM.addClass(e.document.body,i.CssClasses.buildingBody):a.DOM.addClass(this.settings.target,i.CssClasses.buildingBody);this.createComponents();a.Events.fire(this,{type:i.EventTypes.onBeforeShow,
target:this});this.documentOverlay.fadeIn(this.settings.fadeInSpeed,this.onDocumentOverlayFadeIn.bind(this))},getWindowDimensions:function(){return{width:a.DOM.windowWidth(),height:a.DOM.windowHeight()}},createComponents:function(){this.documentOverlay=new d.DocumentOverlayClass(this.settings);this.carousel=new f.CarouselClass(this.cache,this.settings);this.uiLayer=new h.UILayerClass(this.settings);if(!this.settings.captionAndToolbarHide)this.toolbar=new g.ToolbarClass(this.cache,this.settings)},
resetPosition:function(){if(!this._isResettingPosition){var b=this.getWindowDimensions();if(a.isNothing(this.windowDimensions)||!(b.width===this.windowDimensions.width&&b.height===this.windowDimensions.height))this._isResettingPosition=!0,this.windowDimensions=b,this.destroyZoomPanRotate(),this.documentOverlay.resetPosition(),this.carousel.resetPosition(),a.isNothing(this.toolbar)||this.toolbar.resetPosition(),this.uiLayer.resetPosition(),this._isResettingPosition=!1,a.Events.fire(this,{type:i.EventTypes.onResetPosition,
File diff suppressed because one or more lines are too long
+18 -3
View File
@@ -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+'%');
}
}
+15
View File
@@ -0,0 +1,15 @@
{include file='infos_errors.tpl'}
<div data-role="content">
<ul data-role="listview" data-inset="true">
<li data-role="list-divider">{'About'|@translate}</li>
<li>{$ABOUT_MESSAGE}</li>
{if isset($THEME_ABOUT) }
<li>{$THEME_ABOUT}</li>
{/if}
{if not empty($about_msgs)}
{foreach from=$about_msgs item=elt}
<li>{$elt}</li>
{/foreach}
{/if}
</ul>
</div>
@@ -0,0 +1,3 @@
<div data-role="panel" id="menubar" data-position="right" data-display="overlay">
{$MENUBAR}
</div>{assign var='MENUBAR' value=''}
@@ -0,0 +1,12 @@
<ul data-role="listview" data-inset="true">
<li data-role="list-divider">{'User comments'|@translate}</li>
{foreach from=$comments item=comment name=comment_loop}
<li>
{if !isset($from) or $from!="picture"}<a href="{$comment.U_PICTURE}">
<img src="{$pwg->derivative_url($thumbnail_derivative_params, $comment.src_image)}">{/if}
<h3>{$comment.AUTHOR}</h3>
<p>{$comment.CONTENT}</p>
{if !isset($from) or $from!="comment"}</a>{/if}
</li>
{/foreach}
</ul>
+78
View File
@@ -0,0 +1,78 @@
{include file='infos_errors.tpl'}
<div data-role="content">
{**{if isset($MENUBAR)}{$MENUBAR}{/if}
<div id="content" class="content{if isset($MENUBAR)} contentWithMenu{/if}">
<div class="titrePage">
<ul class="categoryActions">
</ul>
<h2><a href="{$U_HOME}">{'Home'|@translate}</a>{$LEVEL_SEPARATOR}{'User comments'|@translate}</h2>
</div>
{include file='infos_errors.tpl'}
<form class="filter" action="{$F_ACTION}" method="get">
<fieldset>
<legend>{'Filter'|@translate}</legend>
<label>{'Keyword'|@translate}<input type="text" name="keyword" value="{$F_KEYWORD}"></label>
<label>{'Author'|@translate}<input type="text" name="author" value="{$F_AUTHOR}"></label>
<label>
{'Album'|@translate}
<select name="cat">
<option value="0">------------</option>
{html_options options=$categories selected=$categories_selected}
</select>
</label>
<label>
{'Since'|@translate}
<select name="since">
{html_options options=$since_options selected=$since_options_selected}
</select>
</label>
</fieldset>
<fieldset>
<legend>{'Display'|@translate}</legend>
<label>
{'Sort by'|@translate}
<select name="sort_by">
{html_options options=$sort_by_options selected=$sort_by_options_selected}
</select>
</label>
<label>
{'Sort order'|@translate}
<select name="sort_order">
{html_options options=$sort_order_options selected=$sort_order_options_selected}
</select>
</label>
<label>
{'Number of items'|@translate}
<select name="items_number">
{html_options options=$item_number_options selected=$item_number_options_selected}
</select>
</label>
</fieldset>
<p><input type="submit" value="{'Filter and display'|@translate}"></p>
</form>
{if !empty($navbar) }{include file='navigation_bar.tpl'|@get_extent:'navbar'}{/if}**}
{if isset($comments)}
{include file='comment_list.tpl' comment_derivative_params=$derivative_params}
{/if}
</div> <!-- content -->
+3 -1
View File
@@ -1,7 +1,9 @@
{if !empty($thumb_navbar)}
{include file='navigation_bar.tpl'|@get_extent:'navbar' navbar=$thumb_navbar}
{elseif !empty($navbar) and !isset($ELEMENT_CONTENT)}
{include file='navigation_bar.tpl'|@get_extent:'navbar'}
{else}
<div class="pwg_footer ui-bar-a">
<div data-role="footer" class="pwg_footer">
<h6>
{'Powered by'|@translate} <a href="{$PHPWG_URL}" class="Piwigo">Piwigo</a>
{$VERSION}
+4 -3
View File
@@ -38,7 +38,6 @@
{get_combined_scripts load='header'}
{combine_script id='jquery' path='themes/smartpocket/js/jquery-1.6.4.min.js'}
{combine_script id='config' path='themes/smartpocket/js/config.js' require='jquery'}
{combine_script id='jquery.mobile' path='themes/smartpocket/js/jquery.mobile.min.js' require='jquery,config'}
@@ -46,12 +45,14 @@
<body>
<div data-role="page" data-theme="a">
{if isset($MENUBAR)}<div data-role="panel" id="menubar" data-position="right" data-display="overlay">
{$MENUBAR}
</div>{/if}
<div data-role="header">
<div class="title">
<a href="{$U_HOME}" class="home_button" data-icon="home" data-iconpos="notext" data-role="button"></a>
{$GALLERY_TITLE}
<span class="menubar">{$MENUBAR}</span>
<a href="#menubar" data-icon="grid" data-iconpos="notext" data-role="button" style="float: right" >Menu</a>
</div>
</div>
+7 -1
View File
@@ -1,5 +1,11 @@
<div data-role="content" data-theme="a">
<div data-role="content">
{if !empty($CATEGORIES)}{$CATEGORIES}{/if}
{if !empty($THUMBNAILS)}{$THUMBNAILS}{/if}
{if !empty($CONTENT_DESCRIPTION)}
<div class="additional_info">
{$CONTENT_DESCRIPTION}
</div>
{/if}
{if !empty($CONTENT)}{$CONTENT}{/if}
</div>
+15 -33
View File
@@ -1,33 +1,15 @@
<select name="identification" id="identification" data-icon="grid" data-iconpos="notext" data-native-menu="false">
<option></option>
<optgroup label="{'Identification'|@translate}">
{if isset($U_REGISTER)}
<option value="{$U_REGISTER}">{'Register'|@translate}</option>
{/if}
{if isset($U_LOGIN)}
<option value="{$U_LOGIN}">{'Login'|@translate}</option>
{/if}
{if isset($U_LOGOUT)}
<option value="{$U_LOGOUT}">{'Logout'|@translate}</option>
{/if}
{if isset($U_PROFILE)}
<option value="{$U_PROFILE}">{'Customize'|@translate}</option>
{/if}
{if isset($U_ADMIN)}
<option value="{$U_ADMIN}">{'Administration'|@translate}</option>
{/if}
</optgroup>
</select>
{footer_script}{literal}
$(document).ready(function() {
$('#identification').change(function() {
$(this).selectmenu('close');
window.location = this.value;
});
});
{/literal}{/footer_script}
{if !empty($blocks) }
<ul data-role="listview">
<li data-icon="delete"><a href="#menubar" data-rel="close">Close</a></li>
</ul>
{foreach from=$blocks key=id item=block}
<div data-role="collapsible" data-inset="false" data-icon="false">
{if not empty($block->template)}
{include file=$block->template assign=the_block|@get_extent:$id}
{$the_block|replace:'dt':'h3'|replace:'<dd>':''|replace:'</dd>':''}
{else}
{$block->raw_content|replace:'dt':'h3'|replace:'<dd>':''|replace:'</dd>':''}
{/if}
</div>
{/foreach}
{/if}
@@ -0,0 +1,8 @@
<h3>{'Albums'|@translate}</h3>
<ul data-role="listview">
{foreach from=$block->data.MENU_CATEGORIES item=cat}
<li><a href="{$cat.URL}" {if $cat.IS_UPPERCAT}rel="up"{/if} title="{$cat.TITLE}">{$cat.NAME}</a>
{if $cat.count_images > 0}<span class="ui-li-count">{$cat.count_images}</span>{/if}
</li>
{/foreach}
</ul>
@@ -0,0 +1,8 @@
<h3>{'Identification'|@translate}</h3>
<ul data-role="listview">
{if isset($U_REGISTER)}<li><a href="{$U_REGISTER}">{'Register'|@translate}</a></li>{/if}
{if isset($U_LOGIN)}<li><a href="{$U_LOGIN}">{'Logout'|@translate}</a></li>{/if}
{if isset($U_LOGOUT)}<li><a href="{$U_LOGOUT}">{'Logout'|@translate}</a></li>{/if}
{if isset($U_PROFILE)}<li><a href="{$U_PROFILE}">{'Customize'|@translate}</a></li>{/if}
{if isset($U_ADMIN)}<li><a href="{$U_ADMIN}">{'Administration'|@translate}</a></li>{/if}
</ul>
@@ -0,0 +1,11 @@
<h3>{'Links'|@translate}</h3>
<ul data-role="listview">{strip}
{foreach from=$block->data item=link}
<li>
<a href="{$link.URL}" class="external"{if isset($link.new_window)} onclick="window.open(this.href, '{$link.new_window.NAME}','{$link.new_window.FEATURES}'); return false;"{/if}>
{$link.LABEL}
</a>
</li>
{/foreach}
{/strip}
</ul>
@@ -0,0 +1,8 @@
<h3>{'Menu'|@translate}</h3>
<ul data-role="listview">
{foreach from=$block->data item=link}
{if is_array($link)}
<li><a href="{$link.URL}" title="{$link.TITLE}"{if isset($link.REL)} {$link.REL}{/if}>{$link.NAME}</a>{if isset($link.COUNTER)}<span class="ui-li-count">{$link.COUNTER}</span>{/if}</li>
{/if}
{/foreach}
</ul>
@@ -0,0 +1,8 @@
<h3>{'Specials'|@translate}</h3>
<ul data-role="listview">
{foreach $block->data as $key=>$link}
{if in_array($key, array("favorites","most_visited","best_rated","recent_pics","recent_cats","random")) }
<li><a href="{$link.URL}" title="{$link.TITLE}"{if isset($link.REL)} {$link.REL}{/if}>{$link.NAME}</a></li>
{/if}
{/foreach}
</ul>
@@ -0,0 +1,12 @@
<h3>{'Related tags'|@translate}</h3>
<ul data-role="listview">
{foreach from=$block->data item=tag}
<li><a class="tagLevel{$tag.level}" href=
{if isset($tag.U_ADD)}
"{$tag.U_ADD}" title="{$tag.counter|@translate_dec:'%d photo is also linked to current tags':'%d photos are also linked to current tags'}" rel="nofollow">+
{else}
"{$tag.URL}" title="{'display photos linked to this tag'|@translate}">
{/if}
{$tag.name}</a></li>
{/foreach}
</ul>
@@ -1,5 +1,5 @@
{capture}{$navbar.pages|@end}{/capture}
<div class="ui-bar ui-bar-a" style="text-align:center;">
<div data-role="footer" class="ui-bar ui-bar-a" style="text-align:center;">
<div data-role="controlgroup" data-type="horizontal">
{strip}
{if isset($navbar.URL_PREV)}
@@ -0,0 +1,13 @@
{html_head}
<link rel="alternate" type="application/rss+xml" title="{'Photos only RSS feed'|@translate}" href="{$U_FEED_IMAGE_ONLY}">
<link rel="alternate" type="application/rss+xml" title="{'Complete RSS feed (photos, comments)'|@translate}" href="{$U_FEED}">
{/html_head}
{include file='infos_errors.tpl'}
<div data-role="content">
<ul data-role="listview" data-inset="true">
<li data-role="list-divider">{'Notification'|@translate}</li>
<li>{'The RSS notification feed provides notification on news from this website : new photos, updated albums, new comments. Use a RSS feed reader.'|@translate}</li>
<li><a href="{$U_FEED_IMAGE_ONLY}">{'Photos only RSS feed'|@translate}</a></li>
<li><a href="{$U_FEED}">{'Complete RSS feed (photos, comments)'|@translate}</a></li>
</ul>
</div>
+175
View File
@@ -0,0 +1,175 @@
{if isset($errors) or not empty($infos)}
{include file='infos_errors.tpl'}
{/if}
<div data-role="content">
<ul data-role="listview" data-inset="true">
<li data-role="list-divider">{$SECTION_TITLE}<span class="browsePathSeparator">{$LEVEL_SEPARATOR}</span>{$current.TITLE}</li>
</ul>
{$ELEMENT_CONTENT}
{include file='picture_nav_buttons.tpl'|@get_extent:'picture_nav_buttons'}
{if isset($COMMENT_IMG)}
<p class="imageComment">{$COMMENT_IMG}</p>
{/if}
<ul data-role="listview" data-inset="true" id="PictureInfo">
{strip}
{if $display_info.author and isset($INFO_AUTHOR)}
<li id="Author" class="imageInfo">
<dt>{'Author'|@translate}</dt>
<dd>{$INFO_AUTHOR}</dd>
</li>
{/if}
{if $display_info.created_on and isset($INFO_CREATION_DATE)}
<li id="datecreate" class="imageInfo">
<dt>{'Created on'|@translate}</dt>
<dd>{$INFO_CREATION_DATE}</dd>
</li>
{/if}
{if $display_info.posted_on}
<li id="datepost" class="imageInfo">
<dt>{'Posted on'|@translate}</dt>
<dd>{$INFO_POSTED_DATE}</dd>
</li>
{/if}
{if $display_info.dimensions and isset($INFO_DIMENSIONS)}
<li id="Dimensions" class="imageInfo">
<dt>{'Dimensions'|@translate}</dt>
<dd>{$INFO_DIMENSIONS}</dd>
</li>
{/if}
{if $display_info.file}
<li id="File" class="imageInfo">
<dt>{'File'|@translate}</dt>
<dd>{$INFO_FILE}</dd>
</li>
{/if}
{if $display_info.filesize and isset($INFO_FILESIZE)}
<li id="Filesize" class="imageInfo">
<dt>{'Filesize'|@translate}</dt>
<dd>{$INFO_FILESIZE}</dd>
</li>
{/if}
{if $display_info.tags and isset($related_tags)}
<li id="Tags" class="imageInfo">
<dt>{'Tags'|@translate}</dt>
<dd>
{foreach from=$related_tags item=tag name=tag_loop}{if !$smarty.foreach.tag_loop.first}, {/if}<a href="{$tag.URL}">{$tag.name}</a>{/foreach}
</dd>
</li>
{/if}
{if $display_info.categories and isset($related_categories)}
<li id="Categories" class="imageInfo">
<dt>{'Albums'|@translate}</dt>
<dd>
<ul>
{foreach from=$related_categories item=cat}
<li>{$cat}</li>
{/foreach}
</ul>
</dd>
</li>
{/if}
{if $display_info.visits}
<li id="Visits" class="imageInfo">
<dt>{'Visits'|@translate}</dt>
<dd>{$INFO_VISITS}</dd>
</li>
{/if}
{if $display_info.rating_score and isset($rate_summary)}
<li id="Average" class="imageInfo">
<dt>{'Rating score'|@translate}</dt>
<dd>
{if $rate_summary.count}
<span id="ratingScore">{$rate_summary.score}</span> <span id="ratingCount">({$rate_summary.count|@translate_dec:'%d rate':'%d rates'})</span>
{else}
<span id="ratingScore">{'no rate'|@translate}</span> <span id="ratingCount"></span>
{/if}
</dd>
</li>
{/if}
{if isset($rating)}
<li id="rating" class="imageInfo">
<dt>
<span id="updateRate">{if isset($rating.USER_RATE)}{'Update your rating'|@translate}{else}{'Rate this photo'|@translate}{/if}</span>
</dt>
<form action="{$rating.F_ACTION}" method="post" id="rateForm" style="margin:0;">
<div data-role="controlgroup" data-type="horizontal" align="center">
{foreach from=$rating.marks item=mark name=rate_loop}
{if isset($rating.USER_RATE) && $mark==$rating.USER_RATE}
<input type="button" name="rate" value="{$mark}" class="rateButtonSelected" title="{$mark}">
{else}
<input type="submit" name="rate" value="{$mark}" class="rateButton" title="{$mark}">
{/if}
{/foreach}
</div>
</form>
</li>
{/if}
</ul>
{if isset($metadata)}
<ul data-role="listview" data-inset="true">
{foreach from=$metadata item=meta}
<li><h3>{$meta.TITLE}</h3>
{foreach from=$meta.lines item=value key=label}
<div class="imageInfo">
<dt>{$label}</dt>
<dd>{$value}</dd>
</div>
{/foreach}</li>
{/foreach}
</dl>
{/if}
</ul>
{if isset($COMMENT_COUNT)}
<ul data-role="listview" data-inset="true">
<h3>{$COMMENT_COUNT|@translate_dec:'%d comment':'%d comments'}</h3>
<div id="pictureComments">
{if isset($comment_add)}
<div data-role="collapsible">
<h3>{'Add a comment'|@translate}</h3>
<form method="post" action="{$comment_add.F_ACTION}" id="addComment">
{if $comment_add.SHOW_AUTHOR}
<p><label for="author">{'Author'|@translate}{if $comment_add.AUTHOR_MANDATORY} ({'mandatory'|@translate}){/if} :</label></p>
<p><input type="text" name="author" id="author" value="{$comment_add.AUTHOR}"></p>
{/if}
{if $comment_add.SHOW_EMAIL}
<p><label for="email">{'Email address'|@translate}{if $comment_add.EMAIL_MANDATORY} ({'mandatory'|@translate}){/if} :</label></p>
<p><input type="text" name="email" id="email" value="{$comment_add.EMAIL}"></p>
{/if}
<p><label for="website_url">{'Website'|@translate} :</label></p>
<p><input type="text" name="website_url" id="website_url" value="{$comment_add.WEBSITE_URL}"></p>
<p><label for="contentid">{'Comment'|@translate} ({'mandatory'|@translate}) :</label></p>
<p><textarea name="content" id="contentid" rows="5" cols="50">{$comment_add.CONTENT}</textarea></p>
<p><input type="hidden" name="key" value="{$comment_add.KEY}">
<input type="submit" value="{'Submit'|@translate}"></p>
</form>
</div>
{/if}
{if isset($comments)}
<ul data-role="listview" data-inset="true">
{if (($COMMENT_COUNT > 2) || !empty($navbar))}
<div id="pictureCommentNavBar">
{if $COMMENT_COUNT > 2}
<a href="{$COMMENTS_ORDER_URL}#comments" rel="nofollow" class="commentsOrder">{$COMMENTS_ORDER_TITLE}</a>
{/if}
{if !empty($navbar) }{include file='navigation_bar.tpl'|@get_extent:'navbar'}{/if}
</div>
{/if}
{include file='comment_list.tpl' from="picture"}
</ul>
{/if}
</div>
</ul>
{/if}{*comments*}
{include file='picture_nav_buttons.tpl'|@get_extent:'picture_nav_buttons'}
</div>
@@ -0,0 +1,18 @@
<img {if $current.selected_derivative->is_cached()}src="{$current.selected_derivative->get_url()}" {$current.selected_derivative->get_size_htm()}{else}src="{$ROOT_URL}{$themeconf.img_dir}/ajax_loader.gif" data-src="{$current.selected_derivative->get_url()}"{/if} alt="{$ALT_IMG}" id="theMainImage" usemap="#map{$current.selected_derivative->get_type()}" title="{if isset($COMMENT_IMG)}{$COMMENT_IMG|@strip_tags:false|@replace:'"':' '}{else}{$current.TITLE|@replace:'"':' '} - {$ALT_IMG}{/if}">
{**
<img {if $current.selected_derivative->is_cached()}src="{$current.selected_derivative->get_url()}" {$current.selected_derivative->get_size_htm()}{else}src="{$ROOT_URL}{$themeconf.img_dir}/ajax_loader.gif" data-src="{$current.selected_derivative->get_url()}"{/if} alt="{$ALT_IMG}" id="theMainImage" usemap="#map{$current.selected_derivative->get_type()}" title="{if isset($COMMENT_IMG)}{$COMMENT_IMG|@strip_tags:false|@replace:'"':' '}{else}{$current.TITLE|@replace:'"':' '} - {$ALT_IMG}{/if}">
{foreach from=$current.unique_derivatives item=derivative key=derivative_type}{strip}
<map name="map{$derivative->get_type()}">
{assign var='size' value=$derivative->get_size()}
{if isset($previous)}
<area shape=rect coords="0,0,{($size[0]/4)|@intval},{$size[1]}" href="{$previous.U_IMG}" title="{'Previous'|@translate} : {$previous.TITLE|@escape}" alt="{$previous.TITLE|@escape}">
{/if}
<area shape=rect coords="{($size[0]/4)|@intval},0,{($size[0]/1.34)|@intval},{($size[1]/4)|@intval}" href="{$U_UP}" title="{'Thumbnails'|@translate}" alt="{'Thumbnails'|@translate}">
{if isset($next)}
<area shape=rect coords="{($size[0]/1.33)|@intval},0,{$size[0]},{$size[1]}" href="{$next.U_IMG}" title="{'Next'|@translate} : {$next.TITLE|@escape}" alt="{$next.TITLE|@escape}">
{/if}
</map>
{/strip}{/foreach}**}
@@ -0,0 +1,13 @@
<div data-role="controlgroup" data-type="horizontal" align="center">
{strip}
{if isset($previous)}
<a href="{$previous.U_IMG}" rel="prev" data-role="button" data-icon="arrow-l" data-iconpos="notext" data-inline="true">{'Previous'|@translate}</a>
{/if}
{if isset($U_UP) and !isset($slideshow)}
<a href="{$U_UP}" rel="prev" data-role="button" data-icon="arrow-u" data-inline="true">{'Thumbnails'|@translate}</a>
{/if}
{if isset($next)}
<a href="{$next.U_IMG}" rel="next" data-role="button" data-icon="arrow-r" data-iconpos="notext" data-iconpos="right" data-inline="true">{'Next'|@translate}</a>
{/if}
{/strip}
</div>
+65
View File
@@ -0,0 +1,65 @@
{include file='infos_errors.tpl'}
<div data-role="content">
<ul data-role="listview" data-inset="true">
<li data-role="list-divider">{'Search'|@translate}</li>
</ul>
<form class="filter" method="post" name="search" action="{$F_SEARCH_ACTION}">
<fieldset data-role="controlgroup">
<legend>{'Filter'|@translate}</legend>
<div data-role="fieldcontain">
<label for="search_allwords">{'Search for words'|@translate}</label>
<input type="text" id="search_allwords" style="width: 300px" name="search_allwords" size="30">
</div>
<input type="radio" name="mode" id="mode_and" value="AND" checked="checked">
<label for="mode_and">{'Search for all terms'|@translate}</label>
<input type="radio" name="mode" id="mode_or" value="OR">
<label for="mode_or">{'Search for any term'|@translate}</label>
<div data-role="fieldcontain">
<label for="search_author">{'Search for Author'|@translate}</label>
<input type="text" style="width: 300px" name="search_author" id="search_author" size="30">
</div>
</fieldset>
{if isset($TAG_SELECTION)}
<fieldset data-role="controlgroup">
<legend>{'Search tags'|@translate}</legend>
{$TAG_SELECTION}
</fieldset>
<fieldset data-role="controlgroup">
<input type="radio" name="tag_mode" id="tag_mode_and" value="AND" checked="checked">
<label for="tag_mode_and">{'All tags'|@translate}</label>
<input type="radio" name="tag_mode" id="tag_mode_or" value="OR">
<label for="tag_mode_or">{'Any tag'|@translate}</label>
</fieldset>
{/if}
<div data-role="fieldcontain">
<legend>{'Search in albums'|@translate}</legend>
<label for="categoryList">{'Albums'|@translate}
<select class="categoryList" id="categoryList" name="cat[]" multiple="multiple" data-native-menu="false">
{html_options options=$category_options selected=$category_options_selected}
</select>
</label>
<fieldset data-role="controlgroup">
<legend>{'Search in sub-albums'|@translate}</legend>
<input type="radio" name="subcats-included" value="1" id="subcats-included-yes" checked="checked">
<label for="subcats-included-yes">{'Yes'|@translate}</label>
<input type="radio" name="subcats-included" id="subcats-included-no" value="0">
<label for="subcats-included-no">{'No'|@translate}</label>
</fieldset>
</div>
<p>
<input class="submit" type="submit" name="submit" value="{'Submit'|@translate}">
<input class="submit" type="reset" value="{'Reset'|@translate}">
</p>
</form>
<script type="text/javascript"><!--
document.search.search_allwords.focus();
//--></script>
</div> <!-- content -->
+15
View File
@@ -0,0 +1,15 @@
{include file='infos_errors.tpl'}
<div data-role="content">{if isset($tags)}
<ul data-role="listview" data-inset="true">
<li data-role="list-divider">{'Tags'|@translate}</li>
{foreach from=$tags item=tag}
<li><a href="{$tag.URL}" title="{$tag.counter|@translate_dec:'%d photo':'%d photos'}">{$tag.name}</a><span class="ui-li-count">{$tag.counter|@translate_dec:'%d photo':'%d photos'}</span></li>
{/foreach}
</ul>
{elseif isset($letters)}
<ul data-role="listview" data-inset="true">
{foreach from=$letters item=letter}{foreach from=$letter.tags item=tag}
<li><a href="{$tag.URL}" title="{$tag.counter|@translate_dec:'%d photo':'%d photos'}">{$tag.name}</a><span class="ui-li-count">{$tag.counter|@translate_dec:'%d photo':'%d photos'}</span></li>
{/foreach}{/foreach}
</ul>{/if}
</div>
+1 -1
View File
@@ -10,7 +10,7 @@
{assign var=derivative value=$pwg->derivative($thumbnail_derivative_params, $thumbnail.src_image)}
{if isset($page_selection[$thumbnail.id])}
<li>
<a href="{$pwg->derivative_url($picture_derivative_params, $thumbnail.src_image)}" rel="external">
<a href="{$pwg->derivative_url($picture_derivative_params, $thumbnail.src_image)}" data-picture-url="{$thumbnail.URL}" rel="external">
<img {if !$derivative->is_cached()}data-{/if}src="{$derivative->get_url()}" alt="{$thumbnail.TN_ALT}">
</a>
</li>
+21 -1
View File
@@ -3,7 +3,7 @@
.title { margin: 10px; text-align: center; }
.title .ui-btn { margin-top: -5px; }
.menubar { float: right; }
. { float: right; }
.home_button { float: left; }
.pwg_footer h6 { margin: 8px; text-align:right;}
@@ -21,3 +21,23 @@
.thumbnails li { float: left; }
.thumbnails li a { display: block; margin: 5px; }
.thumbnails li img { display: block; width: 100%; height: auto; }
#more_link {
color: #FFFFFF;
display: table-cell;
font-size: 1.1em;
text-decoration: none;
vertical-align: middle;
}
.ui-panel-inner > .ui-listview {
margin: -15px -15px 0;
}
.ui-li-desc {
text-overflow: clip;
white-space: normal;
}
#PictureInfo {
font-size: 0.8em;
}
#PictureInfo * {
font-size: 1em;
}
+25 -1
View File
@@ -13,8 +13,9 @@ $themeconf = array(
);
// Redirect if page is not compatible with mobile theme
if (!in_array(script_basename(), array('index', 'register', 'profile', 'identification', 'ws', 'admin')))
/*if (!in_array(script_basename(), array('index', 'register', 'profile', 'identification', 'ws', 'admin')))
redirect(duplicate_index_url());
*/
//Retrive all pictures on thumbnails page
add_event_handler('loc_index_thumbnails_selection', 'sp_select_all_thumbnails');
@@ -55,4 +56,27 @@ if (!empty($_COOKIE['screen_size']))
$this->assign('picture_derivative_params', ImageStdParams::get_by_type($type));
$this->assign('thumbnail_derivative_params', ImageStdParams::get_by_type(IMG_SQUARE));
if ( !function_exists( 'add_menu_on_public_pages' ) ) {
if ( defined('IN_ADMIN') and IN_ADMIN ) return false;
add_event_handler('loc_after_page_header', 'add_menu_on_public_pages', 20);
function add_menu_on_public_pages() {
if ( function_exists( 'initialize_menu') ) return false; # The current page has already the menu
global $template, $page, $conf;
if ( isset($page['body_id']) and $page['body_id']=="thePicturePage" )
{
$template->set_filenames(array(
'add_menu_on_public_pages' => dirname(__FILE__) . '/template/add_menu_on_public_pages.tpl',
));
include_once(PHPWG_ROOT_PATH.'include/menubar.inc.php');
$template->parse('add_menu_on_public_pages');
}
}
}
?>