mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
merge from dev
This commit is contained in:
parent
5e64aeba54
commit
8d7ae321a0
27 changed files with 678 additions and 500 deletions
|
@ -892,11 +892,10 @@
|
|||
|
||||
showSelections(card);
|
||||
|
||||
if (s.stopPropagation) {
|
||||
if (e.stopPropagation) {
|
||||
e.stopPropagation();
|
||||
}
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
return false;
|
||||
}
|
||||
e.preventDefault();
|
||||
|
@ -949,19 +948,17 @@
|
|||
|
||||
if (!itemSelectionPanel) {
|
||||
|
||||
require(['paper-checkbox'], function () {
|
||||
itemSelectionPanel = document.createElement('div');
|
||||
itemSelectionPanel.classList.add('itemSelectionPanel');
|
||||
itemSelectionPanel = document.createElement('div');
|
||||
itemSelectionPanel.classList.add('itemSelectionPanel');
|
||||
|
||||
item.querySelector('.cardContent').appendChild(itemSelectionPanel);
|
||||
item.querySelector('.cardContent').appendChild(itemSelectionPanel);
|
||||
|
||||
var chkItemSelect = document.createElement('paper-checkbox');
|
||||
chkItemSelect.classList.add('chkItemSelect');
|
||||
var chkItemSelect = document.createElement('paper-checkbox');
|
||||
chkItemSelect.classList.add('chkItemSelect');
|
||||
|
||||
$(chkItemSelect).on('change', onSelectionChange);
|
||||
$(chkItemSelect).on('change', onSelectionChange);
|
||||
|
||||
itemSelectionPanel.appendChild(chkItemSelect);
|
||||
});
|
||||
itemSelectionPanel.appendChild(chkItemSelect);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1018,14 +1015,16 @@
|
|||
|
||||
function showSelections(initialCard) {
|
||||
|
||||
var cards = document.querySelectorAll('.card');
|
||||
for (var i = 0, length = cards.length; i < length; i++) {
|
||||
showSelection(cards[i]);
|
||||
}
|
||||
require(['paper-checkbox'], function() {
|
||||
var cards = document.querySelectorAll('.card');
|
||||
for (var i = 0, length = cards.length; i < length; i++) {
|
||||
showSelection(cards[i]);
|
||||
}
|
||||
|
||||
showSelectionCommands();
|
||||
initialCard.querySelector('.chkItemSelect').checked = true;
|
||||
updateItemSelection(initialCard, true);
|
||||
showSelectionCommands();
|
||||
initialCard.querySelector('.chkItemSelect').checked = true;
|
||||
updateItemSelection(initialCard, true);
|
||||
});
|
||||
}
|
||||
|
||||
function hideSelections() {
|
||||
|
|
|
@ -1779,6 +1779,7 @@ var AppInfo = {};
|
|||
}
|
||||
|
||||
var apiClientBowerPath = bowerPath + "/emby-apiclient";
|
||||
var embyWebComponentsBowerPath = bowerPath + '/emby-webcomponents';
|
||||
|
||||
var paths = {
|
||||
velocity: bowerPath + "/velocity/velocity.min",
|
||||
|
@ -1801,6 +1802,8 @@ var AppInfo = {};
|
|||
credentialprovider: apiClientBowerPath + '/credentials',
|
||||
apiclient: apiClientBowerPath + '/apiclient',
|
||||
connectionmanagerfactory: apiClientBowerPath + '/connectionmanager',
|
||||
browserdeviceprofile: embyWebComponentsBowerPath + "/browserdeviceprofile",
|
||||
browser: embyWebComponentsBowerPath + "/browser",
|
||||
connectservice: apiClientBowerPath + '/connectservice'
|
||||
};
|
||||
|
||||
|
@ -1835,7 +1838,7 @@ var AppInfo = {};
|
|||
requirejs.config({
|
||||
map: {
|
||||
'*': {
|
||||
'css': 'components/requirecss',
|
||||
'css': bowerPath + '/emby-webcomponents/requirecss',
|
||||
'html': bowerPath + '/emby-webcomponents/requirehtml'
|
||||
}
|
||||
},
|
||||
|
@ -2370,78 +2373,11 @@ var AppInfo = {};
|
|||
return getWebHostingAppInfo();
|
||||
}
|
||||
|
||||
function setBrowserInfo(isMobile) {
|
||||
|
||||
var uaMatch = function (ua) {
|
||||
ua = ua.toLowerCase();
|
||||
|
||||
var match = /(edge)[ \/]([\w.]+)/.exec(ua) ||
|
||||
/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ua) ||
|
||||
/(opr)(?:.*version|)[ \/]([\w.]+)/.exec(ua) ||
|
||||
/(chrome)[ \/]([\w.]+)/.exec(ua) ||
|
||||
/(safari)[ \/]([\w.]+)/.exec(ua) ||
|
||||
/(msie) ([\w.]+)/.exec(ua) ||
|
||||
ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua) ||
|
||||
[];
|
||||
|
||||
var platform_match = /(ipad)/.exec(ua) ||
|
||||
/(iphone)/.exec(ua) ||
|
||||
/(android)/.exec(ua) ||
|
||||
[];
|
||||
|
||||
var browser = match[1] || "";
|
||||
|
||||
if (ua.indexOf("windows phone") != -1 || ua.indexOf("iemobile") != -1) {
|
||||
|
||||
// http://www.neowin.net/news/ie11-fakes-user-agent-to-fool-gmail-in-windows-phone-81-gdr1-update
|
||||
browser = "msie";
|
||||
}
|
||||
else if (ua.indexOf("like gecko") != -1 && ua.indexOf('webkit') == -1 && ua.indexOf('opera') == -1 && ua.indexOf('chrome') == -1 && ua.indexOf('safari') == -1) {
|
||||
browser = "msie";
|
||||
}
|
||||
|
||||
if (browser == 'opr') {
|
||||
browser = 'opera';
|
||||
}
|
||||
|
||||
return {
|
||||
browser: browser,
|
||||
version: match[2] || "0",
|
||||
platform: platform_match[0] || ""
|
||||
};
|
||||
};
|
||||
|
||||
var userAgent = window.navigator.userAgent;
|
||||
var matched = uaMatch(userAgent);
|
||||
var browser = {};
|
||||
|
||||
if (matched.browser) {
|
||||
browser[matched.browser] = true;
|
||||
browser.version = matched.version;
|
||||
}
|
||||
|
||||
if (matched.platform) {
|
||||
browser[matched.platform] = true;
|
||||
}
|
||||
|
||||
if (!browser.chrome && !browser.msie && !browser.edge && !browser.opera && userAgent.toLowerCase().indexOf("webkit") != -1) {
|
||||
browser.safari = true;
|
||||
}
|
||||
|
||||
if (isMobile.any) {
|
||||
browser.mobile = true;
|
||||
}
|
||||
|
||||
browser.animate = document.documentElement.animate != null;
|
||||
|
||||
window.browserInfo = browser;
|
||||
}
|
||||
|
||||
initRequire();
|
||||
|
||||
var initialDependencies = [];
|
||||
|
||||
initialDependencies.push('isMobile');
|
||||
initialDependencies.push('browser');
|
||||
initialDependencies.push('apiclient-store');
|
||||
initialDependencies.push('scripts/extensions');
|
||||
|
||||
|
@ -2455,7 +2391,9 @@ var AppInfo = {};
|
|||
initialDependencies.push('native-promise-only');
|
||||
}
|
||||
|
||||
require(initialDependencies, function (isMobile) {
|
||||
require(initialDependencies, function (browser) {
|
||||
|
||||
window.browserInfo = browser;
|
||||
|
||||
function onWebComponentsReady() {
|
||||
|
||||
|
@ -2469,7 +2407,6 @@ var AppInfo = {};
|
|||
});
|
||||
}
|
||||
|
||||
setBrowserInfo(isMobile);
|
||||
setAppInfo();
|
||||
setDocumentClasses();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue