rework a-z picker a little

This commit is contained in:
Luke Pulverenti 2013-05-16 23:24:41 -04:00
parent 9bcadf03cd
commit ba24058f75
12 changed files with 38 additions and 24 deletions

View File

@ -99,6 +99,7 @@
<span class="itemCommunityRating"></span> <span class="itemCommunityRating"></span>
<span class="userDataIcons" style="margin-left: 2em;"></span> <span class="userDataIcons" style="margin-left: 2em;"></span>
</p> </p>
<p id="artist"></p>
<p class="itemGenres"></p> <p class="itemGenres"></p>
<p id="itemTagline" style="font-style: italic;"></p> <p id="itemTagline" style="font-style: italic;"></p>
<p class="itemOverview"></p> <p class="itemOverview"></p>
@ -129,6 +130,7 @@
<div class="detailSectionContent" style="padding: 0 1em;"> <div class="detailSectionContent" style="padding: 0 1em;">
<div id="mediaInfoContent"></div> <div id="mediaInfoContent"></div>
<p id="players"></p>
<p id="seriesAirTime"></p> <p id="seriesAirTime"></p>
<p id="itemPremiereDate"></p> <p id="itemPremiereDate"></p>
<p id="itemBudget"></p> <p id="itemBudget"></p>

View File

@ -231,6 +231,18 @@
renderSeriesAirTime(page, item, context); renderSeriesAirTime(page, item, context);
renderSimiliarItems(page, item); renderSimiliarItems(page, item);
if (item.Players) {
$('#players', page).show().html(item.Players + ' Player');
} else {
$('#players', page).hide();
}
if (item.Type == "Audio" && item.Artists && item.Artists.length) {
$('#artist', page).show().html('Artist:&nbsp;&nbsp;<a class="textlink" href="itembynamedetails.html?context=music&artist=' + ApiClient.encodeName(item.Artists[0]) + '">' + item.Artists[0] + '</a>').trigger('create');
} else {
$('#artist', page).hide();
}
} }
function renderSimiliarItems(page, item) { function renderSimiliarItems(page, item) {

View File

@ -113,13 +113,13 @@
$('.alphabetPicker', this).on('alphaselect', function (e, character) { $('.alphabetPicker', this).on('alphaselect', function (e, character) {
query.NameStartsWith = character; query.NameStartsWithOrGreater = character;
reloadItems(page); reloadItems(page);
}).on('alphaclear', function (e) { }).on('alphaclear', function (e) {
query.NameStartsWith = ''; query.NameStartsWithOrGreater = '';
reloadItems(page); reloadItems(page);
}); });
@ -164,7 +164,7 @@
$('#chkThemeSong', this).checked(query.HasThemeSong == true).checkboxradio('refresh'); $('#chkThemeSong', this).checked(query.HasThemeSong == true).checkboxradio('refresh');
$('#chkThemeVideo', this).checked(query.HasThemeVideo == true).checkboxradio('refresh'); $('#chkThemeVideo', this).checked(query.HasThemeVideo == true).checkboxradio('refresh');
$('.alphabetPicker', this).alphaValue(query.NameStartsWith); $('.alphabetPicker', this).alphaValue(query.NameStartsWithOrGreater);
}); });
})(jQuery, document); })(jQuery, document);

View File

@ -154,13 +154,13 @@
$('.alphabetPicker', this).on('alphaselect', function (e, character) { $('.alphabetPicker', this).on('alphaselect', function (e, character) {
query.NameStartsWith = character; query.NameStartsWithOrGreater = character;
reloadItems(page); reloadItems(page);
}).on('alphaclear', function (e) { }).on('alphaclear', function (e) {
query.NameStartsWith = ''; query.NameStartsWithOrGreater = '';
reloadItems(page); reloadItems(page);
}); });

View File

@ -275,7 +275,7 @@
if (options.showArtist) { if (options.showArtist) {
if (item.Artists && item.Artists.length) { if (item.Artists && item.Artists.length && item.Artists[0]) {
var artist = item.Artists[0]; var artist = item.Artists[0];

View File

@ -110,13 +110,13 @@
$('.alphabetPicker', this).on('alphaselect', function (e, character) { $('.alphabetPicker', this).on('alphaselect', function (e, character) {
query.NameStartsWith = character; query.NameStartsWithOrGreater = character;
reloadItems(page); reloadItems(page);
}).on('alphaclear', function (e) { }).on('alphaclear', function (e) {
query.NameStartsWith = ''; query.NameStartsWithOrGreater = '';
reloadItems(page); reloadItems(page);
}); });
@ -157,7 +157,7 @@
}).checkboxradio('refresh'); }).checkboxradio('refresh');
$('.alphabetPicker', this).alphaValue(query.NameStartsWith); $('.alphabetPicker', this).alphaValue(query.NameStartsWithOrGreater);
}); });
})(jQuery, document); })(jQuery, document);

View File

@ -196,13 +196,13 @@
$('.alphabetPicker', this).on('alphaselect', function (e, character) { $('.alphabetPicker', this).on('alphaselect', function (e, character) {
query.NameStartsWith = character; query.NameStartsWithOrGreater = character;
reloadItems(page); reloadItems(page);
}).on('alphaclear', function (e) { }).on('alphaclear', function (e) {
query.NameStartsWith = ''; query.NameStartsWithOrGreater = '';
reloadItems(page); reloadItems(page);
}); });
@ -262,7 +262,7 @@
$('#chkThemeSong', this).checked(query.HasThemeSong == true).checkboxradio('refresh'); $('#chkThemeSong', this).checked(query.HasThemeSong == true).checkboxradio('refresh');
$('#chkThemeVideo', this).checked(query.HasThemeVideo == true).checkboxradio('refresh'); $('#chkThemeVideo', this).checked(query.HasThemeVideo == true).checkboxradio('refresh');
$('.alphabetPicker', this).alphaValue(query.NameStartsWith); $('.alphabetPicker', this).alphaValue(query.NameStartsWithOrGreater);
}); });

View File

@ -108,13 +108,13 @@
$('.alphabetPicker', this).on('alphaselect', function (e, character) { $('.alphabetPicker', this).on('alphaselect', function (e, character) {
query.NameStartsWith = character; query.NameStartsWithOrGreater = character;
reloadItems(page); reloadItems(page);
}).on('alphaclear', function (e) { }).on('alphaclear', function (e) {
query.NameStartsWith = ''; query.NameStartsWithOrGreater = '';
reloadItems(page); reloadItems(page);
}); });

View File

@ -120,13 +120,13 @@
$('.alphabetPicker', this).on('alphaselect', function (e, character) { $('.alphabetPicker', this).on('alphaselect', function (e, character) {
query.NameStartsWith = character; query.NameStartsWithOrGreater = character;
reloadItems(page); reloadItems(page);
}).on('alphaclear', function (e) { }).on('alphaclear', function (e) {
query.NameStartsWith = ''; query.NameStartsWithOrGreater = '';
reloadItems(page); reloadItems(page);
}); });

View File

@ -100,13 +100,13 @@
$('.alphabetPicker', this).on('alphaselect', function (e, character) { $('.alphabetPicker', this).on('alphaselect', function (e, character) {
query.NameStartsWith = character; query.NameStartsWithOrGreater = character;
reloadItems(page); reloadItems(page);
}).on('alphaclear', function (e) { }).on('alphaclear', function (e) {
query.NameStartsWith = ''; query.NameStartsWithOrGreater = '';
reloadItems(page); reloadItems(page);
}); });
@ -140,7 +140,7 @@
$('#chkIsOnTour', this).checked(query.IsOnTour === true).checkboxradio('refresh'); $('#chkIsOnTour', this).checked(query.IsOnTour === true).checkboxradio('refresh');
$('.alphabetPicker', this).alphaValue(query.NameStartsWith); $('.alphabetPicker', this).alphaValue(query.NameStartsWithOrGreater);
}); });
})(jQuery, document); })(jQuery, document);

View File

@ -110,13 +110,13 @@
$('.alphabetPicker', this).on('alphaselect', function (e, character) { $('.alphabetPicker', this).on('alphaselect', function (e, character) {
query.NameStartsWith = character; query.NameStartsWithOrGreater = character;
reloadItems(page); reloadItems(page);
}).on('alphaclear', function (e) { }).on('alphaclear', function (e) {
query.NameStartsWith = ''; query.NameStartsWithOrGreater = '';
reloadItems(page); reloadItems(page);
}); });
@ -166,7 +166,7 @@
}).checkboxradio('refresh'); }).checkboxradio('refresh');
$('.alphabetPicker', this).alphaValue(query.NameStartsWith); $('.alphabetPicker', this).alphaValue(query.NameStartsWithOrGreater);
}); });
})(jQuery, document); })(jQuery, document);

View File

@ -181,13 +181,13 @@
$('.alphabetPicker', this).on('alphaselect', function (e, character) { $('.alphabetPicker', this).on('alphaselect', function (e, character) {
query.NameStartsWith = character; query.NameStartsWithOrGreater = character;
reloadItems(page); reloadItems(page);
}).on('alphaclear', function (e) { }).on('alphaclear', function (e) {
query.NameStartsWith = ''; query.NameStartsWithOrGreater = '';
reloadItems(page); reloadItems(page);
}); });