replace channel tabs
This commit is contained in:
parent
bfb177618f
commit
a5579327cc
12 changed files with 146 additions and 81 deletions
|
@ -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));
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue