Fix initial media search file type on media list page
authorMatthias Schmidt <gravatronics@live.com>
Thu, 1 Sep 2016 16:16:13 +0000 (18:16 +0200)
committerMatthias Schmidt <gravatronics@live.com>
Thu, 1 Sep 2016 16:16:48 +0000 (18:16 +0200)
wcfsetup/install/files/acp/templates/mediaList.tpl
wcfsetup/install/files/js/WoltLabSuite/Core/Controller/Media/List.js

index 14589086e5d4dae26396c47c9278333b64a5a391..0b4c528a6dcbaa81e549871f19b1bfc395f545eb 100644 (file)
@@ -5,6 +5,7 @@
        
        require(['WoltLabSuite/Core/Controller/Media/List'], function (ControllerMediaList) {
                ControllerMediaList.init({
+                       fileType: '{$fileType}',
                        hasMarkedItems: {if $hasMarkedItems}true{else}false{/if}
                });
        });
index 379d0c8b9c52dc72bd8ef4218a46eba80348af88..45b737e11af1f4fb898723777211acb4fc6530b8 100644 (file)
@@ -26,7 +26,7 @@ define(['EventHandler', 'WoltLabSuite/Core/Controller/Clipboard', 'WoltLabSuite/
                        
                        EventHandler.add('com.woltlab.wcf.clipboard', 'com.woltlab.wcf.media', this._clipboardAction.bind(this));
                        
-                       new MediaSearch('{$fileType}');
+                       new MediaSearch(options.fileType);
                        
                        new WCF.Action.Delete('wcf\\data\\media\\MediaAction', '.jsMediaRow');