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>
|
</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>
|
<p>
|
||||||
<span style="color:#52B54B;margin-left:.5em;margin-right:.5em;">*</span><span>${LegendTheseSettingsShared}</span>
|
<span style="color:#52B54B;margin-left:.5em;margin-right:.5em;">*</span><span>${LegendTheseSettingsShared}</span>
|
||||||
</p>
|
</p>
|
||||||
|
|
|
@ -138,12 +138,6 @@
|
||||||
</div>
|
</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>
|
<p>
|
||||||
<span style="color:#52B54B;margin-left:.5em;margin-right:.5em;">*</span><span>${LegendTheseSettingsShared}</span>
|
<span style="color:#52B54B;margin-left:.5em;margin-right:.5em;">*</span><span>${LegendTheseSettingsShared}</span>
|
||||||
</p>
|
</p>
|
||||||
|
|
|
@ -118,12 +118,6 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</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>
|
<p>
|
||||||
<span style="color:#52B54B;margin-left:.5em;margin-right:.5em;">*</span><span>${LegendTheseSettingsShared}</span>
|
<span style="color:#52B54B;margin-left:.5em;margin-right:.5em;">*</span><span>${LegendTheseSettingsShared}</span>
|
||||||
</p>
|
</p>
|
||||||
|
|
|
@ -54,7 +54,7 @@
|
||||||
var applicationID = "2D4B1DA3";
|
var applicationID = "2D4B1DA3";
|
||||||
|
|
||||||
// This is the beta version used for testing new changes
|
// This is the beta version used for testing new changes
|
||||||
//applicationID = '27C4EB5B';
|
applicationID = '27C4EB5B';
|
||||||
|
|
||||||
var messageNamespace = 'urn:x-cast:com.connectsdk';
|
var messageNamespace = 'urn:x-cast:com.connectsdk';
|
||||||
|
|
||||||
|
|
|
@ -25,18 +25,10 @@
|
||||||
appStorage.setItem('enableThemeSongs-' + user.Id, $('#selectThemeSong', page).val());
|
appStorage.setItem('enableThemeSongs-' + user.Id, $('#selectThemeSong', page).val());
|
||||||
appStorage.setItem('enableBackdrops-' + user.Id, $('#selectBackdrop', page).val());
|
appStorage.setItem('enableBackdrops-' + user.Id, $('#selectBackdrop', page).val());
|
||||||
|
|
||||||
ApiClient.updateUserConfiguration(user.Id, user.Configuration).then(function () {
|
ApiClient.updateUserConfiguration(user.Id, user.Configuration);
|
||||||
Dashboard.alert(Globalize.translate('SettingsSaved'));
|
|
||||||
|
|
||||||
loadForm(page, user);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function onSubmit() {
|
function save(page) {
|
||||||
|
|
||||||
var page = $(this).parents('.page')[0];
|
|
||||||
|
|
||||||
Dashboard.showLoadingMsg();
|
|
||||||
|
|
||||||
var userId = getParameterByName('userId') || Dashboard.getCurrentUserId();
|
var userId = getParameterByName('userId') || Dashboard.getCurrentUserId();
|
||||||
|
|
||||||
|
@ -45,18 +37,26 @@
|
||||||
saveUser(page, user);
|
saveUser(page, user);
|
||||||
|
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function onSubmit() {
|
||||||
|
|
||||||
|
var page = $(this).parents('.page')[0];
|
||||||
|
|
||||||
|
save(page);
|
||||||
|
|
||||||
// Disable default form submission
|
// Disable default form submission
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$(document).on('pageinit', "#displayPreferencesPage", function () {
|
pageIdOn('pageinit', "displayPreferencesPage", function () {
|
||||||
|
|
||||||
var page = this;
|
var page = this;
|
||||||
|
|
||||||
$('.displayPreferencesForm').off('submit', onSubmit).on('submit', onSubmit);
|
$('.displayPreferencesForm').off('submit', onSubmit).on('submit', onSubmit);
|
||||||
|
|
||||||
}).on('pageshow', "#displayPreferencesPage", function () {
|
});
|
||||||
|
pageIdOn('pageshow', "displayPreferencesPage", function () {
|
||||||
|
|
||||||
var page = this;
|
var page = this;
|
||||||
|
|
||||||
|
@ -82,6 +82,14 @@
|
||||||
} else {
|
} else {
|
||||||
$('.languageSection', page).hide();
|
$('.languageSection', page).hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
pageIdOn('pagebeforehide', "displayPreferencesPage", function () {
|
||||||
|
|
||||||
|
var page = this;
|
||||||
|
|
||||||
|
save(page);
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
})(jQuery, window, document);
|
})(jQuery, window, document);
|
|
@ -199,19 +199,11 @@
|
||||||
|
|
||||||
ApiClient.updateDisplayPreferences('home', displayPreferences, user.Id, AppSettings.displayPreferencesKey()).then(function () {
|
ApiClient.updateDisplayPreferences('home', displayPreferences, user.Id, AppSettings.displayPreferencesKey()).then(function () {
|
||||||
|
|
||||||
ApiClient.updateUserConfiguration(user.Id, user.Configuration).then(function () {
|
ApiClient.updateUserConfiguration(user.Id, user.Configuration);
|
||||||
Dashboard.alert(Globalize.translate('SettingsSaved'));
|
|
||||||
|
|
||||||
loadForm(page, user, displayPreferences);
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function onSubmit() {
|
function save(page) {
|
||||||
|
|
||||||
var page = $(this).parents('.page')[0];
|
|
||||||
|
|
||||||
Dashboard.showLoadingMsg();
|
|
||||||
|
|
||||||
var userId = getParameterByName('userId') || Dashboard.getCurrentUserId();
|
var userId = getParameterByName('userId') || Dashboard.getCurrentUserId();
|
||||||
|
|
||||||
|
@ -222,14 +214,20 @@
|
||||||
saveUser(page, user, displayPreferences);
|
saveUser(page, user, displayPreferences);
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function onSubmit() {
|
||||||
|
|
||||||
|
var page = $(this).parents('.page')[0];
|
||||||
|
|
||||||
|
save(page);
|
||||||
|
|
||||||
// Disable default form submission
|
// Disable default form submission
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$(document).on('pageinit', "#homeScreenPreferencesPage", function () {
|
pageIdOn('pageinit', "homeScreenPreferencesPage", function () {
|
||||||
|
|
||||||
var page = this;
|
var page = this;
|
||||||
|
|
||||||
|
@ -272,7 +270,9 @@
|
||||||
|
|
||||||
$('.homeScreenPreferencesForm').off('submit', onSubmit).on('submit', onSubmit);
|
$('.homeScreenPreferencesForm').off('submit', onSubmit).on('submit', onSubmit);
|
||||||
|
|
||||||
}).on('pageshow', "#homeScreenPreferencesPage", function () {
|
});
|
||||||
|
|
||||||
|
pageIdOn('pageshow', "homeScreenPreferencesPage", function () {
|
||||||
|
|
||||||
var page = this;
|
var page = this;
|
||||||
|
|
||||||
|
@ -290,4 +290,11 @@
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
pageIdOn('pagebeforehide', "homeScreenPreferencesPage", function () {
|
||||||
|
|
||||||
|
var page = this;
|
||||||
|
|
||||||
|
save(page);
|
||||||
|
});
|
||||||
|
|
||||||
})(jQuery, window, document);
|
})(jQuery, window, document);
|
|
@ -96,22 +96,10 @@
|
||||||
|
|
||||||
AppSettings.enableCinemaMode(page.querySelector('.chkEnableCinemaMode').checked);
|
AppSettings.enableCinemaMode(page.querySelector('.chkEnableCinemaMode').checked);
|
||||||
|
|
||||||
ApiClient.updateUserConfiguration(user.Id, user.Configuration).then(function () {
|
ApiClient.updateUserConfiguration(user.Id, user.Configuration);
|
||||||
|
|
||||||
Dashboard.hideLoadingMsg();
|
|
||||||
Dashboard.alert(Globalize.translate('SettingsSaved'));
|
|
||||||
|
|
||||||
}, function () {
|
|
||||||
Dashboard.hideLoadingMsg();
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function onSubmit() {
|
function save(page) {
|
||||||
|
|
||||||
var page = $(this).parents('.page')[0];
|
|
||||||
|
|
||||||
Dashboard.showLoadingMsg();
|
|
||||||
|
|
||||||
AppSettings.enableExternalPlayers(page.querySelector('.chkExternalVideoPlayer').checked);
|
AppSettings.enableExternalPlayers(page.querySelector('.chkExternalVideoPlayer').checked);
|
||||||
|
|
||||||
if ($('#selectMaxBitrate', page).val()) {
|
if ($('#selectMaxBitrate', page).val()) {
|
||||||
|
@ -131,12 +119,19 @@
|
||||||
saveUser(page, result);
|
saveUser(page, result);
|
||||||
|
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function onSubmit() {
|
||||||
|
|
||||||
|
var page = $(this).parents('.page')[0];
|
||||||
|
|
||||||
|
save(page);
|
||||||
|
|
||||||
// Disable default form submission
|
// Disable default form submission
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$(document).on('pageinit', "#languagePreferencesPage", function () {
|
pageIdOn('pageinit', "languagePreferencesPage", function () {
|
||||||
|
|
||||||
var page = this;
|
var page = this;
|
||||||
|
|
||||||
|
@ -147,9 +142,9 @@
|
||||||
});
|
});
|
||||||
|
|
||||||
$('.languagePreferencesForm').off('submit', onSubmit).on('submit', onSubmit);
|
$('.languagePreferencesForm').off('submit', onSubmit).on('submit', onSubmit);
|
||||||
|
});
|
||||||
|
|
||||||
|
pageIdOn('pageshow', "languagePreferencesPage", function () {
|
||||||
}).on('pageshow', "#languagePreferencesPage", function () {
|
|
||||||
|
|
||||||
var page = this;
|
var page = this;
|
||||||
|
|
||||||
|
@ -170,4 +165,11 @@
|
||||||
loadPage(page);
|
loadPage(page);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
pageIdOn('pagebeforehide', "languagePreferencesPage", function () {
|
||||||
|
|
||||||
|
var page = this;
|
||||||
|
|
||||||
|
save(page);
|
||||||
|
});
|
||||||
|
|
||||||
})(jQuery, window, document);
|
})(jQuery, window, document);
|
Loading…
Add table
Add a link
Reference in a new issue