1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

remove another jqm panel

This commit is contained in:
Luke Pulverenti 2016-02-15 09:41:07 -05:00
parent 914a579a66
commit 8a8ca495fd
10 changed files with 56 additions and 55 deletions

View file

@ -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 () {