From 7469767a2313b6fb050b0671b5b5837b17579152 Mon Sep 17 00:00:00 2001 From: Matthias Schmidt Date: Thu, 1 Sep 2016 18:16:13 +0200 Subject: [PATCH] Fix initial media search file type on media list page --- wcfsetup/install/files/acp/templates/mediaList.tpl | 1 + .../install/files/js/WoltLabSuite/Core/Controller/Media/List.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) 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'); -- 2.20.1