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

update list styles

This commit is contained in:
Luke Pulverenti 2016-06-27 00:19:10 -04:00
parent 559d8eb5f6
commit 2b483db762
21 changed files with 82 additions and 111 deletions

View file

@ -389,9 +389,9 @@
}
if (!item.SpecialFeatureCount || item.SpecialFeatureCount == 0 || item.Type == "Series") {
page.querySelector('#scenesCollapsible').classList.add('hide');
page.querySelector('#specialsCollapsible').classList.add('hide');
} else {
page.querySelector('#scenesCollapsible').classList.remove('hide');
page.querySelector('#specialsCollapsible').classList.remove('hide');
renderSpecials(page, item, user, 6);
}
if (!item.People || !item.People.length) {
@ -1234,7 +1234,7 @@
}
}
html += '<div class="listItemBody">';
html += '<div class="listItemBody two-line">';
html += '<div style="white-space:normal;">' + review.Caption + '</div>';

View file

@ -1229,7 +1229,7 @@
getListViewHtml: function (options) {
require(['paper-icon-item', 'paper-item-body', 'material-icons']);
require(['listViewStyle', 'material-icons']);
var outerHtml = "";
@ -1276,7 +1276,7 @@
var cssClass = 'listItem';
var href = LibraryBrowser.getHref(item, options.context);
html += '<paper-icon-item class="' + cssClass + '"' + dataAttributes + ' data-itemid="' + item.Id + '" data-playlistitemid="' + (item.PlaylistItemId || '') + '" data-href="' + href + '" data-icon="false">';
html += '<div class="' + cssClass + '"' + dataAttributes + ' data-itemid="' + item.Id + '" data-playlistitemid="' + (item.PlaylistItemId || '') + '" data-href="' + href + '" data-icon="false">';
var imgUrl;
@ -1327,15 +1327,15 @@
if (imgUrl) {
if (options.smallIcon) {
html += '<div class="listviewImage lazy small" data-src="' + imgUrl + '" item-icon></div>';
html += '<div class="listItemImage lazy small" data-src="' + imgUrl + '" item-icon></div>';
} else {
html += '<div class="listviewImage lazy" data-src="' + imgUrl + '" item-icon></div>';
html += '<div class="listItemImage lazy" data-src="' + imgUrl + '" item-icon></div>';
}
} else {
if (options.smallIcon) {
html += '<div class="listviewImage small" item-icon></div>';
html += '<div class="listItemImage small" item-icon></div>';
} else {
html += '<div class="listviewImage" item-icon></div>';
html += '<div class="listItemImage" item-icon></div>';
}
}
@ -1383,19 +1383,20 @@
}) + '</div>');
}
if (textlines.length > 2) {
html += '<paper-item-body three-line>';
} else {
html += '<paper-item-body two-line>';
}
var defaultAction = options.defaultAction;
if (defaultAction == 'play' || defaultAction == 'playallfromhere') {
if (item.PlayAccess != 'Full') {
defaultAction = null;
}
}
var defaultActionAttribute = defaultAction ? (' data-action="' + defaultAction + '" class="itemWithAction mediaItem clearLink"') : ' class="mediaItem clearLink"';
var bodyCssClass = 'mediaItem clearLink listItemBody';
if (textlines.length > 2) {
bodyCssClass += ' three-line';
} else {
bodyCssClass += ' two-line';
}
var defaultActionAttribute = defaultAction ? (' data-action="' + defaultAction + '" class="itemWithAction ' + bodyCssClass + '"') : ' class="' + bodyCssClass + '"';
html += '<a' + defaultActionAttribute + ' href="' + href + '">';
for (var i = 0, textLinesLength = textlines.length; i < textLinesLength; i++) {
@ -1403,21 +1404,20 @@
if (i == 0) {
html += '<div>';
} else {
html += '<div secondary>';
html += '<div class="secondary">';
}
html += textlines[i] || '&nbsp;';
html += '</div>';
}
html += '</a>';
html += '</paper-item-body>';
html += '<button is="paper-icon-button-light" class="listviewMenuButton autoSize"><i class="md-icon">' + AppInfo.moreIcon.replace('-', '_') + '</i></button>';
html += '<span class="listViewUserDataButtons">';
html += LibraryBrowser.getUserDataIconsHtml(item);
html += '</span>';
html += '</paper-icon-item>';
html += '</div>';
index++;
return html;

View file

@ -8,7 +8,7 @@
html += '<button type="button" is="emby-button" class="fab mini autoSize blue" item-icon><i class="md-icon">live_tv</i></button>';
html += '<div class="listItemBody">';
html += '<div class="listItemBody two-line">';
html += '<a href="livetvrecordinglist.html?groupid=' + group.Id + '" class="clearLink">';
html += '<div>';

View file

@ -42,7 +42,7 @@
html += '<button type="button" is="emby-button" class="fab mini autoSize blue" item-icon><i class="md-icon">live_tv</i></button>';
html += '<div class="listItemBody">';
html += '<div class="listItemBody three-line">';
html += '<a class="clearLink" href="livetvseriestimer.html?id=' + timer.Id + '">';
html += '<h3>';
html += timer.Name;

View file

@ -76,7 +76,7 @@
elem.innerHTML = html;
var listItems = [];
var elems = elem.querySelectorAll('PAPER-ICON-ITEM');
var elems = elem.querySelectorAll('.listItem');
for (var i = 0, length = elems.length; i < length; i++) {
listItems.push(elems[i]);
}

View file

@ -319,14 +319,16 @@ var Dashboard = {
var parentElem = footer.querySelector('#footerNotifications');
var elem = parentElem.querySelector('#' + options.id);
var notificationElementId = 'notification' + options.id;
if (!elem.length) {
parentElem.insertAdjacentHTML('beforeend', '<p id="' + options.id + '" class="footerNotification"></p>');
elem = parentElem.querySelector('#' + options.id);
var elem = parentElem.querySelector('#' + notificationElementId);
if (!elem) {
parentElem.insertAdjacentHTML('beforeend', '<p id="' + notificationElementId + '" class="footerNotification"></p>');
elem = parentElem.querySelector('#' + notificationElementId);
}
var onclick = removeOnHide ? "jQuery(\"#" + options.id + "\").trigger(\"notification.remove\").remove();" : "jQuery(\"#" + options.id + "\").trigger(\"notification.hide\").hide();";
var onclick = removeOnHide ? "jQuery('#" + notificationElementId + "').trigger('notification.remove').remove();" : "jQuery('#" + notificationElementId + "').trigger('notification.hide').hide();";
if (options.allowHide !== false) {
options.html += '<span style="margin-left: 1em;"><button is="emby-button" type="button" class="submit" onclick="' + onclick + '">' + Globalize.translate('ButtonHide') + "</button></span>";