diff --git a/ApiClient.js b/ApiClient.js index a46fe34874..62204c2b11 100644 --- a/ApiClient.js +++ b/ApiClient.js @@ -377,6 +377,28 @@ MediaBrowser.ApiClient = function ($, navigator, JSON, WebSocket, setTimeout) { }); }; + /** + * Refreshes metadata for an item + */ + self.refreshItem = function (itemId, force, recursive) { + + if (!itemId) { + throw new Error("null itemId"); + } + + var url = self.getUrl("Items/" + itemId + "/Refresh", { + + force: force || false, + recursive: recursive || false + + }); + + return self.ajax({ + type: "POST", + url: url + }); + }; + /** * Installs or updates a new plugin */ diff --git a/dashboard-ui/css/librarybrowser.css b/dashboard-ui/css/librarybrowser.css index 478f29841d..09ec1a1448 100644 --- a/dashboard-ui/css/librarybrowser.css +++ b/dashboard-ui/css/librarybrowser.css @@ -408,11 +408,19 @@ a.itemTag:hover { overflow: hidden; } +.editMetadataForm { + max-width: 100%; +} + @media all and (min-width: 600px) { .inlineDetailSection:not(.hide) { display: inline-block; margin-bottom: 2em; } + + .editMetadataForm .ui-field-contain { + margin: .25em 0; + } } @media all and (max-width: 750px) { @@ -475,6 +483,16 @@ a.itemTag:hover { .noBackdrop .lnkSibling { bottom: 205px; } + + .metadataFormFields { + float: left; + width: 70%; + } + + .metadataFormButtons { + float: right; + width: 28%; + } } @media all and (min-width: 650px) { diff --git a/dashboard-ui/css/search.css b/dashboard-ui/css/search.css index cac650eeba..aa9565835c 100644 --- a/dashboard-ui/css/search.css +++ b/dashboard-ui/css/search.css @@ -153,10 +153,10 @@ opacity: .9; border-right: 5px solid rgba(0,0,0,0); border-left: 5px solid rgba(0,0,0,0); - border-radius: 50px; - box-shadow: 0 0 35px #2187e7; - width: 50px; - height: 50px; + border-radius: 30px; + box-shadow: 0 0 20px #2187e7; + width: 30px; + height: 30px; margin: 0 auto; -moz-animation: spinPulse 1s infinite ease-in-out; -webkit-animation: spinPulse 1s infinite linear; @@ -168,13 +168,13 @@ opacity: .9; border-left: 5px solid rgba(0,0,0,0); border-right: 5px solid rgba(0,0,0,0); - border-radius: 50px; + border-radius: 30px; box-shadow: 0 0 15px #2187e7; - width: 30px; - height: 30px; + width: 15px; + height: 15px; margin: 0 auto; position: relative; - top: -50px; + top: -32px; -moz-animation: spinoffPulse 1s infinite linear; -webkit-animation: spinoffPulse 1s infinite linear; } diff --git a/dashboard-ui/css/site.css b/dashboard-ui/css/site.css index 5a4a1e009c..62933f7ac8 100644 --- a/dashboard-ui/css/site.css +++ b/dashboard-ui/css/site.css @@ -188,7 +188,6 @@ h1 .imageLink { border: 0; padding: 0; cursor: pointer; - cursor: hand; } .imageButton:hover { diff --git a/dashboard-ui/edititemmetadata.html b/dashboard-ui/edititemmetadata.html index 9ad6be57cc..34dac10e6d 100644 --- a/dashboard-ui/edititemmetadata.html +++ b/dashboard-ui/edititemmetadata.html @@ -8,7 +8,6 @@
-


@@ -17,86 +16,105 @@ Images
-
-
- - + +
+
+ + +
+
+ + +
+
+ + +
+ + +
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+ +
+ + +
+
+ + +
+
+ + +
+ + + +
+ + +
+
    +
  • + +
  • +
-
- - +
+ +
+

Refresh Metadata

+
+ +

+ +

+
+
+
-
- - -
- - -
- - -
-
- - -
-
- - -
-
- - -
-
- - -
- -
- - -
-
- - -
-
- - -
- - - -
- - -
-
    -
  • - -
  • -
diff --git a/dashboard-ui/scripts/edititemmetadata.js b/dashboard-ui/scripts/edititemmetadata.js index 55f47b9862..1bdf97efe1 100644 --- a/dashboard-ui/scripts/edititemmetadata.js +++ b/dashboard-ui/scripts/edititemmetadata.js @@ -10,6 +10,10 @@ ApiClient.getItem(Dashboard.getCurrentUserId(), id).done(function (item) { + $('#btnRefresh', page).button('enable'); + + $('#refreshLoading', page).hide(); + currentItem = item; LibraryBrowser.renderName(item, $('.itemName', page), true); @@ -214,6 +218,19 @@ var page = this; + $('#btnRefresh', this).on('click', function () { + + $(this).button('disable'); + + $('#refreshLoading', page).show(); + + ApiClient.refreshItem(currentItem.Id, true, false).done(function () { + + reload(page); + + }); + }); + }).on('pageshow', "#editItemMetadataPage", function () { var page = this; diff --git a/packages.config b/packages.config index 9e2e4f84df..ae67867dd1 100644 --- a/packages.config +++ b/packages.config @@ -1,6 +1,6 @@  - + \ No newline at end of file