diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2015-10-07 19:07:36 +0200 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2015-10-07 19:07:36 +0200 |
commit | 281d2f617899a0c3a171a66c6a3a14e834aa000c (patch) | |
tree | 4b53f67e82b64bb506b3a219a29319b64d1c1ab2 /modules/luci-base/luasrc/view/cbi | |
parent | 49a2cb5ad11ccc0225fd3fa1de4b85a0618bbb99 (diff) |
Globally replace luci.dispatcher.build_url(...) with url(...) invocations
Also concat multiple string arguments into one while we're at it.
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
Diffstat (limited to 'modules/luci-base/luasrc/view/cbi')
-rw-r--r-- | modules/luci-base/luasrc/view/cbi/apply_xhr.htm | 4 | ||||
-rw-r--r-- | modules/luci-base/luasrc/view/cbi/browser.htm | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/modules/luci-base/luasrc/view/cbi/apply_xhr.htm b/modules/luci-base/luasrc/view/cbi/apply_xhr.htm index 6f63ba86be..daa57c1db7 100644 --- a/modules/luci-base/luasrc/view/cbi/apply_xhr.htm +++ b/modules/luci-base/luasrc/view/cbi/apply_xhr.htm @@ -4,10 +4,10 @@ <script type="text/javascript">//<![CDATA[ var apply_xhr = new XHR(); - apply_xhr.post('<%=luci.dispatcher.build_url("servicectl", "restart", table.concat(configs, ","))%>', { token: '<%=token%>' }, + apply_xhr.post('<%=url('servicectl/restart', table.concat(configs, ","))%>', { token: '<%=token%>' }, function() { var checkfinish = function() { - apply_xhr.get('<%=luci.dispatcher.build_url("servicectl", "status")%>', null, + apply_xhr.get('<%=url('servicectl/status')%>', null, function(x) { if( x.responseText == 'finish' ) { diff --git a/modules/luci-base/luasrc/view/cbi/browser.htm b/modules/luci-base/luasrc/view/cbi/browser.htm index e4a4077d55..a18120141d 100644 --- a/modules/luci-base/luasrc/view/cbi/browser.htm +++ b/modules/luci-base/luasrc/view/cbi/browser.htm @@ -2,6 +2,6 @@ <%+cbi/valueheader%> <input class="cbi-input-text" type="text"<%= attr("value", v) .. attr("name", cbid) .. attr("id", cbid) %> /> <script type="text/javascript"> -cbi_browser_init('<%=cbid%>', '<%=resource%>', '<%=luci.dispatcher.build_url("admin", "filebrowser")%>'<%=self.default_path and ", '"..self.default_path.."'"%>); +cbi_browser_init('<%=cbid%>', '<%=resource%>', '<%=url('admin/filebrowser')%>'<%=self.default_path and ", '"..self.default_path.."'"%>); </script> <%+cbi/valuefooter%> |