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-08-05 15:34:10 -04:00
parent 5b72e1c91b
commit fad66be11a
23 changed files with 183 additions and 279 deletions

View file

@ -1,4 +1,4 @@
define(['jQuery'], function ($) {
define(['jQuery', 'listViewStyle'], function ($) {
function loadProfiles(page) {
@ -30,51 +30,48 @@
function renderProfiles(page, element, profiles) {
require(['paper-fab', 'paper-item-body', 'paper-icon-item'], function () {
var html = '';
var html = '';
if (profiles.length) {
html += '<div class="paperList">';
}
if (profiles.length) {
html += '<div class="paperList">';
for (var i = 0, length = profiles.length; i < length; i++) {
var profile = profiles[i];
html += '<div class="listItem">';
html += "<a item-icon class='clearLink listItemIconContainer' href='dlnaprofile.html?id=" + profile.Id + "'>";
html += '<i class="md-icon listItemIcon">dvr</i>';
html += "</a>";
html += '<div class="listItemBody">';
html += "<a class='clearLink' href='dlnaprofile.html?id=" + profile.Id + "'>";
html += "<div>" + profile.Name + "</div>";
//html += "<div secondary>" + task.Description + "</div>";
html += "</a>";
html += '</div>';
if (profile.Type == 'User') {
html += '<button type="button" is="paper-icon-button-light" class="btnDeleteProfile" data-profileid="' + profile.Id + '" title="' + Globalize.translate('ButtonDelete') + '"><i class="md-icon">delete</i></button>';
}
for (var i = 0, length = profiles.length; i < length; i++) {
html += '</div>';
}
var profile = profiles[i];
if (profiles.length) {
html += '</div>';
}
html += '<paper-icon-item>';
element.innerHTML = html;
html += "<a item-icon class='clearLink' href='dlnaprofile.html?id=" + profile.Id + "'>";
html += '<paper-fab mini icon="dvr" class="blue"></paper-fab>';
html += "</a>";
$('.btnDeleteProfile', element).on('click', function () {
html += '<paper-item-body two-line>';
html += "<a class='clearLink' href='dlnaprofile.html?id=" + profile.Id + "'>";
html += "<div>" + profile.Name + "</div>";
//html += "<div secondary>" + task.Description + "</div>";
html += "</a>";
html += '</paper-item-body>';
if (profile.Type == 'User') {
html += '<button type="button" is="paper-icon-button-light" class="btnDeleteProfile" data-profileid="' + profile.Id + '" title="' + Globalize.translate('ButtonDelete') + '"><iron-icon icon="delete"></iron-icon></button>';
}
html += '</paper-icon-item>';
}
if (profiles.length) {
html += '</div>';
}
element.innerHTML = html;
$('.btnDeleteProfile', element).on('click', function () {
var id = this.getAttribute('data-profileid');
deleteProfile(page, id);
});
var id = this.getAttribute('data-profileid');
deleteProfile(page, id);
});
}