From 90ab389bedd415fc16e030e3f0e708188ccae1a2 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Fri, 18 Oct 2013 17:12:05 -0400 Subject: [PATCH] added delete method for virtual items --- MediaBrowser.WebDashboard/ApiClient.js | 14 ++++++++++++++ MediaBrowser.WebDashboard/packages.config | 2 +- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/MediaBrowser.WebDashboard/ApiClient.js b/MediaBrowser.WebDashboard/ApiClient.js index 38a8a3136b..8c2dfc7201 100644 --- a/MediaBrowser.WebDashboard/ApiClient.js +++ b/MediaBrowser.WebDashboard/ApiClient.js @@ -1163,6 +1163,20 @@ MediaBrowser.ApiClient = function ($, navigator, JSON, WebSocket, setTimeout, wi }); }; + self.deleteItem = function (itemId) { + + if (!itemId) { + throw new Error("null itemId"); + } + + var url = self.getUrl("Items/" + itemId); + + return self.ajax({ + type: "DELETE", + url: url + }); + }; + self.updateItemImageIndex = function (itemId, itemType, itemName, imageType, imageIndex, newIndex) { if (!imageType) { diff --git a/MediaBrowser.WebDashboard/packages.config b/MediaBrowser.WebDashboard/packages.config index aec335395f..f0ac36bc53 100644 --- a/MediaBrowser.WebDashboard/packages.config +++ b/MediaBrowser.WebDashboard/packages.config @@ -1,6 +1,6 @@  - + \ No newline at end of file