diff options
| author | LukePulverenti <luke.pulverenti@gmail.com> | 2013-03-06 01:22:19 -0500 |
|---|---|---|
| committer | LukePulverenti <luke.pulverenti@gmail.com> | 2013-03-06 01:22:19 -0500 |
| commit | 33192cfc2433b768f247b19ebdf4300a7ea57d6b (patch) | |
| tree | 912bbcc99f1fbd8412f2422fdd0c5b35ac038099 /MediaBrowser.WebDashboard/Html/scripts/site.js | |
| parent | d02263591f2a2b6f66425f706f243094dbaea722 (diff) | |
some very basic folder browsing
Diffstat (limited to 'MediaBrowser.WebDashboard/Html/scripts/site.js')
| -rw-r--r-- | MediaBrowser.WebDashboard/Html/scripts/site.js | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/MediaBrowser.WebDashboard/Html/scripts/site.js b/MediaBrowser.WebDashboard/Html/scripts/site.js index 1f3c301af..94e3390d3 100644 --- a/MediaBrowser.WebDashboard/Html/scripts/site.js +++ b/MediaBrowser.WebDashboard/Html/scripts/site.js @@ -414,9 +414,13 @@ var Dashboard = { var hasPrimaryImage = item.ImageTags && item.ImageTags.Primary;
- var href = item.IsFolder ? "#" : "itemDetails.html?id=" + item.Id;
+ var href = item.IsFolder ? (item.Id ? "itemList.html?parentId=" + item.Id : "#") : "itemDetails.html?id=" + item.Id;
- html += "<div class='posterViewItem'><a href='" + href + "'>";
+ var showText = options.showTitle || !hasPrimaryImage || (item.Type !== 'Movie' && item.Type !== 'Series' && item.Type !== 'Season' && item.Type !== 'Trailer');
+
+ var cssClass = showText ? "posterViewItem" : "posterViewItem posterViewItemWithNoText";
+
+ html += "<div class='" + cssClass + "'><a href='" + href + "'>";
if (options.preferBackdrop && item.BackdropImageTags && item.BackdropImageTags.length) {
html += "<img src='" + ApiClient.getImageUrl(item.Id, {
@@ -443,10 +447,10 @@ var Dashboard = { html += "<img style='background:" + Dashboard.getRandomMetroColor() + ";' src='css/images/defaultCollectionImage.png' />";
}
- if (options.showTitle || !hasPrimaryImage || (item.Type !== 'Movie' && item.Type !== 'Series' && item.Type !== 'Season')) {
+ if (showText) {
html += "<div class='posterViewItemText'>";
- html += "<div>" + item.Name + "</div>";
- html += "</div>"
+ html += item.Name;
+ html += "</div>";
}
html += "</a></div>";
|
