mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
remove save buttons on preference pages
This commit is contained in:
parent
18833d5df9
commit
ff3ff6ea40
7 changed files with 60 additions and 61 deletions
|
@ -114,12 +114,6 @@
|
|||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<button type="submit" data-role="none" class="clearButton">
|
||||
<paper-button raised class="submit block"><iron-icon icon="check"></iron-icon><span>${ButtonSave}</span></paper-button>
|
||||
</button>
|
||||
</div>
|
||||
<p>
|
||||
<span style="color:#52B54B;margin-left:.5em;margin-right:.5em;">*</span><span>${LegendTheseSettingsShared}</span>
|
||||
</p>
|
||||
|
|
|
@ -138,12 +138,6 @@
|
|||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<button type="submit" data-role="none" class="clearButton">
|
||||
<paper-button raised class="submit block"><iron-icon icon="check"></iron-icon><span>${ButtonSave}</span></paper-button>
|
||||
</button>
|
||||
</div>
|
||||
<p>
|
||||
<span style="color:#52B54B;margin-left:.5em;margin-right:.5em;">*</span><span>${LegendTheseSettingsShared}</span>
|
||||
</p>
|
||||
|
|
|
@ -118,12 +118,6 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<button type="submit" data-role="none" class="clearButton">
|
||||
<paper-button raised class="submit block"><iron-icon icon="check"></iron-icon><span>${ButtonSave}</span></paper-button>
|
||||
</button>
|
||||
</div>
|
||||
<p>
|
||||
<span style="color:#52B54B;margin-left:.5em;margin-right:.5em;">*</span><span>${LegendTheseSettingsShared}</span>
|
||||
</p>
|
||||
|
|
|
@ -54,7 +54,7 @@
|
|||
var applicationID = "2D4B1DA3";
|
||||
|
||||
// This is the beta version used for testing new changes
|
||||
//applicationID = '27C4EB5B';
|
||||
applicationID = '27C4EB5B';
|
||||
|
||||
var messageNamespace = 'urn:x-cast:com.connectsdk';
|
||||
|
||||
|
|
|
@ -25,18 +25,10 @@
|
|||
appStorage.setItem('enableThemeSongs-' + user.Id, $('#selectThemeSong', page).val());
|
||||
appStorage.setItem('enableBackdrops-' + user.Id, $('#selectBackdrop', page).val());
|
||||
|
||||
ApiClient.updateUserConfiguration(user.Id, user.Configuration).then(function () {
|
||||
Dashboard.alert(Globalize.translate('SettingsSaved'));
|
||||
|
||||
loadForm(page, user);
|
||||
});
|
||||
ApiClient.updateUserConfiguration(user.Id, user.Configuration);
|
||||
}
|
||||
|
||||
function onSubmit() {
|
||||
|
||||
var page = $(this).parents('.page')[0];
|
||||
|
||||
Dashboard.showLoadingMsg();
|
||||
function save(page) {
|
||||
|
||||
var userId = getParameterByName('userId') || Dashboard.getCurrentUserId();
|
||||
|
||||
|
@ -45,18 +37,26 @@
|
|||
saveUser(page, user);
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
function onSubmit() {
|
||||
|
||||
var page = $(this).parents('.page')[0];
|
||||
|
||||
save(page);
|
||||
|
||||
// Disable default form submission
|
||||
return false;
|
||||
}
|
||||
|
||||
$(document).on('pageinit', "#displayPreferencesPage", function () {
|
||||
pageIdOn('pageinit', "displayPreferencesPage", function () {
|
||||
|
||||
var page = this;
|
||||
|
||||
$('.displayPreferencesForm').off('submit', onSubmit).on('submit', onSubmit);
|
||||
|
||||
}).on('pageshow', "#displayPreferencesPage", function () {
|
||||
});
|
||||
pageIdOn('pageshow', "displayPreferencesPage", function () {
|
||||
|
||||
var page = this;
|
||||
|
||||
|
@ -82,6 +82,14 @@
|
|||
} else {
|
||||
$('.languageSection', page).hide();
|
||||
}
|
||||
|
||||
});
|
||||
pageIdOn('pagebeforehide', "displayPreferencesPage", function () {
|
||||
|
||||
var page = this;
|
||||
|
||||
save(page);
|
||||
|
||||
});
|
||||
|
||||
})(jQuery, window, document);
|
|
@ -199,19 +199,11 @@
|
|||
|
||||
ApiClient.updateDisplayPreferences('home', displayPreferences, user.Id, AppSettings.displayPreferencesKey()).then(function () {
|
||||
|
||||
ApiClient.updateUserConfiguration(user.Id, user.Configuration).then(function () {
|
||||
Dashboard.alert(Globalize.translate('SettingsSaved'));
|
||||
|
||||
loadForm(page, user, displayPreferences);
|
||||
});
|
||||
ApiClient.updateUserConfiguration(user.Id, user.Configuration);
|
||||
});
|
||||
}
|
||||
|
||||
function onSubmit() {
|
||||
|
||||
var page = $(this).parents('.page')[0];
|
||||
|
||||
Dashboard.showLoadingMsg();
|
||||
function save(page) {
|
||||
|
||||
var userId = getParameterByName('userId') || Dashboard.getCurrentUserId();
|
||||
|
||||
|
@ -222,14 +214,20 @@
|
|||
saveUser(page, user, displayPreferences);
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
function onSubmit() {
|
||||
|
||||
var page = $(this).parents('.page')[0];
|
||||
|
||||
save(page);
|
||||
|
||||
// Disable default form submission
|
||||
return false;
|
||||
}
|
||||
|
||||
$(document).on('pageinit', "#homeScreenPreferencesPage", function () {
|
||||
pageIdOn('pageinit', "homeScreenPreferencesPage", function () {
|
||||
|
||||
var page = this;
|
||||
|
||||
|
@ -272,7 +270,9 @@
|
|||
|
||||
$('.homeScreenPreferencesForm').off('submit', onSubmit).on('submit', onSubmit);
|
||||
|
||||
}).on('pageshow', "#homeScreenPreferencesPage", function () {
|
||||
});
|
||||
|
||||
pageIdOn('pageshow', "homeScreenPreferencesPage", function () {
|
||||
|
||||
var page = this;
|
||||
|
||||
|
@ -290,4 +290,11 @@
|
|||
});
|
||||
});
|
||||
|
||||
pageIdOn('pagebeforehide', "homeScreenPreferencesPage", function () {
|
||||
|
||||
var page = this;
|
||||
|
||||
save(page);
|
||||
});
|
||||
|
||||
})(jQuery, window, document);
|
|
@ -96,22 +96,10 @@
|
|||
|
||||
AppSettings.enableCinemaMode(page.querySelector('.chkEnableCinemaMode').checked);
|
||||
|
||||
ApiClient.updateUserConfiguration(user.Id, user.Configuration).then(function () {
|
||||
|
||||
Dashboard.hideLoadingMsg();
|
||||
Dashboard.alert(Globalize.translate('SettingsSaved'));
|
||||
|
||||
}, function () {
|
||||
Dashboard.hideLoadingMsg();
|
||||
});
|
||||
ApiClient.updateUserConfiguration(user.Id, user.Configuration);
|
||||
}
|
||||
|
||||
function onSubmit() {
|
||||
|
||||
var page = $(this).parents('.page')[0];
|
||||
|
||||
Dashboard.showLoadingMsg();
|
||||
|
||||
function save(page) {
|
||||
AppSettings.enableExternalPlayers(page.querySelector('.chkExternalVideoPlayer').checked);
|
||||
|
||||
if ($('#selectMaxBitrate', page).val()) {
|
||||
|
@ -131,12 +119,19 @@
|
|||
saveUser(page, result);
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
function onSubmit() {
|
||||
|
||||
var page = $(this).parents('.page')[0];
|
||||
|
||||
save(page);
|
||||
|
||||
// Disable default form submission
|
||||
return false;
|
||||
}
|
||||
|
||||
$(document).on('pageinit', "#languagePreferencesPage", function () {
|
||||
pageIdOn('pageinit', "languagePreferencesPage", function () {
|
||||
|
||||
var page = this;
|
||||
|
||||
|
@ -147,9 +142,9 @@
|
|||
});
|
||||
|
||||
$('.languagePreferencesForm').off('submit', onSubmit).on('submit', onSubmit);
|
||||
});
|
||||
|
||||
|
||||
}).on('pageshow', "#languagePreferencesPage", function () {
|
||||
pageIdOn('pageshow', "languagePreferencesPage", function () {
|
||||
|
||||
var page = this;
|
||||
|
||||
|
@ -170,4 +165,11 @@
|
|||
loadPage(page);
|
||||
});
|
||||
|
||||
pageIdOn('pagebeforehide', "languagePreferencesPage", function () {
|
||||
|
||||
var page = this;
|
||||
|
||||
save(page);
|
||||
});
|
||||
|
||||
})(jQuery, window, document);
|
Loading…
Add table
Add a link
Reference in a new issue