mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
extract more scripts
This commit is contained in:
parent
f64e0c7c53
commit
d84e09e501
24 changed files with 238 additions and 90 deletions
|
@ -743,12 +743,18 @@
|
|||
|
||||
self.volumeDown = function () {
|
||||
|
||||
self.setVolume(getCurrentVolume() - 2);
|
||||
castPlayer.sendMessage({
|
||||
options: {},
|
||||
command: 'VolumeDown'
|
||||
});
|
||||
};
|
||||
|
||||
self.volumeUp = function () {
|
||||
|
||||
self.setVolume(getCurrentVolume() + 2);
|
||||
castPlayer.sendMessage({
|
||||
options: {},
|
||||
command: 'VolumeUp'
|
||||
});
|
||||
};
|
||||
|
||||
self.setVolume = function (vol) {
|
||||
|
|
|
@ -1377,7 +1377,7 @@ $(document).on('pageshowready', "#dashboardPage", DashboardPage.onPageShow).on('
|
|||
|
||||
var apiClient = ApiClient;
|
||||
|
||||
if (apiClient) {
|
||||
if (apiClient && !AppInfo.isNativeApp) {
|
||||
showWelcomeIfNeeded(page, apiClient);
|
||||
}
|
||||
|
||||
|
|
|
@ -230,7 +230,14 @@
|
|||
});
|
||||
}
|
||||
|
||||
$(document).on('pageinit', "#editCollectionTitlesPage", function () {
|
||||
function onSearchFormSubmit() {
|
||||
var page = $(this).parents('.page');
|
||||
|
||||
showSearchResults(page, $('#txtLookupName', page).val());
|
||||
return false;
|
||||
}
|
||||
|
||||
$(document).on('pageinitdepends', "#editCollectionTitlesPage", function () {
|
||||
|
||||
var page = this;
|
||||
|
||||
|
@ -270,8 +277,9 @@
|
|||
removeItemsFromCollection(page);
|
||||
});
|
||||
|
||||
$('.collectionItemSearchForm').off('submit', onSearchFormSubmit).on('submit', onSearchFormSubmit);
|
||||
|
||||
}).on('pagebeforeshow', "#editCollectionTitlesPage", function () {
|
||||
}).on('pagebeforeshowready', "#editCollectionTitlesPage", function () {
|
||||
|
||||
var page = this;
|
||||
|
||||
|
@ -290,15 +298,4 @@
|
|||
$("body").off("popupafteropen.collections");
|
||||
});
|
||||
|
||||
window.EditCollectionItemsPage = {
|
||||
|
||||
onSearchFormSubmit: function () {
|
||||
|
||||
var page = $(this).parents('.page');
|
||||
|
||||
showSearchResults(page, $('#txtLookupName', page).val());
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
})(jQuery, document, window, window.FileReader, escape);
|
|
@ -396,7 +396,7 @@
|
|||
|
||||
updateEditorNode(this, item);
|
||||
|
||||
}).on('pagebeforeshow', ".metadataEditorPage", function () {
|
||||
}).on('pagebeforeshowready', ".metadataEditorPage", function () {
|
||||
|
||||
window.MetadataEditor = new metadataEditor();
|
||||
|
||||
|
|
|
@ -714,13 +714,16 @@
|
|||
return null;
|
||||
};
|
||||
|
||||
$(document).on('pageinit', "#nowPlayingPage", function () {
|
||||
$(document).on('pageinitdepends', "#nowPlayingPage", function () {
|
||||
|
||||
var page = this;
|
||||
|
||||
bindEvents(page);
|
||||
|
||||
}).on('pageshow', "#nowPlayingPage", function () {
|
||||
$('.sendMessageForm').off('submit', NowPlayingPage.onMessageSubmit).on('submit', NowPlayingPage.onMessageSubmit);
|
||||
$('.typeTextForm').off('submit', NowPlayingPage.onSendStringSubmit).on('submit', NowPlayingPage.onSendStringSubmit);
|
||||
|
||||
}).on('pageshowready', "#nowPlayingPage", function () {
|
||||
|
||||
var page = this;
|
||||
|
||||
|
|
|
@ -230,8 +230,7 @@
|
|||
{
|
||||
complete: function () {
|
||||
$('.viewMenuSearch').addClass('hide');
|
||||
},
|
||||
duration: 'fast'
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
|
@ -1822,13 +1822,13 @@ var AppInfo = {};
|
|||
return false;
|
||||
});
|
||||
|
||||
require(['filesystem']);
|
||||
|
||||
if (Dashboard.isRunningInCordova()) {
|
||||
requirejs(['thirdparty/cordova/connectsdk', 'scripts/registrationservices', 'thirdparty/cordova/volume', 'thirdparty/cordova/back']);
|
||||
|
||||
if ($.browser.android) {
|
||||
requirejs(['thirdparty/cordova/android/androidcredentials', 'thirdparty/cordova/android/immersive', 'thirdparty/cordova/android/filesystem']);
|
||||
} else {
|
||||
requirejs(['thirdparty/cordova/filesystem']);
|
||||
requirejs(['thirdparty/cordova/android/androidcredentials', 'thirdparty/cordova/android/immersive', 'thirdparty/cordova/android/mediasession']);
|
||||
}
|
||||
|
||||
if ($.browser.safari) {
|
||||
|
@ -1839,7 +1839,6 @@ var AppInfo = {};
|
|||
if ($.browser.chrome) {
|
||||
requirejs(['scripts/chromecast']);
|
||||
}
|
||||
requirejs(['thirdparty/filesystem']);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1884,6 +1883,16 @@ var AppInfo = {};
|
|||
define("localassetmanager", ["thirdparty/apiclient/localassetmanager"]);
|
||||
}
|
||||
|
||||
if (Dashboard.isRunningInCordova() && $.browser.android) {
|
||||
define("filesystem", ["thirdparty/cordova/android/filesystem"]);
|
||||
}
|
||||
else if (Dashboard.isRunningInCordova()) {
|
||||
define("filesystem", ["thirdparty/cordova/filesystem"]);
|
||||
}
|
||||
else {
|
||||
define("filesystem", ["thirdparty/filesystem"]);
|
||||
}
|
||||
|
||||
define("connectservice", ["thirdparty/apiclient/connectservice"]);
|
||||
|
||||
//requirejs(['http://viblast.com/player/free-version/qy2fdwajo1/viblast.js']);
|
||||
|
|
|
@ -289,7 +289,7 @@
|
|||
|
||||
}
|
||||
|
||||
$(document).on('pageshow', ".syncActivityPage", function () {
|
||||
$(document).on('pageshowready', ".syncActivityPage", function () {
|
||||
|
||||
var page = this;
|
||||
|
||||
|
|
|
@ -373,7 +373,21 @@
|
|||
|
||||
}
|
||||
|
||||
$(document).on('pageshow', ".syncJobPage", function () {
|
||||
function onSubmit() {
|
||||
var form = this;
|
||||
|
||||
var page = $(form).parents('.page');
|
||||
|
||||
saveJob(page);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
$(document).on('pageinitdepends', ".syncJobPage", function () {
|
||||
|
||||
$('.syncJobForm').off('submit', onSubmit).on('submit', onSubmit);
|
||||
|
||||
}).on('pageshowready', ".syncJobPage", function () {
|
||||
|
||||
var page = this;
|
||||
loadJob(page);
|
||||
|
@ -389,18 +403,4 @@
|
|||
$(ApiClient).off(".syncJobPage");
|
||||
});
|
||||
|
||||
window.SyncJobPage = {
|
||||
|
||||
onSubmit: function () {
|
||||
|
||||
var form = this;
|
||||
|
||||
var page = $(form).parents('.page');
|
||||
|
||||
saveJob(page);
|
||||
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
})();
|
|
@ -430,7 +430,17 @@
|
|||
});
|
||||
}
|
||||
|
||||
$(document).on('pageinit', "#userProfilesPage", function () {
|
||||
function onSubmit() {
|
||||
var form = this;
|
||||
|
||||
var page = $(form).parents('.page');
|
||||
|
||||
inviteUser(page);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
$(document).on('pageinitdepends', "#userProfilesPage", function () {
|
||||
|
||||
var page = this;
|
||||
|
||||
|
@ -439,25 +449,13 @@
|
|||
showInvitePopup(page);
|
||||
});
|
||||
|
||||
}).on('pagebeforeshow', "#userProfilesPage", function () {
|
||||
$('.addUserForm').off('submit', onSubmit).on('submit', onSubmit);
|
||||
|
||||
}).on('pagebeforeshowready', "#userProfilesPage", function () {
|
||||
|
||||
var page = this;
|
||||
|
||||
loadData(page);
|
||||
});
|
||||
|
||||
window.UserProfilesPage = {
|
||||
|
||||
onSubmit: function () {
|
||||
|
||||
var form = this;
|
||||
|
||||
var page = $(form).parents('.page');
|
||||
|
||||
inviteUser(page);
|
||||
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
})(document, window, jQuery);
|
Loading…
Add table
Add a link
Reference in a new issue