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

update card layouts

This commit is contained in:
Luke Pulverenti 2015-05-13 00:55:19 -04:00
parent 8f4f29888e
commit bb38230c23
46 changed files with 1086 additions and 332 deletions

View file

@ -2,12 +2,13 @@
function onLoggedIn() {
Dashboard.hideModalLoadingMsg();
Dashboard.navigate('selectserver.html');
}
function login(page, username, password) {
Dashboard.showLoadingMsg();
Dashboard.showModalLoadingMsg();
ConnectionManager.loginToConnect(username, password).done(function () {
@ -30,6 +31,8 @@
function handleConnectionResult(page, result) {
Dashboard.hideLoadingMsg();
switch (result.State) {
case MediaBrowser.ConnectionState.SignedIn:
@ -71,12 +74,10 @@
function loadAppConnection(page) {
Dashboard.showLoadingMsg();
Dashboard.showModalLoadingMsg();
ConnectionManager.connect().done(function (result) {
Dashboard.hideLoadingMsg();
handleConnectionResult(page, result);
});
@ -99,8 +100,7 @@
}
function loadMode(page, mode) {
$(document.body).prepend('<div class="backdropContainer" style="background-image:url(css/images/splash.jpg);top:0;"></div>');
$(page).addClass('backdropPage staticBackdropPage');
Backdrops.setDefault(page);
if (mode == 'welcome') {
$('.connectLoginForm', page).hide();
@ -119,13 +119,17 @@
}
}
function skip() {
Dashboard.navigate('selectserver.html');
}
$(document).on('pageinit', "#connectLoginPage", function () {
var page = this;
$('.btnSkipConnect', page).on('click', function() {
Dashboard.navigate('connectlogin.html?mode=manualserver');
$('.btnSkipConnect', page).on('click', function () {
skip();
});
}).on('pageshow', "#connectLoginPage", function () {
@ -138,13 +142,9 @@
$('.embyIntroDownloadMessage', page).html(Globalize.translate('EmbyIntroDownloadMessage', link));
if (Dashboard.isRunningInCordova()) {
$('.newUsers', page).hide();
$('.forgotPassword', page).hide();
$('.skip', page).show();
} else {
$('.skip', page).hide();
$('.newUsers', page).show();
$('.forgotPassword', page).show();
}
});
@ -157,18 +157,14 @@
host += ':' + port;
}
Dashboard.showLoadingMsg();
Dashboard.showModalLoadingMsg();
ConnectionManager.connectToAddress(host).done(function (result) {
Dashboard.hideLoadingMsg();
handleConnectionResult(page, result);
}).fail(function () {
Dashboard.hideLoadingMsg();
handleConnectionResult(page, {
State: MediaBrowser.ConnectionState.Unavailable
});