aboutsummaryrefslogtreecommitdiffstats
path: root/admin/themes/default/template/include
diff options
context:
space:
mode:
authorrvelices <rv-github@modusoptimus.com>2014-04-30 18:36:49 +0000
committerrvelices <rv-github@modusoptimus.com>2014-04-30 18:36:49 +0000
commit8c5064a3305bc1432f7e3840bdea906de76d2a71 (patch)
tree2cdcd5c2aad6f5ca8ec00826d319ed328440797d /admin/themes/default/template/include
parentfc20ee6b691287363714f49ab90837359c3db951 (diff)
admin tag selection use event delegation (faster load time with large number of tags)
git-svn-id: http://piwigo.org/svn/trunk@28317 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'admin/themes/default/template/include')
-rw-r--r--admin/themes/default/template/include/tag_selection.inc.tpl6
1 files changed, 3 insertions, 3 deletions
diff --git a/admin/themes/default/template/include/tag_selection.inc.tpl b/admin/themes/default/template/include/tag_selection.inc.tpl
index 680c6b85e..e84ec2431 100644
--- a/admin/themes/default/template/include/tag_selection.inc.tpl
+++ b/admin/themes/default/template/include/tag_selection.inc.tpl
@@ -1,14 +1,14 @@
{footer_script require='jquery'}{literal}
jQuery(document).ready(function(){
- jQuery(".tagSelection label").click(function () {
+ jQuery(".tagSelection").on("click", "label", function () {
var parent = jQuery(this).parent('li');
var checkbox = jQuery(this).children("input[type=checkbox]");
if (jQuery(checkbox).is(':checked')) {
- jQuery(parent).addClass("tagSelected");
+ parent.addClass("tagSelected");
}
else {
- jQuery(parent).removeClass('tagSelected');
+ parent.removeClass('tagSelected');
}
});
});