:~]/)?(t||document).querySelectorAll(a):[document.getElementById(a.split("#")[1])],i=0;i0&&a[0].nodeType)for(i=0;i0?parseFloat(this.css("width")):null},outerWidth:function(e){return this.length>0?e?this[0].offsetWidth+parseFloat(this.css("margin-right"))+parseFloat(this.css("margin-left")):this[0].offsetWidth:null},height:function(){return this[0]===window?window.innerHeight:this.length>0?parseFloat(this.css("height")):null},outerHeight:function(e){return this.length>0?e?this[0].offsetHeight+parseFloat(this.css("margin-top"))+parseFloat(this.css("margin-bottom")):this[0].offsetHeight:null},offset:function(){if(this.length>0){var e=this[0],a=e.getBoundingClientRect(),t=document.body,r=e.clientTop||t.clientTop||0,i=e.clientLeft||t.clientLeft||0,s=window.pageYOffset||e.scrollTop,n=window.pageXOffset||e.scrollLeft;return{top:a.top+s-r,left:a.left+n-i}}return null},css:function(e,a){var t;if(1===arguments.length){if("string"!=typeof e){for(t=0;tr-1?new e([]):0>a?(t=r+a,new e(0>t?[]:[this[t]])):new e([this[a]])},append:function(a){var t,r;for(t=0;t=0;r--)this[t].insertBefore(i.childNodes[r],this[t].childNodes[0])}else if(a instanceof e)for(r=0;r1)for(var i=0;i1)for(var i=0;i0?t?this[0].nextElementSibling&&a(this[0].nextElementSibling).is(t)?[this[0].nextElementSibling]:[]:this[0].nextElementSibling?[this[0].nextElementSibling]:[]:[])},nextAll:function(t){var r=[],i=this[0];if(!i)return new e([]);for(;i.nextElementSibling;){var s=i.nextElementSibling;t?a(s).is(t)&&r.push(s):r.push(s),i=s}return new e(r)},prev:function(t){return new e(this.length>0?t?this[0].previousElementSibling&&a(this[0].previousElementSibling).is(t)?[this[0].previousElementSibling]:[]:this[0].previousElementSibling?[this[0].previousElementSibling]:[]:[])},prevAll:function(t){var r=[],i=this[0];if(!i)return new e([]);for(;i.previousElementSibling;){var s=i.previousElementSibling;t?a(s).is(t)&&r.push(s):r.push(s),i=s}return new e(r)},parent:function(e){for(var t=[],r=0;r 0) {
+ s.a11y.makeFocusable(s.nextButton);
+ s.a11y.addRole(s.nextButton, 'button');
+ s.a11y.addLabel(s.nextButton, s.params.nextSlideMessage);
}
- if (s.params.prevButton) {
- var prevButton = $(s.params.prevButton);
- s.a11y.makeFocusable(prevButton);
- s.a11y.addRole(prevButton, 'button');
- s.a11y.addLabel(prevButton, s.params.prevSlideMessage);
+ if (s.params.prevButton && s.prevButton && s.prevButton.length > 0) {
+ s.a11y.makeFocusable(s.prevButton);
+ s.a11y.addRole(s.prevButton, 'button');
+ s.a11y.addLabel(s.prevButton, s.params.prevSlideMessage);
}
$(s.container).append(s.a11y.liveRegion);
diff --git a/dashboard-ui/bower_components/Swiper/src/js/core.js b/dashboard-ui/bower_components/Swiper/src/js/core.js
index 2b275dddd..ab3e49d06 100644
--- a/dashboard-ui/bower_components/Swiper/src/js/core.js
+++ b/dashboard-ui/bower_components/Swiper/src/js/core.js
@@ -87,6 +87,8 @@ var defaults = {
onlyExternal: false,
threshold: 0,
touchMoveStopPropagation: true,
+ // Unique Navigation Elements
+ uniqueNavElements: true,
// Pagination
pagination: null,
paginationElement: 'span',
@@ -275,10 +277,14 @@ s.setBreakpoint = function () {
var breakpoint = s.getActiveBreakpoint();
if (breakpoint && s.currentBreakpoint !== breakpoint) {
var breakPointsParams = breakpoint in s.params.breakpoints ? s.params.breakpoints[breakpoint] : s.originalParams;
+ var needsReLoop = s.params.loop && (breakPointsParams.slidesPerView !== s.params.slidesPerView);
for ( var param in breakPointsParams ) {
s.params[param] = breakPointsParams[param];
}
s.currentBreakpoint = breakpoint;
+ if(needsReLoop && s.destroyLoop) {
+ s.reLoop(true);
+ }
}
};
// Set breakpoint on load
@@ -292,10 +298,12 @@ if (s.params.breakpoints) {
s.container = $(container);
if (s.container.length === 0) return;
if (s.container.length > 1) {
+ var swipers = [];
s.container.each(function () {
- new Swiper(this, params);
+ var container = this;
+ swipers.push(new Swiper(this, params));
});
- return;
+ return swipers;
}
// Save instance in container HTML Element and in data
@@ -364,6 +372,10 @@ s.wrapper = s.container.children('.' + s.params.wrapperClass);
// Pagination
if (s.params.pagination) {
s.paginationContainer = $(s.params.pagination);
+ if (s.params.uniqueNavElements && typeof s.params.pagination === 'string' && s.paginationContainer.length > 1 && s.container.find(s.params.pagination).length === 1) {
+ s.paginationContainer = s.container.find(s.params.pagination);
+ }
+
if (s.params.paginationType === 'bullets' && s.params.paginationClickable) {
s.paginationContainer.addClass('swiper-pagination-clickable');
}
@@ -372,6 +384,21 @@ if (s.params.pagination) {
}
s.paginationContainer.addClass('swiper-pagination-' + s.params.paginationType);
}
+// Next/Prev Buttons
+if (s.params.nextButton || s.params.prevButton) {
+ if (s.params.nextButton) {
+ s.nextButton = $(s.params.nextButton);
+ if (s.params.uniqueNavElements && typeof s.params.nextButton === 'string' && s.nextButton.length > 1 && s.container.find(s.params.nextButton).length === 1) {
+ s.nextButton = s.container.find(s.params.nextButton);
+ }
+ }
+ if (s.params.prevButton) {
+ s.prevButton = $(s.params.prevButton);
+ if (s.params.uniqueNavElements && typeof s.params.prevButton === 'string' && s.prevButton.length > 1 && s.container.find(s.params.prevButton).length === 1) {
+ s.prevButton = s.container.find(s.params.prevButton);
+ }
+ }
+}
// Is Horizontal
s.isHorizontal = function () {
@@ -619,6 +646,7 @@ s.updateSlidesSize = function () {
i,
prevSlideSize = 0,
index = 0;
+ if (typeof s.size === 'undefined') return;
if (typeof spaceBetween === 'string' && spaceBetween.indexOf('%') >= 0) {
spaceBetween = parseFloat(spaceBetween.replace('%', '')) / 100 * s.size;
}
@@ -757,7 +785,7 @@ s.updateSlidesSize = function () {
}
}
s.snapGrid = newSlidesGrid;
- if (Math.floor(s.virtualSize - s.size) > Math.floor(s.snapGrid[s.snapGrid.length - 1])) {
+ if (Math.floor(s.virtualSize - s.size) - Math.floor(s.snapGrid[s.snapGrid.length - 1]) > 1) {
s.snapGrid.push(s.virtualSize - s.size);
}
}
@@ -879,8 +907,16 @@ s.updateClasses = function () {
var activeSlide = s.slides.eq(s.activeIndex);
// Active classes
activeSlide.addClass(s.params.slideActiveClass);
- activeSlide.next('.' + s.params.slideClass).addClass(s.params.slideNextClass);
- activeSlide.prev('.' + s.params.slideClass).addClass(s.params.slidePrevClass);
+ // Next Slide
+ var nextSlide = activeSlide.next('.' + s.params.slideClass).addClass(s.params.slideNextClass);
+ if (s.params.loop && nextSlide.length === 0) {
+ s.slides.eq(0).addClass(s.params.slideNextClass);
+ }
+ // Prev Slide
+ var prevSlide = activeSlide.prev('.' + s.params.slideClass).addClass(s.params.slidePrevClass);
+ if (s.params.loop && prevSlide.length === 0) {
+ s.slides.eq(-1).addClass(s.params.slidePrevClass);
+ }
// Pagination
if (s.paginationContainer && s.paginationContainer.length > 0) {
@@ -888,7 +924,7 @@ s.updateClasses = function () {
var current,
total = s.params.loop ? Math.ceil((s.slides.length - s.loopedSlides * 2) / s.params.slidesPerGroup) : s.snapGrid.length;
if (s.params.loop) {
- current = Math.ceil(s.activeIndex - s.loopedSlides)/s.params.slidesPerGroup;
+ current = Math.ceil((s.activeIndex - s.loopedSlides)/s.params.slidesPerGroup);
if (current > s.slides.length - 1 - s.loopedSlides * 2) {
current = current - (s.slides.length - s.loopedSlides * 2);
}
@@ -931,29 +967,30 @@ s.updateClasses = function () {
}
if (s.params.paginationType === 'custom' && s.params.paginationCustomRender) {
s.paginationContainer.html(s.params.paginationCustomRender(s, current + 1, total));
+ s.emit('onPaginationRendered', s, s.paginationContainer[0]);
}
}
// Next/active buttons
if (!s.params.loop) {
- if (s.params.prevButton) {
+ if (s.params.prevButton && s.prevButton && s.prevButton.length > 0) {
if (s.isBeginning) {
- $(s.params.prevButton).addClass(s.params.buttonDisabledClass);
- if (s.params.a11y && s.a11y) s.a11y.disable($(s.params.prevButton));
+ s.prevButton.addClass(s.params.buttonDisabledClass);
+ if (s.params.a11y && s.a11y) s.a11y.disable(s.prevButton);
}
else {
- $(s.params.prevButton).removeClass(s.params.buttonDisabledClass);
- if (s.params.a11y && s.a11y) s.a11y.enable($(s.params.prevButton));
+ s.prevButton.removeClass(s.params.buttonDisabledClass);
+ if (s.params.a11y && s.a11y) s.a11y.enable(s.prevButton);
}
}
- if (s.params.nextButton) {
+ if (s.params.nextButton && s.nextButton && s.nextButton.length > 0) {
if (s.isEnd) {
- $(s.params.nextButton).addClass(s.params.buttonDisabledClass);
- if (s.params.a11y && s.a11y) s.a11y.disable($(s.params.nextButton));
+ s.nextButton.addClass(s.params.buttonDisabledClass);
+ if (s.params.a11y && s.a11y) s.a11y.disable(s.nextButton);
}
else {
- $(s.params.nextButton).removeClass(s.params.buttonDisabledClass);
- if (s.params.a11y && s.a11y) s.a11y.enable($(s.params.nextButton));
+ s.nextButton.removeClass(s.params.buttonDisabledClass);
+ if (s.params.a11y && s.a11y) s.a11y.enable(s.nextButton);
}
}
}
@@ -1003,6 +1040,9 @@ s.updatePagination = function () {
}
s.paginationContainer.html(paginationHTML);
}
+ if (s.params.paginationType !== 'custom') {
+ s.emit('onPaginationRendered', s, s.paginationContainer[0]);
+ }
}
};
/*=========================
@@ -1074,6 +1114,7 @@ s.onResize = function (forceUpdatePagination) {
if (s.controller && s.controller.spline) {
s.controller.spline = undefined;
}
+ var slideChangedBySlideTo = false;
if (s.params.freeMode) {
var newTranslate = Math.min(Math.max(s.translate, s.maxTranslate()), s.minTranslate());
s.setWrapperTranslate(newTranslate);
@@ -1087,12 +1128,15 @@ s.onResize = function (forceUpdatePagination) {
else {
s.updateClasses();
if ((s.params.slidesPerView === 'auto' || s.params.slidesPerView > 1) && s.isEnd && !s.params.centeredSlides) {
- s.slideTo(s.slides.length - 1, 0, false, true);
+ slideChangedBySlideTo = s.slideTo(s.slides.length - 1, 0, false, true);
}
else {
- s.slideTo(s.activeIndex, 0, false, true);
+ slideChangedBySlideTo = s.slideTo(s.activeIndex, 0, false, true);
}
}
+ if (s.params.lazyLoading && !slideChangedBySlideTo && s.lazy) {
+ s.lazy.load();
+ }
// Return locks after resize
s.params.allowSwipeToPrev = allowSwipeToPrev;
s.params.allowSwipeToNext = allowSwipeToNext;
@@ -1148,23 +1192,23 @@ s.initEvents = function (detach) {
window[action]('resize', s.onResize);
// Next, Prev, Index
- if (s.params.nextButton) {
- $(s.params.nextButton)[actionDom]('click', s.onClickNext);
- if (s.params.a11y && s.a11y) $(s.params.nextButton)[actionDom]('keydown', s.a11y.onEnterKey);
+ if (s.params.nextButton && s.nextButton && s.nextButton.length > 0) {
+ s.nextButton[actionDom]('click', s.onClickNext);
+ if (s.params.a11y && s.a11y) s.nextButton[actionDom]('keydown', s.a11y.onEnterKey);
}
- if (s.params.prevButton) {
- $(s.params.prevButton)[actionDom]('click', s.onClickPrev);
- if (s.params.a11y && s.a11y) $(s.params.prevButton)[actionDom]('keydown', s.a11y.onEnterKey);
+ if (s.params.prevButton && s.prevButton && s.prevButton.length > 0) {
+ s.prevButton[actionDom]('click', s.onClickPrev);
+ if (s.params.a11y && s.a11y) s.prevButton[actionDom]('keydown', s.a11y.onEnterKey);
}
if (s.params.pagination && s.params.paginationClickable) {
- $(s.paginationContainer)[actionDom]('click', '.' + s.params.bulletClass, s.onClickIndex);
- if (s.params.a11y && s.a11y) $(s.paginationContainer)[actionDom]('keydown', '.' + s.params.bulletClass, s.a11y.onEnterKey);
+ s.paginationContainer[actionDom]('click', '.' + s.params.bulletClass, s.onClickIndex);
+ if (s.params.a11y && s.a11y) s.paginationContainer[actionDom]('keydown', '.' + s.params.bulletClass, s.a11y.onEnterKey);
}
// Prevent Links Clicks
if (s.params.preventClicks || s.params.preventClicksPropagation) touchEventsTarget[action]('click', s.preventClicks, true);
};
-s.attachEvents = function (detach) {
+s.attachEvents = function () {
s.initEvents();
};
s.detachEvents = function () {
@@ -1360,7 +1404,11 @@ s.onTouchStart = function (e) {
s.onTouchMove = function (e) {
if (e.originalEvent) e = e.originalEvent;
if (isTouchEvent && e.type === 'mousemove') return;
- if (e.preventedByNestedSwiper) return;
+ if (e.preventedByNestedSwiper) {
+ s.touches.startX = e.type === 'touchmove' ? e.targetTouches[0].pageX : e.pageX;
+ s.touches.startY = e.type === 'touchmove' ? e.targetTouches[0].pageY : e.pageY;
+ return;
+ }
if (s.params.onlyExternal) {
// isMoved = true;
s.allowClick = false;
@@ -2125,6 +2173,16 @@ s.destroyLoop = function () {
s.wrapper.children('.' + s.params.slideClass + '.' + s.params.slideDuplicateClass).remove();
s.slides.removeAttr('data-swiper-slide-index');
};
+s.reLoop = function (updatePosition) {
+ var oldIndex = s.activeIndex - s.loopedSlides;
+ s.destroyLoop();
+ s.createLoop();
+ s.updateSlidesSize();
+ if (updatePosition) {
+ s.slideTo(oldIndex + s.loopedSlides, 0, false);
+ }
+
+};
s.fixLoop = function () {
var newIndex;
//Fix For Negative Oversliding
diff --git a/dashboard-ui/bower_components/Swiper/src/js/lazy-load.js b/dashboard-ui/bower_components/Swiper/src/js/lazy-load.js
index 8fc6c1266..fb546d667 100644
--- a/dashboard-ui/bower_components/Swiper/src/js/lazy-load.js
+++ b/dashboard-ui/bower_components/Swiper/src/js/lazy-load.js
@@ -23,7 +23,7 @@ s.lazy = {
srcset = _img.attr('data-srcset');
s.loadImage(_img[0], (src || background), srcset, false, function () {
if (background) {
- _img.css('background-image', 'url(' + background + ')');
+ _img.css('background-image', 'url("' + background + '")');
_img.removeAttr('data-background');
}
else {
diff --git a/dashboard-ui/bower_components/Swiper/src/js/mousewheel.js b/dashboard-ui/bower_components/Swiper/src/js/mousewheel.js
index c9456eb7a..d704d7c0e 100644
--- a/dashboard-ui/bower_components/Swiper/src/js/mousewheel.js
+++ b/dashboard-ui/bower_components/Swiper/src/js/mousewheel.js
@@ -9,8 +9,14 @@ if (s.params.mousewheelControl) {
try {
new window.WheelEvent('wheel');
s.mousewheel.event = 'wheel';
- } catch (e) {}
+ } catch (e) {
+ if (window.WheelEvent || (s.container[0] && 'wheel' in s.container[0])) {
+ s.mousewheel.event = 'wheel';
+ }
+ }
+ if (!s.mousewheel.event && window.WheelEvent) {
+ }
if (!s.mousewheel.event && document.onmousewheel !== undefined) {
s.mousewheel.event = 'mousewheel';
}
@@ -23,10 +29,9 @@ function handleMousewheel(e) {
var we = s.mousewheel.event;
var delta = 0;
var rtlFactor = s.rtl ? -1 : 1;
- //Opera & IE
- if (e.detail) delta = -e.detail;
+
//WebKits
- else if (we === 'mousewheel') {
+ if (we === 'mousewheel') {
if (s.params.mousewheelForceToAxis) {
if (s.isHorizontal()) {
if (Math.abs(e.wheelDeltaX) > Math.abs(e.wheelDeltaY)) delta = e.wheelDeltaX * rtlFactor;
diff --git a/dashboard-ui/bower_components/Swiper/src/js/scrollbar.js b/dashboard-ui/bower_components/Swiper/src/js/scrollbar.js
index add88850c..a96b3dc15 100644
--- a/dashboard-ui/bower_components/Swiper/src/js/scrollbar.js
+++ b/dashboard-ui/bower_components/Swiper/src/js/scrollbar.js
@@ -86,6 +86,9 @@ s.scrollbar = {
if (!s.params.scrollbar) return;
var sb = s.scrollbar;
sb.track = $(s.params.scrollbar);
+ if (s.params.uniqueNavElements && typeof s.params.scrollbar === 'string' && sb.track.length > 1 && s.container.find(s.params.scrollbar).length === 1) {
+ sb.track = s.container.find(s.params.scrollbar);
+ }
sb.drag = sb.track.find('.swiper-scrollbar-drag');
if (sb.drag.length === 0) {
sb.drag = $('');
diff --git a/dashboard-ui/bower_components/emby-apiclient/.bower.json b/dashboard-ui/bower_components/emby-apiclient/.bower.json
index 308b8000d..8ebf5eeda 100644
--- a/dashboard-ui/bower_components/emby-apiclient/.bower.json
+++ b/dashboard-ui/bower_components/emby-apiclient/.bower.json
@@ -16,12 +16,12 @@
},
"devDependencies": {},
"ignore": [],
- "version": "1.0.33",
- "_release": "1.0.33",
+ "version": "1.0.34",
+ "_release": "1.0.34",
"_resolution": {
"type": "version",
- "tag": "1.0.33",
- "commit": "18b04408e1d07fa162db92fa30eec77adfeb0e44"
+ "tag": "1.0.34",
+ "commit": "1bbacdd65aa7c7af955cdd7f0500a4419064a98b"
},
"_source": "git://github.com/MediaBrowser/Emby.ApiClient.Javascript.git",
"_target": "~1.0.3",
diff --git a/dashboard-ui/bower_components/emby-apiclient/apiclient.js b/dashboard-ui/bower_components/emby-apiclient/apiclient.js
index 690e24621..22d55a467 100644
--- a/dashboard-ui/bower_components/emby-apiclient/apiclient.js
+++ b/dashboard-ui/bower_components/emby-apiclient/apiclient.js
@@ -22,8 +22,6 @@
var webSocket;
var serverInfo = {};
- self.enableAppStorePolicy = false;
-
/**
* Gets the server address.
*/
@@ -1654,10 +1652,6 @@
options = options || {};
options.PackageType = "UserInstalled";
- if (self.enableAppStorePolicy) {
- options.IsAppStoreEnabled = true;
- }
-
var url = self.getUrl("Packages", options);
return self.getJSON(url);
@@ -2096,10 +2090,6 @@
var options = {};
- if (self.enableAppStorePolicy) {
- options.IsAppStoreEnabled = true;
- }
-
var url = self.getUrl("Plugins", options);
return self.getJSON(url);
diff --git a/dashboard-ui/bower_components/emby-webcomponents/.bower.json b/dashboard-ui/bower_components/emby-webcomponents/.bower.json
index bd99dcd5b..abce071a6 100644
--- a/dashboard-ui/bower_components/emby-webcomponents/.bower.json
+++ b/dashboard-ui/bower_components/emby-webcomponents/.bower.json
@@ -15,12 +15,12 @@
},
"devDependencies": {},
"ignore": [],
- "version": "1.0.72",
- "_release": "1.0.72",
+ "version": "1.0.74",
+ "_release": "1.0.74",
"_resolution": {
"type": "version",
- "tag": "1.0.72",
- "commit": "c06518f026fe592c24aa79312dcecf025e604ef4"
+ "tag": "1.0.74",
+ "commit": "74afb337ff5f0ee41b75ba5ddb5dea5ec9c20a66"
},
"_source": "git://github.com/MediaBrowser/emby-webcomponents.git",
"_target": "~1.0.0",
diff --git a/dashboard-ui/bower_components/emby-webcomponents/browserdeviceprofile.js b/dashboard-ui/bower_components/emby-webcomponents/browserdeviceprofile.js
index c474cf64a..535f2023f 100644
--- a/dashboard-ui/bower_components/emby-webcomponents/browserdeviceprofile.js
+++ b/dashboard-ui/bower_components/emby-webcomponents/browserdeviceprofile.js
@@ -51,7 +51,27 @@ define(['browser'], function (browser) {
if (format == 'opus') {
typeString = 'audio/ogg; codecs="opus"';
- } else if (format == 'webma') {
+
+ if (document.createElement('audio').canPlayType(typeString).replace(/no/, '')) {
+ return true;
+ }
+
+ // Newer mobile chrome supports it but doesn't report it
+ if (browser.chrome) {
+ var version = (browser.version || '').toString().split('.')[0];
+ try {
+ version = parseInt(version);
+ if (version >= 48) {
+ return true;
+ }
+ } catch (err) {
+
+ }
+ }
+ return false;
+ }
+
+ if (format == 'webma') {
typeString = 'audio/webm';
} else {
typeString = 'audio/' + format;
diff --git a/dashboard-ui/bower_components/emby-webcomponents/prompt/prompt.js b/dashboard-ui/bower_components/emby-webcomponents/prompt/prompt.js
index a4ef3d0f0..8e5b525c5 100644
--- a/dashboard-ui/bower_components/emby-webcomponents/prompt/prompt.js
+++ b/dashboard-ui/bower_components/emby-webcomponents/prompt/prompt.js
@@ -1,4 +1,4 @@
-define(['paperdialoghelper', 'layoutManager', 'html!./icons.html', 'css!./style.css', 'paper-button', 'paper-input'], function (paperdialoghelper, layoutManager) {
+define(['paperdialoghelper', 'layoutManager', 'globalize', 'dialogText', 'html!./icons.html', 'css!./style.css', 'paper-button', 'paper-input'], function (paperdialoghelper, layoutManager, globalize, dialogText) {
function show(options, resolve, reject) {
@@ -37,10 +37,12 @@ define(['paperdialoghelper', 'layoutManager', 'html!./icons.html', 'css!./style.
// TODO: An actual form element should probably be added
html += ' ';
if (raisedButtons) {
- html += '' + Globalize.translate('core#ButtonOk') + '';
+ html += '' + globalize.translate(dialogText.buttonOk) + '';
} else {
- html += '' + Globalize.translate('core#ButtonOk') + '';
- html += '' + Globalize.translate('core#ButtonCancel') + '';
+ html += '
';
+ html += '' + globalize.translate(dialogText.buttonOk) + '';
+ html += '' + globalize.translate(dialogText.buttonCancel) + '';
+ html += '
';
}
html += '';
diff --git a/dashboard-ui/bower_components/iron-behaviors/.bower.json b/dashboard-ui/bower_components/iron-behaviors/.bower.json
index 17f68b335..db08f2170 100644
--- a/dashboard-ui/bower_components/iron-behaviors/.bower.json
+++ b/dashboard-ui/bower_components/iron-behaviors/.bower.json
@@ -29,14 +29,14 @@
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
},
"ignore": [],
- "homepage": "https://github.com/polymerelements/iron-behaviors",
+ "homepage": "https://github.com/PolymerElements/iron-behaviors",
"_release": "1.0.12",
"_resolution": {
"type": "version",
"tag": "v1.0.12",
"commit": "657f526a2382a659cdf4e13be87ecc89261588a3"
},
- "_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-dropdown/.bower.json b/dashboard-ui/bower_components/iron-dropdown/.bower.json
index aca2b46fb..b76dd1702 100644
--- a/dashboard-ui/bower_components/iron-dropdown/.bower.json
+++ b/dashboard-ui/bower_components/iron-dropdown/.bower.json
@@ -1,6 +1,6 @@
{
"name": "iron-dropdown",
- "version": "1.1.0",
+ "version": "1.2.0",
"description": "An unstyled element that works similarly to a native browser select",
"authors": [
"The Polymer Authors"
@@ -32,15 +32,15 @@
"iron-test-helpers": "polymerelements/iron-test-helpers#^1.0.0",
"paper-styles": "polymerelements/paper-styles#^1.0.0",
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0",
- "web-component-tester": "*",
+ "web-component-tester": "^4.0.0",
"iron-image": "polymerelements/iron-image#^1.0.0"
},
"ignore": [],
- "_release": "1.1.0",
+ "_release": "1.2.0",
"_resolution": {
"type": "version",
- "tag": "v1.1.0",
- "commit": "b09b0d57ba917bac9315de4761373d88e85ac52e"
+ "tag": "v1.2.0",
+ "commit": "f864191c6ffbd3aaddea8102102ab40137046327"
},
"_source": "git://github.com/polymerelements/iron-dropdown.git",
"_target": "^1.0.0",
diff --git a/dashboard-ui/bower_components/iron-dropdown/.travis.yml b/dashboard-ui/bower_components/iron-dropdown/.travis.yml
index 60801d068..771c6b21b 100644
--- a/dashboard-ui/bower_components/iron-dropdown/.travis.yml
+++ b/dashboard-ui/bower_components/iron-dropdown/.travis.yml
@@ -1,22 +1,25 @@
language: node_js
sudo: false
before_script:
- - npm install web-component-tester
- - npm install bower
- - 'export PATH=$PWD/node_modules/.bin:$PATH'
+ - npm install -g bower polylint web-component-tester
- bower install
+ - polylint
env:
global:
- secure: Nd7sbgkYVekuQRB4K3svNCL3veA6t6aGopNP2FUxlJvQuzRV1vKV67angPvMUAFelEA7/rTzrFPBMfNbsz9C2wInLLLPux4wEk1MQX+2KYZVeXKMHjgl8iQKMXnodaL7XXwBPg0L7053TWtYkIt8wZ/vN0JGPQFKhlQkSrduztkPCJQfkFsMPJ7SudPG3Ld0UPBVxo8TwH/d44p8VhLGiI0oEWw3GnGZZ1T7RJLDAVBwj1BiVHAOaS0SSeOR3ngpZyXbk8OItgzw4o/bbAt2yrHMfwymBy0Xv9v3G0QLFJnMi/gE2lWnN4+IttUPI8gVyr1TuiTgtFxdwteLO3R5iFe+qlQjq0VGssmAHcPwtLhvrT4wEkGMc8ZeyW11z+GdkIw4XHGACWj+9Jz9f19mJd9xU3fkJ+f5mFiB8vEkzjsUI9pswgd3RoHt2WewcVdHnCED2wRdQCw9H34dX7d2ieWKPl/pv+EKZOgEJJ8UNZMyKnj57Y25WRrTpIQBt6p9uVv5MsiZQm7Sd1pYQnJKPQ+BxvvL5fsoT1YkFSjyz9gwijtftXhfL8KLB6i04V3mra3f9d5hc20wAOt+ad+mTOkaM/aGxE/I3Ko13BceMvRSNzuz+N2WE6FEJj1NuOCW/AeSh5/6n9nnlDeu7Nu7VeM9kjk4dyBGNRDWLNcSCEk=
- secure: aFsYKL6Sw8/r57wzj3pnzEwBE1mnTajJasHAbXgQMd336S2Sq/f39DCNTXgKBA4AKZGvWKe8w9nzaocQoMa4l9bLWEBJMCMPQFawOhTkuEjsLjpU3g74b46/EhjBP5zixR32xoyF5o9FTzC6UyrDjt2XpKwIQJYxaEfoyIW1vTPdoasWdaG5rXvWFTsmXtaMDpCKFH9aQ1DHn9Sbi9NZlR4izdULsbv9GZwg53xvuH4xYEkGtB29KKy04uK1nJ+9SmRWTAnu4Q/ivYWlbwBArjiYTTi0wclvDNvT1iaFNAaeK2pJea8CnoyJJ0pg9NcuzZtStGUvP00kGUpJQ4lqkr+gBCHDPYtoZ17XCz59cg6LrhG1q//vPi7Yz0xW51GHuwmcVs+PsjmWaRuO/1UFreDCQYf+GU4I1pQZf2q1R4m8noe4i5CcFXLKTrC4udBzPmzVB4As2LsxRc3HCIXmhaMxI8MJwdkQBA22u4vCwU2xpqBawJocj0Gvbeme6wG99PW7+XSkijQDk2cTJ5/CJtY22nAECvn4tve3OVvybSTjQ1yipLxJm/dtjgEXFWtknFZr++tId88wPd3EBtrwEhliD3zD/TyLPO2RPZGuI0i6oD3O89P5d8qp66T/eByDr1IEm0+FIQjgiCEMbhmaIuUKGG2GCfwPglI3uR0kbg0=
-node_js: 4
+ - CXX=g++-4.8
+node_js: stable
addons:
firefox: latest
apt:
sources:
- google-chrome
+ - ubuntu-toolchain-r-test
packages:
- google-chrome-stable
+ - g++-4.8
+ sauce_connect: true
script:
- xvfb-run wct
- "if [ \"${TRAVIS_PULL_REQUEST}\" = \"false\" ]; then wct -s 'default'; fi"
diff --git a/dashboard-ui/bower_components/iron-dropdown/CONTRIBUTING.md b/dashboard-ui/bower_components/iron-dropdown/CONTRIBUTING.md
index 7b1014156..f147978a3 100644
--- a/dashboard-ui/bower_components/iron-dropdown/CONTRIBUTING.md
+++ b/dashboard-ui/bower_components/iron-dropdown/CONTRIBUTING.md
@@ -5,6 +5,11 @@ https://github.com/PolymerElements/ContributionGuide/blob/master/CONTRIBUTING.md
If you edit that file, it will get updated everywhere else.
If you edit this file, your changes will get overridden :)
+
+You can however override the jsbin link with one that's customized to this
+specific element:
+
+jsbin=https://jsbin.com/cagaye/edit?html,output
-->
# Polymer Elements
## Guide for Contributors
@@ -41,7 +46,7 @@ Polymer Elements are built in the open, and the Polymer authors eagerly encourag
3. Click the `paper-foo` element.
```
- 2. **A reduced test case that demonstrates the problem.** If possible, please include the test case as a JSBin. Start with this template to easily import and use relevant Polymer Elements: [http://jsbin.com/cagaye](http://jsbin.com/cagaye/edit?html,output).
+ 2. **A reduced test case that demonstrates the problem.** If possible, please include the test case as a JSBin. Start with this template to easily import and use relevant Polymer Elements: [https://jsbin.com/cagaye/edit?html,output](https://jsbin.com/cagaye/edit?html,output).
3. **A list of browsers where the problem occurs.** This can be skipped if the problem is the same across all browsers.
@@ -51,14 +56,14 @@ Polymer Elements are built in the open, and the Polymer authors eagerly encourag
When submitting pull requests, please provide:
- 1. **A reference to the corresponding issue** or issues that will be closed by the pull request. Please refer to these issues using the following syntax:
+ 1. **A reference to the corresponding issue** or issues that will be closed by the pull request. Please refer to these issues in the pull request description using the following syntax:
```markdown
(For a single issue)
Fixes #20
(For multiple issues)
- Fixes #32, #40
+ Fixes #32, fixes #40
```
2. **A succinct description of the design** used to fix any related issues. For example:
diff --git a/dashboard-ui/bower_components/iron-dropdown/bower.json b/dashboard-ui/bower_components/iron-dropdown/bower.json
index a047d3193..8b9b75b4b 100644
--- a/dashboard-ui/bower_components/iron-dropdown/bower.json
+++ b/dashboard-ui/bower_components/iron-dropdown/bower.json
@@ -1,6 +1,6 @@
{
"name": "iron-dropdown",
- "version": "1.1.0",
+ "version": "1.2.0",
"description": "An unstyled element that works similarly to a native browser select",
"authors": [
"The Polymer Authors"
@@ -32,7 +32,7 @@
"iron-test-helpers": "polymerelements/iron-test-helpers#^1.0.0",
"paper-styles": "polymerelements/paper-styles#^1.0.0",
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0",
- "web-component-tester": "*",
+ "web-component-tester": "^4.0.0",
"iron-image": "polymerelements/iron-image#^1.0.0"
},
"ignore": []
diff --git a/dashboard-ui/bower_components/iron-dropdown/iron-dropdown-scroll-manager.html b/dashboard-ui/bower_components/iron-dropdown/iron-dropdown-scroll-manager.html
index 74234483f..14f8933d0 100644
--- a/dashboard-ui/bower_components/iron-dropdown/iron-dropdown-scroll-manager.html
+++ b/dashboard-ui/bower_components/iron-dropdown/iron-dropdown-scroll-manager.html
@@ -79,6 +79,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
* @param {HTMLElement} element The element that should lock scroll.
*/
pushScrollLock: function(element) {
+ // Prevent pushing the same element twice
+ if (this._lockingElements.indexOf(element) >= 0) {
+ return;
+ }
+
if (this._lockingElements.length === 0) {
this._lockScrollInteractions();
}
@@ -172,7 +177,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
_scrollInteractionHandler: function(event) {
if (Polymer
.IronDropdownScrollManager
- .elementIsScrollLocked(event.target)) {
+ .elementIsScrollLocked(Polymer.dom(event).rootTarget)) {
if (event.type === 'keydown' &&
!Polymer.IronDropdownScrollManager._isScrollingKeypress(event)) {
return;
@@ -199,13 +204,13 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
document.body.style.overflowY = 'hidden';
// Modern `wheel` event for mouse wheel scrolling:
- window.addEventListener('wheel', this._scrollInteractionHandler, true);
+ document.addEventListener('wheel', this._scrollInteractionHandler, true);
// Older, non-standard `mousewheel` event for some FF:
- window.addEventListener('mousewheel', this._scrollInteractionHandler, true);
+ document.addEventListener('mousewheel', this._scrollInteractionHandler, true);
// IE:
- window.addEventListener('DOMMouseScroll', this._scrollInteractionHandler, true);
+ document.addEventListener('DOMMouseScroll', this._scrollInteractionHandler, true);
// Mobile devices can scroll on touch move:
- window.addEventListener('touchmove', this._scrollInteractionHandler, true);
+ document.addEventListener('touchmove', this._scrollInteractionHandler, true);
// Capture keydown to prevent scrolling keys (pageup, pagedown etc.)
document.addEventListener('keydown', this._scrollInteractionHandler, true);
},
@@ -215,10 +220,10 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
document.body.style.overflowX = this._originalBodyStyles.overflowX;
document.body.style.overflowY = this._originalBodyStyles.overflowY;
- window.removeEventListener('wheel', this._scrollInteractionHandler, true);
- window.removeEventListener('mousewheel', this._scrollInteractionHandler, true);
- window.removeEventListener('DOMMouseScroll', this._scrollInteractionHandler, true);
- window.removeEventListener('touchmove', this._scrollInteractionHandler, true);
+ document.removeEventListener('wheel', this._scrollInteractionHandler, true);
+ document.removeEventListener('mousewheel', this._scrollInteractionHandler, true);
+ document.removeEventListener('DOMMouseScroll', this._scrollInteractionHandler, true);
+ document.removeEventListener('touchmove', this._scrollInteractionHandler, true);
document.removeEventListener('keydown', this._scrollInteractionHandler, true);
}
};
diff --git a/dashboard-ui/bower_components/iron-dropdown/iron-dropdown.html b/dashboard-ui/bower_components/iron-dropdown/iron-dropdown.html
index 3cb084bc4..b4c0e6131 100644
--- a/dashboard-ui/bower_components/iron-dropdown/iron-dropdown.html
+++ b/dashboard-ui/bower_components/iron-dropdown/iron-dropdown.html
@@ -224,6 +224,7 @@ method is called on the element.
/**
* The element that should be focused when the dropdown opens.
+ * @deprecated
*/
get _focusTarget() {
return this.focusTarget || this.containedElement;
@@ -323,10 +324,6 @@ method is called on the element.
this._prepareDropdown();
Polymer.IronOverlayBehaviorImpl._openedChanged.apply(this, arguments);
}
-
- if (this.opened) {
- this._focusContent();
- }
},
/**
@@ -381,7 +378,7 @@ method is called on the element.
var scrollTop;
var scrollLeft;
- if (containedElement) {
+ if (this.opened && containedElement) {
scrollTop = containedElement.scrollTop;
scrollLeft = containedElement.scrollLeft;
}
@@ -392,7 +389,7 @@ method is called on the element.
Polymer.IronOverlayBehaviorImpl._onIronResize.apply(this, arguments);
- if (containedElement) {
+ if (this.opened && containedElement) {
containedElement.scrollTop = scrollTop;
containedElement.scrollLeft = scrollLeft;
}
@@ -477,16 +474,15 @@ method is called on the element.
},
/**
- * Focuses the configured focus target.
+ * Apply focus to focusTarget or containedElement
*/
- _focusContent: function() {
- // NOTE(cdata): This is async so that it can attempt the focus after
- // `display: none` is removed from the element.
- this.async(function() {
- if (this._focusTarget) {
- this._focusTarget.focus();
- }
- });
+ _applyFocus: function () {
+ var focusTarget = this.focusTarget || this.containedElement;
+ if (focusTarget && this.opened && !this.noAutoFocus) {
+ focusTarget.focus();
+ } else {
+ Polymer.IronOverlayBehaviorImpl._applyFocus.apply(this, arguments);
+ }
}
});
})();
diff --git a/dashboard-ui/bower_components/iron-dropdown/test/iron-dropdown-scroll-manager.html b/dashboard-ui/bower_components/iron-dropdown/test/iron-dropdown-scroll-manager.html
index 33cdcea2a..885a5f91a 100644
--- a/dashboard-ui/bower_components/iron-dropdown/test/iron-dropdown-scroll-manager.html
+++ b/dashboard-ui/bower_components/iron-dropdown/test/iron-dropdown-scroll-manager.html
@@ -21,19 +21,13 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
+
-
-
-
-
-
-
-
-
+
diff --git a/dashboard-ui/bower_components/iron-dropdown/test/iron-dropdown.html b/dashboard-ui/bower_components/iron-dropdown/test/iron-dropdown.html
index 1031e3918..b355352f1 100644
--- a/dashboard-ui/bower_components/iron-dropdown/test/iron-dropdown.html
+++ b/dashboard-ui/bower_components/iron-dropdown/test/iron-dropdown.html
@@ -118,6 +118,13 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
contentRect.height > 0;
}
+ function runAfterOpen(overlay, cb) {
+ overlay.addEventListener('iron-overlay-opened', function () {
+ Polymer.Base.async(cb, 1);
+ });
+ overlay.open();
+ }
+
suite('', function() {
var dropdown;
var content;
@@ -133,31 +140,20 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
});
test('shows dropdown content when opened', function(done) {
- dropdown.open();
-
- Polymer.Base.async(function() {
+ runAfterOpen(dropdown, function () {
expect(elementIsVisible(content)).to.be.equal(true);
done();
});
});
test('hides dropdown content when outside is clicked', function(done) {
- dropdown.open();
-
- Polymer.Base.async(function() {
+ runAfterOpen(dropdown, function () {
expect(elementIsVisible(content)).to.be.equal(true);
-
- // The document capture-click listeners are set async.
- // Note(noms): I think this bit in iron-overlay-behavior is pretty
- // brittle, so if the tests start failing in the future, make sure
- // _toggleListeners is getting called at the right time.
+ MockInteractions.tap(dropdown.parentNode);
Polymer.Base.async(function() {
- MockInteractions.tap(dropdown.parentNode);
- Polymer.Base.async(function() {
- expect(elementIsVisible(content)).to.be.equal(false);
- done();
- }, 100);
- }, 1);
+ expect(elementIsVisible(content)).to.be.equal(false);
+ done();
+ }, 10);
});
});
@@ -167,9 +163,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
content = Polymer.dom(dropdown).querySelector('.dropdown-content');
});
test('focuses the content when opened', function(done) {
- dropdown.open();
-
- Polymer.Base.async(function() {
+ runAfterOpen(dropdown, function () {
expect(document.activeElement).to.be.equal(content);
done();
});
@@ -179,9 +173,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
var focusableChild = Polymer.dom(content).querySelector('div[tabindex]');
dropdown.focusTarget = focusableChild;
- dropdown.open();
-
- Polymer.Base.async(function() {
+ runAfterOpen(dropdown, function () {
expect(document.activeElement).to.not.be.equal(content);
expect(document.activeElement).to.be.equal(focusableChild);
done();
@@ -193,14 +185,40 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
suite('locking scroll', function() {
var dropdown;
+ setup(function() {
+ dropdown = fixture('TrivialDropdown');
+ });
+
+ test('should lock, only once', function(done) {
+ var openCount = 0;
+ runAfterOpen(dropdown, function() {
+ expect(Polymer.IronDropdownScrollManager._lockingElements.length)
+ .to.be.equal(1);
+ expect(Polymer.IronDropdownScrollManager.elementIsScrollLocked(document.body))
+ .to.be.equal(true);
+
+ if(openCount === 0) {
+ // This triggers a second `pushScrollLock` with the same element, however
+ // that should not add the element to the `_lockingElements` stack twice
+ dropdown.close();
+ dropdown.open();
+ } else {
+ done();
+ }
+ openCount++;
+ });
+ });
+ });
+
+ suite('non locking scroll', function() {
+ var dropdown;
+
setup(function() {
dropdown = fixture('NonLockingDropdown');
});
test('can be disabled with `allowOutsideScroll`', function(done) {
- dropdown.open();
-
- Polymer.Base.async(function() {
+ runAfterOpen(dropdown, function () {
expect(Polymer.IronDropdownScrollManager.elementIsScrollLocked(document.body))
.to.be.equal(false);
done();
@@ -219,9 +237,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
var parentRect;
var dropdownRect;
- dropdown.opened = true;
-
- Polymer.Base.async(function() {
+ runAfterOpen(dropdown, function () {
dropdownRect = dropdown.getBoundingClientRect();
parentRect = parent.getBoundingClientRect();
@@ -230,7 +246,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
expect(dropdownRect.top).to.be.closeTo(parentRect.top, 0.1);
expect(dropdownRect.right).to.be.closeTo(parentRect.right, 0.1);
done();
- }, 1);
+ });
});
test('can be re-aligned to the bottom', function(done) {
@@ -238,9 +254,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
var dropdownRect;
dropdown.verticalAlign = 'bottom';
- dropdown.opened = true;
-
- Polymer.Base.async(function() {
+ runAfterOpen(dropdown, function () {
parentRect = parent.getBoundingClientRect();
dropdownRect = dropdown.getBoundingClientRect();
@@ -249,7 +263,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
expect(dropdownRect.bottom).to.be.closeTo(parentRect.bottom, 0.1);
expect(dropdownRect.right).to.be.closeTo(parentRect.right, 0.1);
done();
- }, 1);
+ });
});
});
@@ -263,9 +277,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
});
test('can be offset towards the bottom right', function(done) {
- dropdown.opened = true;
-
- Polymer.Base.async(function() {
+ runAfterOpen(dropdown, function () {
dropdownRect = dropdown.getBoundingClientRect();
dropdown.verticalOffset = 10;
@@ -277,13 +289,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
// horizontalAlign is left, so a positive offset moves to the right.
expect(dropdownRect.left + 10).to.be.closeTo(offsetDropdownRect.left, 0.1);
done();
- }, 1);
+ });
});
test('can be offset towards the top left', function(done) {
- dropdown.opened = true;
-
- Polymer.Base.async(function() {
+ runAfterOpen(dropdown, function () {
dropdownRect = dropdown.getBoundingClientRect();
dropdown.verticalOffset = -10;
@@ -295,7 +305,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
// horizontalAlign is left, so a negative offset moves to the left.
expect(dropdownRect.left - 10).to.be.closeTo(offsetDropdownRect.left, 0.1);
done();
- }, 1);
+ });
});
});
@@ -309,9 +319,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
});
test('can be offset towards the top left', function(done) {
- dropdown.opened = true;
-
- Polymer.Base.async(function() {
+ runAfterOpen(dropdown, function () {
dropdownRect = dropdown.getBoundingClientRect();
dropdown.verticalOffset = 10;
@@ -323,13 +331,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
// horizontalAlign is right, so a positive offset moves to the left.
expect(dropdownRect.right - 10).to.be.closeTo(offsetDropdownRect.right, 0.1);
done();
- }, 1);
+ });
});
test('can be offset towards the bottom right', function(done) {
- dropdown.opened = true;
-
- Polymer.Base.async(function() {
+ runAfterOpen(dropdown, function () {
dropdownRect = dropdown.getBoundingClientRect();
dropdown.verticalOffset = -10;
@@ -341,7 +347,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
// horizontalAlign is right, so a positive offset moves to the right.
expect(dropdownRect.right + 10).to.be.closeTo(offsetDropdownRect.right, 0.1);
done();
- }, 1);
+ });
});
});
@@ -352,9 +358,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
test('with horizontalAlign=left', function(done) {
var parent = fixture('RTLDropdownLeft');
dropdown = parent.querySelector('iron-dropdown');
- dropdown.open();
-
- Polymer.Base.async(function() {
+ runAfterOpen(dropdown, function () {
// In RTL, if `horizontalAlign` is "left", that's the same as
// being right-aligned in LTR. So the dropdown should be in the top
// right corner.
@@ -368,9 +372,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
test('with horizontalAlign=right', function(done) {
var parent = fixture('RTLDropdownRight');
dropdown = parent.querySelector('iron-dropdown');
- dropdown.open();
-
- Polymer.Base.async(function() {
+ runAfterOpen(dropdown, function () {
// In RTL, if `horizontalAlign` is "right", that's the same as
// being left-aligned in LTR. So the dropdown should be in the top
// left corner.
diff --git a/dashboard-ui/bower_components/iron-dropdown/test/x-scrollable-element.html b/dashboard-ui/bower_components/iron-dropdown/test/x-scrollable-element.html
new file mode 100644
index 000000000..a3012e222
--- /dev/null
+++ b/dashboard-ui/bower_components/iron-dropdown/test/x-scrollable-element.html
@@ -0,0 +1,27 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/dashboard-ui/bower_components/iron-overlay-behavior/.bower.json b/dashboard-ui/bower_components/iron-overlay-behavior/.bower.json
index fb63745b7..4ee51f419 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.2.0",
+ "version": "1.3.0",
"license": "http://polymer.github.io/LICENSE.txt",
"description": "Provides a behavior for making an element an overlay",
"private": true,
@@ -19,26 +19,25 @@
"url": "git://github.com/PolymerElements/iron-overlay-behavior.git"
},
"dependencies": {
- "polymer": "Polymer/polymer#^1.0.0",
"iron-fit-behavior": "PolymerElements/iron-fit-behavior#^1.0.0",
- "iron-resizable-behavior": "PolymerElements/iron-resizable-behavior#^1.0.0"
+ "iron-resizable-behavior": "PolymerElements/iron-resizable-behavior#^1.0.0",
+ "polymer": "Polymer/polymer#^1.0.0"
},
"devDependencies": {
- "paper-styles": "polymerelements/paper-styles#^1.0.2",
"iron-component-page": "PolymerElements/iron-component-page#^1.0.0",
"iron-flex-layout": "PolymerElements/iron-flex-layout#^1.0.0",
"iron-test-helpers": "PolymerElements/iron-test-helpers#^1.0.0",
- "test-fixture": "PolymerElements/test-fixture#^1.0.0",
+ "paper-styles": "PolymerElements/paper-styles#^1.0.2",
"web-component-tester": "^4.0.0",
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
},
"ignore": [],
"homepage": "https://github.com/polymerelements/iron-overlay-behavior",
- "_release": "1.2.0",
+ "_release": "1.3.0",
"_resolution": {
"type": "version",
- "tag": "v1.2.0",
- "commit": "1d8e1d29c601add9c135e5103c4d1d0d652dd957"
+ "tag": "v1.3.0",
+ "commit": "b488ce94ec1c17c3a5491af1a2fba2f7382684da"
},
"_source": "git://github.com/polymerelements/iron-overlay-behavior.git",
"_target": "^1.0.0",
diff --git a/dashboard-ui/bower_components/iron-overlay-behavior/CONTRIBUTING.md b/dashboard-ui/bower_components/iron-overlay-behavior/CONTRIBUTING.md
index 7b1014156..f147978a3 100644
--- a/dashboard-ui/bower_components/iron-overlay-behavior/CONTRIBUTING.md
+++ b/dashboard-ui/bower_components/iron-overlay-behavior/CONTRIBUTING.md
@@ -5,6 +5,11 @@ https://github.com/PolymerElements/ContributionGuide/blob/master/CONTRIBUTING.md
If you edit that file, it will get updated everywhere else.
If you edit this file, your changes will get overridden :)
+
+You can however override the jsbin link with one that's customized to this
+specific element:
+
+jsbin=https://jsbin.com/cagaye/edit?html,output
-->
# Polymer Elements
## Guide for Contributors
@@ -41,7 +46,7 @@ Polymer Elements are built in the open, and the Polymer authors eagerly encourag
3. Click the `paper-foo` element.
```
- 2. **A reduced test case that demonstrates the problem.** If possible, please include the test case as a JSBin. Start with this template to easily import and use relevant Polymer Elements: [http://jsbin.com/cagaye](http://jsbin.com/cagaye/edit?html,output).
+ 2. **A reduced test case that demonstrates the problem.** If possible, please include the test case as a JSBin. Start with this template to easily import and use relevant Polymer Elements: [https://jsbin.com/cagaye/edit?html,output](https://jsbin.com/cagaye/edit?html,output).
3. **A list of browsers where the problem occurs.** This can be skipped if the problem is the same across all browsers.
@@ -51,14 +56,14 @@ Polymer Elements are built in the open, and the Polymer authors eagerly encourag
When submitting pull requests, please provide:
- 1. **A reference to the corresponding issue** or issues that will be closed by the pull request. Please refer to these issues using the following syntax:
+ 1. **A reference to the corresponding issue** or issues that will be closed by the pull request. Please refer to these issues in the pull request description using the following syntax:
```markdown
(For a single issue)
Fixes #20
(For multiple issues)
- Fixes #32, #40
+ Fixes #32, fixes #40
```
2. **A succinct description of the design** used to fix any related issues. For example:
diff --git a/dashboard-ui/bower_components/iron-overlay-behavior/bower.json b/dashboard-ui/bower_components/iron-overlay-behavior/bower.json
index e6f916d11..7a5aa4dc0 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.2.0",
+ "version": "1.3.0",
"license": "http://polymer.github.io/LICENSE.txt",
"description": "Provides a behavior for making an element an overlay",
"private": true,
@@ -19,16 +19,15 @@
"url": "git://github.com/PolymerElements/iron-overlay-behavior.git"
},
"dependencies": {
- "polymer": "Polymer/polymer#^1.0.0",
"iron-fit-behavior": "PolymerElements/iron-fit-behavior#^1.0.0",
- "iron-resizable-behavior": "PolymerElements/iron-resizable-behavior#^1.0.0"
+ "iron-resizable-behavior": "PolymerElements/iron-resizable-behavior#^1.0.0",
+ "polymer": "Polymer/polymer#^1.0.0"
},
"devDependencies": {
- "paper-styles": "polymerelements/paper-styles#^1.0.2",
"iron-component-page": "PolymerElements/iron-component-page#^1.0.0",
"iron-flex-layout": "PolymerElements/iron-flex-layout#^1.0.0",
"iron-test-helpers": "PolymerElements/iron-test-helpers#^1.0.0",
- "test-fixture": "PolymerElements/test-fixture#^1.0.0",
+ "paper-styles": "PolymerElements/paper-styles#^1.0.2",
"web-component-tester": "^4.0.0",
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
},
diff --git a/dashboard-ui/bower_components/iron-overlay-behavior/demo/index.html b/dashboard-ui/bower_components/iron-overlay-behavior/demo/index.html
index c58158ef1..c14f7ae45 100644
--- a/dashboard-ui/bower_components/iron-overlay-behavior/demo/index.html
+++ b/dashboard-ui/bower_components/iron-overlay-behavior/demo/index.html
@@ -120,7 +120,10 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
- Hello world!
+
Hello world!
+
+
+
diff --git a/dashboard-ui/bower_components/iron-overlay-behavior/iron-overlay-backdrop.html b/dashboard-ui/bower_components/iron-overlay-behavior/iron-overlay-backdrop.html
index 5a5e24b5e..1eb3c2f59 100644
--- a/dashboard-ui/bower_components/iron-overlay-behavior/iron-overlay-backdrop.html
+++ b/dashboard-ui/bower_components/iron-overlay-behavior/iron-overlay-backdrop.html
@@ -118,10 +118,14 @@ Custom property | Description | Default
this.style.zIndex = this._manager.backdropZ();
// close only if no element with backdrop is left
if (this._manager.getBackdrops().length === 0) {
+ // Read style before setting opened.
+ var cs = getComputedStyle(this);
+ var noAnimation = (cs.transitionDuration === '0s' || cs.opacity == 0);
this._setOpened(false);
- // complete() will be called after the transition is done.
- // If animations are disabled via custom-styles, user is expected to call
- // complete() after close()
+ // In case of no animations, complete
+ if (noAnimation) {
+ this.complete();
+ }
}
},
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 afa489f53..cd5eb4297 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
@@ -135,6 +135,18 @@ context. You should place this element as a child of `` whenever possible.
value: function() {
return this._onCaptureKeydown.bind(this);
}
+ },
+
+ _boundOnCaptureFocus: {
+ type: Function,
+ value: function() {
+ return this._onCaptureFocus.bind(this);
+ }
+ },
+
+ /** @type {?Node} */
+ _focusedChild: {
+ type: Object
}
},
@@ -152,10 +164,13 @@ context. You should place this element as a child of `` whenever possible.
},
get _focusNode() {
- return Polymer.dom(this).querySelector('[autofocus]') || this;
+ return this._focusedChild || Polymer.dom(this).querySelector('[autofocus]') || this;
},
ready: function() {
+ // with-backdrop need tabindex to be set in order to trap the focus.
+ // If it is not set, IronOverlayBehavior will set it, and remove it if with-backdrop = false.
+ this.__shouldRemoveTabIndex = false;
this._ensureSetup();
},
@@ -265,6 +280,14 @@ context. You should place this element as a child of `` whenever possible.
},
_withBackdropChanged: function() {
+ // If tabindex is already set, no need to override it.
+ if (this.withBackdrop && !this.hasAttribute('tabindex')) {
+ this.setAttribute('tabindex', '-1');
+ this.__shouldRemoveTabIndex = true;
+ } else if (this.__shouldRemoveTabIndex) {
+ this.removeAttribute('tabindex');
+ this.__shouldRemoveTabIndex = false;
+ }
if (this.opened) {
this._manager.trackBackdrop(this);
if (this.withBackdrop) {
@@ -298,6 +321,7 @@ context. You should place this element as a child of `` whenever possible.
_toggleListeners: function () {
this._toggleListener(this.opened, document, 'tap', this._boundOnCaptureClick, true);
this._toggleListener(this.opened, document, 'keydown', this._boundOnCaptureKeydown, true);
+ this._toggleListener(this.opened, document, 'focus', this._boundOnCaptureFocus, true);
},
// tasks which must occur before opening; e.g. making the element visible
@@ -343,6 +367,7 @@ context. You should place this element as a child of `` whenever possible.
this.style.display = 'none';
this._manager.removeOverlay(this);
+ this._focusedChild = null;
this._applyFocus();
this.notifyResize();
@@ -376,9 +401,12 @@ context. You should place this element as a child of `` whenever possible.
_onCaptureClick: function(event) {
if (this._manager.currentOverlay() === this &&
- !this.noCancelOnOutsideClick &&
Polymer.dom(event).path.indexOf(this) === -1) {
- this.cancel();
+ if (this.noCancelOnOutsideClick) {
+ this._applyFocus();
+ } else {
+ this.cancel();
+ }
}
},
@@ -391,6 +419,19 @@ context. You should place this element as a child of `` whenever possible.
}
},
+ _onCaptureFocus: function (event) {
+ if (this._manager.currentOverlay() === this &&
+ this.withBackdrop) {
+ var path = Polymer.dom(event).path;
+ if (path.indexOf(this) === -1) {
+ event.stopPropagation();
+ this._applyFocus();
+ } else {
+ this._focusedChild = path[0];
+ }
+ }
+ },
+
_onIronResize: function() {
if (this.opened) {
this.refit();
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 30d5f03b6..47d410f79 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
@@ -323,6 +323,19 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
});
});
+ test('no-cancel-on-outside-click property; focus stays on overlay when click outside', function(done) {
+ overlay = fixture('autofocus');
+ overlay.noCancelOnOutsideClick = true;
+ runAfterOpen(overlay, function() {
+ MockInteractions.tap(document.body);
+ setTimeout(function() {
+ assert.equal(Polymer.dom(overlay).querySelector('[autofocus]'), document.activeElement, '