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

update dynamic images

This commit is contained in:
Luke Pulverenti 2015-06-27 23:29:50 -04:00
parent 11c5d8562d
commit 8c2b65740f
17 changed files with 153 additions and 149 deletions

View file

@ -1,48 +0,0 @@
(function ($, document) {
function loadSections(page, user) {
var userId = user.Id;
var i, length;
var sectionCount = 3;
var elem = $('.sections', page);
if (!elem.html().length) {
var html = '';
for (i = 0, length = sectionCount; i < length; i++) {
html += '<div class="homePageSection section' + i + '"></div>';
}
elem.html(html);
}
var context = 'home-latest';
var latestMediElem = $('.section0', page);
Dashboard.showLoadingMsg();
var promises = [];
promises.push(Sections.loadRecentlyAdded(latestMediElem, user, context));
promises.push(Sections.loadLatestLiveTvRecordings($(".section1", page), userId));
promises.push(Sections.loadLatestChannelItems($(".section2", page), userId));
$.when(promises).done(function() {
Dashboard.hideLoadingMsg();
});
}
$(document).on('pagebeforeshowready', "#homeLatestPage", function () {
var page = this;
Dashboard.getCurrentUser().done(function (user) {
loadSections(page, user);
});
});
})(jQuery, document);

View file

@ -223,12 +223,10 @@
else if (context == 'home-latest') {
elem = $('.homeTabs', page).show();
$('a', elem).removeClass('ui-btn-active');
$('.lnkHomeLatest', page).addClass('ui-btn-active');
}
else if (context == 'photos' || context == 'photos-photos') {
elem = $('.photoTabs', page).show();
$('a', elem).removeClass('ui-btn-active');
$('.lnkHomeLatest', page).addClass('ui-btn-active');
if (context == 'photos-photos') {
$('.lnkPhotos', page).addClass('ui-btn-active');

View file

@ -1147,7 +1147,7 @@
$('<div class="playedIndicator"></div>').insertAfter($('.cardOverlayTarget', card));
}
$('.playedIndicator', card).html('<i class="fa fa-check"></i>');
$('.playedIndicator', card).html('<i class="material-icons">check</i>');
$('.cardProgress', card).remove();
}
else if (userData.UnplayedItemCount) {

View file

@ -213,8 +213,7 @@
}
function closeMainDrawer() {
var drawerPanel = $('.mainDrawerPanel')[0];
drawerPanel.closeDrawer();
document.getElementsByClassName('mainDrawerPanel')[0].closeDrawer();
}
function ensureDrawerStructure(drawer) {
@ -281,14 +280,16 @@
html += '<div style="margin-top:5px;"></div>';
html += '<a class="lnkMediaFolder sidebarLink" href="' + homeHref + '" onclick="return LibraryMenu.onLinkClicked(this);">';
html += '<div class="lazy" data-src="css/images/mblogoicon.png" style="width:' + 28 + 'px;height:' + 28 + 'px;background-size:contain;background-repeat:no-repeat;background-position:center center;border-radius:1000px;vertical-align:middle;margin:0 1.6em 0 1.5em;display:inline-block;"></div>';
html += '<div style="background-image:url(\'css/images/mblogoicon.png\');width:' + 28 + 'px;height:' + 28 + 'px;background-size:contain;background-repeat:no-repeat;background-position:center center;border-radius:1000px;vertical-align:middle;margin:0 1.6em 0 1.5em;display:inline-block;"></div>';
html += Globalize.translate('ButtonHome');
html += '</a>';
}
html += '<a class="sidebarLink lnkMediaFolder" data-itemid="remote" href="nowplaying.html" onclick="return LibraryMenu.onLinkClicked(this);"><iron-icon icon="tablet-android" class="sidebarLinkIcon" style="color:#673AB7;"></iron-icon><span class="sidebarLinkText">' + Globalize.translate('ButtonRemote') + '</span></a>';
$('.userheader', drawer).html(html).lazyChildren();
var elem = $('.userheader', drawer).html(html);
$('.lazy', elem).fillImages();
}
function refreshLibraryInfoInDrawer(user, drawer) {
@ -514,11 +515,13 @@
// There doesn't seem to be a way to detect if the drawer is in the process of opening, so try to handle that here
if ((new Date().getTime() - lastOpenTime) > 200) {
closeMainDrawer();
setTimeout(function () {
Dashboard.navigate(link.href);
}, 300);
closeMainDrawer();
setTimeout(function () {
Dashboard.navigate(link.href);
}, 350);
}, 50);
}
return false;
@ -532,7 +535,7 @@
setTimeout(function () {
Dashboard.logout();
}, 300);
}, 350);
}
return false;

View file

@ -742,7 +742,7 @@ var Dashboard = {
url += "&width=" + (imgWidth * Math.max(window.devicePixelRatio || 1, 2));
}
html += '<div class="lazy" data-src="' + url + '" style="width:' + imgWidth + 'px;height:' + imgWidth + 'px;background-size:contain;background-repeat:no-repeat;background-position:center center;border-radius:1000px;vertical-align:middle;margin-right:.8em;display:inline-block;"></div>';
html += '<div style="background-image:url(\'' + url + '\');width:' + imgWidth + 'px;height:' + imgWidth + 'px;background-size:contain;background-repeat:no-repeat;background-position:center center;border-radius:1000px;vertical-align:middle;margin-right:.8em;display:inline-block;"></div>';
}
html += user.name;