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

replace sliders

This commit is contained in:
Luke Pulverenti 2015-06-27 15:53:36 -04:00
parent 09d4af3357
commit 1b74dbdfbf
13 changed files with 1359 additions and 1439 deletions

View file

@ -1,9 +1,5 @@
(function () {
function onClosed() {
$(this).remove();
$(document.body).removeClass('bodyWithPopupOpen');
}
function show(options) {
require(['paperbuttonstyle'], function () {
@ -65,6 +61,11 @@
html += '<paper-dialog-scrollable>';
}
// If any items have an icon, give them all an icon just to make sure they're all lined up evenly
var renderIcon = options.items.filter(function (o) {
return o.ironIcon;
}).length;
for (var i = 0, length = options.items.length; i < length; i++) {
var option = options.items[i];
@ -74,6 +75,9 @@
if (option.ironIcon) {
html += '<iron-icon icon="' + option.ironIcon + '"></iron-icon>';
}
else if (renderIcon) {
html += '<iron-icon></iron-icon>';
}
html += '<span>' + option.name + '</span>';
html += '</paper-button>';
}
@ -98,7 +102,9 @@
dlg.open();
// Has to be assigned a z-index after the call to .open()
$(dlg).on('iron-overlay-closed', onClosed);
$(dlg).on('iron-overlay-closed', function () {
$(this).remove();
});
$('.btnOption', dlg).on('click', function () {