diff options
author | Jo-Philipp Wich <jo@mein.io> | 2020-04-03 10:00:06 +0200 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2020-04-03 10:00:06 +0200 |
commit | 3c4bc228a1f7b5731cf464f3f407c9ed9ace3cd2 (patch) | |
tree | d9ac0458c66dfa3c5d4922314df9d41499f578bc /applications/luci-app-upnp/htdocs/luci-static | |
parent | 1099aebdee29b8e5408688d0fd64d49e6ec4bd35 (diff) |
treewide: import utility classes explicitly
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'applications/luci-app-upnp/htdocs/luci-static')
-rw-r--r-- | applications/luci-app-upnp/htdocs/luci-static/resources/view/status/include/80_upnp.js | 6 | ||||
-rw-r--r-- | applications/luci-app-upnp/htdocs/luci-static/resources/view/upnp/upnp.js | 9 |
2 files changed, 10 insertions, 5 deletions
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)); |