diff --git a/dashboard-ui/bower_components/emby-icons/emby-icons.html b/dashboard-ui/bower_components/emby-icons/emby-icons.html
index a95f5abbe2..eff2198b1e 100644
--- a/dashboard-ui/bower_components/emby-icons/emby-icons.html
+++ b/dashboard-ui/bower_components/emby-icons/emby-icons.html
@@ -143,6 +143,7 @@ See [iron-iconset](#iron-iconset) and [iron-iconset-svg](#iron-iconset-svg) for
+
diff --git a/dashboard-ui/bower_components/emby-webcomponents/.bower.json b/dashboard-ui/bower_components/emby-webcomponents/.bower.json
index bc836fe3a5..6043b4ef89 100644
--- a/dashboard-ui/bower_components/emby-webcomponents/.bower.json
+++ b/dashboard-ui/bower_components/emby-webcomponents/.bower.json
@@ -16,12 +16,12 @@
},
"devDependencies": {},
"ignore": [],
- "version": "1.2.67",
- "_release": "1.2.67",
+ "version": "1.2.70",
+ "_release": "1.2.70",
"_resolution": {
"type": "version",
- "tag": "1.2.67",
- "commit": "47093f0f441935b5ccc02999f1981e2e274fb1dc"
+ "tag": "1.2.70",
+ "commit": "da1751d5ebd43e4681ef9a0834e08d094505e725"
},
"_source": "https://github.com/MediaBrowser/emby-webcomponents.git",
"_target": "^1.2.0",
diff --git a/dashboard-ui/bower_components/emby-webcomponents/dialoghelper/dialoghelper.js b/dashboard-ui/bower_components/emby-webcomponents/dialoghelper/dialoghelper.js
index a19fb9bb77..174ad3d2e4 100644
--- a/dashboard-ui/bower_components/emby-webcomponents/dialoghelper/dialoghelper.js
+++ b/dashboard-ui/bower_components/emby-webcomponents/dialoghelper/dialoghelper.js
@@ -150,11 +150,7 @@
// The dialog may have just been created and webComponents may not have completed initialiazation yet.
// Without this, seeing some script errors in Firefox
- var delay = browser.animate ? 0 : 500;
- if (!delay) {
- focusManager.autoFocus(dlg);
- return;
- }
+ var delay = browser.animate ? 200 : 500;
setTimeout(function () {
focusManager.autoFocus(dlg);
@@ -266,7 +262,7 @@
function animateDialogOpen(dlg) {
- var onAnimationFinish = function() {
+ var onAnimationFinish = function () {
};
if (!dlg.animationConfig || !dlg.animate) {
@@ -324,8 +320,12 @@
// Also not working well in samsung tizen browser, content inside not clickable
if (!dlg.showModal || browser.tv) {
dlg = document.createElement('div');
+ } else {
+ // Just go ahead and always use a plain div because we're seeing issues overlaying absoltutely positioned content over a modal dialog
+ dlg = document.createElement('div');
}
+ dlg.classList.add('focuscontainer');
dlg.classList.add('hide');
if (shouldLockDocumentScroll(options)) {
diff --git a/dashboard-ui/bower_components/emby-webcomponents/focusmanager.js b/dashboard-ui/bower_components/emby-webcomponents/focusmanager.js
index d53c7f5d1b..055db22dc3 100644
--- a/dashboard-ui/bower_components/emby-webcomponents/focusmanager.js
+++ b/dashboard-ui/bower_components/emby-webcomponents/focusmanager.js
@@ -21,7 +21,7 @@ define([], function () {
function focus(element) {
var tagName = element.tagName;
- if (tagName == 'PAPER-INPUT' || tagName == 'PAPER-DROPDOWN-MENU' || tagName == 'EMBY-DROPDOWN-MENU') {
+ if (tagName == 'PAPER-INPUT' || tagName == 'EMBY-DROPDOWN-MENU') {
element = element.querySelector('input') || element;
}
@@ -32,8 +32,8 @@ define([], function () {
}
}
- var focusableTagNames = ['INPUT', 'TEXTAREA', 'SELECT', 'BUTTON', 'A', 'PAPER-BUTTON', 'PAPER-INPUT', 'PAPER-TEXTAREA', 'PAPER-ICON-BUTTON', 'PAPER-FAB', 'PAPER-CHECKBOX', 'PAPER-ICON-ITEM', 'PAPER-MENU-ITEM', 'PAPER-DROPDOWN-MENU', 'EMBY-DROPDOWN-MENU'];
- var focusableContainerTagNames = ['BODY', 'PAPER-DIALOG', 'DIALOG'];
+ var focusableTagNames = ['INPUT', 'TEXTAREA', 'SELECT', 'BUTTON', 'A', 'PAPER-BUTTON', 'PAPER-INPUT', 'PAPER-TEXTAREA', 'PAPER-FAB', 'PAPER-CHECKBOX', 'PAPER-ICON-ITEM', 'PAPER-MENU-ITEM', 'EMBY-DROPDOWN-MENU'];
+ var focusableContainerTagNames = ['BODY', 'DIALOG'];
var focusableQuery = focusableTagNames.join(',') + ',.focusable';
function isFocusable(elem) {
@@ -102,6 +102,9 @@ define([], function () {
if (focusableContainerTagNames.indexOf(elem.tagName) != -1) {
return true;
}
+ if (elem.classList.contains('focuscontainer')) {
+ return true;
+ }
if (direction < 2) {
if (elem.classList.contains('focuscontainer-x')) {
diff --git a/dashboard-ui/bower_components/iron-resizable-behavior/.bower.json b/dashboard-ui/bower_components/iron-resizable-behavior/.bower.json
index cca11d8994..2e765b9324 100644
--- a/dashboard-ui/bower_components/iron-resizable-behavior/.bower.json
+++ b/dashboard-ui/bower_components/iron-resizable-behavior/.bower.json
@@ -28,14 +28,14 @@
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
},
"ignore": [],
- "homepage": "https://github.com/polymerelements/iron-resizable-behavior",
+ "homepage": "https://github.com/PolymerElements/iron-resizable-behavior",
"_release": "1.0.3",
"_resolution": {
"type": "version",
"tag": "v1.0.3",
"commit": "dda1df6aaf452aedf3e52ff0cf69e72439452216"
},
- "_source": "git://github.com/polymerelements/iron-resizable-behavior.git",
+ "_source": "git://github.com/PolymerElements/iron-resizable-behavior.git",
"_target": "^1.0.0",
- "_originalSource": "polymerelements/iron-resizable-behavior"
+ "_originalSource": "PolymerElements/iron-resizable-behavior"
}
\ No newline at end of file
diff --git a/dashboard-ui/bower_components/polymer/.bower.json b/dashboard-ui/bower_components/polymer/.bower.json
index bbad7fe7ba..3e8a4009a3 100644
--- a/dashboard-ui/bower_components/polymer/.bower.json
+++ b/dashboard-ui/bower_components/polymer/.bower.json
@@ -34,6 +34,6 @@
"commit": "11c987b2eb3c73b388a79fc8aaea8ca01624f514"
},
"_source": "git://github.com/Polymer/polymer.git",
- "_target": "^1.1.0",
+ "_target": "^1.0.0",
"_originalSource": "Polymer/polymer"
}
\ No newline at end of file
diff --git a/dashboard-ui/components/recordingeditor/recordingeditor.js b/dashboard-ui/components/recordingeditor/recordingeditor.js
new file mode 100644
index 0000000000..56b8cf16c6
--- /dev/null
+++ b/dashboard-ui/components/recordingeditor/recordingeditor.js
@@ -0,0 +1,163 @@
+define(['dialogHelper', 'loading', 'jQuery', 'paper-checkbox', 'paper-input', 'emby-collapsible', 'paper-button', 'paper-icon-button-light'], function (dialogHelper, loading, $) {
+
+ var currentDialog;
+ var recordingUpdated = false;
+ var currentItemId;
+
+ function renderTimer(context, item) {
+
+ var programInfo = item.ProgramInfo || {};
+
+ $('.itemName', context).html(item.Name);
+
+ $('.itemEpisodeName', context).html(programInfo.EpisodeTitle || '');
+
+ $('.itemCommunityRating', context).html(LibraryBrowser.getRatingHtml(programInfo));
+
+ LibraryBrowser.renderGenres($('.itemGenres', context), programInfo);
+ LibraryBrowser.renderOverview(context.querySelectorAll('.itemOverview'), programInfo);
+
+ if (programInfo.ImageTags && programInfo.ImageTags.Primary) {
+
+ var imgUrl = ApiClient.getScaledImageUrl(programInfo.Id, {
+ maxWidth: 200,
+ maxHeight: 200,
+ tag: programInfo.ImageTags.Primary,
+ type: "Primary"
+ });
+
+ $('.timerPageImageContainer', context).css("display", "inline-block")
+ .html('
');
+
+ } else {
+ $('.timerPageImageContainer', context).hide();
+ }
+
+ $('.itemMiscInfo', context).html(LibraryBrowser.getMiscInfoHtml(programInfo));
+
+ $('#txtPrePaddingMinutes', context).val(item.PrePaddingSeconds / 60);
+ $('#txtPostPaddingMinutes', context).val(item.PostPaddingSeconds / 60);
+
+ if (item.Status == 'New') {
+ $('.timerStatus', context).hide();
+ } else {
+ $('.timerStatus', context).show().html('Status: ' + item.Status);
+ }
+
+ loading.hide();
+ }
+
+ function closeDialog(isSubmitted) {
+
+ recordingUpdated = isSubmitted;
+ dialogHelper.close(currentDialog);
+ }
+
+ function onSubmit(e) {
+
+ loading.show();
+
+ var form = this;
+
+ ApiClient.getLiveTvTimer(currentItemId).then(function (item) {
+
+ item.PrePaddingSeconds = $('#txtPrePaddingMinutes', form).val() * 60;
+ item.PostPaddingSeconds = $('#txtPostPaddingMinutes', form).val() * 60;
+ ApiClient.updateLiveTvTimer(item).then(function () {
+ loading.hide();
+ require(['toast'], function (toast) {
+ toast(Globalize.translate('MessageRecordingSaved'));
+ closeDialog(true);
+ });
+ });
+ });
+
+ e.preventDefault();
+
+ // Disable default form submission
+ return false;
+ }
+
+ function init(context) {
+
+ context.querySelector('.btnCancel').addEventListener('click', function () {
+
+ closeDialog(false);
+ });
+
+ context.querySelector('form').addEventListener('submit', onSubmit);
+
+ context.querySelector('.btnHeaderSave').addEventListener('click', function (e) {
+
+ context.querySelector('.btnSave').click();
+ });
+ }
+
+ function reload(context, id) {
+
+ loading.show();
+ currentItemId = id;
+
+ ApiClient.getLiveTvTimer(id).then(function (result) {
+
+ renderTimer(context, result);
+ loading.hide();
+ });
+ }
+
+ function showEditor(itemId) {
+
+ return new Promise(function (resolve, reject) {
+
+ recordingUpdated = false;
+ loading.show();
+
+ var xhr = new XMLHttpRequest();
+ xhr.open('GET', 'components/recordingeditor/recordingeditor.template.html', true);
+
+ xhr.onload = function (e) {
+
+ var template = this.response;
+ var dlg = dialogHelper.createDialog({
+ removeOnClose: true,
+ size: 'small'
+ });
+
+ dlg.classList.add('ui-body-b');
+ dlg.classList.add('background-theme-b');
+
+ dlg.classList.add('formDialog');
+
+ var html = '';
+
+ html += Globalize.translateDocument(template);
+
+ dlg.innerHTML = html;
+ document.body.appendChild(dlg);
+
+ dialogHelper.open(dlg);
+
+ currentDialog = dlg;
+
+ dlg.addEventListener('close', function () {
+
+ if (recordingUpdated) {
+ resolve();
+ } else {
+ reject();
+ }
+ });
+
+ init(dlg);
+
+ reload(dlg, itemId);
+ }
+
+ xhr.send();
+ });
+ }
+
+ return {
+ show: showEditor
+ };
+});
\ No newline at end of file
diff --git a/dashboard-ui/components/recordingeditor/recordingeditor.template.html b/dashboard-ui/components/recordingeditor/recordingeditor.template.html
new file mode 100644
index 0000000000..dcf5890aa7
--- /dev/null
+++ b/dashboard-ui/components/recordingeditor/recordingeditor.template.html
@@ -0,0 +1,55 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/dashboard-ui/css/librarybrowser.css b/dashboard-ui/css/librarybrowser.css
index 92bbc06448..664f41cfb7 100644
--- a/dashboard-ui/css/librarybrowser.css
+++ b/dashboard-ui/css/librarybrowser.css
@@ -1033,6 +1033,13 @@ span.itemCommunityRating:not(:empty) + .userDataIcons {
background-color: #52B54B;
}
+.seriesTimerIndicator {
+ color: #cc3333;
+ position: absolute;
+ top: 5px;
+ right: 5px;
+}
+
.playedIndicator + .syncIndicator {
top: 32px;
}
diff --git a/dashboard-ui/css/librarymenu.css b/dashboard-ui/css/librarymenu.css
index 2063d159f7..54284e9aec 100644
--- a/dashboard-ui/css/librarymenu.css
+++ b/dashboard-ui/css/librarymenu.css
@@ -204,7 +204,7 @@
.libraryViewNav .mdl-tabs__tab {
- color: #888 !important;
+ color: #aaa !important;
padding: 0 1.25em;
float: none;
flex-shrink: 0;
@@ -500,22 +500,6 @@ body:not(.dashboardDocument) .btnNotifications {
color: #fff !important;
}
-.adminDrawerPanel #drawer .emby-collapsible-button {
- padding-top: 0;
- padding-bottom: 0;
- padding-left: 1em;
-}
-
-.adminDrawerPanel #drawer .emby-collapsible-title {
- font-size: inherit;
- text-transform: none;
- margin: .7em 0;
-}
-
-.adminDrawerPanel #drawer #expandButton {
- color: #333;
-}
-
.adminDrawerLogo {
padding: 1.5em 1em 1.2em;
border-bottom: 1px solid #e0e0e0;
diff --git a/dashboard-ui/css/site.css b/dashboard-ui/css/site.css
index 0edf3d3673..a21c7723b4 100644
--- a/dashboard-ui/css/site.css
+++ b/dashboard-ui/css/site.css
@@ -1554,3 +1554,23 @@ emby-collapsible > .style-scope {
padding: 1em 1.25em;
background-color: #fff;
}
+
+.ui-body-b .emby-collapsible-button {
+ border: 1px solid #222;
+ background-color: #444;
+ text-transform: none;
+}
+
+.ui-body-b .emby-collapsible-title {
+ margin: .25em 0;
+ color: #fff;
+ padding: 0 0 0 .5em;
+ font-weight: 500;
+}
+
+.ui-body-b .emby-collapsible-content {
+ border: 1px solid #222;
+ border-width: 0 1px 1px 1px;
+ padding: 1em 1.25em;
+ background-color: #333;
+}
diff --git a/dashboard-ui/livetvseriestimer.html b/dashboard-ui/livetvseriestimer.html
index a35b124409..34ca0bea4a 100644
--- a/dashboard-ui/livetvseriestimer.html
+++ b/dashboard-ui/livetvseriestimer.html
@@ -1,7 +1,8 @@
\ No newline at end of file
diff --git a/dashboard-ui/livetvtimer.html b/dashboard-ui/livetvtimer.html
deleted file mode 100644
index 77a80613b1..0000000000
--- a/dashboard-ui/livetvtimer.html
+++ /dev/null
@@ -1,57 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
${ButtonCancelRecording}
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/dashboard-ui/scripts/itemdetailpage.js b/dashboard-ui/scripts/itemdetailpage.js
index 3494ed52fc..ed6fa82c58 100644
--- a/dashboard-ui/scripts/itemdetailpage.js
+++ b/dashboard-ui/scripts/itemdetailpage.js
@@ -2051,7 +2051,7 @@
Dashboard.getCurrentUser().then(function (user) {
- LibraryBrowser.showMoreCommands(button, currentItem.Id, LibraryBrowser.getMoreCommands(currentItem, user));
+ LibraryBrowser.showMoreCommands(button, currentItem.Id, currentItem.Type, LibraryBrowser.getMoreCommands(currentItem, user));
});
});
diff --git a/dashboard-ui/scripts/librarybrowser.js b/dashboard-ui/scripts/librarybrowser.js
index a743274897..85dea75929 100644
--- a/dashboard-ui/scripts/librarybrowser.js
+++ b/dashboard-ui/scripts/librarybrowser.js
@@ -776,7 +776,15 @@
});
},
- showMoreCommands: function (positionTo, itemId, commands) {
+ editTimer: function (id) {
+
+ require(['components/recordingeditor/recordingeditor'], function (recordingeditor) {
+
+ recordingeditor.show(id);
+ });
+ },
+
+ showMoreCommands: function (positionTo, itemId, itemType, commands) {
var items = [];
@@ -913,7 +921,11 @@
break;
}
case 'edit':
- LibraryBrowser.editMetadata(itemId);
+ if (itemType == 'Timer') {
+ LibraryBrowser.editTimer(itemId);
+ } else {
+ LibraryBrowser.editMetadata(itemId);
+ }
break;
case 'editsubtitles':
LibraryBrowser.editSubtitles(itemId);
@@ -1049,9 +1061,6 @@
return "itemdetails.html?id=" + id;
}
- if (item.Type == "Timer") {
- return "livetvtimer.html?id=" + id;
- }
if (item.Type == "BoxSet") {
return "itemdetails.html?id=" + id;
}
@@ -2195,6 +2204,10 @@
html += LibraryBrowser.getGroupCountIndicator(item);
}
+ if (item.SeriesTimerId) {
+ html += '';
+ }
+
html += LibraryBrowser.getSyncIndicator(item);
if (mediaSourceCount > 1) {
@@ -3470,9 +3483,9 @@
else if (item.TimerId) {
var html = '';
- html += '';
+ html += '';
+ html += '';
miscInfo.push(html);
require(['livetvcss']);
}
diff --git a/dashboard-ui/scripts/librarylist.js b/dashboard-ui/scripts/librarylist.js
index 5fe796c26f..a98a88e341 100644
--- a/dashboard-ui/scripts/librarylist.js
+++ b/dashboard-ui/scripts/librarylist.js
@@ -532,7 +532,11 @@
break;
}
case 'edit':
- LibraryBrowser.editMetadata(itemId);
+ if (itemType == 'Timer') {
+ LibraryBrowser.editTimer(itemId);
+ } else {
+ LibraryBrowser.editMetadata(itemId);
+ }
break;
case 'refresh':
ApiClient.refreshItem(itemId, {
@@ -555,7 +559,11 @@
MediaController.shuffle(itemId);
break;
case 'open':
- Dashboard.navigate(href);
+ if (itemType == 'Timer') {
+ LibraryBrowser.editTimer(itemId);
+ } else {
+ Dashboard.navigate(href);
+ }
break;
case 'album':
Dashboard.navigate('itemdetails.html?id=' + albumid);
@@ -1378,6 +1386,15 @@
MediaController.instantMix(itemId);
}
+ else if (action == 'edit') {
+
+ var itemType = elemWithAttributes.getAttribute('data-itemtype');
+ if (itemType == 'Timer') {
+ LibraryBrowser.editTimer(itemId);
+ } else {
+ LibraryBrowser.editMetadata(itemId);
+ }
+ }
e.stopPropagation();
e.preventDefault();
diff --git a/dashboard-ui/scripts/livetvcomponents.js b/dashboard-ui/scripts/livetvcomponents.js
index bb04998d1c..3edbaf79e0 100644
--- a/dashboard-ui/scripts/livetvcomponents.js
+++ b/dashboard-ui/scripts/livetvcomponents.js
@@ -74,7 +74,8 @@
showChannelName: true,
lazy: true,
cardLayout: true,
- showDetailsMenu: true
+ showDetailsMenu: true,
+ defaultAction: 'edit'
});
html += '';
diff --git a/dashboard-ui/scripts/livetvtimer.js b/dashboard-ui/scripts/livetvtimer.js
deleted file mode 100644
index 2d2c53085c..0000000000
--- a/dashboard-ui/scripts/livetvtimer.js
+++ /dev/null
@@ -1,130 +0,0 @@
-define(['jQuery'], function ($) {
-
- var currentItem;
-
- function deleteTimer(page, id) {
-
- require(['confirm'], function (confirm) {
-
- confirm(Globalize.translate('MessageConfirmRecordingCancellation'), Globalize.translate('HeaderConfirmRecordingCancellation')).then(function () {
-
- Dashboard.showLoadingMsg();
-
- ApiClient.cancelLiveTvTimer(id).then(function () {
-
- require(['toast'], function (toast) {
- toast(Globalize.translate('MessageRecordingCancelled'));
- });
-
- Dashboard.navigate('livetv.html');
- });
- });
- });
- }
-
- function renderTimer(page, item) {
-
- currentItem = item;
-
- var programInfo = item.ProgramInfo || {};
-
- $('.itemName', page).html(item.Name);
-
- $('.itemEpisodeName', page).html(programInfo.EpisodeTitle || '');
-
- $('.itemCommunityRating', page).html(LibraryBrowser.getRatingHtml(programInfo));
-
- LibraryBrowser.renderGenres($('.itemGenres', page), programInfo);
- LibraryBrowser.renderOverview(page.querySelectorAll('.itemOverview'), programInfo);
-
- if (programInfo.ImageTags && programInfo.ImageTags.Primary) {
-
- var imgUrl = ApiClient.getScaledImageUrl(programInfo.Id, {
- maxWidth: 200,
- maxHeight: 200,
- tag: programInfo.ImageTags.Primary,
- type: "Primary"
- });
-
- $('.timerPageImageContainer', page).css("display", "inline-block")
- .html('
');
-
- } else {
- $('.timerPageImageContainer', page).hide();
- }
-
- $('.itemMiscInfo', page).html(LibraryBrowser.getMiscInfoHtml(programInfo));
-
- $('#txtPrePaddingMinutes', page).val(item.PrePaddingSeconds / 60);
- $('#txtPostPaddingMinutes', page).val(item.PostPaddingSeconds / 60);
-
- if (item.Status == 'New') {
- $('.timerStatus', page).hide();
- } else {
- $('.timerStatus', page).show().html('Status: ' + item.Status);
- }
-
- Dashboard.hideLoadingMsg();
- }
-
- function onSubmit() {
-
- Dashboard.showLoadingMsg();
-
- var form = this;
-
- ApiClient.getLiveTvTimer(currentItem.Id).then(function (item) {
-
- item.PrePaddingSeconds = $('#txtPrePaddingMinutes', form).val() * 60;
- item.PostPaddingSeconds = $('#txtPostPaddingMinutes', form).val() * 60;
-
- ApiClient.updateLiveTvTimer(item).then(function () {
- Dashboard.hideLoadingMsg();
- require(['toast'], function (toast) {
- toast(Globalize.translate('MessageRecordingSaved'));
- });
- });
- });
-
- // Disable default form submission
- return false;
-
- }
-
- function reload(page) {
-
- Dashboard.showLoadingMsg();
-
- var id = getParameterByName('id');
-
- ApiClient.getLiveTvTimer(id).then(function (result) {
-
- renderTimer(page, result);
-
- });
- }
-
- $(document).on('pageinit', "#liveTvTimerPage", function () {
-
- var page = this;
-
- $('#btnCancelTimer', page).on('click', function () {
-
- deleteTimer(page, currentItem.Id);
-
- });
-
- $('.liveTvTimerForm').off('submit', onSubmit).on('submit', onSubmit);
-
- }).on('pagebeforeshow', "#liveTvTimerPage", function () {
-
- var page = this;
-
- reload(page);
-
- }).on('pagebeforehide', "#liveTvTimerPage", function () {
-
- currentItem = null;
- });
-
-});
\ No newline at end of file
diff --git a/dashboard-ui/scripts/site.js b/dashboard-ui/scripts/site.js
index f1b0188461..2d725e98a9 100644
--- a/dashboard-ui/scripts/site.js
+++ b/dashboard-ui/scripts/site.js
@@ -2628,12 +2628,6 @@ var AppInfo = {};
roles: 'admin'
});
- defineRoute({
- path: '/livetvtimer.html',
- dependencies: ['scrollStyles'],
- autoFocus: false
- });
-
defineRoute({
path: '/livetvtunerprovider-hdhomerun.html',
dependencies: [],