require(['Language', 'WoltLabSuite/Core/Controller/Media/List'], function (Language, ControllerMediaList) {
Language.add('wcf.media.delete.confirmMessage', '{lang __literal=true}wcf.media.delete.confirmMessage{/lang}')
ControllerMediaList.init({
+ {if $categoryID}
+ categoryId: {@$categoryID},
+ {/if}
hasMarkedItems: {if $hasMarkedItems}true{else}false{/if}
});
});
var icon = elCreate('span');
icon.classList = 'icon icon16 fa-upload';
DomUtil.prepend(icon, elBySel('span', this._button));
+ },
+
+ /**
+ * @see WoltLabSuite/Core/Upload#_getParameters
+ */
+ _getParameters: function() {
+ if (this._options.categoryId) {
+ return Core.extend(MediaListUpload._super.prototype._getParameters.call(this), {
+ categoryID: this._options.categoryId
+ });
+ }
+
+ return MediaListUpload._super.prototype._getParameters.call(this);
}
});