1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

add setting to hide library tile names

This commit is contained in:
Luke Pulverenti 2015-03-14 21:58:06 -04:00
parent 9a33cab5cd
commit 7c293a7dd1
3 changed files with 17 additions and 6 deletions

View file

@ -85,6 +85,12 @@
<option value="none">${OptionNone}</option>
</select>
</div>
<br />
<div>
<label for="chkEnableLibraryTileNames">${LabelShowLibraryTileNames}</label>
<input type="checkbox" id="chkEnableLibraryTileNames" data-mini="true">
<div class="fieldDescription">${LabelShowLibraryTileNamesHelp}</div>
</div>
</div>
</div>

View file

@ -192,7 +192,7 @@
});
}
function loadLibraryTiles(elem, userId, shape, index, autoHideOnMobile) {
function loadLibraryTiles(elem, userId, shape, index, autoHideOnMobile, showTitles) {
if (autoHideOnMobile) {
$(elem).addClass('hiddenSectionOnMobile');
@ -217,7 +217,7 @@
html += LibraryBrowser.getPosterViewHtml({
items: items,
shape: shape,
showTitle: true,
showTitle: showTitles,
centerText: true,
lazy: true,
autoThumb: true,
@ -479,22 +479,24 @@
var section = displayPreferences.CustomPrefs['home' + index] || getDefaultSection(index);
var showLibraryTileNames = displayPreferences.CustomPrefs.enableLibraryTileNames != '0';
var elem = $('.section' + index, page);
if (section == 'latestmedia') {
Sections.loadRecentlyAdded(elem, userId);
}
else if (section == 'librarytiles') {
Sections.loadLibraryTiles(elem, userId, 'backdrop', index);
Sections.loadLibraryTiles(elem, userId, 'backdrop', index, false, showLibraryTileNames);
}
else if (section == 'smalllibrarytiles') {
Sections.loadLibraryTiles(elem, userId, 'homePageSmallBackdrop', index);
Sections.loadLibraryTiles(elem, userId, 'homePageSmallBackdrop', index, false, showLibraryTileNames);
}
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') {
Sections.loadLibraryTiles(elem, userId, 'backdrop', index, true);
Sections.loadLibraryTiles(elem, userId, 'backdrop', index, true, showLibraryTileNames);
}
else if (section == 'librarybuttons') {
Sections.loadlibraryButtons(elem, userId, index);

View file

@ -25,6 +25,8 @@
$('#selectHomeSection3', page).val(displayPreferences.CustomPrefs.home2 || '').selectmenu("refresh");
$('#selectHomeSection4', page).val(displayPreferences.CustomPrefs.home3 || '').selectmenu("refresh");
$('#chkEnableLibraryTileNames', page).checked(displayPreferences.CustomPrefs.enableLibraryTileNames != '0').checkboxradio("refresh");
Dashboard.hideLoadingMsg();
}
@ -37,6 +39,7 @@
displayPreferences.CustomPrefs.home1 = $('#selectHomeSection2', page).val();
displayPreferences.CustomPrefs.home2 = $('#selectHomeSection3', page).val();
displayPreferences.CustomPrefs.home3 = $('#selectHomeSection4', page).val();
displayPreferences.CustomPrefs.enableLibraryTileNames = $('#chkEnableLibraryTileNames', page).checked() ? '1' : '0';
ApiClient.updateDisplayPreferences('home', displayPreferences, userId, 'webclient').done(function () {