1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

update elements

This commit is contained in:
Luke Pulverenti 2016-06-11 11:56:15 -04:00
parent ab2d2eaf94
commit 7b96f75a6c
24 changed files with 500 additions and 459 deletions

View file

@ -260,36 +260,6 @@
LibraryBrowser.refreshDetailImageUserData(page.querySelector('.detailImageContainer'), item);
}
function onWebSocketMessage(e, data) {
var msg = data;
var page = $($.mobile.activePage)[0];
if (msg.MessageType === "UserDataChanged") {
if (currentItem && msg.Data.UserId == Dashboard.getCurrentUserId()) {
var key = currentItem.UserData.Key;
var userData = msg.Data.UserDataList.filter(function (u) {
return u.Key == key;
})[0];
if (userData) {
currentItem.UserData = userData;
Dashboard.getCurrentUser().then(function (user) {
refreshImage(page, currentItem, user);
});
}
}
}
}
function setPeopleHeader(page, item) {
if (item.MediaType == "Audio" || item.Type == "MusicAlbum" || item.MediaType == "Book" || item.MediaType == "Photo") {
@ -2127,6 +2097,35 @@
// btnMore[i].icon = AppInfo.moreIcon;
//}
function onWebSocketMessage(e, data) {
var msg = data;
if (msg.MessageType === "UserDataChanged") {
if (currentItem && msg.Data.UserId == Dashboard.getCurrentUserId()) {
var key = currentItem.UserData.Key;
var userData = msg.Data.UserDataList.filter(function (u) {
return u.Key == key;
})[0];
if (userData) {
currentItem.UserData = userData;
Dashboard.getCurrentUser().then(function (user) {
refreshImage(view, currentItem, user);
});
}
}
}
}
view.addEventListener('viewbeforeshow', function () {
var page = this;

View file

@ -349,7 +349,8 @@
self.onSubmit = function () {
var page = $($.mobile.activePage)[0];
var form = this;
var page = $(form).parents('.page')[0];
if ($('#txtNewPassword', page).val() != $('#txtNewPasswordConfirm', page).val()) {
@ -370,7 +371,8 @@
self.onLocalAccessSubmit = function () {
var page = $($.mobile.activePage)[0];
var form = this;
var page = $(form).parents('.page')[0];
Dashboard.showLoadingMsg();

View file

@ -1798,6 +1798,7 @@ var AppInfo = {};
define("emby-input", [embyWebComponentsBowerPath + "/emby-input/emby-input"], returnFirstDependency);
define("emby-select", [embyWebComponentsBowerPath + "/emby-select/emby-select"], returnFirstDependency);
define("emby-checkbox", [embyWebComponentsBowerPath + "/emby-checkbox/emby-checkbox"], returnFirstDependency);
define("collectionEditor", [embyWebComponentsBowerPath + "/collectioneditor/collectioneditor"], returnFirstDependency);
define("playlistEditor", [embyWebComponentsBowerPath + "/playlisteditor/playlisteditor"], returnFirstDependency);
define("recordingCreator", [embyWebComponentsBowerPath + "/recordingcreator/recordingcreator"], returnFirstDependency);
@ -2592,7 +2593,7 @@ var AppInfo = {};
defineRoute({
path: '/itemlist.html',
dependencies: ['paper-checkbox'],
dependencies: [],
autoFocus: false,
controller: 'scripts/itemlistpage',
transition: 'fade'
@ -2754,7 +2755,7 @@ var AppInfo = {};
defineRoute({
path: '/movies.html',
dependencies: ['paper-checkbox', 'emby-button'],
dependencies: ['emby-button'],
autoFocus: false,
controller: 'scripts/moviesrecommended',
transition: 'fade'
@ -2983,7 +2984,7 @@ var AppInfo = {};
defineRoute({
path: '/tv.html',
dependencies: ['paper-checkbox', 'paper-icon-button-light', 'emby-button'],
dependencies: ['paper-icon-button-light', 'emby-button'],
autoFocus: false,
controller: 'scripts/tvrecommended',
transition: 'fade'

View file

@ -81,7 +81,7 @@
return new Promise(function (resolve, reject) {
require(['paper-checkbox', 'paper-input', 'emby-collapsible'], function () {
require(['emby-checkbox', 'emby-input', 'emby-collapsible'], function () {
appHost.appInfo().then(function (appInfo) {
renderFormInternal(options, appInfo, resolve);
@ -101,15 +101,17 @@
if (options.showName || dialogOptions.Options.indexOf('Name') != -1) {
html += '<div>';
html += '<paper-input type="text" id="txtSyncJobName" class="txtSyncJobName" required="required" label="' + Globalize.translate('LabelSyncJobName') + '"></paper-input>';
html += '<div class="inputContainer">';
html += '<input is="emby-input" type="text" id="txtSyncJobName" class="txtSyncJobName" required="required" label="' + Globalize.translate('LabelSyncJobName') + '"/>';
html += '</div>';
html += '<br/>';
}
html += '<div>';
if (options.readOnlySyncTarget) {
html += '<paper-input type="text" id="selectSyncTarget" readonly label="' + Globalize.translate('LabelSyncTo') + '"></paper-input>';
html += '<div class="inputContainer">';
html += '<input is="emby-input" type="text" id="selectSyncTarget" readonly label="' + Globalize.translate('LabelSyncTo') + '"/>';
html += '</div>';
} else {
html += '<label for="selectSyncTarget" class="selectLabel">' + Globalize.translate('LabelSyncTo') + '</label>';
html += '<select id="selectSyncTarget" required="required" data-mini="true">';
@ -147,41 +149,47 @@
html += '<div class="fldBitrate" style="display:none;">';
html += '<br/>';
html += '<div>';
html += '<paper-input type="number" step=".1" min=".1" id="txtBitrate" label="' + Globalize.translate('LabelBitrateMbps') + '"></paper-input>';
html += '<div class="inputContainer">';
html += '<input is="emby-input" type="number" step=".1" min=".1" id="txtBitrate" label="' + Globalize.translate('LabelBitrateMbps') + '"/>';
html += '</div>';
html += '</div>';
if (dialogOptions.Options.indexOf('UnwatchedOnly') != -1) {
html += '<br/>';
html += '<div>';
html += '<paper-checkbox id="chkUnwatchedOnly">' + Globalize.translate('OptionSyncUnwatchedVideosOnly') + '</paper-checkbox>';
html += '<div class="fieldDescription paperCheckboxFieldDescription">' + Globalize.translate('OptionSyncUnwatchedVideosOnlyHelp') + '</div>';
html += '<div class="checkboxContainer">';
html += '<label>';
html += '<input is="emby-checkbox" type="checkbox" id="chkUnwatchedOnly"/>';
html += '<span>' + Globalize.translate('OptionSyncUnwatchedVideosOnly') + '</span>';
html += '</label>';
html += '<div class="fieldDescription checkboxFieldDescription">' + Globalize.translate('OptionSyncUnwatchedVideosOnlyHelp') + '</div>';
html += '</div>';
}
if (dialogOptions.Options.indexOf('SyncNewContent') != -1 ||
dialogOptions.Options.indexOf('ItemLimit') != -1) {
html += '<br/>';
html += '<emby-collapsible title="' + Globalize.translate('HeaderAdvanced') + '">';
html += '<div style="padding:0 0 1em;">';
if (dialogOptions.Options.indexOf('SyncNewContent') != -1) {
html += '<br/>';
html += '<div>';
html += '<paper-checkbox id="chkSyncNewContent" checked>' + Globalize.translate('OptionAutomaticallySyncNewContent') + '</paper-checkbox>';
html += '<div class="fieldDescription paperCheckboxFieldDescription">' + Globalize.translate('OptionAutomaticallySyncNewContentHelp') + '</div>';
html += '<div class="checkboxContainer">';
html += '<label>';
html += '<input is="emby-checkbox" type="checkbox" id="chkSyncNewContent"/>';
html += '<span>' + Globalize.translate('OptionAutomaticallySyncNewContent') + '</span>';
html += '</label>';
html += '<div class="fieldDescription checkboxFieldDescription">' + Globalize.translate('OptionAutomaticallySyncNewContentHelp') + '</div>';
html += '</div>';
}
if (dialogOptions.Options.indexOf('ItemLimit') != -1) {
html += '<div>';
html += '<paper-input type="number" step="1" min="1" id="txtItemLimit" label="' + Globalize.translate('LabelItemLimit') + '"></paper-input>';
html += '<div class="inputContainer">';
html += '<input is="emby-input" type="number" step="1" min="1" id="txtItemLimit" label="' + Globalize.translate('LabelItemLimit') + '"/>';
html += '<div class="fieldDescription">' + Globalize.translate('LabelItemLimitHelp') + '</div>';
html += '</div>';
}
html += '</emby-collapsible>';
html += '</div>';
html += '</emby-collapsible>';
html += '<br/>';
}
//html += '</div>';