Improve clipboard pseudo-pages for media management
authorMatthias Schmidt <gravatronics@live.com>
Fri, 25 Dec 2015 07:25:09 +0000 (08:25 +0100)
committerMatthias Schmidt <gravatronics@live.com>
Fri, 25 Dec 2015 07:26:34 +0000 (08:26 +0100)
com.woltlab.wcf/clipboardAction.xml
wcfsetup/install/files/js/WoltLab/WCF/Media/Manager/Base.js

index d633a98d87c1255f727c40690abaa73de0fe8a3e..cbe7ec5302b164836ebff29b7f62d5b4df15c132 100644 (file)
                        <pages>
                                <!--
                                the clipboard API requires a page but since the media clipboard can be used
-                               in dialogs, we use this wildcard instead of a real page class
+                               in dialogs, we use pseudo-pages
                                -->
-                               <page><![CDATA[*]]></page>
+                               <page><![CDATA[menuManagerDialog-editor]]></page>
                        </pages>
                </action>
                <action name="delete">
                        <actionclassname><![CDATA[wcf\system\clipboard\action\MediaClipboardAction]]></actionclassname>
                        <showorder>2</showorder>
                        <pages>
-                               <page><![CDATA[*]]></page>
+                               <page><![CDATA[menuManagerDialog-editor]]></page>
+                               <page><![CDATA[menuManagerDialog-select]]></page>
                        </pages>
                </action>
                <!-- /com.woltlab.wcf.media -->
index 08473214ad1d4275bb90b8cf5bd51cd5b61e4ae2..3a55f4ecbd46a2ec91eb8b12fc8c6849ed40921b 100644 (file)
@@ -198,7 +198,7 @@ define(
                                
                                Clipboard.setup({
                                        hasMarkedItems: data.returnValues.hasMarkedItems ? true : false,
-                                       pageClassName: '*'
+                                       pageClassName: 'menuManagerDialog-' + this.getMode()
                                });
                                
                                EventHandler.add('com.woltlab.wcf.clipboard', 'com.woltlab.wcf.media', this._clipboardAction.bind(this));