From 914b6d96d2cae67507ef848a7a229fd5319d7968 Mon Sep 17 00:00:00 2001 From: mistic100 Date: Sat, 17 May 2014 22:04:36 +0000 Subject: feature 3080 : simpler date inputs (one input + fontello + picker selects) git-svn-id: http://piwigo.org/svn/trunk@28497 68402e56-0260-453c-a942-63ccdbb3a9ee --- .../default/template/batch_manager_global.tpl | 27 +++-------- .../themes/default/template/batch_manager_unit.tpl | 56 ++++++++-------------- admin/themes/default/template/history.tpl | 45 ++++++++--------- .../default/template/include/datepicker.inc.tpl | 13 +---- admin/themes/default/template/picture_modify.tpl | 26 ++++------ 5 files changed, 59 insertions(+), 108 deletions(-) (limited to 'admin/themes/default/template') diff --git a/admin/themes/default/template/batch_manager_global.tpl b/admin/themes/default/template/batch_manager_global.tpl index 7fa0ae473..148f48735 100644 --- a/admin/themes/default/template/batch_manager_global.tpl +++ b/admin/themes/default/template/batch_manager_global.tpl @@ -7,10 +7,6 @@ {combine_script id='jquery.ui.slider' require='jquery.ui' load='footer' path='themes/default/js/ui/minified/jquery.ui.slider.min.js'} {combine_css path="themes/default/js/ui/theme/jquery.ui.slider.css"} -{footer_script}{literal} - pwg_initialization_datepicker("#date_creation_day", "#date_creation_month", "#date_creation_year", "#date_creation_linked_date", "#date_creation_action_set"); -{/literal}{/footer_script} - {footer_script}{literal} /* Shift-click: select all photos between the click and the shift+click */ jQuery(document).ready(function() { @@ -64,6 +60,8 @@ jQuery(document).ready(function() { {footer_script require='jquery.tokeninput'} jQuery(document).ready(function() {ldelim} + jQuery('[data-datepicker]').pwgDatepicker(); + jQuery("a.preview-box").colorbox(); var tag_src = [{foreach from=$tags item=tag name=tags}{ldelim}name:"{$tag.name|@escape:'javascript'}",id:"{$tag.id}"{rdelim}{if !$smarty.foreach.tags.last},{/if}{/foreach}]; @@ -865,22 +863,11 @@ UL.thumbnails SPAN.wrap2 {ldelim}

- - - - + +
diff --git a/admin/themes/default/template/batch_manager_unit.tpl b/admin/themes/default/template/batch_manager_unit.tpl index c2137bead..e282a5e0b 100644 --- a/admin/themes/default/template/batch_manager_unit.tpl +++ b/admin/themes/default/template/batch_manager_unit.tpl @@ -48,6 +48,20 @@ tagsCache.get(function(tags) { }, this)); }); }); + +{* *} +jQuery(function(){ {* *} + jQuery('[data-datepicker]').pwgDatepicker(); +}); + +{* *} +$(".elementEdit img") + .css("opacity", 0.6) // Opacity on page load + .hover(function(){ + $(this).fadeTo("slow", 1.0); // Opacity on hover + },function(){ + $(this).fadeTo("slow", 0.6); // Opacity on mouseout + }); }()); {/footer_script} @@ -94,28 +108,12 @@ tagsCache.get(function(tags) { {'Creation date'|@translate} - - - - - - - - {footer_script} - pwg_initialization_datepicker("#date_creation_day-{$element.id}", "#date_creation_month-{$element.id}", "#date_creation_year-{$element.id}", "#date_creation_linked_date-{$element.id}", "#date_creation_action_set-{$element.id}"); - {/footer_script} + + + {'unset'|translate} @@ -153,16 +151,4 @@ tagsCache.get(function(tags) {

{/if} - - -{footer_script} -{literal}$(document).ready(function() { - $(".elementEdit img") - .fadeTo("slow", 0.6) // Opacity on page load - .hover(function(){ - $(this).fadeTo("slow", 1.0); // Opacity on hover - },function(){ - $(this).fadeTo("slow", 0.6); // Opacity on mouseout - }); -});{/literal} -{/footer_script} + \ No newline at end of file diff --git a/admin/themes/default/template/history.tpl b/admin/themes/default/template/history.tpl index 3fe4e738d..fcdc67d8b 100644 --- a/admin/themes/default/template/history.tpl +++ b/admin/themes/default/template/history.tpl @@ -1,10 +1,11 @@ {include file='include/datepicker.inc.tpl'} -{footer_script}{literal} - pwg_initialization_datepicker("#start_day", "#start_month", "#start_year", "#start_linked_date", null, null, "#end_linked_date"); - pwg_initialization_datepicker("#end_day", "#end_month", "#end_year", "#end_linked_date", null, "#start_linked_date", null); -{/literal}{/footer_script} +{footer_script} +jQuery(function(){ {* *} + jQuery('[data-datepicker]').pwgDatepicker(); +}); +{/footer_script}

{'History'|@translate} {$TABSHEET_TITLE}

@@ -14,33 +15,25 @@ diff --git a/admin/themes/default/template/include/datepicker.inc.tpl b/admin/themes/default/template/include/datepicker.inc.tpl index d34994d3b..d8202703d 100644 --- a/admin/themes/default/template/include/datepicker.inc.tpl +++ b/admin/themes/default/template/include/datepicker.inc.tpl @@ -1,4 +1,4 @@ -{combine_script id='datepicker.js' load='footer' require='jquery.ui.datepicker' path='themes/default/js/datepicker.js'} +{combine_script id='datepicker.js' load='footer' require='jquery.ui.datepicker' path='admin/themes/default/js/datepicker.js'} {assign var="datepicker_language" value="themes/default/js/ui/i18n/jquery.ui.datepicker-`$lang_info.code`.js"} @@ -6,13 +6,4 @@ {combine_script id="jquery.ui.datepicker-$lang_info.code" load='footer' path=$datepicker_language} {/if} -{combine_css path="themes/default/js/ui/theme/jquery.ui.datepicker.css"} - -{footer_script require='jquery.ui.datepicker,datepicker.js'} -function pwg_initialization_datepicker(day, month, year, linked_date, checked_on_change, min_linked_date, max_linked_date) -{ldelim} - return pwg_common_initialization_datepicker( - "{$ROOT_URL}{$themeconf.admin_icon_dir}/datepicker.png", - day, month, year, linked_date, checked_on_change, min_linked_date, max_linked_date); -}; -{/footer_script} +{combine_css path="themes/default/js/ui/theme/jquery.ui.datepicker.css"} \ No newline at end of file diff --git a/admin/themes/default/template/picture_modify.tpl b/admin/themes/default/template/picture_modify.tpl index 50392f7ab..99a53b247 100644 --- a/admin/themes/default/template/picture_modify.tpl +++ b/admin/themes/default/template/picture_modify.tpl @@ -76,7 +76,9 @@ tagsCache.get(function(tags) { }); {* *} -pwg_initialization_datepicker("#date_creation_day", "#date_creation_month", "#date_creation_year", "#date_creation_linked_date", "#date_creation_action_set"); +jQuery(function(){ {* *} + jQuery('[data-datepicker]').pwgDatepicker(); +}); }()); {/footer_script} @@ -138,21 +140,13 @@ pwg_initialization_datepicker("#date_creation_day", "#date_creation_month", "#da

{'Creation date'|@translate}
- - - - - - - - + + + + {'unset'|translate}

-- cgit v1.2.3