replace channel tabs

This commit is contained in:
Luke Pulverenti 2015-07-18 14:07:03 -04:00
parent bfb177618f
commit a5579327cc
12 changed files with 146 additions and 81 deletions

View file

@ -2,12 +2,29 @@
function reloadItems(page) {
Sections.loadLatestChannelItems(page.querySelector('.items'), Dashboard.getCurrentUserId());
Sections.loadLatestChannelItems(page.querySelector('.latestItems'), Dashboard.getCurrentUserId());
}
$(document).on('pagebeforeshowready', "#channelsLatestPage", function () {
function loadTab(page, index) {
reloadItems(this);
switch (index) {
case 0:
reloadItems(page);
break;
default:
break;
}
}
$(document).on('pageinitdepends', "#channelsPage", function () {
var page = this;
var pages = page.querySelector('neon-animated-pages');
$(pages).on('tabchange', function () {
loadTab(page, parseInt(this.selected));
});
});