this._containerElements.searchInput.val('');
// deselect all input elements
- this._containerElements.permissionList.hide().find('input[type=checkbox]').removeAttr('checked');
+ this._containerElements.permissionList.hide().find('input[type=checkbox]').prop('checked', false);
},
/**
this._search.addExcludedSearchValue(data.label);
// uncheck all option values
- this._containerElements.permissionList.find('input[type=checkbox]').removeAttr('checked');
+ this._containerElements.permissionList.find('input[type=checkbox]').prop('checked', false);
// clear search input
this._containerElements.searchInput.val('');
if ($checkbox.is(':checked')) {
if ($type === 'deny') {
- $('#grant' + $optionID).removeAttr('checked');
+ $('#grant' + $optionID).prop('checked', false);
if (this._containerElements.grantAll !== null) {
- this._containerElements.grantAll.removeAttr('checked');
+ this._containerElements.grantAll.prop('checked', false);
}
}
else {
- $('#deny' + $optionID).removeAttr('checked');
+ $('#deny' + $optionID).prop('checked', false);
if (this._containerElements.denyAll !== null) {
- this._containerElements.denyAll.removeAttr('checked');
+ this._containerElements.denyAll.prop('checked', false);
}
}
}
else {
if ($type === 'deny' && this._containerElements.denyAll !== null) {
- this._containerElements.denyAll.removeAttr('checked');
+ this._containerElements.denyAll.prop('checked', false);
}
else if ($type === 'grant' && this._containerElements.grantAll !== null) {
- this._containerElements.grantAll.removeAttr('checked');
+ this._containerElements.grantAll.prop('checked', false);
}
}
});
if ($type == 'deny') {
if (this._containerElements.denyAll !== null) {
- if ($allChecked) this._containerElements.denyAll.prop('checked', 'checked')
- else this._containerElements.denyAll.removeAttr('checked');
+ if ($allChecked) this._containerElements.denyAll.prop('checked', true)
+ else this._containerElements.denyAll.prop('checked', false);
}
}
else {
if (this._containerElements.grantAll !== null) {
- if ($allChecked) this._containerElements.grantAll.prop('checked', 'checked')
- else this._containerElements.grantAll.removeAttr('checked');
+ if ($allChecked) this._containerElements.grantAll.prop('checked', true)
+ else this._containerElements.grantAll.prop('checked', false);
}
}
},
if ($checkbox.is(':checked')) {
if ($type === 'deny') {
- this._containerElements.grantAll.removeAttr('checked');
+ this._containerElements.grantAll.prop('checked', false);
this._containerElements.permissionList.find('input[type=checkbox]').each(function(index, item) {
var $item = $(item);
if ($item.data('type') === 'deny' && $item.attr('id') !== 'denyAll') {
- $item.prop('checked', 'checked').trigger('change');
+ $item.prop('checked', true).trigger('change');
}
});
}
else {
- this._containerElements.denyAll.removeAttr('checked');
+ this._containerElements.denyAll.prop('checked', false);
this._containerElements.permissionList.find('input[type=checkbox]').each(function(index, item) {
var $item = $(item);
if ($item.data('type') === 'grant' && $item.attr('id') !== 'grantAll') {
- $item.prop('checked', 'checked').trigger('change');
+ $item.prop('checked', true).trigger('change');
}
});
}
}
else {
if ($type === 'deny') {
- this._containerElements.grantAll.removeAttr('checked');
+ this._containerElements.grantAll.prop('checked', false);
this._containerElements.permissionList.find('input[type=checkbox]').each(function(index, item) {
var $item = $(item);
if ($item.data('type') === 'deny' && $item.attr('id') !== 'denyAll') {
- $item.removeAttr('checked').trigger('change');
+ $item.prop('checked', false).trigger('change');
}
});
}
else {
- this._containerElements.denyAll.removeAttr('checked');
+ this._containerElements.denyAll.prop('checked', false);
this._containerElements.permissionList.find('input[type=checkbox]').each(function(index, item) {
var $item = $(item);
if ($item.data('type') === 'grant' && $item.attr('id') !== 'grantAll') {
- $item.removeAttr('checked').trigger('change');
+ $item.prop('checked', false).trigger('change');
}
});
}
*/
_setupPermissions: function(type, objectID) {
// reset all checkboxes to unchecked
- this._containerElements.permissionList.find("input[type='checkbox']").removeAttr('checked');
+ this._containerElements.permissionList.find("input[type='checkbox']").prop('checked', false);
// use stored permissions if applicable
if (this._values[type] && this._values[type][objectID]) {
for (var $optionID in this._values[type][objectID]) {
if (this._values[type][objectID][$optionID] == 1) {
- $('#grant' + $optionID).attr('checked', 'checked').trigger('change');
+ $('#grant' + $optionID).prop('checked', true).trigger('change');
}
else {
- $('#deny' + $optionID).attr('checked', 'checked').trigger('change');
+ $('#deny' + $optionID).prop('checked', true).trigger('change');
}
}
}
self._values[$type][$objectID][$optionID] = $optionValue;
// reset value afterwards
- $checkbox.removeAttr('checked');
+ $checkbox.prop('checked', false);
}
else if (self._values[$type] && self._values[$type][$objectID] && self._values[$type][$objectID][$optionID] && self._values[$type][$objectID][$optionID] == $optionValue) {
delete self._values[$type][$objectID][$optionID];
$container.find('input.jsClipboardItem').each($.proxy(function(innerIndex, item) {
var $item = $(item);
if (WCF.inArray($item.data('objectID'), this._markedObjectIDs)) {
- $item.attr('checked', 'checked');
+ $item.prop('checked', true);
// add marked class for element container
$item.parents('.jsClipboardObject').addClass('jsMarked');
});
if ($allItemsMarked) {
- $(markAll).attr('checked', 'checked');
+ $(markAll).prop('checked', true);
}
});
}, this));
this._containers.each(function(index, container) {
var $container = $(container);
- $container.find('input.jsClipboardItem, input.jsClipboardMarkAll').removeAttr('checked');
+ $container.find('input.jsClipboardItem, input.jsClipboardMarkAll').prop('checked', false);
$container.find('.jsClipboardObject').removeClass('jsMarked');
});
},
// simulate a ticked 'markAll' checkbox
$container.find('.jsClipboardMarkAll').each(function(index, markAll) {
if ($markedAll) {
- $(markAll).attr('checked', 'checked');
+ $(markAll).prop('checked', true);
}
else {
- $(markAll).removeAttr('checked');
+ $(markAll).prop('checked', false);
}
});
}
var $objectID = $containerItem.data('objectID');
if ($isMarked) {
if (!$containerItem.prop('checked')) {
- $containerItem.attr('checked', 'checked');
+ $containerItem.prop('checked', true);
this._markedObjectIDs.push($objectID);
$objectIDs.push($objectID);
}
}
else {
if ($containerItem.prop('checked')) {
- $containerItem.removeAttr('checked');
+ $containerItem.prop('checked', false);
this._markedObjectIDs = $.removeArrayValue(this._markedObjectIDs, $objectID);
$objectIDs.push($objectID);
}
for (var $__containerID in this._containers) {
var $__container = $(this._containers[$__containerID]);
if ($__container.data('type') == $typeName) {
- $__container.find('.jsClipboardMarkAll, .jsClipboardItem').removeAttr('checked');
+ $__container.find('.jsClipboardMarkAll, .jsClipboardItem').prop('checked', false);
break;
}
}