Liuguiming 0 Posted February 7, 2018 Posted February 7, 2018 (edited) Hello. I am going to add a item in the menu of more commands button. And when press this item, wanna to show a dialog. I add a item in a menu of more commands button. This is my code. itemcontextmenu.js function getCommands(options) { ... }), itemHelper.supportsAddingToPlaylist(item) && commands.push({ name: globalize.translate("sharedcomponents#AdPlay"), id: "adplay" .. } This is my code to show a dialog when press this item.function executeCommand(item, id, options) { var itemId = item.Id, serverId = item.ServerId, apiClient = connectionManager.getApiClient(serverId); return new Promise(function (resolve, reject) { switch (id) { case "addtoplaylist": require(["playlistEditor"], function (playlistEditor) { (new playlistEditor).show({ items: [itemId], serverId: serverId }).then(getResolveFunction(resolve, id, !0), getResolveFunction(resolve, id)) }); break; case "adplay": require(["adplayEditor"], function (adplayEditor) { (new adplayEditor).show({ items: [itemId], serverId: serverId }).then(getResolveFunction(resolve, id, !0), getResolveFunction(resolve, id)) }); break; ... } I created "adplayEditor.js" and copied to "\MediaBrowser.ServerApplication\bin\Debug\dashboard-ui\bower_components\emby-webcomponents".When I press my item, this error occurs. alameda.js?v=3.2.70.0:1 Uncaught (in promise) Error: Load failed: adplayEditor: http://localhost:8096/web/adplayEditor.js?v=3.2.70.0 at HTMLScriptElement.<anonymous> (alameda.js?v=3.2.70.0:1) Any help will be appreciated.Thanks. Edited February 7, 2018 by Liuguiming
Luke 42077 Posted February 8, 2018 Posted February 8, 2018 Hi, we don't currently have any way to do this.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now