aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorplegall <plg@piwigo.org>2013-11-29 13:41:03 +0000
committerplegall <plg@piwigo.org>2013-11-29 13:41:03 +0000
commit91b6a0137dc6b703604f9c2720ee887b13b08020 (patch)
tree210a659b0f7fb8efc2e5a4d769de47ffb27b021d
parentd700b89628dc9475af2e7ef9b42102ee2e05e5bd (diff)
optimized jQuery (thanks to mistic100)
git-svn-id: http://piwigo.org/svn/trunk@25753 68402e56-0260-453c-a942-63ccdbb3a9ee
-rw-r--r--themes/smartpocket/admin/admin.tpl8
1 files changed, 1 insertions, 7 deletions
diff --git a/themes/smartpocket/admin/admin.tpl b/themes/smartpocket/admin/admin.tpl
index e903622fd..d572bcf2e 100644
--- a/themes/smartpocket/admin/admin.tpl
+++ b/themes/smartpocket/admin/admin.tpl
@@ -12,13 +12,7 @@ input[type=checkbox] {
{footer_script}{literal}
jQuery(document).ready(function() {
jQuery('form li label input[type=checkbox]').change(function() {
- var graphicalCheckbox = jQuery(this).parent().find('.graphicalCheckbox');
- if (jQuery(this).is(':checked')) {
- jQuery(graphicalCheckbox).removeClass('icon-check-empty').addClass('icon-check');
- }
- else {
- jQuery(graphicalCheckbox).removeClass('icon-check').addClass('icon-check-empty');
- }
+ jQuery(this).prev().toggleClass('icon-check icon-check-empty');
});
});
{/literal}{/footer_script}