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

remove bundled scripts

This commit is contained in:
Luke 2015-06-06 22:51:04 -04:00
parent 90ea727998
commit dfd651131a
8 changed files with 48 additions and 52 deletions

View file

@ -4,7 +4,7 @@
<title>${TitleLiveTV}</title> <title>${TitleLiveTV}</title>
</head> </head>
<body> <body>
<div id="liveTvSettingsPage" data-role="page" class="page type-interior liveTvSettingsPage liveTvPage" data-helpurl="https://github.com/MediaBrowser/Wiki/wiki/Live%20TV"> <div id="liveTvSettingsPage" data-role="page" class="page type-interior liveTvSettingsPage liveTvPage" data-helpurl="https://github.com/MediaBrowser/Wiki/wiki/Live%20TV" data-require="scripts/livetvsettings">
<div data-role="content"> <div data-role="content">
<div class="content-primary"> <div class="content-primary">
@ -70,10 +70,6 @@
</div> </div>
</div> </div>
</div> </div>
<script type="text/javascript">
$('.liveTvSettingsForm').off('submit', LiveTvSettingsPage.onSubmit).on('submit', LiveTvSettingsPage.onSubmit);
</script>
</div> </div>
</body> </body>
</html> </html>

View file

@ -19,7 +19,29 @@
Dashboard.hideLoadingMsg(); Dashboard.hideLoadingMsg();
} }
$(document).on('pageshow', "#liveTvSettingsPage", function () { function onSubmit() {
Dashboard.showLoadingMsg();
var form = this;
ApiClient.getNamedConfiguration("livetv").done(function (config) {
config.GuideDays = $('#selectGuideDays', form).val() || null;
config.EnableMovieProviders = $('#chkMovies', form).checked();
ApiClient.updateNamedConfiguration("livetv", config).done(Dashboard.processServerConfigurationUpdateResult);
});
// Disable default form submission
return false;
}
$(document).on('pageinitdepends', "#liveTvSettingsPage", function () {
$('.liveTvSettingsForm').off('submit', onSubmit).on('submit', onSubmit);
}).on('pageshowready', "#liveTvSettingsPage", function () {
Dashboard.showLoadingMsg(); Dashboard.showLoadingMsg();
@ -37,25 +59,4 @@
}); });
window.LiveTvSettingsPage = {
onSubmit: function () {
Dashboard.showLoadingMsg();
var form = this;
ApiClient.getNamedConfiguration("livetv").done(function (config) {
config.GuideDays = $('#selectGuideDays', form).val() || null;
config.EnableMovieProviders = $('#chkMovies', form).checked();
ApiClient.updateNamedConfiguration("livetv", config).done(Dashboard.processServerConfigurationUpdateResult);
});
// Disable default form submission
return false;
}
};
})(jQuery, document, window); })(jQuery, document, window);

View file

@ -1,6 +1,8 @@
(function (window, $) { (function (window, $) {
function onSubmit(page) { function onSubmit() {
var page = $(this).parents('.page');
if ($('#chkAccept', page).checked()) { if ($('#chkAccept', page).checked()) {
Dashboard.navigate('wizardfinish.html'); Dashboard.navigate('wizardfinish.html');
@ -11,18 +13,13 @@
title: '' title: ''
}); });
} }
}
window.WizardAgreementPage = {
onSubmit: function () {
var page = $(this).parents('.page');
onSubmit(page);
return false; return false;
} }
};
$(document).on('pageinitdepends', '#wizardAgreementPage', function(){
$('.wizardAgreementForm').off('submit', onSubmit).on('submit', onSubmit);
});
})(window, jQuery); })(window, jQuery);

View file

@ -1,6 +1,6 @@
var WizardFinishPage = { (function(){
onFinish: function () { function onFinish() {
ApiClient.ajax({ ApiClient.ajax({
@ -12,4 +12,10 @@
Dashboard.navigate('dashboard.html'); Dashboard.navigate('dashboard.html');
}); });
} }
};
$(document).on('pageinitdepends', '#wizardFinishPage', function(){
$('.btnWizardNext', this).on('click', onFinish);
});
})();

View file

@ -1,6 +1,6 @@
(function ($, document) { (function ($, document) {
$(document).on('pageinit', "#wizardServicePage", function () { $(document).on('pageinitdepends', "#wizardServicePage", function () {
var page = this; var page = this;

View file

@ -4,7 +4,7 @@
<title>Emby</title> <title>Emby</title>
</head> </head>
<body> <body>
<div id="wizardAgreementPage" data-role="page" class="page standalonePage wizardPage"> <div id="wizardAgreementPage" data-role="page" class="page standalonePage wizardPage" data-require="scripts/wizardagreement">
<div data-role="content"> <div data-role="content">
@ -36,10 +36,6 @@
</div> </div>
</div> </div>
<script type="text/javascript">
$('.wizardAgreementForm').off('submit', WizardAgreementPage.onSubmit).on('submit', WizardAgreementPage.onSubmit);
</script>
</div> </div>
</body> </body>
</html> </html>

View file

@ -4,7 +4,7 @@
<title>Emby</title> <title>Emby</title>
</head> </head>
<body> <body>
<div id="wizardFinishPage" data-role="page" class="page standalonePage wizardPage"> <div id="wizardFinishPage" data-role="page" class="page standalonePage wizardPage" data-require="scripts/wizardfinishpage">
<div data-role="content"> <div data-role="content">
@ -39,7 +39,7 @@
<div class="wizardNavigation"> <div class="wizardNavigation">
<button type="button" data-iconpos="left" data-icon="arrow-l" data-inline="true" onclick="history.back();">${LabelPrevious}</button> <button type="button" data-iconpos="left" data-icon="arrow-l" data-inline="true" onclick="history.back();">${LabelPrevious}</button>
<button type="button" data-iconpos="right" data-icon="check" data-inline="true" onclick="WizardFinishPage.onFinish();" data-theme="b">${LabelFinish}</button> <button type="button" data-iconpos="right" data-icon="check" data-inline="true" class="btnWizardNext" data-theme="b">${LabelFinish}</button>
</div> </div>
</div> </div>

View file

@ -4,7 +4,7 @@
<title>Emby</title> <title>Emby</title>
</head> </head>
<body> <body>
<div id="wizardServicePage" data-role="page" class="page standalonePage wizardPage mediaLibraryPage"> <div id="wizardServicePage" data-role="page" class="page standalonePage wizardPage mediaLibraryPage" data-require="scripts/wizardservice">
<div data-role="content"> <div data-role="content">