aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpatdenice <patdenice@piwigo.org>2011-03-09 14:22:48 +0000
committerpatdenice <patdenice@piwigo.org>2011-03-09 14:22:48 +0000
commit8b64b57a27139a671800c6768133be0a8bb6d35f (patch)
tree238df6041c9c5ab9edd93d2465d9fbf3b03598d7
parent0552013a5765ffa46aabf93068eeb2109c2cb9e4 (diff)
feature:2114
Simplify all admin templates. git-svn-id: http://piwigo.org/svn/trunk@9586 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r--admin/include/photos_add_direct_prepare.inc.php5
-rw-r--r--admin/themes/default/template/admin.tpl2
-rw-r--r--admin/themes/default/template/cat_list.tpl2
-rw-r--r--admin/themes/default/template/comments.tpl28
-rw-r--r--admin/themes/default/template/element_set_ranks.tpl12
-rw-r--r--admin/themes/default/template/include/autosize.inc.tpl1
-rw-r--r--admin/themes/default/template/include/datepicker.inc.tpl5
-rw-r--r--admin/themes/default/template/include/dbselect.inc.tpl3
-rw-r--r--admin/themes/default/template/include/resize.inc.tpl4
-rw-r--r--admin/themes/default/template/include/tag_selection.inc.tpl20
-rw-r--r--admin/themes/default/template/languages_update.tpl11
-rw-r--r--admin/themes/default/template/menubar.tpl20
-rw-r--r--admin/themes/default/template/notification_by_mail.tpl6
-rw-r--r--admin/themes/default/template/photos_add_direct.tpl72
-rw-r--r--admin/themes/default/template/photos_add_ploader.tpl20
-rw-r--r--admin/themes/default/template/photos_add_settings.tpl30
-rw-r--r--admin/themes/default/template/plugins_new.tpl15
-rw-r--r--admin/themes/default/template/plugins_update.tpl11
-rw-r--r--admin/themes/default/template/themes_update.tpl7
-rw-r--r--include/template.class.php2
20 files changed, 114 insertions, 162 deletions
diff --git a/admin/include/photos_add_direct_prepare.inc.php b/admin/include/photos_add_direct_prepare.inc.php
index e834468f4..2cfb2f55c 100644
--- a/admin/include/photos_add_direct_prepare.inc.php
+++ b/admin/include/photos_add_direct_prepare.inc.php
@@ -92,11 +92,6 @@ $template->assign(
)
);
-$template->append(
- 'head_elements',
- '<link rel="stylesheet" type="text/css" href="'.$uploadify_path.'/uploadify.css">'."\n"
- );
-
// +-----------------------------------------------------------------------+
// | Categories |
// +-----------------------------------------------------------------------+
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}
-<script type="text/javascript">
-$(document).ready(function(){
- $(".checkComment").click(function(event) {
+{footer_script}{literal}
+jQuery(document).ready(function(){
+ jQuery(".checkComment").click(function(event) {
if (event.target.type !== 'checkbox') {
- var checkbox = $(this).children("input[type=checkbox]");
- $(checkbox).attr('checked', !$(checkbox).is(':checked'));
+ var checkbox = jQuery(this).children("input[type=checkbox]");
+ jQuery(checkbox).attr('checked', !jQuery(checkbox).is(':checked'));
}
});
- $("#commentSelectAll").click(function () {
- $(".checkComment input[type=checkbox]").attr('checked', true);
+ jQuery("#commentSelectAll").click(function () {
+ jQuery(".checkComment input[type=checkbox]").attr('checked', true);
return false;
});
- $("#commentSelectNone").click(function () {
- $(".checkComment input[type=checkbox]").attr('checked', false);
+ jQuery("#commentSelectNone").click(function () {
+ jQuery(".checkComment input[type=checkbox]").attr('checked', false);
return false;
});
- $("#commentSelectInvert").click(function () {
- $(".checkComment input[type=checkbox]").each(function() {
- $(this).attr('checked', !$(this).is(':checked'));
+ jQuery("#commentSelectInvert").click(function () {
+ jQuery(".checkComment input[type=checkbox]").each(function() {
+ jQuery(this).attr('checked', !$(this).is(':checked'));
});
return false;
});
});
-</script>
-{/literal}
+{/literal}{/footer_script}
<div class="titrePage">
<h2>{'Waiting'|@translate} {$TABSHEET_TITLE}</h2>
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}
-<script type="text/javascript">
-$(document).ready(function(){
- $(".tagSelection label").click(function () {
- var parent = $(this).parent('li');
- var checkbox = $(this).children("input[type=checkbox]");
+{footer_script require='jquery'}{literal}
+jQuery(document).ready(function(){
+ jQuery(".tagSelection label").click(function () {
+ var parent = jQuery(this).parent('li');
+ var checkbox = jQuery(this).children("input[type=checkbox]");
- if ($(checkbox).is(':checked')) {
- $(parent).addClass("tagSelected");
+ if (jQuery(checkbox).is(':checked')) {
+ jQuery(parent).addClass("tagSelected");
}
else {
- $(parent).removeClass('tagSelected');
+ jQuery(parent).removeClass('tagSelected');
}
});
});
-</script>
-{/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}
<div class="titrePage">
<h2>{'Languages'|@translate}</h2>
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<ar.length;i++) {ldelim}
+ for(i=0;i<ar.length;i++) {
men = ar[i].split('menu_');
document.getElementsByName('pos_' + men[1])[0].value = i+1;
}
});
});
-{/footer_script}
+{/literal}{/footer_script}
<div class="titrePage">
<h2>{'Menu Management'|translate}</h2>
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}
-<script type="text/javascript">
+{footer_script}{literal}
jQuery(document).ready(function(){
jQuery("#checkAllLink").click(function () {
@@ -15,8 +14,7 @@ jQuery(document).ready(function(){
});
});
-</script>
-{/literal}
+{/literal}{/footer_script}
<div class="titrePage">
<h2>{'Send mail to users'|@translate} {$TABSHEET_TITLE}</h2>
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'}
-<script type="text/javascript" src="{$uploadify_path}/swfobject.js"></script>
+{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}
-<link rel="stylesheet" type="text/css" href="{$ROOT_URL}admin/themes/default/uploadify.jGrowl.css">
-{/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 = '<p class="file"><input type="file" size="60" name="image_upload[]"></p>';
- $(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(
'<p></p>'+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(
'<p></p>'+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(
'<p></p>'+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(
'<p></p>'+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}
-<script type="text/javascript">
-$().ready(function(){
- $("#pLoaderPage img").fadeTo("fast", 0.6);
+{footer_script}{literal}
+jQuery().ready(function(){
+ jQuery("#pLoaderPage img").fadeTo("fast", 0.6);
- $("#pLoaderPage img").hover(
+ jQuery("#pLoaderPage img").hover(
function(){
- $(this).fadeTo("fast", 1.0); // Opacity on hover
+ jQuery(this).fadeTo("fast", 1.0); // Opacity on hover
},
function(){
- $(this).fadeTo("fast", 0.6); // Opacity on mouseout
+ jQuery(this).fadeTo("fast", 0.6); // Opacity on mouseout
}
);
});
-</script>
+{/literal}{/footer_script}
+{html_head}{literal}
<style type="text/css">
#pLoaderPage {
width:600px;
@@ -46,8 +45,7 @@ $().ready(function(){
margin:20px;
}
</style>
-{/literal}
-{/html_head}
+{/literal}{/html_head}
<div class="titrePage">
<h2>{'Piwigo Uploader'|@translate}</h2>
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}
-<script type="text/javascript">
-$(document).ready(function(){
+{footer_script}{literal}
+jQuery(document).ready(function(){
function toggleResizeFields(prefix) {
- var checkbox = $("#"+prefix+"_resize");
- var needToggle = $("input[name^="+prefix+"_]").not(checkbox).not($("#hd_keep")).parents('tr');
+ var checkbox = jQuery("#"+prefix+"_resize");
+ var needToggle = jQuery("input[name^="+prefix+"_]").not(checkbox).not(jQuery("#hd_keep")).parents('tr');
- if ($(checkbox).is(':checked')) {
+ if (jQuery(checkbox).is(':checked')) {
needToggle.show();
if (prefix == "websize") {
- $("#hd_keep").parents("fieldset").show();
+ jQuery("#hd_keep").parents("fieldset").show();
}
}
else {
needToggle.hide();
if (prefix == "websize") {
- $("#hd_keep").parents("fieldset").hide();
+ jQuery("#hd_keep").parents("fieldset").hide();
}
}
}
toggleResizeFields("websize");
- $("#websize_resize").click(function () {toggleResizeFields("websize")});
+ jQuery("#websize_resize").click(function () {toggleResizeFields("websize")});
toggleResizeFields("hd");
- $("#hd_resize").click(function () {toggleResizeFields("hd")});
+ jQuery("#hd_resize").click(function () {toggleResizeFields("hd")});
function toggleHdFields() {
- var checkbox = $("#hd_keep");
- var needToggle = $("input[name^=hd_]").not(checkbox).parents('tr');
+ var checkbox = jQuery("#hd_keep");
+ var needToggle = jQuery("input[name^=hd_]").not(checkbox).parents('tr');
- if ($(checkbox).is(':checked')) {
+ if (jQuery(checkbox).is(':checked')) {
needToggle.show();
toggleResizeFields("hd");
}
@@ -42,10 +41,9 @@ $(document).ready(function(){
}
toggleHdFields();
- $("#hd_keep").click(function () {toggleHdFields()});
+ jQuery("#hd_keep").click(function () {toggleHdFields()});
});
-</script>
-{/literal}
+{/literal}{/footer_script}
<div class="titrePage">
<h2>{'Upload Photos'|@translate}</h2>
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('<br>').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}
<div class="titrePage">
<span class="sort">
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}
<div class="titrePage">
<h2>{'Plugins'|@translate}</h2>
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}
<div class="titrePage">
<h2>{'Themes'|@translate}</h2>
diff --git a/include/template.class.php b/include/template.class.php
index de135ac8a..10dea455c 100644
--- a/include/template.class.php
+++ b/include/template.class.php
@@ -1139,7 +1139,7 @@ class ScriptLoader
private function load_known_required_script($id, $load_mode)
{
- if ( isset(self::$known_paths[$id]) or strncmp($id, 'jquery.ui.', 10)==0 or strncmp($id, 'jquery.effetcs.', 15)==0 )
+ if ( isset(self::$known_paths[$id]) or strncmp($id, 'jquery.ui.', 10)==0 or strncmp($id, 'jquery.effects.', 15)==0 )
{
$this->add($id, $load_mode, array(), null);
return true;