var id = $(this).data("id");
if (id != null) {
getFolderItems(Number(id), gMediaType);
+
}
return false;
});
gMediaFolders = folders;
showFolderList(storageType);
+ /*
+ * refresh view when looking at external items
+ * while external storage is detaching
+ */
+ if($.mobile.activePage.attr("id") == "items") {
+ showItemList();
+ }
}
function onGetFoldersError(err) {
function showFolderList(storageType) {
setLastStorage(storageType);
-
if(gFlagInit == false){
getFolders(storageType);
}
str += makeListItem(i, gMediaItems[i].title,
gMediaItems[i].type + " Rating: " + gMediaItems[i].rating);
}
-
$("#items-list > li[data-id]").remove();
$("#items-list").append(str).trigger("create").listview("refresh");
} catch (exc) {
gMediaType = gStorageType = "ALL";
+ getFolders(gStorageType);
$("#folder-list li").removeClass("storagetypeHighlight");
$("#folder-type-all").addClass("storagetypeHighlight");
$.mobile.changePage("#main");