From 8a8ca495fd13510ec1feceb70223cdef966dfaf3 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Mon, 15 Feb 2016 09:41:07 -0500 Subject: [PATCH] remove another jqm panel --- .../emby-webcomponents/.bower.json | 8 ++-- .../emby-webcomponents/prompt/prompt.js | 16 +++++++- .../metadataeditor/metadataeditor.js | 2 +- dashboard-ui/scripts/medialibrarypage.js | 15 ++++--- dashboard-ui/scripts/serversecurity.js | 39 ++++++++++--------- dashboard-ui/scripts/userparentalcontrol.js | 2 +- dashboard-ui/serversecurity.html | 17 +------- dashboard-ui/strings/html/server.json | 4 -- dashboard-ui/strings/javascript/en-US.json | 4 ++ .../strings/javascript/javascript.json | 4 ++ 10 files changed, 56 insertions(+), 55 deletions(-) diff --git a/dashboard-ui/bower_components/emby-webcomponents/.bower.json b/dashboard-ui/bower_components/emby-webcomponents/.bower.json index c520dfe782..bfc1a72153 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/.bower.json +++ b/dashboard-ui/bower_components/emby-webcomponents/.bower.json @@ -15,12 +15,12 @@ }, "devDependencies": {}, "ignore": [], - "version": "1.0.77", - "_release": "1.0.77", + "version": "1.0.79", + "_release": "1.0.79", "_resolution": { "type": "version", - "tag": "1.0.77", - "commit": "68a71ffeed9dad3e3d06d163b51ae4c555f3c1f9" + "tag": "1.0.79", + "commit": "f00dd984581d53272229de71458c8a8f6b5878fc" }, "_source": "git://github.com/MediaBrowser/emby-webcomponents.git", "_target": "~1.0.0", diff --git a/dashboard-ui/bower_components/emby-webcomponents/prompt/prompt.js b/dashboard-ui/bower_components/emby-webcomponents/prompt/prompt.js index 8e5b525c56..25fec50fd7 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/prompt/prompt.js +++ b/dashboard-ui/bower_components/emby-webcomponents/prompt/prompt.js @@ -32,8 +32,20 @@ define(['paperdialoghelper', 'layoutManager', 'globalize', 'dialogText', 'html!. html += ''; } + if (options.title) { + html += '

'; + html += options.title; + html += '

'; + } + html += ''; + if (options.description) { + html += '
'; + html += options.description; + html += '
'; + } + // TODO: An actual form element should probably be added html += '
'; if (raisedButtons) { @@ -53,8 +65,8 @@ define(['paperdialoghelper', 'layoutManager', 'globalize', 'dialogText', 'html!. dlg.querySelector('.txtPromptValue').value = options.text; } - if (options.title) { - dlg.querySelector('.txtPromptValue').label = options.title; + if (options.label) { + dlg.querySelector('.txtPromptValue').label = options.label; } document.body.appendChild(dlg); diff --git a/dashboard-ui/components/metadataeditor/metadataeditor.js b/dashboard-ui/components/metadataeditor/metadataeditor.js index 8998f6ae5c..6eb4ef6f39 100644 --- a/dashboard-ui/components/metadataeditor/metadataeditor.js +++ b/dashboard-ui/components/metadataeditor/metadataeditor.js @@ -228,7 +228,7 @@ require(['prompt'], function (prompt) { prompt({ - title: 'Value:' + label: 'Value:' }).then(function (text) { var list = $(source).parents('.editableListviewContainer').find('.paperList'); var items = editableListViewValues(list); diff --git a/dashboard-ui/scripts/medialibrarypage.js b/dashboard-ui/scripts/medialibrarypage.js index 3a1217912e..2c3f6bfc5c 100644 --- a/dashboard-ui/scripts/medialibrarypage.js +++ b/dashboard-ui/scripts/medialibrarypage.js @@ -72,17 +72,16 @@ require(['prompt'], function (prompt) { prompt({ - title: Globalize.translate('LabelNewName'), - callback: function (newName) { + label: Globalize.translate('LabelNewName') - if (newName && newName != virtualFolder.Name) { + }).then(function (newName) { + if (newName && newName != virtualFolder.Name) { - var refreshAfterChange = shouldRefreshLibraryAfterChanges(page); + var refreshAfterChange = shouldRefreshLibraryAfterChanges(page); - ApiClient.renameVirtualFolder(virtualFolder.Name, newName, refreshAfterChange).then(function () { - reloadLibrary(page); - }); - } + ApiClient.renameVirtualFolder(virtualFolder.Name, newName, refreshAfterChange).then(function () { + reloadLibrary(page); + }); } }); diff --git a/dashboard-ui/scripts/serversecurity.js b/dashboard-ui/scripts/serversecurity.js index e675c548c6..93d3b7ed68 100644 --- a/dashboard-ui/scripts/serversecurity.js +++ b/dashboard-ui/scripts/serversecurity.js @@ -95,28 +95,33 @@ }); } - function onSubmit() { - var form = this; - var page = $(form).parents('.page'); + function showNewKeyPrompt(page) { + require(['prompt'], function (prompt) { + + // HeaderNewApiKeyHelp not used - Dashboard.showLoadingMsg(); + prompt({ + title: Globalize.translate('HeaderNewApiKey'), + label: Globalize.translate('LabelAppName'), + description: Globalize.translate('LabelAppNameExample') - ApiClient.ajax({ - type: "POST", - url: ApiClient.getUrl('Auth/Keys', { + }).then(function (value) { - App: $('#txtAppName', form).val() + ApiClient.ajax({ + type: "POST", + url: ApiClient.getUrl('Auth/Keys', { - }) + App: value - }).then(function () { + }) - $('.newKeyPanel', page).panel('close'); + }).then(function () { + + loadData(page); + }); + }); - loadData(page); }); - - return false; } pageIdOn('pageinit', "serverSecurityPage", function () { @@ -125,14 +130,10 @@ $('.btnNewKey', page).on('click', function () { - $('.newKeyPanel', page).panel('toggle'); - - $('#txtAppName', page).val('').focus(); + showNewKeyPrompt(page); }); - $('.newKeyForm').off('submit', onSubmit).on('submit', onSubmit); - }); pageIdOn('pagebeforeshow', "serverSecurityPage", function () { diff --git a/dashboard-ui/scripts/userparentalcontrol.js b/dashboard-ui/scripts/userparentalcontrol.js index ee8006781f..fe11ff8480 100644 --- a/dashboard-ui/scripts/userparentalcontrol.js +++ b/dashboard-ui/scripts/userparentalcontrol.js @@ -343,7 +343,7 @@ require(['prompt'], function (prompt) { prompt({ - title: Globalize.translate('LabelTag') + label: Globalize.translate('LabelTag') }).then(function (value) { var tags = getBlockedTagsFromPage(page); diff --git a/dashboard-ui/serversecurity.html b/dashboard-ui/serversecurity.html index 9d301b38f6..5298699021 100644 --- a/dashboard-ui/serversecurity.html +++ b/dashboard-ui/serversecurity.html @@ -4,7 +4,7 @@ ${TitleAdvanced} -
+
@@ -38,21 +38,6 @@
-
-
-

${HeaderNewApiKey}

-

${HeaderNewApiKeyHelp}

-
- - -
${LabelAppNameExample}
-
-
-

- -

-
-
diff --git a/dashboard-ui/strings/html/server.json b/dashboard-ui/strings/html/server.json index c98fd060e1..6ee8159dc8 100644 --- a/dashboard-ui/strings/html/server.json +++ b/dashboard-ui/strings/html/server.json @@ -1033,10 +1033,6 @@ "HeaderUser": "User", "HeaderDateIssued": "Date Issued", "LabelChapterName": "Chapter {0}", - "HeaderNewApiKey": "New Api Key", - "LabelAppName": "App name", - "LabelAppNameExample": "Example: Sickbeard, NzbDrone", - "HeaderNewApiKeyHelp": "Grant an application permission to communicate with Emby Server.", "ButtonEnterSupporterKey": "Enter Emby Premiere key", "HeaderHttpHeaders": "Http Headers", "HeaderIdentificationHeader": "Identification Header", diff --git a/dashboard-ui/strings/javascript/en-US.json b/dashboard-ui/strings/javascript/en-US.json index b51ab422e1..a2b17a7097 100644 --- a/dashboard-ui/strings/javascript/en-US.json +++ b/dashboard-ui/strings/javascript/en-US.json @@ -37,6 +37,10 @@ "MessageKeyRemoved": "Thank you. Your Emby Premiere key has been removed.", "HeaderSupportTheTeam": "Support the Emby Team", "TextEnjoyBonusFeatures": "Enjoy Bonus Features", + "HeaderNewApiKey": "New Api Key", + "LabelAppName": "App name", + "LabelAppNameExample": "Example: Sickbeard, NzbDrone", + "HeaderNewApiKeyHelp": "Grant an application permission to communicate with Emby Server.", "TitleLiveTV": "Live TV", "ButtonCancelSyncJob": "Cancel sync", "HeaderAddTag": "Add Tag", diff --git a/dashboard-ui/strings/javascript/javascript.json b/dashboard-ui/strings/javascript/javascript.json index cf20a01e8e..d7aa542bb2 100644 --- a/dashboard-ui/strings/javascript/javascript.json +++ b/dashboard-ui/strings/javascript/javascript.json @@ -30,6 +30,10 @@ "NoPluginConfigurationMessage": "This plugin has nothing to configure.", "NoPluginsInstalledMessage": "You have no plugins installed.", "BrowsePluginCatalogMessage": "Browse our plugin catalog to view available plugins.", + "HeaderNewApiKey": "New Api Key", + "LabelAppName": "App name", + "LabelAppNameExample": "Example: Sickbeard, NzbDrone", + "HeaderNewApiKeyHelp": "Grant an application permission to communicate with Emby Server.", "MessageKeyEmailedTo": "Key emailed to {0}.", "MessageKeysLinked": "Keys linked.", "HeaderConfirmation": "Confirmation",