commit
3f87605135
289 changed files with 2572 additions and 2736 deletions
|
@ -4,7 +4,7 @@
|
|||
<title>${TitlePlugins}</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="addPluginPage" data-role="page" class="page type-interior pluginConfigurationPage" data-helpurl="https://github.com/MediaBrowser/Wiki/wiki/Plugins" data-require="registrationservices,scripts/ratingdialog,scripts/addpluginpage">
|
||||
<div id="addPluginPage" data-role="page" class="page type-interior pluginConfigurationPage" data-helpurl="https://github.com/MediaBrowser/Wiki/wiki/Plugins" data-require="jqmcollapsible,registrationservices,scripts/ratingdialog,scripts/addpluginpage">
|
||||
|
||||
<div data-role="content">
|
||||
<div class="content-primary">
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<title>${TitleAdvanced}</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="advancedConfigurationPage" data-role="page" class="page type-interior advancedConfigurationPage" data-require="scripts/advancedconfigurationpage,paper-input">
|
||||
<div id="advancedConfigurationPage" data-role="page" class="page type-interior advancedConfigurationPage" data-require="jqmcollapsible,scripts/advancedconfigurationpage,paper-input">
|
||||
|
||||
<div data-role="content">
|
||||
<div class="content-primary">
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
<div data-role="controlgroup" data-type="horizontal" class="localnav" data-mini="true">
|
||||
<a href="#" data-role="button" class="ui-btn-active">${TabActivityLog}</a>
|
||||
<a href="autoorganizetv.html" data-role="button">${TabTV}</a>
|
||||
<a href="autoorganizesmart.html" data-role="button">${TabSmartMatches}</a>
|
||||
</div>
|
||||
|
||||
<div style="margin: -25px 0 1em; text-align: right;">
|
||||
|
@ -80,6 +81,10 @@
|
|||
<input id="txtEndingEpisode" type="number" pattern="[0-9]*" min="0" />
|
||||
<div class="fieldDescription">${LabelEndingEpisodeNumberHelp}</div>
|
||||
</div>
|
||||
<div style="margin: 1em 0;">
|
||||
<input type="checkbox" id="chkRememberCorrection" name="chkRememberCorrection" data-mini="true" />
|
||||
<label for="chkRememberCorrection">${LabelOrganizeSmartMatchOption} '<span class="extractedName" />' </label>
|
||||
</div>
|
||||
|
||||
<p>
|
||||
<button type="submit" data-theme="b" data-icon="check" data-mini="true">
|
||||
|
|
26
dashboard-ui/autoorganizesmart.html
Normal file
26
dashboard-ui/autoorganizesmart.html
Normal file
|
@ -0,0 +1,26 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>${TitleAutoOrganize}</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="libraryFileOrganizerSmartMatchPage" data-role="page" class="page type-interior organizePage" data-helpurl="https://github.com/MediaBrowser/Wiki/wiki/Auto-Organize" data-require="scripts/autoorganizesmart,jqmlistview">
|
||||
|
||||
<div data-role="content">
|
||||
<div class="content-primary">
|
||||
|
||||
<div data-role="controlgroup" data-type="horizontal" class="localnav" data-mini="true">
|
||||
<a href="autoorganizelog.html" data-role="button">${TabActivityLog}</a>
|
||||
<a href="autoorganizetv.html" data-role="button">${TabTV}</a>
|
||||
<a href="#" data-role="button" class="ui-btn-active">${TabSmartMatches}</a>
|
||||
</div>
|
||||
|
||||
<div class="readOnlyContent">
|
||||
<p>${TabSmartMatchInfo}</p>
|
||||
<div class="divMatchInfos"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -4,13 +4,14 @@
|
|||
<title>${TitleAutoOrganize}</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="libraryFileOrganizerPage" data-role="page" class="page type-interior organizePage" data-helpurl="https://github.com/MediaBrowser/Wiki/wiki/Auto-Organize" data-require="jqmtable,scripts/autoorganizetv,paper-input">
|
||||
<div id="libraryFileOrganizerPage" data-role="page" class="page type-interior organizePage" data-helpurl="https://github.com/MediaBrowser/Wiki/wiki/Auto-Organize" data-require="jqmcollapsible,jqmtable,scripts/autoorganizetv,paper-input">
|
||||
|
||||
<div data-role="content">
|
||||
<div class="content-primary">
|
||||
<div data-role="controlgroup" data-type="horizontal" class="localnav" data-mini="true">
|
||||
<a href="autoorganizelog.html" data-role="button">${TabActivityLog}</a>
|
||||
<a href="#" data-role="button" class="ui-btn-active">${TabTV}</a>
|
||||
<a href="autoorganizesmart.html" data-role="button">${TabSmartMatches}</a>
|
||||
</div>
|
||||
|
||||
<form class="libraryFileOrganizerForm">
|
||||
|
|
11
dashboard-ui/bower_components/Swiper/.bower.json
vendored
11
dashboard-ui/bower_components/Swiper/.bower.json
vendored
|
@ -5,7 +5,7 @@
|
|||
"url": "https://github.com/nolimits4web/Swiper.git"
|
||||
},
|
||||
"description": "Most modern mobile touch slider and framework with hardware accelerated transitions",
|
||||
"version": "3.3.0",
|
||||
"version": "3.3.1",
|
||||
"author": "Vladimir Kharlampidi",
|
||||
"homepage": "http://www.idangero.us/swiper/",
|
||||
"keywords": [
|
||||
|
@ -45,14 +45,13 @@
|
|||
"playground",
|
||||
"package.json"
|
||||
],
|
||||
"_release": "3.3.0",
|
||||
"_release": "3.3.1",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "v3.3.0",
|
||||
"commit": "d1b5b19c872068ebb14bfb854af838c30285cecd"
|
||||
"tag": "v3.3.1",
|
||||
"commit": "33101a659e579146f5462e4a9d6a7fdfd7436c35"
|
||||
},
|
||||
"_source": "git://github.com/nolimits4web/Swiper.git",
|
||||
"_target": "~3.3.0",
|
||||
"_originalSource": "swiper",
|
||||
"_direct": true
|
||||
"_originalSource": "swiper"
|
||||
}
|
|
@ -1,5 +1,14 @@
|
|||
# Change Log
|
||||
|
||||
## Swiper 3.3.1 - Released on February 7, 2016
|
||||
* New `uniqueNavElements` parameter. If enabled (by default) and navigation elements' parameters passed as the string (like `.pagination`) then Swiper will look for such elements through child elements first. Applies for pagination, prev/next buttons and scrollbar
|
||||
* New `onPaginationRendered` callback. Will be fired after pagination elements generated and added to DOM
|
||||
* New `.reLoop()` method, which combines `.destroyLoop()` + `.createLoop()` methods with additional positioning fixes. Useful to call after you have changed `slidesPerView` parameter, it will dynamically recreate duplicated slides required for loop
|
||||
* Fixed not working mousewheel control in IE 11
|
||||
* Fixed issue with lazy loading images not being recalculated after window resize
|
||||
* Fixed issues when using loop with breakpoints changing `slidesPerView/Group` parameters
|
||||
* Numerous minor fixes
|
||||
|
||||
## Swiper 3.3.0 - Released on January 10, 2016
|
||||
* New 3D Flip effect. Can be enabled with `effect: 'flip' parameter
|
||||
* New types of pagination with new parameters:
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
"url": "https://github.com/nolimits4web/Swiper.git"
|
||||
},
|
||||
"description": "Most modern mobile touch slider and framework with hardware accelerated transitions",
|
||||
"version": "3.3.0",
|
||||
"version": "3.3.1",
|
||||
"author": "Vladimir Kharlampidi",
|
||||
"homepage": "http://www.idangero.us/swiper/",
|
||||
"keywords": ["swiper", "swipe", "slider", "touch", "ios", "mobile", "cordova", "phonegap", "app", "framework", "carousel", "gallery"],
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
"name": "swiper",
|
||||
"repo": "https://github.com/nolimits4web/Swiper.git",
|
||||
"description": "Most modern mobile touch slider and framework with hardware accelerated transitions",
|
||||
"version": "3.3.0",
|
||||
"version": "3.3.1",
|
||||
"keywords": ["swiper", "swipe", "slider", "touch", "ios", "mobile", "cordova", "phonegap", "app", "framework", "carousel", "gallery"],
|
||||
"dependencies": {
|
||||
},
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* Swiper 3.3.0
|
||||
* Swiper 3.3.1
|
||||
* Most modern mobile touch slider and framework with hardware accelerated transitions
|
||||
*
|
||||
* http://www.idangero.us/swiper/
|
||||
|
@ -10,7 +10,7 @@
|
|||
*
|
||||
* Licensed under MIT
|
||||
*
|
||||
* Released on: January 10, 2016
|
||||
* Released on: February 7, 2016
|
||||
*/
|
||||
.swiper-container {
|
||||
margin: 0 auto;
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* Swiper 3.3.0
|
||||
* Swiper 3.3.1
|
||||
* Most modern mobile touch slider and framework with hardware accelerated transitions
|
||||
*
|
||||
* http://www.idangero.us/swiper/
|
||||
|
@ -10,7 +10,7 @@
|
|||
*
|
||||
* Licensed under MIT
|
||||
*
|
||||
* Released on: January 10, 2016
|
||||
* Released on: February 7, 2016
|
||||
*/
|
||||
(function () {
|
||||
'use strict';
|
||||
|
@ -110,6 +110,8 @@
|
|||
onlyExternal: false,
|
||||
threshold: 0,
|
||||
touchMoveStopPropagation: true,
|
||||
// Unique Navigation Elements
|
||||
uniqueNavElements: true,
|
||||
// Pagination
|
||||
pagination: null,
|
||||
paginationElement: 'span',
|
||||
|
@ -298,10 +300,14 @@
|
|||
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
|
||||
|
@ -315,10 +321,12 @@
|
|||
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
|
||||
|
@ -387,6 +395,10 @@
|
|||
// 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');
|
||||
}
|
||||
|
@ -395,6 +407,21 @@
|
|||
}
|
||||
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 () {
|
||||
|
@ -642,6 +669,7 @@
|
|||
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;
|
||||
}
|
||||
|
@ -780,7 +808,7 @@
|
|||
}
|
||||
}
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
@ -902,8 +930,16 @@
|
|||
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) {
|
||||
|
@ -911,7 +947,7 @@
|
|||
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);
|
||||
}
|
||||
|
@ -954,29 +990,30 @@
|
|||
}
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1026,6 +1063,9 @@
|
|||
}
|
||||
s.paginationContainer.html(paginationHTML);
|
||||
}
|
||||
if (s.params.paginationType !== 'custom') {
|
||||
s.emit('onPaginationRendered', s, s.paginationContainer[0]);
|
||||
}
|
||||
}
|
||||
};
|
||||
/*=========================
|
||||
|
@ -1097,6 +1137,7 @@
|
|||
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);
|
||||
|
@ -1110,12 +1151,15 @@
|
|||
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;
|
||||
|
@ -1171,23 +1215,23 @@
|
|||
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 () {
|
||||
|
@ -1383,7 +1427,11 @@
|
|||
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;
|
||||
|
@ -2148,6 +2196,16 @@
|
|||
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
|
||||
|
@ -2555,7 +2613,7 @@
|
|||
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 {
|
||||
|
@ -2734,6 +2792,9 @@
|
|||
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 = $('<div class="swiper-scrollbar-drag"></div>');
|
||||
|
@ -3056,8 +3117,14 @@
|
|||
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';
|
||||
}
|
||||
|
@ -3070,10 +3137,9 @@
|
|||
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;
|
||||
|
@ -3383,17 +3449,15 @@
|
|||
},
|
||||
init: function () {
|
||||
// Setup accessibility
|
||||
if (s.params.nextButton) {
|
||||
var nextButton = $(s.params.nextButton);
|
||||
s.a11y.makeFocusable(nextButton);
|
||||
s.a11y.addRole(nextButton, 'button');
|
||||
s.a11y.addLabel(nextButton, s.params.nextSlideMessage);
|
||||
if (s.params.nextButton && s.nextButton && s.nextButton.length > 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);
|
||||
|
@ -3710,4 +3774,5 @@ else if (typeof define === 'function' && define.amd) {
|
|||
'use strict';
|
||||
return window.Swiper;
|
||||
});
|
||||
}
|
||||
}
|
||||
//# sourceMappingURL=maps/swiper.jquery.js.map
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* Swiper 3.3.0
|
||||
* Swiper 3.3.1
|
||||
* Most modern mobile touch slider and framework with hardware accelerated transitions
|
||||
*
|
||||
* http://www.idangero.us/swiper/
|
||||
|
@ -10,7 +10,7 @@
|
|||
*
|
||||
* Licensed under MIT
|
||||
*
|
||||
* Released on: January 10, 2016
|
||||
* Released on: February 7, 2016
|
||||
*/
|
||||
(function (root, factory) {
|
||||
'use strict';
|
||||
|
@ -125,6 +125,8 @@
|
|||
onlyExternal: false,
|
||||
threshold: 0,
|
||||
touchMoveStopPropagation: true,
|
||||
// Unique Navigation Elements
|
||||
uniqueNavElements: true,
|
||||
// Pagination
|
||||
pagination: null,
|
||||
paginationElement: 'span',
|
||||
|
@ -313,10 +315,14 @@
|
|||
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
|
||||
|
@ -330,10 +336,12 @@
|
|||
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
|
||||
|
@ -402,6 +410,10 @@
|
|||
// 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');
|
||||
}
|
||||
|
@ -410,6 +422,21 @@
|
|||
}
|
||||
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 () {
|
||||
|
@ -657,6 +684,7 @@
|
|||
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;
|
||||
}
|
||||
|
@ -795,7 +823,7 @@
|
|||
}
|
||||
}
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
@ -917,8 +945,16 @@
|
|||
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) {
|
||||
|
@ -926,7 +962,7 @@
|
|||
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);
|
||||
}
|
||||
|
@ -969,29 +1005,30 @@
|
|||
}
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1041,6 +1078,9 @@
|
|||
}
|
||||
s.paginationContainer.html(paginationHTML);
|
||||
}
|
||||
if (s.params.paginationType !== 'custom') {
|
||||
s.emit('onPaginationRendered', s, s.paginationContainer[0]);
|
||||
}
|
||||
}
|
||||
};
|
||||
/*=========================
|
||||
|
@ -1112,6 +1152,7 @@
|
|||
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);
|
||||
|
@ -1125,12 +1166,15 @@
|
|||
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;
|
||||
|
@ -1186,23 +1230,23 @@
|
|||
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 () {
|
||||
|
@ -1398,7 +1442,11 @@
|
|||
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;
|
||||
|
@ -2163,6 +2211,16 @@
|
|||
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
|
||||
|
@ -2570,7 +2628,7 @@
|
|||
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 {
|
||||
|
@ -2749,6 +2807,9 @@
|
|||
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 = $('<div class="swiper-scrollbar-drag"></div>');
|
||||
|
@ -3071,8 +3132,14 @@
|
|||
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';
|
||||
}
|
||||
|
@ -3085,10 +3152,9 @@
|
|||
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;
|
||||
|
@ -3398,17 +3464,15 @@
|
|||
},
|
||||
init: function () {
|
||||
// Setup accessibility
|
||||
if (s.params.nextButton) {
|
||||
var nextButton = $(s.params.nextButton);
|
||||
s.a11y.makeFocusable(nextButton);
|
||||
s.a11y.addRole(nextButton, 'button');
|
||||
s.a11y.addLabel(nextButton, s.params.nextSlideMessage);
|
||||
if (s.params.nextButton && s.nextButton && s.nextButton.length > 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);
|
||||
|
@ -3702,4 +3766,5 @@
|
|||
}
|
||||
|
||||
return Swiper;
|
||||
}));
|
||||
}));
|
||||
//# sourceMappingURL=maps/swiper.jquery.umd.js.map
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* Swiper 3.3.0
|
||||
* Swiper 3.3.1
|
||||
* Most modern mobile touch slider and framework with hardware accelerated transitions
|
||||
*
|
||||
* http://www.idangero.us/swiper/
|
||||
|
@ -10,7 +10,7 @@
|
|||
*
|
||||
* Licensed under MIT
|
||||
*
|
||||
* Released on: January 10, 2016
|
||||
* Released on: February 7, 2016
|
||||
*/
|
||||
(function () {
|
||||
'use strict';
|
||||
|
@ -110,6 +110,8 @@
|
|||
onlyExternal: false,
|
||||
threshold: 0,
|
||||
touchMoveStopPropagation: true,
|
||||
// Unique Navigation Elements
|
||||
uniqueNavElements: true,
|
||||
// Pagination
|
||||
pagination: null,
|
||||
paginationElement: 'span',
|
||||
|
@ -298,10 +300,14 @@
|
|||
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
|
||||
|
@ -315,10 +321,12 @@
|
|||
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
|
||||
|
@ -387,6 +395,10 @@
|
|||
// 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');
|
||||
}
|
||||
|
@ -395,6 +407,21 @@
|
|||
}
|
||||
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 () {
|
||||
|
@ -642,6 +669,7 @@
|
|||
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;
|
||||
}
|
||||
|
@ -780,7 +808,7 @@
|
|||
}
|
||||
}
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
@ -902,8 +930,16 @@
|
|||
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) {
|
||||
|
@ -911,7 +947,7 @@
|
|||
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);
|
||||
}
|
||||
|
@ -954,29 +990,30 @@
|
|||
}
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1026,6 +1063,9 @@
|
|||
}
|
||||
s.paginationContainer.html(paginationHTML);
|
||||
}
|
||||
if (s.params.paginationType !== 'custom') {
|
||||
s.emit('onPaginationRendered', s, s.paginationContainer[0]);
|
||||
}
|
||||
}
|
||||
};
|
||||
/*=========================
|
||||
|
@ -1097,6 +1137,7 @@
|
|||
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);
|
||||
|
@ -1110,12 +1151,15 @@
|
|||
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;
|
||||
|
@ -1171,23 +1215,23 @@
|
|||
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 () {
|
||||
|
@ -1383,7 +1427,11 @@
|
|||
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;
|
||||
|
@ -2148,6 +2196,16 @@
|
|||
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
|
||||
|
@ -2555,7 +2613,7 @@
|
|||
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 {
|
||||
|
@ -2734,6 +2792,9 @@
|
|||
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 = $('<div class="swiper-scrollbar-drag"></div>');
|
||||
|
@ -3056,8 +3117,14 @@
|
|||
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';
|
||||
}
|
||||
|
@ -3070,10 +3137,9 @@
|
|||
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;
|
||||
|
@ -3383,17 +3449,15 @@
|
|||
},
|
||||
init: function () {
|
||||
// Setup accessibility
|
||||
if (s.params.nextButton) {
|
||||
var nextButton = $(s.params.nextButton);
|
||||
s.a11y.makeFocusable(nextButton);
|
||||
s.a11y.addRole(nextButton, 'button');
|
||||
s.a11y.addLabel(nextButton, s.params.nextSlideMessage);
|
||||
if (s.params.nextButton && s.nextButton && s.nextButton.length > 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);
|
||||
|
@ -4376,4 +4440,5 @@ else if (typeof define === 'function' && define.amd) {
|
|||
'use strict';
|
||||
return window.Swiper;
|
||||
});
|
||||
}
|
||||
}
|
||||
//# sourceMappingURL=maps/swiper.js.map
|
||||
|
|
File diff suppressed because one or more lines are too long
15
dashboard-ui/bower_components/Swiper/gulpfile.js
vendored
15
dashboard-ui/bower_components/Swiper/gulpfile.js
vendored
|
@ -170,32 +170,41 @@
|
|||
.pipe(tap(function (file, t){
|
||||
addJSIndent (file, t);
|
||||
}))
|
||||
.pipe(sourcemaps.init())
|
||||
.pipe(concat(swiper.filename + '.js'))
|
||||
.pipe(header(swiper.banner, { pkg : swiper.pkg, date: swiper.date } ))
|
||||
.pipe(gulp.dest(paths.build.scripts))
|
||||
|
||||
.pipe(jshint())
|
||||
.pipe(jshint.reporter(stylish));
|
||||
.pipe(jshint.reporter(stylish))
|
||||
.pipe(sourcemaps.write('./maps/'))
|
||||
.pipe(gulp.dest(paths.build.scripts));
|
||||
|
||||
|
||||
gulp.src(swiper.jQueryFiles)
|
||||
.pipe(tap(function (file, t){
|
||||
addJSIndent (file, t);
|
||||
}))
|
||||
.pipe(sourcemaps.init())
|
||||
.pipe(concat(swiper.filename + '.jquery.js'))
|
||||
.pipe(header(swiper.banner, { pkg : swiper.pkg, date: swiper.date } ))
|
||||
.pipe(sourcemaps.write('./maps/'))
|
||||
.pipe(gulp.dest(paths.build.scripts));
|
||||
gulp.src(swiper.jQueryUMDFiles)
|
||||
.pipe(tap(function (file, t){
|
||||
addJSIndent (file, t);
|
||||
}))
|
||||
.pipe(sourcemaps.init())
|
||||
.pipe(concat(swiper.filename + '.jquery.umd.js'))
|
||||
.pipe(header(swiper.banner, { pkg : swiper.pkg, date: swiper.date } ))
|
||||
.pipe(sourcemaps.write('./maps/'))
|
||||
.pipe(gulp.dest(paths.build.scripts));
|
||||
gulp.src(swiper.Framework7Files)
|
||||
.pipe(tap(function (file, t){
|
||||
addJSIndent (file, t, true);
|
||||
}))
|
||||
.pipe(sourcemaps.init())
|
||||
.pipe(concat(swiper.filename + '.framework7.js'))
|
||||
.pipe(header(swiper.banner, { pkg : swiper.pkg, date: swiper.date } ))
|
||||
.pipe(sourcemaps.write('./maps/'))
|
||||
.pipe(gulp.dest(paths.build.scripts))
|
||||
.pipe(connect.reload());
|
||||
cb();
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
var version = '3.3.0';
|
||||
var version = '3.3.1';
|
||||
|
||||
Package.describe({
|
||||
name: 'nolimits4web:swiper',
|
||||
|
|
|
@ -59,17 +59,15 @@ s.a11y = {
|
|||
},
|
||||
init: function () {
|
||||
// Setup accessibility
|
||||
if (s.params.nextButton) {
|
||||
var nextButton = $(s.params.nextButton);
|
||||
s.a11y.makeFocusable(nextButton);
|
||||
s.a11y.addRole(nextButton, 'button');
|
||||
s.a11y.addLabel(nextButton, s.params.nextSlideMessage);
|
||||
if (s.params.nextButton && s.nextButton && s.nextButton.length > 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);
|
||||
|
|
114
dashboard-ui/bower_components/Swiper/src/js/core.js
vendored
114
dashboard-ui/bower_components/Swiper/src/js/core.js
vendored
|
@ -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
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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 = $('<div class="swiper-scrollbar-drag"></div>');
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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 += '<br/>';
|
||||
if (raisedButtons) {
|
||||
html += '<paper-button raised class="btnSubmit"><iron-icon icon="dialog:check"></iron-icon><span>' + Globalize.translate('core#ButtonOk') + '</span></paper-button>';
|
||||
html += '<paper-button raised class="btnSubmit"><iron-icon icon="dialog:check"></iron-icon><span>' + globalize.translate(dialogText.buttonOk) + '</span></paper-button>';
|
||||
} else {
|
||||
html += '<paper-button class="btnSubmit">' + Globalize.translate('core#ButtonOk') + '</paper-button>';
|
||||
html += '<paper-button class="btnPromptExit">' + Globalize.translate('core#ButtonCancel') + '</paper-button>';
|
||||
html += '<div style="text-align:right;">';
|
||||
html += '<paper-button class="btnSubmit">' + globalize.translate(dialogText.buttonOk) + '</paper-button>';
|
||||
html += '<paper-button class="btnPromptExit">' + globalize.translate(dialogText.buttonCancel) + '</paper-button>';
|
||||
html += '</div>';
|
||||
}
|
||||
|
||||
html += '</div>';
|
||||
|
|
|
@ -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"
|
||||
}
|
|
@ -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",
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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": []
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
};
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
});
|
||||
})();
|
||||
|
|
|
@ -21,19 +21,13 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|||
|
||||
<link rel="import" href="../iron-dropdown-scroll-manager.html">
|
||||
<link rel="import" href="../../test-fixture/test-fixture.html">
|
||||
<link rel="import" href="x-scrollable-element.html">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<test-fixture id="DOMSubtree">
|
||||
<template>
|
||||
<div id="Parent">
|
||||
<div id="ChildOne">
|
||||
<div id="GrandchildOne"></div>
|
||||
</div>
|
||||
<div id="ChildTwo">
|
||||
<div id="GrandchildTwo"></div>
|
||||
</div>
|
||||
</div>
|
||||
<x-scrollable-element id="Parent"></x-scrollable-element>
|
||||
</template>
|
||||
</test-fixture>
|
||||
<script>
|
||||
|
@ -47,14 +41,14 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|||
|
||||
setup(function() {
|
||||
parent = fixture('DOMSubtree');
|
||||
childOne = parent.querySelector('#ChildOne');
|
||||
childTwo = parent.querySelector('#ChildTwo');
|
||||
grandChildOne = parent.querySelector('#GrandchildOne');
|
||||
grandChildTwo = parent.querySelector('#GrandchildTwo');
|
||||
childOne = parent.$$('#ChildOne');
|
||||
childTwo = parent.$$('#ChildTwo');
|
||||
grandChildOne = parent.$$('#GrandchildOne');
|
||||
grandChildTwo = parent.$$('#GrandchildTwo');
|
||||
ancestor = document.body;
|
||||
});
|
||||
|
||||
suite('contraining scroll in the DOM', function() {
|
||||
suite('constraining scroll in the DOM', function() {
|
||||
setup(function() {
|
||||
Polymer.IronDropdownScrollManager.pushScrollLock(childOne);
|
||||
});
|
||||
|
@ -99,6 +93,58 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|||
expect(Polymer.IronDropdownScrollManager.elementIsScrollLocked(parent))
|
||||
.to.be.equal(false);
|
||||
});
|
||||
|
||||
test('does not check locked elements when there are no locking elements', function() {
|
||||
sinon.spy(Polymer.IronDropdownScrollManager, 'elementIsScrollLocked');
|
||||
childOne.dispatchEvent(new CustomEvent('wheel', {
|
||||
bubbles: true,
|
||||
cancelable: true
|
||||
}));
|
||||
expect(Polymer.IronDropdownScrollManager
|
||||
.elementIsScrollLocked.callCount).to.be.eql(1);
|
||||
Polymer.IronDropdownScrollManager.removeScrollLock(childOne);
|
||||
childOne.dispatchEvent(new CustomEvent('wheel', {
|
||||
bubbles: true,
|
||||
cancelable: true
|
||||
}));
|
||||
expect(Polymer.IronDropdownScrollManager
|
||||
.elementIsScrollLocked.callCount).to.be.eql(1);
|
||||
});
|
||||
|
||||
suite('various scroll events', function() {
|
||||
var scrollEvents;
|
||||
var events;
|
||||
|
||||
setup(function() {
|
||||
scrollEvents = [
|
||||
'wheel',
|
||||
'mousewheel',
|
||||
'DOMMouseScroll',
|
||||
'touchmove'
|
||||
];
|
||||
|
||||
events = scrollEvents.map(function(scrollEvent) {
|
||||
return new CustomEvent(scrollEvent, {
|
||||
bubbles: true,
|
||||
cancelable: true
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
test('prevents wheel events from locked elements', function() {
|
||||
events.forEach(function(event) {
|
||||
childTwo.dispatchEvent(event);
|
||||
expect(event.defaultPrevented).to.be.eql(true);
|
||||
});
|
||||
});
|
||||
|
||||
test('allows wheel events from unlocked elements', function() {
|
||||
events.forEach(function(event) {
|
||||
childOne.dispatchEvent(event);
|
||||
expect(event.defaultPrevented).to.be.eql(false);
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
|
|
@ -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('<iron-dropdown>', 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.
|
||||
|
|
27
dashboard-ui/bower_components/iron-dropdown/test/x-scrollable-element.html
vendored
Normal file
27
dashboard-ui/bower_components/iron-dropdown/test/x-scrollable-element.html
vendored
Normal file
|
@ -0,0 +1,27 @@
|
|||
<!--
|
||||
@license
|
||||
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
||||
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
||||
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
||||
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
||||
Code distributed by Google as part of the polymer project is also
|
||||
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
||||
-->
|
||||
|
||||
<link rel="import" href="../../polymer/polymer.html">
|
||||
|
||||
<dom-module id="x-scrollable-element">
|
||||
<template>
|
||||
<div id="ChildOne">
|
||||
<div id="GrandchildOne"></div>
|
||||
</div>
|
||||
<div id="ChildTwo">
|
||||
<div id="GrandchildTwo"></div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
Polymer({
|
||||
is: 'x-scrollable-element'
|
||||
});
|
||||
</script>
|
||||
</dom-module>
|
|
@ -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",
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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"
|
||||
},
|
||||
|
|
|
@ -120,7 +120,10 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|||
<button data-dialog="backdrop">backdrop</button>
|
||||
|
||||
<simple-overlay id="backdrop" with-backdrop>
|
||||
Hello world!
|
||||
<p>Hello world!</p>
|
||||
<button>button</button>
|
||||
<button>button</button>
|
||||
<button>button</button>
|
||||
</simple-overlay>
|
||||
|
||||
<button data-dialog="autofocus">autofocus</button>
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
|
|
@ -135,6 +135,18 @@ context. You should place this element as a child of `<body>` 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 `<body>` 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 `<body>` 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 `<body>` 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 `<body>` 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 `<body>` 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 `<body>` 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();
|
||||
|
|
|
@ -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, '<button autofocus> is focused');
|
||||
done();
|
||||
}, 10);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
test('no-cancel-on-esc-key property', function(done) {
|
||||
overlay.noCancelOnEscKey = true;
|
||||
runAfterOpen(overlay, function() {
|
||||
|
@ -465,6 +478,42 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|||
overlays[0].opened = false;
|
||||
assert.equal(overlays[0]._manager.getBackdrops().length, 0, 'overlay removed from manager backdrops');
|
||||
});
|
||||
|
||||
test('with-backdrop sets tabindex=-1 and removes it', function() {
|
||||
var overlay = fixture('basic');
|
||||
overlay.withBackdrop = true;
|
||||
assert.equal(overlay.getAttribute('tabindex'), '-1', 'tabindex is -1');
|
||||
overlay.withBackdrop = false;
|
||||
assert.isFalse(overlay.hasAttribute('tabindex'), 'tabindex removed');
|
||||
});
|
||||
|
||||
test('with-backdrop does not override tabindex if already set', function() {
|
||||
var overlay = fixture('basic');
|
||||
overlay.setAttribute('tabindex', '1');
|
||||
overlay.withBackdrop = true;
|
||||
assert.equal(overlay.getAttribute('tabindex'), '1', 'tabindex is 1');
|
||||
overlay.withBackdrop = false;
|
||||
assert.equal(overlay.getAttribute('tabindex'), '1', 'tabindex is still 1');
|
||||
});
|
||||
|
||||
test('with-backdrop traps the focus within the overlay', function(done) {
|
||||
// Add button to try to "steal" focus.
|
||||
var button = document.createElement('button');
|
||||
var focusSpy = sinon.stub();
|
||||
button.addEventListener('focus', focusSpy, true);
|
||||
document.body.appendChild(button);
|
||||
|
||||
var overlay = fixture('autofocus');
|
||||
overlay.withBackdrop = true;
|
||||
runAfterOpen(overlay, function() {
|
||||
// Try to steal the focus
|
||||
MockInteractions.focus(button);
|
||||
assert.isFalse(focusSpy.called, 'button in body did not get the focus');
|
||||
assert.equal(Polymer.dom(overlay).querySelector('[autofocus]'), document.activeElement, '<button autofocus> is focused');
|
||||
button.parentNode.removeChild(button);
|
||||
done();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
suite('multiple overlays with backdrop', function() {
|
||||
|
@ -492,17 +541,31 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|||
});
|
||||
|
||||
test('updating with-backdrop to false closes backdrop', function(done) {
|
||||
// no waiting for animations
|
||||
overlays[0].backdropElement.style.transitionDuration = '0s';
|
||||
|
||||
runAfterOpen(overlays[0], function() {
|
||||
overlays[0].withBackdrop = false;
|
||||
// Don't wait for animations.
|
||||
overlays[0].backdropElement.complete();
|
||||
|
||||
assert.isFalse(overlays[0].backdropElement.opened, 'backdrop is closed');
|
||||
assert.isNotObject(overlays[0].backdropElement.parentNode, 'backdrop is removed from document');
|
||||
overlays[0].backdropElement.style.transitionDuration = '';
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
||||
test('backdrop is removed when toggling overlay opened', function(done) {
|
||||
overlays[0].open();
|
||||
assert.isObject(overlays[0].backdropElement.parentNode, 'backdrop is immediately inserted in the document');
|
||||
overlays[0].close();
|
||||
// Wait a tick (overlay will call backdropElement.close in the _openChangedAsync)
|
||||
setTimeout(function() {
|
||||
assert.isFalse(overlays[0].backdropElement.opened, 'backdrop is closed');
|
||||
assert.isNotObject(overlays[0].backdropElement.parentNode, 'backdrop is removed from document');
|
||||
done();
|
||||
}, 1);
|
||||
});
|
||||
|
||||
test('updating with-backdrop updates z-index', function(done) {
|
||||
runAfterOpen(overlays[0], function() {
|
||||
runAfterOpen(overlays[1], function() {
|
||||
|
|
40
dashboard-ui/bower_components/iron-overlay-behavior/test/test-buttons.html
vendored
Normal file
40
dashboard-ui/bower_components/iron-overlay-behavior/test/test-buttons.html
vendored
Normal file
|
@ -0,0 +1,40 @@
|
|||
<!--
|
||||
@license
|
||||
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
||||
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
||||
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
||||
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
||||
Code distributed by Google as part of the polymer project is also
|
||||
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
||||
-->
|
||||
|
||||
<link rel="import" href="../../polymer/polymer.html">
|
||||
|
||||
<dom-module id="test-buttons">
|
||||
|
||||
<style>
|
||||
|
||||
:host {
|
||||
border: 1px solid black;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<template>
|
||||
<button id="button0">button0</button>
|
||||
<button id="button1">button1</button>
|
||||
<button id="button2">button2</button>
|
||||
</template>
|
||||
|
||||
</dom-module>
|
||||
|
||||
<script>
|
||||
|
||||
(function() {
|
||||
Polymer({
|
||||
is: 'test-buttons'
|
||||
});
|
||||
})();
|
||||
|
||||
</script>
|
|
@ -45,7 +45,7 @@
|
|||
"tag": "v1.0.11",
|
||||
"commit": "e3c1ab0c72905b58fb4d9adc2921ea73b5c085a5"
|
||||
},
|
||||
"_source": "git://github.com/PolymerElements/paper-behaviors.git",
|
||||
"_source": "git://github.com/polymerelements/paper-behaviors.git",
|
||||
"_target": "^1.0.0",
|
||||
"_originalSource": "PolymerElements/paper-behaviors"
|
||||
"_originalSource": "polymerelements/paper-behaviors"
|
||||
}
|
|
@ -19,7 +19,7 @@
|
|||
<br />
|
||||
<ul data-role="listview" class="ulForm">
|
||||
<li>
|
||||
<label for="selectChannelResolution">${LabelChannelStreamQuality}</label>
|
||||
<label for="selectChannelResolution" class="selectLabel">${LabelChannelStreamQuality}</label>
|
||||
<select id="selectChannelResolution" data-mini="true">
|
||||
<option value="">${OptionBestAvailableStreamQuality}</option>
|
||||
<option value="1920">1080p</option>
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
var hasChanges = false;
|
||||
|
||||
// These images can be large and we're seeing memory problems in safari
|
||||
var browsableImagePageSize = browserInfo.safari ? 6 : (browserInfo.mobile ? 10 : 30);
|
||||
var browsableImagePageSize = browserInfo.safari ? 6 : (browserInfo.mobile ? 10 : 40);
|
||||
|
||||
var browsableImageStartIndex = 0;
|
||||
var browsableImageType = 'Primary';
|
||||
|
|
|
@ -206,11 +206,14 @@
|
|||
|
||||
$('.btnOpenUploadMenu', page).on('click', function () {
|
||||
|
||||
var imageType = this.getAttribute('data-imagetype');
|
||||
|
||||
require(['components/imageuploader/imageuploader'], function (imageUploader) {
|
||||
|
||||
imageUploader.show(currentItem.Id, {
|
||||
|
||||
theme: options.theme
|
||||
theme: options.theme,
|
||||
imageType: imageType
|
||||
|
||||
}).then(function (hasChanged) {
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
<div>
|
||||
<h1 style="display:inline-block;vertical-align:middle;">${HeaderBackdrops}</h1>
|
||||
<paper-fab icon="search" mini class="btnBrowseAllImages subdued" style="vertical-align:middle;margin-left:1em;" data-imagetype="Backdrop"></paper-fab>
|
||||
<paper-fab icon="add" mini class="btnOpenUploadMenu subdued" style="vertical-align:middle;margin-left:.25em;"></paper-fab>
|
||||
<paper-fab icon="add" mini class="btnOpenUploadMenu subdued" style="vertical-align:middle;margin-left:.25em;" data-imagetype="Backdrop"></paper-fab>
|
||||
</div>
|
||||
<div id="backdrops">
|
||||
</div>
|
||||
|
@ -24,7 +24,7 @@
|
|||
<div>
|
||||
<h1 style="display:inline-block;vertical-align:middle;">${Screenshots}</h1>
|
||||
<paper-fab icon="search" mini class="btnBrowseAllImages subdued" style="vertical-align:middle;margin-left:1em;" data-imagetype="Screenshot"></paper-fab>
|
||||
<paper-fab icon="add" mini class="btnOpenUploadMenu subdued" style="vertical-align:middle;margin-left:.25em;"></paper-fab>
|
||||
<paper-fab icon="add" mini class="btnOpenUploadMenu subdued" style="vertical-align:middle;margin-left:.25em;" data-imagetype="Screenshot"></paper-fab>
|
||||
</div>
|
||||
<div id="screenshots">
|
||||
</div>
|
||||
|
|
|
@ -164,6 +164,8 @@
|
|||
var editorContent = dlg.querySelector('.editorContent');
|
||||
initEditor(editorContent);
|
||||
|
||||
$('#selectImageType', dlg).val(options.imageType || 'Primary');
|
||||
|
||||
$('.btnCloseDialog', dlg).on('click', function () {
|
||||
|
||||
paperDialogHelper.close(dlg);
|
||||
|
|
|
@ -65,15 +65,12 @@
|
|||
require(['prompt'], function (prompt) {
|
||||
|
||||
prompt({
|
||||
text: 'Value:',
|
||||
callback: function (text) {
|
||||
if (text == '') return;
|
||||
var parent = $(source).parents('.editableListviewContainer');
|
||||
var list = parent.find('.paperList');
|
||||
var items = editableListViewValues(list);
|
||||
items.push(text);
|
||||
populateListView(list[0], items, sortCallback);
|
||||
}
|
||||
title: 'Value:'
|
||||
}).then(function (text) {
|
||||
var list = $(source).parents('.editableListviewContainer').find('.paperList');
|
||||
var items = editableListViewValues(list);
|
||||
items.push(text);
|
||||
populateListView(list[0], items, sortCallback);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
@ -82,6 +79,52 @@
|
|||
$(source).parents('paper-icon-item').remove();
|
||||
}
|
||||
|
||||
function editPerson(context, person, index) {
|
||||
|
||||
$('#popupEditPerson', context).popup("open");
|
||||
|
||||
$('#txtPersonName', context).val(person.Name || '');
|
||||
$('#selectPersonType', context).val(person.Type || '');
|
||||
$('#txtPersonRole', context).val(person.Role || '');
|
||||
|
||||
if (index == null) {
|
||||
index = '';
|
||||
}
|
||||
|
||||
$("#fldPersonIndex", context).val(index);
|
||||
}
|
||||
|
||||
function savePersonInfo(page) {
|
||||
|
||||
$('#popupEditPerson', page).popup("close");
|
||||
|
||||
var index = $("#fldPersonIndex", page).val();
|
||||
var person;
|
||||
|
||||
var isNew = true;
|
||||
|
||||
if (index) {
|
||||
|
||||
isNew = false;
|
||||
index = parseInt(index);
|
||||
|
||||
person = currentItem.People[index];
|
||||
|
||||
} else {
|
||||
person = {};
|
||||
}
|
||||
|
||||
person.Name = $('#txtPersonName', page).val();
|
||||
person.Type = $('#selectPersonType', page).val();
|
||||
person.Role = $('#txtPersonRole', page).val();
|
||||
|
||||
if (isNew) {
|
||||
currentItem.People.push(person);
|
||||
}
|
||||
|
||||
populatePeople(page, currentItem.People);
|
||||
}
|
||||
|
||||
function init(context) {
|
||||
|
||||
$('.btnCancel', context).on('click', function () {
|
||||
|
@ -89,6 +132,15 @@
|
|||
closeDialog(false);
|
||||
});
|
||||
|
||||
context.querySelector('#chkLockData').addEventListener('click', function (e) {
|
||||
|
||||
if (!e.target.checked) {
|
||||
$('.providerSettingsContainer').show();
|
||||
} else {
|
||||
$('.providerSettingsContainer').hide();
|
||||
}
|
||||
});
|
||||
|
||||
context.addEventListener('click', function (e) {
|
||||
|
||||
var btnRemoveFromEditorList = parentWithClass(e.target, 'btnRemoveFromEditorList');
|
||||
|
@ -104,6 +156,11 @@
|
|||
});
|
||||
|
||||
$('form', context).off('submit', onSubmit).on('submit', onSubmit);
|
||||
|
||||
$("#btnAddPerson", context).on('click', function (event, data) {
|
||||
|
||||
editPerson(context, {});
|
||||
});
|
||||
}
|
||||
|
||||
function getItem(itemId) {
|
||||
|
@ -505,9 +562,9 @@
|
|||
var chkLockData = context.querySelector("#chkLockData");
|
||||
chkLockData.checked = lockData;
|
||||
if (chkLockData.checked) {
|
||||
$('#providerSettingsContainer', context).hide();
|
||||
$('.providerSettingsContainer', context).hide();
|
||||
} else {
|
||||
$('#providerSettingsContainer', context).show();
|
||||
$('.providerSettingsContainer', context).show();
|
||||
}
|
||||
populateInternetProviderSettings(context, item, item.LockedFields);
|
||||
|
||||
|
@ -690,8 +747,6 @@
|
|||
html += '<paper-icon-button icon="delete" data-index="' + i + '" class="btnRemoveFromEditorList"></paper-icon-button>';
|
||||
|
||||
html += '</paper-icon-item>';
|
||||
|
||||
//html += '<li data-mini="true"><a class="data">' + items[i] + '</a><a href="#" onclick="EditItemMetadataPage.removeElementFromListview(this)" class="btnRemoveFromEditorList"></a></li>';
|
||||
}
|
||||
|
||||
list.innerHTML = html;
|
||||
|
@ -729,7 +784,7 @@
|
|||
html += '</li>';
|
||||
}
|
||||
|
||||
//elem.html(html).listview('refresh');
|
||||
//elem.html(html);
|
||||
|
||||
$('.btnDeletePerson', elem).on('click', function () {
|
||||
|
||||
|
@ -762,7 +817,7 @@
|
|||
}
|
||||
|
||||
function populateInternetProviderSettings(context, item, lockedFields) {
|
||||
var container = $('#providerSettingsContainer', context);
|
||||
var container = $('.providerSettingsContainer', context);
|
||||
lockedFields = lockedFields || new Array();
|
||||
|
||||
var metadatafields = [
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
<div style="padding: 0 0 10px;">
|
||||
<div id="fldContentType" style="display:none;">
|
||||
<label for="selectContentType">${LabelContentType}</label>
|
||||
<label for="selectContentType" class="selectLabel">${LabelContentType}</label>
|
||||
<select id="selectContentType" data-mini="true"></select>
|
||||
</div>
|
||||
<div id="fldPath">
|
||||
|
@ -26,7 +26,7 @@
|
|||
<paper-input id="txtDateAdded" type="date" label="${LabelDateAdded}"></paper-input>
|
||||
</div>
|
||||
<div id="fldStatus" style="display: none;margin:1em 0;">
|
||||
<label for="selectStatus">${LabelStatus}</label>
|
||||
<label for="selectStatus" class="selectLabel">${LabelStatus}</label>
|
||||
<select id="selectStatus" data-mini="true"></select>
|
||||
</div>
|
||||
<div id="fldArtist" style="display: none;">
|
||||
|
@ -111,12 +111,12 @@
|
|||
</div>
|
||||
<div id="fldOfficialRating" style="display: none;">
|
||||
<br />
|
||||
<label for="selectOfficialRating">${LabelParentalRating}</label>
|
||||
<label for="selectOfficialRating" class="selectLabel">${LabelParentalRating}</label>
|
||||
<select id="selectOfficialRating" data-mini="true"></select>
|
||||
</div>
|
||||
<div id="fldCustomRating" style="display: none;">
|
||||
<br />
|
||||
<label for="selectCustomRating">${LabelCustomRating}</label>
|
||||
<label for="selectCustomRating" class="selectLabel">${LabelCustomRating}</label>
|
||||
<select id="selectCustomRating" data-mini="true"></select>
|
||||
</div>
|
||||
<div id="fldBudget" style="display: none;">
|
||||
|
@ -133,7 +133,7 @@
|
|||
</div>
|
||||
<div id="fld3dFormat" style="display: none;">
|
||||
<br />
|
||||
<label for="select3dFormat">${Label3DFormat}</label>
|
||||
<label for="select3dFormat" class="selectLabel">${Label3DFormat}</label>
|
||||
<select id="select3dFormat" data-mini="true">
|
||||
<option value=""></option>
|
||||
<option value="HalfSideBySide">HSBS</option>
|
||||
|
@ -202,7 +202,7 @@
|
|||
<paper-checkbox id="chkDisplaySpecialsInline">${LabelDisplaySpecialsWithinSeasons}</paper-checkbox>
|
||||
</div>
|
||||
<div id="fldDisplayOrder" class="fldDisplaySetting">
|
||||
<label for="selectDisplayOrder" id="labelDisplayOrder">${LabelDisplayOrder}</label>
|
||||
<label for="selectDisplayOrder" class="selectLabel" id="labelDisplayOrder">${LabelDisplayOrder}</label>
|
||||
<select id="selectDisplayOrder" data-mini="true"></select>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -274,23 +274,23 @@
|
|||
<h1>${HeaderMetadataSettings}</h1>
|
||||
<div>
|
||||
<div>
|
||||
<label for="selectLanguage">${LabelMetadataDownloadLanguage}</label>
|
||||
<label for="selectLanguage" class="selectLabel">${LabelMetadataDownloadLanguage}</label>
|
||||
<select id="selectLanguage" data-mini="true"></select>
|
||||
</div>
|
||||
<div class="fieldDescription editorfieldDescription">${MessageLeaveEmptyToInherit}</div>
|
||||
<br />
|
||||
<div>
|
||||
<label for="selectCountry">${LabelCountry}</label>
|
||||
<label for="selectCountry" class="selectLabel">${LabelCountry}</label>
|
||||
<select id="selectCountry" data-mini="true"></select>
|
||||
</div>
|
||||
<div class="fieldDescription editorfieldDescription">${MessageLeaveEmptyToInherit}</div>
|
||||
|
||||
<div>
|
||||
<br /><br />
|
||||
<paper-checkbox id="chkLockData" onchange="EditItemMetadataPage.setProviderSettingsContainerVisibility(this)">${LabelLockItemToPreventChanges}</paper-checkbox>
|
||||
<paper-checkbox id="chkLockData">${LabelLockItemToPreventChanges}</paper-checkbox>
|
||||
</div>
|
||||
<br />
|
||||
<div id="providerSettingsContainer" style="display: none">
|
||||
<div class="providerSettingsContainer" style="display: none">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
<div>
|
||||
<div>
|
||||
<br />
|
||||
<label for="selectCountry">${LabelCountry}</label>
|
||||
<label for="selectCountry" class="selectLabel">${LabelCountry}</label>
|
||||
<select id="selectCountry" data-mini="true" required="required"></select>
|
||||
</div>
|
||||
<div>
|
||||
|
@ -49,7 +49,7 @@
|
|||
</div>
|
||||
<div>
|
||||
<br />
|
||||
<label for="selectListing">${LabelLineup}</label>
|
||||
<label for="selectListing" class="selectLabel">${LabelLineup}</label>
|
||||
<select id="selectListing" data-mini="true" required="required"></select>
|
||||
</div>
|
||||
<div>
|
||||
|
|
|
@ -114,7 +114,7 @@
|
|||
height: 80px;
|
||||
background-position: center center;
|
||||
background-repeat: no-repeat;
|
||||
background-size: cover;
|
||||
background-size: contain;
|
||||
}
|
||||
|
||||
.nowPlayingBarText {
|
||||
|
|
|
@ -1,4 +1,255 @@
|
|||
/* cyrillic-ext */
|
||||
/* Swatches */
|
||||
|
||||
/* A
|
||||
-----------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
/* Bar: Toolbars, dividers, slider track */
|
||||
.ui-bar-a,
|
||||
.ui-page-theme-a .ui-bar-inherit,
|
||||
html .ui-bar-a .ui-bar-inherit,
|
||||
html .ui-body-a .ui-bar-inherit,
|
||||
html body .ui-group-theme-a .ui-bar-inherit {
|
||||
background-color: #e9e9e9 /*{a-bar-background-color}*/;
|
||||
border-color: #ddd /*{a-bar-border}*/;
|
||||
color: #333 /*{a-bar-color}*/;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.ui-bar-a {
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
}
|
||||
|
||||
/* Page and overlay */
|
||||
.ui-page-theme-a .ui-panel-wrapper {
|
||||
background-color: #f9f9f9 /*{a-page-background-color}*/;
|
||||
border-color: #bbb /*{a-page-border}*/;
|
||||
color: #333 /*{a-page-color}*/;
|
||||
}
|
||||
|
||||
/* Body: Read-only lists, text inputs, collapsible content */
|
||||
.ui-page-theme-a .ui-body-inherit,
|
||||
html .ui-bar-a .ui-body-inherit,
|
||||
html .ui-body-a .ui-body-inherit,
|
||||
html body .ui-group-theme-a .ui-body-inherit,
|
||||
html .ui-panel-page-container-a {
|
||||
background-color: #fff /*{a-body-background-color}*/;
|
||||
border-color: #ddd /*{a-body-border}*/;
|
||||
color: #333 /*{a-body-color}*/;
|
||||
}
|
||||
|
||||
/* Links */
|
||||
.ui-page-theme-a a,
|
||||
html .ui-bar-a a,
|
||||
html .ui-body-a a,
|
||||
html body .ui-group-theme-a a {
|
||||
color: #3388cc /*{a-link-color}*/;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.ui-page-theme-a a:visited,
|
||||
html .ui-bar-a a:visited,
|
||||
html .ui-body-a a:visited,
|
||||
html body .ui-group-theme-a a:visited {
|
||||
color: #3388cc /*{a-link-visited}*/;
|
||||
}
|
||||
|
||||
.ui-page-theme-a a:hover,
|
||||
html .ui-bar-a a:hover,
|
||||
html .ui-body-a a:hover,
|
||||
html body .ui-group-theme-a a:hover {
|
||||
color: #005599 /*{a-link-hover}*/;
|
||||
}
|
||||
|
||||
.ui-page-theme-a a:active,
|
||||
html .ui-bar-a a:active,
|
||||
html .ui-body-a a:active,
|
||||
html body .ui-group-theme-a a:active {
|
||||
color: #005599 /*{a-link-active}*/;
|
||||
}
|
||||
|
||||
/* Button up */
|
||||
.ui-page-theme-a .ui-btn,
|
||||
html .ui-bar-a .ui-btn,
|
||||
html .ui-body-a .ui-btn,
|
||||
html body .ui-group-theme-a .ui-btn,
|
||||
html head + body .ui-btn.ui-btn-a,
|
||||
/* Button visited */
|
||||
.ui-page-theme-a .ui-btn:visited,
|
||||
html .ui-bar-a .ui-btn:visited,
|
||||
html .ui-body-a .ui-btn:visited,
|
||||
html body .ui-group-theme-a .ui-btn:visited,
|
||||
html head + body .ui-btn.ui-btn-a:visited,
|
||||
ul[data-role="listview"] a + a {
|
||||
background-color: #f6f6f6 /*{a-bup-background-color}*/;
|
||||
border-color: #ddd /*{a-bup-border}*/;
|
||||
color: #333 /*{a-bup-color}*/;
|
||||
}
|
||||
/* Button hover */
|
||||
.ui-page-theme-a .ui-btn:hover,
|
||||
html .ui-bar-a .ui-btn:hover,
|
||||
html .ui-body-a .ui-btn:hover,
|
||||
html body .ui-group-theme-a .ui-btn:hover,
|
||||
html head + body .ui-btn.ui-btn-a:hover {
|
||||
background-color: #ededed /*{a-bhover-background-color}*/;
|
||||
border-color: #ddd /*{a-bhover-border}*/;
|
||||
color: #333 /*{a-bhover-color}*/;
|
||||
}
|
||||
/* Button down */
|
||||
.ui-page-theme-a .ui-btn:active,
|
||||
html .ui-bar-a .ui-btn:active,
|
||||
html .ui-body-a .ui-btn:active,
|
||||
html body .ui-group-theme-a .ui-btn:active,
|
||||
html head + body .ui-btn.ui-btn-a:active {
|
||||
background-color: #e8e8e8 /*{a-bdown-background-color}*/;
|
||||
border-color: #ddd /*{a-bdown-border}*/;
|
||||
color: #333 /*{a-bdown-color}*/;
|
||||
}
|
||||
|
||||
/* Active button */
|
||||
.ui-page-theme-a .ui-btn.ui-btn-active,
|
||||
html .ui-bar-a .ui-btn.ui-btn-active,
|
||||
html .ui-body-a .ui-btn.ui-btn-active,
|
||||
html body .ui-group-theme-a .ui-btn.ui-btn-active,
|
||||
html head + body .ui-btn.ui-btn-a.ui-btn-active,
|
||||
/* Active checkbox icon */
|
||||
.ui-page-theme-a .ui-checkbox-on:after,
|
||||
html .ui-bar-a .ui-checkbox-on:after,
|
||||
html .ui-body-a .ui-checkbox-on:after,
|
||||
html body .ui-group-theme-a .ui-checkbox-on:after,
|
||||
.ui-btn.ui-checkbox-on.ui-btn-a:after {
|
||||
background-color: #3388cc /*{a-active-background-color}*/;
|
||||
border-color: #3388cc /*{a-active-border}*/;
|
||||
color: #fff /*{a-active-color}*/;
|
||||
}
|
||||
/* Active radio button icon */
|
||||
.ui-page-theme-a .ui-radio-on:after,
|
||||
html .ui-bar-a .ui-radio-on:after,
|
||||
html .ui-body-a .ui-radio-on:after,
|
||||
html body .ui-group-theme-a .ui-radio-on:after,
|
||||
.ui-btn.ui-radio-on.ui-btn-a:after {
|
||||
border-color: #3388cc /*{a-active-background-color}*/;
|
||||
}
|
||||
|
||||
/* B
|
||||
-----------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
/* Bar: Toolbars, dividers, slider track */
|
||||
.ui-bar-b,
|
||||
.ui-page-theme-b .ui-bar-inherit,
|
||||
html .ui-bar-b .ui-bar-inherit,
|
||||
html .ui-body-b .ui-bar-inherit,
|
||||
html body .ui-group-theme-b .ui-bar-inherit {
|
||||
background-color: #1d1d1d /*{b-bar-background-color}*/;
|
||||
border-color: #1b1b1b /*{b-bar-border}*/;
|
||||
color: #fff /*{b-bar-color}*/;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.ui-bar-b {
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
}
|
||||
|
||||
/* Page and overlay */
|
||||
.ui-page-theme-b .ui-panel-wrapper {
|
||||
background-color: #252525 /*{b-page-background-color}*/;
|
||||
border-color: #454545 /*{b-page-border}*/;
|
||||
color: #fff /*{b-page-color}*/;
|
||||
}
|
||||
|
||||
/* Body: Read-only lists, text inputs, collapsible content */
|
||||
.ui-page-theme-b .ui-body-inherit,
|
||||
html .ui-bar-b .ui-body-inherit,
|
||||
html .ui-body-b .ui-body-inherit,
|
||||
html body .ui-group-theme-b .ui-body-inherit,
|
||||
html .ui-panel-page-container-b {
|
||||
background-color: #2a2a2a /*{b-body-background-color}*/;
|
||||
border-color: #1d1d1d /*{b-body-border}*/;
|
||||
color: #fff /*{b-body-color}*/;
|
||||
}
|
||||
|
||||
/* Links */
|
||||
.ui-body-b a {
|
||||
color: #22aadd /*{b-link-color}*/;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.ui-body-b a:visited {
|
||||
color: #22aadd /*{b-link-visited}*/;
|
||||
}
|
||||
|
||||
.ui-body-b a:hover {
|
||||
color: #0088bb /*{b-link-hover}*/;
|
||||
}
|
||||
|
||||
.ui-body-b a:active {
|
||||
color: #0088bb /*{b-link-active}*/;
|
||||
}
|
||||
|
||||
/* Button up */
|
||||
.ui-page-theme-b .ui-btn,
|
||||
html .ui-bar-b .ui-btn,
|
||||
html .ui-body-b .ui-btn,
|
||||
html body .ui-group-theme-b .ui-btn,
|
||||
html head + body .ui-btn.ui-btn-b,
|
||||
/* Button visited */
|
||||
.ui-page-theme-b .ui-btn:visited,
|
||||
html .ui-bar-b .ui-btn:visited,
|
||||
html .ui-body-b .ui-btn:visited,
|
||||
html body .ui-group-theme-b .ui-btn:visited,
|
||||
html head + body .ui-btn.ui-btn-b:visited {
|
||||
background-color: #333 /*{b-bup-background-color}*/;
|
||||
border-color: #1f1f1f /*{b-bup-border}*/;
|
||||
color: #fff /*{b-bup-color}*/;
|
||||
}
|
||||
/* Button hover */
|
||||
.ui-page-theme-b .ui-btn:hover,
|
||||
html .ui-bar-b .ui-btn:hover,
|
||||
html .ui-body-b .ui-btn:hover,
|
||||
html body .ui-group-theme-b .ui-btn:hover,
|
||||
html head + body .ui-btn.ui-btn-b:hover {
|
||||
background-color: #373737 /*{b-bhover-background-color}*/;
|
||||
border-color: #1f1f1f /*{b-bhover-border}*/;
|
||||
color: #fff /*{b-bhover-color}*/;
|
||||
}
|
||||
/* Button down */
|
||||
.ui-page-theme-b .ui-btn:active,
|
||||
html .ui-bar-b .ui-btn:active,
|
||||
html .ui-body-b .ui-btn:active,
|
||||
html body .ui-group-theme-b .ui-btn:active,
|
||||
html head + body .ui-btn.ui-btn-b:active {
|
||||
background-color: #404040 /*{b-bdown-background-color}*/;
|
||||
border-color: #1f1f1f /*{b-bdown-border}*/;
|
||||
color: #fff /*{b-bdown-color}*/;
|
||||
}
|
||||
|
||||
/* Active button */
|
||||
.ui-page-theme-b .ui-btn.ui-btn-active,
|
||||
html .ui-bar-b .ui-btn.ui-btn-active,
|
||||
html .ui-body-b .ui-btn.ui-btn-active,
|
||||
html body .ui-group-theme-b .ui-btn.ui-btn-active,
|
||||
html head + body .ui-btn.ui-btn-b.ui-btn-active,
|
||||
/* Active checkbox icon */
|
||||
.ui-page-theme-b .ui-checkbox-on:after,
|
||||
html .ui-bar-b .ui-checkbox-on:after,
|
||||
html .ui-body-b .ui-checkbox-on:after,
|
||||
html body .ui-group-theme-b .ui-checkbox-on:after,
|
||||
.ui-btn.ui-checkbox-on.ui-btn-b:after {
|
||||
background-color: #22aadd /*{b-active-background-color}*/;
|
||||
border-color: #22aadd /*{b-active-border}*/;
|
||||
color: #fff /*{b-active-color}*/;
|
||||
}
|
||||
/* Active radio button icon */
|
||||
.ui-page-theme-b .ui-radio-on:after,
|
||||
html .ui-bar-b .ui-radio-on:after,
|
||||
html .ui-body-b .ui-radio-on:after,
|
||||
html body .ui-group-theme-b .ui-radio-on:after,
|
||||
.ui-btn.ui-radio-on.ui-btn-b:after {
|
||||
border-color: #22aadd /*{b-active-background-color}*/;
|
||||
}
|
||||
|
||||
/* cyrillic-ext */
|
||||
@font-face {
|
||||
font-family: 'Roboto';
|
||||
font-style: normal;
|
||||
|
@ -808,7 +1059,6 @@ h1 .imageLink {
|
|||
}
|
||||
|
||||
.fieldDescription {
|
||||
font-size: 12px;
|
||||
padding-left: 5px;
|
||||
font-weight: normal;
|
||||
white-space: normal !important;
|
||||
|
@ -836,13 +1086,13 @@ paper-input + .fieldDescription {
|
|||
}
|
||||
|
||||
.ulForm {
|
||||
margin: -1em !important;
|
||||
margin-bottom: 20px !important;
|
||||
}
|
||||
|
||||
.ulForm li:not(.ui-li-divider) {
|
||||
background: none;
|
||||
border-top: none;
|
||||
border-bottom: none;
|
||||
border: 0 !important;
|
||||
}
|
||||
|
||||
.popup .ulForm {
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<title>Emby</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="dashboardPage" data-role="page" class="page type-interior dashboardHomePage" data-require="scripts/dashboardpage,humanedate,buttonenabled,paper-icon-item,paper-item-body,paper-fab">
|
||||
<div id="dashboardPage" data-role="page" class="page type-interior dashboardHomePage" data-require="jqmcollapsible,scripts/dashboardpage,humanedate,buttonenabled,paper-icon-item,paper-item-body,paper-fab">
|
||||
|
||||
<div data-role="content">
|
||||
<div class="content-primary">
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<title>${TitleServer}</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="dashboardGeneralPage" data-role="page" class="page type-interior dashboardHomePage" data-helpurl="https://github.com/MediaBrowser/Wiki/wiki/Server%20Settings" data-require="scripts/dashboardgeneral,paper-textarea,paper-input">
|
||||
<div id="dashboardGeneralPage" data-role="page" class="page type-interior dashboardHomePage" data-helpurl="https://github.com/MediaBrowser/Wiki/wiki/Server%20Settings" data-require="jqmcollapsible,scripts/dashboardgeneral,paper-textarea,paper-input">
|
||||
|
||||
<div data-role="content">
|
||||
<div class="content-primary">
|
||||
|
@ -23,7 +23,7 @@
|
|||
</div>
|
||||
<br /><br />
|
||||
<div>
|
||||
<label for="selectLocalizationLanguage">${LabelPreferredDisplayLanguage}</label>
|
||||
<label for="selectLocalizationLanguage" class="selectLabel">${LabelPreferredDisplayLanguage}</label>
|
||||
<select id="selectLocalizationLanguage" data-mini="true"></select>
|
||||
<div class="fieldDescription">
|
||||
<div>${LabelPreferredDisplayLanguageHelp}</div>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<title>${TitleDlna}</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="dlnaProfilePage" data-role="page" class="page type-interior dlnaPage" data-helpurl="https://github.com/MediaBrowser/Wiki/wiki/Dlna%20profiles" data-require="jqmpopup,scripts/dlnaprofile">
|
||||
<div id="dlnaProfilePage" data-role="page" class="page type-interior dlnaPage" data-helpurl="https://github.com/MediaBrowser/Wiki/wiki/Dlna%20profiles" data-require="jqmcollapsible,jqmpopup,scripts/dlnaprofile">
|
||||
|
||||
<div data-role="content">
|
||||
<div class="content-primary">
|
||||
|
@ -19,18 +19,12 @@
|
|||
|
||||
<p>${HeaderProfileInformation}</p>
|
||||
<div data-role="controlgroup" data-type="horizontal" data-mini="true">
|
||||
<input type="radio" name="radioProfileTab" class="radioTabButton" id="radioInfo" value="tabInfo">
|
||||
<label for="radioInfo">${TabInfo}</label>
|
||||
<input type="radio" name="radioProfileTab" class="radioTabButton" id="radioDirectPlay" value="tabDirectPlayProfiles">
|
||||
<label for="radioDirectPlay">${TabDirectPlay}</label>
|
||||
<input type="radio" name="radioProfileTab" class="radioTabButton" id="radioTranscoding" value="tabTranscodingProfiles">
|
||||
<label for="radioTranscoding">${TabTranscoding}</label>
|
||||
<input type="radio" name="radioProfileTab" class="radioTabButton" id="radioContainers" value="tabContainerProfiles">
|
||||
<label for="radioContainers">${TabContainers}</label>
|
||||
<input type="radio" name="radioProfileTab" class="radioTabButton" id="radioCodecs" value="tabCodecProfiles">
|
||||
<label for="radioCodecs">${TabCodecs}</label>
|
||||
<input type="radio" name="radioProfileTab" class="radioTabButton" id="radioMediaProfiles" value="tabMediaProfiles">
|
||||
<label for="radioMediaProfiles">${TabResponses}</label>
|
||||
<a href="#" data-role="button" class="radioTabButton" id="radioInfo" data-value="tabInfo">${TabInfo}</a>
|
||||
<a href="#" data-role="button" class="radioTabButton" id="radioDirectPlay" data-value="tabDirectPlayProfiles">${TabDirectPlay}</a>
|
||||
<a href="#" data-role="button" class="radioTabButton" id="radioTranscoding" data-value="tabTranscodingProfiles">${TabTranscoding}</a>
|
||||
<a href="#" data-role="button" class="radioTabButton" id="radioContainers" data-value="tabContainerProfiles">${TabContainers}</a>
|
||||
<a href="#" data-role="button" class="radioTabButton" id="radioCodecs" data-value="tabCodecProfiles">${TabCodecs}</a>
|
||||
<a href="#" data-role="button" class="radioTabButton" id="radioMediaProfiles" data-value="tabMediaProfiles">${TabResponses}</a>
|
||||
</div>
|
||||
<br />
|
||||
<div class="tabContent tabInfo">
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
<ul data-role="listview" class="ulForm">
|
||||
<li>
|
||||
<label for="selectVideoDecoder">${LabelHardwareAccelerationType}</label>
|
||||
<label for="selectVideoDecoder" class="selectLabel">${LabelHardwareAccelerationType}</label>
|
||||
<select id="selectVideoDecoder" data-mini="true">
|
||||
<option value="">${OptionAuto}</option>
|
||||
<option value="qsv">Intel Quick Sync</option>
|
||||
|
@ -28,7 +28,7 @@
|
|||
<div class="fieldDescription">${LabelHardwareAccelerationTypeHelp}</div>
|
||||
</li>
|
||||
<li>
|
||||
<label for="selectThreadCount">${LabelTranscodingThreadCount}</label>
|
||||
<label for="selectThreadCount" class="selectLabel">${LabelTranscodingThreadCount}</label>
|
||||
<select id="selectThreadCount" data-mini="true">
|
||||
<option value="-1">${OptionAuto}</option>
|
||||
<option value="1">1</option>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<title>${TitleMediaLibrary}</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="libraryPathMappingPage" data-role="page" class="page type-interior librarySectionPage" data-helpurl="https://github.com/MediaBrowser/Wiki/wiki/Library%20setup" data-require="jqmtable,scripts/librarypathmapping">
|
||||
<div id="libraryPathMappingPage" data-role="page" class="page type-interior librarySectionPage" data-helpurl="https://github.com/MediaBrowser/Wiki/wiki/Library%20setup" data-require="scripts/librarypathmapping">
|
||||
|
||||
<div data-role="content">
|
||||
<div class="content-primary">
|
||||
|
@ -17,16 +17,7 @@
|
|||
<div class="readOnlyContent">
|
||||
<p>${PathSubstitutionHelp}</p>
|
||||
|
||||
<table id="tblPaths" data-role="table" data-mode="reflow" class="ui-responsive">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>${HeaderFrom}</th>
|
||||
<th>${HeaderTo}</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="tbodyPathSubstitutions"></tbody>
|
||||
</table>
|
||||
<div class="pathSubstitutions"></div>
|
||||
</div>
|
||||
|
||||
<br />
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<title>${TitleMediaLibrary}</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="librarySettingsPage" data-role="page" class="page type-interior librarySectionPage" data-require="scripts/librarysettings">
|
||||
<div id="librarySettingsPage" data-role="page" class="page type-interior librarySectionPage" data-require="jqmcollapsible,scripts/librarysettings">
|
||||
|
||||
<div data-role="content">
|
||||
<div class="content-primary">
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
<ul data-role="listview" class="ulForm">
|
||||
<li>
|
||||
<label for="selectGuideDays">${LabelNumberOfGuideDays}</label>
|
||||
<label for="selectGuideDays" class="selectLabel">${LabelNumberOfGuideDays}</label>
|
||||
<select id="selectGuideDays" data-mini="true">
|
||||
<option value="">${OptionAutomatic}</option>
|
||||
<option value="1">1</option>
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
<div class="fieldDescription">${LabelSaveLocalMetadataHelp}</div>
|
||||
</li>
|
||||
<li style="display:none;">
|
||||
<label for="selectImageSavingConvention">${LabelImageSavingConvention}</label>
|
||||
<label for="selectImageSavingConvention" class="selectLabel">${LabelImageSavingConvention}</label>
|
||||
<select name="selectImageSavingConvention" id="selectImageSavingConvention" data-mini="true">
|
||||
<option value="Compatible">${OptionImageSavingCompatible}</option>
|
||||
<option value="Legacy">${OptionImageSavingStandard}</option>
|
||||
|
@ -38,11 +38,11 @@
|
|||
<div class="fieldDescription">${LabelImageSavingConventionHelp}</div>
|
||||
</li>
|
||||
<li>
|
||||
<label for="selectLanguage">${LabelMetadataDownloadLanguage}</label>
|
||||
<label for="selectLanguage" class="selectLabel">${LabelMetadataDownloadLanguage}</label>
|
||||
<select name="selectLanguage" id="selectLanguage" data-mini="true" required="required"></select>
|
||||
</li>
|
||||
<li>
|
||||
<label for="selectCountry">${LabelCountry}</label>
|
||||
<label for="selectCountry" class="selectLabel">${LabelCountry}</label>
|
||||
<select name="selectCountry" id="selectCountry" data-mini="true" required="required"></select>
|
||||
</li>
|
||||
<li>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<title>${TitleMetadata}</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="advancedMetadataConfigurationPage" data-role="page" class="page type-interior metadataConfigurationPage" data-require="scripts/metadataadvanced,paper-checkbox,paper-input">
|
||||
<div id="advancedMetadataConfigurationPage" data-role="page" class="page type-interior metadataConfigurationPage" data-require="jqmcollapsible,scripts/metadataadvanced,paper-checkbox,paper-input">
|
||||
|
||||
<div data-role="content">
|
||||
|
||||
|
@ -31,7 +31,7 @@
|
|||
<input type="checkbox" id="chkSaveMetadataHidden" data-mini="true" />
|
||||
</li>
|
||||
<li>
|
||||
<label for="selectDateAdded">${LabelDateAddedBehavior}</label>
|
||||
<label for="selectDateAdded" class="selectLabel">${LabelDateAddedBehavior}</label>
|
||||
<select id="selectDateAdded" data-mini="true">
|
||||
<option value="0">${OptionDateAddedImportTime}</option>
|
||||
<option value="1">${OptionDateAddedFileTime}</option>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<title>${TitleMetadata}</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="metadataImagesConfigurationPage" data-role="page" class="page type-interior metadataConfigurationPage" data-require="scripts/metadataimagespage">
|
||||
<div id="metadataImagesConfigurationPage" data-role="page" class="page type-interior metadataConfigurationPage" data-require="jqmcollapsible,scripts/metadataimagespage">
|
||||
|
||||
<div data-role="content">
|
||||
|
||||
|
@ -21,7 +21,7 @@
|
|||
<form class="metadataImagesConfigurationForm" style="margin-top: 10px; max-width: 800px;">
|
||||
<br />
|
||||
<div style="width: 75%;">
|
||||
<label for="selectItemType">${LabelCustomizeOptionsPerMediaType}</label>
|
||||
<label for="selectItemType" class="selectLabel">${LabelCustomizeOptionsPerMediaType}</label>
|
||||
<select id="selectItemType" data-mini="true"></select>
|
||||
</div>
|
||||
<br />
|
||||
|
|
|
@ -24,13 +24,13 @@
|
|||
<ul class="ulForm" data-role="listview">
|
||||
|
||||
<li>
|
||||
<label for="selectUser">${LabelKodiMetadataUser}</label>
|
||||
<label for="selectUser" class="selectLabel">${LabelKodiMetadataUser}</label>
|
||||
<select name="selectUser" id="selectUser" data-mini="true"></select>
|
||||
<div class="fieldDescription">${LabelKodiMetadataUserHelp}</div>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<label for="selectReleaseDateFormat">${LabelKodiMetadataDateFormat}</label>
|
||||
<label for="selectReleaseDateFormat" class="selectLabel">${LabelKodiMetadataDateFormat}</label>
|
||||
<select name="selectReleaseDateFormat" id="selectReleaseDateFormat" data-mini="true">
|
||||
<option value="yyyy-MM-dd">yyyy-MM-dd</option>
|
||||
</select>
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
<div class="detailSectionContent">
|
||||
<br />
|
||||
<div>
|
||||
<label for="selectLanguage">${LabelPreferredDisplayLanguage}</label>
|
||||
<label for="selectLanguage" class="selectLabel">${LabelPreferredDisplayLanguage}</label>
|
||||
<select id="selectLanguage" data-mini="true">
|
||||
<option value="ar">Arabic</option>
|
||||
<option value="bg-BG">Bulgarian (Bulgaria)</option>
|
||||
|
@ -72,7 +72,7 @@
|
|||
<div class="detailSectionContent">
|
||||
<br />
|
||||
<div>
|
||||
<label for="selectThemeSong">${LabelEnableThemeSongs}</label>
|
||||
<label for="selectThemeSong" class="selectLabel">${LabelEnableThemeSongs}</label>
|
||||
<select id="selectThemeSong" data-mini="true">
|
||||
<option value="">${OptionAuto}</option>
|
||||
<option value="1">${OptionYes}</option>
|
||||
|
@ -82,7 +82,7 @@
|
|||
</div>
|
||||
<br />
|
||||
<div class="fldEnableBackdrops" style="display:none;">
|
||||
<label for="selectBackdrop">${LabelEnableBackdrops}</label>
|
||||
<label for="selectBackdrop" class="selectLabel">${LabelEnableBackdrops}</label>
|
||||
<select id="selectBackdrop" data-mini="true">
|
||||
<option value="">${OptionAuto}</option>
|
||||
<option value="1">${OptionYes}</option>
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
<div class="detailSectionContent">
|
||||
<br />
|
||||
<div>
|
||||
<label for="selectHomeSection1">${LabelHomePageSection1}</label>
|
||||
<label for="selectHomeSection1" class="selectLabel">${LabelHomePageSection1}</label>
|
||||
<select id="selectHomeSection1" data-mini="true">
|
||||
<option value="">${OptionAuto}</option>
|
||||
<option value="latestmedia">${OptionLatestMedia}</option>
|
||||
|
@ -32,7 +32,7 @@
|
|||
</div>
|
||||
<br />
|
||||
<div>
|
||||
<label for="selectHomeSection2">${LabelHomePageSection2}</label>
|
||||
<label for="selectHomeSection2" class="selectLabel">${LabelHomePageSection2}</label>
|
||||
<select id="selectHomeSection2" data-mini="true">
|
||||
<option value="">${OptionAuto}</option>
|
||||
<option value="latestmedia">${OptionLatestMedia}</option>
|
||||
|
@ -47,7 +47,7 @@
|
|||
</div>
|
||||
<br />
|
||||
<div>
|
||||
<label for="selectHomeSection3">${LabelHomePageSection3}</label>
|
||||
<label for="selectHomeSection3" class="selectLabel">${LabelHomePageSection3}</label>
|
||||
<select id="selectHomeSection3" data-mini="true">
|
||||
<option value="">${OptionAuto}</option>
|
||||
<option value="latestmedia">${OptionLatestMedia}</option>
|
||||
|
@ -62,7 +62,7 @@
|
|||
</div>
|
||||
<br />
|
||||
<div>
|
||||
<label for="selectHomeSection4">${LabelHomePageSection4}</label>
|
||||
<label for="selectHomeSection4" class="selectLabel">${LabelHomePageSection4}</label>
|
||||
<select id="selectHomeSection4" data-mini="true">
|
||||
<option value="">${OptionAuto}</option>
|
||||
<option value="latestmedia">${OptionLatestMedia}</option>
|
||||
|
|
|
@ -19,19 +19,19 @@
|
|||
<div class="detailSectionContent">
|
||||
<br />
|
||||
<div>
|
||||
<label for="selectAudioLanguage">${LabelAudioLanguagePreference}</label>
|
||||
<label for="selectAudioLanguage" class="selectLabel">${LabelAudioLanguagePreference}</label>
|
||||
<select id="selectAudioLanguage" data-mini="true"></select>
|
||||
</div>
|
||||
<br />
|
||||
<paper-checkbox class="chkPlayDefaultAudioTrack">${LabelPlayDefaultAudioTrack}</paper-checkbox>
|
||||
<br /><br /><br />
|
||||
<div>
|
||||
<label for="selectSubtitleLanguage">${LabelSubtitleLanguagePreference}</label>
|
||||
<label for="selectSubtitleLanguage" class="selectLabel">${LabelSubtitleLanguagePreference}</label>
|
||||
<select id="selectSubtitleLanguage" data-mini="true"></select>
|
||||
</div>
|
||||
<br />
|
||||
<div>
|
||||
<label for="selectSubtitlePlaybackMode">${LabelSubtitlePlaybackMode}</label>
|
||||
<label for="selectSubtitlePlaybackMode" class="selectLabel">${LabelSubtitlePlaybackMode}</label>
|
||||
<select id="selectSubtitlePlaybackMode" data-mini="true">
|
||||
<option value="Default">${OptionDefaultSubtitles}</option>
|
||||
<option value="Smart">${OptionSmartSubtitles}</option>
|
||||
|
@ -68,12 +68,12 @@
|
|||
<div class="detailSectionContent">
|
||||
<br />
|
||||
<div>
|
||||
<label for="selectMaxBitrate">${LabelMaxStreamingBitrate}</label>
|
||||
<label for="selectMaxBitrate" class="selectLabel">${LabelMaxStreamingBitrate}</label>
|
||||
<select id="selectMaxBitrate" data-mini="true"></select>
|
||||
</div>
|
||||
<br />
|
||||
<div>
|
||||
<label for="selectMaxChromecastBitrate">${LabelMaxChromecastBitrate}</label>
|
||||
<label for="selectMaxChromecastBitrate" class="selectLabel">${LabelMaxChromecastBitrate}</label>
|
||||
<select id="selectMaxChromecastBitrate" data-mini="true">
|
||||
</select>
|
||||
</div>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<title>${TitlePlayback}</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="playbackConfigurationPage" data-role="page" class="page type-interior playbackConfigurationPage" data-require="scripts/playbackconfiguration">
|
||||
<div id="playbackConfigurationPage" data-role="page" class="page type-interior playbackConfigurationPage" data-require="jqmcollapsible,scripts/playbackconfiguration">
|
||||
|
||||
<div data-role="content">
|
||||
<div class="content-primary">
|
||||
|
|
|
@ -11,12 +11,17 @@
|
|||
<div class="readOnlyContent">
|
||||
<h2 class="taskName"></h2>
|
||||
<p id="pTaskDescription"></p>
|
||||
<p>
|
||||
<button type="button" data-icon="plus" onclick="ScheduledTaskPage.showAddTriggerPopup();">
|
||||
${ButtonAddScheduledTaskTrigger}
|
||||
</button>
|
||||
</p>
|
||||
<ul id="ulTaskTriggers" data-role="listview" data-inset="true" data-auto-enhanced="false" data-split-icon="minus"></ul>
|
||||
<div>
|
||||
<br />
|
||||
<h1 style="margin: .6em 0; vertical-align: middle; display: inline-block;">
|
||||
${HeaderTaskTriggers}
|
||||
</h1>
|
||||
<paper-button raised class="btnInvite submit mini" style="margin-left: 1em;" title="${ButtonAddScheduledTaskTrigger}" onclick="ScheduledTaskPage.showAddTriggerPopup();">
|
||||
<iron-icon icon="add"></iron-icon>
|
||||
<span>${ButtonAdd}</span>
|
||||
</paper-button>
|
||||
</div>
|
||||
<div class="taskTriggers"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -26,10 +31,10 @@
|
|||
<h3>${HeaderAddScheduledTaskTrigger}</h3>
|
||||
</div>
|
||||
<div data-role="content">
|
||||
|
||||
<br />
|
||||
<ul data-role="listview" class="ulForm">
|
||||
<li>
|
||||
<label for="selectTriggerType">${LabelTriggerType}</label>
|
||||
<label for="selectTriggerType" class="selectLabel">${LabelTriggerType}</label>
|
||||
<select id="selectTriggerType" name="selectTriggerType" onchange="ScheduledTaskPage.refreshTriggerFields(this.value);">
|
||||
<option value="DailyTrigger">${OptionDaily}</option>
|
||||
<option value="WeeklyTrigger">${OptionWeekly}</option>
|
||||
|
@ -39,7 +44,7 @@
|
|||
</select>
|
||||
</li>
|
||||
<li id="fldDayOfWeek">
|
||||
<label for="selectDayOfWeek">${LabelDay}</label>
|
||||
<label for="selectDayOfWeek" class="selectLabel">${LabelDay}</label>
|
||||
<select id="selectDayOfWeek" name="selectDayOfWeek">
|
||||
<option value="Sunday">${OptionSunday}</option>
|
||||
<option value="Monday">${OptionMonday}</option>
|
||||
|
@ -55,13 +60,13 @@
|
|||
<input type="time" id="txtTimeOfDay" name="txtTimeOfDay" required="required" />
|
||||
</li>
|
||||
<li id="fldSelectSystemEvent">
|
||||
<label for="selectSystemEvent">${LabelEvent}</label>
|
||||
<label for="selectSystemEvent" class="selectLabel">${LabelEvent}</label>
|
||||
<select id="selectSystemEvent" name="selectSystemEvent">
|
||||
<option value="WakeFromSleep">${OptionWakeFromSleep}</option>
|
||||
</select>
|
||||
</li>
|
||||
<li id="fldSelectInterval">
|
||||
<label for="selectInterval">${LabelEveryXMinutes}</label>
|
||||
<label for="selectInterval" class="selectLabel">${LabelEveryXMinutes}</label>
|
||||
<select id="selectInterval">
|
||||
<option value="9000000000">15 minutes</option>
|
||||
<option value="18000000000">30 minutes</option>
|
||||
|
|
|
@ -76,6 +76,9 @@
|
|||
$('#txtEpisode', popup).val(item.ExtractedEpisodeNumber);
|
||||
$('#txtEndingEpisode', popup).val(item.ExtractedEndingEpisodeNumber);
|
||||
|
||||
$('#chkRememberCorrection', popup).val(false);
|
||||
$('.extractedName', popup).html(item.ExtractedName);
|
||||
|
||||
$('#hfResultId', popup).val(item.Id);
|
||||
|
||||
var seriesHtml = allSeries.map(function (s) {
|
||||
|
@ -146,7 +149,8 @@
|
|||
SeriesId: $('#selectSeries', form).val(),
|
||||
SeasonNumber: $('#txtSeason', form).val(),
|
||||
EpisodeNumber: $('#txtEpisode', form).val(),
|
||||
EndingEpisodeNumber: $('#txtEndingEpisode', form).val()
|
||||
EndingEpisodeNumber: $('#txtEndingEpisode', form).val(),
|
||||
RememberCorrection: $('#chkRememberCorrection', form).checked()
|
||||
};
|
||||
|
||||
ApiClient.performEpisodeOrganization(resultId, options).then(function () {
|
||||
|
|
136
dashboard-ui/scripts/autoorganizesmart.js
Normal file
136
dashboard-ui/scripts/autoorganizesmart.js
Normal file
|
@ -0,0 +1,136 @@
|
|||
(function ($, document, window) {
|
||||
|
||||
var query = {
|
||||
|
||||
StartIndex: 0,
|
||||
Limit: 100000
|
||||
};
|
||||
|
||||
var currentResult;
|
||||
|
||||
function reloadList(page) {
|
||||
|
||||
Dashboard.showLoadingMsg();
|
||||
|
||||
ApiClient.getSmartMatchInfos(query).then(function (infos) {
|
||||
|
||||
currentResult = infos;
|
||||
|
||||
populateList(page, infos);
|
||||
|
||||
Dashboard.hideLoadingMsg();
|
||||
}, onApiFailure);
|
||||
|
||||
}
|
||||
|
||||
function populateList(page, result) {
|
||||
|
||||
var infos = result.Items;
|
||||
|
||||
if (infos.length > 0) {
|
||||
infos = infos.sort(function (a, b) {
|
||||
|
||||
a = a.OrganizerType + " " + a.Name;
|
||||
b = b.OrganizerType + " " + b.Name;
|
||||
|
||||
if (a == b) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (a < b) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 1;
|
||||
});
|
||||
}
|
||||
|
||||
var html = "";
|
||||
var currentType;
|
||||
|
||||
for (var i = 0, length = infos.length; i < length; i++) {
|
||||
|
||||
var info = infos[i];
|
||||
|
||||
if (info.OrganizerType != currentType) {
|
||||
currentType = info.OrganizerType;
|
||||
|
||||
if (html.length > 0)
|
||||
{
|
||||
html += "</ul>";
|
||||
}
|
||||
|
||||
html += "<h2>" + currentType + "</h2>";
|
||||
|
||||
html += '<ul data-role="listview" data-inset="true" data-auto-enhanced="false" data-split-icon="action">';
|
||||
}
|
||||
|
||||
html += "<li data-role='list-divider'><h3 style='font-weight:bold'>" + info.Name + "</h3></li>";
|
||||
|
||||
for (var n = 0; n < info.MatchStrings.length; n++) {
|
||||
html += "<li title='" + info.MatchStrings[n] + "'>";
|
||||
|
||||
html += "<a style='padding-top: 0.5em; padding-bottom: 0.5em'>";
|
||||
|
||||
html += "<p>" + info.MatchStrings[n] + "</p>";
|
||||
|
||||
html += "<a id='btnDeleteMatchEntry" + info.Id + "' class='btnDeleteMatchEntry' href='#' data-id='" + info.Id + "' data-matchstring='" + info.MatchStrings[n] + "' data-icon='delete'>" + Globalize.translate('ButtonDelete') + "</a>";
|
||||
|
||||
html += "</a>";
|
||||
|
||||
html += "</li>";
|
||||
}
|
||||
}
|
||||
|
||||
html += "</ul>";
|
||||
|
||||
$('.divMatchInfos', page).html(html).trigger('create');
|
||||
}
|
||||
|
||||
function onApiFailure(e) {
|
||||
|
||||
Dashboard.hideLoadingMsg();
|
||||
|
||||
Dashboard.alert({
|
||||
title: Globalize.translate('AutoOrganizeError'),
|
||||
message: Globalize.translate('ErrorOrganizingFileWithErrorCode', e.getResponseHeader("X-Application-Error-Code"))
|
||||
});
|
||||
}
|
||||
|
||||
$(document).on('pageinit', "#libraryFileOrganizerSmartMatchPage", function () {
|
||||
|
||||
var page = this;
|
||||
|
||||
$('.divMatchInfos', page).on('click', '.btnDeleteMatchEntry', function () {
|
||||
|
||||
var button = this;
|
||||
var id = button.getAttribute('data-id');
|
||||
|
||||
var options = {
|
||||
|
||||
MatchString: button.getAttribute('data-matchstring')
|
||||
};
|
||||
|
||||
ApiClient.deleteSmartMatchEntry(id, options).then(function () {
|
||||
|
||||
reloadList(page);
|
||||
|
||||
}, onApiFailure);
|
||||
|
||||
});
|
||||
|
||||
}).on('pageshow', "#libraryFileOrganizerSmartMatchPage", function () {
|
||||
|
||||
var page = this;
|
||||
|
||||
Dashboard.showLoadingMsg();
|
||||
|
||||
reloadList(page);
|
||||
|
||||
}).on('pagebeforehide', "#libraryFileOrganizerSmartMatchPage", function () {
|
||||
|
||||
var page = this;
|
||||
currentResult = null;
|
||||
});
|
||||
|
||||
})(jQuery, document, window);
|
|
@ -1,4 +1,4 @@
|
|||
define(['https://www.gstatic.com/cv/js/sender/v1/cast_sender.js'], function () {
|
||||
define([], function () {
|
||||
|
||||
// Based on https://github.com/googlecast/CastVideos-chrome/blob/master/CastVideos.js
|
||||
var currentResolve;
|
||||
|
@ -874,6 +874,10 @@
|
|||
}));
|
||||
}
|
||||
|
||||
initializeChromecast();
|
||||
var fileref = document.createElement('script');
|
||||
fileref.setAttribute("type", "text/javascript");
|
||||
fileref.onload = initializeChromecast;
|
||||
fileref.setAttribute("src", "https://www.gstatic.com/cv/js/sender/v1/cast_sender.js");
|
||||
document.querySelector('head').appendChild(fileref);
|
||||
|
||||
});
|
|
@ -189,7 +189,7 @@
|
|||
|
||||
li += '</a>';
|
||||
|
||||
li += '<a class="btnDeleteXmlAttribute" href="#" data-index="' + index + '"></a>';
|
||||
li += '<a class="btnDeleteXmlAttribute" href="#" data-icon="delete" data-index="' + index + '"></a>';
|
||||
|
||||
li += '</li>';
|
||||
|
||||
|
@ -256,7 +256,7 @@
|
|||
|
||||
li += '</a>';
|
||||
|
||||
li += '<a class="btnDeleteProfile" href="#" data-index="' + index + '"></a>';
|
||||
li += '<a class="btnDeleteProfile" href="#" data-icon="delete" data-index="' + index + '"></a>';
|
||||
|
||||
li += '</li>';
|
||||
|
||||
|
@ -501,7 +501,7 @@
|
|||
$('#chkEstimateContentLength', popup).checked(transcodingProfile.EstimateContentLength || false).checkboxradio('refresh');
|
||||
$('#chkReportByteRangeRequests', popup).checked(transcodingProfile.TranscodeSeekInfo == 'Bytes').checkboxradio('refresh');
|
||||
|
||||
$('.radioTabButton:first', popup).checked(true).checkboxradio('refresh').trigger('change');
|
||||
$('.radioTabButton:first', popup).trigger('click');
|
||||
|
||||
popup.popup('open');
|
||||
}
|
||||
|
@ -617,7 +617,7 @@
|
|||
$('#selectContainerProfileType', popup).val(containerProfile.Type || 'Video').trigger('change');
|
||||
$('#txtContainerProfileContainer', popup).val(containerProfile.Container || '');
|
||||
|
||||
$('.radioTabButton:first', popup).checked(true).checkboxradio('refresh').trigger('change');
|
||||
$('.radioTabButton:first', popup).trigger('click');
|
||||
|
||||
popup.popup('open');
|
||||
}
|
||||
|
@ -719,7 +719,7 @@
|
|||
$('#selectCodecProfileType', popup).val(codecProfile.Type || 'Video').trigger('change');
|
||||
$('#txtCodecProfileCodec', popup).val(codecProfile.Codec || '');
|
||||
|
||||
$('.radioTabButton:first', popup).checked(true).checkboxradio('refresh').trigger('change');
|
||||
$('.radioTabButton:first', popup).trigger('click');
|
||||
|
||||
popup.popup('open');
|
||||
}
|
||||
|
@ -827,7 +827,7 @@
|
|||
$('#txtResponseProfileAudioCodec', popup).val(responseProfile.AudioCodec || '');
|
||||
$('#txtResponseProfileVideoCodec', popup).val(responseProfile.VideoCodec || '');
|
||||
|
||||
$('.radioTabButton:first', popup).checked(true).checkboxradio('refresh').trigger('change');
|
||||
$('.radioTabButton:first', popup).trigger('click');
|
||||
|
||||
popup.popup('open');
|
||||
}
|
||||
|
@ -944,9 +944,12 @@
|
|||
|
||||
var page = this;
|
||||
|
||||
$('.radioTabButton', page).on('change', function () {
|
||||
$('.radioTabButton', page).on('click', function () {
|
||||
|
||||
var elem = $('.' + this.value, page);
|
||||
$(this).siblings().removeClass('ui-btn-active');
|
||||
$(this).addClass('ui-btn-active');
|
||||
|
||||
var elem = $('.' + this.getAttribute('data-value'), page);
|
||||
elem.siblings('.tabContent').hide();
|
||||
|
||||
elem.show();
|
||||
|
@ -1070,8 +1073,7 @@
|
|||
|
||||
var page = this;
|
||||
|
||||
$('.radioTabButton', page).checked(false).checkboxradio('refresh');
|
||||
$('#radioInfo', page).checked(true).checkboxradio('refresh').trigger('change');
|
||||
$('#radioInfo', page).trigger('click');
|
||||
|
||||
loadProfile(page);
|
||||
});
|
||||
|
|
|
@ -6,78 +6,76 @@
|
|||
|
||||
ApiClient.getJSON(ApiClient.getUrl("Dlna/ProfileInfos")).then(function (result) {
|
||||
|
||||
renderProfiles(page, result);
|
||||
renderUserProfiles(page, result);
|
||||
renderSystemProfiles(page, result);
|
||||
|
||||
Dashboard.hideLoadingMsg();
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
function renderProfiles(page, profiles) {
|
||||
|
||||
renderUserProfiles(page, profiles);
|
||||
renderSystemProfiles(page, profiles);
|
||||
}
|
||||
|
||||
function renderUserProfiles(page, profiles) {
|
||||
|
||||
profiles = profiles.filter(function (p) {
|
||||
renderProfiles(page, page.querySelector('.customProfiles'), profiles.filter(function (p) {
|
||||
return p.Type == 'User';
|
||||
});
|
||||
|
||||
var html = '';
|
||||
|
||||
html += '<ul data-role="listview" data-inset="true" data-split-icon="delete">';
|
||||
|
||||
for (var i = 0, length = profiles.length; i < length; i++) {
|
||||
|
||||
var profile = profiles[i];
|
||||
|
||||
html += '<li>';
|
||||
html += '<a href="dlnaprofile.html?id=' + profile.Id + '">';
|
||||
html += profile.Name;
|
||||
html += '</a>';
|
||||
|
||||
html += '<a href="#" data-icon="delete" class="btnDeleteProfile" data-profileid="' + profile.Id + '">' + Globalize.translate('Delete') + '</a>';
|
||||
|
||||
html += '</li>';
|
||||
}
|
||||
|
||||
html += '</ul>';
|
||||
|
||||
var elem = $('.customProfiles', page).html(html).trigger('create');
|
||||
|
||||
$('.btnDeleteProfile', elem).on('click', function () {
|
||||
|
||||
var id = this.getAttribute('data-profileid');
|
||||
deleteProfile(page, id);
|
||||
});
|
||||
}));
|
||||
}
|
||||
|
||||
function renderSystemProfiles(page, profiles) {
|
||||
|
||||
profiles = profiles.filter(function (p) {
|
||||
renderProfiles(page, page.querySelector('.systemProfiles'), profiles.filter(function (p) {
|
||||
return p.Type == 'System';
|
||||
}));
|
||||
}
|
||||
|
||||
function renderProfiles(page, element, profiles) {
|
||||
|
||||
require(['paper-fab', 'paper-item-body', 'paper-icon-item'], function () {
|
||||
|
||||
var html = '';
|
||||
|
||||
if (profiles.length) {
|
||||
html += '<div class="paperList">';
|
||||
}
|
||||
|
||||
for (var i = 0, length = profiles.length; i < length; i++) {
|
||||
|
||||
var profile = profiles[i];
|
||||
|
||||
html += '<paper-icon-item>';
|
||||
|
||||
html += "<a item-icon class='clearLink' href='dlnaprofile.html?id=" + profile.Id + "'>";
|
||||
html += '<paper-fab mini icon="dvr" class="blue"></paper-fab>';
|
||||
html += "</a>";
|
||||
|
||||
html += '<paper-item-body two-line>';
|
||||
html += "<a class='clearLink' href='dlnaprofile.html?id=" + profile.Id + "'>";
|
||||
|
||||
html += "<div>" + profile.Name + "</div>";
|
||||
//html += "<div secondary>" + task.Description + "</div>";
|
||||
|
||||
html += "</a>";
|
||||
html += '</paper-item-body>';
|
||||
|
||||
if (profile.Type == 'User') {
|
||||
html += '<paper-icon-button icon="delete" class="btnDeleteProfile" data-profileid="' + profile.Id + '" title="' + Globalize.translate('ButtonDelete') + '"></paper-icon-button>';
|
||||
}
|
||||
|
||||
html += '</paper-icon-item>';
|
||||
}
|
||||
|
||||
if (profiles.length) {
|
||||
html += '</div>';
|
||||
}
|
||||
|
||||
element.innerHTML = html;
|
||||
|
||||
$('.btnDeleteProfile', element).on('click', function () {
|
||||
|
||||
var id = this.getAttribute('data-profileid');
|
||||
deleteProfile(page, id);
|
||||
});
|
||||
});
|
||||
|
||||
var html = '';
|
||||
|
||||
html += '<ul data-role="listview" data-inset="true">';
|
||||
|
||||
for (var i = 0, length = profiles.length; i < length; i++) {
|
||||
|
||||
var profile = profiles[i];
|
||||
|
||||
html += '<li>';
|
||||
html += '<a href="dlnaprofile.html?id=' + profile.Id + '">';
|
||||
html += profile.Name;
|
||||
html += '</a>';
|
||||
html += '</li>';
|
||||
}
|
||||
|
||||
html += '</ul>';
|
||||
|
||||
$('.systemProfiles', page).html(html).trigger('create');
|
||||
}
|
||||
|
||||
function deleteProfile(page, id) {
|
||||
|
|
|
@ -596,7 +596,7 @@
|
|||
html += '</li>';
|
||||
}
|
||||
|
||||
elem.html(html).listview('refresh');
|
||||
elem.html(html);
|
||||
|
||||
$('.btnDeletePerson', elem).on('click', function () {
|
||||
|
||||
|
@ -716,7 +716,7 @@
|
|||
for (var i = 0; i < items.length; i++) {
|
||||
html += '<li data-mini="true"><a class="data">' + items[i] + '</a><a href="#" onclick="EditItemMetadataPage.removeElementFromListview(this)" class="btnRemoveFromEditorList"></a></li>';
|
||||
}
|
||||
list.html(html).listview('refresh');
|
||||
list.html(html);
|
||||
}
|
||||
|
||||
function editableListViewValues(list) {
|
||||
|
@ -1008,7 +1008,6 @@
|
|||
self.removeElementFromListview = function (source) {
|
||||
var list = $(source).parents('ul[data-role="listview"]');
|
||||
$(source).parent().remove();
|
||||
list.listview('refresh');
|
||||
};
|
||||
|
||||
self.onRefreshFormSubmit = function () {
|
||||
|
|
|
@ -10,23 +10,7 @@
|
|||
var mediaElement;
|
||||
var self = this;
|
||||
|
||||
function hideStatusBar() {
|
||||
if (options.type == 'video' && window.StatusBar) {
|
||||
//StatusBar.backgroundColorByName("black");
|
||||
//StatusBar.overlaysWebView(true);
|
||||
StatusBar.hide();
|
||||
}
|
||||
}
|
||||
|
||||
function showStatusBar() {
|
||||
if (options.type == 'video' && window.StatusBar) {
|
||||
StatusBar.show();
|
||||
//StatusBar.overlaysWebView(false);
|
||||
}
|
||||
}
|
||||
|
||||
function onEnded() {
|
||||
showStatusBar();
|
||||
Events.trigger(self, 'ended');
|
||||
}
|
||||
|
||||
|
@ -87,7 +71,6 @@
|
|||
var errorCode = elem.error ? elem.error.code : '';
|
||||
console.log('Media element error code: ' + errorCode);
|
||||
|
||||
showStatusBar();
|
||||
Events.trigger(self, 'error');
|
||||
}
|
||||
|
||||
|
@ -130,8 +113,6 @@
|
|||
|
||||
function onOneVideoPlaying(e) {
|
||||
|
||||
hideStatusBar();
|
||||
|
||||
var element = e.target;
|
||||
element.removeEventListener('playing', onOneVideoPlaying);
|
||||
|
||||
|
@ -173,7 +154,7 @@
|
|||
var requiresControls = !MediaPlayer.canAutoPlayAudio();
|
||||
|
||||
if (requiresControls) {
|
||||
html += '<div class="mediaPlayerAudioContainer" style="position: fixed;top: 40%;text-align: center;left: 0;right: 0;"><div class="mediaPlayerAudioContainerInner">';;
|
||||
html += '<div class="mediaPlayerAudioContainer" style="position: fixed;top: 40%;text-align: center;left: 0;right: 0;z-index:999999;"><div class="mediaPlayerAudioContainerInner">';;
|
||||
} else {
|
||||
html += '<div class="mediaPlayerAudioContainer" style="display:none;padding: 1em;background: #222;"><div class="mediaPlayerAudioContainerInner">';;
|
||||
}
|
||||
|
@ -507,8 +488,6 @@
|
|||
$(elem).remove();
|
||||
}
|
||||
}
|
||||
|
||||
showStatusBar();
|
||||
};
|
||||
|
||||
self.supportsTextTracks = function () {
|
||||
|
|
|
@ -902,7 +902,7 @@
|
|||
|
||||
editMetadata: function (itemId) {
|
||||
|
||||
Dashboard.navigate('edititemmetadata.html?id=' + itemId);
|
||||
Dashboard.navigate('edititemmetadata.html?id=' + itemId);
|
||||
|
||||
//require(['components/metadataeditor/metadataeditor'], function (metadataeditor) {
|
||||
|
||||
|
|
|
@ -852,11 +852,19 @@
|
|||
|
||||
require(['hammer'], function (Hammer) {
|
||||
|
||||
var hammertime = new Hammer(element);
|
||||
var manager = new Hammer.Manager(element);
|
||||
|
||||
var press = new Hammer.Press({
|
||||
time: 500
|
||||
});
|
||||
|
||||
manager.add(press);
|
||||
|
||||
//var hammertime = new Hammer(element);
|
||||
element.classList.add('hasTapHold');
|
||||
|
||||
hammertime.on('press', onTapHold);
|
||||
hammertime.on('pressup', onTapHoldUp);
|
||||
manager.on('press', onTapHold);
|
||||
manager.on('pressup', onTapHoldUp);
|
||||
});
|
||||
|
||||
showTapHoldHelp(element);
|
||||
|
|
|
@ -39,47 +39,49 @@
|
|||
|
||||
var html = config.PathSubstitutions.map(function (map) {
|
||||
|
||||
var mapHtml = '<tr>';
|
||||
var mapHtml = '';
|
||||
mapHtml += '<paper-icon-item>';
|
||||
|
||||
mapHtml += '<td style="vertical-align:middle;">';
|
||||
mapHtml += map.From;
|
||||
mapHtml += '</td>';
|
||||
mapHtml += '<paper-fab mini icon="folder" class="blue" item-icon></paper-fab>';
|
||||
|
||||
mapHtml += '<td style="vertical-align:middle;">';
|
||||
mapHtml += map.To;
|
||||
mapHtml += '</td>';
|
||||
mapHtml += '<paper-item-body three-line>';
|
||||
|
||||
mapHtml += "<div>" + map.From + "</div>";
|
||||
mapHtml += "<div secondary><b>" + Globalize.translate('HeaderTo') + "</b></div>";
|
||||
mapHtml += "<div secondary>" + map.To + "</div>";
|
||||
|
||||
mapHtml += '</paper-item-body>';
|
||||
|
||||
mapHtml += '<td>';
|
||||
mapHtml += '<paper-icon-button data-index="' + index + '" icon="delete" class="btnDeletePath"></paper-icon-button>';
|
||||
mapHtml += '</td>';
|
||||
|
||||
mapHtml += '</tr>';
|
||||
mapHtml += '</paper-icon-item>';
|
||||
|
||||
index++;
|
||||
|
||||
return mapHtml;
|
||||
});
|
||||
|
||||
var elem = $('.tbodyPathSubstitutions', page).html(html.join('')).parents('table').table('refresh').trigger('create');
|
||||
}).join('');
|
||||
|
||||
if (config.PathSubstitutions.length) {
|
||||
html = '<div class="paperList">' + html + '</div>';
|
||||
}
|
||||
|
||||
var elem = $('.pathSubstitutions', page).html(html);
|
||||
|
||||
$('.btnDeletePath', elem).on('click', function () {
|
||||
|
||||
remove(page, parseInt(this.getAttribute('data-index')));
|
||||
});
|
||||
|
||||
if (config.PathSubstitutions.length) {
|
||||
$('#tblPaths', page).show();
|
||||
} else {
|
||||
$('#tblPaths', page).hide();
|
||||
}
|
||||
}
|
||||
|
||||
function loadPage(page, config) {
|
||||
|
||||
currentConfig = config;
|
||||
|
||||
reloadPathMappings(page, config);
|
||||
Dashboard.hideLoadingMsg();
|
||||
require(['paper-fab', 'paper-item-body', 'paper-icon-item'], function () {
|
||||
reloadPathMappings(page, config);
|
||||
Dashboard.hideLoadingMsg();
|
||||
});
|
||||
}
|
||||
|
||||
function reload(page) {
|
||||
|
|
|
@ -1,50 +1,64 @@
|
|||
(function () {
|
||||
|
||||
$(document).on('pageshow', "#logPage", function () {
|
||||
$(document).on('pagebeforeshow', "#logPage", function () {
|
||||
|
||||
var page = this;
|
||||
Dashboard.showLoadingMsg();
|
||||
|
||||
var apiClient = ApiClient;
|
||||
require(['paper-fab', 'paper-item-body', 'paper-icon-item'], function () {
|
||||
|
||||
apiClient.getJSON(apiClient.getUrl('System/Logs')).then(function (logs) {
|
||||
var apiClient = ApiClient;
|
||||
|
||||
var html = '';
|
||||
apiClient.getJSON(apiClient.getUrl('System/Logs')).then(function (logs) {
|
||||
|
||||
html += '<ul data-role="listview" data-inset="true">';
|
||||
var html = '';
|
||||
|
||||
html += logs.map(function (log) {
|
||||
html += '<div class="paperList">';
|
||||
|
||||
var logUrl = apiClient.getUrl('System/Logs/Log', {
|
||||
name: log.Name
|
||||
});
|
||||
html += logs.map(function (log) {
|
||||
|
||||
logUrl += "&api_key=" + apiClient.accessToken();
|
||||
var logUrl = apiClient.getUrl('System/Logs/Log', {
|
||||
name: log.Name
|
||||
});
|
||||
|
||||
var logHtml = '<li><a href="' + logUrl + '" target="_blank">';
|
||||
logUrl += "&api_key=" + apiClient.accessToken();
|
||||
|
||||
logHtml += '<h3>';
|
||||
logHtml += log.Name;
|
||||
logHtml += '</h3>';
|
||||
var logHtml = '';
|
||||
logHtml += '<paper-icon-item>';
|
||||
|
||||
var date = parseISO8601Date(log.DateModified, { toLocal: true });
|
||||
logHtml += '<a item-icon class="clearLink" href="' + logUrl + '" target="_blank">';
|
||||
logHtml += '<paper-fab mini icon="schedule" class="blue" item-icon></paper-fab>';
|
||||
logHtml += "</a>";
|
||||
|
||||
var text = date.toLocaleDateString();
|
||||
logHtml += '<paper-item-body two-line>';
|
||||
logHtml += '<a class="clearLink" href="' + logUrl + '" target="_blank">';
|
||||
|
||||
text += ' ' + LibraryBrowser.getDisplayTime(date);
|
||||
logHtml += "<div>" + log.Name + "</div>";
|
||||
|
||||
logHtml += '<p>' + text + '</p>';
|
||||
var date = parseISO8601Date(log.DateModified, { toLocal: true });
|
||||
|
||||
logHtml += '</li>';
|
||||
var text = date.toLocaleDateString();
|
||||
|
||||
return logHtml;
|
||||
text += ' ' + LibraryBrowser.getDisplayTime(date);
|
||||
|
||||
})
|
||||
.join('');
|
||||
logHtml += '<div secondary>' + text + '</div>';
|
||||
|
||||
html += '</ul>';
|
||||
logHtml += "</a>";
|
||||
logHtml += '</paper-item-body>';
|
||||
|
||||
$('.serverLogs', page).html(html).trigger('create');
|
||||
logHtml += '</paper-icon-item>';
|
||||
|
||||
return logHtml;
|
||||
|
||||
})
|
||||
.join('');
|
||||
|
||||
html += '</div>';
|
||||
|
||||
$('.serverLogs', page).html(html).trigger('create');
|
||||
Dashboard.hideLoadingMsg();
|
||||
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
@ -206,8 +206,6 @@
|
|||
|
||||
elemToMove.parentNode.removeChild(elemToMove);
|
||||
$(elemToMove).insertAfter(insertAfter);
|
||||
|
||||
$('.imageFetcherGroup', page).controlgroup('destroy').controlgroup();
|
||||
});
|
||||
|
||||
$('.btnUp', elem).on('click', function () {
|
||||
|
@ -220,8 +218,6 @@
|
|||
|
||||
elemToMove.parentNode.removeChild(elemToMove);
|
||||
$(elemToMove).insertBefore(insertBefore);
|
||||
|
||||
$('.imageFetcherGroup', page).controlgroup('destroy').controlgroup();
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -330,8 +326,6 @@
|
|||
|
||||
elemToMove.parentNode.removeChild(elemToMove);
|
||||
$(elemToMove).insertAfter(insertAfter);
|
||||
|
||||
$('.metadataFetcherGroup', page).controlgroup('destroy').controlgroup();
|
||||
});
|
||||
|
||||
$('.btnUp', elem).on('click', function () {
|
||||
|
@ -344,8 +338,6 @@
|
|||
|
||||
elemToMove.parentNode.removeChild(elemToMove);
|
||||
$(elemToMove).insertBefore(insertBefore);
|
||||
|
||||
$('.metadataFetcherGroup', page).controlgroup('destroy').controlgroup();
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -551,8 +543,6 @@
|
|||
}
|
||||
|
||||
});
|
||||
|
||||
ul.listview('destroy').listview({});
|
||||
});
|
||||
|
||||
$('#selectItemType', page).on('change', function () {
|
||||
|
|
|
@ -129,10 +129,10 @@
|
|||
|
||||
function bindEvents(elem) {
|
||||
|
||||
currentTimeElement = $('.nowPlayingBarCurrentTime', elem);
|
||||
currentTimeElement = elem.querySelector('.nowPlayingBarCurrentTime');
|
||||
nowPlayingImageElement = elem.querySelector('.nowPlayingImage');
|
||||
nowPlayingTextElement = $('.nowPlayingBarText', elem);
|
||||
nowPlayingUserData = $('.nowPlayingBarUserDataButtons', elem);
|
||||
nowPlayingTextElement = elem.querySelector('.nowPlayingBarText');
|
||||
nowPlayingUserData = elem.querySelector('.nowPlayingBarUserDataButtons');
|
||||
|
||||
unmuteButton = $('.unmuteButton', elem).on('click', function () {
|
||||
|
||||
|
@ -385,7 +385,7 @@
|
|||
|
||||
}
|
||||
|
||||
currentTimeElement.html(timeText);
|
||||
currentTimeElement.innerHTML = timeText;
|
||||
|
||||
updateNowPlayingInfo(state);
|
||||
}
|
||||
|
@ -478,16 +478,16 @@
|
|||
var nameHtml = MediaController.getNowPlayingNameHtml(state.NowPlayingItem) || '';
|
||||
|
||||
if (nameHtml.indexOf('<br/>') != -1) {
|
||||
nowPlayingTextElement.addClass('nowPlayingDoubleText');
|
||||
nowPlayingTextElement.classList.add('nowPlayingDoubleText');
|
||||
} else {
|
||||
nowPlayingTextElement.removeClass('nowPlayingDoubleText');
|
||||
nowPlayingTextElement.classList.remove('nowPlayingDoubleText');
|
||||
}
|
||||
|
||||
if (state.NowPlayingItem.Id) {
|
||||
nameHtml = '<a style="color:inherit;text-decoration:none;" href="' + LibraryBrowser.getHref(state.NowPlayingItem) + '">' + nameHtml + '</a>';
|
||||
}
|
||||
|
||||
nowPlayingTextElement.html(nameHtml);
|
||||
nowPlayingTextElement.innerHTML = nameHtml;
|
||||
|
||||
var url;
|
||||
var imgHeight = 80;
|
||||
|
@ -540,10 +540,10 @@
|
|||
|
||||
if (nowPlayingItem.Id) {
|
||||
ApiClient.getItem(Dashboard.getCurrentUserId(), nowPlayingItem.Id).then(function (item) {
|
||||
nowPlayingUserData.html(LibraryBrowser.getUserDataIconsHtml(item, false));
|
||||
nowPlayingUserData.innerHTML = LibraryBrowser.getUserDataIconsHtml(item, false);
|
||||
});
|
||||
} else {
|
||||
nowPlayingUserData.html('');
|
||||
nowPlayingUserData.innerHTML = '';
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -134,10 +134,16 @@
|
|||
|
||||
if (showNoPluginsMessage) {
|
||||
html += '<div style="padding:5px;">';
|
||||
html += '<p>' + Globalize.translate('MessageNoPluginsInstalled') + '</p>';
|
||||
html += '<p><a href="plugincatalog.html">';
|
||||
html += Globalize.translate('BrowsePluginCatalogMessage');
|
||||
html += '</a></p>';
|
||||
|
||||
if (AppInfo.enableAppStorePolicy) {
|
||||
html += '<p>' + Globalize.translate('MessageNoPluginsDueToAppStore') + '</p>';
|
||||
} else {
|
||||
html += '<p>' + Globalize.translate('MessageNoPluginsInstalled') + '</p>';
|
||||
|
||||
html += '<p><a href="plugincatalog.html">';
|
||||
html += Globalize.translate('BrowsePluginCatalogMessage');
|
||||
html += '</a></p>';
|
||||
}
|
||||
html += '</div>';
|
||||
}
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
var html = '';
|
||||
|
||||
// style="margin: -.2em -.8em;"
|
||||
html += '<div data-role="controlgroup">';
|
||||
html += '<div>';
|
||||
|
||||
var index = 0;
|
||||
var idPrefix = 'chk' + selector.substring(1);
|
||||
|
|
|
@ -18,37 +18,39 @@ var ScheduledTaskPage = {
|
|||
|
||||
loadScheduledTask: function (task) {
|
||||
|
||||
var page = $.mobile.activePage;
|
||||
var page = $($.mobile.activePage)[0];
|
||||
|
||||
$('.taskName', page).html(task.Name);
|
||||
|
||||
$('#pTaskDescription', page).html(task.Description);
|
||||
|
||||
ScheduledTaskPage.loadTaskTriggers(task);
|
||||
require(['paper-fab', 'paper-item-body', 'paper-icon-item'], function () {
|
||||
ScheduledTaskPage.loadTaskTriggers(page, task);
|
||||
});
|
||||
|
||||
Dashboard.hideLoadingMsg();
|
||||
},
|
||||
|
||||
loadTaskTriggers: function (task) {
|
||||
loadTaskTriggers: function (context, task) {
|
||||
|
||||
var html = '';
|
||||
|
||||
html += '<li data-role="list-divider"><h3>' + Globalize.translate('HeaderTaskTriggers') + '</h3></li>';
|
||||
html += '<div class="paperList">';
|
||||
|
||||
for (var i = 0, length = task.Triggers.length; i < length; i++) {
|
||||
|
||||
var trigger = task.Triggers[i];
|
||||
|
||||
html += '<li>';
|
||||
html += '<paper-icon-item>';
|
||||
|
||||
html += '<a href="#">';
|
||||
html += '<paper-fab mini icon="schedule" class="blue" item-icon></paper-fab>';
|
||||
|
||||
html += '<h3>';
|
||||
html += ScheduledTaskPage.getTriggerFriendlyName(trigger);
|
||||
html += '</h3>';
|
||||
html += '<paper-item-body two-line>';
|
||||
|
||||
html += "<div>" + ScheduledTaskPage.getTriggerFriendlyName(trigger) + "</div>";
|
||||
|
||||
if (trigger.MaxRuntimeMs) {
|
||||
html += '<p>';
|
||||
html += '<div secondary>';
|
||||
|
||||
var hours = trigger.MaxRuntimeMs / 3600000;
|
||||
|
||||
|
@ -57,19 +59,19 @@ var ScheduledTaskPage = {
|
|||
} else {
|
||||
html += Globalize.translate('ValueTimeLimitMultiHour', hours);
|
||||
}
|
||||
html += '</p>';
|
||||
html += '</div>';
|
||||
}
|
||||
|
||||
html += '</a>';
|
||||
html += '</paper-item-body>';
|
||||
|
||||
html += '<a href="#" onclick="ScheduledTaskPage.confirmDeleteTrigger(' + i + ');">';
|
||||
html += Globalize.translate('Delete');
|
||||
html += '</a>';
|
||||
html += '<paper-icon-button icon="delete" title="' + Globalize.translate('ButtonDelete') + '" onclick="ScheduledTaskPage.confirmDeleteTrigger(' + i + ');"></paper-icon-button>';
|
||||
|
||||
html += '</li>';
|
||||
html += '</paper-icon-item>';
|
||||
}
|
||||
|
||||
$('#ulTaskTriggers', $.mobile.activePage).html(html).listview('refresh');
|
||||
html += '</div>';
|
||||
|
||||
context.querySelector('.taskTriggers').innerHTML = html;
|
||||
},
|
||||
|
||||
getTriggerFriendlyName: function (trigger) {
|
||||
|
|
|
@ -1639,7 +1639,15 @@ var AppInfo = {};
|
|||
|
||||
function initializeApiClient(apiClient) {
|
||||
|
||||
apiClient.enableAppStorePolicy = AppInfo.enableAppStorePolicy;
|
||||
if (AppInfo.enableAppStorePolicy) {
|
||||
apiClient.getAvailablePlugins = function() {
|
||||
return Promise.resolve([]);
|
||||
};
|
||||
apiClient.getInstalledPlugins = function () {
|
||||
return Promise.resolve([]);
|
||||
};
|
||||
}
|
||||
|
||||
apiClient.getDefaultImageQuality = Dashboard.getDefaultImageQuality;
|
||||
apiClient.normalizeImageOptions = Dashboard.normalizeImageOptions;
|
||||
|
||||
|
@ -1958,26 +1966,29 @@ var AppInfo = {};
|
|||
define("paper-icon-item", ["html!" + bowerPath + "/paper-item/paper-icon-item.html"]);
|
||||
define("paper-item-body", ["html!" + bowerPath + "/paper-item/paper-item-body.html"]);
|
||||
|
||||
define("paper-collapse-item", ["html!" + bowerPath + "/paper-collapse-item/paper-collapse-item.html"]);
|
||||
|
||||
define("jstree", [bowerPath + "/jstree/dist/jstree.min", "css!thirdparty/jstree/themes/default/style.min.css"]);
|
||||
|
||||
define("jqmicons", ['css!thirdparty/jquerymobile-1.4.5/jquery.mobile.custom.icons.css']);
|
||||
define("jqmtable", ["thirdparty/jquerymobile-1.4.5/jqm.table", 'css!thirdparty/jquerymobile-1.4.5/jqm.table.css']);
|
||||
define("jqmbase", ['css!thirdparty/jquerymobile-1.4.5/jquery.mobile.custom.theme.css']);
|
||||
define("jqmicons", ['jqmbase', 'css!thirdparty/jquerymobile-1.4.5/jquery.mobile.custom.icons.css']);
|
||||
define("jqmtable", ['jqmbase', "thirdparty/jquerymobile-1.4.5/jqm.table", 'css!thirdparty/jquerymobile-1.4.5/jqm.table.css']);
|
||||
|
||||
define("jqmwidget", ["thirdparty/jquerymobile-1.4.5/jqm.widget"]);
|
||||
define("jqmwidget", ['jqmbase', "thirdparty/jquerymobile-1.4.5/jqm.widget"]);
|
||||
|
||||
define("jqmslider", ["thirdparty/jquerymobile-1.4.5/jqm.slider", 'css!thirdparty/jquerymobile-1.4.5/jqm.slider.css']);
|
||||
define("jqmslider", ['jqmbase', "thirdparty/jquerymobile-1.4.5/jqm.slider", 'css!thirdparty/jquerymobile-1.4.5/jqm.slider.css']);
|
||||
|
||||
define("jqmpopup", ["thirdparty/jquerymobile-1.4.5/jqm.popup", 'css!thirdparty/jquerymobile-1.4.5/jqm.popup.css']);
|
||||
define("jqmpopup", ['jqmbase', "thirdparty/jquerymobile-1.4.5/jqm.popup", 'css!thirdparty/jquerymobile-1.4.5/jqm.popup.css']);
|
||||
|
||||
define("jqmlistview", ["thirdparty/jquerymobile-1.4.5/jqm.listview", 'css!thirdparty/jquerymobile-1.4.5/jqm.listview.css']);
|
||||
define("jqmlistview", ['jqmbase', 'css!thirdparty/jquerymobile-1.4.5/jqm.listview.css']);
|
||||
|
||||
define("jqmcontrolgroup", ["thirdparty/jquerymobile-1.4.5/jqm.controlgroup", 'css!thirdparty/jquerymobile-1.4.5/jqm.controlgroup.css']);
|
||||
define("jqmcontrolgroup", ['jqmbase', 'css!thirdparty/jquerymobile-1.4.5/jqm.controlgroup.css']);
|
||||
|
||||
define("jqmcollapsible", ["jqmicons", "thirdparty/jquerymobile-1.4.5/jqm.collapsible", 'css!thirdparty/jquerymobile-1.4.5/jqm.collapsible.css']);
|
||||
define("jqmcollapsible", ['jqmbase', "jqmicons", "thirdparty/jquerymobile-1.4.5/jqm.collapsible", 'css!thirdparty/jquerymobile-1.4.5/jqm.collapsible.css']);
|
||||
|
||||
define("jqmcheckbox", ["jqmicons", "thirdparty/jquerymobile-1.4.5/jqm.checkbox", 'css!thirdparty/jquerymobile-1.4.5/jqm.checkbox.css']);
|
||||
define("jqmcheckbox", ['jqmbase', "jqmicons", "thirdparty/jquerymobile-1.4.5/jqm.checkbox", 'css!thirdparty/jquerymobile-1.4.5/jqm.checkbox.css']);
|
||||
|
||||
define("jqmpanel", ["thirdparty/jquerymobile-1.4.5/jqm.panel", 'css!thirdparty/jquerymobile-1.4.5/jqm.panel.css']);
|
||||
define("jqmpanel", ['jqmbase', "thirdparty/jquerymobile-1.4.5/jqm.panel", 'css!thirdparty/jquerymobile-1.4.5/jqm.panel.css']);
|
||||
|
||||
define("iron-icon-set", ["html!" + bowerPath + "/iron-icon/iron-icon.html", "html!" + bowerPath + "/iron-iconset-svg/iron-iconset-svg.html"]);
|
||||
define("slideshow", [embyWebComponentsBowerPath + "/slideshow/slideshow"], returnFirstDependency);
|
||||
|
@ -2037,6 +2048,21 @@ var AppInfo = {};
|
|||
define("connectionManager", [], function () {
|
||||
return ConnectionManager;
|
||||
});
|
||||
|
||||
define("globalize", [], function () {
|
||||
return Globalize;
|
||||
});
|
||||
|
||||
define('dialogText', [], getDialogText());
|
||||
}
|
||||
|
||||
function getDialogText() {
|
||||
return function () {
|
||||
return {
|
||||
buttonOk: 'ButtonOk',
|
||||
buttonCancel: 'ButtonCancel'
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
function initRequireWithBrowser(browser) {
|
||||
|
@ -2223,12 +2249,7 @@ var AppInfo = {};
|
|||
depends = depends || [];
|
||||
|
||||
if (newHtml.indexOf('type-interior') != -1) {
|
||||
depends.push('jqmpopup');
|
||||
depends.push('jqmlistview');
|
||||
depends.push('jqmcollapsible');
|
||||
depends.push('jqmcontrolgroup');
|
||||
depends.push('jqmcheckbox');
|
||||
depends.push('scripts/notifications');
|
||||
addLegacyDependencies(depends, window.location.href);
|
||||
}
|
||||
|
||||
require(depends, function () {
|
||||
|
@ -2493,6 +2514,21 @@ var AppInfo = {};
|
|||
|
||||
})();
|
||||
|
||||
function addLegacyDependencies(depends, url) {
|
||||
|
||||
var isPluginpage = url.toLowerCase().indexOf('/configurationpage?') != -1;
|
||||
|
||||
if (isPluginpage) {
|
||||
depends.push('jqmpopup');
|
||||
depends.push('jqmcollapsible');
|
||||
}
|
||||
|
||||
depends.push('jqmcontrolgroup');
|
||||
depends.push('jqmlistview');
|
||||
depends.push('jqmcheckbox');
|
||||
depends.push('scripts/notifications');
|
||||
}
|
||||
|
||||
function pageClassOn(eventName, className, fn) {
|
||||
|
||||
document.addEventListener(eventName, function (e) {
|
||||
|
|
|
@ -78,7 +78,7 @@
|
|||
|
||||
return new Promise(function (resolve, reject) {
|
||||
|
||||
require(['paper-checkbox', 'paper-input'], function () {
|
||||
require(['paper-checkbox', 'paper-input', 'jqmcollapsible'], function () {
|
||||
renderFormInternal(options);
|
||||
resolve();
|
||||
});
|
||||
|
@ -183,7 +183,7 @@
|
|||
//html += '</div>';
|
||||
//html += '</div>';
|
||||
|
||||
$(elem).html(html);
|
||||
$(elem).html(html).trigger('create');
|
||||
|
||||
$('#selectSyncTarget', elem).on('change', function () {
|
||||
|
||||
|
|
|
@ -1,4 +1,8 @@
|
|||
{
|
||||
"HeaderTaskTriggers": "Task Triggers",
|
||||
"TabSmartMatches": "Smart Matches",
|
||||
"LabelOrganizeSmartMatchOption": "In the future, organize all files into the selected series if the name contains",
|
||||
"TabSmartMatchInfo": "Manage your smart matches that were added using the Auto-Organize correction dialog",
|
||||
"LabelExit": "\u062e\u0631\u0648\u062c",
|
||||
"LabelVisitCommunity": "\u0632\u064a\u0627\u0631\u0629 \u0627\u0644\u0645\u062c\u062a\u0645\u0639",
|
||||
"LabelGithub": "\u062c\u064a\u062a \u0647\u0628",
|
||||
|
@ -1528,5 +1532,5 @@
|
|||
"HeaderNewRecording": "New Recording",
|
||||
"ButtonAdvanced": "Advanced",
|
||||
"LabelCodecIntrosPath": "Codec intros path:",
|
||||
"LabelCodecIntrosPathHelp": "A folder containing video files. If an intro video file name matches the video codec, audio codec, or audio profile, then it will be played prior to the main feature."
|
||||
"LabelCodecIntrosPathHelp": "A folder containing video files. If an intro video file name matches the video codec, audio codec, audio profile, or a tag, then it will be played prior to the main feature."
|
||||
}
|
|
@ -1,4 +1,8 @@
|
|||
{
|
||||
"HeaderTaskTriggers": "Task Triggers",
|
||||
"TabSmartMatches": "Smart Matches",
|
||||
"LabelOrganizeSmartMatchOption": "In the future, organize all files into the selected series if the name contains",
|
||||
"TabSmartMatchInfo": "Manage your smart matches that were added using the Auto-Organize correction dialog",
|
||||
"LabelExit": "\u0418\u0437\u0445\u043e\u0434",
|
||||
"LabelVisitCommunity": "\u041f\u043e\u0441\u0435\u0442\u0438 \u043e\u0431\u0449\u0435\u0441\u0442\u0432\u043e\u0442\u043e",
|
||||
"LabelGithub": "Github",
|
||||
|
@ -1528,5 +1532,5 @@
|
|||
"HeaderNewRecording": "New Recording",
|
||||
"ButtonAdvanced": "Advanced",
|
||||
"LabelCodecIntrosPath": "Codec intros path:",
|
||||
"LabelCodecIntrosPathHelp": "A folder containing video files. If an intro video file name matches the video codec, audio codec, or audio profile, then it will be played prior to the main feature."
|
||||
"LabelCodecIntrosPathHelp": "A folder containing video files. If an intro video file name matches the video codec, audio codec, audio profile, or a tag, then it will be played prior to the main feature."
|
||||
}
|
|
@ -1,4 +1,8 @@
|
|||
{
|
||||
"HeaderTaskTriggers": "Task Triggers",
|
||||
"TabSmartMatches": "Smart Matches",
|
||||
"LabelOrganizeSmartMatchOption": "In the future, organize all files into the selected series if the name contains",
|
||||
"TabSmartMatchInfo": "Manage your smart matches that were added using the Auto-Organize correction dialog",
|
||||
"LabelExit": "Sortir",
|
||||
"LabelVisitCommunity": "Visita la comunitat",
|
||||
"LabelGithub": "Github",
|
||||
|
@ -1528,5 +1532,5 @@
|
|||
"HeaderNewRecording": "New Recording",
|
||||
"ButtonAdvanced": "Advanced",
|
||||
"LabelCodecIntrosPath": "Codec intros path:",
|
||||
"LabelCodecIntrosPathHelp": "A folder containing video files. If an intro video file name matches the video codec, audio codec, or audio profile, then it will be played prior to the main feature."
|
||||
"LabelCodecIntrosPathHelp": "A folder containing video files. If an intro video file name matches the video codec, audio codec, audio profile, or a tag, then it will be played prior to the main feature."
|
||||
}
|
|
@ -1,4 +1,8 @@
|
|||
{
|
||||
"HeaderTaskTriggers": "Spou\u0161t\u011b\u010de \u00faloh",
|
||||
"TabSmartMatches": "Smart Matches",
|
||||
"LabelOrganizeSmartMatchOption": "In the future, organize all files into the selected series if the name contains",
|
||||
"TabSmartMatchInfo": "Manage your smart matches that were added using the Auto-Organize correction dialog",
|
||||
"LabelExit": "Zav\u0159\u00edt",
|
||||
"LabelVisitCommunity": "Nav\u0161t\u00edvit komunitu",
|
||||
"LabelGithub": "Github",
|
||||
|
@ -1528,5 +1532,5 @@
|
|||
"HeaderNewRecording": "New Recording",
|
||||
"ButtonAdvanced": "Advanced",
|
||||
"LabelCodecIntrosPath": "Codec intros path:",
|
||||
"LabelCodecIntrosPathHelp": "A folder containing video files. If an intro video file name matches the video codec, audio codec, or audio profile, then it will be played prior to the main feature."
|
||||
"LabelCodecIntrosPathHelp": "A folder containing video files. If an intro video file name matches the video codec, audio codec, audio profile, or a tag, then it will be played prior to the main feature."
|
||||
}
|
|
@ -1,4 +1,8 @@
|
|||
{
|
||||
"HeaderTaskTriggers": "Task Triggers",
|
||||
"TabSmartMatches": "Smart Matches",
|
||||
"LabelOrganizeSmartMatchOption": "In the future, organize all files into the selected series if the name contains",
|
||||
"TabSmartMatchInfo": "Manage your smart matches that were added using the Auto-Organize correction dialog",
|
||||
"LabelExit": "Afslut",
|
||||
"LabelVisitCommunity": "Bes\u00f8g F\u00e6lleskab",
|
||||
"LabelGithub": "Github",
|
||||
|
@ -1528,5 +1532,5 @@
|
|||
"HeaderNewRecording": "New Recording",
|
||||
"ButtonAdvanced": "Advanced",
|
||||
"LabelCodecIntrosPath": "Codec intros path:",
|
||||
"LabelCodecIntrosPathHelp": "A folder containing video files. If an intro video file name matches the video codec, audio codec, or audio profile, then it will be played prior to the main feature."
|
||||
"LabelCodecIntrosPathHelp": "A folder containing video files. If an intro video file name matches the video codec, audio codec, audio profile, or a tag, then it will be played prior to the main feature."
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue