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

3.0.5340.20849

This commit is contained in:
Luke Pulverenti 2014-08-15 12:35:41 -04:00
parent 668f8ba11f
commit 4d679e90a4
18 changed files with 276 additions and 133 deletions

View file

@ -478,21 +478,21 @@
.detailPageSquareCard { .detailPageSquareCard {
width: 50%; width: 33.33%;
} }
@media all and (min-width: 540px) { @media all and (min-width: 540px) {
.detailPageSquareCard { .detailPageSquareCard {
width: 33.33%; width: 25%;
} }
} }
@media all and (min-width: 800px) { @media all and (min-width: 600px) {
.detailPageSquareCard { .detailPageSquareCard {
width: 25%; width: 20%;
} }
} }

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

View file

@ -1185,15 +1185,20 @@ a.itemTag:hover {
} }
} }
.itemsListview {
.itemsContainer .itemsListview {
max-width: 800px; max-width: 800px;
}
.itemsListview {
margin: 0 auto !important; margin: 0 auto !important;
} }
.itemsListview .ui-li-aside { .itemsListview .ui-li-aside {
right: 1.3em; right: 70px;
font-weight: normal;
font-size: 13px; font-size: 13px;
top: 35%;
font-weight: 300 !important;
} }
.itemsListview .ui-li-count { .itemsListview .ui-li-count {
@ -1217,6 +1222,57 @@ a.itemTag:hover {
background-position: center center; background-position: center center;
} }
.listviewIcon {
position: absolute;
left: 0;
top: 0;
width: 70px;
height: 70px;
background-repeat: no-repeat;
background-size: cover;
background-position: center center;
}
.ui-li-has-icon > .ui-btn {
padding-left: 5.25em !important;
padding-top: 5px !important;
padding-bottom: 5px !important;
}
.listItem h3 {
font-weight: 400;
}
.listItem p {
font-weight: 300 !important;
}
.ui-li-has-icon h3 {
margin-bottom: 10px !important;
}
.listItem > .ui-btn + .ui-btn {
border: 0 !important;
width: 60px !important;
height: 90% !important;
top: 5% !important;
padding-left: 0 !important;
}
.listItem a:first-child {
margin-right: 0 !important;
background-color: transparent !important;
border-color: #282828 !important;
}
.listItem a + a {
background-color: #202020 !important;
}
.listItem:hover a {
background-color: #333 !important;
}
@media all and (max-width: 600px) { @media all and (max-width: 600px) {
.itemsListview .ui-li-aside { .itemsListview .ui-li-aside {

View file

@ -120,10 +120,6 @@ h2 {
font-weight: 500 !important; font-weight: 500 !important;
} }
.ui-listview li h3 {
font-weight: 500;
}
h1 a { h1 a {
text-decoration: none; text-decoration: none;
} }
@ -136,6 +132,10 @@ h1 a:hover {
text-decoration: underline; text-decoration: underline;
} }
.ui-listview li h3 {
font-weight: 400;
}
pre, textarea.pre { pre, textarea.pre {
display: block; display: block;
padding: 8.5px; padding: 8.5px;

View file

@ -622,6 +622,10 @@
return "<img src='css/images/clients/android.png' />"; return "<img src='css/images/clients/android.png' />";
} }
if (clientLowered == "nuvue") {
return "<img src='css/images/clients/nuvue.png' />";
}
if (clientLowered == "roku") { if (clientLowered == "roku") {
return "<img src='css/images/clients/roku.jpg' />"; return "<img src='css/images/clients/roku.jpg' />";

View file

@ -432,10 +432,9 @@
if (query.IncludeItemTypes == "Audio") { if (query.IncludeItemTypes == "Audio") {
html += LibraryBrowser.getSongTableHtml(result.Items, { html = LibraryBrowser.getListViewHtml({
showAlbum: true, items: result.Items,
showArtist: true, smallIcon: true
showAlbumArtist: true
}); });
} }

View file

@ -562,7 +562,7 @@
var options = { var options = {
userId: Dashboard.getCurrentUserId(), userId: Dashboard.getCurrentUserId(),
limit: item.Type == "MusicAlbum" ? 4 : 5, limit: 5,
fields: "PrimaryImageAspectRatio,UserData" fields: "PrimaryImageAspectRatio,UserData"
}; };
@ -724,7 +724,11 @@
if (item.Type == "MusicAlbum") { if (item.Type == "MusicAlbum") {
$('#childrenContent', page).html(LibraryBrowser.getSongTableHtml(result.Items, { showArtist: true })).trigger('create'); $('#childrenContent', page).html(LibraryBrowser.getListViewHtml({
items: result.Items,
smallIcon: true
})).trigger('create').createCardMenus();
} else { } else {
@ -760,7 +764,7 @@
}); });
} }
$('#childrenContent', page).html(html).createCardMenus(); $('#childrenContent', page).html(html).trigger('create').createCardMenus();
if (item.Type == "BoxSet") { if (item.Type == "BoxSet") {
@ -996,7 +1000,12 @@
$('#themeSongsCollapsible', page).show(); $('#themeSongsCollapsible', page).show();
$('#themeSongsContent', page).html(LibraryBrowser.getSongTableHtml(items, { showArtist: true, showAlbum: true, showAlbumArtist: true })).trigger('create'); var html = LibraryBrowser.getListViewHtml({
items: items,
smallIcon: true
});
$('#themeSongsContent', page).html(html).trigger('create');
} else { } else {
$('#themeSongsCollapsible', page).hide(); $('#themeSongsCollapsible', page).hide();
} }

View file

@ -223,8 +223,6 @@
html += '<tr>'; html += '<tr>';
html += LibraryBrowser.getSongHeaderCellHtml('Disc', 'desktopColumn', options.enableColumnSorting);
html += LibraryBrowser.getSongHeaderCellHtml('#', 'desktopColumn', options.enableColumnSorting);
html += LibraryBrowser.getSongHeaderCellHtml('Track', '', options.enableColumnSorting, 'Name', options.sortBy, options.sortOrder); html += LibraryBrowser.getSongHeaderCellHtml('Track', '', options.enableColumnSorting, 'Name', options.sortBy, options.sortOrder);
if (options.showAlbum) { if (options.showAlbum) {
@ -252,9 +250,6 @@
html += '<tr>'; html += '<tr>';
html += '<td class="desktopColumn">' + (item.ParentIndexNumber || "") + '</td>';
html += '<td class="desktopColumn">' + (item.IndexNumber || "") + '</td>';
html += '<td><a href="' + LibraryBrowser.getHref(item, "music") + '">' + (item.Name || "") + '</a></td>'; html += '<td><a href="' + LibraryBrowser.getHref(item, "music") + '">' + (item.Name || "") + '</a></td>';
if (options.showAlbum) { if (options.showAlbum) {
@ -685,7 +680,7 @@
var dataAttributes = LibraryBrowser.getItemDataAttributes(item, options); var dataAttributes = LibraryBrowser.getItemDataAttributes(item, options);
var cssClass = 'ui-li-has-thumb listItem'; var cssClass = options.smallIcon ? 'ui-li-has-icon listItem' : 'ui-li-has-thumb listItem';
if (item.UserData) { if (item.UserData) {
cssClass += ' ' + LibraryBrowser.getUserDataCssClass(item.UserData.Key); cssClass += ' ' + LibraryBrowser.getUserDataCssClass(item.UserData.Key);
@ -696,13 +691,14 @@
var imgUrl; var imgUrl;
var downloadWidth = options.smallIcon ? 70 : 80;
// Scaling 400w episode images to 80 doesn't turn out very well
var minScale = item.Type == 'Episode' || item.Type == 'Game' || options.smallIcon ? 2 : 1.5;
if (item.ImageTags.Primary) { if (item.ImageTags.Primary) {
// Scaling 400w episode images to 80 doesn't turn out very well
var minScale = item.Type == 'Episode' || item.Type == 'Game' ? 2 : null;
imgUrl = ApiClient.getScaledImageUrl(item.Id, { imgUrl = ApiClient.getScaledImageUrl(item.Id, {
width: 80, width: downloadWidth,
tag: item.ImageTags.Primary, tag: item.ImageTags.Primary,
type: "Primary", type: "Primary",
index: 0, index: 0,
@ -715,8 +711,9 @@
imgUrl = ApiClient.getScaledImageUrl(item.AlbumId, { imgUrl = ApiClient.getScaledImageUrl(item.AlbumId, {
type: "Primary", type: "Primary",
width: 80, width: downloadWidth,
tag: item.AlbumPrimaryImageTag tag: item.AlbumPrimaryImageTag,
minScale: minScale
}); });
} }
@ -724,8 +721,9 @@
imgUrl = ApiClient.getScaledImageUrl(item.SeriesId, { imgUrl = ApiClient.getScaledImageUrl(item.SeriesId, {
type: "Primary", type: "Primary",
width: 80, width: downloadWidth,
tag: item.SeriesPrimaryImageTag tag: item.SeriesPrimaryImageTag,
minScale: minScale
}); });
} }
@ -733,19 +731,28 @@
imgUrl = ApiClient.getImageUrl(item.ParentPrimaryImageItemId, { imgUrl = ApiClient.getImageUrl(item.ParentPrimaryImageItemId, {
type: "Primary", type: "Primary",
width: 80, width: downloadWidth,
tag: item.ParentPrimaryImageTag tag: item.ParentPrimaryImageTag,
minScale: minScale
}); });
} }
if (imgUrl) { if (imgUrl) {
if (options.smallIcon) {
if (index < 10) {
html += '<div class="listviewIcon ui-li-icon" style="background-image:url(\'' + imgUrl + '\');"></div>';
} else {
html += '<div class="listviewIcon ui-li-icon lazy" data-src="' + imgUrl + '"></div>';
}
} else {
if (index < 10) { if (index < 10) {
html += '<div class="listviewImage ui-li-thumb" style="background-image:url(\'' + imgUrl + '\');"></div>'; html += '<div class="listviewImage ui-li-thumb" style="background-image:url(\'' + imgUrl + '\');"></div>';
} else { } else {
html += '<div class="listviewImage ui-li-thumb lazy" data-src="' + imgUrl + '"></div>'; html += '<div class="listviewImage ui-li-thumb lazy" data-src="' + imgUrl + '"></div>';
} }
} }
}
var textlines = []; var textlines = [];
@ -757,6 +764,10 @@
textlines.push(LibraryBrowser.getPosterViewDisplayName(item)); textlines.push(LibraryBrowser.getPosterViewDisplayName(item));
if (item.Type == 'Audio') {
textlines.push(item.Artists.join(', ') || 'Unknown Artist');
}
if (item.Type == 'Game') { if (item.Type == 'Game') {
textlines.push(item.GameSystem || 'Unknown Game System'); textlines.push(item.GameSystem || 'Unknown Game System');
} }

View file

@ -123,12 +123,8 @@
buttonCount++; buttonCount++;
} }
var moreCommands = LibraryBrowser.getMoreCommands(item, currentUser); html += '<button data-role="button" class="btnMoreCommands" data-mini="true" data-inline="true" data-icon="ellipsis-v" data-iconpos="notext" title="' + Globalize.translate('ButtonMore') + '" style="' + buttonMargin + '">' + Globalize.translate('ButtonMore') + '</button>';
if (moreCommands.length) {
html += '<button data-role="button" class="btnMoreCommands" data-morecommands="' + moreCommands.join(',') + '" data-itemid="' + item.Id + '" data-mini="true" data-inline="true" data-icon="ellipsis-v" data-iconpos="notext" title="' + Globalize.translate('ButtonMore') + '" style="' + buttonMargin + '">' + Globalize.translate('ButtonMore') + '</button>';
buttonCount++; buttonCount++;
}
html += '</div>'; html += '</div>';
@ -153,14 +149,15 @@
function onMoreButtonClick() { function onMoreButtonClick() {
var id = this.getAttribute('data-itemid'); var card = $(this).parents('.card')[0];
var commands = this.getAttribute('data-morecommands').split(',');
LibraryBrowser.showMoreCommands(this, id, commands); // Used by the tab menu
// Used by the tab menu, not the slide up
$('.tapHoldMenu').popup('close'); $('.tapHoldMenu').popup('close');
showContextMenu(card, {
showPlayOptions: false
});
return false; return false;
} }
@ -255,13 +252,13 @@
function onCardTapHold(e) { function onCardTapHold(e) {
showContextMenu(this); showContextMenu(this, {});
e.preventDefault(); e.preventDefault();
return false; return false;
} }
function showContextMenu(card) { function showContextMenu(card, options) {
$('.tapHoldMenu').popup("close").remove(); $('.tapHoldMenu').popup("close").remove();
@ -299,6 +296,7 @@
html += '<li data-icon="edit"><a href="edititemmetadata.html?id=' + itemId + '">' + Globalize.translate('ButtonEdit') + '</a></li>'; html += '<li data-icon="edit"><a href="edititemmetadata.html?id=' + itemId + '">' + Globalize.translate('ButtonEdit') + '</a></li>';
} }
if (options.showPlayOptions !== false) {
if (MediaController.canPlayByAttributes(itemType, mediaType, playAccess, locationType, isPlaceHolder)) { if (MediaController.canPlayByAttributes(itemType, mediaType, playAccess, locationType, isPlaceHolder)) {
html += '<li data-icon="play"><a href="#" class="btnPlay" data-itemid="' + itemId + '">' + Globalize.translate('ButtonPlay') + '</a></li>'; html += '<li data-icon="play"><a href="#" class="btnPlay" data-itemid="' + itemId + '">' + Globalize.translate('ButtonPlay') + '</a></li>';
} }
@ -310,6 +308,7 @@
if (commands.indexOf('trailer') != -1) { if (commands.indexOf('trailer') != -1) {
html += '<li data-icon="video"><a href="#" class="btnPlayTrailer" data-itemid="' + itemId + '">' + Globalize.translate('ButtonPlayTrailer') + '</a></li>'; html += '<li data-icon="video"><a href="#" class="btnPlayTrailer" data-itemid="' + itemId + '">' + Globalize.translate('ButtonPlayTrailer') + '</a></li>';
} }
}
if (MediaController.canQueueMediaType(mediaType, itemType)) { if (MediaController.canQueueMediaType(mediaType, itemType)) {
html += '<li data-icon="plus"><a href="#" class="btnQueue" data-itemid="' + itemId + '">' + Globalize.translate('ButtonQueue') + '</a></li>'; html += '<li data-icon="plus"><a href="#" class="btnQueue" data-itemid="' + itemId + '">' + Globalize.translate('ButtonQueue') + '</a></li>';
@ -356,7 +355,7 @@
function onListViewMenuButtonClick(e) { function onListViewMenuButtonClick(e) {
showContextMenu(this); showContextMenu(this, {});
e.preventDefault(); e.preventDefault();
return false; return false;

View file

@ -68,7 +68,7 @@
html += '<span class="premiereTvProgram">'+Globalize.translate('LabelPremiereProgram')+'&nbsp;&nbsp;</span>'; html += '<span class="premiereTvProgram">'+Globalize.translate('LabelPremiereProgram')+'&nbsp;&nbsp;</span>';
} }
else if (program.IsSeries && !program.IsRepeat) { else if (program.IsSeries && !program.IsRepeat) {
html += '<span class="newTvProgram">'+Globalize.translate('newTvProgram')+'&nbsp;&nbsp;</span>'; html += '<span class="newTvProgram">'+Globalize.translate('LabelNewProgram')+'&nbsp;&nbsp;</span>';
} }
var minutes = program.RunTimeTicks / 600000000; var minutes = program.RunTimeTicks / 600000000;

View file

@ -133,7 +133,7 @@
$('.recordingsTab', page).html(LibraryBrowser.getPosterViewHtml({ $('.recordingsTab', page).html(LibraryBrowser.getPosterViewHtml({
items: result.Items, items: result.Items,
shape: "homePageSquare", shape: "detailPageSquare",
showTitle: true, showTitle: true,
overlayText: true, overlayText: true,
coverImage: true coverImage: true

View file

@ -12,7 +12,7 @@
var isChecked = i == 0 ? ' selected="selected"' : ''; var isChecked = i == 0 ? ' selected="selected"' : '';
html += '<option value="' + tab.type + '"' + isChecked + '>' + tab.name + '</option>'; html += '<option value="' + tab.type + '"' + isChecked + '>' + Globalize.translate(tab.name) + '</option>';
} }
$('#selectItemType', page).html(html).selectmenu('refresh').trigger('change'); $('#selectItemType', page).html(html).selectmenu('refresh').trigger('change');
@ -150,7 +150,7 @@
var i, length, plugin, id; var i, length, plugin, id;
html += '<div class="ui-controlgroup-label" style="margin-bottom:0;padding-left:2px;">Image Fetchers:</div>'; html += '<div class="ui-controlgroup-label" style="margin-bottom:0;padding-left:2px;">' + Globalize.translate('LabelImageFetchers') + '</div>';
html += '<div style="display:inline-block;width: 75%;vertical-align:top;">'; html += '<div style="display:inline-block;width: 75%;vertical-align:top;">';
html += '<div data-role="controlgroup" class="imageFetcherGroup">'; html += '<div data-role="controlgroup" class="imageFetcherGroup">';
@ -177,22 +177,22 @@
html += '<div style="margin:6px 0;">'; html += '<div style="margin:6px 0;">';
if (i == 0) { if (i == 0) {
html += '<button data-inline="true" disabled="disabled" class="btnUp" data-pluginindex="' + i + '" type="button" data-icon="arrow-u" data-mini="true" data-iconpos="notext" style="margin: 0 1px;">Up</button>'; html += '<button data-inline="true" disabled="disabled" class="btnUp" data-pluginindex="' + i + '" type="button" data-icon="arrow-u" data-mini="true" data-iconpos="notext" style="margin: 0 1px;">' + Globalize.translate('ButtonUp') + '</button>';
html += '<button data-inline="true" class="btnDown" data-pluginindex="' + i + '" type="button" data-icon="arrow-d" data-mini="true" data-iconpos="notext" style="margin: 0 1px;">Down</button>'; html += '<button data-inline="true" class="btnDown" data-pluginindex="' + i + '" type="button" data-icon="arrow-d" data-mini="true" data-iconpos="notext" style="margin: 0 1px;">' + Globalize.translate('ButtonDown') + '</button>';
} else if (i == (plugins.length - 1)) { } else if (i == (plugins.length - 1)) {
html += '<button data-inline="true" class="btnUp" data-pluginindex="' + i + '" type="button" data-icon="arrow-u" data-mini="true" data-iconpos="notext" style="margin: 0 1px;">Up</button>'; html += '<button data-inline="true" class="btnUp" data-pluginindex="' + i + '" type="button" data-icon="arrow-u" data-mini="true" data-iconpos="notext" style="margin: 0 1px;">' + Globalize.translate('ButtonUp') + '</button>';
html += '<button data-inline="true" disabled="disabled" class="btnDown" data-pluginindex="' + i + '" type="button" data-icon="arrow-d" data-mini="true" data-iconpos="notext" style="margin: 0 1px;">Down</button>'; html += '<button data-inline="true" disabled="disabled" class="btnDown" data-pluginindex="' + i + '" type="button" data-icon="arrow-d" data-mini="true" data-iconpos="notext" style="margin: 0 1px;">' + Globalize.translate('ButtonDown') + '</button>';
} }
else { else {
html += '<button data-inline="true" class="btnUp" data-pluginindex="' + i + '" type="button" data-icon="arrow-u" data-mini="true" data-iconpos="notext" style="margin: 0 1px;">Up</button>'; html += '<button data-inline="true" class="btnUp" data-pluginindex="' + i + '" type="button" data-icon="arrow-u" data-mini="true" data-iconpos="notext" style="margin: 0 1px;">' + Globalize.translate('ButtonUp') + '</button>';
html += '<button data-inline="true" class="btnDown" data-pluginindex="' + i + '" type="button" data-icon="arrow-d" data-mini="true" data-iconpos="notext" style="margin: 0 1px;">Down</button>'; html += '<button data-inline="true" class="btnDown" data-pluginindex="' + i + '" type="button" data-icon="arrow-d" data-mini="true" data-iconpos="notext" style="margin: 0 1px;">' + Globalize.translate('ButtonDown') + '</button>';
} }
html += '</div>'; html += '</div>';
} }
} }
html += '</div>'; html += '</div>';
html += '<div class="fieldDescription" style="width:75%;">Enable and rank your preferred image fetchers in order of priority.</div>'; html += '<div class="fieldDescription" style="width:75%;">' + Globalize.translate('LabelImageFetchersHelp') + '</div>';
var elem = $('.imageFetchers', page).html(html).show().trigger('create'); var elem = $('.imageFetchers', page).html(html).show().trigger('create');
@ -238,7 +238,7 @@
} }
html += '<fieldset data-role="controlgroup">'; html += '<fieldset data-role="controlgroup">';
html += '<legend>Metadata Savers:</legend>'; html += '<legend>' + Globalize.translate('LabelMetadataSavers') + '</legend>';
for (var i = 0, length = plugins.length; i < length; i++) { for (var i = 0, length = plugins.length; i < length; i++) {
@ -253,7 +253,7 @@
} }
html += '</fieldset>'; html += '</fieldset>';
html += '<div class="fieldDescription">Choose the file formats to save your metadata to.</div>'; html += '<div class="fieldDescription">' + Globalize.translate('LabelMetadataSaversHelp') + '</div>';
$('.metadataSavers', page).html(html).show().trigger('create'); $('.metadataSavers', page).html(html).show().trigger('create');
} }
@ -273,7 +273,7 @@
var i, length, plugin, id; var i, length, plugin, id;
html += '<div class="ui-controlgroup-label" style="margin-bottom:0;padding-left:2px;">Metadata Downloaders:</div>'; html += '<div class="ui-controlgroup-label" style="margin-bottom:0;padding-left:2px;">' + Globalize.translate('LabelMetadataDownloaders') + '</div>';
html += '<div style="display:inline-block;width: 75%;vertical-align:top;">'; html += '<div style="display:inline-block;width: 75%;vertical-align:top;">';
html += '<div data-role="controlgroup" class="metadataFetcherGroup">'; html += '<div data-role="controlgroup" class="metadataFetcherGroup">';
@ -300,22 +300,22 @@
html += '<div style="margin:6px 0;">'; html += '<div style="margin:6px 0;">';
if (i == 0) { if (i == 0) {
html += '<button data-inline="true" disabled="disabled" class="btnUp" data-pluginindex="' + i + '" type="button" data-icon="arrow-u" data-mini="true" data-iconpos="notext" style="margin: 0 1px;">Up</button>'; html += '<button data-inline="true" disabled="disabled" class="btnUp" data-pluginindex="' + i + '" type="button" data-icon="arrow-u" data-mini="true" data-iconpos="notext" style="margin: 0 1px;">' + Globalize.translate('ButtonUp') + '</button>';
html += '<button data-inline="true" class="btnDown" data-pluginindex="' + i + '" type="button" data-icon="arrow-d" data-mini="true" data-iconpos="notext" style="margin: 0 1px;">Down</button>'; html += '<button data-inline="true" class="btnDown" data-pluginindex="' + i + '" type="button" data-icon="arrow-d" data-mini="true" data-iconpos="notext" style="margin: 0 1px;">' + Globalize.translate('ButtonDown') + '</button>';
} else if (i == (plugins.length - 1)) { } else if (i == (plugins.length - 1)) {
html += '<button data-inline="true" class="btnUp" data-pluginindex="' + i + '" type="button" data-icon="arrow-u" data-mini="true" data-iconpos="notext" style="margin: 0 1px;">Up</button>'; html += '<button data-inline="true" class="btnUp" data-pluginindex="' + i + '" type="button" data-icon="arrow-u" data-mini="true" data-iconpos="notext" style="margin: 0 1px;">' + Globalize.translate('ButtonUp') + '</button>';
html += '<button data-inline="true" disabled="disabled" class="btnDown" data-pluginindex="' + i + '" type="button" data-icon="arrow-d" data-mini="true" data-iconpos="notext" style="margin: 0 1px;">Down</button>'; html += '<button data-inline="true" disabled="disabled" class="btnDown" data-pluginindex="' + i + '" type="button" data-icon="arrow-d" data-mini="true" data-iconpos="notext" style="margin: 0 1px;">' + Globalize.translate('ButtonDown') + '</button>';
} }
else { else {
html += '<button data-inline="true" class="btnUp" data-pluginindex="' + i + '" type="button" data-icon="arrow-u" data-mini="true" data-iconpos="notext" style="margin: 0 1px;">Up</button>'; html += '<button data-inline="true" class="btnUp" data-pluginindex="' + i + '" type="button" data-icon="arrow-u" data-mini="true" data-iconpos="notext" style="margin: 0 1px;">' + Globalize.translate('ButtonUp') + '</button>';
html += '<button data-inline="true" class="btnDown" data-pluginindex="' + i + '" type="button" data-icon="arrow-d" data-mini="true" data-iconpos="notext" style="margin: 0 1px;">Down</button>'; html += '<button data-inline="true" class="btnDown" data-pluginindex="' + i + '" type="button" data-icon="arrow-d" data-mini="true" data-iconpos="notext" style="margin: 0 1px;">' + Globalize.translate('ButtonDown') + '</button>';
} }
html += '</div>'; html += '</div>';
} }
} }
html += '</div>'; html += '</div>';
html += '<div class="fieldDescription" style="width:75%;">Enable and rank your preferred metadata downloaders in order of priority. Lower priority downloaders will only be used to fill in missing information.</div>'; html += '<div class="fieldDescription" style="width:75%;">' + Globalize.translate('LabelMetadataDownloadersHelp') + '</div>';
var elem = $('.metadataFetchers', page).html(html).show().trigger('create'); var elem = $('.metadataFetchers', page).html(html).show().trigger('create');
@ -360,7 +360,7 @@
return; return;
} }
html += '<div class="ui-controlgroup-label" style="margin-bottom:0;padding-left:2px;">Metadata Readers:</div>'; html += '<div class="ui-controlgroup-label" style="margin-bottom:0;padding-left:2px;">' + Globalize.translate('LabelMetadataReaders') + '</div>';
html += '<ul data-role="listview" data-inset="true" data-mini="true" style="margin-top:.5em;margin-bottom:.5em;">'; html += '<ul data-role="listview" data-inset="true" data-mini="true" style="margin-top:.5em;margin-bottom:.5em;">';
for (var i = 0, length = plugins.length; i < length; i++) { for (var i = 0, length = plugins.length; i < length; i++) {
@ -372,7 +372,7 @@
html += '<a href="#" style="font-size:13px;font-weight:normal;">' + plugin.Name + '</a>'; html += '<a href="#" style="font-size:13px;font-weight:normal;">' + plugin.Name + '</a>';
html += '<a class="btnLocalReaderUp btnLocalReaderMove" data-pluginindex="' + i + '" href="#" style="font-size:13px;font-weight:normal;" data-icon="arrow-u">Up</a>'; html += '<a class="btnLocalReaderUp btnLocalReaderMove" data-pluginindex="' + i + '" href="#" style="font-size:13px;font-weight:normal;" data-icon="arrow-u">' + Globalize.translate('ButtonUp') + '</a>';
html += '</li>'; html += '</li>';
} }
@ -381,7 +381,7 @@
html += '<a href="#" style="font-size:13px;font-weight:normal;">' + plugin.Name + '</a>'; html += '<a href="#" style="font-size:13px;font-weight:normal;">' + plugin.Name + '</a>';
html += '<a class="btnLocalReaderDown btnLocalReaderMove" data-pluginindex="' + i + '" href="#" style="font-size:13px;font-weight:normal;" data-icon="arrow-d">Down</a>'; html += '<a class="btnLocalReaderDown btnLocalReaderMove" data-pluginindex="' + i + '" href="#" style="font-size:13px;font-weight:normal;" data-icon="arrow-d">' + Globalize.translate('ButtonDown') + '</a>';
html += '</li>'; html += '</li>';
} }
@ -395,7 +395,7 @@
} }
html += '</ul>'; html += '</ul>';
html += '<div class="fieldDescription">Rank your preferred local metadata sources in order of priority. The first file found will be read.</div>'; html += '<div class="fieldDescription">' + Globalize.translate('LabelMetadataReadersHelp') + '</div>';
$('.metadataReaders', page).html(html).show().trigger('create'); $('.metadataReaders', page).html(html).show().trigger('create');
} }
@ -404,24 +404,24 @@
loadTabs(page, [ loadTabs(page, [
{ name: 'Movies', type: 'Movie' }, { name: 'OptionMovies', type: 'Movie' },
//{ name: 'Trailers', type: 'Trailer' }, //{ name: 'Trailers', type: 'Trailer' },
{ name: 'Collections', type: 'BoxSet' }, { name: 'OptionCollections', type: 'BoxSet' },
{ name: 'TV Series', type: 'Series' }, { name: 'OptionSeries', type: 'Series' },
{ name: 'TV Seasons', type: 'Season' }, { name: 'OptionSeasons', type: 'Season' },
{ name: 'TV Episodes', type: 'Episode' }, { name: 'OptionEpisodes', type: 'Episode' },
{ name: 'Games', type: 'Game' }, { name: 'OptionGames', type: 'Game' },
{ name: 'Game Systems', type: 'GameSystem' }, { name: 'OptionGameSystems', type: 'GameSystem' },
//{ name: 'Game Genres', type: 'GameGenre' }, //{ name: 'Game Genres', type: 'GameGenre' },
{ name: 'Music Artists', type: 'MusicArtist' }, { name: 'OptionMusicArtists', type: 'MusicArtist' },
{ name: 'Music Albums', type: 'MusicAlbum' }, { name: 'OptionMusicAlbums', type: 'MusicAlbum' },
{ name: 'Music Videos', type: 'MusicVideo' }, { name: 'OptionMusicVideos', type: 'MusicVideo' },
//{ name: 'Music Genres', type: 'MusicGenre' }, //{ name: 'Music Genres', type: 'MusicGenre' },
{ name: 'Songs', type: 'Audio' }, { name: 'OptionSongs', type: 'Audio' },
{ name: 'Home Videos', type: 'Video' }, { name: 'OptionHomeVideos', type: 'Video' },
{ name: 'Books', type: 'Book' }, { name: 'OptionBooks', type: 'Book' },
{ name: 'Adult Videos', type: 'AdultVideo' }, { name: 'OptionAdultVideos', type: 'AdultVideo' },
{ name: 'People', type: 'Person' } { name: 'OptionPeople', type: 'Person' }
//{ name: 'Genres', type: 'Genre' }, //{ name: 'Genres', type: 'Genre' },
//{ name: 'Studios', type: 'Studio' } //{ name: 'Studios', type: 'Studio' }
]); ]);

View file

@ -74,7 +74,8 @@
sortBy: query.SortBy, sortBy: query.SortBy,
showIndex: false, showIndex: false,
title: item.Name, title: item.Name,
showRemoveFromPlaylist: true showRemoveFromPlaylist: true,
smallIcon: true
}); });
} }

View file

@ -8,16 +8,19 @@
Dashboard.setPageTitle(user.Name); Dashboard.setPageTitle(user.Name);
if (user.HasPassword) { if (user.HasConfiguredPassword) {
$('#btnResetPassword', page).show(); $('#btnResetPassword', page).show();
$('#fldCurrentPassword', page).show(); $('#fldCurrentPassword', page).show();
$('.formheader', page).hide(); $('.formheader', page).hide();
$('.localAccessSection', page).show();
} else { } else {
$('#btnResetPassword', page).hide(); $('#btnResetPassword', page).hide();
$('#fldCurrentPassword', page).hide(); $('#fldCurrentPassword', page).hide();
$('.formheader', page).show(); $('.formheader', page).show();
$('.localAccessSection', page).hide();
} }
$('#chkEnableLocalAccessWithoutPassword', page).checked(user.Configuration.EnableLocalPassword).checkboxradio('refresh');
}); });
$('#txtCurrentPassword', page).val(''); $('#txtCurrentPassword', page).val('');
@ -29,6 +32,24 @@
var userId = getParameterByName("userId"); var userId = getParameterByName("userId");
ApiClient.getUser(userId).done(function (user) {
user.Configuration.EnableLocalPassword = $('#chkEnableLocalAccessWithoutPassword', page).checked();
ApiClient.updateUser(user).done(function() {
Dashboard.hideLoadingMsg();
Dashboard.alert(Globalize.translate('MessageSettingsSaved'));
loadUser(page);
});
});
}
function savePassword(page) {
var userId = getParameterByName("userId");
var currentPassword = $('#txtCurrentPassword', page).val(); var currentPassword = $('#txtCurrentPassword', page).val();
var newPassword = $('#txtNewPassword', page).val(); var newPassword = $('#txtNewPassword', page).val();
@ -59,6 +80,19 @@
Dashboard.showLoadingMsg(); Dashboard.showLoadingMsg();
savePassword(page);
// Disable default form submission
return false;
};
self.onLocalAccessSubmit = function () {
var page = $.mobile.activePage;
Dashboard.showLoadingMsg();
save(page); save(page);
// Disable default form submission // Disable default form submission

View file

@ -41,7 +41,7 @@
html += "</h3>"; html += "</h3>";
html += "<p class='ui-li-aside'>"; html += "<p class='ui-li-aside'>";
if (user.Configuration.HasPassword) html += '<img src="css/images/userdata/password.png" alt="' + Globalize.translate('Password') + '" title="' + Globalize.translate('Password') + '" class="userProfileIcon" />'; if (user.HasConfiguredPassword) html += '<img src="css/images/userdata/password.png" alt="' + Globalize.translate('Password') + '" title="' + Globalize.translate('Password') + '" class="userProfileIcon" />';
if (user.Configuration.IsAdministrator) html += '<img src="css/images/userdata/administrator.png" alt="' + Globalize.translate('Administrator') + '" title="' + Globalize.translate('Administrator') + '" class="userProfileIcon" />'; if (user.Configuration.IsAdministrator) html += '<img src="css/images/userdata/administrator.png" alt="' + Globalize.translate('Administrator') + '" title="' + Globalize.translate('Administrator') + '" class="userProfileIcon" />';
html += "</p>"; html += "</p>";

View file

@ -19,7 +19,7 @@
<div class="listTopPaging"> <div class="listTopPaging">
</div> </div>
</div> </div>
<div id="items" class="itemsContainer" style="max-width:1200px;margin: 0 auto;"></div> <div id="items" class="itemsContainer" style="max-width:1100px;margin: 0 auto;"></div>
</div> </div>
<div data-role="panel" class="viewPanel" data-theme="a" data-position="right" data-display="overlay" data-position-fixed="true"> <div data-role="panel" class="viewPanel" data-theme="a" data-position="right" data-display="overlay" data-position-fixed="true">

View file

@ -2144,7 +2144,7 @@ MediaBrowser.ApiClient = function ($, navigator, JSON, WebSocket, setTimeout, wi
function normalizeImageOptions(options) { function normalizeImageOptions(options) {
var ratio = window.devicePixelRatio; var ratio = window.devicePixelRatio || 1;
if (ratio) { if (ratio) {

View file

@ -14,8 +14,14 @@
<a href="#" data-role="button" onclick="Dashboard.navigate('userparentalcontrol.html', true);" id="lnkParentalControl" style="display: none;">${TabLibraryAccess}</a> <a href="#" data-role="button" onclick="Dashboard.navigate('userparentalcontrol.html', true);" id="lnkParentalControl" style="display: none;">${TabLibraryAccess}</a>
<a href="#" data-role="button" class="ui-btn-active">${TabPassword}</a> <a href="#" data-role="button" class="ui-btn-active">${TabPassword}</a>
</div> </div>
<div class="readOnlyContent">
<div data-role="collapsible" data-collapsed="false">
<h2>${HeaderPassword}</h2>
<div>
<br />
<h2 class="formheader" style="display: none;">${HeaderCreatePassword}</h2> <h2 class="formheader" style="display: none;">${HeaderCreatePassword}</h2>
<form id="updatePasswordForm"> <form class="updatePasswordForm">
<ul data-role="listview" class="ulForm"> <ul data-role="listview" class="ulForm">
<li id="fldCurrentPassword" style="display: none;"> <li id="fldCurrentPassword" style="display: none;">
<label for="txtCurrentPassword">${LabelCurrentPassword}</label> <label for="txtCurrentPassword">${LabelCurrentPassword}</label>
@ -43,8 +49,32 @@
</form> </form>
</div> </div>
</div> </div>
<div data-role="collapsible" class="localAccessSection">
<h2>${HeaderLocalAccess}</h2>
<div>
<br />
<form class="localAccessForm">
<ul data-role="listview" class="ulForm">
<li>
<label for="chkEnableLocalAccessWithoutPassword">${LabelAllowLocalAccessWithoutPassword}</label>
<input type="checkbox" id="chkEnableLocalAccessWithoutPassword" />
<div class="fieldDescription">${LabelAllowLocalAccessWithoutPasswordHelp}</div>
</li>
<li>
<button type="submit" data-theme="b" data-icon="check">
${ButtonSave}
</button>
</li>
</ul>
</form>
</div>
</div>
</div>
</div>
</div>
<script type="text/javascript"> <script type="text/javascript">
$('#updatePasswordForm').on('submit', UpdatePasswordPage.onSubmit); $('.updatePasswordForm').off('submit', UpdatePasswordPage.onSubmit).on('submit', UpdatePasswordPage.onSubmit);
$('.localAccessForm').off('submit', UpdatePasswordPage.onLocalAccessSubmit).on('submit', UpdatePasswordPage.onLocalAccessSubmit);
</script> </script>
</div> </div>
</body> </body>