lazy load scripts
This commit is contained in:
@@ -74,7 +74,7 @@
|
||||
$('#selectPageSize', page).val(query.Limit).selectmenu('refresh');
|
||||
}
|
||||
|
||||
$(document).on('pageinit', "#liveTvChannelsPage", function () {
|
||||
$(document).on('pageinitdepends', "#liveTvChannelsPage", function () {
|
||||
|
||||
var page = this;
|
||||
|
||||
@@ -109,7 +109,7 @@
|
||||
reloadItems(page);
|
||||
});
|
||||
|
||||
}).on('pageshow', "#liveTvChannelsPage", function () {
|
||||
}).on('pageshown', "#liveTvChannelsPage", function () {
|
||||
|
||||
// Can't use pagebeforeshow here or the loading popup won't center correctly
|
||||
var page = this;
|
||||
|
||||
@@ -102,7 +102,7 @@
|
||||
});
|
||||
}
|
||||
|
||||
$(document).on('pagebeforeshow', "#liveTvRecordingsPage", function () {
|
||||
$(document).on('pageshown', "#liveTvRecordingsPage", function () {
|
||||
|
||||
var page = this;
|
||||
|
||||
|
||||
@@ -116,7 +116,7 @@
|
||||
}).checkboxradio('refresh');
|
||||
}
|
||||
|
||||
$(document).on('pagebeforeshow', "#liveTvSeriesTimersPage", function () {
|
||||
$(document).on('pageshown', "#liveTvSeriesTimersPage", function () {
|
||||
|
||||
var page = this;
|
||||
|
||||
@@ -138,8 +138,6 @@
|
||||
reload(page);
|
||||
});
|
||||
|
||||
}).on('pageshow', "#liveTvSeriesTimersPage", function () {
|
||||
|
||||
updateFilterControls(this);
|
||||
});
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
(function ($, document) {
|
||||
|
||||
function reload(page) {
|
||||
|
||||
function loadRecommendedPrograms(page) {
|
||||
|
||||
Dashboard.showLoadingMsg();
|
||||
|
||||
ApiClient.getLiveTvRecommendedPrograms({
|
||||
@@ -25,7 +25,13 @@
|
||||
});
|
||||
|
||||
$('.activeProgramItems', page).html(html).lazyChildren();
|
||||
Dashboard.hideLoadingMsg();
|
||||
});
|
||||
}
|
||||
|
||||
function reload(page) {
|
||||
|
||||
loadRecommendedPrograms(page);
|
||||
|
||||
ApiClient.getLiveTvRecommendedPrograms({
|
||||
|
||||
@@ -98,7 +104,7 @@
|
||||
});
|
||||
}
|
||||
|
||||
$(document).on('pagebeforeshow', "#liveTvSuggestedPage", function () {
|
||||
$(document).on('pageshown', "#liveTvSuggestedPage", function () {
|
||||
|
||||
var page = this;
|
||||
|
||||
|
||||
@@ -107,7 +107,7 @@
|
||||
});
|
||||
}
|
||||
|
||||
$(document).on('pagebeforeshow', "#liveTvTimersPage", function () {
|
||||
$(document).on('pageshown', "#liveTvTimersPage", function () {
|
||||
|
||||
var page = this;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user