3.0.5264.17006

This commit is contained in:
Luke Pulverenti 2014-05-31 10:30:59 -04:00
parent dcd20638c8
commit 2ba4a04377
8 changed files with 111 additions and 43 deletions

View File

@ -4,7 +4,7 @@
<title>${TitleMediaBrowser}</title> <title>${TitleMediaBrowser}</title>
</head> </head>
<body> <body>
<div id="boxsetsPage" data-role="page" class="page libraryPage backdropPage" data-backdroptype="movie,boxset" data-theme="b"> <div id="boxsetsPage" data-role="page" class="page libraryPage backdropPage collectionEditorPage" data-backdroptype="movie,boxset" data-theme="b">
<div class="libraryViewNav scopedLibraryViewNav"> <div class="libraryViewNav scopedLibraryViewNav">
<a href="#" class="ui-btn-active">${TabCollections}</a> <a href="#" class="ui-btn-active">${TabCollections}</a>
@ -22,14 +22,14 @@
<div class="listTopPaging"> <div class="listTopPaging">
&nbsp; &nbsp;
</div> </div>
<button id="btnNewCollection" data-mini="true" data-icon="plus" data-inline="true" class="hide">${ButtonNew}</button> <button class="btnNewCollection hide" data-mini="true" data-icon="plus" data-inline="true">${ButtonNew}</button>
</div> </div>
<div id="items" class="itemsContainer"></div> <div id="items" class="itemsContainer"></div>
<div class="noItemsMessage" style="display: none;"> <div class="noItemsMessage" style="display: none;">
<p>${MessageNoCollectionsAvailable}</p> <p>${MessageNoCollectionsAvailable}</p>
</div> </div>
</div> </div>
<div data-role="panel" id="newCollectionPanel" data-position="right" data-display="overlay" data-theme="a" data-position-fixed="true"> <div data-role="panel" class="newCollectionPanel" data-position="right" data-display="overlay" data-position-fixed="true">
<form class="newCollectionForm"> <form class="newCollectionForm">
<h3>${HeaderNewCollection}</h3> <h3>${HeaderNewCollection}</h3>
@ -48,7 +48,7 @@
</div> </div>
<br /> <br />
<p> <p>
<button id="btnSubmitNewCollection" type="submit" data-icon="plus" data-mini="true" data-theme="b">${ButtonCreate}</button> <button type="submit" data-icon="plus" data-mini="true">${ButtonCreate}</button>
</p> </p>
</form> </form>
</div> </div>
@ -118,7 +118,7 @@
</div> </div>
<script type="text/javascript"> <script type="text/javascript">
$('.newCollectionForm').off('submit', BoxSetsPage.onNewCollectionSubmit).on('submit', BoxSetsPage.onNewCollectionSubmit); $('.newCollectionForm').off('submit', BoxSetEditor.onNewCollectionSubmit).on('submit', BoxSetEditor.onNewCollectionSubmit);
</script> </script>
</div> </div>
</body> </body>

View File

@ -63,9 +63,15 @@
} }
.libraryMenuButton { .libraryMenuButton {
/*padding-left: 10px;
opacity: .85;*/
} }
.libraryMenuButton img { .headerHomeButton {
padding-right: 0!important;
}
.libraryMenuButton img, .headerHomeButton img {
border: 1px solid #444 !important; border: 1px solid #444 !important;
padding: .5em; padding: .5em;
background-color: #181818; background-color: #181818;
@ -77,7 +83,7 @@
opacity: 1!important; opacity: 1!important;
} }
.libraryMenuButton img:hover { .libraryMenuButton img:hover, .headerHomeButton img:hover {
background-color: #38c; background-color: #38c;
} }
@ -92,7 +98,7 @@
padding-left: 0 !important; padding-left: 0 !important;
position: relative; position: relative;
top: 2px; top: 2px;
margin-left: -5px; margin-left: -8px;
cursor: default; cursor: default;
} }
@ -214,7 +220,7 @@
background-position: 16px center; background-position: 16px center;
} }
.moviesViewMenu { .moviesViewMenu, .trailersViewMenu {
background-image: url(images/items/folders/movies.png); background-image: url(images/items/folders/movies.png);
} }
@ -263,6 +269,10 @@
background-image: url(images/items/folders/report.png); background-image: url(images/items/folders/report.png);
} }
.homevideosViewMenu, .adultvideosViewMenu {
background-image: url(images/items/folders/homevideos.png);
}
.viewMenuSecondary { .viewMenuSecondary {
position: absolute; position: absolute;
top: 0; top: 0;

View File

@ -148,7 +148,7 @@
padding: 0 0 0 43px; padding: 0 0 0 43px;
} }
.moviesPosterItem .posterItemImage { .moviesPosterItem .posterItemImage, .trailersPosterItem .posterItemImage {
background-color: rgba(176, 94, 81, 0.7); background-color: rgba(176, 94, 81, 0.7);
} }
@ -172,6 +172,22 @@
background-color: rgba(255, 233, 127, 0.7); background-color: rgba(255, 233, 127, 0.7);
} }
.homevideosPosterItem .posterItemImage {
background-color: rgba(110, 52, 32, 0.7);
}
.adultvideosPosterItem .posterItemImage {
background-color: rgba(184, 83, 116, 0.7);
}
.photosPosterItem .posterItemImage {
background-color: rgba(127, 0, 0, 0.7);
}
.musicvideosPosterItem .posterItemImage {
background-color: rgba(143, 54, 168, 0.7);
}
.backdropPosterItem { .backdropPosterItem {
width: 128px; width: 128px;
} }

View File

@ -13,9 +13,7 @@
DashboardPage.startInterval(); DashboardPage.startInterval();
$(ApiClient).on("websocketmessage", DashboardPage.onWebSocketMessage) $(ApiClient).on("websocketmessage", DashboardPage.onWebSocketMessage)
.on("websocketopen", DashboardPage.onWebSocketConnectionChange) .on("websocketopen", DashboardPage.onWebSocketOpen);
.on("websocketerror", DashboardPage.onWebSocketConnectionChange)
.on("websocketclose", DashboardPage.onWebSocketConnectionChange);
DashboardPage.lastAppUpdateCheck = null; DashboardPage.lastAppUpdateCheck = null;
DashboardPage.lastPluginUpdateCheck = null; DashboardPage.lastPluginUpdateCheck = null;
@ -180,9 +178,8 @@
} }
}, },
onWebSocketConnectionChange: function () { onWebSocketOpen: function () {
DashboardPage.stopInterval();
DashboardPage.startInterval(); DashboardPage.startInterval();
}, },
@ -192,6 +189,10 @@
DashboardPage.renderInfo(page, sessions); DashboardPage.renderInfo(page, sessions);
}); });
ApiClient.getScheduledTasks().done(function (tasks) {
DashboardPage.renderRunningTasks(page, tasks);
});
}, },
renderInfo: function (page, sessions) { renderInfo: function (page, sessions) {

View File

@ -31,14 +31,18 @@
imgUrl = "css/images/items/folders/games.png"; imgUrl = "css/images/items/folders/games.png";
break; break;
case "trailers": case "trailers":
imgUrl = "css/images/items/folders/games.png"; imgUrl = "css/images/items/folders/movies.png";
break; break;
case "adultvideos":
case "homevideos": case "homevideos":
imgUrl = "css/images/items/folders/homevideos.png"; imgUrl = "css/images/items/folders/homevideos.png";
break; break;
case "musicvideos": case "musicvideos":
imgUrl = "css/images/items/folders/musicvideos.png"; imgUrl = "css/images/items/folders/musicvideos.png";
break; break;
case "books":
imgUrl = "css/images/items/folders/books.png";
break;
case "channels": case "channels":
imgUrl = "css/images/items/folders/channels.png"; imgUrl = "css/images/items/folders/channels.png";
break; break;

View File

@ -4,6 +4,9 @@
var html = '<div class="viewMenuBar ui-bar-b">'; var html = '<div class="viewMenuBar ui-bar-b">';
//html += '<a href="index.html" class="headerButton headerButtonLeft headerHomeButton">';
//html += '<img src="css/images/items/folders/home.png" />';
//html += '</a>';
html += '<button type="button" data-role="none" title="Menu" class="headerButton libraryMenuButton headerButtonLeft">'; html += '<button type="button" data-role="none" title="Menu" class="headerButton libraryMenuButton headerButtonLeft">';
html += '<img src="css/images/menu.png" />'; html += '<img src="css/images/menu.png" />';
html += '</button>'; html += '</button>';

View File

@ -32,7 +32,7 @@
updateFilterControls(page); updateFilterControls(page);
if (result.TotalRecordCount) { if (result.TotalRecordCount) {
html = LibraryBrowser.getPosterViewHtml({ html = LibraryBrowser.getPosterViewHtml({
items: result.Items, items: result.Items,
shape: "portrait", shape: "portrait",
@ -41,11 +41,11 @@
centerText: true, centerText: true,
lazy: true lazy: true
}); });
html += LibraryBrowser.getPagingHtml(query, result.TotalRecordCount); html += LibraryBrowser.getPagingHtml(query, result.TotalRecordCount);
$('.noItemsMessage', page).hide(); $('.noItemsMessage', page).hide();
} else { } else {
$('.noItemsMessage', page).show(); $('.noItemsMessage', page).show();
} }
@ -69,16 +69,6 @@
LibraryBrowser.saveQueryValues(getSavedQueryKey(), query); LibraryBrowser.saveQueryValues(getSavedQueryKey(), query);
Dashboard.getCurrentUser().done(function(user) {
if (user.Configuration.IsAdministrator) {
$('#btnNewCollection', page).removeClass('hide');
} else {
$('#btnNewCollection', page).addClass('hide');
}
});
Dashboard.hideLoadingMsg(); Dashboard.hideLoadingMsg();
}); });
} }
@ -116,7 +106,7 @@
function showNewCollectionPanel(page) { function showNewCollectionPanel(page) {
$('#newCollectionPanel', page).panel('toggle'); $('.newCollectionPanel', page).panel('toggle');
$('#txtNewCollectionName', page).val('').focus(); $('#txtNewCollectionName', page).val('').focus();
} }
@ -190,11 +180,6 @@
reloadItems(page); reloadItems(page);
}); });
$('#btnNewCollection', page).on('click', function () {
showNewCollectionPanel(page);
});
}).on('pagebeforeshow', "#boxsetsPage", function () { }).on('pagebeforeshow', "#boxsetsPage", function () {
query.ParentId = LibraryMenu.getTopParentId(); query.ParentId = LibraryMenu.getTopParentId();
@ -214,9 +199,48 @@
}).on('pageshow', "#boxsetsPage", function () { }).on('pageshow', "#boxsetsPage", function () {
updateFilterControls(this); updateFilterControls(this);
}).on('collectionedit', "#boxsetsPage", function () {
reloadItems(this);
}); });
window.BoxSetsPage = { })(jQuery, document);
(function ($, document) {
function showNewCollectionPanel(page) {
$('.newCollectionPanel', page).panel('toggle');
$('#txtNewCollectionName', page).val('').focus();
}
$(document).on('pageinit', ".collectionEditorPage", function () {
var page = this;
$('.btnNewCollection', page).on('click', function () {
showNewCollectionPanel(page);
});
}).on('pagebeforeshow', ".collectionEditorPage", function () {
var page = this;
Dashboard.getCurrentUser().done(function (user) {
if (user.Configuration.IsAdministrator) {
$('.btnNewCollection', page).removeClass('hide');
} else {
$('.btnNewCollection', page).addClass('hide');
}
});
});
window.BoxSetEditor = {
onNewCollectionSubmit: function () { onNewCollectionSubmit: function () {
@ -225,11 +249,11 @@
var page = $(this).parents('.page'); var page = $(this).parents('.page');
var url = ApiClient.getUrl("Collections", { var url = ApiClient.getUrl("Collections", {
Name: $('#txtNewCollectionName', page).val(), Name: $('#txtNewCollectionName', page).val(),
IsLocked: !$('#chkEnableInternetMetadata', page).checked(), IsLocked: !$('#chkEnableInternetMetadata', page).checked(),
ParentId: getParameterByName('parentId') || getParameterByName('topParentId') ParentId: getParameterByName('parentId') || LibraryMenu.getTopParentId()
}); });
@ -241,9 +265,9 @@
Dashboard.hideLoadingMsg(); Dashboard.hideLoadingMsg();
$('#newCollectionPanel', page).panel('toggle'); $('.newCollectionPanel', page).panel('toggle');
reloadItems(page); $(page).trigger('collectionedit');
}); });

View File

@ -319,10 +319,20 @@
} }
} }
else if (msg.MessageType === "PlaybackStart") { else if (msg.MessageType === "PlaybackStart") {
firePlaybackEvent('playbackstart', msg.Data);
if (msg.Data.DeviceId != ApiClient.deviceId()) {
if (MediaController.getPlayerInfo().id == msg.Data.Id) {
firePlaybackEvent('playbackstart', msg.Data);
}
}
} }
else if (msg.MessageType === "PlaybackStopped") { else if (msg.MessageType === "PlaybackStopped") {
firePlaybackEvent('playbackstop', msg.Data);
if (msg.Data.DeviceId != ApiClient.deviceId()) {
if (MediaController.getPlayerInfo().id == msg.Data.Id) {
firePlaybackEvent('playbackstop', msg.Data);
}
}
} }
} }