fix folders view

This commit is contained in:
Luke Pulverenti 2016-08-24 23:07:31 -04:00
parent 663564f766
commit 48029f4dc7
9 changed files with 49 additions and 22 deletions

View File

@ -14,12 +14,12 @@
},
"devDependencies": {},
"ignore": [],
"version": "1.4.184",
"_release": "1.4.184",
"version": "1.4.185",
"_release": "1.4.185",
"_resolution": {
"type": "version",
"tag": "1.4.184",
"commit": "78fbf509947ae091e7f023d11cd2cb1f7f902bf2"
"tag": "1.4.185",
"commit": "6654b9cfd6b703fd864f5e59004db1991a0d26be"
},
"_source": "https://github.com/MediaBrowser/emby-webcomponents.git",
"_target": "^1.2.1",

View File

@ -1211,9 +1211,10 @@ define(['datetime', 'imageLoader', 'connectionManager', 'itemHelper', 'mediaInfo
var mediaTypeData = item.MediaType ? (' data-mediatype="' + item.MediaType + '"') : '';
var collectionTypeData = item.CollectionType ? (' data-collectiontype="' + item.CollectionType + '"') : '';
var channelIdData = item.ChannelId ? (' data-channelid="' + item.ChannelId + '"') : '';
var contextData = options.context ? (' data-context="' + options.context + '"') : '';
return '\
<' + tagName + ' data-index="' + index + '"' + timerAttributes + actionAttribute + ' data-isfolder="' + (item.IsFolder || false) + '" data-serverid="' + (item.ServerId) + '" data-id="' + (item.Id || item.ItemId) + '" data-type="' + item.Type + '"' + mediaTypeData + collectionTypeData + channelIdData + positionTicksData + collectionIdData + playlistIdData + ' data-prefix="' + prefix + '" class="' + className + '"> \
<' + tagName + ' data-index="' + index + '"' + timerAttributes + actionAttribute + ' data-isfolder="' + (item.IsFolder || false) + '" data-serverid="' + (item.ServerId) + '" data-id="' + (item.Id || item.ItemId) + '" data-type="' + item.Type + '"' + mediaTypeData + collectionTypeData + channelIdData + positionTicksData + collectionIdData + playlistIdData + contextData + ' data-prefix="' + prefix + '" class="' + className + '"> \
' + cardImageContainerOpen + innerCardFooter + cardImageContainerClose + cardContentClose + overlayButtons + cardScalableClose + outerCardFooter + cardBoxClose + '\
</' + tagName + '>';
}

View File

@ -251,7 +251,11 @@
}
.channelPrograms, .channelHeaderCell {
height: 3.8em;
height: 4em;
}
.channelPrograms-tv, .channelHeaderCell-tv {
height: 3.2em;
}
.channelTimeslotHeader {

View File

@ -294,7 +294,9 @@
return curr.ChannelId == channel.Id;
});
html += '<div class="channelPrograms" data-channelid="' + channel.Id + '">';
var cssClass = layoutManager.tv ? 'channelPrograms channelPrograms-tv' : 'channelPrograms';
html += '<div class="' + cssClass + '" data-channelid="' + channel.Id + '">';
for (var i = 0, length = programs.length; i < length; i++) {
@ -450,6 +452,10 @@
var cssClass = 'channelHeaderCell clearButton itemAction lazy';
if (layoutManager.tv) {
cssClass += ' channelHeaderCell-tv';
}
html += '<button type="button" class="' + cssClass + '"' + dataSrc + ' data-action="link" data-isfolder="' + channel.IsFolder + '" data-id="' + channel.Id + '" data-serverid="' + channel.ServerId + '" data-type="' + channel.Type + '">';
cssClass = 'guideChannelNumber';

View File

@ -522,17 +522,21 @@ define(['loading', 'viewManager', 'skinManager', 'pluginManager', 'backdrop', 'b
return show(pluginManager.mapRoute(skin, homeRoute));
}
function showItem(item, serverId) {
function showItem(item, serverId, options) {
if (typeof (item) === 'string') {
require(['connectionManager'], function (connectionManager) {
var apiClient = serverId ? connectionManager.getApiClient(serverId) : connectionManager.currentApiClient();
apiClient.getItem(apiClient.getCurrentUserId(), item).then(function (item) {
embyRouter.showItem(item);
embyRouter.showItem(item, options);
});
});
} else {
skinManager.getCurrentSkin().showItem(item);
if (arguments.length == 2) {
options = arguments[1];
}
skinManager.getCurrentSkin().showItem(item, options);
}
}

View File

@ -79,15 +79,15 @@ define(['playbackManager', 'inputManager', 'connectionManager', 'embyRouter', 'g
});
}
function showItem(options) {
function showItem(item, options) {
if (options.Type == 'Photo') {
if (item.Type == 'Photo') {
showSlideshow(options.Id, options.ServerId);
showSlideshow(item.Id, item.ServerId);
return;
}
embyRouter.showItem(options);
embyRouter.showItem(item, options);
}
function getItem(button) {
@ -210,7 +210,10 @@ define(['playbackManager', 'inputManager', 'connectionManager', 'embyRouter', 'g
var type = item.Type;
if (action == 'link') {
showItem(item);
showItem(item, {
context: card.getAttribute('data-context')
});
}
else if (action == 'instantmix') {

View File

@ -32,14 +32,14 @@
"iron-component-page": "polymerElements/iron-component-page#^1.1.6"
},
"private": true,
"homepage": "https://github.com/Polymer/polymer",
"homepage": "https://github.com/polymer/polymer",
"_release": "1.6.1",
"_resolution": {
"type": "version",
"tag": "v1.6.1",
"commit": "1f197d9d7874b1e5808b2a5c26f34446a7d912fc"
},
"_source": "git://github.com/Polymer/polymer.git",
"_source": "git://github.com/polymer/polymer.git",
"_target": "^1.1.0",
"_originalSource": "Polymer/polymer"
"_originalSource": "polymer/polymer"
}

View File

@ -109,7 +109,8 @@
shape: "auto",
centerText: true,
lazy: true,
coverImage: item.Type == 'PhotoAlbum'
coverImage: item.Type == 'PhotoAlbum',
context: 'folders'
};
if (viewStyle == "PosterCard") {

View File

@ -1625,14 +1625,22 @@ var AppInfo = {};
Dashboard.navigate('home.html?tab=3');
};
function showItem(item) {
function showItem(item, serverId, options) {
if (typeof (item) === 'string') {
require(['connectionManager'], function (connectionManager) {
var apiClient = connectionManager.currentApiClient();
apiClient.getItem(apiClient.getCurrentUserId(), item).then(showItem);
apiClient.getItem(apiClient.getCurrentUserId(), item).then(function (item) {
embyRouter.showItem(item, options);
});
});
} else {
Emby.Page.show('/' + LibraryBrowser.getHref(item), { item: item });
if (arguments.length == 2) {
options = arguments[1];
}
var context = options ? options.context : null;
Emby.Page.show('/' + LibraryBrowser.getHref(item, context), { item: item });
}
}