add setting to hide library tile names
This commit is contained in:
parent
9a33cab5cd
commit
7c293a7dd1
3 changed files with 17 additions and 6 deletions
|
@ -85,6 +85,12 @@
|
||||||
<option value="none">${OptionNone}</option>
|
<option value="none">${OptionNone}</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
<br />
|
||||||
|
<div>
|
||||||
|
<label for="chkEnableLibraryTileNames">${LabelShowLibraryTileNames}</label>
|
||||||
|
<input type="checkbox" id="chkEnableLibraryTileNames" data-mini="true">
|
||||||
|
<div class="fieldDescription">${LabelShowLibraryTileNamesHelp}</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -192,7 +192,7 @@
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function loadLibraryTiles(elem, userId, shape, index, autoHideOnMobile) {
|
function loadLibraryTiles(elem, userId, shape, index, autoHideOnMobile, showTitles) {
|
||||||
|
|
||||||
if (autoHideOnMobile) {
|
if (autoHideOnMobile) {
|
||||||
$(elem).addClass('hiddenSectionOnMobile');
|
$(elem).addClass('hiddenSectionOnMobile');
|
||||||
|
@ -217,7 +217,7 @@
|
||||||
html += LibraryBrowser.getPosterViewHtml({
|
html += LibraryBrowser.getPosterViewHtml({
|
||||||
items: items,
|
items: items,
|
||||||
shape: shape,
|
shape: shape,
|
||||||
showTitle: true,
|
showTitle: showTitles,
|
||||||
centerText: true,
|
centerText: true,
|
||||||
lazy: true,
|
lazy: true,
|
||||||
autoThumb: true,
|
autoThumb: true,
|
||||||
|
@ -479,22 +479,24 @@
|
||||||
|
|
||||||
var section = displayPreferences.CustomPrefs['home' + index] || getDefaultSection(index);
|
var section = displayPreferences.CustomPrefs['home' + index] || getDefaultSection(index);
|
||||||
|
|
||||||
|
var showLibraryTileNames = displayPreferences.CustomPrefs.enableLibraryTileNames != '0';
|
||||||
|
|
||||||
var elem = $('.section' + index, page);
|
var elem = $('.section' + index, page);
|
||||||
|
|
||||||
if (section == 'latestmedia') {
|
if (section == 'latestmedia') {
|
||||||
Sections.loadRecentlyAdded(elem, userId);
|
Sections.loadRecentlyAdded(elem, userId);
|
||||||
}
|
}
|
||||||
else if (section == 'librarytiles') {
|
else if (section == 'librarytiles') {
|
||||||
Sections.loadLibraryTiles(elem, userId, 'backdrop', index);
|
Sections.loadLibraryTiles(elem, userId, 'backdrop', index, false, showLibraryTileNames);
|
||||||
}
|
}
|
||||||
else if (section == 'smalllibrarytiles') {
|
else if (section == 'smalllibrarytiles') {
|
||||||
Sections.loadLibraryTiles(elem, userId, 'homePageSmallBackdrop', index);
|
Sections.loadLibraryTiles(elem, userId, 'homePageSmallBackdrop', index, false, showLibraryTileNames);
|
||||||
}
|
}
|
||||||
else if (section == 'smalllibrarytiles-automobile') {
|
else if (section == 'smalllibrarytiles-automobile') {
|
||||||
Sections.loadLibraryTiles(elem, userId, 'homePageSmallBackdrop', index, true);
|
Sections.loadLibraryTiles(elem, userId, 'homePageSmallBackdrop', index, true, showLibraryTileNames);
|
||||||
}
|
}
|
||||||
else if (section == 'librarytiles-automobile') {
|
else if (section == 'librarytiles-automobile') {
|
||||||
Sections.loadLibraryTiles(elem, userId, 'backdrop', index, true);
|
Sections.loadLibraryTiles(elem, userId, 'backdrop', index, true, showLibraryTileNames);
|
||||||
}
|
}
|
||||||
else if (section == 'librarybuttons') {
|
else if (section == 'librarybuttons') {
|
||||||
Sections.loadlibraryButtons(elem, userId, index);
|
Sections.loadlibraryButtons(elem, userId, index);
|
||||||
|
|
|
@ -25,6 +25,8 @@
|
||||||
$('#selectHomeSection3', page).val(displayPreferences.CustomPrefs.home2 || '').selectmenu("refresh");
|
$('#selectHomeSection3', page).val(displayPreferences.CustomPrefs.home2 || '').selectmenu("refresh");
|
||||||
$('#selectHomeSection4', page).val(displayPreferences.CustomPrefs.home3 || '').selectmenu("refresh");
|
$('#selectHomeSection4', page).val(displayPreferences.CustomPrefs.home3 || '').selectmenu("refresh");
|
||||||
|
|
||||||
|
$('#chkEnableLibraryTileNames', page).checked(displayPreferences.CustomPrefs.enableLibraryTileNames != '0').checkboxradio("refresh");
|
||||||
|
|
||||||
Dashboard.hideLoadingMsg();
|
Dashboard.hideLoadingMsg();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -37,6 +39,7 @@
|
||||||
displayPreferences.CustomPrefs.home1 = $('#selectHomeSection2', page).val();
|
displayPreferences.CustomPrefs.home1 = $('#selectHomeSection2', page).val();
|
||||||
displayPreferences.CustomPrefs.home2 = $('#selectHomeSection3', page).val();
|
displayPreferences.CustomPrefs.home2 = $('#selectHomeSection3', page).val();
|
||||||
displayPreferences.CustomPrefs.home3 = $('#selectHomeSection4', page).val();
|
displayPreferences.CustomPrefs.home3 = $('#selectHomeSection4', page).val();
|
||||||
|
displayPreferences.CustomPrefs.enableLibraryTileNames = $('#chkEnableLibraryTileNames', page).checked() ? '1' : '0';
|
||||||
|
|
||||||
ApiClient.updateDisplayPreferences('home', displayPreferences, userId, 'webclient').done(function () {
|
ApiClient.updateDisplayPreferences('home', displayPreferences, userId, 'webclient').done(function () {
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue