From 049f6fed6686debc1989470941f27e3efed3f420 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Sun, 24 Jul 2016 12:46:17 -0400 Subject: [PATCH] fix DateModified not refreshing --- dashboard-ui/about.html | 2 +- .../components/metadataeditor/metadataeditor.js | 6 +++--- dashboard-ui/scripts/aboutpage.js | 14 +------------- dashboard-ui/scripts/dlnaprofile.js | 3 +++ dashboard-ui/scripts/librarymenu.js | 2 +- dashboard-ui/scripts/searchpage.js | 4 ++++ dashboard-ui/scripts/site.js | 4 ++-- dashboard-ui/scripts/supporterkeypage.js | 14 -------------- dashboard-ui/strings/en-US.json | 2 +- dashboard-ui/supporterkey.html | 2 +- 10 files changed, 17 insertions(+), 36 deletions(-) diff --git a/dashboard-ui/about.html b/dashboard-ui/about.html index a721f5cf9a..f1aca00e1f 100644 --- a/dashboard-ui/about.html +++ b/dashboard-ui/about.html @@ -1,4 +1,4 @@ -
+
diff --git a/dashboard-ui/components/metadataeditor/metadataeditor.js b/dashboard-ui/components/metadataeditor/metadataeditor.js index bced2251bc..11f209ac20 100644 --- a/dashboard-ui/components/metadataeditor/metadataeditor.js +++ b/dashboard-ui/components/metadataeditor/metadataeditor.js @@ -1,4 +1,4 @@ -define(['itemHelper', 'dialogHelper', 'datetime', 'loading', 'connectionManager', 'globalize', 'emby-checkbox', 'emby-input', 'emby-select', 'listViewStyle', 'emby-textarea', 'emby-button', 'paper-icon-button-light'], function (itemHelper, dialogHelper, datetime, loading, connectionManager, globalize) { +define(['itemHelper', 'dialogHelper', 'datetime', 'loading', 'focusManager', 'connectionManager', 'globalize', 'emby-checkbox', 'emby-input', 'emby-select', 'listViewStyle', 'emby-textarea', 'emby-button', 'paper-icon-button-light'], function (itemHelper, dialogHelper, datetime, loading, focusManager, connectionManager, globalize) { var currentContext; var metadataEditorInfo; @@ -1144,8 +1144,6 @@ populateLanguages(context.querySelector('#selectLanguage'), languages); populateCountries(context.querySelector('#selectCountry'), countries); - LibraryBrowser.renderName(item, document.querySelector('.itemName'), true); - setFieldVisibilities(context, item); fillItemInfo(context, item, metadataEditorInfo.ParentalRatingOptions); @@ -1232,6 +1230,8 @@ init(elem, connectionManager.getApiClient(serverId)); reload(elem, itemId, serverId); + + focusManager.autoFocus(elem); } xhr.send(); diff --git a/dashboard-ui/scripts/aboutpage.js b/dashboard-ui/scripts/aboutpage.js index 28a22fb7a2..75a06f5e09 100644 --- a/dashboard-ui/scripts/aboutpage.js +++ b/dashboard-ui/scripts/aboutpage.js @@ -1,23 +1,11 @@ define([], function () { - function getTabs() { - return [ - { - href: 'about.html', - name: Globalize.translate('TabAbout') - }, - { - href: 'supporterkey.html', - name: Globalize.translate('TabEmbyPremiere') - }]; - } - return function (view, params) { var self = this; view.addEventListener('viewbeforeshow', function (e) { - LibraryMenu.setTabs('helpadmin', 0, getTabs); + var elem = view.querySelector('#appVersionNumber'); elem.innerHTML = elem.innerHTML.replace('{0}', ConnectionManager.appVersion()); diff --git a/dashboard-ui/scripts/dlnaprofile.js b/dashboard-ui/scripts/dlnaprofile.js index d7a66f3c33..9198ece8f2 100644 --- a/dashboard-ui/scripts/dlnaprofile.js +++ b/dashboard-ui/scripts/dlnaprofile.js @@ -165,6 +165,9 @@ if (isSubProfileNew) { + currentProfile.Identification = currentProfile.Identification || {}; + currentProfile.Identification.Headers = currentProfile.Identification.Headers || []; + currentProfile.Identification.Headers.push(currentSubProfile); } diff --git a/dashboard-ui/scripts/librarymenu.js b/dashboard-ui/scripts/librarymenu.js index a53ab21745..7f5f058c1d 100644 --- a/dashboard-ui/scripts/librarymenu.js +++ b/dashboard-ui/scripts/librarymenu.js @@ -274,7 +274,7 @@ var homeHref = window.ApiClient ? 'home.html' : 'selectserver.html?showuser=1'; html += ''; - html += '
'; + html += '
'; html += Globalize.translate('ButtonHome'); html += '
'; diff --git a/dashboard-ui/scripts/searchpage.js b/dashboard-ui/scripts/searchpage.js index 88ba3d8dee..404abcb625 100644 --- a/dashboard-ui/scripts/searchpage.js +++ b/dashboard-ui/scripts/searchpage.js @@ -125,6 +125,10 @@ serverId: ApiClient.serverInfo().Id }); + if (!hints.length) { + html = '

' + Globalize.translate('NoResultsFound') + '

'; + } + var itemsContainer = searchResults; itemsContainer.innerHTML = html; searchResults.classList.remove('hide'); diff --git a/dashboard-ui/scripts/site.js b/dashboard-ui/scripts/site.js index fea7b04af7..29da0fc3bf 100644 --- a/dashboard-ui/scripts/site.js +++ b/dashboard-ui/scripts/site.js @@ -728,9 +728,9 @@ pageIds: [], icon: 'insert_chart' }, { - name: Globalize.translate('TabHelp'), + name: Globalize.translate('TabAbout'), href: "about.html", - icon: 'help', + icon: 'info', color: '#679C34', divider: true, pageIds: ['aboutPage'] diff --git a/dashboard-ui/scripts/supporterkeypage.js b/dashboard-ui/scripts/supporterkeypage.js index aede79c145..e3d86eac1f 100644 --- a/dashboard-ui/scripts/supporterkeypage.js +++ b/dashboard-ui/scripts/supporterkeypage.js @@ -146,18 +146,6 @@ } }; - function getTabs() { - return [ - { - href: 'about.html', - name: Globalize.translate('TabAbout') - }, - { - href: 'supporterkey.html', - name: Globalize.translate('TabEmbyPremiere') - }]; - } - function onSupporterLinkClick(e) { registrationServices.showPremiereInfo(); @@ -178,8 +166,6 @@ }).on('pageshow', "#supporterKeyPage", function () { - LibraryMenu.setTabs('helpadmin', 1, getTabs); - var page = this; loadUserInfo(page); load(page); diff --git a/dashboard-ui/strings/en-US.json b/dashboard-ui/strings/en-US.json index 9cc23cc052..e15f607670 100644 --- a/dashboard-ui/strings/en-US.json +++ b/dashboard-ui/strings/en-US.json @@ -2211,7 +2211,7 @@ "HeaderYouSaid": "You Said...", "MessageWeDidntRecognizeCommand": "We're sorry, we didn't recognize that command.", "MessageIfYouBlockedVoice": "If you denied voice access to the app you'll need to reconfigure before trying again.", - "MessageNoItemsFound": "No items found.", + "NoResultsFound": "No results found.", "ButtonManageServer": "Manage Server", "ButtonEditSubtitles": "Edit subtitles", "ButtonPreferences": "Preferences", diff --git a/dashboard-ui/supporterkey.html b/dashboard-ui/supporterkey.html index ca810206ad..a67db58cfa 100644 --- a/dashboard-ui/supporterkey.html +++ b/dashboard-ui/supporterkey.html @@ -1,4 +1,4 @@ -
+