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

bump dev version

This commit is contained in:
Luke Pulverenti 2015-05-28 01:51:48 -04:00
parent 6daced8387
commit 48a576778f
28 changed files with 443 additions and 326 deletions

View file

@ -0,0 +1,55 @@
(function (window, store) {
function update(key, val) {
store.setItem(key, val);
Events.trigger(AppSettings, 'settingupdated', [key]);
}
window.AppSettings = {
maxStreamingBitrate: function (val) {
if (val != null) {
update('preferredVideoBitrate', val);
}
return parseInt(store.getItem('preferredVideoBitrate') || '') || 1500000;
},
maxChromecastBitrate: function (val) {
if (val != null) {
update('chromecastBitrate', val);
}
return parseInt(store.getItem('chromecastBitrate') || '') || 3000000;
},
enableExternalPlayers: function (val) {
if (val != null) {
update('externalplayers', val.toString());
}
return store.getItem('externalplayers') == 'true';
},
enableItemPreviews: function (val) {
if (val != null) {
update('enableItemPreviews', val.toString());
}
return store.getItem('enableItemPreviews') != 'false';
},
enableFullScreen: function (val) {
if (val != null) {
update('enableFullScreen', val.toString());
}
return store.getItem('enableFullScreen') == 'true';
}
};
})(window, window.appStorage);

View file

@ -98,7 +98,7 @@
}
function setDefault(page) {
var backdropContainer = $('.backdropContainer');
if (backdropContainer.length) {
@ -128,6 +128,10 @@
return false;
}
if ($.browser.android && Dashboard.isRunningInCordova()) {
return true;
}
if ($.browser.mobile) {
return false;
}
@ -179,7 +183,7 @@
$(page).removeClass('backdropPage');
}
}
function setBackdropUrl(page, url) {
if (url) {

View file

@ -28,11 +28,11 @@
var PlayerName = 'Chromecast';
//var applicationID = "2D4B1DA3";
//var messageNamespace = 'urn:x-cast:com.connectsdk';
var applicationID = "2D4B1DA3";
var messageNamespace = 'urn:x-cast:com.connectsdk';
var applicationID = "F4EB2E8E";
var messageNamespace = 'urn:x-cast:com.google.cast.mediabrowser.v3';
//var applicationID = "F4EB2E8E";
//var messageNamespace = 'urn:x-cast:com.google.cast.mediabrowser.v3';
var CastPlayer = function () {

View file

@ -631,7 +631,7 @@
takeTour(page, Dashboard.getCurrentUserId());
});
}).on('pagebeforeshowready', "#indexPage", function () {
}).on('pageshowready', "#indexPage", function () {
var page = this;

View file

@ -130,6 +130,7 @@
triggerPlayerChange(player, targetInfo);
};
var currentPairingId = null;
self.trySetActivePlayer = function (player, targetInfo) {
if (typeof (player) === 'string') {
@ -142,6 +143,12 @@
throw new Error('null player');
}
if (currentPairingId == targetInfo.id) {
return;
}
currentPairingId = targetInfo.id;
player.tryPair(targetInfo).done(function () {
currentPlayer = player;

View file

@ -45,8 +45,8 @@
if (document.exitFullscreen) {
document.exitFullscreen();
} else if (document.mozExitFullScreen) {
document.mozExitFullScreen();
} else if (document.mozCancelFullScreen) {
document.mozCancelFullScreen();
} else if (document.webkitExitFullscreen) {
document.webkitExitFullscreen();
} else if (document.msExitFullscreen) {
@ -396,7 +396,7 @@
var chapterIndex = 0;
html += item.Chapters.map(function (c) {
var width = 360;
var width = 320;
var chapterHtml = '<a class="card backdropCard chapterCard" href="#" style="margin-right:1em;width:' + width + 'px;" data-position="' + c.StartPositionTicks + '">';
chapterHtml += '<div class="cardBox">';
chapterHtml += '<div class="cardScalable">';
@ -445,11 +445,12 @@
var personHtml = '<div class="tileItem smallPosterTileItem" style="width:300px;">';
var imgUrl;
var height = 160;
if (cast.PrimaryImageTag) {
imgUrl = ApiClient.getScaledImageUrl(cast.Id, {
height: 160,
height: height,
tag: cast.PrimaryImageTag,
type: "primary",
minScale: 2
@ -460,7 +461,7 @@
imgUrl = "css/images/items/list/person.png";
}
personHtml += '<div class="tileImage lazy" data-src="' + imgUrl + '" style="height:160px;"></div>';
personHtml += '<div class="tileImage lazy" data-src="' + imgUrl + '" style="height:' + height + 'px;"></div>';
@ -623,7 +624,7 @@
idleState = true;
$('.hiddenOnIdle').addClass("inactive");
$('#videoPlayer').addClass('idlePlayer');
}, 5000);
}, 4000);
}
function updateVolumeButtons(vol) {
@ -1317,10 +1318,10 @@
};
self.updatePlaylistUi = function () {
var index = self.currentPlaylistIndex(null),
length = self.playlist.length,
requiresNativeControls = !self.enableCustomVideoControls(),
controls = $(requiresNativeControls ? '.videoAdvancedControls' : '.videoControls');
var index = self.currentPlaylistIndex(null);
var length = self.playlist.length;
var requiresNativeControls = !self.enableCustomVideoControls();
var controls = $(requiresNativeControls ? '.videoAdvancedControls' : '.videoControls');
if (length < 2) {
$('.videoTrackControl').hide();

View file

@ -0,0 +1,11 @@
$(document).on('pageshowready', ".userPreferencesPage", function () {
var page = this;
var userId = getParameterByName('userId') || Dashboard.getCurrentUserId();
$('.lnkDisplayPreferences', page).attr('href', 'mypreferencesdisplay.html?userId=' + userId);
$('.lnkLanguagePreferences', page).attr('href', 'mypreferenceslanguages.html?userId=' + userId);
$('.lnkWebClientPreferences', page).attr('href', 'mypreferenceswebclient.html?userId=' + userId);
$('.lnkMyProfile', page).attr('href', 'myprofile.html?userId=' + userId);
});

View file

@ -257,10 +257,9 @@
// Disable default form submission
return false;
}
$(document).on('pageinit', "#displayPreferencesPage", function () {
$(document).on('pageinitdepends', "#displayPreferencesPage", function () {
var page = this;
@ -295,7 +294,9 @@
ul.listview('destroy').listview({});
});
}).on('pageshow', "#displayPreferencesPage", function () {
$('.displayPreferencesForm').off('submit', onSubmit).on('submit', onSubmit);
}).on('pageshowready', "#displayPreferencesPage", function () {
var page = this;
@ -308,21 +309,6 @@
loadForm(page, user);
});
}).on('pageshow', ".userPreferencesPage", function () {
var page = this;
var userId = getParameterByName('userId') || Dashboard.getCurrentUserId();
$('.lnkDisplayPreferences', page).attr('href', 'mypreferencesdisplay.html?userId=' + userId);
$('.lnkLanguagePreferences', page).attr('href', 'mypreferenceslanguages.html?userId=' + userId);
$('.lnkWebClientPreferences', page).attr('href', 'mypreferenceswebclient.html?userId=' + userId);
$('.lnkMyProfile', page).attr('href', 'myprofile.html?userId=' + userId);
});
window.DisplayPreferencesPage = {
onSubmit: onSubmit
};
})(jQuery, window, document);

View file

@ -92,10 +92,9 @@
// Disable default form submission
return false;
}
$(document).on('pageinit', "#languagePreferencesPage", function () {
$(document).on('pageinitdepends', "#languagePreferencesPage", function () {
var page = this;
@ -105,15 +104,14 @@
$('.subtitles' + this.value + 'Help', page).show();
});
}).on('pageshow', "#languagePreferencesPage", function () {
$('.languagePreferencesForm').off('submit', onSubmit).on('submit', onSubmit);
}).on('pageshowready', "#languagePreferencesPage", function () {
var page = this;
loadPage(page);
});
window.LanguagePreferencesPage = {
onSubmit: onSubmit
};
})(jQuery, window, document);

View file

@ -65,7 +65,13 @@
return false;
}
$(document).on('pageshowready', "#webClientPreferencesPage", function () {
$(document).on('pageinitdepends', "#webClientPreferencesPage", function () {
var page = this;
$('.webClientPreferencesForm', page).off('submit', onSubmit).on('submit', onSubmit);
}).on('pageshowready', "#webClientPreferencesPage", function () {
var page = this;
@ -96,50 +102,4 @@
}
});
window.WebClientPreferencesPage = {
onSubmit: onSubmit
};
})(jQuery, window, document);
(function (window, store) {
window.AppSettings = {
maxStreamingBitrate: function (val) {
if (val != null) {
store.setItem('preferredVideoBitrate', val);
}
return parseInt(store.getItem('preferredVideoBitrate') || '') || 1500000;
},
maxChromecastBitrate: function (val) {
if (val != null) {
store.setItem('chromecastBitrate', val);
}
return parseInt(store.getItem('chromecastBitrate') || '') || 3000000;
},
enableExternalPlayers: function (val) {
if (val != null) {
store.setItem('externalplayers', val.toString());
}
return store.getItem('externalplayers') == 'true';
},
enableItemPreviews: function (val) {
if (val != null) {
store.setItem('enableItemPreviews', val.toString());
}
return store.getItem('enableItemPreviews') != 'false';
}
};
})(window, window.appStorage);
})(jQuery, window, document);

View file

@ -181,7 +181,7 @@
window.MyProfilePage = new myProfilePage();
$(document).on('pageinit', "#userImagePage", function () {
$(document).on('pageinitdepends', "#userImagePage", function () {
var page = this;
@ -204,6 +204,9 @@
});
});
$('.newImageForm').off('submit', MyProfilePage.onImageSubmit).on('submit', MyProfilePage.onImageSubmit);
});
@ -316,7 +319,7 @@
Dashboard.showError(Globalize.translate('PasswordMatchError'));
} else {
Dashboard.showLoadingMsg();
savePassword(page);
}
@ -403,7 +406,14 @@
window.UpdatePasswordPage = new updatePasswordPage();
$(document).on('pageshow', ".userPasswordPage", function () {
$(document).on('pageinitdepends', ".userPasswordPage", function () {
var page = this;
$('.updatePasswordForm').off('submit', UpdatePasswordPage.onSubmit).on('submit', UpdatePasswordPage.onSubmit);
$('.localAccessForm').off('submit', UpdatePasswordPage.onLocalAccessSubmit).on('submit', UpdatePasswordPage.onLocalAccessSubmit);
}).on('pageshowready', ".userPasswordPage", function () {
var page = this;

View file

@ -640,6 +640,11 @@ var Dashboard = {
html += '<form>';
if (AppInfo.supportsFullScreen) {
var checkedHtml = AppSettings.enableFullScreen() ? ' checked="checked"' : '';
html += '<p style="margin:1.5em 0;"><label for="chkFullScreen">' + Globalize.translate('OptionEnableFullscreen') + '</label><input type="checkbox"' + checkedHtml + ' id="chkFullScreen" data-mini="true" onchange="AppSettings.enableFullScreen(this.checked);" /></p>';
}
html += '<p class="preferencesContainer"></p>';
if (Dashboard.isConnectMode()) {
@ -1540,9 +1545,13 @@ var AppInfo = {};
AppInfo.enableAppStorePolicy = isCordova;
if ($.browser.safari) {
var isSafari = $.browser.safari;
var isAndroid = $.browser.android;
var isMobile = $.browser.mobile;
if ($.browser.mobile) {
if (isSafari) {
if (isMobile) {
AppInfo.hasLowImageBandwidth = true;
AppInfo.forcedImageFormat = 'jpg';
}
@ -1584,15 +1593,16 @@ var AppInfo = {};
AppInfo.enableFooterNotifications = true;
AppInfo.enableSupporterMembership = true;
if (!$.browser.android && !$.browser.ipad && !$.browser.iphone) {
if (!isAndroid && !isSafari) {
AppInfo.enableAppLayouts = true;
}
}
AppInfo.enableUserImage = true;
AppInfo.hasPhysicalVolumeButtons = isCordova || $.browser.mobile;
AppInfo.hasPhysicalVolumeButtons = isCordova || isMobile;
AppInfo.enableBackButton = ($.browser.safari && window.navigator.standalone) || (isCordova && $.browser.safari);
AppInfo.enableBackButton = (isSafari && window.navigator.standalone) || (isCordova && isSafari);
AppInfo.supportsFullScreen = isCordova && isAndroid;
}
function initializeApiClient(apiClient) {
@ -1829,11 +1839,16 @@ var AppInfo = {};
});
if (Dashboard.isRunningInCordova()) {
requirejs(['thirdparty/cordova/connectsdk', 'thirdparty/cordova/remotecontrols', 'scripts/registrationservices']);
requirejs(['thirdparty/cordova/connectsdk', 'scripts/registrationservices']);
if ($.browser.android) {
requirejs(['thirdparty/cordova/android/immersive']);
}
if ($.browser.safari) {
requirejs(['thirdparty/cordova/remotecontrols']);
}
} else {
if ($.browser.chrome) {
requirejs(['scripts/chromecast']);

View file

@ -346,10 +346,6 @@
function isAvailable(item, user) {
if (Dashboard.isRunningInCordova()) {
return false;
}
return item.SupportsSync;
}