removed ProcessManager

This commit is contained in:
Luke Pulverenti 2015-03-24 21:14:24 -04:00
parent 8830ee7c30
commit 50a6a77dbe
4 changed files with 43 additions and 21 deletions

View File

@ -253,7 +253,7 @@
<div id="scenesCollapsible" style="display: none;" class="detailSection">
<div class="detailSectionHeader">
${HeaderScenes}
<a class="detailSectionHeaderButton" href="metadataadvanced.html" data-role="button" data-icon="gear" data-iconpos="notext" data-inline="true" title="${ButtonSettings}">${ButtonSettings}</a>
<a class="detailSectionHeaderButton chapterSettingsButton" href="metadataadvanced.html" data-role="button" data-icon="gear" data-iconpos="notext" data-inline="true" title="${ButtonSettings}" style="display:none;">${ButtonSettings}</a>
</div>
<div id="scenesContent" class="detailSectionContent smallItemsContainer"></div>
</div>

View File

@ -1,6 +1,8 @@
(function ($, document) {
function loadSections(page, userId) {
function loadSections(page, user) {
var userId = user.Id;
var i, length;
var sectionCount = 3;
@ -21,7 +23,7 @@
var latestMediElem = $('.section0', page);
Sections.loadRecentlyAdded(latestMediElem, userId, context).done(function () {
Sections.loadRecentlyAdded(latestMediElem, user, context).done(function () {
$('h1', latestMediElem).addClass('firstListHeader');
});
@ -33,9 +35,9 @@
var page = this;
var userId = Dashboard.getCurrentUserId();
loadSections(page, userId);
Dashboard.getCurrentUser().done(function (user) {
loadSections(page, user);
});
});

View File

@ -119,7 +119,7 @@
});
}
function loadRecentlyAdded(elem, userId, context) {
function loadRecentlyAdded(elem, user, context) {
var options = {
@ -130,14 +130,18 @@
EnableImageTypes: "Primary,Backdrop,Banner,Thumb"
};
return ApiClient.getJSON(ApiClient.getUrl('Users/' + userId + '/Items/Latest', options)).done(function (items) {
return ApiClient.getJSON(ApiClient.getUrl('Users/' + user.Id + '/Items/Latest', options)).done(function (items) {
var html = '';
if (items.length) {
html += '<div>';
html += '<h1 style="display:inline-block; vertical-align:middle;" class="listHeader">' + Globalize.translate('HeaderLatestMedia') + '</h1>';
html += '<a href="mypreferencesdisplay.html" class="accentButton"><i class="fa fa-pencil"></i>' + Globalize.translate('ButtonEdit') + '</a>';
if (user.Policy.EnableUserPreferenceAccess) {
html += '<a href="mypreferencesdisplay.html" class="accentButton"><i class="fa fa-pencil"></i>' + Globalize.translate('ButtonEdit') + '</a>';
}
html += '</div>';
html += '<div class="itemsContainer">';
html += LibraryBrowser.getPosterViewHtml({
@ -192,7 +196,7 @@
});
}
function loadLibraryTiles(elem, userId, shape, index, autoHideOnMobile, showTitles) {
function loadLibraryTiles(elem, user, shape, index, autoHideOnMobile, showTitles) {
if (autoHideOnMobile) {
$(elem).addClass('hiddenSectionOnMobile');
@ -200,7 +204,7 @@
$(elem).removeClass('hiddenSectionOnMobile');
}
getUserViews(userId).done(function (items) {
getUserViews(user.Id).done(function (items) {
var html = '';
@ -210,7 +214,11 @@
html += '<div>';
html += '<h1 style="display:inline-block; vertical-align:middle;" class="' + cssClass + '">' + Globalize.translate('HeaderMyViews') + '</h1>';
html += '<a href="mypreferencesdisplay.html" class="accentButton"><i class="fa fa-pencil"></i>' + Globalize.translate('ButtonEdit') + '</a>';
if (user.Policy.EnableUserPreferenceAccess) {
html += '<a href="mypreferencesdisplay.html" class="accentButton"><i class="fa fa-pencil"></i>' + Globalize.translate('ButtonEdit') + '</a>';
}
html += '</div>';
html += '<div>';
@ -475,7 +483,9 @@
}
function loadSection(page, userId, displayPreferences, index) {
function loadSection(page, user, displayPreferences, index) {
var userId = user.Id;
var section = displayPreferences.CustomPrefs['home' + index] || getDefaultSection(index);
@ -484,19 +494,19 @@
var elem = $('.section' + index, page);
if (section == 'latestmedia') {
Sections.loadRecentlyAdded(elem, userId);
Sections.loadRecentlyAdded(elem, user);
}
else if (section == 'librarytiles') {
Sections.loadLibraryTiles(elem, userId, 'backdrop', index, false, showLibraryTileNames);
Sections.loadLibraryTiles(elem, user, 'backdrop', index, false, showLibraryTileNames);
}
else if (section == 'smalllibrarytiles') {
Sections.loadLibraryTiles(elem, userId, 'homePageSmallBackdrop', index, false, showLibraryTileNames);
Sections.loadLibraryTiles(elem, user, 'homePageSmallBackdrop', index, false, showLibraryTileNames);
}
else if (section == 'smalllibrarytiles-automobile') {
Sections.loadLibraryTiles(elem, userId, 'homePageSmallBackdrop', index, true, showLibraryTileNames);
Sections.loadLibraryTiles(elem, user, 'homePageSmallBackdrop', index, true, showLibraryTileNames);
}
else if (section == 'librarytiles-automobile') {
Sections.loadLibraryTiles(elem, userId, 'backdrop', index, true, showLibraryTileNames);
Sections.loadLibraryTiles(elem, user, 'backdrop', index, true, showLibraryTileNames);
}
else if (section == 'librarybuttons') {
Sections.loadlibraryButtons(elem, userId, index);
@ -521,7 +531,7 @@
}
}
function loadSections(page, userId, displayPreferences) {
function loadSections(page, user, displayPreferences) {
var i, length;
var sectionCount = 4;
@ -540,7 +550,7 @@
for (i = 0, length = sectionCount; i < length; i++) {
loadSection(page, userId, displayPreferences, i);
loadSection(page, user, displayPreferences, i);
}
}
@ -623,7 +633,11 @@
ApiClient.getDisplayPreferences('home', userId, 'webclient').done(function (result) {
showWelcomeIfNeeded(page, result);
loadSections(page, userId, result);
Dashboard.getCurrentUser().done(function (user) {
loadSections(page, user, result);
});
});
});

View File

@ -101,6 +101,12 @@
} else {
$('.btnMoreCommands', page).show();
}
if (user.Policy.IsAdministrator) {
$('.chapterSettingsButton', page).show();
} else {
$('.chapterSettingsButton', page).hide();
}
});
if (item.LocationType == "Offline") {