mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update shared collection editor
This commit is contained in:
parent
69fad5e57d
commit
dcb6b103ec
10 changed files with 133 additions and 44 deletions
|
@ -16,14 +16,25 @@
|
|||
return true;
|
||||
}
|
||||
|
||||
function triggerChange(select) {
|
||||
var evt = document.createEvent("HTMLEvents");
|
||||
evt.initEvent("change", false, true);
|
||||
select.dispatchEvent(evt);
|
||||
}
|
||||
|
||||
function showActionSheeet(select) {
|
||||
|
||||
var labelElem = getLabel(select);
|
||||
var title = labelElem ? (labelElem.textContent || labelElem.innerText) : null;
|
||||
|
||||
actionsheet.show({
|
||||
items: select.options,
|
||||
positionTo: select
|
||||
positionTo: select,
|
||||
title: title
|
||||
|
||||
}).then(function (value) {
|
||||
select.value = value;
|
||||
triggerChange(select);
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -38,20 +49,23 @@
|
|||
function onFocus(e) {
|
||||
var label = getLabel(this);
|
||||
if (label) {
|
||||
label.classList.add('selectLabelFocus');
|
||||
label.classList.add('selectLabelFocused');
|
||||
label.classList.remove('selectLabelUnfocused');
|
||||
}
|
||||
}
|
||||
|
||||
function onBlur(e) {
|
||||
var label = getLabel(this);
|
||||
if (label) {
|
||||
label.classList.remove('selectLabelFocus');
|
||||
label.classList.add('selectLabelUnfocused');
|
||||
label.classList.remove('selectLabelFocused');
|
||||
}
|
||||
}
|
||||
|
||||
function onMouseDown(e) {
|
||||
|
||||
if (!enableNativeMenu()) {
|
||||
// e.button=0 for primary (left) mouse button click
|
||||
if (!e.button && !enableNativeMenu()) {
|
||||
e.preventDefault();
|
||||
showActionSheeet(this);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue