Fixed a few clipboard issues with multiple active containers
authorAlexander Ebert <ebert@woltlab.com>
Tue, 29 Apr 2014 13:23:47 +0000 (15:23 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Tue, 29 Apr 2014 13:23:47 +0000 (15:23 +0200)
wcfsetup/install/files/js/WCF.js

index 88ab6dce99efa2353a2e0b8fce1b82e3794ad237..adad82c30ebc1c01fa5ed7d1381b42232c5a271d 100755 (executable)
@@ -1624,7 +1624,10 @@ WCF.Clipboard = {
                        
                        // add 'unmark all'
                        $('<li class="dropdownDivider" />').appendTo($itemList);
-                       $('<li><span>' + WCF.Language.get('wcf.clipboard.item.unmarkAll') + '</span></li>').appendTo($itemList).click($.proxy(function() {
+                       var $foo = $typeName;
+                       $('<li><span>' + WCF.Language.get('wcf.clipboard.item.unmarkAll') + '</span></li>').data('typeName', $typeName).appendTo($itemList).click($.proxy(function(event) {
+                               var $typeName = $(event.currentTarget).data('typeName');
+                               
                                this._proxy.setOption('data', {
                                        action: 'unmarkAll',
                                        type: $typeName
@@ -1643,6 +1646,7 @@ WCF.Clipboard = {
                                        // call and restore success method
                                        this._success(data, textStatus, jqXHR);
                                        this._proxy.setOption('success', $.proxy(this._success, this));
+                                       this._loadMarkedItems();
                                }, this));
                                this._proxy.sendRequest();
                        }, this));