fix quirks on details

This commit is contained in:
Luke Pulverenti 2016-06-28 22:44:07 -04:00
parent 968431b3ab
commit 2846174b86
5 changed files with 87 additions and 78 deletions

View File

@ -32,7 +32,7 @@
var hasId = false;
var txtLookupId = page.querySelectorAll('.txtLookupId');
for (i = 0, length = identifyField.length; i < length; i++) {
for (i = 0, length = txtLookupId.length; i < length; i++) {
var value = txtLookupId[i].value;

View File

@ -145,7 +145,7 @@
<div id="scenesCollapsible" class="detailSection hide">
<h1>
${HeaderScenes}
<a class="detailSectionHeaderButton chapterSettingsButton clearLink hide" style="margin-top: -8px; display: inline-block;" href="metadataadvanced.html" title="${ButtonSettings}">
<a class="detailSectionHeaderButton chapterSettingsButton clearLink hide" style="margin-top: -8px; display: inline-block;" href="librarysettings.html" title="${ButtonSettings}">
<button is="paper-icon-button-light" class="autoSize"><i class="md-icon">settings</i></button>
</a>
</h1>

View File

@ -468,7 +468,7 @@
});
}
var itemGenres = page.querySelectorAll('.itemGenres');
for (i = 0, length = itemMiscInfo.length; i < length; i++) {
for (i = 0, length = itemGenres.length; i < length; i++) {
LibraryBrowser.renderGenres(itemGenres[i], item, null, isStatic);
}
@ -712,6 +712,10 @@
var similarCollapsible = page.querySelector('#similarCollapsible');
if (!similarCollapsible) {
return;
}
if (item.Type == "Movie" || item.Type == "Trailer" || item.Type == "Series" || item.Type == "Program" || item.Type == "Recording" || item.Type == "Game" || item.Type == "MusicAlbum" || item.Type == "MusicArtist" || item.Type == "ChannelVideoItem") {
similarCollapsible.classList.remove('hide');
}
@ -2111,7 +2115,9 @@
Dashboard.getCurrentUser().then(function (user) {
LibraryBrowser.showMoreCommands(button, currentItem.Id, currentItem.Type, LibraryBrowser.getMoreCommands(currentItem, user));
LibraryBrowser.showMoreCommands(button, currentItem.Id, currentItem.Type, LibraryBrowser.getMoreCommands(currentItem, user)).then(function() {
reload(view, params);
});
});
}

View File

@ -889,93 +889,96 @@
});
}
var serverId = ApiClient.serverInfo().Id;
return new Promise(function (resolve, reject) {
require(['actionsheet'], function (actionsheet) {
var serverId = ApiClient.serverInfo().Id;
actionsheet.show({
items: items,
positionTo: positionTo,
callback: function (id) {
require(['actionsheet'], function (actionsheet) {
switch (id) {
actionsheet.show({
items: items,
positionTo: positionTo,
callback: function (id) {
case 'share':
require(['sharingmanager'], function (sharingManager) {
sharingManager.showMenu({
serverId: serverId,
itemId: itemId
switch (id) {
case 'share':
require(['sharingmanager'], function (sharingManager) {
sharingManager.showMenu({
serverId: serverId,
itemId: itemId
});
});
});
break;
case 'addtocollection':
require(['collectionEditor'], function (collectionEditor) {
break;
case 'addtocollection':
require(['collectionEditor'], function (collectionEditor) {
new collectionEditor().show({
items: [itemId],
serverId: serverId
new collectionEditor().show({
items: [itemId],
serverId: serverId
});
});
});
break;
case 'playlist':
require(['playlistEditor'], function (playlistEditor) {
new playlistEditor().show({
items: [itemId],
serverId: serverId
break;
case 'playlist':
require(['playlistEditor'], function (playlistEditor) {
new playlistEditor().show({
items: [itemId],
serverId: serverId
});
});
});
break;
case 'delete':
LibraryBrowser.deleteItems([itemId]);
break;
case 'download':
{
require(['fileDownloader'], function (fileDownloader) {
break;
case 'delete':
LibraryBrowser.deleteItems([itemId]);
break;
case 'download':
{
require(['fileDownloader'], function (fileDownloader) {
var downloadHref = ApiClient.getUrl("Items/" + itemId + "/Download", {
api_key: ApiClient.accessToken()
var downloadHref = ApiClient.getUrl("Items/" + itemId + "/Download", {
api_key: ApiClient.accessToken()
});
fileDownloader.download([
{
url: downloadHref,
itemId: itemId,
serverId: serverId
}]);
});
fileDownloader.download([
{
url: downloadHref,
itemId: itemId,
serverId: serverId
}]);
});
break;
}
case 'edit':
if (itemType == 'Timer') {
LibraryBrowser.editTimer(itemId);
} else {
LibraryBrowser.editMetadata(itemId);
}
break;
}
case 'edit':
if (itemType == 'Timer') {
LibraryBrowser.editTimer(itemId);
} else {
LibraryBrowser.editMetadata(itemId);
}
break;
case 'editsubtitles':
LibraryBrowser.editSubtitles(itemId);
break;
case 'editimages':
LibraryBrowser.editImages(itemId);
break;
case 'identify':
LibraryBrowser.identifyItem(itemId);
break;
case 'refresh':
require(['refreshDialog'], function (refreshDialog) {
new refreshDialog({
itemIds: [itemId],
serverId: serverId
}).show();
});
break;
default:
break;
case 'editsubtitles':
LibraryBrowser.editSubtitles(itemId);
break;
case 'editimages':
LibraryBrowser.editImages(itemId);
break;
case 'identify':
LibraryBrowser.identifyItem(itemId).then(resolve, reject);
break;
case 'refresh':
require(['refreshDialog'], function (refreshDialog) {
new refreshDialog({
itemIds: [itemId],
serverId: serverId
}).show();
});
break;
default:
break;
}
}
}
});
});
});
});
},

View File

@ -767,7 +767,7 @@
if (mainDrawerButton) {
if (!visible && browserInfo.mobile) {
mainDrawerButton.classList.add('hide');
mainDrawerButton.classList.remove('hide');
} else {
mainDrawerButton.classList.remove('hide');
}