mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update restart command
This commit is contained in:
parent
f67f57726d
commit
386e63ee64
7 changed files with 130 additions and 93 deletions
|
@ -407,8 +407,8 @@ span.itemCommunityRating:not(:empty) + .userDataIcons {
|
||||||
|
|
||||||
|
|
||||||
.lnkSibling {
|
.lnkSibling {
|
||||||
position: fixed;
|
position: absolute;
|
||||||
top: 105px;
|
top: 15px;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
font-weight: normal !important;
|
font-weight: normal !important;
|
||||||
display: none;
|
display: none;
|
||||||
|
@ -1484,6 +1484,8 @@ span.itemCommunityRating:not(:empty) + .userDataIcons {
|
||||||
|
|
||||||
.tapHoldMenu li a, .playFlyout li a {
|
.tapHoldMenu li a, .playFlyout li a {
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
|
font-weight: 500 !important;
|
||||||
|
color: #000 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.userProfileSettingsForm {
|
.userProfileSettingsForm {
|
||||||
|
|
|
@ -255,33 +255,32 @@
|
||||||
|
|
||||||
var html = '<div data-role="popup" class="playFlyout" data-history="false" data-theme="a">';
|
var html = '<div data-role="popup" class="playFlyout" data-history="false" data-theme="a">';
|
||||||
|
|
||||||
html += '<ul data-role="listview" style="min-width: 180px;">';
|
html += '<ul data-role="listview" style="min-width: 160px;">';
|
||||||
html += '<li data-role="list-divider">' + Globalize.translate('HeaderMenu') + '</li>';
|
|
||||||
|
|
||||||
html += '<li><a href="#" onclick="MediaController.play(\'' + itemId + '\');LibraryBrowser.closePlayMenu();">' + Globalize.translate('ButtonPlay') + '</a></li>';
|
html += '<li data-icon="false"><a href="#" onclick="MediaController.play(\'' + itemId + '\');LibraryBrowser.closePlayMenu();">' + Globalize.translate('ButtonPlay') + '</a></li>';
|
||||||
|
|
||||||
if (!isFolder && externalPlayers) {
|
if (!isFolder && externalPlayers) {
|
||||||
html += '<li><a href="#" onclick="LibraryBrowser.closePlayMenu();LibraryBrowser.playInExternalPlayer(\'' + itemId + '\');">' + Globalize.translate('ButtonPlayExternalPlayer') + '</a></li>';
|
html += '<li data-icon="false"><a href="#" onclick="LibraryBrowser.closePlayMenu();LibraryBrowser.playInExternalPlayer(\'' + itemId + '\');">' + Globalize.translate('ButtonPlayExternalPlayer') + '</a></li>';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (resumePositionTicks) {
|
if (resumePositionTicks) {
|
||||||
html += '<li><a href="#" onclick="MediaController.play({ids:[\'' + itemId + '\'],startPositionTicks:' + resumePositionTicks + '});LibraryBrowser.closePlayMenu();">' + Globalize.translate('ButtonResume') + '</a></li>';
|
html += '<li data-icon="false"><a href="#" onclick="MediaController.play({ids:[\'' + itemId + '\'],startPositionTicks:' + resumePositionTicks + '});LibraryBrowser.closePlayMenu();">' + Globalize.translate('ButtonResume') + '</a></li>';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (MediaController.canQueueMediaType(mediaType, itemType)) {
|
if (MediaController.canQueueMediaType(mediaType, itemType)) {
|
||||||
html += '<li><a href="#" onclick="MediaController.queue(\'' + itemId + '\');LibraryBrowser.closePlayMenu();">' + Globalize.translate('ButtonQueue') + '</a></li>';
|
html += '<li data-icon="false"><a href="#" onclick="MediaController.queue(\'' + itemId + '\');LibraryBrowser.closePlayMenu();">' + Globalize.translate('ButtonQueue') + '</a></li>';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (itemType == "Audio" || itemType == "MusicAlbum" || itemType == "MusicArtist" || itemType == "MusicGenre") {
|
if (itemType == "Audio" || itemType == "MusicAlbum" || itemType == "MusicArtist" || itemType == "MusicGenre") {
|
||||||
html += '<li><a href="#" onclick="MediaController.instantMix(\'' + itemId + '\');LibraryBrowser.closePlayMenu();">' + Globalize.translate('ButtonInstantMix') + '</a></li>';
|
html += '<li data-icon="false"><a href="#" onclick="MediaController.instantMix(\'' + itemId + '\');LibraryBrowser.closePlayMenu();">' + Globalize.translate('ButtonInstantMix') + '</a></li>';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isFolder || itemType == "MusicArtist" || itemType == "MusicGenre") {
|
if (isFolder || itemType == "MusicArtist" || itemType == "MusicGenre") {
|
||||||
html += '<li><a href="#" onclick="MediaController.shuffle(\'' + itemId + '\');LibraryBrowser.closePlayMenu();">' + Globalize.translate('ButtonShuffle') + '</a></li>';
|
html += '<li data-icon="false"><a href="#" onclick="MediaController.shuffle(\'' + itemId + '\');LibraryBrowser.closePlayMenu();">' + Globalize.translate('ButtonShuffle') + '</a></li>';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (showAddToPlaylist) {
|
if (showAddToPlaylist) {
|
||||||
html += '<li><a href="#" onclick="PlaylistManager.showPanel([\'' + itemId + '\']);LibraryBrowser.closePlayMenu();">' + Globalize.translate('ButtonAddToPlaylist') + '</a></li>';
|
html += '<li data-icon="false"><a href="#" onclick="PlaylistManager.showPanel([\'' + itemId + '\']);LibraryBrowser.closePlayMenu();">' + Globalize.translate('ButtonAddToPlaylist') + '</a></li>';
|
||||||
}
|
}
|
||||||
|
|
||||||
html += '</ul>';
|
html += '</ul>';
|
||||||
|
@ -380,35 +379,34 @@
|
||||||
|
|
||||||
var html = '<div data-role="popup" class="playFlyout" data-history="false" data-theme="a">';
|
var html = '<div data-role="popup" class="playFlyout" data-history="false" data-theme="a">';
|
||||||
|
|
||||||
html += '<ul data-role="listview" style="min-width: 180px;">';
|
html += '<ul data-role="listview" style="min-width: 160px;">';
|
||||||
html += '<li data-role="list-divider">' + Globalize.translate('HeaderMenu') + '</li>';
|
|
||||||
|
|
||||||
if (commands.indexOf('addtocollection') != -1) {
|
if (commands.indexOf('addtocollection') != -1) {
|
||||||
html += '<li data-icon="plus"><a href="#" onclick="$(\'.playFlyout\').popup(\'close\');BoxSetEditor.showPanel([\'' + itemId + '\']);">' + Globalize.translate('ButtonAddToCollection') + '</a></li>';
|
html += '<li data-icon="false"><a href="#" onclick="$(\'.playFlyout\').popup(\'close\');BoxSetEditor.showPanel([\'' + itemId + '\']);">' + Globalize.translate('ButtonAddToCollection') + '</a></li>';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (commands.indexOf('playlist') != -1) {
|
if (commands.indexOf('playlist') != -1) {
|
||||||
html += '<li data-icon="plus"><a href="#" onclick="$(\'.playFlyout\').popup(\'close\');PlaylistManager.showPanel([\'' + itemId + '\']);">' + Globalize.translate('ButtonAddToPlaylist') + '</a></li>';
|
html += '<li data-icon="false"><a href="#" onclick="$(\'.playFlyout\').popup(\'close\');PlaylistManager.showPanel([\'' + itemId + '\']);">' + Globalize.translate('ButtonAddToPlaylist') + '</a></li>';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (commands.indexOf('delete') != -1) {
|
if (commands.indexOf('delete') != -1) {
|
||||||
html += '<li data-icon="delete"><a class="btnMoreMenuDelete" href="#" onclick="$(\'.playFlyout\').popup(\'close\');LibraryBrowser.deleteItem([\'' + itemId + '\']);">' + Globalize.translate('ButtonDelete') + '</a></li>';
|
html += '<li data-icon="false"><a class="btnMoreMenuDelete" href="#" onclick="$(\'.playFlyout\').popup(\'close\');LibraryBrowser.deleteItem([\'' + itemId + '\']);">' + Globalize.translate('ButtonDelete') + '</a></li>';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (commands.indexOf('download') != -1) {
|
if (commands.indexOf('false') != -1) {
|
||||||
var downloadHref = ApiClient.getUrl("Items/" + itemId + "/Download", {
|
var downloadHref = ApiClient.getUrl("Items/" + itemId + "/Download", {
|
||||||
api_key: ApiClient.accessToken()
|
api_key: ApiClient.accessToken()
|
||||||
});
|
});
|
||||||
|
|
||||||
html += '<li data-icon="arrow-d"><a class="btnMoreMenuDownload" data-ajax="false" href="' + downloadHref + '" onclick="$(\'.playFlyout\').popup(\'close\');">' + Globalize.translate('ButtonDownload') + '</a></li>';
|
html += '<li data-icon="false"><a class="btnMoreMenuDownload" data-ajax="false" href="' + downloadHref + '" onclick="$(\'.playFlyout\').popup(\'close\');">' + Globalize.translate('ButtonDownload') + '</a></li>';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (commands.indexOf('edit') != -1) {
|
if (commands.indexOf('edit') != -1) {
|
||||||
html += '<li data-icon="edit"><a href="edititemmetadata.html?id=' + itemId + '">' + Globalize.translate('ButtonEdit') + '</a></li>';
|
html += '<li data-icon="false"><a href="edititemmetadata.html?id=' + itemId + '">' + Globalize.translate('ButtonEdit') + '</a></li>';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (commands.indexOf('refresh') != -1) {
|
if (commands.indexOf('refresh') != -1) {
|
||||||
html += '<li data-icon="refresh"><a class="btnMoreMenuRefresh" href="#">' + Globalize.translate('ButtonRefresh') + '</a></li>';
|
html += '<li data-icon="false"><a class="btnMoreMenuRefresh" href="#">' + Globalize.translate('ButtonRefresh') + '</a></li>';
|
||||||
}
|
}
|
||||||
|
|
||||||
html += '</ul>';
|
html += '</ul>';
|
||||||
|
@ -812,27 +810,12 @@
|
||||||
textlines.push(displayName);
|
textlines.push(displayName);
|
||||||
|
|
||||||
var verticalTextLines = 2;
|
var verticalTextLines = 2;
|
||||||
var enableSubLinks = !$.browser.mobile;
|
|
||||||
;
|
|
||||||
|
|
||||||
if (item.Type == 'Audio') {
|
if (item.Type == 'Audio') {
|
||||||
textlines.push(item.ArtistItems.map(function (a) {
|
textlines.push(item.ArtistItems.map(function (a) {
|
||||||
if (enableSubLinks) {
|
|
||||||
return '<span class="listviewSubLink" data-href="itembynamedetails.html?id=' + a.Id + '&context=music">' + a.Name + '</span>';
|
|
||||||
} else {
|
|
||||||
return a.Name;
|
return a.Name;
|
||||||
}
|
|
||||||
|
|
||||||
}).join(', ') || ' ');
|
}).join(', ') || ' ');
|
||||||
|
|
||||||
if (item.Album && item.AlbumId && !options.smallIcon) {
|
|
||||||
verticalTextLines++;
|
|
||||||
if (enableSubLinks) {
|
|
||||||
textlines.push('<span class="listviewSubLink" data-href="itemdetails.html?id=' + item.AlbumId + '&context=music">' + item.Album + '</span>');
|
|
||||||
} else {
|
|
||||||
textlines.push(item.Album);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (item.Type == 'Game') {
|
if (item.Type == 'Game') {
|
||||||
|
@ -920,6 +903,14 @@
|
||||||
atts.push('data-detailsmenu="true"');
|
atts.push('data-detailsmenu="true"');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (item.AlbumId) {
|
||||||
|
atts.push('data-albumid="' + item.AlbumId + '"');
|
||||||
|
}
|
||||||
|
|
||||||
|
if (item.ArtistItems && item.ArtistItems.length) {
|
||||||
|
atts.push('data-artistid="' + item.ArtistItems[0].Id + '"');
|
||||||
|
}
|
||||||
|
|
||||||
var html = atts.join(' ');
|
var html = atts.join(' ');
|
||||||
|
|
||||||
if (html) {
|
if (html) {
|
||||||
|
|
|
@ -376,81 +376,91 @@
|
||||||
var locationType = card.getAttribute('data-locationtype');
|
var locationType = card.getAttribute('data-locationtype');
|
||||||
var index = card.getAttribute('data-index');
|
var index = card.getAttribute('data-index');
|
||||||
|
|
||||||
|
var albumid = card.getAttribute('data-albumid');
|
||||||
|
var artistid = card.getAttribute('data-artistid');
|
||||||
|
|
||||||
$(card).addClass('hasContextMenu');
|
$(card).addClass('hasContextMenu');
|
||||||
|
|
||||||
Dashboard.getCurrentUser().done(function (user) {
|
Dashboard.getCurrentUser().done(function (user) {
|
||||||
|
|
||||||
var html = '<div data-role="popup" class="tapHoldMenu" data-theme="a">';
|
var html = '<div data-role="popup" class="tapHoldMenu" data-theme="a">';
|
||||||
|
|
||||||
html += '<ul data-role="listview" style="min-width: 240px;">';
|
html += '<ul data-role="listview" style="min-width: 180px;">';
|
||||||
html += '<li data-role="list-divider">' + Globalize.translate('HeaderMenu') + '</li>';
|
|
||||||
|
|
||||||
var href = card.getAttribute('data-href') || card.href || $('a', card).attr('href');
|
var href = card.getAttribute('data-href') || card.href || $('a', card).attr('href');
|
||||||
|
|
||||||
if (commands.indexOf('addtocollection') != -1) {
|
if (commands.indexOf('addtocollection') != -1) {
|
||||||
html += '<li data-icon="plus"><a href="#" class="btnAddToCollection" data-itemid="' + itemId + '">' + Globalize.translate('ButtonAddToCollection') + '</a></li>';
|
html += '<li data-icon="false"><a href="#" class="btnAddToCollection" data-itemid="' + itemId + '">' + Globalize.translate('ButtonAddToCollection') + '</a></li>';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (commands.indexOf('playlist') != -1) {
|
if (commands.indexOf('playlist') != -1) {
|
||||||
html += '<li data-icon="plus"><a href="#" class="btnAddToPlaylist" data-itemid="' + itemId + '">' + Globalize.translate('ButtonAddToPlaylist') + '</a></li>';
|
html += '<li data-icon="false"><a href="#" class="btnAddToPlaylist" data-itemid="' + itemId + '">' + Globalize.translate('ButtonAddToPlaylist') + '</a></li>';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (commands.indexOf('delete') != -1) {
|
if (commands.indexOf('delete') != -1) {
|
||||||
html += '<li data-icon="delete"><a href="#" class="btnDelete" data-itemId="' + itemId + '">' + Globalize.translate('ButtonDelete') + '</a></li>';
|
html += '<li data-icon="false"><a href="#" class="btnDelete" data-itemId="' + itemId + '">' + Globalize.translate('ButtonDelete') + '</a></li>';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (user.Policy.IsAdministrator && commands.indexOf('edit') != -1) {
|
if (user.Policy.IsAdministrator && commands.indexOf('edit') != -1) {
|
||||||
html += '<li data-icon="edit"><a href="edititemmetadata.html?id=' + itemId + '">' + Globalize.translate('ButtonEdit') + '</a></li>';
|
html += '<li data-icon="false"><a href="edititemmetadata.html?id=' + itemId + '">' + Globalize.translate('ButtonEdit') + '</a></li>';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (commands.indexOf('instantmix') != -1) {
|
if (commands.indexOf('instantmix') != -1) {
|
||||||
html += '<li data-icon="recycle"><a href="#" class="btnInstantMix" data-itemid="' + itemId + '">' + Globalize.translate('ButtonInstantMix') + '</a></li>';
|
html += '<li data-icon="false"><a href="#" class="btnInstantMix" data-itemid="' + itemId + '">' + Globalize.translate('ButtonInstantMix') + '</a></li>';
|
||||||
}
|
}
|
||||||
|
|
||||||
html += '<li><a href="' + href + '">' + Globalize.translate('ButtonOpen') + '</a></li>';
|
html += '<li data-icon="false"><a href="' + href + '">' + Globalize.translate('ButtonOpen') + '</a></li>';
|
||||||
//html += '<li><a href="' + href + '" target="_blank">' + Globalize.translate('ButtonOpenInNewTab') + '</a></li>';
|
//html += '<li><a href="' + href + '" target="_blank">' + Globalize.translate('ButtonOpenInNewTab') + '</a></li>';
|
||||||
|
|
||||||
if (options.showPlayOptions !== false) {
|
if (options.showPlayOptions !== false) {
|
||||||
|
|
||||||
if (MediaController.canPlayByAttributes(itemType, mediaType, playAccess, locationType)) {
|
if (MediaController.canPlayByAttributes(itemType, mediaType, playAccess, locationType)) {
|
||||||
html += '<li data-icon="play"><a href="#" class="btnPlay" data-itemid="' + itemId + '">' + Globalize.translate('ButtonPlay') + '</a></li>';
|
html += '<li data-icon="false"><a href="#" class="btnPlay" data-itemid="' + itemId + '">' + Globalize.translate('ButtonPlay') + '</a></li>';
|
||||||
|
|
||||||
if (commands.indexOf('playfromhere') != -1) {
|
if (commands.indexOf('playfromhere') != -1) {
|
||||||
html += '<li data-icon="play"><a href="#" class="btnPlayAllFromHere" data-index="' + index + '">' + Globalize.translate('ButtonPlayAllFromHere') + '</a></li>';
|
html += '<li data-icon="false"><a href="#" class="btnPlayAllFromHere" data-index="' + index + '">' + Globalize.translate('ButtonPlayAllFromHere') + '</a></li>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mediaType == 'Video' && AppSettings.enableExternalPlayers()) {
|
if (mediaType == 'Video' && AppSettings.enableExternalPlayers()) {
|
||||||
html += '<li data-icon="play"><a href="#" class="btnExternalPlayer" data-itemid="' + itemId + '">' + Globalize.translate('ButtonPlayExternalPlayer') + '</a></li>';
|
html += '<li data-icon="false"><a href="#" class="btnExternalPlayer" data-itemid="' + itemId + '">' + Globalize.translate('ButtonPlayExternalPlayer') + '</a></li>';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (playbackPositionTicks && mediaType != "Audio") {
|
if (playbackPositionTicks && mediaType != "Audio") {
|
||||||
html += '<li data-icon="play"><a href="#" class="btnResume" data-ticks="' + playbackPositionTicks + '" data-itemid="' + itemId + '">' + Globalize.translate('ButtonResume') + '</a></li>';
|
html += '<li data-icon="false"><a href="#" class="btnResume" data-ticks="' + playbackPositionTicks + '" data-itemid="' + itemId + '">' + Globalize.translate('ButtonResume') + '</a></li>';
|
||||||
}
|
}
|
||||||
|
|
||||||
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="false"><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="false"><a href="#" class="btnQueue" data-itemid="' + itemId + '">' + Globalize.translate('ButtonQueue') + '</a></li>';
|
||||||
|
|
||||||
if (commands.indexOf('queuefromhere') != -1) {
|
if (commands.indexOf('queuefromhere') != -1) {
|
||||||
html += '<li data-icon="plus"><a href="#" class="btnQueueAllFromHere" data-index="' + index + '">' + Globalize.translate('ButtonQueueAllFromHere') + '</a></li>';
|
html += '<li data-icon="false"><a href="#" class="btnQueueAllFromHere" data-index="' + index + '">' + Globalize.translate('ButtonQueueAllFromHere') + '</a></li>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (commands.indexOf('shuffle') != -1) {
|
if (commands.indexOf('shuffle') != -1) {
|
||||||
html += '<li data-icon="recycle"><a href="#" class="btnShuffle" data-itemid="' + itemId + '">' + Globalize.translate('ButtonShuffle') + '</a></li>';
|
html += '<li data-icon="false"><a href="#" class="btnShuffle" data-itemid="' + itemId + '">' + Globalize.translate('ButtonShuffle') + '</a></li>';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (commands.indexOf('removefromplaylist') != -1) {
|
if (commands.indexOf('removefromplaylist') != -1) {
|
||||||
html += '<li data-icon="delete"><a href="#" class="btnRemoveFromPlaylist" data-playlistitemid="' + playlistItemId + '">' + Globalize.translate('ButtonRemoveFromPlaylist') + '</a></li>';
|
html += '<li data-icon="false"><a href="#" class="btnRemoveFromPlaylist" data-playlistitemid="' + playlistItemId + '">' + Globalize.translate('ButtonRemoveFromPlaylist') + '</a></li>';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (commands.indexOf('sync') != -1) {
|
if (commands.indexOf('sync') != -1) {
|
||||||
html += '<li data-icon="refresh"><a href="#" class="btnSync" data-itemId="' + itemId + '">' + Globalize.translate('ButtonSync') + '</a></li>';
|
html += '<li data-icon="false"><a href="#" class="btnSync" data-itemId="' + itemId + '">' + Globalize.translate('ButtonSync') + '</a></li>';
|
||||||
|
}
|
||||||
|
|
||||||
|
if (albumid) {
|
||||||
|
html += '<li data-icon="false"><a href="itemdetails.html?id=' + albumid + '">' + Globalize.translate('ButtonViewAlbum') + '</a></li>';
|
||||||
|
}
|
||||||
|
|
||||||
|
if (artistid) {
|
||||||
|
html += '<li data-icon="false"><a href="itembynamedetails.html?context=music&id=' + artistid + '">' + Globalize.translate('ButtonViewArtist') + '</a></li>';
|
||||||
}
|
}
|
||||||
|
|
||||||
html += '</ul>';
|
html += '</ul>';
|
||||||
|
|
|
@ -148,8 +148,8 @@
|
||||||
html += '<div class="libraryMenuOptions">';
|
html += '<div class="libraryMenuOptions">';
|
||||||
html += '</div>';
|
html += '</div>';
|
||||||
|
|
||||||
html += '<div class="sidebarDivider"></div>';
|
|
||||||
html += '<div class="adminMenuOptions">';
|
html += '<div class="adminMenuOptions">';
|
||||||
|
html += '<div class="sidebarDivider"></div>';
|
||||||
|
|
||||||
html += '<div class="sidebarHeader">';
|
html += '<div class="sidebarHeader">';
|
||||||
html += Globalize.translate('HeaderAdmin');
|
html += Globalize.translate('HeaderAdmin');
|
||||||
|
@ -163,14 +163,21 @@
|
||||||
}
|
}
|
||||||
html += '</div>';
|
html += '</div>';
|
||||||
|
|
||||||
html += '<div class="sidebarDivider"></div>';
|
|
||||||
html += '<div class="userMenuOptions">';
|
html += '<div class="userMenuOptions">';
|
||||||
|
html += '<div class="sidebarDivider"></div>';
|
||||||
|
|
||||||
|
html += '<a class="sidebarLink lnkMediaFolder" data-itemid="inbox" href="notificationlist.html"><span class="fa fa-inbox sidebarLinkIcon"></span>';
|
||||||
|
html += Globalize.translate('ButtonInbox');
|
||||||
|
html += '<div class="btnNotifications"><div class="btnNotificationsInner">0</div></div>';
|
||||||
|
html += '</a>';
|
||||||
|
|
||||||
|
html += '<a class="sidebarLink lnkMediaFolder syncViewMenu" data-itemid="mysync" href="mysync.html"><span class="fa fa-refresh sidebarLinkIcon" ></span>' + Globalize.translate('ButtonSync') + '</a>';
|
||||||
|
|
||||||
if (Dashboard.isConnectMode()) {
|
if (Dashboard.isConnectMode()) {
|
||||||
html += '<a class="sidebarLink lnkMediaFolder" data-itemid="selectserver" href="selectserver.html"><span class="fa fa-globe sidebarLinkIcon"></span>' + Globalize.translate('ButtonSelectServer') + '</a>';
|
html += '<a class="sidebarLink lnkMediaFolder" data-itemid="selectserver" href="selectserver.html"><span class="fa fa-globe sidebarLinkIcon"></span>' + Globalize.translate('ButtonSelectServer') + '</a>';
|
||||||
}
|
}
|
||||||
|
|
||||||
html += '<a class="sidebarLink lnkMediaFolder" data-itemid="logout" href="#" onclick="Dashboard.logout();"><span class="fa fa-sign-out sidebarLinkIcon"></span>' + Globalize.translate('ButtonSignOut') + '</a>';
|
html += '<a class="sidebarLink lnkMediaFolder" data-itemid="logout" href="#" onclick="Dashboard.logout();"><span class="fa fa-lock sidebarLinkIcon"></span>' + Globalize.translate('ButtonSignOut') + '</a>';
|
||||||
html += '</div>';
|
html += '</div>';
|
||||||
|
|
||||||
|
|
||||||
|
@ -314,6 +321,11 @@
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function showUserAtTop() {
|
||||||
|
|
||||||
|
return $.browser.mobile || AppInfo.isNativeApp;
|
||||||
|
}
|
||||||
|
|
||||||
var requiresLibraryMenuRefresh = false;
|
var requiresLibraryMenuRefresh = false;
|
||||||
var requiresViewMenuRefresh = false;
|
var requiresViewMenuRefresh = false;
|
||||||
|
|
||||||
|
@ -329,11 +341,16 @@
|
||||||
|
|
||||||
html += '<div class="sidebarLinks librarySidebarLinks">';
|
html += '<div class="sidebarLinks librarySidebarLinks">';
|
||||||
|
|
||||||
|
var userAtTop = showUserAtTop();
|
||||||
|
|
||||||
|
var homeHref = window.ApiClient ? 'index.html' : 'selectserver.html';
|
||||||
|
|
||||||
var userHref = user.localUser && user.localUser.Policy.EnableUserPreferenceAccess ?
|
var userHref = user.localUser && user.localUser.Policy.EnableUserPreferenceAccess ?
|
||||||
'mypreferencesdisplay.html?userId=' + user.localUser.Id :
|
'mypreferencesdisplay.html?userId=' + user.localUser.Id :
|
||||||
(user.localUser ? 'index.html' : '#');
|
(user.localUser ? ('mypreferenceswebclient.html?userId=' + user.localUser.Id) : '#');
|
||||||
|
|
||||||
var hasUserImage = user.imageUrl && AppInfo.enableUserImage;
|
var hasUserImage = user.imageUrl && AppInfo.enableUserImage;
|
||||||
|
if (userAtTop) {
|
||||||
var paddingLeft = hasUserImage ? 'padding-left:.7em;' : '';
|
var paddingLeft = hasUserImage ? 'padding-left:.7em;' : '';
|
||||||
html += '<a style="margin-top:0;' + paddingLeft + 'display:block;color:#fff;text-decoration:none;font-size:16px;font-weight:400!important;background: #111;" href="' + userHref + '">';
|
html += '<a style="margin-top:0;' + paddingLeft + 'display:block;color:#fff;text-decoration:none;font-size:16px;font-weight:400!important;background: #111;" href="' + userHref + '">';
|
||||||
|
|
||||||
|
@ -356,18 +373,33 @@
|
||||||
|
|
||||||
html += '<div class="sidebarDivider" style="margin-top:0;"></div>';
|
html += '<div class="sidebarDivider" style="margin-top:0;"></div>';
|
||||||
|
|
||||||
var homeHref = window.ApiClient ? 'index.html' : 'selectserver.html';
|
|
||||||
|
|
||||||
html += '<a class="lnkMediaFolder sidebarLink" href="' + homeHref + '"><span class="fa fa-home sidebarLinkIcon"></span><span>' + Globalize.translate('ButtonHome') + '</span></a>';
|
html += '<a class="lnkMediaFolder sidebarLink" href="' + homeHref + '"><span class="fa fa-home sidebarLinkIcon"></span><span>' + Globalize.translate('ButtonHome') + '</span></a>';
|
||||||
|
} else {
|
||||||
|
html += '<div style="margin-top:5px;"></div>';
|
||||||
|
|
||||||
html += '<a class="sidebarLink lnkMediaFolder" data-itemid="inbox" href="notificationlist.html"><span class="fa fa-inbox sidebarLinkIcon"></span>';
|
html += '<a class="lnkMediaFolder sidebarLink" href="' + homeHref + '">';
|
||||||
html += Globalize.translate('ButtonInbox');
|
html += '<div class="lazy" data-src="css/images/mblogoicon.png" style="width:' + 28 + 'px;height:' + 28 + 'px;background-size:contain;background-repeat:no-repeat;background-position:center center;border-radius:1000px;vertical-align:middle;margin:0 1.4em 0 1.3em;display:inline-block;"></div>';
|
||||||
html += '<div class="btnNotifications"><div class="btnNotificationsInner">0</div></div>';
|
html += Globalize.translate('ButtonHome');
|
||||||
html += '</a>';
|
html += '</a>';
|
||||||
|
|
||||||
html += '<a class="sidebarLink lnkMediaFolder" data-itemid="remote" href="nowplaying.html"><span class="fa fa-tablet sidebarLinkIcon"></span>' + Globalize.translate('ButtonRemote') + '</a>';
|
html += '<a class="sidebarLink lnkMediaFolder" href="' + userHref + '">';
|
||||||
|
if (hasUserImage) {
|
||||||
|
var imgWidth = 20;
|
||||||
|
var url = user.imageUrl;
|
||||||
|
|
||||||
html += '<a class="sidebarLink lnkMediaFolder syncViewMenu" data-itemid="mysync" href="mysync.html"><span class="fa fa-refresh sidebarLinkIcon"></span>' + Globalize.translate('ButtonSync') + '</a>';
|
if (user.supportsImageParams) {
|
||||||
|
url += "&width=" + (imgWidth * Math.max(devicePixelRatio || 1, 2));
|
||||||
|
}
|
||||||
|
|
||||||
|
html += '<div class="lazy" data-src="' + url + '" style="width:' + imgWidth + 'px;height:' + imgWidth + 'px;background-size:contain;background-repeat:no-repeat;background-position:center center;border-radius:1000px;vertical-align:middle;margin:0 1.6em 0 1.6em;display:inline-block;"></div>';
|
||||||
|
} else {
|
||||||
|
html += '<span class="fa fa-user sidebarLinkIcon"></span>';
|
||||||
|
}
|
||||||
|
html += Globalize.translate('ButtonPreferences');
|
||||||
|
html += '</a>';
|
||||||
|
}
|
||||||
|
|
||||||
|
html += '<a class="sidebarLink lnkMediaFolder" data-itemid="remote" href="nowplaying.html"><span class="fa fa-tablet sidebarLinkIcon"></span>' + Globalize.translate('ButtonRemote') + '</a>';
|
||||||
|
|
||||||
html += '<div class="sidebarDivider"></div>';
|
html += '<div class="sidebarDivider"></div>';
|
||||||
|
|
||||||
|
|
|
@ -33,7 +33,7 @@ var Dashboard = {
|
||||||
//$.mobile.listview.prototype.options.dividerTheme = "b";
|
//$.mobile.listview.prototype.options.dividerTheme = "b";
|
||||||
|
|
||||||
//$.mobile.popup.prototype.options.theme = "c";
|
//$.mobile.popup.prototype.options.theme = "c";
|
||||||
$.mobile.popup.prototype.options.transition = "fade";
|
$.mobile.popup.prototype.options.transition = "pop";
|
||||||
|
|
||||||
if ($.browser.mobile) {
|
if ($.browser.mobile) {
|
||||||
$.mobile.defaultPageTransition = "slide";
|
$.mobile.defaultPageTransition = "slide";
|
||||||
|
|
|
@ -64,7 +64,8 @@
|
||||||
html += LibraryBrowser.getListViewHtml({
|
html += LibraryBrowser.getListViewHtml({
|
||||||
items: result.Items,
|
items: result.Items,
|
||||||
showIndex: true,
|
showIndex: true,
|
||||||
defaultAction: 'play'
|
defaultAction: 'play',
|
||||||
|
smallIcon: true
|
||||||
});
|
});
|
||||||
|
|
||||||
var elem = $('#items', page).html(html).trigger('create').lazyChildren();
|
var elem = $('#items', page).html(html).trigger('create').lazyChildren();
|
||||||
|
|
|
@ -472,6 +472,7 @@
|
||||||
currentWebAppSession.connect().success(function () {
|
currentWebAppSession.connect().success(function () {
|
||||||
|
|
||||||
console.log('session.connect succeeded');
|
console.log('session.connect succeeded');
|
||||||
|
currentWebAppSession.setWebAppSessionListener();
|
||||||
currentWebAppSession.on('disconnect', handleSessionDisconnect);
|
currentWebAppSession.on('disconnect', handleSessionDisconnect);
|
||||||
|
|
||||||
MediaController.setActivePlayer(PlayerName, convertDeviceToTarget(device));
|
MediaController.setActivePlayer(PlayerName, convertDeviceToTarget(device));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue