mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2024-11-17 19:08:18 -07:00
switch to shared components
This commit is contained in:
parent
c216a7ecdc
commit
e305bf40c8
@ -15,12 +15,12 @@
|
|||||||
},
|
},
|
||||||
"devDependencies": {},
|
"devDependencies": {},
|
||||||
"ignore": [],
|
"ignore": [],
|
||||||
"version": "1.4.96",
|
"version": "1.4.97",
|
||||||
"_release": "1.4.96",
|
"_release": "1.4.97",
|
||||||
"_resolution": {
|
"_resolution": {
|
||||||
"type": "version",
|
"type": "version",
|
||||||
"tag": "1.4.96",
|
"tag": "1.4.97",
|
||||||
"commit": "4c9f9b8c4937da15ac8c81d554e768f0ef6e944e"
|
"commit": "8b11aa9b8f073cbcd9eacf3170efce38d43a5526"
|
||||||
},
|
},
|
||||||
"_source": "https://github.com/MediaBrowser/emby-webcomponents.git",
|
"_source": "https://github.com/MediaBrowser/emby-webcomponents.git",
|
||||||
"_target": "^1.2.0",
|
"_target": "^1.2.0",
|
||||||
|
@ -166,11 +166,7 @@
|
|||||||
// Without this, seeing some script errors in Firefox
|
// Without this, seeing some script errors in Firefox
|
||||||
// Also for some reason it won't auto-focus without a delay here, still investigating that
|
// Also for some reason it won't auto-focus without a delay here, still investigating that
|
||||||
|
|
||||||
var delay = enableAnimation() ? 300 : 300;
|
focusManager.autoFocus(dlg);
|
||||||
|
|
||||||
setTimeout(function () {
|
|
||||||
focusManager.autoFocus(dlg);
|
|
||||||
}, delay);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function safeBlur(el) {
|
function safeBlur(el) {
|
||||||
|
@ -36,6 +36,7 @@
|
|||||||
|
|
||||||
var target = e.target;
|
var target = e.target;
|
||||||
var card = parentWithAttribute(target, 'data-id');
|
var card = parentWithAttribute(target, 'data-id');
|
||||||
|
|
||||||
if (card) {
|
if (card) {
|
||||||
|
|
||||||
//var itemSelectionPanel = card.querySelector('.itemSelectionPanel');
|
//var itemSelectionPanel = card.querySelector('.itemSelectionPanel');
|
||||||
@ -49,11 +50,11 @@
|
|||||||
positionTo: target,
|
positionTo: target,
|
||||||
itemsContainer: itemsContainer
|
itemsContainer: itemsContainer
|
||||||
});
|
});
|
||||||
}
|
|
||||||
|
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function getShortcutOptions() {
|
function getShortcutOptions() {
|
||||||
@ -82,13 +83,32 @@
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
ItemsContainerProtoType.enableMultiSelect = function (enabled) {
|
||||||
|
|
||||||
|
var current = this.multiSelect;
|
||||||
|
|
||||||
|
if (!enabled && current) {
|
||||||
|
current.destroy();
|
||||||
|
this.multiSelect = null;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (current) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
var self = this;
|
||||||
|
require(['multiSelect'], function (MultiSelect) {
|
||||||
|
self.multiSelect = new MultiSelect(self);
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
ItemsContainerProtoType.attachedCallback = function () {
|
ItemsContainerProtoType.attachedCallback = function () {
|
||||||
|
|
||||||
this.addEventListener('click', onClick);
|
this.addEventListener('click', onClick);
|
||||||
|
|
||||||
// mobile safari doesn't allow contextmenu override
|
if (browser.mobile) {
|
||||||
if (browser.safari && browser.mobile) {
|
|
||||||
this.addEventListener('contextmenu', disableEvent);
|
this.addEventListener('contextmenu', disableEvent);
|
||||||
// todo: use tap hold
|
|
||||||
} else {
|
} else {
|
||||||
this.addEventListener('contextmenu', onContextMenu);
|
this.addEventListener('contextmenu', onContextMenu);
|
||||||
}
|
}
|
||||||
@ -97,10 +117,17 @@
|
|||||||
this.enableHoverMenu(true);
|
this.enableHoverMenu(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (layoutManager.desktop || layoutManager.mobile) {
|
||||||
|
this.enableMultiSelect(true);
|
||||||
|
}
|
||||||
|
|
||||||
itemShortcuts.on(this, getShortcutOptions());
|
itemShortcuts.on(this, getShortcutOptions());
|
||||||
};
|
};
|
||||||
|
|
||||||
ItemsContainerProtoType.detachedCallback = function () {
|
ItemsContainerProtoType.detachedCallback = function () {
|
||||||
|
|
||||||
|
this.enableHoverMenu(false);
|
||||||
|
this.enableMultiSelect(false);
|
||||||
this.removeEventListener('click', onClick);
|
this.removeEventListener('click', onClick);
|
||||||
this.removeEventListener('contextmenu', onContextMenu);
|
this.removeEventListener('contextmenu', onContextMenu);
|
||||||
this.removeEventListener('contextmenu', disableEvent);
|
this.removeEventListener('contextmenu', disableEvent);
|
||||||
|
@ -39,10 +39,16 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.cardOverlayButtons .fab {
|
.cardOverlayButtons .fab {
|
||||||
background-color: #333;
|
background-color: #282828;
|
||||||
margin-right: .25em;
|
margin-right: .25em;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.cardOverlayButtons .fab i.md-icon {
|
||||||
|
width: auto !important;
|
||||||
|
height: auto !important;
|
||||||
|
font-size: 20px !important;
|
||||||
|
}
|
||||||
|
|
||||||
@media all and (max-width: 1200px) {
|
@media all and (max-width: 1200px) {
|
||||||
|
|
||||||
.cardOverlayInner {
|
.cardOverlayInner {
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
var preventHover = false;
|
var preventHover = false;
|
||||||
var showOverlayTimeout;
|
var showOverlayTimeout;
|
||||||
var hoveringElement;
|
|
||||||
|
|
||||||
function parentWithAttribute(elem, name) {
|
function parentWithAttribute(elem, name) {
|
||||||
|
|
||||||
@ -21,10 +20,6 @@
|
|||||||
|
|
||||||
var elem = e.target;
|
var elem = e.target;
|
||||||
|
|
||||||
if (elem != hoveringElement) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (showOverlayTimeout) {
|
if (showOverlayTimeout) {
|
||||||
clearTimeout(showOverlayTimeout);
|
clearTimeout(showOverlayTimeout);
|
||||||
showOverlayTimeout = null;
|
showOverlayTimeout = null;
|
||||||
@ -244,7 +239,6 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
elem = parentWithAttribute(elem, 'data-id');
|
elem = parentWithAttribute(elem, 'data-id');
|
||||||
hoveringElement = elem;
|
|
||||||
|
|
||||||
showOverlayTimeout = setTimeout(function () {
|
showOverlayTimeout = setTimeout(function () {
|
||||||
onShowTimerExpired(elem);
|
onShowTimerExpired(elem);
|
||||||
|
37
dashboard-ui/bower_components/emby-webcomponents/multiselect/multiselect.css
vendored
Normal file
37
dashboard-ui/bower_components/emby-webcomponents/multiselect/multiselect.css
vendored
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
.itemSelectionPanel {
|
||||||
|
position: absolute;
|
||||||
|
bottom: 0;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
top: 0;
|
||||||
|
background-color: rgba(0, 0, 0, .3);
|
||||||
|
z-index: 999;
|
||||||
|
border: 1px solid #43A047;
|
||||||
|
}
|
||||||
|
|
||||||
|
.selectionCommandsPanel {
|
||||||
|
position: fixed;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
height: 50px;
|
||||||
|
background: #43A047;
|
||||||
|
z-index: 1000;
|
||||||
|
padding: 0 .75em 0 .25em;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.itemSelectionCount {
|
||||||
|
font-size: 28px;
|
||||||
|
vertical-align: middle;
|
||||||
|
color: #fff;
|
||||||
|
display: inline-block;
|
||||||
|
padding-top: 1px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.itemSelectionPanel .checkboxOutline {
|
||||||
|
top: 0 !important;
|
||||||
|
border-radius: 0 !important;
|
||||||
|
}
|
547
dashboard-ui/bower_components/emby-webcomponents/multiselect/multiselect.js
vendored
Normal file
547
dashboard-ui/bower_components/emby-webcomponents/multiselect/multiselect.js
vendored
Normal file
@ -0,0 +1,547 @@
|
|||||||
|
define(['browser', 'apphost', 'loading', 'connectionManager', 'globalize', 'embyRouter', 'css!./multiselect'], function (browser, appHost, loading, connectionManager, globalize, embyRouter) {
|
||||||
|
|
||||||
|
var selectedItems = [];
|
||||||
|
var selectedElements = [];
|
||||||
|
var currentSelectionCommandsPanel;
|
||||||
|
|
||||||
|
function parentWithClass(elem, className) {
|
||||||
|
|
||||||
|
while (!elem.classList || !elem.classList.contains(className)) {
|
||||||
|
elem = elem.parentNode;
|
||||||
|
|
||||||
|
if (!elem) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return elem;
|
||||||
|
}
|
||||||
|
|
||||||
|
function hideSelections() {
|
||||||
|
|
||||||
|
var selectionCommandsPanel = currentSelectionCommandsPanel;
|
||||||
|
if (selectionCommandsPanel) {
|
||||||
|
|
||||||
|
selectionCommandsPanel.parentNode.removeChild(selectionCommandsPanel);
|
||||||
|
currentSelectionCommandsPanel = null;
|
||||||
|
|
||||||
|
selectedItems = [];
|
||||||
|
selectedElements = [];
|
||||||
|
var elems = document.querySelectorAll('.itemSelectionPanel');
|
||||||
|
for (var i = 0, length = elems.length; i < length; i++) {
|
||||||
|
elems[i].parentNode.removeChild(elems[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function showTapHoldHelp(element) {
|
||||||
|
|
||||||
|
return;
|
||||||
|
var page = parentWithClass(element, 'page');
|
||||||
|
|
||||||
|
if (!page) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Don't do this on the home page
|
||||||
|
if (page.classList.contains('homePage') || page.classList.contains('itemDetailPage') || page.classList.contains('liveTvPage')) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
var expectedValue = "8";
|
||||||
|
if (appStorage.getItem("tapholdhelp") == expectedValue) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
appStorage.setItem("tapholdhelp", expectedValue);
|
||||||
|
|
||||||
|
Dashboard.alert({
|
||||||
|
message: globalize.translate('TryMultiSelectMessage'),
|
||||||
|
title: globalize.translate('HeaderTryMultiSelect')
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function onItemSelectionPanelClick(e, itemSelectionPanel) {
|
||||||
|
|
||||||
|
// toggle the checkbox, if it wasn't clicked on
|
||||||
|
if (!parentWithClass(e.target, 'chkItemSelect')) {
|
||||||
|
var chkItemSelect = itemSelectionPanel.querySelector('.chkItemSelect');
|
||||||
|
|
||||||
|
if (chkItemSelect) {
|
||||||
|
|
||||||
|
if (chkItemSelect.classList.contains('checkedInitial')) {
|
||||||
|
chkItemSelect.classList.remove('checkedInitial');
|
||||||
|
} else {
|
||||||
|
var newValue = !chkItemSelect.checked;
|
||||||
|
chkItemSelect.checked = newValue;
|
||||||
|
updateItemSelection(chkItemSelect, newValue);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
e.preventDefault();
|
||||||
|
e.stopPropagation();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
function updateItemSelection(chkItemSelect, selected) {
|
||||||
|
|
||||||
|
var id = parentWithClass(chkItemSelect, 'card').getAttribute('data-id');
|
||||||
|
|
||||||
|
if (selected) {
|
||||||
|
|
||||||
|
var current = selectedItems.filter(function (i) {
|
||||||
|
return i == id;
|
||||||
|
});
|
||||||
|
|
||||||
|
if (!current.length) {
|
||||||
|
selectedItems.push(id);
|
||||||
|
selectedElements.push(chkItemSelect);
|
||||||
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
|
selectedItems = selectedItems.filter(function (i) {
|
||||||
|
return i != id;
|
||||||
|
});
|
||||||
|
selectedElements = selectedElements.filter(function (i) {
|
||||||
|
return i != chkItemSelect;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
if (selectedItems.length) {
|
||||||
|
var itemSelectionCount = document.querySelector('.itemSelectionCount');
|
||||||
|
if (itemSelectionCount) {
|
||||||
|
itemSelectionCount.innerHTML = selectedItems.length;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
hideSelections();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function onSelectionChange(e) {
|
||||||
|
updateItemSelection(this, this.checked);
|
||||||
|
}
|
||||||
|
|
||||||
|
function showSelection(item, isChecked) {
|
||||||
|
|
||||||
|
var itemSelectionPanel = item.querySelector('.itemSelectionPanel');
|
||||||
|
|
||||||
|
if (!itemSelectionPanel) {
|
||||||
|
|
||||||
|
itemSelectionPanel = document.createElement('div');
|
||||||
|
itemSelectionPanel.classList.add('itemSelectionPanel');
|
||||||
|
|
||||||
|
item.querySelector('.cardContent').appendChild(itemSelectionPanel);
|
||||||
|
|
||||||
|
var cssClass = 'chkItemSelect';
|
||||||
|
if (isChecked && !browser.firefox) {
|
||||||
|
// In firefox, the initial tap hold doesnt' get treated as a click
|
||||||
|
// In other browsers it does, so we need to make sure that initial click is ignored
|
||||||
|
cssClass += ' checkedInitial';
|
||||||
|
}
|
||||||
|
var checkedAttribute = isChecked ? ' checked' : '';
|
||||||
|
itemSelectionPanel.innerHTML = '<label class="checkboxContainer"><input type="checkbox" is="emby-checkbox" class="' + cssClass + '"' + checkedAttribute + '/><span></span></label>';
|
||||||
|
var chkItemSelect = itemSelectionPanel.querySelector('.chkItemSelect');
|
||||||
|
chkItemSelect.addEventListener('change', onSelectionChange);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function shake(elem, iterations) {
|
||||||
|
var keyframes = [
|
||||||
|
{ transform: 'translate3d(0, 0, 0)', offset: 0 },
|
||||||
|
{ transform: 'translate3d(-10px, 0, 0)', offset: 0.1 },
|
||||||
|
{ transform: 'translate3d(10px, 0, 0)', offset: 0.2 },
|
||||||
|
{ transform: 'translate3d(-10px, 0, 0)', offset: 0.3 },
|
||||||
|
{ transform: 'translate3d(10px, 0, 0)', offset: 0.4 },
|
||||||
|
{ transform: 'translate3d(-10px, 0, 0)', offset: 0.5 },
|
||||||
|
{ transform: 'translate3d(10px, 0, 0)', offset: 0.6 },
|
||||||
|
{ transform: 'translate3d(-10px, 0, 0)', offset: 0.7 },
|
||||||
|
{ transform: 'translate3d(10px, 0, 0)', offset: 0.8 },
|
||||||
|
{ transform: 'translate3d(-10px, 0, 0)', offset: 0.9 },
|
||||||
|
{ transform: 'translate3d(0, 0, 0)', offset: 1 }];
|
||||||
|
var timing = { duration: 900, iterations: iterations };
|
||||||
|
|
||||||
|
if (elem.animate) {
|
||||||
|
elem.animate(keyframes, timing);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function showSelectionCommands() {
|
||||||
|
|
||||||
|
var selectionCommandsPanel = currentSelectionCommandsPanel;
|
||||||
|
|
||||||
|
if (!selectionCommandsPanel) {
|
||||||
|
|
||||||
|
selectionCommandsPanel = document.createElement('div');
|
||||||
|
selectionCommandsPanel.classList.add('selectionCommandsPanel');
|
||||||
|
|
||||||
|
document.body.appendChild(selectionCommandsPanel);
|
||||||
|
currentSelectionCommandsPanel = selectionCommandsPanel;
|
||||||
|
|
||||||
|
var html = '';
|
||||||
|
|
||||||
|
html += '<div style="float:left;">';
|
||||||
|
html += '<button is="paper-icon-button-light" class="btnCloseSelectionPanel autoSize"><i class="md-icon">close</i></button>';
|
||||||
|
html += '<span class="itemSelectionCount"></span>';
|
||||||
|
html += '</div>';
|
||||||
|
|
||||||
|
html += '<button is="paper-icon-button-light" class="btnSelectionPanelOptions autoSize" style="margin-left:auto;"><i class="md-icon">more_vert</i></button>';
|
||||||
|
|
||||||
|
selectionCommandsPanel.innerHTML = html;
|
||||||
|
|
||||||
|
selectionCommandsPanel.querySelector('.btnCloseSelectionPanel').addEventListener('click', hideSelections);
|
||||||
|
|
||||||
|
var btnSelectionPanelOptions = selectionCommandsPanel.querySelector('.btnSelectionPanelOptions');
|
||||||
|
|
||||||
|
btnSelectionPanelOptions.addEventListener('click', showMenuForSelectedItems);
|
||||||
|
|
||||||
|
if (!browser.mobile) {
|
||||||
|
shake(btnSelectionPanelOptions, 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function deleteItems(apiClient, itemIds) {
|
||||||
|
|
||||||
|
return new Promise(function (resolve, reject) {
|
||||||
|
|
||||||
|
var msg = globalize.translate('ConfirmDeleteItem');
|
||||||
|
var title = globalize.translate('HeaderDeleteItem');
|
||||||
|
|
||||||
|
if (itemIds.length > 1) {
|
||||||
|
msg = globalize.translate('ConfirmDeleteItems');
|
||||||
|
title = globalize.translate('HeaderDeleteItems');
|
||||||
|
}
|
||||||
|
|
||||||
|
require(['confirm'], function (confirm) {
|
||||||
|
|
||||||
|
confirm(msg, title).then(function () {
|
||||||
|
|
||||||
|
var promises = itemIds.map(function (itemId) {
|
||||||
|
apiClient.deleteItem(itemId);
|
||||||
|
});
|
||||||
|
|
||||||
|
resolve();
|
||||||
|
}, reject);
|
||||||
|
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function showMenuForSelectedItems(e) {
|
||||||
|
|
||||||
|
var apiClient = connectionManager.currentApiClient();
|
||||||
|
|
||||||
|
apiClient.getCurrentUser().then(function (user) {
|
||||||
|
|
||||||
|
var menuItems = [];
|
||||||
|
|
||||||
|
menuItems.push({
|
||||||
|
name: globalize.translate('sharedcomponents#AddToCollection'),
|
||||||
|
id: 'addtocollection',
|
||||||
|
ironIcon: 'add'
|
||||||
|
});
|
||||||
|
|
||||||
|
menuItems.push({
|
||||||
|
name: globalize.translate('sharedcomponents#AddToPlaylist'),
|
||||||
|
id: 'playlist',
|
||||||
|
ironIcon: 'playlist-add'
|
||||||
|
});
|
||||||
|
|
||||||
|
if (user.Policy.EnableContentDeletion) {
|
||||||
|
menuItems.push({
|
||||||
|
name: globalize.translate('sharedcomponents#Delete'),
|
||||||
|
id: 'delete',
|
||||||
|
ironIcon: 'delete'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
if (user.Policy.EnableContentDownloading && appHost.supports('filedownload')) {
|
||||||
|
//items.push({
|
||||||
|
// name: Globalize.translate('ButtonDownload'),
|
||||||
|
// id: 'download',
|
||||||
|
// ironIcon: 'file-download'
|
||||||
|
//});
|
||||||
|
}
|
||||||
|
|
||||||
|
menuItems.push({
|
||||||
|
name: globalize.translate('sharedcomponents#GroupVersions'),
|
||||||
|
id: 'groupvideos',
|
||||||
|
ironIcon: 'call-merge'
|
||||||
|
});
|
||||||
|
|
||||||
|
menuItems.push({
|
||||||
|
name: globalize.translate('sharedcomponents#MarkPlayed'),
|
||||||
|
id: 'markplayed'
|
||||||
|
});
|
||||||
|
|
||||||
|
menuItems.push({
|
||||||
|
name: globalize.translate('sharedcomponents#MarkUnplayed'),
|
||||||
|
id: 'markunplayed'
|
||||||
|
});
|
||||||
|
|
||||||
|
menuItems.push({
|
||||||
|
name: globalize.translate('sharedcomponents#Refresh'),
|
||||||
|
id: 'refresh',
|
||||||
|
ironIcon: 'refresh'
|
||||||
|
});
|
||||||
|
|
||||||
|
menuItems.push({
|
||||||
|
name: globalize.translate('sharedcomponents#Sync'),
|
||||||
|
id: 'sync',
|
||||||
|
ironIcon: 'sync'
|
||||||
|
});
|
||||||
|
dispatchNeedsRefresh();
|
||||||
|
require(['actionsheet'], function (actionsheet) {
|
||||||
|
|
||||||
|
actionsheet.show({
|
||||||
|
items: menuItems,
|
||||||
|
positionTo: e.target,
|
||||||
|
callback: function (id) {
|
||||||
|
|
||||||
|
var items = selectedItems.slice(0);
|
||||||
|
var serverId = apiClient.serverInfo().Id;
|
||||||
|
|
||||||
|
switch (id) {
|
||||||
|
|
||||||
|
case 'addtocollection':
|
||||||
|
require(['collectionEditor'], function (collectionEditor) {
|
||||||
|
|
||||||
|
new collectionEditor().show({
|
||||||
|
items: items,
|
||||||
|
serverId: serverId
|
||||||
|
});
|
||||||
|
});
|
||||||
|
hideSelections();
|
||||||
|
break;
|
||||||
|
case 'playlist':
|
||||||
|
require(['playlistEditor'], function (playlistEditor) {
|
||||||
|
new playlistEditor().show({
|
||||||
|
items: items,
|
||||||
|
serverId: serverId
|
||||||
|
});
|
||||||
|
});
|
||||||
|
hideSelections();
|
||||||
|
break;
|
||||||
|
case 'delete':
|
||||||
|
deleteItems(items).then(function () {
|
||||||
|
embyRouter.goHome();
|
||||||
|
});
|
||||||
|
hideSelections();
|
||||||
|
break;
|
||||||
|
case 'groupvideos':
|
||||||
|
combineVersions(apiClient, items);
|
||||||
|
break;
|
||||||
|
case 'markplayed':
|
||||||
|
items.forEach(function (itemId) {
|
||||||
|
apiClient.markPlayed(apiClient.getCurrentUserId(), itemId);
|
||||||
|
});
|
||||||
|
hideSelections();
|
||||||
|
break;
|
||||||
|
case 'markunplayed':
|
||||||
|
items.forEach(function (itemId) {
|
||||||
|
apiClient.markUnplayed(apiClient.getCurrentUserId(), itemId);
|
||||||
|
});
|
||||||
|
hideSelections();
|
||||||
|
break;
|
||||||
|
case 'refresh':
|
||||||
|
require(['refreshDialog'], function (refreshDialog) {
|
||||||
|
new refreshDialog({
|
||||||
|
itemIds: items,
|
||||||
|
serverId: serverId
|
||||||
|
}).show();
|
||||||
|
});
|
||||||
|
hideSelections();
|
||||||
|
break;
|
||||||
|
case 'sync':
|
||||||
|
require(['syncDialog'], function (syncDialog) {
|
||||||
|
syncDialog.showMenu({
|
||||||
|
items: items.map(function (i) {
|
||||||
|
return {
|
||||||
|
Id: i
|
||||||
|
};
|
||||||
|
})
|
||||||
|
});
|
||||||
|
});
|
||||||
|
hideSelections();
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function parentWithAttribute(elem, name, value) {
|
||||||
|
|
||||||
|
while ((value ? elem.getAttribute(name) != value : !elem.getAttribute(name))) {
|
||||||
|
elem = elem.parentNode;
|
||||||
|
|
||||||
|
if (!elem || !elem.getAttribute) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return elem;
|
||||||
|
}
|
||||||
|
|
||||||
|
function dispatchNeedsRefresh() {
|
||||||
|
|
||||||
|
var elems = [];
|
||||||
|
|
||||||
|
[].forEach.call(selectedElements, function (i) {
|
||||||
|
|
||||||
|
var container = parentWithAttribute(i, 'is', 'emby-itemscontainer');
|
||||||
|
|
||||||
|
if (container && elems.indexOf(container) == -1) {
|
||||||
|
elems.push(container);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
for (var i = 0, length = elems.length; i < length; i++) {
|
||||||
|
elems[i].dispatchEvent(new CustomEvent('needsrefresh', {
|
||||||
|
detail: {},
|
||||||
|
cancelable: false,
|
||||||
|
bubbles: true
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function combineVersions(apiClient, selection) {
|
||||||
|
|
||||||
|
if (selection.length < 2) {
|
||||||
|
|
||||||
|
require(['alert'], function (alert) {
|
||||||
|
alert({
|
||||||
|
text: globalize.translate('sharedcomponents#PleaseSelectTwoItems'),
|
||||||
|
title: globalize.translate('sharedcomponents#Error')
|
||||||
|
});
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
var msg = globalize.translate('sharedcomponents#TheSelectedItemsWillBeGrouped');
|
||||||
|
|
||||||
|
require(['confirm'], function (confirm) {
|
||||||
|
|
||||||
|
confirm(msg, globalize.translate('sharedcomponents#GroupVersions')).then(function () {
|
||||||
|
|
||||||
|
loading.show();
|
||||||
|
|
||||||
|
apiClient.ajax({
|
||||||
|
|
||||||
|
type: "POST",
|
||||||
|
url: apiClient.getUrl("Videos/MergeVersions", { Ids: selection.join(',') })
|
||||||
|
|
||||||
|
}).then(function () {
|
||||||
|
|
||||||
|
loading.hide();
|
||||||
|
hideSelections();
|
||||||
|
dispatchNeedsRefresh();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function showSelections(initialCard) {
|
||||||
|
|
||||||
|
require(['emby-checkbox'], function () {
|
||||||
|
var cards = document.querySelectorAll('.card');
|
||||||
|
for (var i = 0, length = cards.length; i < length; i++) {
|
||||||
|
showSelection(cards[i], initialCard == cards[i]);
|
||||||
|
}
|
||||||
|
|
||||||
|
showSelectionCommands();
|
||||||
|
updateItemSelection(initialCard, true);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function onContainerClick(e) {
|
||||||
|
|
||||||
|
var target = e.target;
|
||||||
|
|
||||||
|
if (selectedItems.length) {
|
||||||
|
|
||||||
|
var card = parentWithClass(target, 'card');
|
||||||
|
if (card) {
|
||||||
|
var itemSelectionPanel = card.querySelector('.itemSelectionPanel');
|
||||||
|
if (itemSelectionPanel) {
|
||||||
|
return onItemSelectionPanelClick(e, itemSelectionPanel);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
e.preventDefault();
|
||||||
|
e.stopPropagation();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
document.addEventListener('viewbeforehide', hideSelections);
|
||||||
|
|
||||||
|
return function (container) {
|
||||||
|
|
||||||
|
var self = this;
|
||||||
|
|
||||||
|
function onTapHold(e) {
|
||||||
|
|
||||||
|
var card = parentWithClass(e.target, 'card');
|
||||||
|
|
||||||
|
if (card) {
|
||||||
|
|
||||||
|
showSelections(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
e.preventDefault();
|
||||||
|
// It won't have this if it's a hammer event
|
||||||
|
if (e.stopPropagation) {
|
||||||
|
e.stopPropagation();
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
function initTapHold(element) {
|
||||||
|
|
||||||
|
// mobile safari doesn't allow contextmenu override
|
||||||
|
if (browser.mobile && !browser.safari) {
|
||||||
|
container.addEventListener('contextmenu', onTapHold);
|
||||||
|
} else {
|
||||||
|
require(['hammer'], function (Hammer) {
|
||||||
|
|
||||||
|
var manager = new Hammer.Manager(element);
|
||||||
|
|
||||||
|
var press = new Hammer.Press({
|
||||||
|
time: 500
|
||||||
|
});
|
||||||
|
|
||||||
|
manager.add(press);
|
||||||
|
|
||||||
|
//var hammertime = new Hammer(element);
|
||||||
|
|
||||||
|
manager.on('press', onTapHold);
|
||||||
|
self.manager = manager;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
showTapHoldHelp(element);
|
||||||
|
}
|
||||||
|
|
||||||
|
initTapHold(container);
|
||||||
|
|
||||||
|
container.addEventListener('click', onContainerClick);
|
||||||
|
|
||||||
|
self.destroy = function () {
|
||||||
|
|
||||||
|
container.removeEventListener('click', onContainerClick);
|
||||||
|
container.removeEventListener('contextmenu', onTapHold);
|
||||||
|
|
||||||
|
var manager = self.manager;
|
||||||
|
if (manager) {
|
||||||
|
manager.destroy();
|
||||||
|
self.manager = null;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
};
|
||||||
|
});
|
@ -1,8 +1,10 @@
|
|||||||
{
|
{
|
||||||
"EditInfo": "Edit Info",
|
"MarkPlayed": "Mark Played",
|
||||||
"RemoveFromPlaylist": "Remove from Playlist",
|
"MarkUnplayed": "Mark Unplayed",
|
||||||
"PlayFromBeginning": "Play from beginning",
|
"GroupVersions": "Group Versions",
|
||||||
"ResumeAt": "Resume from {0}",
|
"PleaseSelectTwoItems": "Please select at least two items.",
|
||||||
|
"TheSelectedItemsWillBeGrouped": "The selected videos will be grouped into one virtual item. Emby apps will automatically choose which version to play based on device and network performance. Are you sure you wish to continue?",
|
||||||
|
"Error": "Error",
|
||||||
"ValueSpecialEpisodeName": "Special - {0}",
|
"ValueSpecialEpisodeName": "Special - {0}",
|
||||||
"Share": "Del",
|
"Share": "Del",
|
||||||
"ServerUpdateNeeded": "Denne Emby server b\u00f8r opdateres. For at downloade den nyeste version bes\u00f8g venligst {0}",
|
"ServerUpdateNeeded": "Denne Emby server b\u00f8r opdateres. For at downloade den nyeste version bes\u00f8g venligst {0}",
|
||||||
@ -109,10 +111,15 @@
|
|||||||
"Shuffle": "Shuffle",
|
"Shuffle": "Shuffle",
|
||||||
"Identify": "Identify",
|
"Identify": "Identify",
|
||||||
"EditImages": "Edit Images",
|
"EditImages": "Edit Images",
|
||||||
|
"EditInfo": "Edit Info",
|
||||||
"Sync": "Sync",
|
"Sync": "Sync",
|
||||||
"InstantMix": "Instant Mix",
|
"InstantMix": "Instant Mix",
|
||||||
"ViewAlbum": "View Album",
|
"ViewAlbum": "View Album",
|
||||||
"ViewArtist": "View Artist",
|
"ViewArtist": "View Artist",
|
||||||
"QueueAllFromHere": "Queue All from Here",
|
"QueueAllFromHere": "Queue All from Here",
|
||||||
"PlayAllFromHere": "Play All from Here"
|
"PlayAllFromHere": "Play All from Here",
|
||||||
|
"PlayFromBeginning": "Play from beginning",
|
||||||
|
"ResumeAt": "Resume from {0}",
|
||||||
|
"RemoveFromPlaylist": "Remove from Playlist",
|
||||||
|
"Trailer": "Trailer"
|
||||||
}
|
}
|
@ -1,8 +1,10 @@
|
|||||||
{
|
{
|
||||||
"EditInfo": "Edit Info",
|
"MarkPlayed": "Mark Played",
|
||||||
"RemoveFromPlaylist": "Remove from Playlist",
|
"MarkUnplayed": "Mark Unplayed",
|
||||||
"PlayFromBeginning": "Play from beginning",
|
"GroupVersions": "Group Versions",
|
||||||
"ResumeAt": "Resume from {0}",
|
"PleaseSelectTwoItems": "Please select at least two items.",
|
||||||
|
"TheSelectedItemsWillBeGrouped": "The selected videos will be grouped into one virtual item. Emby apps will automatically choose which version to play based on device and network performance. Are you sure you wish to continue?",
|
||||||
|
"Error": "Error",
|
||||||
"ValueSpecialEpisodeName": "Special - {0}",
|
"ValueSpecialEpisodeName": "Special - {0}",
|
||||||
"Share": "Teilen",
|
"Share": "Teilen",
|
||||||
"ServerUpdateNeeded": "Dieser Emby Server sollte aktualisiert werden. Um die neueste Version zu laden, besuche bitte {0}",
|
"ServerUpdateNeeded": "Dieser Emby Server sollte aktualisiert werden. Um die neueste Version zu laden, besuche bitte {0}",
|
||||||
@ -109,10 +111,15 @@
|
|||||||
"Shuffle": "Shuffle",
|
"Shuffle": "Shuffle",
|
||||||
"Identify": "Identify",
|
"Identify": "Identify",
|
||||||
"EditImages": "Edit Images",
|
"EditImages": "Edit Images",
|
||||||
|
"EditInfo": "Edit Info",
|
||||||
"Sync": "Sync",
|
"Sync": "Sync",
|
||||||
"InstantMix": "Instant Mix",
|
"InstantMix": "Instant Mix",
|
||||||
"ViewAlbum": "View Album",
|
"ViewAlbum": "View Album",
|
||||||
"ViewArtist": "View Artist",
|
"ViewArtist": "View Artist",
|
||||||
"QueueAllFromHere": "Queue All from Here",
|
"QueueAllFromHere": "Queue All from Here",
|
||||||
"PlayAllFromHere": "Play All from Here"
|
"PlayAllFromHere": "Play All from Here",
|
||||||
|
"PlayFromBeginning": "Play from beginning",
|
||||||
|
"ResumeAt": "Resume from {0}",
|
||||||
|
"RemoveFromPlaylist": "Remove from Playlist",
|
||||||
|
"Trailer": "Trailer"
|
||||||
}
|
}
|
@ -97,7 +97,6 @@
|
|||||||
"Favorite": "Favorite",
|
"Favorite": "Favorite",
|
||||||
"Like": "Like",
|
"Like": "Like",
|
||||||
"Dislike": "Dislike",
|
"Dislike": "Dislike",
|
||||||
"Played": "Played",
|
|
||||||
"RefreshDialogHelp": "Metadata is refreshed based on settings and internet services that are enabled in the Emby Server dashboard.",
|
"RefreshDialogHelp": "Metadata is refreshed based on settings and internet services that are enabled in the Emby Server dashboard.",
|
||||||
"Open": "Open",
|
"Open": "Open",
|
||||||
"Play": "Play",
|
"Play": "Play",
|
||||||
@ -115,5 +114,11 @@
|
|||||||
"PlayFromBeginning": "Play from beginning",
|
"PlayFromBeginning": "Play from beginning",
|
||||||
"ResumeAt": "Resume from {0}",
|
"ResumeAt": "Resume from {0}",
|
||||||
"RemoveFromPlaylist": "Remove from Playlist",
|
"RemoveFromPlaylist": "Remove from Playlist",
|
||||||
"Trailer": "Trailer"
|
"Trailer": "Trailer",
|
||||||
|
"MarkPlayed": "Mark Played",
|
||||||
|
"MarkUnplayed": "Mark Unplayed",
|
||||||
|
"GroupVersions": "Group Versions",
|
||||||
|
"PleaseSelectTwoItems": "Please select at least two items.",
|
||||||
|
"TheSelectedItemsWillBeGrouped": "The selected videos will be grouped into one virtual item. Emby apps will automatically choose which version to play based on device and network performance. Are you sure you wish to continue?",
|
||||||
|
"Error": "Error"
|
||||||
}
|
}
|
@ -1,8 +1,10 @@
|
|||||||
{
|
{
|
||||||
"EditInfo": "Edit Info",
|
"MarkPlayed": "Mark Played",
|
||||||
"RemoveFromPlaylist": "Remove from Playlist",
|
"MarkUnplayed": "Mark Unplayed",
|
||||||
"PlayFromBeginning": "Play from beginning",
|
"GroupVersions": "Group Versions",
|
||||||
"ResumeAt": "Resume from {0}",
|
"PleaseSelectTwoItems": "Please select at least two items.",
|
||||||
|
"TheSelectedItemsWillBeGrouped": "The selected videos will be grouped into one virtual item. Emby apps will automatically choose which version to play based on device and network performance. Are you sure you wish to continue?",
|
||||||
|
"Error": "Error",
|
||||||
"ValueSpecialEpisodeName": "Especial - {0}",
|
"ValueSpecialEpisodeName": "Especial - {0}",
|
||||||
"Share": "Compartir",
|
"Share": "Compartir",
|
||||||
"ServerUpdateNeeded": "Este Servidor Emby necesita ser actualizado. Para descargar la ultima versi\u00f3n, por favor visite {0}",
|
"ServerUpdateNeeded": "Este Servidor Emby necesita ser actualizado. Para descargar la ultima versi\u00f3n, por favor visite {0}",
|
||||||
@ -109,10 +111,15 @@
|
|||||||
"Shuffle": "Shuffle",
|
"Shuffle": "Shuffle",
|
||||||
"Identify": "Identify",
|
"Identify": "Identify",
|
||||||
"EditImages": "Edit Images",
|
"EditImages": "Edit Images",
|
||||||
|
"EditInfo": "Edit Info",
|
||||||
"Sync": "Sync",
|
"Sync": "Sync",
|
||||||
"InstantMix": "Instant Mix",
|
"InstantMix": "Instant Mix",
|
||||||
"ViewAlbum": "View Album",
|
"ViewAlbum": "View Album",
|
||||||
"ViewArtist": "View Artist",
|
"ViewArtist": "View Artist",
|
||||||
"QueueAllFromHere": "Queue All from Here",
|
"QueueAllFromHere": "Queue All from Here",
|
||||||
"PlayAllFromHere": "Play All from Here"
|
"PlayAllFromHere": "Play All from Here",
|
||||||
|
"PlayFromBeginning": "Play from beginning",
|
||||||
|
"ResumeAt": "Resume from {0}",
|
||||||
|
"RemoveFromPlaylist": "Remove from Playlist",
|
||||||
|
"Trailer": "Trailer"
|
||||||
}
|
}
|
@ -1,8 +1,10 @@
|
|||||||
{
|
{
|
||||||
"EditInfo": "Modifier les informations",
|
"MarkPlayed": "Mark Played",
|
||||||
"RemoveFromPlaylist": "Supprimer de la liste de lecture",
|
"MarkUnplayed": "Mark Unplayed",
|
||||||
"PlayFromBeginning": "Play from beginning",
|
"GroupVersions": "Group Versions",
|
||||||
"ResumeAt": "Resume from {0}",
|
"PleaseSelectTwoItems": "Please select at least two items.",
|
||||||
|
"TheSelectedItemsWillBeGrouped": "The selected videos will be grouped into one virtual item. Emby apps will automatically choose which version to play based on device and network performance. Are you sure you wish to continue?",
|
||||||
|
"Error": "Error",
|
||||||
"ValueSpecialEpisodeName": "Sp\u00e9cial - {0}",
|
"ValueSpecialEpisodeName": "Sp\u00e9cial - {0}",
|
||||||
"Share": "Partager",
|
"Share": "Partager",
|
||||||
"ServerUpdateNeeded": "Le serveur Emby doit \u00eatre mis \u00e0 jour. Pour t\u00e9l\u00e9charger la derni\u00e8re version, veuillez visiter {0}",
|
"ServerUpdateNeeded": "Le serveur Emby doit \u00eatre mis \u00e0 jour. Pour t\u00e9l\u00e9charger la derni\u00e8re version, veuillez visiter {0}",
|
||||||
@ -109,10 +111,15 @@
|
|||||||
"Shuffle": "Lecture al\u00e9atoire",
|
"Shuffle": "Lecture al\u00e9atoire",
|
||||||
"Identify": "Identifier",
|
"Identify": "Identifier",
|
||||||
"EditImages": "Modifier les images",
|
"EditImages": "Modifier les images",
|
||||||
|
"EditInfo": "Modifier les informations",
|
||||||
"Sync": "Sync",
|
"Sync": "Sync",
|
||||||
"InstantMix": "Mix instantan\u00e9",
|
"InstantMix": "Mix instantan\u00e9",
|
||||||
"ViewAlbum": "Voir l'album",
|
"ViewAlbum": "Voir l'album",
|
||||||
"ViewArtist": "Voir l'artiste",
|
"ViewArtist": "Voir l'artiste",
|
||||||
"QueueAllFromHere": "Tout mette en file d'attente \u00e0 partir d'ici",
|
"QueueAllFromHere": "Tout mette en file d'attente \u00e0 partir d'ici",
|
||||||
"PlayAllFromHere": "Tout lire \u00e0 partir d'ici"
|
"PlayAllFromHere": "Tout lire \u00e0 partir d'ici",
|
||||||
|
"PlayFromBeginning": "Play from beginning",
|
||||||
|
"ResumeAt": "Resume from {0}",
|
||||||
|
"RemoveFromPlaylist": "Supprimer de la liste de lecture",
|
||||||
|
"Trailer": "Trailer"
|
||||||
}
|
}
|
@ -1,8 +1,10 @@
|
|||||||
{
|
{
|
||||||
"EditInfo": "Edit Info",
|
"MarkPlayed": "Mark Played",
|
||||||
"RemoveFromPlaylist": "Remove from Playlist",
|
"MarkUnplayed": "Mark Unplayed",
|
||||||
"PlayFromBeginning": "Play from beginning",
|
"GroupVersions": "Group Versions",
|
||||||
"ResumeAt": "Resume from {0}",
|
"PleaseSelectTwoItems": "Please select at least two items.",
|
||||||
|
"TheSelectedItemsWillBeGrouped": "The selected videos will be grouped into one virtual item. Emby apps will automatically choose which version to play based on device and network performance. Are you sure you wish to continue?",
|
||||||
|
"Error": "Error",
|
||||||
"ValueSpecialEpisodeName": "\u0410\u0440\u043d\u0430\u0439\u044b - {0}",
|
"ValueSpecialEpisodeName": "\u0410\u0440\u043d\u0430\u0439\u044b - {0}",
|
||||||
"Share": "\u041e\u0440\u0442\u0430\u049b\u0442\u0430\u0441\u0443",
|
"Share": "\u041e\u0440\u0442\u0430\u049b\u0442\u0430\u0441\u0443",
|
||||||
"ServerUpdateNeeded": "\u041e\u0441\u044b Emby Server \u0436\u0430\u04a3\u0430\u0440\u0442\u044b\u043b\u0443\u044b \u049b\u0430\u0436\u0435\u0442. \u0421\u043e\u04a3\u0493\u044b \u043d\u04b1\u0441\u049b\u0430\u0441\u044b\u043d \u0436\u04af\u043a\u0442\u0435\u043f \u0430\u043b\u0443 \u04af\u0448\u0456\u043d, {0} \u043a\u0456\u0440\u0456\u04a3\u0456\u0437",
|
"ServerUpdateNeeded": "\u041e\u0441\u044b Emby Server \u0436\u0430\u04a3\u0430\u0440\u0442\u044b\u043b\u0443\u044b \u049b\u0430\u0436\u0435\u0442. \u0421\u043e\u04a3\u0493\u044b \u043d\u04b1\u0441\u049b\u0430\u0441\u044b\u043d \u0436\u04af\u043a\u0442\u0435\u043f \u0430\u043b\u0443 \u04af\u0448\u0456\u043d, {0} \u043a\u0456\u0440\u0456\u04a3\u0456\u0437",
|
||||||
@ -109,10 +111,15 @@
|
|||||||
"Shuffle": "\u0410\u0440\u0430\u043b\u0430\u0441\u0442\u044b\u0440\u0443",
|
"Shuffle": "\u0410\u0440\u0430\u043b\u0430\u0441\u0442\u044b\u0440\u0443",
|
||||||
"Identify": "\u0410\u043d\u044b\u049b\u0442\u0430\u0443",
|
"Identify": "\u0410\u043d\u044b\u049b\u0442\u0430\u0443",
|
||||||
"EditImages": "\u0421\u0443\u0440\u0435\u0442\u0442\u0435\u0440\u0434\u0456 \u04e9\u04a3\u0434\u0435\u0443",
|
"EditImages": "\u0421\u0443\u0440\u0435\u0442\u0442\u0435\u0440\u0434\u0456 \u04e9\u04a3\u0434\u0435\u0443",
|
||||||
|
"EditInfo": "Edit Info",
|
||||||
"Sync": "\u04ae\u043d\u0434\u0435\u0441\u0442\u0456\u0440\u0443",
|
"Sync": "\u04ae\u043d\u0434\u0435\u0441\u0442\u0456\u0440\u0443",
|
||||||
"InstantMix": "\u041b\u0435\u0437\u0434\u0456\u043a \u049b\u043e\u0441\u043f\u0430",
|
"InstantMix": "\u041b\u0435\u0437\u0434\u0456\u043a \u049b\u043e\u0441\u043f\u0430",
|
||||||
"ViewAlbum": "\u0410\u043b\u044c\u0431\u043e\u043c\u0434\u044b \u049b\u0430\u0440\u0430\u0443",
|
"ViewAlbum": "\u0410\u043b\u044c\u0431\u043e\u043c\u0434\u044b \u049b\u0430\u0440\u0430\u0443",
|
||||||
"ViewArtist": "\u041e\u0440\u044b\u043d\u0434\u0430\u0443\u0448\u044b\u043d\u044b \u049b\u0430\u0440\u0430\u0443",
|
"ViewArtist": "\u041e\u0440\u044b\u043d\u0434\u0430\u0443\u0448\u044b\u043d\u044b \u049b\u0430\u0440\u0430\u0443",
|
||||||
"QueueAllFromHere": "\u0411\u04b1\u043b \u0430\u0440\u0430\u0434\u0430\u043d \u0431\u04d9\u0440\u0456\u043d \u043a\u0435\u0437\u0435\u043a\u043a\u0435",
|
"QueueAllFromHere": "\u0411\u04b1\u043b \u0430\u0440\u0430\u0434\u0430\u043d \u0431\u04d9\u0440\u0456\u043d \u043a\u0435\u0437\u0435\u043a\u043a\u0435",
|
||||||
"PlayAllFromHere": "\u0411\u04b1\u043b \u0430\u0440\u0430\u0434\u0430\u043d \u0431\u04d9\u0440\u0456\u043d \u043e\u0439\u043d\u0430\u0442\u0443"
|
"PlayAllFromHere": "\u0411\u04b1\u043b \u0430\u0440\u0430\u0434\u0430\u043d \u0431\u04d9\u0440\u0456\u043d \u043e\u0439\u043d\u0430\u0442\u0443",
|
||||||
|
"PlayFromBeginning": "Play from beginning",
|
||||||
|
"ResumeAt": "Resume from {0}",
|
||||||
|
"RemoveFromPlaylist": "Remove from Playlist",
|
||||||
|
"Trailer": "Trailer"
|
||||||
}
|
}
|
@ -1,8 +1,10 @@
|
|||||||
{
|
{
|
||||||
"EditInfo": "Edit Info",
|
"MarkPlayed": "Mark Played",
|
||||||
"RemoveFromPlaylist": "Remove from Playlist",
|
"MarkUnplayed": "Mark Unplayed",
|
||||||
"PlayFromBeginning": "Play from beginning",
|
"GroupVersions": "Group Versions",
|
||||||
"ResumeAt": "Resume from {0}",
|
"PleaseSelectTwoItems": "Please select at least two items.",
|
||||||
|
"TheSelectedItemsWillBeGrouped": "The selected videos will be grouped into one virtual item. Emby apps will automatically choose which version to play based on device and network performance. Are you sure you wish to continue?",
|
||||||
|
"Error": "Error",
|
||||||
"ValueSpecialEpisodeName": "Spesial - {0}",
|
"ValueSpecialEpisodeName": "Spesial - {0}",
|
||||||
"Share": "Del",
|
"Share": "Del",
|
||||||
"ServerUpdateNeeded": "Denne Emby serveren trenger en oppdatering. For \u00e5 laste ned nyeste versjon, vennligst bes\u00f8k: {0}",
|
"ServerUpdateNeeded": "Denne Emby serveren trenger en oppdatering. For \u00e5 laste ned nyeste versjon, vennligst bes\u00f8k: {0}",
|
||||||
@ -109,10 +111,15 @@
|
|||||||
"Shuffle": "Shuffle",
|
"Shuffle": "Shuffle",
|
||||||
"Identify": "Identify",
|
"Identify": "Identify",
|
||||||
"EditImages": "Edit Images",
|
"EditImages": "Edit Images",
|
||||||
|
"EditInfo": "Edit Info",
|
||||||
"Sync": "Sync",
|
"Sync": "Sync",
|
||||||
"InstantMix": "Instant Mix",
|
"InstantMix": "Instant Mix",
|
||||||
"ViewAlbum": "View Album",
|
"ViewAlbum": "View Album",
|
||||||
"ViewArtist": "View Artist",
|
"ViewArtist": "View Artist",
|
||||||
"QueueAllFromHere": "Queue All from Here",
|
"QueueAllFromHere": "Queue All from Here",
|
||||||
"PlayAllFromHere": "Play All from Here"
|
"PlayAllFromHere": "Play All from Here",
|
||||||
|
"PlayFromBeginning": "Play from beginning",
|
||||||
|
"ResumeAt": "Resume from {0}",
|
||||||
|
"RemoveFromPlaylist": "Remove from Playlist",
|
||||||
|
"Trailer": "Trailer"
|
||||||
}
|
}
|
@ -1,8 +1,10 @@
|
|||||||
{
|
{
|
||||||
"EditInfo": "Info Bewerken",
|
"MarkPlayed": "Mark Played",
|
||||||
"RemoveFromPlaylist": "Verwijderen uit afspeellijst",
|
"MarkUnplayed": "Mark Unplayed",
|
||||||
"PlayFromBeginning": "Play from beginning",
|
"GroupVersions": "Group Versions",
|
||||||
"ResumeAt": "Resume from {0}",
|
"PleaseSelectTwoItems": "Please select at least two items.",
|
||||||
|
"TheSelectedItemsWillBeGrouped": "The selected videos will be grouped into one virtual item. Emby apps will automatically choose which version to play based on device and network performance. Are you sure you wish to continue?",
|
||||||
|
"Error": "Error",
|
||||||
"ValueSpecialEpisodeName": "Speciaal - {0}",
|
"ValueSpecialEpisodeName": "Speciaal - {0}",
|
||||||
"Share": "Delen",
|
"Share": "Delen",
|
||||||
"ServerUpdateNeeded": "Deze Emby Server moet worden bijgewerkt. Om de laatste versie te downloaden, gaat u naar {0}",
|
"ServerUpdateNeeded": "Deze Emby Server moet worden bijgewerkt. Om de laatste versie te downloaden, gaat u naar {0}",
|
||||||
@ -109,10 +111,15 @@
|
|||||||
"Shuffle": "Willekeurig",
|
"Shuffle": "Willekeurig",
|
||||||
"Identify": "Identificeer",
|
"Identify": "Identificeer",
|
||||||
"EditImages": "Bewerk afbeeldingen",
|
"EditImages": "Bewerk afbeeldingen",
|
||||||
|
"EditInfo": "Info Bewerken",
|
||||||
"Sync": "Synchronisatie",
|
"Sync": "Synchronisatie",
|
||||||
"InstantMix": "Instant Mix",
|
"InstantMix": "Instant Mix",
|
||||||
"ViewAlbum": "Bekijk album",
|
"ViewAlbum": "Bekijk album",
|
||||||
"ViewArtist": "Bekijk artiest",
|
"ViewArtist": "Bekijk artiest",
|
||||||
"QueueAllFromHere": "Plaats alles in de wachtrij vanaf hier",
|
"QueueAllFromHere": "Plaats alles in de wachtrij vanaf hier",
|
||||||
"PlayAllFromHere": "Speel alles vanaf hier"
|
"PlayAllFromHere": "Speel alles vanaf hier",
|
||||||
|
"PlayFromBeginning": "Play from beginning",
|
||||||
|
"ResumeAt": "Resume from {0}",
|
||||||
|
"RemoveFromPlaylist": "Verwijderen uit afspeellijst",
|
||||||
|
"Trailer": "Trailer"
|
||||||
}
|
}
|
@ -1,8 +1,10 @@
|
|||||||
{
|
{
|
||||||
"EditInfo": "Editar Informa\u00e7\u00f5es",
|
"MarkPlayed": "Mark Played",
|
||||||
"RemoveFromPlaylist": "Remover da Lista de Reprodu\u00e7\u00e3o",
|
"MarkUnplayed": "Mark Unplayed",
|
||||||
"PlayFromBeginning": "Reproduzir do in\u00edcio",
|
"GroupVersions": "Group Versions",
|
||||||
"ResumeAt": "Retomar de {0}",
|
"PleaseSelectTwoItems": "Please select at least two items.",
|
||||||
|
"TheSelectedItemsWillBeGrouped": "The selected videos will be grouped into one virtual item. Emby apps will automatically choose which version to play based on device and network performance. Are you sure you wish to continue?",
|
||||||
|
"Error": "Error",
|
||||||
"ValueSpecialEpisodeName": "Especial - {0}",
|
"ValueSpecialEpisodeName": "Especial - {0}",
|
||||||
"Share": "Compartilhar",
|
"Share": "Compartilhar",
|
||||||
"ServerUpdateNeeded": "Este servidor Emby precisa ser atualizado. Para baixar a \u00faltima vers\u00e3o, por favor visite {0}",
|
"ServerUpdateNeeded": "Este servidor Emby precisa ser atualizado. Para baixar a \u00faltima vers\u00e3o, por favor visite {0}",
|
||||||
@ -109,10 +111,15 @@
|
|||||||
"Shuffle": "Embaralhar",
|
"Shuffle": "Embaralhar",
|
||||||
"Identify": "Identificar",
|
"Identify": "Identificar",
|
||||||
"EditImages": "Editar Imagens",
|
"EditImages": "Editar Imagens",
|
||||||
|
"EditInfo": "Editar Informa\u00e7\u00f5es",
|
||||||
"Sync": "Sincronizar",
|
"Sync": "Sincronizar",
|
||||||
"InstantMix": "Mix Instant\u00e2neo",
|
"InstantMix": "Mix Instant\u00e2neo",
|
||||||
"ViewAlbum": "Visualizar \u00c1lbum",
|
"ViewAlbum": "Visualizar \u00c1lbum",
|
||||||
"ViewArtist": "Visualizar Artista",
|
"ViewArtist": "Visualizar Artista",
|
||||||
"QueueAllFromHere": "Enfileirar todos daqui",
|
"QueueAllFromHere": "Enfileirar todos daqui",
|
||||||
"PlayAllFromHere": "Reproduzir todos daqui"
|
"PlayAllFromHere": "Reproduzir todos daqui",
|
||||||
|
"PlayFromBeginning": "Reproduzir do in\u00edcio",
|
||||||
|
"ResumeAt": "Retomar de {0}",
|
||||||
|
"RemoveFromPlaylist": "Remover da Lista de Reprodu\u00e7\u00e3o",
|
||||||
|
"Trailer": "Trailer"
|
||||||
}
|
}
|
@ -1,8 +1,10 @@
|
|||||||
{
|
{
|
||||||
"EditInfo": "Edit Info",
|
"MarkPlayed": "Mark Played",
|
||||||
"RemoveFromPlaylist": "Remove from Playlist",
|
"MarkUnplayed": "Mark Unplayed",
|
||||||
"PlayFromBeginning": "Play from beginning",
|
"GroupVersions": "Group Versions",
|
||||||
"ResumeAt": "Resume from {0}",
|
"PleaseSelectTwoItems": "Please select at least two items.",
|
||||||
|
"TheSelectedItemsWillBeGrouped": "The selected videos will be grouped into one virtual item. Emby apps will automatically choose which version to play based on device and network performance. Are you sure you wish to continue?",
|
||||||
|
"Error": "Error",
|
||||||
"ValueSpecialEpisodeName": "Especial - {0}",
|
"ValueSpecialEpisodeName": "Especial - {0}",
|
||||||
"Share": "Partilhar",
|
"Share": "Partilhar",
|
||||||
"ServerUpdateNeeded": "Este Servidor Emby precisa ser atualizado. Para fazer download da vers\u00e3o mais recente, por favor visite {0}",
|
"ServerUpdateNeeded": "Este Servidor Emby precisa ser atualizado. Para fazer download da vers\u00e3o mais recente, por favor visite {0}",
|
||||||
@ -109,10 +111,15 @@
|
|||||||
"Shuffle": "Shuffle",
|
"Shuffle": "Shuffle",
|
||||||
"Identify": "Identify",
|
"Identify": "Identify",
|
||||||
"EditImages": "Edit Images",
|
"EditImages": "Edit Images",
|
||||||
|
"EditInfo": "Edit Info",
|
||||||
"Sync": "Sync",
|
"Sync": "Sync",
|
||||||
"InstantMix": "Instant Mix",
|
"InstantMix": "Instant Mix",
|
||||||
"ViewAlbum": "View Album",
|
"ViewAlbum": "View Album",
|
||||||
"ViewArtist": "View Artist",
|
"ViewArtist": "View Artist",
|
||||||
"QueueAllFromHere": "Queue All from Here",
|
"QueueAllFromHere": "Queue All from Here",
|
||||||
"PlayAllFromHere": "Play All from Here"
|
"PlayAllFromHere": "Play All from Here",
|
||||||
|
"PlayFromBeginning": "Play from beginning",
|
||||||
|
"ResumeAt": "Resume from {0}",
|
||||||
|
"RemoveFromPlaylist": "Remove from Playlist",
|
||||||
|
"Trailer": "Trailer"
|
||||||
}
|
}
|
@ -1,8 +1,10 @@
|
|||||||
{
|
{
|
||||||
"EditInfo": "Edit Info",
|
"MarkPlayed": "Mark Played",
|
||||||
"RemoveFromPlaylist": "Remove from Playlist",
|
"MarkUnplayed": "Mark Unplayed",
|
||||||
"PlayFromBeginning": "Play from beginning",
|
"GroupVersions": "Group Versions",
|
||||||
"ResumeAt": "Resume from {0}",
|
"PleaseSelectTwoItems": "Please select at least two items.",
|
||||||
|
"TheSelectedItemsWillBeGrouped": "The selected videos will be grouped into one virtual item. Emby apps will automatically choose which version to play based on device and network performance. Are you sure you wish to continue?",
|
||||||
|
"Error": "Error",
|
||||||
"ValueSpecialEpisodeName": "\u0421\u043f\u0435\u0446\u044d\u043f\u0438\u0437\u043e\u0434 - {0}",
|
"ValueSpecialEpisodeName": "\u0421\u043f\u0435\u0446\u044d\u043f\u0438\u0437\u043e\u0434 - {0}",
|
||||||
"Share": "\u041f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f",
|
"Share": "\u041f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f",
|
||||||
"ServerUpdateNeeded": "\u0414\u0430\u043d\u043d\u044b\u0439 Emby Server \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043e\u0431\u043d\u043e\u0432\u0438\u0442\u044c. \u0427\u0442\u043e\u0431\u044b \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u044e\u044e \u0432\u0435\u0440\u0441\u0438\u044e, \u043f\u043e\u0441\u0435\u0442\u0438\u0442\u0435 {0}",
|
"ServerUpdateNeeded": "\u0414\u0430\u043d\u043d\u044b\u0439 Emby Server \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043e\u0431\u043d\u043e\u0432\u0438\u0442\u044c. \u0427\u0442\u043e\u0431\u044b \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u044e\u044e \u0432\u0435\u0440\u0441\u0438\u044e, \u043f\u043e\u0441\u0435\u0442\u0438\u0442\u0435 {0}",
|
||||||
@ -109,10 +111,15 @@
|
|||||||
"Shuffle": "\u041f\u0435\u0440\u0435\u043c\u0435\u0448\u0430\u0442\u044c",
|
"Shuffle": "\u041f\u0435\u0440\u0435\u043c\u0435\u0448\u0430\u0442\u044c",
|
||||||
"Identify": "\u0420\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u0442\u044c",
|
"Identify": "\u0420\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u0442\u044c",
|
||||||
"EditImages": "\u041f\u0440\u0430\u0432\u0438\u0442\u044c \u0440\u0438\u0441\u0443\u043d\u043a\u0438",
|
"EditImages": "\u041f\u0440\u0430\u0432\u0438\u0442\u044c \u0440\u0438\u0441\u0443\u043d\u043a\u0438",
|
||||||
|
"EditInfo": "Edit Info",
|
||||||
"Sync": "\u0421\u0438\u043d\u0445\u0440\u043e",
|
"Sync": "\u0421\u0438\u043d\u0445\u0440\u043e",
|
||||||
"InstantMix": "\u0410\u0432\u0442\u043e\u043c\u0438\u043a\u0441",
|
"InstantMix": "\u0410\u0432\u0442\u043e\u043c\u0438\u043a\u0441",
|
||||||
"ViewAlbum": "\u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0430\u043b\u044c\u0431\u043e\u043c",
|
"ViewAlbum": "\u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0430\u043b\u044c\u0431\u043e\u043c",
|
||||||
"ViewArtist": "\u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044f",
|
"ViewArtist": "\u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044f",
|
||||||
"QueueAllFromHere": "\u0412 \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u0432\u0441\u0435 \u043e\u0442\u0441\u044e\u0434\u0430",
|
"QueueAllFromHere": "\u0412 \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u0432\u0441\u0435 \u043e\u0442\u0441\u044e\u0434\u0430",
|
||||||
"PlayAllFromHere": "\u0412\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0441\u0442\u0438 \u0432\u0441\u0435 \u043e\u0442\u0441\u044e\u0434\u0430"
|
"PlayAllFromHere": "\u0412\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0441\u0442\u0438 \u0432\u0441\u0435 \u043e\u0442\u0441\u044e\u0434\u0430",
|
||||||
|
"PlayFromBeginning": "Play from beginning",
|
||||||
|
"ResumeAt": "Resume from {0}",
|
||||||
|
"RemoveFromPlaylist": "Remove from Playlist",
|
||||||
|
"Trailer": "Trailer"
|
||||||
}
|
}
|
@ -1,8 +1,10 @@
|
|||||||
{
|
{
|
||||||
"EditInfo": "Edit Info",
|
"MarkPlayed": "Mark Played",
|
||||||
"RemoveFromPlaylist": "Remove from Playlist",
|
"MarkUnplayed": "Mark Unplayed",
|
||||||
"PlayFromBeginning": "Play from beginning",
|
"GroupVersions": "Group Versions",
|
||||||
"ResumeAt": "Resume from {0}",
|
"PleaseSelectTwoItems": "Please select at least two items.",
|
||||||
|
"TheSelectedItemsWillBeGrouped": "The selected videos will be grouped into one virtual item. Emby apps will automatically choose which version to play based on device and network performance. Are you sure you wish to continue?",
|
||||||
|
"Error": "Error",
|
||||||
"ValueSpecialEpisodeName": "Special - {0}",
|
"ValueSpecialEpisodeName": "Special - {0}",
|
||||||
"Share": "\u5206\u4eab",
|
"Share": "\u5206\u4eab",
|
||||||
"ServerUpdateNeeded": "\u6b64Emby\u4f3a\u670d\u5668\u9700\u8981\u66f4\u65b0\uff0c\u8acb\u81f3{0}\u53d6\u5f97\u6700\u65b0\u7248\u672c",
|
"ServerUpdateNeeded": "\u6b64Emby\u4f3a\u670d\u5668\u9700\u8981\u66f4\u65b0\uff0c\u8acb\u81f3{0}\u53d6\u5f97\u6700\u65b0\u7248\u672c",
|
||||||
@ -109,10 +111,15 @@
|
|||||||
"Shuffle": "Shuffle",
|
"Shuffle": "Shuffle",
|
||||||
"Identify": "Identify",
|
"Identify": "Identify",
|
||||||
"EditImages": "Edit Images",
|
"EditImages": "Edit Images",
|
||||||
|
"EditInfo": "Edit Info",
|
||||||
"Sync": "Sync",
|
"Sync": "Sync",
|
||||||
"InstantMix": "Instant Mix",
|
"InstantMix": "Instant Mix",
|
||||||
"ViewAlbum": "View Album",
|
"ViewAlbum": "View Album",
|
||||||
"ViewArtist": "View Artist",
|
"ViewArtist": "View Artist",
|
||||||
"QueueAllFromHere": "Queue All from Here",
|
"QueueAllFromHere": "Queue All from Here",
|
||||||
"PlayAllFromHere": "Play All from Here"
|
"PlayAllFromHere": "Play All from Here",
|
||||||
|
"PlayFromBeginning": "Play from beginning",
|
||||||
|
"ResumeAt": "Resume from {0}",
|
||||||
|
"RemoveFromPlaylist": "Remove from Playlist",
|
||||||
|
"Trailer": "Trailer"
|
||||||
}
|
}
|
@ -1,4 +1,4 @@
|
|||||||
define(['browser', 'datetime', 'libraryBrowser', 'listView'], function (browser, datetime, libraryBrowser, listView) {
|
define(['browser', 'datetime', 'libraryBrowser', 'listView', 'userdataButtons'], function (browser, datetime, libraryBrowser, listView, userdataButtons) {
|
||||||
|
|
||||||
function showSlideshowMenu(context) {
|
function showSlideshowMenu(context) {
|
||||||
require(['scripts/slideshow'], function () {
|
require(['scripts/slideshow'], function () {
|
||||||
@ -202,7 +202,11 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
ApiClient.getItem(Dashboard.getCurrentUserId(), item.Id).then(function (fullItem) {
|
ApiClient.getItem(Dashboard.getCurrentUserId(), item.Id).then(function (fullItem) {
|
||||||
context.querySelector('.nowPlayingPageUserDataButtons').innerHTML = libraryBrowser.getUserDataIconsHtml(fullItem, false);
|
context.querySelector('.nowPlayingPageUserDataButtons').innerHTML = userdataButtons.getIconsHtml({
|
||||||
|
item: fullItem,
|
||||||
|
includePlayed: false,
|
||||||
|
style: 'fab-mini'
|
||||||
|
});
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
context.querySelector('.nowPlayingPageUserDataButtons').innerHTML = '';
|
context.querySelector('.nowPlayingPageUserDataButtons').innerHTML = '';
|
||||||
|
@ -1030,54 +1030,6 @@ span.itemCommunityRating:not(:empty) + .userDataIcons {
|
|||||||
right: 20px;
|
right: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.selectedCharacter {
|
|
||||||
color: #52B54B !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.itemOverlayHtml {
|
|
||||||
max-height: 100px;
|
|
||||||
margin-top: 1.5em;
|
|
||||||
overflow: hidden;
|
|
||||||
text-overflow: ellipsis;
|
|
||||||
}
|
|
||||||
|
|
||||||
.itemSelectionPanel {
|
|
||||||
position: absolute;
|
|
||||||
bottom: 0;
|
|
||||||
left: 0;
|
|
||||||
right: 0;
|
|
||||||
top: 0;
|
|
||||||
background-color: rgba(0, 0, 0, .3);
|
|
||||||
z-index: 999;
|
|
||||||
border: 1px solid #43A047;
|
|
||||||
}
|
|
||||||
|
|
||||||
.itemSelectionPanel #checkbox {
|
|
||||||
border-radius: 0 !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.selectionCommandsPanel {
|
|
||||||
position: fixed;
|
|
||||||
top: 0;
|
|
||||||
left: 0;
|
|
||||||
right: 0;
|
|
||||||
height: 50px;
|
|
||||||
background: #43A047;
|
|
||||||
z-index: 1000;
|
|
||||||
padding: 0 .75em 0 .25em;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
color: #fff;
|
|
||||||
}
|
|
||||||
|
|
||||||
.itemSelectionCount {
|
|
||||||
font-size: 28px;
|
|
||||||
vertical-align: middle;
|
|
||||||
color: #fff;
|
|
||||||
display: inline-block;
|
|
||||||
padding-top: 1px;
|
|
||||||
}
|
|
||||||
|
|
||||||
@media all and (max-height: 480px) {
|
@media all and (max-height: 480px) {
|
||||||
|
|
||||||
.alphabetPicker {
|
.alphabetPicker {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
define(['layoutManager', 'datetime', 'mediaInfo', 'backdrop', 'listView', 'itemContextMenu', 'itemHelper', 'scrollStyles', 'emby-itemscontainer'], function (layoutManager, datetime, mediaInfo, backdrop, listView, itemContextMenu, itemHelper) {
|
define(['layoutManager', 'datetime', 'mediaInfo', 'backdrop', 'listView', 'itemContextMenu', 'itemHelper', 'userdataButtons', 'scrollStyles', 'emby-itemscontainer'], function (layoutManager, datetime, mediaInfo, backdrop, listView, itemContextMenu, itemHelper, userdataButtons) {
|
||||||
|
|
||||||
var currentItem;
|
var currentItem;
|
||||||
|
|
||||||
@ -1161,7 +1161,10 @@
|
|||||||
|
|
||||||
var userDataIcons = page.querySelectorAll('.userDataIcons');
|
var userDataIcons = page.querySelectorAll('.userDataIcons');
|
||||||
|
|
||||||
var html = LibraryBrowser.getUserDataIconsHtml(item, true, 'icon-button');
|
var html = userdataButtons.getIconsHtml({
|
||||||
|
item: item,
|
||||||
|
style: 'fab-mini'
|
||||||
|
});
|
||||||
|
|
||||||
for (var i = 0, length = userDataIcons.length; i < length; i++) {
|
for (var i = 0, length = userDataIcons.length; i < length; i++) {
|
||||||
userDataIcons[i].innerHTML = html;
|
userDataIcons[i].innerHTML = html;
|
||||||
@ -1973,17 +1976,6 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function onItemDeleted(e, itemId) {
|
|
||||||
|
|
||||||
if (currentItem && currentItem.Id == itemId) {
|
|
||||||
if (currentItem.Type == 'Recording') {
|
|
||||||
LibraryBrowser.showTab('livetv.html', 3);
|
|
||||||
} else {
|
|
||||||
Dashboard.navigate('home.html');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function showPlayMenu(item, target) {
|
function showPlayMenu(item, target) {
|
||||||
|
|
||||||
require(['playMenu'], function (playMenu) {
|
require(['playMenu'], function (playMenu) {
|
||||||
@ -2218,12 +2210,9 @@
|
|||||||
reload(page, params);
|
reload(page, params);
|
||||||
|
|
||||||
Events.on(ApiClient, 'websocketmessage', onWebSocketMessage);
|
Events.on(ApiClient, 'websocketmessage', onWebSocketMessage);
|
||||||
|
|
||||||
Events.on(LibraryBrowser, 'itemdeleting', onItemDeleted);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
view.addEventListener('viewbeforehide', function () {
|
view.addEventListener('viewbeforehide', function () {
|
||||||
Events.off(LibraryBrowser, 'itemdeleting', onItemDeleted);
|
|
||||||
|
|
||||||
currentItem = null;
|
currentItem = null;
|
||||||
|
|
||||||
|
@ -577,34 +577,6 @@
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
deleteItems: function (itemIds) {
|
|
||||||
|
|
||||||
return new Promise(function (resolve, reject) {
|
|
||||||
|
|
||||||
var msg = Globalize.translate('ConfirmDeleteItem');
|
|
||||||
var title = Globalize.translate('HeaderDeleteItem');
|
|
||||||
|
|
||||||
if (itemIds.length > 1) {
|
|
||||||
msg = Globalize.translate('ConfirmDeleteItems');
|
|
||||||
title = Globalize.translate('HeaderDeleteItems');
|
|
||||||
}
|
|
||||||
|
|
||||||
require(['confirm'], function (confirm) {
|
|
||||||
|
|
||||||
confirm(msg, title).then(function () {
|
|
||||||
|
|
||||||
var promises = itemIds.map(function (itemId) {
|
|
||||||
ApiClient.deleteItem(itemId);
|
|
||||||
Events.trigger(LibraryBrowser, 'itemdeleting', [itemId]);
|
|
||||||
});
|
|
||||||
|
|
||||||
resolve();
|
|
||||||
}, reject);
|
|
||||||
|
|
||||||
});
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
editImages: function (itemId) {
|
editImages: function (itemId) {
|
||||||
|
|
||||||
return new Promise(function (resolve, reject) {
|
return new Promise(function (resolve, reject) {
|
||||||
@ -2265,80 +2237,6 @@
|
|||||||
return null;
|
return null;
|
||||||
},
|
},
|
||||||
|
|
||||||
getUserDataButtonHtml: function (method, itemId, btnCssClass, icon, tooltip, style) {
|
|
||||||
|
|
||||||
if (style == 'fab') {
|
|
||||||
|
|
||||||
var tagName = 'paper-fab';
|
|
||||||
return '<' + tagName + ' title="' + tooltip + '" data-id="' + itemId + '" icon="' + icon + '" class="' + btnCssClass + '" onclick="LibraryBrowser.' + method + '(this);return false;"></' + tagName + '>';
|
|
||||||
}
|
|
||||||
|
|
||||||
return '<button is="paper-icon-button-light" title="' + tooltip + '" data-id="' + itemId + '" class="autoSize ' + btnCssClass + '" onclick="LibraryBrowser.' + method + '(this);return false;"><i class="md-icon">' + icon + '</i></button>';
|
|
||||||
},
|
|
||||||
|
|
||||||
getUserDataIconsHtml: function (item, includePlayed, style) {
|
|
||||||
|
|
||||||
var html = '';
|
|
||||||
|
|
||||||
var userData = item.UserData || {};
|
|
||||||
|
|
||||||
var itemId = item.Id;
|
|
||||||
|
|
||||||
if (includePlayed !== false) {
|
|
||||||
var tooltipPlayed = Globalize.translate('TooltipPlayed');
|
|
||||||
|
|
||||||
if (item.MediaType == 'Video' || item.Type == 'Series' || item.Type == 'Season' || item.Type == 'BoxSet' || item.Type == 'Playlist') {
|
|
||||||
if (item.Type != 'TvChannel') {
|
|
||||||
if (userData.Played) {
|
|
||||||
html += LibraryBrowser.getUserDataButtonHtml('markPlayed', itemId, 'btnUserItemRating btnUserItemRatingOn', 'check', tooltipPlayed, style);
|
|
||||||
} else {
|
|
||||||
html += LibraryBrowser.getUserDataButtonHtml('markPlayed', itemId, 'btnUserItemRating', 'check', tooltipPlayed, style);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
var tooltipFavorite = Globalize.translate('TooltipFavorite');
|
|
||||||
if (userData.IsFavorite) {
|
|
||||||
|
|
||||||
html += LibraryBrowser.getUserDataButtonHtml('markFavorite', itemId, 'btnUserItemRating btnUserItemRatingOn', 'favorite', tooltipFavorite, style);
|
|
||||||
} else {
|
|
||||||
html += LibraryBrowser.getUserDataButtonHtml('markFavorite', itemId, 'btnUserItemRating', 'favorite', tooltipFavorite, style);
|
|
||||||
}
|
|
||||||
|
|
||||||
return html;
|
|
||||||
},
|
|
||||||
|
|
||||||
markPlayed: function (link) {
|
|
||||||
|
|
||||||
var id = link.getAttribute('data-id');
|
|
||||||
|
|
||||||
var markAsPlayed = !link.classList.contains('btnUserItemRatingOn');
|
|
||||||
|
|
||||||
if (markAsPlayed) {
|
|
||||||
ApiClient.markPlayed(Dashboard.getCurrentUserId(), id);
|
|
||||||
link.classList.add('btnUserItemRatingOn');
|
|
||||||
} else {
|
|
||||||
ApiClient.markUnplayed(Dashboard.getCurrentUserId(), id);
|
|
||||||
link.classList.remove('btnUserItemRatingOn');
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
markFavorite: function (link) {
|
|
||||||
|
|
||||||
var id = link.getAttribute('data-id');
|
|
||||||
|
|
||||||
var markAsFavorite = !link.classList.contains('btnUserItemRatingOn');
|
|
||||||
|
|
||||||
ApiClient.updateFavoriteStatus(Dashboard.getCurrentUserId(), id, markAsFavorite);
|
|
||||||
|
|
||||||
if (markAsFavorite) {
|
|
||||||
link.classList.add('btnUserItemRatingOn');
|
|
||||||
} else {
|
|
||||||
link.classList.remove('btnUserItemRatingOn');
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
renderDetailImage: function (elem, item, editable, preferThumb) {
|
renderDetailImage: function (elem, item, editable, preferThumb) {
|
||||||
|
|
||||||
var imageTags = item.ImageTags || {};
|
var imageTags = item.ImageTags || {};
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
define(['appSettings', 'appStorage', 'libraryBrowser', 'apphost', 'itemHelper'], function (appSettings, appStorage, LibraryBrowser, appHost, itemHelper) {
|
define(['libraryBrowser', 'itemHelper'], function (libraryBrowser, itemHelper) {
|
||||||
|
|
||||||
function isClickable(target) {
|
function isClickable(target) {
|
||||||
|
|
||||||
@ -56,7 +56,7 @@
|
|||||||
ApiClient.getJSON(ApiClient.getUrl('Users/' + userId + '/Items/Latest', options)).then(function (items) {
|
ApiClient.getJSON(ApiClient.getUrl('Users/' + userId + '/Items/Latest', options)).then(function (items) {
|
||||||
|
|
||||||
if (items.length == 1) {
|
if (items.length == 1) {
|
||||||
Dashboard.navigate(LibraryBrowser.getHref(items[0], context));
|
Dashboard.navigate(libraryBrowser.getHref(items[0], context));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -86,450 +86,12 @@
|
|||||||
return elem;
|
return elem;
|
||||||
}
|
}
|
||||||
|
|
||||||
LibraryBrowser.createCardMenus = function (curr, options) {
|
libraryBrowser.createCardMenus = function (curr, options) {
|
||||||
|
|
||||||
curr.removeEventListener('click', onCardClick);
|
curr.removeEventListener('click', onCardClick);
|
||||||
curr.addEventListener('click', onCardClick);
|
curr.addEventListener('click', onCardClick);
|
||||||
|
|
||||||
//initTapHoldMenus(curr);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
function initTapHoldMenus(elem) {
|
|
||||||
|
|
||||||
if (elem.classList.contains('itemsContainer')) {
|
|
||||||
initTapHold(elem);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
var elems = elem.querySelectorAll('.itemsContainer');
|
|
||||||
|
|
||||||
for (var i = 0, length = elems.length; i < length; i++) {
|
|
||||||
initTapHold(elems[i]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function initTapHold(element) {
|
|
||||||
|
|
||||||
if (!LibraryBrowser.allowSwipe(element)) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (element.classList.contains('hasTapHold')) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
require(['hammer'], function (Hammer) {
|
|
||||||
|
|
||||||
var manager = new Hammer.Manager(element);
|
|
||||||
|
|
||||||
var press = new Hammer.Press({
|
|
||||||
time: 500
|
|
||||||
});
|
|
||||||
|
|
||||||
manager.add(press);
|
|
||||||
|
|
||||||
//var hammertime = new Hammer(element);
|
|
||||||
element.classList.add('hasTapHold');
|
|
||||||
|
|
||||||
manager.on('press', onTapHold);
|
|
||||||
});
|
|
||||||
|
|
||||||
showTapHoldHelp(element);
|
|
||||||
}
|
|
||||||
|
|
||||||
function showTapHoldHelp(element) {
|
|
||||||
|
|
||||||
var page = parentWithClass(element, 'page');
|
|
||||||
|
|
||||||
if (!page) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Don't do this on the home page
|
|
||||||
if (page.classList.contains('homePage') || page.classList.contains('itemDetailPage') || page.classList.contains('liveTvPage')) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
var expectedValue = "8";
|
|
||||||
if (appStorage.getItem("tapholdhelp") == expectedValue) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
appStorage.setItem("tapholdhelp", expectedValue);
|
|
||||||
|
|
||||||
Dashboard.alert({
|
|
||||||
message: Globalize.translate('TryMultiSelectMessage'),
|
|
||||||
title: Globalize.translate('HeaderTryMultiSelect')
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
function onTapHold(e) {
|
|
||||||
|
|
||||||
var card = parentWithClass(e.target, 'card');
|
|
||||||
|
|
||||||
if (card) {
|
|
||||||
|
|
||||||
showSelections(card);
|
|
||||||
|
|
||||||
// It won't have this if it's a hammer event
|
|
||||||
if (e.stopPropagation) {
|
|
||||||
e.stopPropagation();
|
|
||||||
}
|
|
||||||
e.preventDefault();
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
e.preventDefault();
|
|
||||||
// It won't have this if it's a hammer event
|
|
||||||
if (e.stopPropagation) {
|
|
||||||
e.stopPropagation();
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
function onItemSelectionPanelClick(e, itemSelectionPanel) {
|
|
||||||
|
|
||||||
// toggle the checkbox, if it wasn't clicked on
|
|
||||||
if (!parentWithClass(e.target, 'chkItemSelect')) {
|
|
||||||
var chkItemSelect = itemSelectionPanel.querySelector('.chkItemSelect');
|
|
||||||
|
|
||||||
if (chkItemSelect) {
|
|
||||||
|
|
||||||
if (chkItemSelect.classList.contains('checkedInitial')) {
|
|
||||||
chkItemSelect.classList.remove('checkedInitial');
|
|
||||||
} else {
|
|
||||||
var newValue = !chkItemSelect.checked;
|
|
||||||
chkItemSelect.checked = newValue;
|
|
||||||
updateItemSelection(chkItemSelect, newValue);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
e.preventDefault();
|
|
||||||
e.stopPropagation();
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
function onSelectionChange(e) {
|
|
||||||
updateItemSelection(this, this.checked);
|
|
||||||
}
|
|
||||||
|
|
||||||
function showSelection(item, isChecked) {
|
|
||||||
|
|
||||||
var itemSelectionPanel = item.querySelector('.itemSelectionPanel');
|
|
||||||
|
|
||||||
if (!itemSelectionPanel) {
|
|
||||||
|
|
||||||
itemSelectionPanel = document.createElement('div');
|
|
||||||
itemSelectionPanel.classList.add('itemSelectionPanel');
|
|
||||||
|
|
||||||
item.querySelector('.cardContent').appendChild(itemSelectionPanel);
|
|
||||||
|
|
||||||
var cssClass = 'chkItemSelect';
|
|
||||||
if (isChecked && !browserInfo.firefox) {
|
|
||||||
// In firefox, the initial tap hold doesnt' get treated as a click
|
|
||||||
// In other browsers it does, so we need to make sure that initial click is ignored
|
|
||||||
cssClass += ' checkedInitial';
|
|
||||||
}
|
|
||||||
var checkedAttribute = isChecked ? ' checked' : '';
|
|
||||||
itemSelectionPanel.innerHTML = '<label class="checkboxContainer"><input type="checkbox" is="emby-checkbox" class="' + cssClass + '"' + checkedAttribute + '/><span></span></label>>';
|
|
||||||
var chkItemSelect = itemSelectionPanel.querySelector('.chkItemSelect');
|
|
||||||
chkItemSelect.addEventListener('change', onSelectionChange);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function showSelectionCommands() {
|
|
||||||
|
|
||||||
var selectionCommandsPanel = document.querySelector('.selectionCommandsPanel');
|
|
||||||
|
|
||||||
if (!selectionCommandsPanel) {
|
|
||||||
|
|
||||||
selectionCommandsPanel = document.createElement('div');
|
|
||||||
selectionCommandsPanel.classList.add('selectionCommandsPanel');
|
|
||||||
|
|
||||||
document.body.appendChild(selectionCommandsPanel);
|
|
||||||
|
|
||||||
var html = '';
|
|
||||||
|
|
||||||
html += '<div style="float:left;">';
|
|
||||||
html += '<button is="paper-icon-button-light" class="btnCloseSelectionPanel autoSize"><i class="md-icon">close</i></button>';
|
|
||||||
html += '<span class="itemSelectionCount"></span>';
|
|
||||||
html += '</div>';
|
|
||||||
|
|
||||||
html += '<button is="paper-icon-button-light" class="btnSelectionPanelOptions autoSize" style="margin-left:auto;"><i class="md-icon">more_vert</i></button>';
|
|
||||||
|
|
||||||
selectionCommandsPanel.innerHTML = html;
|
|
||||||
|
|
||||||
selectionCommandsPanel.querySelector('.btnCloseSelectionPanel').addEventListener('click', hideSelections);
|
|
||||||
|
|
||||||
var btnSelectionPanelOptions = selectionCommandsPanel.querySelector('.btnSelectionPanelOptions');
|
|
||||||
|
|
||||||
btnSelectionPanelOptions.addEventListener('click', showMenuForSelectedItems);
|
|
||||||
|
|
||||||
if (!browserInfo.mobile) {
|
|
||||||
shake(btnSelectionPanelOptions, 1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function shake(elem, iterations) {
|
|
||||||
var keyframes = [
|
|
||||||
{ transform: 'translate3d(0, 0, 0)', offset: 0 },
|
|
||||||
{ transform: 'translate3d(-10px, 0, 0)', offset: 0.1 },
|
|
||||||
{ transform: 'translate3d(10px, 0, 0)', offset: 0.2 },
|
|
||||||
{ transform: 'translate3d(-10px, 0, 0)', offset: 0.3 },
|
|
||||||
{ transform: 'translate3d(10px, 0, 0)', offset: 0.4 },
|
|
||||||
{ transform: 'translate3d(-10px, 0, 0)', offset: 0.5 },
|
|
||||||
{ transform: 'translate3d(10px, 0, 0)', offset: 0.6 },
|
|
||||||
{ transform: 'translate3d(-10px, 0, 0)', offset: 0.7 },
|
|
||||||
{ transform: 'translate3d(10px, 0, 0)', offset: 0.8 },
|
|
||||||
{ transform: 'translate3d(-10px, 0, 0)', offset: 0.9 },
|
|
||||||
{ transform: 'translate3d(0, 0, 0)', offset: 1 }];
|
|
||||||
var timing = { duration: 900, iterations: iterations };
|
|
||||||
|
|
||||||
if (elem.animate) {
|
|
||||||
elem.animate(keyframes, timing);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function showSelections(initialCard) {
|
|
||||||
|
|
||||||
require(['emby-checkbox'], function () {
|
|
||||||
var cards = document.querySelectorAll('.card');
|
|
||||||
for (var i = 0, length = cards.length; i < length; i++) {
|
|
||||||
showSelection(cards[i], initialCard == cards[i]);
|
|
||||||
}
|
|
||||||
|
|
||||||
showSelectionCommands();
|
|
||||||
updateItemSelection(initialCard, true);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
function hideSelections() {
|
|
||||||
|
|
||||||
var selectionCommandsPanel = document.querySelector('.selectionCommandsPanel');
|
|
||||||
if (selectionCommandsPanel) {
|
|
||||||
|
|
||||||
selectionCommandsPanel.parentNode.removeChild(selectionCommandsPanel);
|
|
||||||
|
|
||||||
selectedItems = [];
|
|
||||||
var elems = document.querySelectorAll('.itemSelectionPanel');
|
|
||||||
for (var i = 0, length = elems.length; i < length; i++) {
|
|
||||||
elems[i].parentNode.removeChild(elems[i]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
var selectedItems = [];
|
|
||||||
function updateItemSelection(chkItemSelect, selected) {
|
|
||||||
|
|
||||||
var id = parentWithClass(chkItemSelect, 'card').getAttribute('data-id');
|
|
||||||
|
|
||||||
if (selected) {
|
|
||||||
|
|
||||||
var current = selectedItems.filter(function (i) {
|
|
||||||
return i == id;
|
|
||||||
});
|
|
||||||
|
|
||||||
if (!current.length) {
|
|
||||||
selectedItems.push(id);
|
|
||||||
}
|
|
||||||
|
|
||||||
} else {
|
|
||||||
selectedItems = selectedItems.filter(function (i) {
|
|
||||||
return i != id;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
if (selectedItems.length) {
|
|
||||||
var itemSelectionCount = document.querySelector('.itemSelectionCount');
|
|
||||||
if (itemSelectionCount) {
|
|
||||||
itemSelectionCount.innerHTML = selectedItems.length;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
hideSelections();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function showMenuForSelectedItems(e) {
|
|
||||||
|
|
||||||
Dashboard.getCurrentUser().then(function (user) {
|
|
||||||
|
|
||||||
var items = [];
|
|
||||||
|
|
||||||
items.push({
|
|
||||||
name: Globalize.translate('ButtonAddToCollection'),
|
|
||||||
id: 'addtocollection',
|
|
||||||
ironIcon: 'add'
|
|
||||||
});
|
|
||||||
|
|
||||||
items.push({
|
|
||||||
name: Globalize.translate('ButtonAddToPlaylist'),
|
|
||||||
id: 'playlist',
|
|
||||||
ironIcon: 'playlist-add'
|
|
||||||
});
|
|
||||||
|
|
||||||
if (user.Policy.EnableContentDeletion) {
|
|
||||||
items.push({
|
|
||||||
name: Globalize.translate('ButtonDelete'),
|
|
||||||
id: 'delete',
|
|
||||||
ironIcon: 'delete'
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
if (user.Policy.EnableContentDownloading && appHost.supports('filedownload')) {
|
|
||||||
//items.push({
|
|
||||||
// name: Globalize.translate('ButtonDownload'),
|
|
||||||
// id: 'download',
|
|
||||||
// ironIcon: 'file-download'
|
|
||||||
//});
|
|
||||||
}
|
|
||||||
|
|
||||||
items.push({
|
|
||||||
name: Globalize.translate('HeaderGroupVersions'),
|
|
||||||
id: 'groupvideos',
|
|
||||||
ironIcon: 'call-merge'
|
|
||||||
});
|
|
||||||
|
|
||||||
items.push({
|
|
||||||
name: Globalize.translate('MarkPlayed'),
|
|
||||||
id: 'markplayed'
|
|
||||||
});
|
|
||||||
|
|
||||||
items.push({
|
|
||||||
name: Globalize.translate('MarkUnplayed'),
|
|
||||||
id: 'markunplayed'
|
|
||||||
});
|
|
||||||
|
|
||||||
items.push({
|
|
||||||
name: Globalize.translate('ButtonRefresh'),
|
|
||||||
id: 'refresh',
|
|
||||||
ironIcon: 'refresh'
|
|
||||||
});
|
|
||||||
|
|
||||||
items.push({
|
|
||||||
name: Globalize.translate('ButtonSync'),
|
|
||||||
id: 'sync',
|
|
||||||
ironIcon: 'sync'
|
|
||||||
});
|
|
||||||
|
|
||||||
require(['actionsheet'], function (actionsheet) {
|
|
||||||
|
|
||||||
actionsheet.show({
|
|
||||||
items: items,
|
|
||||||
positionTo: e.target,
|
|
||||||
callback: function (id) {
|
|
||||||
|
|
||||||
var items = selectedItems.slice(0);
|
|
||||||
var serverId = ApiClient.serverInfo().Id;
|
|
||||||
|
|
||||||
switch (id) {
|
|
||||||
|
|
||||||
case 'addtocollection':
|
|
||||||
require(['collectionEditor'], function (collectionEditor) {
|
|
||||||
|
|
||||||
new collectionEditor().show({
|
|
||||||
items: items,
|
|
||||||
serverId: serverId
|
|
||||||
});
|
|
||||||
});
|
|
||||||
hideSelections();
|
|
||||||
break;
|
|
||||||
case 'playlist':
|
|
||||||
require(['playlistEditor'], function (playlistEditor) {
|
|
||||||
new playlistEditor().show({
|
|
||||||
items: items,
|
|
||||||
serverId: serverId
|
|
||||||
});
|
|
||||||
});
|
|
||||||
hideSelections();
|
|
||||||
break;
|
|
||||||
case 'delete':
|
|
||||||
LibraryBrowser.deleteItems(items).then(function () {
|
|
||||||
Dashboard.navigate('home.html');
|
|
||||||
});
|
|
||||||
hideSelections();
|
|
||||||
break;
|
|
||||||
case 'groupvideos':
|
|
||||||
combineVersions(parentWithClass(e.target, 'page'), items);
|
|
||||||
break;
|
|
||||||
case 'markplayed':
|
|
||||||
items.forEach(function (itemId) {
|
|
||||||
ApiClient.markPlayed(Dashboard.getCurrentUserId(), itemId);
|
|
||||||
});
|
|
||||||
hideSelections();
|
|
||||||
break;
|
|
||||||
case 'markunplayed':
|
|
||||||
items.forEach(function (itemId) {
|
|
||||||
ApiClient.markUnplayed(Dashboard.getCurrentUserId(), itemId);
|
|
||||||
});
|
|
||||||
hideSelections();
|
|
||||||
break;
|
|
||||||
case 'refresh':
|
|
||||||
require(['refreshDialog'], function (refreshDialog) {
|
|
||||||
new refreshDialog({
|
|
||||||
itemIds: items,
|
|
||||||
serverId: serverId
|
|
||||||
}).show();
|
|
||||||
});
|
|
||||||
hideSelections();
|
|
||||||
break;
|
|
||||||
case 'sync':
|
|
||||||
require(['syncDialog'], function (syncDialog) {
|
|
||||||
syncDialog.showMenu({
|
|
||||||
items: items.map(function (i) {
|
|
||||||
return {
|
|
||||||
Id: i
|
|
||||||
};
|
|
||||||
})
|
|
||||||
});
|
|
||||||
});
|
|
||||||
hideSelections();
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
function combineVersions(page, selection) {
|
|
||||||
|
|
||||||
if (selection.length < 2) {
|
|
||||||
|
|
||||||
Dashboard.alert({
|
|
||||||
message: Globalize.translate('MessagePleaseSelectTwoItems'),
|
|
||||||
title: Globalize.translate('HeaderError')
|
|
||||||
});
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
var msg = Globalize.translate('MessageTheSelectedItemsWillBeGrouped');
|
|
||||||
|
|
||||||
require(['confirm'], function (confirm) {
|
|
||||||
|
|
||||||
confirm(msg, Globalize.translate('HeaderGroupVersions')).then(function () {
|
|
||||||
|
|
||||||
Dashboard.showLoadingMsg();
|
|
||||||
|
|
||||||
ApiClient.ajax({
|
|
||||||
|
|
||||||
type: "POST",
|
|
||||||
url: ApiClient.getUrl("Videos/MergeVersions", { Ids: selection.join(',') })
|
|
||||||
|
|
||||||
}).then(function () {
|
|
||||||
|
|
||||||
Dashboard.hideLoadingMsg();
|
|
||||||
hideSelections();
|
|
||||||
page.querySelector('.itemsContainer').dispatchEvent(new CustomEvent('needsrefresh', {}));
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
function showSyncButtonsPerUser(page) {
|
function showSyncButtonsPerUser(page) {
|
||||||
|
|
||||||
var apiClient = window.ApiClient;
|
var apiClient = window.ApiClient;
|
||||||
@ -587,12 +149,4 @@
|
|||||||
showSyncButtonsPerUser(page);
|
showSyncButtonsPerUser(page);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
pageClassOn('pagebeforehide', "libraryPage", function () {
|
|
||||||
|
|
||||||
var page = this;
|
|
||||||
|
|
||||||
hideSelections();
|
|
||||||
});
|
|
||||||
|
|
||||||
});
|
});
|
@ -1,4 +1,4 @@
|
|||||||
define(['datetime', 'paper-icon-button-light'], function (datetime) {
|
define(['datetime', 'userdataButtons', 'paper-icon-button-light'], function (datetime, userdataButtons) {
|
||||||
|
|
||||||
var currentPlayer;
|
var currentPlayer;
|
||||||
|
|
||||||
@ -572,7 +572,10 @@
|
|||||||
|
|
||||||
if (nowPlayingItem.Id) {
|
if (nowPlayingItem.Id) {
|
||||||
ApiClient.getItem(Dashboard.getCurrentUserId(), nowPlayingItem.Id).then(function (item) {
|
ApiClient.getItem(Dashboard.getCurrentUserId(), nowPlayingItem.Id).then(function (item) {
|
||||||
nowPlayingUserData.innerHTML = LibraryBrowser.getUserDataIconsHtml(item, false);
|
nowPlayingUserData.innerHTML = userdataButtons.getIconsHtml({
|
||||||
|
item: item,
|
||||||
|
includePlayed: false
|
||||||
|
});
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
nowPlayingUserData.innerHTML = '';
|
nowPlayingUserData.innerHTML = '';
|
||||||
|
@ -135,26 +135,6 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function showDragAndDropHelp() {
|
|
||||||
|
|
||||||
if (AppInfo.isTouchPreferred) {
|
|
||||||
// Not implemented for mobile yet
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
var expectedValue = "7";
|
|
||||||
if (appStorage.getItem("playlistitemdragdrophelp") == expectedValue) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
appStorage.setItem("playlistitemdragdrophelp", expectedValue);
|
|
||||||
|
|
||||||
Dashboard.alert({
|
|
||||||
message: Globalize.translate('TryDragAndDropMessage'),
|
|
||||||
title: Globalize.translate('HeaderTryDragAndDrop')
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
function init(page, item) {
|
function init(page, item) {
|
||||||
|
|
||||||
var elem = page.querySelector('#childrenContent .itemsContainer');
|
var elem = page.querySelector('#childrenContent .itemsContainer');
|
||||||
@ -174,7 +154,6 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
reloadItems(page, item);
|
reloadItems(page, item);
|
||||||
showDragAndDropHelp();
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1805,6 +1805,7 @@ var AppInfo = {};
|
|||||||
define("emby-button", [embyWebComponentsBowerPath + "/emby-button/emby-button"], returnFirstDependency);
|
define("emby-button", [embyWebComponentsBowerPath + "/emby-button/emby-button"], returnFirstDependency);
|
||||||
define("emby-itemscontainer", [embyWebComponentsBowerPath + "/emby-itemscontainer/emby-itemscontainer"], returnFirstDependency);
|
define("emby-itemscontainer", [embyWebComponentsBowerPath + "/emby-itemscontainer/emby-itemscontainer"], returnFirstDependency);
|
||||||
define("itemHoverMenu", [embyWebComponentsBowerPath + "/itemhovermenu/itemhovermenu"], returnFirstDependency);
|
define("itemHoverMenu", [embyWebComponentsBowerPath + "/itemhovermenu/itemhovermenu"], returnFirstDependency);
|
||||||
|
define("multiSelect", [embyWebComponentsBowerPath + "/multiselect/multiselect"], returnFirstDependency);
|
||||||
define("alphaPicker", [embyWebComponentsBowerPath + "/alphapicker/alphapicker"], returnFirstDependency);
|
define("alphaPicker", [embyWebComponentsBowerPath + "/alphapicker/alphapicker"], returnFirstDependency);
|
||||||
define("paper-icon-button-light", [embyWebComponentsBowerPath + "/emby-button/paper-icon-button-light"]);
|
define("paper-icon-button-light", [embyWebComponentsBowerPath + "/emby-button/paper-icon-button-light"]);
|
||||||
|
|
||||||
|
@ -1699,7 +1699,6 @@
|
|||||||
"MessageChromecastConnectionError": "Your Chromecast receiver is unable to connect to your Emby Server. Please check their connections and try again.",
|
"MessageChromecastConnectionError": "Your Chromecast receiver is unable to connect to your Emby Server. Please check their connections and try again.",
|
||||||
"MessagePleaseSelectOneItem": "Please select at least one item.",
|
"MessagePleaseSelectOneItem": "Please select at least one item.",
|
||||||
"MessagePleaseSelectTwoItems": "Please select at least two items.",
|
"MessagePleaseSelectTwoItems": "Please select at least two items.",
|
||||||
"MessageTheSelectedItemsWillBeGrouped": "The selected videos will be grouped into one virtual item. Emby apps will automatically choose which version to play based on device and network performance. Are you sure you wish to continue?",
|
|
||||||
"HeaderLibraryFolders": "Media Folders",
|
"HeaderLibraryFolders": "Media Folders",
|
||||||
"HeaderFavoriteMovies": "Favorite Movies",
|
"HeaderFavoriteMovies": "Favorite Movies",
|
||||||
"HeaderFavoriteShows": "Favorite Shows",
|
"HeaderFavoriteShows": "Favorite Shows",
|
||||||
@ -2285,8 +2284,6 @@
|
|||||||
"NumLocationsValue": "{0} folders",
|
"NumLocationsValue": "{0} folders",
|
||||||
"ButtonAddMediaLibrary": "Add Media Library",
|
"ButtonAddMediaLibrary": "Add Media Library",
|
||||||
"ButtonManageFolders": "Manage folders",
|
"ButtonManageFolders": "Manage folders",
|
||||||
"HeaderTryDragAndDrop": "Try Drag and Drop",
|
|
||||||
"TryDragAndDropMessage": "To re-arrange playlist items, just drag and drop. Try it!",
|
|
||||||
"HeaderTryMicrosoftEdge": "Try Microsoft Edge",
|
"HeaderTryMicrosoftEdge": "Try Microsoft Edge",
|
||||||
"MessageTryMicrosoftEdge": "For a better experience on Windows 10, try the new Microsoft Edge Browser.",
|
"MessageTryMicrosoftEdge": "For a better experience on Windows 10, try the new Microsoft Edge Browser.",
|
||||||
"HeaderTryModernBrowser": "Try a Modern Web Browser",
|
"HeaderTryModernBrowser": "Try a Modern Web Browser",
|
||||||
|
Loading…
Reference in New Issue
Block a user