From 8b64b57a27139a671800c6768133be0a8bb6d35f Mon Sep 17 00:00:00 2001 From: patdenice Date: Wed, 9 Mar 2011 14:22:48 +0000 Subject: feature:2114 Simplify all admin templates. git-svn-id: http://piwigo.org/svn/trunk@9586 68402e56-0260-453c-a942-63ccdbb3a9ee --- admin/themes/default/template/admin.tpl | 2 - admin/themes/default/template/cat_list.tpl | 2 - admin/themes/default/template/comments.tpl | 28 ++++----- .../themes/default/template/element_set_ranks.tpl | 12 ++-- .../default/template/include/autosize.inc.tpl | 1 - .../default/template/include/datepicker.inc.tpl | 5 +- .../default/template/include/dbselect.inc.tpl | 3 - .../themes/default/template/include/resize.inc.tpl | 4 -- .../default/template/include/tag_selection.inc.tpl | 20 +++--- admin/themes/default/template/languages_update.tpl | 11 ++-- admin/themes/default/template/menubar.tpl | 20 +++--- .../default/template/notification_by_mail.tpl | 6 +- .../themes/default/template/photos_add_direct.tpl | 72 +++++++++++----------- .../themes/default/template/photos_add_ploader.tpl | 20 +++--- .../default/template/photos_add_settings.tpl | 30 +++++---- admin/themes/default/template/plugins_new.tpl | 15 ++--- admin/themes/default/template/plugins_update.tpl | 11 ++-- admin/themes/default/template/themes_update.tpl | 7 +-- 18 files changed, 113 insertions(+), 156 deletions(-) (limited to 'admin/themes/default/template') diff --git a/admin/themes/default/template/admin.tpl b/admin/themes/default/template/admin.tpl index eae8e7001..4fe561cdd 100644 --- a/admin/themes/default/template/admin.tpl +++ b/admin/themes/default/template/admin.tpl @@ -1,5 +1,3 @@ -{combine_script id='jquery.ui' load='header' require='jquery' path='themes/default/js/ui/minified/jquery.ui.core.min.js' } -{combine_script id='jquery.ui.accordion' load='header' require='jquery.ui' path='themes/default/js/ui/minified/jquery.ui.accordion.min.js' } {footer_script require='jquery.ui.accordion'} jQuery(document).ready(function(){ldelim} jQuery('#menubar').accordion({ldelim} diff --git a/admin/themes/default/template/cat_list.tpl b/admin/themes/default/template/cat_list.tpl index 7c8dbd73c..1917bb3fa 100644 --- a/admin/themes/default/template/cat_list.tpl +++ b/admin/themes/default/template/cat_list.tpl @@ -1,5 +1,3 @@ -{combine_script id='jquery.ui' load='async' require='jquery' path='themes/default/js/ui/minified/jquery.ui.core.min.js' } -{combine_script id='jquery.ui.sortable' load='async' require='jquery.ui' path='themes/default/js/ui/minified/jquery.ui.sortable.min.js' } {footer_script require='jquery.ui.sortable'} jQuery(document).ready(function(){ldelim} jQuery(".catPos").hide(); diff --git a/admin/themes/default/template/comments.tpl b/admin/themes/default/template/comments.tpl index 952d3f1dd..86d02dc49 100644 --- a/admin/themes/default/template/comments.tpl +++ b/admin/themes/default/template/comments.tpl @@ -1,33 +1,31 @@ -{literal} - -{/literal} +{/literal}{/footer_script}

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

diff --git a/admin/themes/default/template/element_set_ranks.tpl b/admin/themes/default/template/element_set_ranks.tpl index da2c2ade5..1b2fe1120 100644 --- a/admin/themes/default/template/element_set_ranks.tpl +++ b/admin/themes/default/template/element_set_ranks.tpl @@ -1,5 +1,3 @@ -{combine_script id='jquery.ui' load='async' require='jquery' path='themes/default/js/ui/minified/jquery.ui.core.min.js' } -{combine_script id='jquery.ui.sortable' load='async' require='jquery.ui' path='themes/default/js/ui/minified/jquery.ui.sortable.min.js' } {footer_script require='jquery.ui.sortable'}{literal} jQuery(document).ready(function() { function checkOrderOptions() { @@ -11,15 +9,15 @@ jQuery(document).ready(function() { jQuery('ul.thumbnails').sortable( { revert: true, opacity: 0.7, - handle: $('.rank-of-image').add('.rank-of-image img'), + handle: jQuery('.rank-of-image').add('.rank-of-image img'), update: function() { - $(this).find('li').each(function(i) { - $(this).find("input[name^=rank_of_image]").each(function() { - $(this).attr('value', (i+1)*10) + jQuery(this).find('li').each(function(i) { + jQuery(this).find("input[name^=rank_of_image]").each(function() { + jQuery(this).attr('value', (i+1)*10) }); }); - $('#image_order_rank').attr('checked', true); + jQuery('#image_order_rank').attr('checked', true); checkOrderOptions(); } }); diff --git a/admin/themes/default/template/include/autosize.inc.tpl b/admin/themes/default/template/include/autosize.inc.tpl index e21162f9e..fd2b2ca75 100644 --- a/admin/themes/default/template/include/autosize.inc.tpl +++ b/admin/themes/default/template/include/autosize.inc.tpl @@ -1,4 +1,3 @@ -{combine_script id='jquery' load='async' path='themes/default/js/jquery.min.js'} {combine_script id='jquery.autogrow' load='async' require='jquery' path='themes/default/js/plugins/jquery.autogrow-textarea.js'} {* Auto size and auto grow textarea *} {footer_script require='jquery.autogrow'}{literal} diff --git a/admin/themes/default/template/include/datepicker.inc.tpl b/admin/themes/default/template/include/datepicker.inc.tpl index 87359fbf6..d34994d3b 100644 --- a/admin/themes/default/template/include/datepicker.inc.tpl +++ b/admin/themes/default/template/include/datepicker.inc.tpl @@ -1,6 +1,3 @@ -{combine_script id='jquery' load='footer' path='themes/default/js/jquery.min.js'} -{combine_script id='jquery.ui' load='footer' require='jquery' path='themes/default/js/ui/minified/jquery.ui.core.min.js'} -{combine_script id='jquery.ui.datepicker' load='footer' require='jquery.ui' path='themes/default/js/ui/minified/jquery.ui.datepicker.min.js'} {combine_script id='datepicker.js' load='footer' require='jquery.ui.datepicker' path='themes/default/js/datepicker.js'} {assign var="datepicker_language" value="themes/default/js/ui/i18n/jquery.ui.datepicker-`$lang_info.code`.js"} @@ -11,7 +8,7 @@ {combine_css path="themes/default/js/ui/theme/jquery.ui.datepicker.css"} -{footer_script} +{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( diff --git a/admin/themes/default/template/include/dbselect.inc.tpl b/admin/themes/default/template/include/dbselect.inc.tpl index 91b27681d..3f513cd06 100644 --- a/admin/themes/default/template/include/dbselect.inc.tpl +++ b/admin/themes/default/template/include/dbselect.inc.tpl @@ -1,6 +1,3 @@ -{combine_script id='jquery' load='async' path='themes/default/js/jquery.min.js'} -{combine_script id='jquery.ui' load='async' require='jquery' path='themes/default/js/ui/minified/jquery.ui.core.min.js' } -{combine_script id='jquery.ui.resizable' load='async' require='jquery.ui' path='themes/default/js/ui/minified/jquery.ui.resizable.min.js' } {footer_script require='jquery.ui.resizable'}{literal} jQuery(document).ready(function(){ // Resize possible for double select list diff --git a/admin/themes/default/template/include/resize.inc.tpl b/admin/themes/default/template/include/resize.inc.tpl index a8044f6dc..152ee61a2 100644 --- a/admin/themes/default/template/include/resize.inc.tpl +++ b/admin/themes/default/template/include/resize.inc.tpl @@ -1,7 +1,3 @@ -{combine_script id='jquery' load='async' path='themes/default/js/jquery.min.js'} -{combine_script id='jquery.ui' load='async' require='jquery' path='themes/default/js/ui/minified/jquery.ui.core.min.js'} -{combine_script id='jquery.ui.resizable' load='async' require='jquery.ui' path='themes/default/js/ui/minified/jquery.ui.resizable.min.js'} - {* Resize possible *} {footer_script require='jquery.ui.resizable'}{literal} jQuery().ready(function(){ diff --git a/admin/themes/default/template/include/tag_selection.inc.tpl b/admin/themes/default/template/include/tag_selection.inc.tpl index deedb031c..680c6b85e 100644 --- a/admin/themes/default/template/include/tag_selection.inc.tpl +++ b/admin/themes/default/template/include/tag_selection.inc.tpl @@ -1,17 +1,15 @@ -{literal} - -{/literal} +{/literal}{/footer_script} diff --git a/admin/themes/default/template/languages_update.tpl b/admin/themes/default/template/languages_update.tpl index d41ee68a8..2b1a2b27d 100644 --- a/admin/themes/default/template/languages_update.tpl +++ b/admin/themes/default/template/languages_update.tpl @@ -1,16 +1,13 @@ -{combine_script id='jquery.effects' load='async' path='themes/default/js/ui/minified/jquery.effects.core.min.js' } -{combine_script id='jquery.effects.blind' load='async' require='jquery.effects' path='themes/default/js/ui/minified/jquery.effects.blind.min.js' } - -{footer_script require='jquery.effects.blind'} -jQuery(document).ready(function(){ldelim} - jQuery("td[id^='desc_'], p[id^='revdesc_']").click(function() {ldelim} +{footer_script require='jquery.effects.blind'}{literal} +jQuery(document).ready(function(){ + jQuery("td[id^='desc_'], p[id^='revdesc_']").click(function() { id = this.id.split('_'); jQuery("#revdesc_"+id[1]).toggle('blind'); jQuery(".button_"+id[1]).toggle(); return false; }); }); -{/footer_script} +{/literal}{/footer_script}

{'Languages'|@translate}

diff --git a/admin/themes/default/template/menubar.tpl b/admin/themes/default/template/menubar.tpl index df0746a36..f20014dca 100644 --- a/admin/themes/default/template/menubar.tpl +++ b/admin/themes/default/template/menubar.tpl @@ -1,31 +1,29 @@ -{combine_script id='jquery.ui' load='async' require='jquery' path='themes/default/js/ui/minified/jquery.ui.core.min.js' } -{combine_script id='jquery.ui.sortable' load='async' require='jquery.ui' path='themes/default/js/ui/minified/jquery.ui.sortable.min.js' } -{footer_script require='jquery.ui.sortable'} -jQuery(document).ready(function(){ldelim} +{footer_script require='jquery.ui.sortable'}{literal} +jQuery(document).ready(function(){ jQuery(".menuPos").hide(); jQuery(".drag_button").show(); jQuery(".menuLi").css("cursor","move"); - jQuery(".menuUl").sortable({ldelim} + jQuery(".menuUl").sortable({ axis: "y", opacity: 0.8 }); - jQuery("input[name^='hide_']").click(function() {ldelim} + jQuery("input[name^='hide_']").click(function() { men = this.name.split('hide_'); - if (this.checked) {ldelim} + if (this.checked) { jQuery("#menu_"+men[1]).addClass('menuLi_hidden'); - } else {ldelim} + } else { jQuery("#menu_"+men[1]).removeClass('menuLi_hidden'); } }); - jQuery("#menuOrdering").submit(function(){ldelim} + jQuery("#menuOrdering").submit(function(){ ar = jQuery('.menuUl').sortable('toArray'); - for(i=0;i

{'Menu Management'|translate}

diff --git a/admin/themes/default/template/notification_by_mail.tpl b/admin/themes/default/template/notification_by_mail.tpl index 3ffe30d4b..69acaaca5 100644 --- a/admin/themes/default/template/notification_by_mail.tpl +++ b/admin/themes/default/template/notification_by_mail.tpl @@ -1,7 +1,6 @@ {include file='include/autosize.inc.tpl'} -{literal} - -{/literal} +{/literal}{/footer_script}

{'Send mail to users'|@translate} {$TABSHEET_TITLE}

diff --git a/admin/themes/default/template/photos_add_direct.tpl b/admin/themes/default/template/photos_add_direct.tpl index 4ea5899e4..ffcb265d5 100644 --- a/admin/themes/default/template/photos_add_direct.tpl +++ b/admin/themes/default/template/photos_add_direct.tpl @@ -1,44 +1,42 @@ -{combine_script id='jquery.jgrowl' load='footer' require='jquery' path='themes/default/js/plugins/jquery.jgrowl_minimized.js' } - {if $upload_mode eq 'multiple'} - +{combine_script id='jquery.jgrowl' load='footer' require='jquery' path='themes/default/js/plugins/jquery.jgrowl_minimized.js' } +{combine_script id='swfobject' load='footer' path='admin/include/uploadify/swfobject.js'} {combine_script id='jquery.uploadify' load='footer' require='jquery' path='admin/include/uploadify/jquery.uploadify.v2.1.0.min.js' } +{combine_css path="admin/themes/default/uploadify.jGrowl.css"} +{combine_css path="admin/include/uploadify/uploadify.css"} {/if} -{html_head} - -{/html_head} {footer_script}{literal} jQuery(document).ready(function(){ function checkUploadStart() { var nbErrors = 0; - $("#formErrors").hide(); - $("#formErrors li").hide(); + jQuery("#formErrors").hide(); + jQuery("#formErrors li").hide(); - if ($("input[name=category_type]:checked").val() == "new" && $("input[name=category_name]").val() == "") { - $("#formErrors #emptyCategoryName").show(); + if (jQuery("input[name=category_type]:checked").val() == "new" && jQuery("input[name=category_name]").val() == "") { + jQuery("#formErrors #emptyCategoryName").show(); nbErrors++; } var nbFiles = 0; - if ($("#uploadBoxes").size() == 1) { - $("input[name^=image_upload]").each(function() { - if ($(this).val() != "") { + if (jQuery("#uploadBoxes").size() == 1) { + jQuery("input[name^=image_upload]").each(function() { + if (jQuery(this).val() != "") { nbFiles++; } }); } else { - nbFiles = $(".uploadifyQueueItem").size(); + nbFiles = jQuery(".uploadifyQueueItem").size(); } if (nbFiles == 0) { - $("#formErrors #noPhoto").show(); + jQuery("#formErrors #noPhoto").show(); nbErrors++; } if (nbErrors != 0) { - $("#formErrors").show(); + jQuery("#formErrors").show(); return false; } else { @@ -67,19 +65,19 @@ jQuery(document).ready(function(){ return byteSize+suffix; } - if ($("select[name=category] option").length == 0) { - $('input[name=category_type][value=existing]').attr('disabled', true); - $('input[name=category_type]').attr('checked', false); - $('input[name=category_type][value=new]').attr('checked', true); + if (jQuery("select[name=category] option").length == 0) { + jQuery('input[name=category_type][value=existing]').attr('disabled', true); + jQuery('input[name=category_type]').attr('checked', false); + jQuery('input[name=category_type][value=new]').attr('checked', true); } - $("input[name=category_type]").click(function () { - $("[id^=category_type_]").hide(); - $("#category_type_"+$(this).attr("value")).show(); + jQuery("input[name=category_type]").click(function () { + jQuery("[id^=category_type_]").hide(); + jQuery("#category_type_"+jQuery(this).attr("value")).show(); }); - $("#hideErrors").click(function() { - $("#formErrors").hide(); + jQuery("#hideErrors").click(function() { + jQuery("#formErrors").hide(); return false; }); @@ -88,16 +86,16 @@ jQuery(document).ready(function(){ {literal} function addUploadBox() { var uploadBox = '

'; - $(uploadBox).appendTo("#uploadBoxes"); + jQuery(uploadBox).appendTo("#uploadBoxes"); } addUploadBox(); - $("#addUploadBox A").click(function () { + jQuery("#addUploadBox A").click(function () { addUploadBox(); }); - $("#uploadForm").submit(function() { + jQuery("#uploadForm").submit(function() { return checkUploadStart(); }); {/literal} @@ -133,7 +131,7 @@ var sizeLimit = {$upload_max_filesize}; return false; } else { - $("input[name=submit_upload]").click(); + jQuery("input[name=submit_upload]").click(); } }, onError: function (event, queueID ,fileObj, errorObj) { @@ -157,7 +155,7 @@ var sizeLimit = {$upload_max_filesize}; msg = errorObj.type+": "+errorObj.info; } - $.jGrowl( + jQuery.jGrowl( '

'+msg, { theme: 'error', @@ -166,17 +164,17 @@ var sizeLimit = {$upload_max_filesize}; } ); - $("#fileUploadgrowl" + queueID).fadeOut( + jQuery("#fileUploadgrowl" + queueID).fadeOut( 250, function() { - $("#fileUploadgrowl" + queueID).remove() + jQuery("#fileUploadgrowl" + queueID).remove() } ); return false; }, onCancel: function (a, b, c, d) { var msg = "Cancelled uploading: "+c.name; - $.jGrowl( + jQuery.jGrowl( '

'+msg, { theme: 'warning', @@ -188,7 +186,7 @@ var sizeLimit = {$upload_max_filesize}; }, onClearQueue: function (a, b) { var msg = "Cleared "+b.fileCount+" files from queue"; - $.jGrowl( + jQuery.jGrowl( '

'+msg, { theme: 'warning', @@ -200,7 +198,7 @@ var sizeLimit = {$upload_max_filesize}; }, onComplete: function (a, b ,c, d, e) { var size = Math.round(c.size/1024); - $.jGrowl( + jQuery.jGrowl( '

'+c.name+' - '+size+'KB', { theme: 'success', @@ -212,12 +210,12 @@ var sizeLimit = {$upload_max_filesize}; } }); - $("input[type=button]").click(function() { + jQuery("input[type=button]").click(function() { if (!checkUploadStart()) { return false; } - $("#uploadify").uploadifyUpload(); + jQuery("#uploadify").uploadifyUpload(); }); {/literal} diff --git a/admin/themes/default/template/photos_add_ploader.tpl b/admin/themes/default/template/photos_add_ploader.tpl index 9412aa21d..8047baeca 100644 --- a/admin/themes/default/template/photos_add_ploader.tpl +++ b/admin/themes/default/template/photos_add_ploader.tpl @@ -1,20 +1,19 @@ -{html_head} -{literal} - +{/literal}{/footer_script} +{html_head}{literal} -{/literal} -{/html_head} +{/literal}{/html_head}

{'Piwigo Uploader'|@translate}

diff --git a/admin/themes/default/template/photos_add_settings.tpl b/admin/themes/default/template/photos_add_settings.tpl index fe9830e9e..c8cc19b84 100644 --- a/admin/themes/default/template/photos_add_settings.tpl +++ b/admin/themes/default/template/photos_add_settings.tpl @@ -1,38 +1,37 @@ -{literal} - -{/literal} +{/literal}{/footer_script}

{'Upload Photos'|@translate}

diff --git a/admin/themes/default/template/plugins_new.tpl b/admin/themes/default/template/plugins_new.tpl index b61b4c948..425c8338a 100644 --- a/admin/themes/default/template/plugins_new.tpl +++ b/admin/themes/default/template/plugins_new.tpl @@ -1,23 +1,20 @@ -{combine_script id='jquery.effects' load='async' path='themes/default/js/ui/minified/jquery.effects.core.min.js' } -{combine_script id='jquery.effects.blind' load='async' require='jquery.effects' path='themes/default/js/ui/minified/jquery.effects.blind.min.js' } - -{footer_script require='jquery.effects.blind'} -jQuery(document).ready(function(){ldelim} - jQuery("td[id^='desc_']").click(function() {ldelim} +{footer_script require='jquery.effects.blind'}{literal} +jQuery(document).ready(function(){ + jQuery("td[id^='desc_']").click(function() { id = this.id.split('_'); nb_lines = jQuery("#bigdesc_"+id[1]).html().split('
').length; jQuery("#smalldesc_"+id[1]).toggle('blind', 1); - if (jQuery(this).hasClass('bigdesc')) {ldelim} + if (jQuery(this).hasClass('bigdesc')) { jQuery("#bigdesc_"+id[1]).toggle('blind', 1); - } else {ldelim} + } else { jQuery("#bigdesc_"+id[1]).toggle('blind', 50 + (nb_lines * 30)); } jQuery(this).toggleClass('bigdesc'); return false; }); }); -{/footer_script} +{/literal}{/footer_script}
diff --git a/admin/themes/default/template/plugins_update.tpl b/admin/themes/default/template/plugins_update.tpl index 75030c311..50cca3505 100644 --- a/admin/themes/default/template/plugins_update.tpl +++ b/admin/themes/default/template/plugins_update.tpl @@ -1,16 +1,13 @@ -{combine_script id='jquery.effects' load='async' path='themes/default/js/ui/minified/jquery.effects.core.min.js' } -{combine_script id='jquery.effects.blind' load='async' require='jquery.effects' path='themes/default/js/ui/minified/jquery.effects.blind.min.js' } - -{footer_script require='jquery.effects.blind'} -jQuery(document).ready(function(){ldelim} - jQuery("td[id^='desc_'], p[id^='revdesc_']").click(function() {ldelim} +{footer_script require='jquery.effects.blind'}{literal} +jQuery(document).ready(function(){ + jQuery("td[id^='desc_'], p[id^='revdesc_']").click(function() { id = this.id.split('_'); jQuery("#revdesc_"+id[1]).toggle('blind'); jQuery(".button_"+id[1]).toggle(); return false; }); }); -{/footer_script} +{/literal}{/footer_script}

{'Plugins'|@translate}

diff --git a/admin/themes/default/template/themes_update.tpl b/admin/themes/default/template/themes_update.tpl index ad9d97469..caad66aa4 100644 --- a/admin/themes/default/template/themes_update.tpl +++ b/admin/themes/default/template/themes_update.tpl @@ -1,7 +1,4 @@ -{combine_script id='jquery.effects' load='async' path='themes/default/js/ui/minified/jquery.effects.core.min.js' } -{combine_script id='jquery.effects.blind' load='async' require='jquery.effects' path='themes/default/js/ui/minified/jquery.effects.blind.min.js' } - -{footer_script require='jquery.effects.blind'} +{footer_script require='jquery.effects.blind'}{literal} jQuery(document).ready(function(){ldelim} jQuery("td[id^='desc_'], p[id^='revdesc_']").click(function() {ldelim} id = this.id.split('_'); @@ -10,7 +7,7 @@ jQuery(document).ready(function(){ldelim} return false; }); }); -{/footer_script} +{/literal}{/footer_script}

{'Themes'|@translate}

-- cgit v1.2.3