jellyfin-web/dashboard-ui/scripts/livetvguideprovider.js

1 line
869 B
JavaScript
Raw Normal View History

2017-01-27 20:16:59 -07:00
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)})});