mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update dialogs
This commit is contained in:
parent
6a539b8f3a
commit
e73b3a1603
4 changed files with 24 additions and 26 deletions
|
@ -16,12 +16,12 @@
|
||||||
},
|
},
|
||||||
"devDependencies": {},
|
"devDependencies": {},
|
||||||
"ignore": [],
|
"ignore": [],
|
||||||
"version": "1.3.70",
|
"version": "1.3.71",
|
||||||
"_release": "1.3.70",
|
"_release": "1.3.71",
|
||||||
"_resolution": {
|
"_resolution": {
|
||||||
"type": "version",
|
"type": "version",
|
||||||
"tag": "1.3.70",
|
"tag": "1.3.71",
|
||||||
"commit": "5430fc4c71fcc8e5929ee2e12120e2dc7e8c9011"
|
"commit": "05594c6dee06ea554f3f76a2efc9f50a1e19573a"
|
||||||
},
|
},
|
||||||
"_source": "https://github.com/MediaBrowser/emby-webcomponents.git",
|
"_source": "https://github.com/MediaBrowser/emby-webcomponents.git",
|
||||||
"_target": "^1.2.0",
|
"_target": "^1.2.0",
|
||||||
|
|
|
@ -193,32 +193,30 @@
|
||||||
|
|
||||||
// Seeing an issue in some non-chrome browsers where this is requiring a double click
|
// Seeing an issue in some non-chrome browsers where this is requiring a double click
|
||||||
//var eventName = browser.firefox ? 'mousedown' : 'click';
|
//var eventName = browser.firefox ? 'mousedown' : 'click';
|
||||||
var eventName = 'click';
|
var selectedId;
|
||||||
|
|
||||||
|
dlg.addEventListener('click', function (e) {
|
||||||
|
|
||||||
|
var actionSheetMenuItem = parentWithClass(e.target, 'actionSheetMenuItem');
|
||||||
|
|
||||||
|
if (actionSheetMenuItem) {
|
||||||
|
selectedId = actionSheetMenuItem.getAttribute('data-id');
|
||||||
|
dialogHelper.close(dlg);
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
return new Promise(function (resolve, reject) {
|
return new Promise(function (resolve, reject) {
|
||||||
|
|
||||||
dlg.addEventListener(eventName, function (e) {
|
dlg.addEventListener('close', function () {
|
||||||
|
|
||||||
var actionSheetMenuItem = parentWithClass(e.target, 'actionSheetMenuItem');
|
if (selectedId) {
|
||||||
|
if (options.callback) {
|
||||||
|
options.callback(selectedId);
|
||||||
|
}
|
||||||
|
|
||||||
if (actionSheetMenuItem) {
|
resolve(selectedId);
|
||||||
|
|
||||||
var selectedId = actionSheetMenuItem.getAttribute('data-id');
|
|
||||||
|
|
||||||
dialogHelper.close(dlg);
|
|
||||||
|
|
||||||
// Add a delay here to allow the click animation to finish, for nice effect
|
|
||||||
setTimeout(function () {
|
|
||||||
|
|
||||||
if (options.callback) {
|
|
||||||
options.callback(selectedId);
|
|
||||||
}
|
|
||||||
|
|
||||||
resolve(selectedId);
|
|
||||||
|
|
||||||
}, 100);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
dialogHelper.open(dlg);
|
dialogHelper.open(dlg);
|
||||||
|
|
|
@ -49,7 +49,7 @@ define([], function () {
|
||||||
}
|
}
|
||||||
|
|
||||||
function supportsAddingToCollection(item) {
|
function supportsAddingToCollection(item) {
|
||||||
var invalidTypes = ['Person', 'Genre', 'MusicGenre', 'Studio', 'GameGenre', 'BoxSet', 'Playlist', 'UserView', 'CollectionFolder', 'Audio', 'Episode', 'TvChannel', 'Program', 'MusicAlbum', 'Timer'];
|
var invalidTypes = ['Person', 'Genre', 'MusicGenre', 'Studio', 'GameGenre', 'BoxSet', 'Playlist', 'UserView', 'CollectionFolder', 'Audio', 'TvChannel', 'Program', 'MusicAlbum', 'Timer'];
|
||||||
|
|
||||||
return !item.CollectionType && invalidTypes.indexOf(item.Type) == -1 && item.MediaType != 'Photo';
|
return !item.CollectionType && invalidTypes.indexOf(item.Type) == -1 && item.MediaType != 'Photo';
|
||||||
}
|
}
|
||||||
|
|
|
@ -142,7 +142,7 @@
|
||||||
html += '<form style="margin:auto;">';
|
html += '<form style="margin:auto;">';
|
||||||
|
|
||||||
html += '<div class="fldSelectPlaylist">';
|
html += '<div class="fldSelectPlaylist">';
|
||||||
html += '<select is="emby-select" id="selectPlaylistToAddTo" label="' + globalize.translate('sharedcomponents#LabelPlaylist') + '"></select>';
|
html += '<select is="emby-select" id="selectPlaylistToAddTo" label="' + globalize.translate('sharedcomponents#LabelPlaylist') + '" autofocus></select>';
|
||||||
html += '</div>';
|
html += '</div>';
|
||||||
|
|
||||||
html += '<div class="newPlaylistInfo">';
|
html += '<div class="newPlaylistInfo">';
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue