mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
minify resources
This commit is contained in:
parent
8a6884abef
commit
661eeac16e
201 changed files with 203 additions and 52376 deletions
|
@ -1,51 +1 @@
|
|||
define(['events'], function (events) {
|
||||
'use strict';
|
||||
|
||||
function onListingsSubmitted() {
|
||||
|
||||
Dashboard.navigate('livetvstatus.html');
|
||||
}
|
||||
|
||||
function init(page, type, providerId) {
|
||||
|
||||
var url = 'components/tvproviders/' + type + '.js';
|
||||
|
||||
require([url], function (factory) {
|
||||
|
||||
var instance = new factory(page, providerId, {
|
||||
});
|
||||
|
||||
events.on(instance, 'submitted', onListingsSubmitted);
|
||||
|
||||
instance.init();
|
||||
});
|
||||
}
|
||||
|
||||
function loadTemplate(page, type, providerId) {
|
||||
|
||||
var xhr = new XMLHttpRequest();
|
||||
xhr.open('GET', 'components/tvproviders/' + type + '.template.html', true);
|
||||
|
||||
xhr.onload = function (e) {
|
||||
|
||||
var html = this.response;
|
||||
var elem = page.querySelector('.providerTemplate');
|
||||
elem.innerHTML = Globalize.translateDocument(html);
|
||||
|
||||
init(page, type, providerId);
|
||||
}
|
||||
|
||||
xhr.send();
|
||||
}
|
||||
|
||||
pageIdOn('pageshow', "liveTvGuideProviderPage", function () {
|
||||
|
||||
Dashboard.showLoadingMsg();
|
||||
|
||||
var providerId = getParameterByName('id');
|
||||
var type = getParameterByName('type');
|
||||
var page = this;
|
||||
loadTemplate(page, type, providerId);
|
||||
});
|
||||
|
||||
});
|
||||
define(["events"],function(events){"use strict";function onListingsSubmitted(){Dashboard.navigate("livetvstatus.html")}function init(page,type,providerId){var url="components/tvproviders/"+type+".js";require([url],function(factory){var instance=new factory(page,providerId,{});events.on(instance,"submitted",onListingsSubmitted),instance.init()})}function loadTemplate(page,type,providerId){var xhr=new XMLHttpRequest;xhr.open("GET","components/tvproviders/"+type+".template.html",!0),xhr.onload=function(e){var html=this.response,elem=page.querySelector(".providerTemplate");elem.innerHTML=Globalize.translateDocument(html),init(page,type,providerId)},xhr.send()}pageIdOn("pageshow","liveTvGuideProviderPage",function(){Dashboard.showLoadingMsg();var providerId=getParameterByName("id"),type=getParameterByName("type"),page=this;loadTemplate(page,type,providerId)})});
|
Loading…
Add table
Add a link
Reference in a new issue