mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-13 21:13:26 +00:00
update jquery attr into prop method for checked and disabled properties
This commit is contained in:
@@ -44,14 +44,21 @@ $(document).ready(function () {
|
||||
$("ul.multiselect .coll-checkbox", $(this).closest('.form2')).attr("checked", false);
|
||||
});
|
||||
|
||||
$(".multiselect-group").toggle(function () {
|
||||
var $this = $(this);
|
||||
var groupId = $this.data('group-id');
|
||||
$(".checkbox-" + groupId, $this.closest('.form2')).attr("checked", true);
|
||||
}, function () {
|
||||
var $this = $(this);
|
||||
var groupId = $this.data('group-id');
|
||||
$(".checkbox-" + groupId, $this.closest('.form2')).attr("checked", false);
|
||||
// toggle is deprecated:
|
||||
var hasMultiSelectionGroup = false;
|
||||
$(".multiselect-group").on('click', function () {
|
||||
|
||||
if( hasMultiSelectionGroup === true) {
|
||||
var $this = $(this);
|
||||
var groupId = $this.data('group-id');
|
||||
$(".checkbox-" + groupId, $this.closest('.form2')).attr("checked", false);
|
||||
hasMultiSelectionGroup = false;
|
||||
} else {
|
||||
var $this = $(this);
|
||||
var groupId = $this.data('group-id');
|
||||
$(".checkbox-" + groupId, $this.closest('.form2')).attr("checked", true);
|
||||
hasMultiSelectionGroup = true;
|
||||
}
|
||||
});
|
||||
});
|
||||
//#############END DOCUMENT READY ######################################//
|
||||
|
Reference in New Issue
Block a user