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

fix sort menus

This commit is contained in:
Luke Pulverenti 2015-12-08 16:10:21 -05:00
parent 00b18fdc5f
commit 95d4c9bd78
4 changed files with 30 additions and 44 deletions

View file

@ -32,14 +32,14 @@
"iron-test-helpers": "PolymerElements/iron-test-helpers#^1.0.0"
},
"ignore": [],
"homepage": "https://github.com/polymerelements/paper-ripple",
"homepage": "https://github.com/PolymerElements/paper-ripple",
"_release": "1.0.5",
"_resolution": {
"type": "version",
"tag": "v1.0.5",
"commit": "d72e7a9a8ab518b901ed18dde492df3b87a93be5"
},
"_source": "git://github.com/polymerelements/paper-ripple.git",
"_source": "git://github.com/PolymerElements/paper-ripple.git",
"_target": "^1.0.0",
"_originalSource": "polymerelements/paper-ripple"
"_originalSource": "PolymerElements/paper-ripple"
}

View file

@ -131,6 +131,7 @@
}
};
if (options.size != 'auto') {
dlg.classList.add('popupEditor');
if (options.size == 'small') {
@ -141,6 +142,7 @@
} else {
dlg.classList.add('fullscreen-paper-dialog');
}
}
var theme = options.theme || 'b';

View file

@ -105,8 +105,8 @@
}
document.body.appendChild(dlg);
// The animations flicker in IE and Firefox (probably wherever the polyfill is used)
if (browserInfo.animate) {
// The animations flicker in IE
if (!browserInfo.msie) {
dlg.animationConfig = {
// scale up
'entry': {

View file

@ -2831,31 +2831,12 @@
require(['components/paperdialoghelper', 'paper-dialog', 'paper-radio-button', 'paper-radio-group', 'scale-up-animation', 'fade-in-animation', 'fade-out-animation'], function (paperDialogHelper) {
var dlg = document.createElement('paper-dialog');
dlg.setAttribute('with-backdrop', 'with-backdrop');
dlg.setAttribute('role', 'alertdialog');
dlg.entryAnimation = 'fade-in-animation';
dlg.exitAnimation = 'fade-out-animation';
// The animations flicker in IE and Firefox (probably wherever the polyfill is used)
if (browserInfo.animate) {
dlg.animationConfig = {
// scale up
'entry': {
name: 'scale-up-animation',
node: dlg,
timing: { duration: 160, easing: 'ease-out' }
},
// fade out
'exit': {
name: 'fade-out-animation',
node: dlg,
timing: { duration: 200, easing: 'ease-in' }
}
};
}
var dlg = paperDialogHelper.createDialog({
removeOnClose: true,
theme: 'a',
size: 'auto',
modal: false
});
var html = '';
@ -2902,11 +2883,14 @@
dlg.innerHTML = html;
document.body.appendChild(dlg);
dlg.addEventListener('iron-overlay-closed', function () {
dlg.parentNode.removeChild(dlg);
});
var fireCallbackOnClose = false;
paperDialogHelper.open(dlg);
paperDialogHelper.open(dlg).then(function() {
if (options.callback && fireCallbackOnClose) {
options.callback();
}
});
$('.groupSortBy', dlg).on('iron-select', function () {
@ -2917,7 +2901,7 @@
options.query.StartIndex = 0;
if (options.callback && changed) {
options.callback();
fireCallbackOnClose = true;
}
});
@ -2930,7 +2914,7 @@
options.query.StartIndex = 0;
if (options.callback && changed) {
options.callback();
fireCallbackOnClose = true;
}
});
});