mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2024-11-18 03:18:19 -07:00
fix radio buttons in paper dialog
This commit is contained in:
parent
807cbafe55
commit
2b091ce5de
@ -1363,10 +1363,6 @@
|
|||||||
atts.push('data-locationtype="' + (item.LocationType || '') + '"');
|
atts.push('data-locationtype="' + (item.LocationType || '') + '"');
|
||||||
atts.push('data-index="' + index + '"');
|
atts.push('data-index="' + index + '"');
|
||||||
|
|
||||||
if (options.showDetailsMenu) {
|
|
||||||
atts.push('data-detailsmenu="true"');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (item.AlbumId) {
|
if (item.AlbumId) {
|
||||||
atts.push('data-albumid="' + item.AlbumId + '"');
|
atts.push('data-albumid="' + item.AlbumId + '"');
|
||||||
}
|
}
|
||||||
@ -2679,13 +2675,21 @@
|
|||||||
|
|
||||||
showSortMenu: function (options) {
|
showSortMenu: function (options) {
|
||||||
|
|
||||||
var id = 'dlg' + new Date().getTime();
|
var dlg = document.createElement('paper-dialog');
|
||||||
var html = '';
|
|
||||||
|
|
||||||
html += '<paper-dialog id="' + id + '" entry-animation="fade-in-animation" exit-animation="fade-out-animation" with-backdrop>';
|
dlg.setAttribute('with-backdrop', 'with-backdrop');
|
||||||
|
dlg.setAttribute('role', 'alertdialog');
|
||||||
|
// without this safari will scroll the background instead of the dialog contents
|
||||||
|
|
||||||
|
dlg.entryAnimation = 'scale-up-animation';
|
||||||
|
dlg.exitAnimation = 'fade-out-animation';
|
||||||
|
|
||||||
|
var html = '';
|
||||||
|
|
||||||
// There seems to be a bug with this in safari causing it to immediately roll up to 0 height
|
// There seems to be a bug with this in safari causing it to immediately roll up to 0 height
|
||||||
var isScrollable = !$.browser.safari;
|
var isScrollable = !$.browser.safari;
|
||||||
|
// Have to disable this right now because it's causing the radio buttons to not function properly in other browsers besides chrome
|
||||||
|
isScrollable = false;
|
||||||
|
|
||||||
html += '<h2>';
|
html += '<h2>';
|
||||||
html += Globalize.translate('HeaderSortBy');
|
html += Globalize.translate('HeaderSortBy');
|
||||||
@ -2720,40 +2724,36 @@
|
|||||||
html += '<paper-button dialog-dismiss>' + Globalize.translate('ButtonClose') + '</paper-button>';
|
html += '<paper-button dialog-dismiss>' + Globalize.translate('ButtonClose') + '</paper-button>';
|
||||||
html += '</div>';
|
html += '</div>';
|
||||||
|
|
||||||
html += '</paper-dialog>';
|
dlg.innerHTML = html;
|
||||||
|
document.body.appendChild(dlg);
|
||||||
|
|
||||||
$(document.body).append(html);
|
$(dlg).on('iron-overlay-closed', function () {
|
||||||
|
$(this).remove();
|
||||||
|
});
|
||||||
|
|
||||||
setTimeout(function () {
|
require(['components/paperdialoghelper'], function () {
|
||||||
var dlg = document.getElementById(id);
|
|
||||||
|
|
||||||
dlg.open();
|
PaperDialogHelper.openWithHash(dlg, 'sortmenu');
|
||||||
|
});
|
||||||
|
|
||||||
$(dlg).on('iron-overlay-closed', function () {
|
$('.groupSortBy', dlg).on('iron-select', function () {
|
||||||
$(this).remove();
|
options.query.SortBy = this.selected.replace('_', ',');
|
||||||
});
|
options.query.StartIndex = 0;
|
||||||
|
|
||||||
$('.groupSortBy', dlg).on('iron-select', function () {
|
if (options.callback) {
|
||||||
options.query.SortBy = this.selected.replace('_', ',');
|
options.callback();
|
||||||
options.query.StartIndex = 0;
|
}
|
||||||
|
});
|
||||||
|
|
||||||
if (options.callback) {
|
$('.groupSortOrder', dlg).on('iron-select', function () {
|
||||||
options.callback();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
$('.groupSortOrder', dlg).on('iron-select', function () {
|
options.query.SortOrder = this.selected;
|
||||||
|
options.query.StartIndex = 0;
|
||||||
options.query.SortOrder = this.selected;
|
|
||||||
options.query.StartIndex = 0;
|
|
||||||
|
|
||||||
if (options.callback) {
|
|
||||||
options.callback();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
}, 100);
|
|
||||||
|
|
||||||
|
if (options.callback) {
|
||||||
|
options.callback();
|
||||||
|
}
|
||||||
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
getRatingHtml: function (item, metascore) {
|
getRatingHtml: function (item, metascore) {
|
||||||
|
@ -793,7 +793,7 @@
|
|||||||
contentHtml += '<paper-button raised class="secondary btnPlay"><iron-icon icon="play-arrow"></iron-icon><span>' + Globalize.translate('ButtonPlay') + '</span></paper-button>';
|
contentHtml += '<paper-button raised class="secondary btnPlay"><iron-icon icon="play-arrow"></iron-icon><span>' + Globalize.translate('ButtonPlay') + '</span></paper-button>';
|
||||||
}
|
}
|
||||||
|
|
||||||
contentHtml += '<paper-button data-href="' + LibraryBrowser.getHref(item, context) + '" raised class="submit btnSync" style="background-color: #673AB7;" onclick="Dashboard.navigate(this.getAttribute(\'data-href\'));"><iron-icon icon="folder-open"></iron-icon><span>' + Globalize.translate('ButtonOpen') + '</span></paper-button>';
|
contentHtml += '<paper-button data-href="' + LibraryBrowser.getHref(item, context) + '" raised class="submit" style="background-color: #673AB7;" onclick="Dashboard.navigate(this.getAttribute(\'data-href\'));"><iron-icon icon="folder-open"></iron-icon><span>' + Globalize.translate('ButtonOpen') + '</span></paper-button>';
|
||||||
|
|
||||||
if (SyncManager.isAvailable(item, user)) {
|
if (SyncManager.isAvailable(item, user)) {
|
||||||
contentHtml += '<paper-button raised class="submit btnSync"><iron-icon icon="refresh"></iron-icon><span>' + Globalize.translate('ButtonSync') + '</span></paper-button>';
|
contentHtml += '<paper-button raised class="submit btnSync"><iron-icon icon="refresh"></iron-icon><span>' + Globalize.translate('ButtonSync') + '</span></paper-button>';
|
||||||
|
@ -211,8 +211,13 @@ paper-button.notext {
|
|||||||
paper-dialog {
|
paper-dialog {
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
z-index: 999999 !important;
|
z-index: 999999 !important;
|
||||||
|
font-family: inherit !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
paper-dialog h2 {
|
||||||
|
font-family: inherit !important;
|
||||||
|
}
|
||||||
|
|
||||||
iron-overlay-backdrop {
|
iron-overlay-backdrop {
|
||||||
z-index: 999998 !important;
|
z-index: 999998 !important;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user