mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
fix folders view
This commit is contained in:
parent
663564f766
commit
48029f4dc7
9 changed files with 49 additions and 22 deletions
|
@ -14,12 +14,12 @@
|
||||||
},
|
},
|
||||||
"devDependencies": {},
|
"devDependencies": {},
|
||||||
"ignore": [],
|
"ignore": [],
|
||||||
"version": "1.4.184",
|
"version": "1.4.185",
|
||||||
"_release": "1.4.184",
|
"_release": "1.4.185",
|
||||||
"_resolution": {
|
"_resolution": {
|
||||||
"type": "version",
|
"type": "version",
|
||||||
"tag": "1.4.184",
|
"tag": "1.4.185",
|
||||||
"commit": "78fbf509947ae091e7f023d11cd2cb1f7f902bf2"
|
"commit": "6654b9cfd6b703fd864f5e59004db1991a0d26be"
|
||||||
},
|
},
|
||||||
"_source": "https://github.com/MediaBrowser/emby-webcomponents.git",
|
"_source": "https://github.com/MediaBrowser/emby-webcomponents.git",
|
||||||
"_target": "^1.2.1",
|
"_target": "^1.2.1",
|
||||||
|
|
|
@ -1211,9 +1211,10 @@ define(['datetime', 'imageLoader', 'connectionManager', 'itemHelper', 'mediaInfo
|
||||||
var mediaTypeData = item.MediaType ? (' data-mediatype="' + item.MediaType + '"') : '';
|
var mediaTypeData = item.MediaType ? (' data-mediatype="' + item.MediaType + '"') : '';
|
||||||
var collectionTypeData = item.CollectionType ? (' data-collectiontype="' + item.CollectionType + '"') : '';
|
var collectionTypeData = item.CollectionType ? (' data-collectiontype="' + item.CollectionType + '"') : '';
|
||||||
var channelIdData = item.ChannelId ? (' data-channelid="' + item.ChannelId + '"') : '';
|
var channelIdData = item.ChannelId ? (' data-channelid="' + item.ChannelId + '"') : '';
|
||||||
|
var contextData = options.context ? (' data-context="' + options.context + '"') : '';
|
||||||
|
|
||||||
return '\
|
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 + '\
|
' + cardImageContainerOpen + innerCardFooter + cardImageContainerClose + cardContentClose + overlayButtons + cardScalableClose + outerCardFooter + cardBoxClose + '\
|
||||||
</' + tagName + '>';
|
</' + tagName + '>';
|
||||||
}
|
}
|
||||||
|
|
|
@ -251,7 +251,11 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.channelPrograms, .channelHeaderCell {
|
.channelPrograms, .channelHeaderCell {
|
||||||
height: 3.8em;
|
height: 4em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.channelPrograms-tv, .channelHeaderCell-tv {
|
||||||
|
height: 3.2em;
|
||||||
}
|
}
|
||||||
|
|
||||||
.channelTimeslotHeader {
|
.channelTimeslotHeader {
|
||||||
|
|
|
@ -294,7 +294,9 @@
|
||||||
return curr.ChannelId == channel.Id;
|
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++) {
|
for (var i = 0, length = programs.length; i < length; i++) {
|
||||||
|
|
||||||
|
@ -450,6 +452,10 @@
|
||||||
|
|
||||||
var cssClass = 'channelHeaderCell clearButton itemAction lazy';
|
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 + '">';
|
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';
|
cssClass = 'guideChannelNumber';
|
||||||
|
|
|
@ -522,17 +522,21 @@ define(['loading', 'viewManager', 'skinManager', 'pluginManager', 'backdrop', 'b
|
||||||
return show(pluginManager.mapRoute(skin, homeRoute));
|
return show(pluginManager.mapRoute(skin, homeRoute));
|
||||||
}
|
}
|
||||||
|
|
||||||
function showItem(item, serverId) {
|
function showItem(item, serverId, options) {
|
||||||
|
|
||||||
if (typeof (item) === 'string') {
|
if (typeof (item) === 'string') {
|
||||||
require(['connectionManager'], function (connectionManager) {
|
require(['connectionManager'], function (connectionManager) {
|
||||||
var apiClient = serverId ? connectionManager.getApiClient(serverId) : connectionManager.currentApiClient();
|
var apiClient = serverId ? connectionManager.getApiClient(serverId) : connectionManager.currentApiClient();
|
||||||
apiClient.getItem(apiClient.getCurrentUserId(), item).then(function (item) {
|
apiClient.getItem(apiClient.getCurrentUserId(), item).then(function (item) {
|
||||||
embyRouter.showItem(item);
|
embyRouter.showItem(item, options);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
skinManager.getCurrentSkin().showItem(item);
|
|
||||||
|
if (arguments.length == 2) {
|
||||||
|
options = arguments[1];
|
||||||
|
}
|
||||||
|
skinManager.getCurrentSkin().showItem(item, options);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
embyRouter.showItem(options);
|
embyRouter.showItem(item, options);
|
||||||
}
|
}
|
||||||
|
|
||||||
function getItem(button) {
|
function getItem(button) {
|
||||||
|
@ -210,7 +210,10 @@ define(['playbackManager', 'inputManager', 'connectionManager', 'embyRouter', 'g
|
||||||
var type = item.Type;
|
var type = item.Type;
|
||||||
|
|
||||||
if (action == 'link') {
|
if (action == 'link') {
|
||||||
showItem(item);
|
|
||||||
|
showItem(item, {
|
||||||
|
context: card.getAttribute('data-context')
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (action == 'instantmix') {
|
else if (action == 'instantmix') {
|
||||||
|
|
|
@ -32,14 +32,14 @@
|
||||||
"iron-component-page": "polymerElements/iron-component-page#^1.1.6"
|
"iron-component-page": "polymerElements/iron-component-page#^1.1.6"
|
||||||
},
|
},
|
||||||
"private": true,
|
"private": true,
|
||||||
"homepage": "https://github.com/Polymer/polymer",
|
"homepage": "https://github.com/polymer/polymer",
|
||||||
"_release": "1.6.1",
|
"_release": "1.6.1",
|
||||||
"_resolution": {
|
"_resolution": {
|
||||||
"type": "version",
|
"type": "version",
|
||||||
"tag": "v1.6.1",
|
"tag": "v1.6.1",
|
||||||
"commit": "1f197d9d7874b1e5808b2a5c26f34446a7d912fc"
|
"commit": "1f197d9d7874b1e5808b2a5c26f34446a7d912fc"
|
||||||
},
|
},
|
||||||
"_source": "git://github.com/Polymer/polymer.git",
|
"_source": "git://github.com/polymer/polymer.git",
|
||||||
"_target": "^1.1.0",
|
"_target": "^1.1.0",
|
||||||
"_originalSource": "Polymer/polymer"
|
"_originalSource": "polymer/polymer"
|
||||||
}
|
}
|
|
@ -109,7 +109,8 @@
|
||||||
shape: "auto",
|
shape: "auto",
|
||||||
centerText: true,
|
centerText: true,
|
||||||
lazy: true,
|
lazy: true,
|
||||||
coverImage: item.Type == 'PhotoAlbum'
|
coverImage: item.Type == 'PhotoAlbum',
|
||||||
|
context: 'folders'
|
||||||
};
|
};
|
||||||
|
|
||||||
if (viewStyle == "PosterCard") {
|
if (viewStyle == "PosterCard") {
|
||||||
|
|
|
@ -1625,14 +1625,22 @@ var AppInfo = {};
|
||||||
Dashboard.navigate('home.html?tab=3');
|
Dashboard.navigate('home.html?tab=3');
|
||||||
};
|
};
|
||||||
|
|
||||||
function showItem(item) {
|
function showItem(item, serverId, options) {
|
||||||
if (typeof (item) === 'string') {
|
if (typeof (item) === 'string') {
|
||||||
require(['connectionManager'], function (connectionManager) {
|
require(['connectionManager'], function (connectionManager) {
|
||||||
var apiClient = connectionManager.currentApiClient();
|
var apiClient = connectionManager.currentApiClient();
|
||||||
apiClient.getItem(apiClient.getCurrentUserId(), item).then(showItem);
|
apiClient.getItem(apiClient.getCurrentUserId(), item).then(function (item) {
|
||||||
|
embyRouter.showItem(item, options);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
} else {
|
} 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 });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue