From 3c4bc228a1f7b5731cf464f3f407c9ed9ace3cd2 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Fri, 3 Apr 2020 10:00:06 +0200 Subject: treewide: import utility classes explicitly Signed-off-by: Jo-Philipp Wich --- .../htdocs/luci-static/resources/view/status/include/80_upnp.js | 6 ++++-- .../luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js | 9 ++++++--- 2 files changed, 10 insertions(+), 5 deletions(-) (limited to 'applications/luci-app-upnp/htdocs/luci-static/resources') diff --git a/applications/luci-app-upnp/htdocs/luci-static/resources/view/status/include/80_upnp.js b/applications/luci-app-upnp/htdocs/luci-static/resources/view/status/include/80_upnp.js index b1a2531c86..608929c700 100644 --- a/applications/luci-app-upnp/htdocs/luci-static/resources/view/status/include/80_upnp.js +++ b/applications/luci-app-upnp/htdocs/luci-static/resources/view/status/include/80_upnp.js @@ -1,4 +1,6 @@ 'use strict'; +'require baseclass'; +'require dom'; 'require rpc'; 'require uci'; @@ -18,14 +20,14 @@ callUpnpDeleteRule = rpc.declare({ }); handleDelRule = function(num, ev) { - L.dom.parent(ev.currentTarget, '.tr').style.opacity = 0.5; + dom.parent(ev.currentTarget, '.tr').style.opacity = 0.5; ev.currentTarget.classList.add('spinning'); ev.currentTarget.disabled = true; ev.currentTarget.blur(); callUpnpDeleteRule(num); }; -return L.Class.extend({ +return baseclass.extend({ title: _('Active UPnP Redirects'), load: function() { diff --git a/applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js b/applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js index cfd1e3508a..095078a4e2 100644 --- a/applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js +++ b/applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js @@ -1,4 +1,7 @@ 'use strict'; +'require view'; +'require dom'; +'require poll'; 'require uci'; 'require rpc'; 'require form'; @@ -26,14 +29,14 @@ callUpnpDeleteRule = rpc.declare({ }); handleDelRule = function(num, ev) { - L.dom.parent(ev.currentTarget, '.tr').style.opacity = 0.5; + dom.parent(ev.currentTarget, '.tr').style.opacity = 0.5; ev.currentTarget.classList.add('spinning'); ev.currentTarget.disabled = true; ev.currentTarget.blur(); callUpnpDeleteRule(num); }; -return L.view.extend({ +return view.extend({ load: function() { return Promise.all([ callUpnpGetStatus(), @@ -190,7 +193,7 @@ return L.view.extend({ o.value('deny') return m.render().then(L.bind(function(m, nodes) { - L.Poll.add(L.bind(function() { + poll.add(L.bind(function() { return Promise.all([ callUpnpGetStatus() ]).then(L.bind(this.poll_status, this, nodes)); -- cgit v1.2.3