2013-05-31 18:48:41 -07:00
|
|
|
|
(function ($, document) {
|
|
|
|
|
|
|
|
|
|
var currentItem;
|
|
|
|
|
|
|
|
|
|
function reload(page) {
|
|
|
|
|
|
|
|
|
|
Dashboard.showLoadingMsg();
|
|
|
|
|
|
2014-08-18 18:42:53 -07:00
|
|
|
|
ApiClient.getItem(Dashboard.getCurrentUserId(), getParameterByName('id')).done(function (item) {
|
2013-05-31 18:48:41 -07:00
|
|
|
|
|
|
|
|
|
currentItem = item;
|
|
|
|
|
|
|
|
|
|
LibraryBrowser.renderName(item, $('.itemName', page), true);
|
|
|
|
|
LibraryBrowser.renderParentName(item, $('.parentName', page));
|
|
|
|
|
|
|
|
|
|
$('#galleryContent', page).html(LibraryBrowser.getGalleryHtml(currentItem)).trigger('create');
|
|
|
|
|
|
|
|
|
|
Dashboard.hideLoadingMsg();
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$(document).on('pageshow', "#itemGalleryPage", function () {
|
|
|
|
|
|
|
|
|
|
var page = this;
|
|
|
|
|
|
|
|
|
|
reload(page);
|
|
|
|
|
|
|
|
|
|
}).on('pagehide', "#itemGalleryPage", function () {
|
|
|
|
|
|
|
|
|
|
var page = this;
|
|
|
|
|
|
|
|
|
|
currentItem = null;
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
})(jQuery, document);
|