diff --git a/dashboard-ui/apiclient/apiclient.js b/dashboard-ui/apiclient/apiclient.js index 74a1debbe2..663a32f13e 100644 --- a/dashboard-ui/apiclient/apiclient.js +++ b/dashboard-ui/apiclient/apiclient.js @@ -138,6 +138,30 @@ }]); } + self.setRequestHeaders = function(headers) { + + var currentServerInfo = self.serverInfo(); + + if (clientName) { + + var auth = 'MediaBrowser Client="' + clientName + '", Device="' + deviceName + '", DeviceId="' + deviceId + '", Version="' + applicationVersion + '"'; + + var userId = currentServerInfo.UserId; + + if (userId) { + auth += ', UserId="' + userId + '"'; + } + + headers.Authorization = auth; + } + + var accessToken = currentServerInfo.AccessToken; + + if (accessToken) { + headers['X-MediaBrowser-Token'] = accessToken; + } + }; + /** * Wraps around jQuery ajax methods to add additional info to the request. */ @@ -149,28 +173,8 @@ if (includeAuthorization !== false) { - var currentServerInfo = self.serverInfo(); - - if (clientName) { - - var auth = 'MediaBrowser Client="' + clientName + '", Device="' + deviceName + '", DeviceId="' + deviceId + '", Version="' + applicationVersion + '"'; - - var userId = currentServerInfo.UserId; - - if (userId) { - auth += ', UserId="' + userId + '"'; - } - - request.headers = { - Authorization: auth - }; - } - - var accessToken = currentServerInfo.AccessToken; - - if (accessToken) { - request.headers['X-MediaBrowser-Token'] = accessToken; - } + request.headers = {}; + self.setRequestHeaders(request.headers); } if (self.enableAutomaticNetworking === false || request.type != "GET") { @@ -521,7 +525,7 @@ } else { // If that produced a fairly high speed, try again with a larger size to get a more accurate result - self.getDownloadSpeed(2000000).done(function (bitrate) { + self.getDownloadSpeed(3000000).done(function (bitrate) { deferred.resolveWith(null, [Math.round(bitrate * .8)]); diff --git a/dashboard-ui/bower_components/iron-a11y-announcer/.bower.json b/dashboard-ui/bower_components/iron-a11y-announcer/.bower.json index 786e569307..422f44ae6e 100644 --- a/dashboard-ui/bower_components/iron-a11y-announcer/.bower.json +++ b/dashboard-ui/bower_components/iron-a11y-announcer/.bower.json @@ -1,6 +1,6 @@ { "name": "iron-a11y-announcer", - "version": "1.0.1", + "version": "1.0.2", "description": "A singleton element that simplifies announcing text to screen readers.", "keywords": [ "web-components", @@ -30,11 +30,11 @@ "web-component-tester": "*" }, "homepage": "https://github.com/polymerelements/iron-a11y-announcer", - "_release": "1.0.1", + "_release": "1.0.2", "_resolution": { "type": "version", - "tag": "v1.0.1", - "commit": "699697fe8935400ab11e3e33cd6a5a54d762300e" + "tag": "v1.0.2", + "commit": "6010b30a67a12333f76394a558c820db727f7c84" }, "_source": "git://github.com/polymerelements/iron-a11y-announcer.git", "_target": "^1.0.0", diff --git a/dashboard-ui/bower_components/iron-a11y-announcer/bower.json b/dashboard-ui/bower_components/iron-a11y-announcer/bower.json index cbe80e0a6b..1a2bf2e462 100644 --- a/dashboard-ui/bower_components/iron-a11y-announcer/bower.json +++ b/dashboard-ui/bower_components/iron-a11y-announcer/bower.json @@ -1,6 +1,6 @@ { "name": "iron-a11y-announcer", - "version": "1.0.1", + "version": "1.0.2", "description": "A singleton element that simplifies announcing text to screen readers.", "keywords": [ "web-components", diff --git a/dashboard-ui/bower_components/iron-a11y-announcer/iron-a11y-announcer.html b/dashboard-ui/bower_components/iron-a11y-announcer/iron-a11y-announcer.html index 87e2be1ab0..49067880d5 100644 --- a/dashboard-ui/bower_components/iron-a11y-announcer/iron-a11y-announcer.html +++ b/dashboard-ui/bower_components/iron-a11y-announcer/iron-a11y-announcer.html @@ -114,7 +114,7 @@ Note: announcements are only audible if you have a screen reader enabled. Polymer.IronA11yAnnouncer.requestAvailability = function() { if (!Polymer.IronA11yAnnouncer.instance) { - document.createElement('iron-a11y-announcer'); + Polymer.IronA11yAnnouncer.instance = document.createElement('iron-a11y-announcer'); } document.body.appendChild(Polymer.IronA11yAnnouncer.instance); diff --git a/dashboard-ui/bower_components/iron-form-element-behavior/.bower.json b/dashboard-ui/bower_components/iron-form-element-behavior/.bower.json index f1369b1635..1e354dbde9 100644 --- a/dashboard-ui/bower_components/iron-form-element-behavior/.bower.json +++ b/dashboard-ui/bower_components/iron-form-element-behavior/.bower.json @@ -1,6 +1,6 @@ { "name": "iron-form-element-behavior", - "version": "1.0.1", + "version": "1.0.2", "license": "http://polymer.github.io/LICENSE.txt", "private": true, "main": "iron-form-element-behavior", @@ -22,14 +22,15 @@ "iron-component-page": "PolymerElements/iron-component-page#^1.0.0", "test-fixture": "PolymerElements/test-fixture#^1.0.0", "web-component-tester": "*", - "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" + "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0", + "paper-styles": "PolymerElements/paper-styles#^1.0.0" }, "homepage": "https://github.com/PolymerElements/iron-form-element-behavior", - "_release": "1.0.1", + "_release": "1.0.2", "_resolution": { "type": "version", - "tag": "v1.0.1", - "commit": "f386143e866c320025589f3d79798c12103377a4" + "tag": "v1.0.2", + "commit": "3d46178a7cd9e4025004476a8fd0eef7a5416cd3" }, "_source": "git://github.com/PolymerElements/iron-form-element-behavior.git", "_target": "^1.0.0", diff --git a/dashboard-ui/bower_components/iron-form-element-behavior/bower.json b/dashboard-ui/bower_components/iron-form-element-behavior/bower.json index 1e141f2c61..359b3c0d64 100644 --- a/dashboard-ui/bower_components/iron-form-element-behavior/bower.json +++ b/dashboard-ui/bower_components/iron-form-element-behavior/bower.json @@ -1,6 +1,6 @@ { "name": "iron-form-element-behavior", - "version": "1.0.1", + "version": "1.0.2", "license": "http://polymer.github.io/LICENSE.txt", "private": true, "main": "iron-form-element-behavior", @@ -22,6 +22,7 @@ "iron-component-page": "PolymerElements/iron-component-page#^1.0.0", "test-fixture": "PolymerElements/test-fixture#^1.0.0", "web-component-tester": "*", - "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" + "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0", + "paper-styles": "PolymerElements/paper-styles#^1.0.0" } } diff --git a/dashboard-ui/bower_components/iron-form-element-behavior/demo/index.html b/dashboard-ui/bower_components/iron-form-element-behavior/demo/index.html index b40998de4d..ae3cb09e8d 100644 --- a/dashboard-ui/bower_components/iron-form-element-behavior/demo/index.html +++ b/dashboard-ui/bower_components/iron-form-element-behavior/demo/index.html @@ -19,35 +19,50 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN + + - + -
- Element the form is tracking: -
- Element the form isn't tracking: -
- Another one the form is tracking: +
+
+ + Element with iron-form-element-behavior +
+ Element without iron-form-element-behavior +
+ Element with iron-form-element-behavior + - +

Elements tracked by the form:

-

Elements tracked by the form:

-
    -
+
    +
+
+
+ + - diff --git a/dashboard-ui/bower_components/iron-form-element-behavior/demo/simple-form.html b/dashboard-ui/bower_components/iron-form-element-behavior/demo/simple-form.html index 82acbe5f36..a475972b59 100644 --- a/dashboard-ui/bower_components/iron-form-element-behavior/demo/simple-form.html +++ b/dashboard-ui/bower_components/iron-form-element-behavior/demo/simple-form.html @@ -25,7 +25,8 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN }, listeners: { - 'iron-form-element-register': '_elementRegistered' + 'iron-form-element-register': '_elementRegistered', + 'iron-form-element-unregister': '_elementUnregistered' }, ready: function() { @@ -34,7 +35,16 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN _elementRegistered: function(e) { this.formElements.push(e.target); - this.fire('element-registered'); + }, + + _elementUnregistered: function(e) { + var target = e.detail.target; + if (target) { + var index = this.formElements.indexOf(target); + if (index > -1) { + this.formElements.splice(index, 1); + } + } } }); diff --git a/dashboard-ui/bower_components/iron-form-element-behavior/iron-form-element-behavior.html b/dashboard-ui/bower_components/iron-form-element-behavior/iron-form-element-behavior.html index d7678a78df..281ce91d93 100644 --- a/dashboard-ui/bower_components/iron-form-element-behavior/iron-form-element-behavior.html +++ b/dashboard-ui/bower_components/iron-form-element-behavior/iron-form-element-behavior.html @@ -15,15 +15,26 @@ Enables a custom element to be included in an `iron-form`. --> - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + } + }, - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - this._effect = new KeyframeEffect(node, [ - {'transform': scaleProperty}, - {'transform': 'scale(1, 1)'} - ], this.timingFromConfig(config)); - return this._effect; - } - }); - - + var scaleProperty = 'scale(0)'; + if (config.axis === 'x') { + scaleProperty = 'scale(0, 1)'; + } else if (config.axis === 'y') { + scaleProperty = 'scale(1, 0)'; + } + this._effect = new KeyframeEffect(node, [ + {'transform': scaleProperty}, + {'transform': 'scale(1, 1)'} + ], this.timingFromConfig(config)); - - behaviors: [ - Polymer.NeonAnimationBehavior - ], - configure: function(config) { - var node = config.node; - this._effect = new KeyframeEffect(node, [ - {'opacity': '0'}, - {'opacity': '1'} - ], this.timingFromConfig(config)); - return this._effect; - } + + is: 'fade-out-animation', + behaviors: [ + Polymer.NeonAnimationBehavior + ], - - behaviors: [ - Polymer.NeonAnimationBehavior - ], - configure: function(config) { - var node = config.node; + + }); + - + }); + - + }); + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + +