Fixed unmarking of clipboard items
authorAlexander Ebert <ebert@woltlab.com>
Fri, 24 Jan 2014 14:59:38 +0000 (15:59 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Fri, 24 Jan 2014 14:59:38 +0000 (15:59 +0100)
wcfsetup/install/files/js/WCF.js

index 451718181cd69a415c7e740c3a1f132ebd1aeb63..bd7107723cbd9341a729ac34bc69fb2523fa23f4 100755 (executable)
@@ -1581,15 +1581,15 @@ WCF.Clipboard = {
                                        type: $typeName
                                });
                                this._proxy.setOption('success', $.proxy(function(data, textStatus, jqXHR) {
-                                       for (var $__containerID in this._containers) {
-                                               var $__container = $(this._containers[$__containerID]);
-                                               if ($__container.data('type') == $typeName) {
-                                                       $__container.find('.jsClipboardMarkAll, .jsClipboardItem').prop('checked', false);
-                                                       $__container.find('.jsClipboardObject').removeClass('jsMarked');
+                                       this._containers.each($.proxy(function(index, container) {
+                                               var $container = $(container);
+                                               if ($container.data('type') == $typeName) {
+                                                       $container.find('.jsClipboardMarkAll, .jsClipboardItem').prop('checked', false);
+                                                       $container.find('.jsClipboardObject').removeClass('jsMarked');
                                                        
-                                                       break;
+                                                       return false;
                                                }
-                                       }
+                                       }, this));
                                        
                                        // call and restore success method
                                        this._success(data, textStatus, jqXHR);