mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-07-21 00:53:04 +02:00
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
This commit is contained in:
@@ -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');
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user