diff --git a/dashboard-ui/scripts/actionsheet.js b/dashboard-ui/scripts/actionsheet.js index 41ee0f9e65..fe46cd3503 100644 --- a/dashboard-ui/scripts/actionsheet.js +++ b/dashboard-ui/scripts/actionsheet.js @@ -58,7 +58,7 @@ var isScrollable = !browserInfo.safari; if (isScrollable) { - html += ''; + //html += ''; } var itemsWithIcons = options.items.filter(function (o) { @@ -96,7 +96,7 @@ html += ''; if (isScrollable) { - html += ''; + //html += ''; } if (options.showCancel) { @@ -107,6 +107,8 @@ var dlg = document.createElement('paper-dialog'); dlg.setAttribute('with-backdrop', 'with-backdrop'); + dlg.setAttribute('role', 'alertdialog'); + dlg.setAttribute('noAutoFocus', 'noAutoFocus'); dlg.innerHTML = html; if (pos) { @@ -114,29 +116,25 @@ dlg.style.left = pos.left + 'px'; dlg.style.top = pos.top + 'px'; } + document.body.appendChild(dlg); - // The animations flicker in IE - if (!browserInfo.msie) { - 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' } - } - }; - } + 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' } + } + }; - setTimeout(function () { - dlg.open(); - }, 50); + dlg.open(); // Has to be assigned a z-index after the call to .open() dlg.addEventListener('iron-overlay-closed', function () { @@ -146,9 +144,9 @@ // Seeing an issue in some non-chrome browsers where this is requiring a double click var eventName = browserInfo.chrome || browserInfo.safari ? 'click' : 'mousedown'; - $('.actionSheetMenuItem', dlg).on(eventName, function () { + dlg.querySelector('.actionSheetMenuItem').addEventListener(eventName, function (e) { - var selectedId = this.getAttribute('data-id'); + var selectedId = e.target.getAttribute('data-id'); // Add a delay here to allow the click animation to finish, for nice effect setTimeout(function () { diff --git a/dashboard-ui/scripts/librarylist.js b/dashboard-ui/scripts/librarylist.js index c22dc976d8..e30292aed5 100644 --- a/dashboard-ui/scripts/librarylist.js +++ b/dashboard-ui/scripts/librarylist.js @@ -994,11 +994,11 @@ selectionCommandsPanel.innerHTML = html; - $('.btnCloseSelectionPanel', selectionCommandsPanel).on('click', hideSelections); + selectionCommandsPanel.querySelector('.btnCloseSelectionPanel').addEventListener('click', hideSelections); var btnSelectionPanelOptions = selectionCommandsPanel.querySelector('.btnSelectionPanelOptions'); - $(btnSelectionPanelOptions).on('click', showMenuForSelectedItems); + btnSelectionPanelOptions.addEventListener('click', showMenuForSelectedItems); if (!browserInfo.mobile) { shake(btnSelectionPanelOptions, 1);