Deminify part 2 (#509)

This de-minifies and de-uglifies `controllers` subdirectory
This commit is contained in:
grafixeyehero 2019-11-06 13:43:39 +03:00 committed by Vasily
parent f98a43f06f
commit 23677db990
66 changed files with 8296 additions and 4227 deletions

View file

@ -1,26 +1,30 @@
define(["events", "loading"], function(events, loading) {
define(["events", "loading"], function (events, loading) {
"use strict";
function onListingsSubmitted() {
Dashboard.navigate("livetvstatus.html")
Dashboard.navigate("livetvstatus.html");
}
function init(page, type, providerId) {
var url = "components/tvproviders/" + type + ".js";
require([url], function(factory) {
require([url], function (factory) {
var instance = new factory(page, providerId, {});
events.on(instance, "submitted", onListingsSubmitted), instance.init()
})
events.on(instance, "submitted", onListingsSubmitted);
instance.init();
});
}
function loadTemplate(page, type, providerId) {
require(["text!./components/tvproviders/" + type + ".template.html"], function(html) {
page.querySelector(".providerTemplate").innerHTML = Globalize.translateDocument(html), init(page, type, providerId)
})
require(["text!./components/tvproviders/" + type + ".template.html"], function (html) {
page.querySelector(".providerTemplate").innerHTML = Globalize.translateDocument(html);
init(page, type, providerId);
});
}
pageIdOn("pageshow", "liveTvGuideProviderPage", function() {
pageIdOn("pageshow", "liveTvGuideProviderPage", function () {
loading.show();
var providerId = getParameterByName("id");
loadTemplate(this, getParameterByName("type"), providerId)
})
});
loadTemplate(this, getParameterByName("type"), providerId);
});
});