update dialogs

This commit is contained in:
Luke Pulverenti 2016-08-29 03:12:24 -04:00
parent 31449f85de
commit 7acfaee309
15 changed files with 86 additions and 143 deletions

View File

@ -14,12 +14,12 @@
},
"devDependencies": {},
"ignore": [],
"version": "1.4.193",
"_release": "1.4.193",
"version": "1.4.197",
"_release": "1.4.197",
"_resolution": {
"type": "version",
"tag": "1.4.193",
"commit": "e97de63ae9ed4e9f10fbd27da9de8e8a77ffd3fb"
"tag": "1.4.197",
"commit": "253ef4d5fe1a4e7126ea48786342d3cb44c23b47"
},
"_source": "https://github.com/MediaBrowser/emby-webcomponents.git",
"_target": "^1.2.1",

View File

@ -873,7 +873,7 @@ define(['datetime', 'imageLoader', 'connectionManager', 'itemHelper', 'mediaInfo
}
}
if (showTitle && forceName && overlayText && lines.length == 1) {
if ((showTitle || !imgUrl) && forceName && overlayText && lines.length == 1) {
lines = [];
}
@ -1205,6 +1205,8 @@ define(['datetime', 'imageLoader', 'connectionManager', 'itemHelper', 'mediaInfo
actionAttribute = '';
}
className += ' card-withuserdata';
var positionTicksData = item.UserData && item.UserData.PlaybackPositionTicks ? (' data-positionticks="' + item.UserData.PlaybackPositionTicks + '"') : '';
var collectionIdData = options.collectionId ? (' data-collectionid="' + options.collectionId + '"') : '';
var playlistIdData = options.playlistId ? (' data-playlistid="' + options.playlistId + '"') : '';
@ -1398,7 +1400,7 @@ define(['datetime', 'imageLoader', 'connectionManager', 'itemHelper', 'mediaInfo
function onUserDataChanged(userData) {
var cards = document.querySelectorAll('.card[data-id="' + userData.ItemId + '"]');
var cards = document.querySelectorAll('.card-withuserdata[data-id="' + userData.ItemId + '"]');
for (var i = 0, length = cards.length; i < length; i++) {
updateUserData(cards[i], userData);

View File

@ -200,22 +200,10 @@ define(['dom'], function (dom) {
var offset = getOffset(elem);
var posY = offset.top;
var posX = offset.left;
offset.right = offset.left + offset.width;
offset.bottom = offset.top + offset.height;
var width = offset.width;
var height = offset.height;
//var width = elem.offsetWidth;
//var height = elem.offsetHeight;
return {
left: posX,
top: posY,
width: width,
height: height,
right: posX + width,
bottom: posY + height
};
return offset;
}
function nav(activeElement, direction) {

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

View File

@ -73,6 +73,7 @@ define(['serverNotifications', 'playbackManager', 'events', 'globalize', 'requir
options.data = options.data || {};
options.data.serverId = apiClient.serverInfo().Id;
options.icon = options.icon || getIconUrl();
options.badge = options.badge || getIconUrl('badge.png');
resetRegistration();

View File

@ -47,17 +47,6 @@ define(['browser', 'layoutManager', 'dom', 'scrollStyles'], function (browser, l
this.removeEventListener(event.type, disableOneEvent);
}
/**
* Check if variable is a number.
*
* @param {Mixed} value
*s
* @return {Boolean}
*/
function isNumber(value) {
return !isNaN(parseFloat(value)) && isFinite(value);
}
/**
* Make sure that number is within the limits.
*
@ -71,10 +60,6 @@ define(['browser', 'layoutManager', 'dom', 'scrollStyles'], function (browser, l
return number < min ? min : number > max ? max : number;
}
var pluginName = 'sly';
var className = 'Sly';
var namespace = pluginName;
// Other global values
var dragMouseEvents = ['mousemove', 'mouseup'];
var dragTouchEvents = ['touchmove', 'touchend'];
@ -107,7 +92,6 @@ define(['browser', 'layoutManager', 'dom', 'scrollStyles'], function (browser, l
dragSource: null, // Selector or DOM element for catching dragging events. Default is FRAME.
mouseDragging: 1, // Enable navigation by dragging the SLIDEE with mouse cursor.
touchDragging: 1, // Enable navigation by dragging the SLIDEE with touch events.
releaseSwing: false, // Ease out on dragging swing release.
swingSpeed: 0.2, // Swing synchronization speed, where: 1 = instant, 0 = infinite.
dragThreshold: 3, // Distance in pixels before Sly recognizes dragging.
intervactive: null, // Selector for special interactive elements.
@ -168,11 +152,6 @@ define(['browser', 'layoutManager', 'dom', 'scrollStyles'], function (browser, l
cur: 0
};
// Items
var rel = {
activeItem: null
};
// Miscellaneous
var scrollSource = o.scrollSource ? o.scrollSource : frameElement;
var dragSourceElement = o.dragSource ? o.dragSource : frameElement;
@ -185,7 +164,7 @@ define(['browser', 'layoutManager', 'dom', 'scrollStyles'], function (browser, l
delta: 0,
resetTime: 200
};
var historyID = 0;
var i, l;
// Normalizing frame
@ -586,21 +565,6 @@ define(['browser', 'layoutManager', 'dom', 'scrollStyles'], function (browser, l
return arguments[0];
}
/**
* Keeps track of a dragging delta history.
*
* @return {Void}
*/
function draggingHistoryTick() {
// Looking at this, I know what you're thinking :) But as we need only 4 history states, doing it this way
// as opposed to a proper loop is ~25 bytes smaller (when minified with GCC), a lot faster, and doesn't
// generate garbage. The loop version would create 2 new variables on every tick. Unexaptable!
dragging.history[0] = dragging.history[1];
dragging.history[1] = dragging.history[2];
dragging.history[2] = dragging.history[3];
dragging.history[3] = dragging.delta;
}
/**
* Initialize continuous movement.
*
@ -649,16 +613,15 @@ define(['browser', 'layoutManager', 'dom', 'scrollStyles'], function (browser, l
dragging.init = 0;
dragging.source = event.target;
dragging.touch = isTouch;
dragging.pointer = isTouch ? event.touches[0] : event;
dragging.initX = dragging.pointer.pageX;
dragging.initY = dragging.pointer.pageY;
var pointer = isTouch ? event.touches[0] : event;
dragging.initX = pointer.pageX;
dragging.initY = pointer.pageY;
dragging.initPos = isSlidee ? pos.cur : hPos.cur;
dragging.start = +new Date();
dragging.time = 0;
dragging.path = 0;
dragging.delta = 0;
dragging.locked = 0;
dragging.history = [0, 0, 0, 0];
dragging.pathToLock = isSlidee ? isTouch ? 30 : 10 : 0;
// Bind dragging events
@ -680,12 +643,6 @@ define(['browser', 'layoutManager', 'dom', 'scrollStyles'], function (browser, l
if (isSlidee) {
slideeElement.classList.add(o.draggedClass);
}
// Keep track of a dragging path history. This is later used in the
// dragging release swing calculation when dragging SLIDEE.
if (isSlidee) {
historyID = setInterval(draggingHistoryTick, 10);
}
}
/**
@ -697,9 +654,9 @@ define(['browser', 'layoutManager', 'dom', 'scrollStyles'], function (browser, l
*/
function dragHandler(event) {
dragging.released = event.type === 'mouseup' || event.type === 'touchend';
dragging.pointer = dragging.touch ? event[dragging.released ? 'changedTouches' : 'touches'][0] : event;
dragging.pathX = dragging.pointer.pageX - dragging.initX;
dragging.pathY = dragging.pointer.pageY - dragging.initY;
var pointer = dragging.touch ? event[dragging.released ? 'changedTouches' : 'touches'][0] : event;
dragging.pathX = pointer.pageX - dragging.initX;
dragging.pathY = pointer.pageY - dragging.initY;
dragging.path = sqrt(pow(dragging.pathX, 2) + pow(dragging.pathY, 2));
dragging.delta = o.horizontal ? dragging.pathX : dragging.pathY;
@ -734,13 +691,6 @@ define(['browser', 'layoutManager', 'dom', 'scrollStyles'], function (browser, l
// Cancel dragging on release
if (dragging.released) {
dragEnd();
// Adjust path with a swing on mouse release
if (o.releaseSwing && dragging.slidee) {
dragging.swing = (dragging.delta - dragging.history[0]) / 40 * 300;
dragging.delta += dragging.swing;
dragging.tweese = abs(dragging.swing) > 10;
}
}
slideTo(dragging.slidee ? round(dragging.initPos - dragging.delta) : handleToSlidee(dragging.initPos + dragging.delta));
@ -752,7 +702,6 @@ define(['browser', 'layoutManager', 'dom', 'scrollStyles'], function (browser, l
* @return {Void}
*/
function dragEnd() {
clearInterval(historyID);
dragging.released = true;
if (dragging.touch) {
@ -825,8 +774,6 @@ define(['browser', 'layoutManager', 'dom', 'scrollStyles'], function (browser, l
*/
function scrollHandler(event) {
event[namespace] = self;
// Ignore if there is no scrolling to be done
if (!o.scrollBy || pos.start === pos.end) {
return;
@ -862,8 +809,7 @@ define(['browser', 'layoutManager', 'dom', 'scrollStyles'], function (browser, l
self.destroy = function () {
dom.removeEventListener(window, 'resize', onResize, {
passive: true,
capture: true
passive: true
});
// Reset native FRAME element scroll
@ -946,8 +892,7 @@ define(['browser', 'layoutManager', 'dom', 'scrollStyles'], function (browser, l
if (!o.scrollWidth) {
dom.addEventListener(window, 'resize', onResize, {
passive: true,
capture: true
passive: true
});
}

View File

@ -32,14 +32,14 @@
"web-component-tester": "^4.0.0",
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
},
"homepage": "https://github.com/PolymerElements/iron-icon",
"homepage": "https://github.com/polymerelements/iron-icon",
"_release": "1.0.10",
"_resolution": {
"type": "version",
"tag": "v1.0.10",
"commit": "f4e146da4982ff96bb25db85290c09e8de4ec734"
},
"_source": "git://github.com/PolymerElements/iron-icon.git",
"_source": "git://github.com/polymerelements/iron-icon.git",
"_target": "^1.0.0",
"_originalSource": "PolymerElements/iron-icon"
"_originalSource": "polymerelements/iron-icon"
}

View File

@ -32,14 +32,14 @@
"iron-component-page": "polymerElements/iron-component-page#^1.1.6"
},
"private": true,
"homepage": "https://github.com/polymer/polymer",
"homepage": "https://github.com/Polymer/polymer",
"_release": "1.6.1",
"_resolution": {
"type": "version",
"tag": "v1.6.1",
"commit": "1f197d9d7874b1e5808b2a5c26f34446a7d912fc"
},
"_source": "git://github.com/polymer/polymer.git",
"_target": "^1.1.0",
"_originalSource": "polymer/polymer"
"_source": "git://github.com/Polymer/polymer.git",
"_target": "^1.2.0",
"_originalSource": "Polymer/polymer"
}

View File

@ -1,4 +1,4 @@
define(['dialogHelper', 'paper-checkbox', 'emby-input', 'emby-button', 'paper-icon-button-light'], function (dialogHelper) {
define(['dialogHelper', 'paper-checkbox', 'emby-input', 'emby-button', 'paper-icon-button-light', 'formDialogStyle'], function (dialogHelper) {
var extractedName;
var extractedYear;

View File

@ -1,48 +1,50 @@
<div class="formDialogHeader" style="margin:0 0 2em;">
<button is="paper-icon-button-light" class="btnCancel autoSize" tabindex="-1">
<i class="md-icon">&#xE5C4;</i>
</button>
<div class="formDialogHeader">
<button is="paper-icon-button-light" class="btnCancel autoSize" tabindex="-1"><i class="md-icon">&#xE5C4;</i></button>
<div class="formDialogHeaderTitle">
</div>
</div>
<form class="episodeCorrectionForm" style="margin:auto;">
<div class="formDialogContent smoothScrollY">
<div class="dialogContentInner dialog-content-centered">
<form class="episodeCorrectionForm">
<p><span class="inputFile"></span></p>
<p><span class="inputFile"></span></p>
<div style="margin: 1em 0 1em;">
<div style="width:85%;display:inline-block;">
<label for="selectSeries" class="selectLabel">${LabelSeries}</label>
<select id="selectSeries" data-mini="true" required="required"></select>
</div>
<button type="button" is="paper-icon-button-light" id="btnNewSeries" class="autoSize" title="${ButtonNew}">
<i class="md-icon">add</i>
</button>
<div style="margin: 1em 0 1em;">
<div style="width:85%;display:inline-block;">
<label for="selectSeries" class="selectLabel">${LabelSeries}</label>
<select id="selectSeries" data-mini="true" required="required"></select>
</div>
<button type="button" is="paper-icon-button-light" id="btnNewSeries" class="autoSize" title="${ButtonNew}">
<i class="md-icon">add</i>
</button>
</div>
<div class="fldSelectSeriesFolder hide" style="margin: 1em 0 1em;">
<div style="width:100%;display:inline-block;">
<label for="selectSeriesFolder" class="selectLabel">Series Root Folder</label>
<select id="selectSeriesFolder" data-mini="true"></select>
</div>
</div>
<div class="inputContainer">
<input is="emby-input" id="txtSeason" type="number" pattern="[0-9]*" required min="0" label="${LabelSeasonNumber}" />
</div>
<div class="inputContainer">
<input is="emby-input" id="txtEpisode" type="number" pattern="[0-9]*" required min="0" label="${LabelEpisodeNumber}" />
</div>
<div class="inputContainer">
<input is="emby-input" id="txtEndingEpisode" type="number" pattern="[0-9]*" min="0" label="${LabelEndingEpisodeNumber}" />
<div class="fieldDescription">${LabelEndingEpisodeNumberHelp}</div>
</div>
<div class="fldRemember hide">
<br />
<paper-checkbox type="checkbox" id="chkRememberCorrection">${OptionRememberOrganizeCorrection} <span class="extractedName" style="font-weight: bold; font-style: italic" /></paper-checkbox>
</div>
<br />
<button is="emby-button" type="submit" class="raised submit block">
<i class="md-icon">check</i>
<span>${ButtonOk}</span>
</button>
<input id="hfResultId" type="hidden" />
</form>
</div>
<div class="fldSelectSeriesFolder hide" style="margin: 1em 0 1em;">
<div style="width:100%;display:inline-block;">
<label for="selectSeriesFolder" class="selectLabel">Series Root Folder</label>
<select id="selectSeriesFolder" data-mini="true"></select>
</div>
</div>
<div class="inputContainer">
<input is="emby-input" id="txtSeason" type="number" pattern="[0-9]*" required min="0" label="${LabelSeasonNumber}"/>
</div>
<div class="inputContainer">
<input is="emby-input" id="txtEpisode" type="number" pattern="[0-9]*" required min="0" label="${LabelEpisodeNumber}"/>
</div>
<div class="inputContainer">
<input is="emby-input" id="txtEndingEpisode" type="number" pattern="[0-9]*" min="0" label="${LabelEndingEpisodeNumber}"/>
<div class="fieldDescription">${LabelEndingEpisodeNumberHelp}</div>
</div>
<div class="fldRemember hide">
<br />
<paper-checkbox type="checkbox" id="chkRememberCorrection">${OptionRememberOrganizeCorrection} <span class="extractedName" style="font-weight: bold; font-style: italic" /></paper-checkbox>
</div>
<br />
<button is="emby-button" type="submit" class="raised submit block">
<i class="md-icon">check</i>
<span>${ButtonOk}</span>
</button>
<input id="hfResultId" type="hidden" />
</form>
</div>

View File

@ -144,6 +144,10 @@
function onDialogClosed() {
Dashboard.hideLoadingMsg();
// hardcoding this to true for now until libraryOptions are taken into account
hasChanges = true;
currentDeferred.resolveWith(null, [hasChanges]);
}

View File

@ -303,7 +303,9 @@
}
}
else if (item.IsFolder) {
return id ? "itemlist.html?parentId=" + id : "#";
if (item.Type != "BoxSet") {
return id ? "itemlist.html?parentId=" + id : "#";
}
}
if (item.Type == 'CollectionFolder') {

View File

@ -79,7 +79,6 @@
shape: "backdrop",
preferThumb: true,
context: 'movies',
lazy: true,
overlayPlayButton: true
});
}
@ -90,7 +89,6 @@
shape: "backdrop",
preferThumb: true,
context: 'movies',
lazy: true,
cardLayout: true,
showTitle: true,
showYear: true
@ -102,8 +100,7 @@
items: result.Items,
shape: "banner",
preferBanner: true,
context: 'movies',
lazy: true
context: 'movies'
});
}
else if (viewStyle == "List") {
@ -122,7 +119,6 @@
context: 'movies',
showTitle: true,
showYear: true,
lazy: true,
cardLayout: true
});
}
@ -134,7 +130,6 @@
shape: "portrait",
context: 'movies',
centerText: true,
lazy: true,
overlayPlayButton: true
});
}

View File

@ -1229,7 +1229,7 @@ var AppInfo = {};
inputManager: embyWebComponentsBowerPath + "/inputmanager",
qualityoptions: embyWebComponentsBowerPath + "/qualityoptions",
hammer: bowerPath + "/hammerjs/hammer.min",
pageJs: embyWebComponentsBowerPath + '/page.js/page',
pageJs: embyWebComponentsBowerPath + '/pagejs/page',
focusManager: embyWebComponentsBowerPath + "/focusmanager",
datetime: embyWebComponentsBowerPath + "/datetime",
globalize: embyWebComponentsBowerPath + "/globalize",
@ -2799,8 +2799,12 @@ var AppInfo = {};
return navigator.serviceWorker.ready;
}).then(function (reg) {
if (!reg.sync) {
return Promise.resovle();
}
// https://github.com/WICG/BackgroundSync/blob/master/explainer.md
return reg.sync.register('emby-sync').then(function() {
return reg.sync.register('emby-sync').then(function () {
window.SyncRegistered = Dashboard.isConnectMode();
});
});