diff --git a/dashboard-ui/apiclient/connectionmanager.js b/dashboard-ui/apiclient/connectionmanager.js index f5afddf75..fcae17cac 100644 --- a/dashboard-ui/apiclient/connectionmanager.js +++ b/dashboard-ui/apiclient/connectionmanager.js @@ -880,7 +880,7 @@ var tests = []; if (server.LastConnectionMode != null) { - tests.push(server.LastConnectionMode); + //tests.push(server.LastConnectionMode); } if (tests.indexOf(MediaBrowser.ConnectionMode.Manual) == -1) { tests.push(MediaBrowser.ConnectionMode.Manual); } if (tests.indexOf(MediaBrowser.ConnectionMode.Local) == -1) { tests.push(MediaBrowser.ConnectionMode.Local); } diff --git a/dashboard-ui/bower_components/iron-behaviors/.bower.json b/dashboard-ui/bower_components/iron-behaviors/.bower.json index 5d7b926af..f49935188 100644 --- a/dashboard-ui/bower_components/iron-behaviors/.bower.json +++ b/dashboard-ui/bower_components/iron-behaviors/.bower.json @@ -27,14 +27,14 @@ "web-component-tester": "*", "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" }, - "homepage": "https://github.com/polymerelements/iron-behaviors", + "homepage": "https://github.com/PolymerElements/iron-behaviors", "_release": "1.0.8", "_resolution": { "type": "version", "tag": "v1.0.8", "commit": "663ad706b43989f4961d945b8116cf4db346532f" }, - "_source": "git://github.com/polymerelements/iron-behaviors.git", + "_source": "git://github.com/PolymerElements/iron-behaviors.git", "_target": "^1.0.0", - "_originalSource": "polymerelements/iron-behaviors" + "_originalSource": "PolymerElements/iron-behaviors" } \ No newline at end of file diff --git a/dashboard-ui/bower_components/iron-overlay-behavior/.bower.json b/dashboard-ui/bower_components/iron-overlay-behavior/.bower.json index 42470f3ae..73b5a092b 100644 --- a/dashboard-ui/bower_components/iron-overlay-behavior/.bower.json +++ b/dashboard-ui/bower_components/iron-overlay-behavior/.bower.json @@ -1,6 +1,6 @@ { "name": "iron-overlay-behavior", - "version": "1.0.8", + "version": "1.0.9", "license": "http://polymer.github.io/LICENSE.txt", "description": "Provides a behavior for making an element an overlay", "private": true, @@ -35,11 +35,11 @@ "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" }, "homepage": "https://github.com/polymerelements/iron-overlay-behavior", - "_release": "1.0.8", + "_release": "1.0.9", "_resolution": { "type": "version", - "tag": "v1.0.8", - "commit": "cf25fe1ff2f585fa84190537bf62b94eb1579aad" + "tag": "v1.0.9", + "commit": "87f7763d323fffa07357a08777ad831b7c2c2fb8" }, "_source": "git://github.com/polymerelements/iron-overlay-behavior.git", "_target": "^1.0.0", diff --git a/dashboard-ui/bower_components/iron-overlay-behavior/bower.json b/dashboard-ui/bower_components/iron-overlay-behavior/bower.json index 4deb8d2b3..30a3f04d9 100644 --- a/dashboard-ui/bower_components/iron-overlay-behavior/bower.json +++ b/dashboard-ui/bower_components/iron-overlay-behavior/bower.json @@ -1,6 +1,6 @@ { "name": "iron-overlay-behavior", - "version": "1.0.8", + "version": "1.0.9", "license": "http://polymer.github.io/LICENSE.txt", "description": "Provides a behavior for making an element an overlay", "private": true, diff --git a/dashboard-ui/bower_components/iron-overlay-behavior/iron-overlay-behavior.html b/dashboard-ui/bower_components/iron-overlay-behavior/iron-overlay-behavior.html index df52db1a5..837759f7e 100644 --- a/dashboard-ui/bower_components/iron-overlay-behavior/iron-overlay-behavior.html +++ b/dashboard-ui/bower_components/iron-overlay-behavior/iron-overlay-behavior.html @@ -28,7 +28,8 @@ intent. Closing generally implies that the user acknowledged the content on the it will cancel whenever the user taps outside it or presses the escape key. This behavior is configurable with the `no-cancel-on-esc-key` and the `no-cancel-on-outside-click` properties. `close()` should be called explicitly by the implementer when the user interacts with a control -in the overlay element. +in the overlay element. When the dialog is canceled, the overlay fires an 'iron-overlay-canceled' +event. Call `preventDefault` on this event to prevent the overlay from closing. ### Positioning @@ -199,6 +200,11 @@ context. You should place this element as a child of `
` whenever possible. * Cancels the overlay. */ cancel: function() { + var cancelEvent = this.fire('iron-overlay-canceled', undefined, {cancelable: true}); + if (cancelEvent.defaultPrevented) { + return; + } + this.opened = false; this._setCanceled(true); }, diff --git a/dashboard-ui/bower_components/iron-overlay-behavior/test/iron-overlay-behavior.html b/dashboard-ui/bower_components/iron-overlay-behavior/test/iron-overlay-behavior.html index 8fd17eadf..a352a4b18 100644 --- a/dashboard-ui/bower_components/iron-overlay-behavior/test/iron-overlay-behavior.html +++ b/dashboard-ui/bower_components/iron-overlay-behavior/test/iron-overlay-behavior.html @@ -180,6 +180,15 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN }); test('cancel an overlay by clicking outside', function(done) { + runAfterOpen(overlay, function() { + overlay.addEventListener('iron-overlay-canceled', function(event) { + done(); + }); + Polymer.Base.fire.call(document, 'click'); + }); + }); + + test('close an overlay by clicking outside', function(done) { runAfterOpen(overlay, function() { overlay.addEventListener('iron-overlay-closed', function(event) { assert.isTrue(event.detail.canceled, 'overlay is canceled'); @@ -189,7 +198,35 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN }); }); + test('cancel event can be prevented', function(done) { + runAfterOpen(overlay, function() { + overlay.addEventListener('iron-overlay-canceled', function(event) { + event.preventDefault(); + }); + var closedListener = function(event) { + throw new Error('iron-overlay-closed should not fire'); + }; + overlay.addEventListener('iron-overlay-closed', closedListener); + Polymer.Base.fire.call(document, 'click'); + setTimeout(function() { + overlay.removeEventListener('iron-overlay-closed', closedListener); + done(); + }, 10); + }); + }); + test('cancel an overlay with esc key', function(done) { + runAfterOpen(overlay, function() { + overlay.addEventListener('iron-overlay-canceled', function(event) { + done(); + }); + fireEvent('keydown', { + keyCode: 27 + }, document); + }); + }); + + test('close an overlay with esc key', function(done) { runAfterOpen(overlay, function() { overlay.addEventListener('iron-overlay-closed', function(event) { assert.isTrue(event.detail.canceled, 'overlay is canceled'); diff --git a/dashboard-ui/components/imagedownloader/imagedownloader.js b/dashboard-ui/components/imagedownloader/imagedownloader.js index 71f34e056..5edbff50c 100644 --- a/dashboard-ui/components/imagedownloader/imagedownloader.js +++ b/dashboard-ui/components/imagedownloader/imagedownloader.js @@ -269,22 +269,7 @@ currentItemId = itemId; currentItemType = itemType; - var dlg = document.createElement('paper-dialog'); - - dlg.setAttribute('with-backdrop', 'with-backdrop'); - dlg.setAttribute('role', 'alertdialog'); - - // without this safari will scroll the background instead of the dialog contents - // but not needed here since this is already on top of an existing dialog - // dlg.setAttribute('modal', 'modal'); - - // seeing max call stack size exceeded in the debugger with this - dlg.setAttribute('noAutoFocus', 'noAutoFocus'); - dlg.entryAnimation = 'scale-up-animation'; - dlg.exitAnimation = 'fade-out-animation'; - dlg.classList.add('fullscreen-editor-paper-dialog'); - dlg.classList.add('ui-body-b'); - dlg.classList.add('smoothScrollY'); + var dlg = PaperDialogHelper.createDialog(); var html = ''; html += '