alpha picker for collections

This commit is contained in:
Luke Pulverenti 2013-06-04 21:41:59 -04:00
parent 015150be5a
commit 6915c52297
2 changed files with 19 additions and 0 deletions

View File

@ -5,6 +5,8 @@
</head>
<body>
<div id="itemListPage" data-role="page" class="page libraryPage folderListPage" data-theme="a">
<div class="alphabetPicker">
</div>
<div data-role="content" class="itemListContent">
<h1 class="listHeader" style="margin: 0; text-align: center;"><span id="itemName"></span>

View File

@ -149,6 +149,20 @@
Dashboard.navigate("edititemmetadata.html?id=" + currentItem.Id);
});
$('.alphabetPicker', this).on('alphaselect', function (e, character) {
query.NameStartsWithOrGreater = character;
query.StartIndex = 0;
reloadItems(page);
}).on('alphaclear', function (e) {
query.NameStartsWithOrGreater = '';
reloadItems(page);
});
}).on('pageshow', "#itemListPage", function () {
query.Limit = LibraryBrowser.getDefaultPageSize();
@ -157,6 +171,7 @@
query.SortBy = "SortName";
query.SortOrder = "Ascending";
query.StartIndex = 0;
query.NameStartsWithOrGreater = '';
reloadItems(this);
@ -184,6 +199,8 @@
$('#selectView', this).val(view).selectmenu('refresh');
$('.alphabetPicker', this).alphaValue(query.NameStartsWithOrGreater);
}).on('pagehide', "#itemListPage", function () {
currentItem = null;