From: Matthias Schmidt Date: Thu, 1 Sep 2016 16:16:13 +0000 (+0200) Subject: Fix initial media search file type on media list page X-Git-Tag: 3.0.0_Beta_1~353 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=7469767a2313b6fb050b0671b5b5837b17579152;p=GitHub%2FWoltLab%2FWCF.git Fix initial media search file type on media list page --- diff --git a/wcfsetup/install/files/acp/templates/mediaList.tpl b/wcfsetup/install/files/acp/templates/mediaList.tpl index 14589086e5..0b4c528a6d 100644 --- a/wcfsetup/install/files/acp/templates/mediaList.tpl +++ b/wcfsetup/install/files/acp/templates/mediaList.tpl @@ -5,6 +5,7 @@ require(['WoltLabSuite/Core/Controller/Media/List'], function (ControllerMediaList) { ControllerMediaList.init({ + fileType: '{$fileType}', hasMarkedItems: {if $hasMarkedItems}true{else}false{/if} }); }); diff --git a/wcfsetup/install/files/js/WoltLabSuite/Core/Controller/Media/List.js b/wcfsetup/install/files/js/WoltLabSuite/Core/Controller/Media/List.js index 379d0c8b9c..45b737e11a 100644 --- a/wcfsetup/install/files/js/WoltLabSuite/Core/Controller/Media/List.js +++ b/wcfsetup/install/files/js/WoltLabSuite/Core/Controller/Media/List.js @@ -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');