From 91b5b09f45ce8f391eb5aa9c0d30b2cd2e33680d Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Fri, 1 Jun 2012 14:20:53 +0200 Subject: [PATCH] Checkboxes are now properly reset within clipboard --- wcfsetup/install/files/js/WCF.js | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/wcfsetup/install/files/js/WCF.js b/wcfsetup/install/files/js/WCF.js index 0a018696ef..dc5a3749d3 100644 --- a/wcfsetup/install/files/js/WCF.js +++ b/wcfsetup/install/files/js/WCF.js @@ -751,6 +751,8 @@ WCF.Clipboard = { * @param jQuery jqXHR */ _loadMarkedItemsSuccess: function(data, textStatus, jqXHR) { + this._resetMarkings(); + for (var $typeName in data.markedItems) { var $objectData = data.markedItems[$typeName]; for (var $i in $objectData) { @@ -796,6 +798,17 @@ WCF.Clipboard = { this._success(data, textStatus, jqXHR); }, + /** + * Resets all checkboxes. + */ + _resetMarkings: function() { + this._containers.each(function(index, container) { + var $container = $(container); + + $container.find('input.jsClipboardItem, input.jsClipboardMarkAll').removeAttr('checked'); + }); + }, + /** * Initializes a clipboard container. * @@ -1051,7 +1064,7 @@ WCF.Clipboard = { listItem.trigger('clipboardActionResponse', [ data, listItem.data('type'), listItem.data('actionName'), listItem.data('parameters') ]); this._loadMarkedItems(); - }, true) + }, this) }); if (this._actionObjects[listItem.data('objectType')] && this._actionObjects[listItem.data('objectType')][listItem.data('parameters').actionName]) { -- 2.20.1