From 281d2f617899a0c3a171a66c6a3a14e834aa000c Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Wed, 7 Oct 2015 19:07:36 +0200 Subject: 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 --- applications/luci-app-ddns/luasrc/view/ddns/detail_logview.htm | 2 +- applications/luci-app-ddns/luasrc/view/ddns/overview_status.htm | 6 +++--- applications/luci-app-ddns/luasrc/view/ddns/system_status.htm | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) (limited to 'applications/luci-app-ddns/luasrc') diff --git a/applications/luci-app-ddns/luasrc/view/ddns/detail_logview.htm b/applications/luci-app-ddns/luasrc/view/ddns/detail_logview.htm index 494b7435c..4dcb7bb6f 100644 --- a/applications/luci-app-ddns/luasrc/view/ddns/detail_logview.htm +++ b/applications/luci-app-ddns/luasrc/view/ddns/detail_logview.htm @@ -6,7 +6,7 @@ var txt = document.getElementById("cbid.ddns." + section + "._logview.txt"); // TextArea if ( !txt ) { return; } // security check - XHR.get('<%=luci.dispatcher.build_url("admin", "services", "ddns", "logview")%>/' + section, null, + XHR.get('<%=url('admin/services/ddns/logview')%>/' + section, null, function(x) { if (x.responseText == "_nodata_") txt.value = "<%:File not found or empty%>"; diff --git a/applications/luci-app-ddns/luasrc/view/ddns/overview_status.htm b/applications/luci-app-ddns/luasrc/view/ddns/overview_status.htm index ea8e4a1e3..546481222 100644 --- a/applications/luci-app-ddns/luasrc/view/ddns/overview_status.htm +++ b/applications/luci-app-ddns/luasrc/view/ddns/overview_status.htm @@ -136,7 +136,7 @@ // do start/stop var btnXHR = new XHR(); - btnXHR.get('<%=luci.dispatcher.build_url("admin", "services", "ddns", "startstop")%>/' + section + '/' + cbx.checked, null, + btnXHR.get('<%=url('admin/services/ddns/startstop')%>/' + section + '/' + cbx.checked, null, function(x, data) { if (x.responseText == "_uncommitted_") { // we need a trick to display Ampersand "&" in stead of "&" or "&" @@ -155,7 +155,7 @@ } // force to immediate show status on page load (not waiting for XHR.poll) - XHR.get('<%=luci.dispatcher.build_url("admin", "services", "ddns", "status")%>', null, + XHR.get('<%=url('admin/services/ddns/status')%>', null, function(x, data) { if (data) { _data2elements(data); } } @@ -164,7 +164,7 @@ // define only ONE XHR.poll in a page because if one is running it blocks the other one // optimum is to define on Map or Section Level from here you can reach all elements // we need update every 15 seconds only - XHR.poll(15, '<%=luci.dispatcher.build_url("admin", "services", "ddns", "status")%>', null, + XHR.poll(15, '<%=url('admin/services/ddns/status')%>', null, function(x, data) { if (data) { _data2elements(data); } } diff --git a/applications/luci-app-ddns/luasrc/view/ddns/system_status.htm b/applications/luci-app-ddns/luasrc/view/ddns/system_status.htm index 4ca0abb0e..06dca48a9 100644 --- a/applications/luci-app-ddns/luasrc/view/ddns/system_status.htm +++ b/applications/luci-app-ddns/luasrc/view/ddns/system_status.htm @@ -111,13 +111,13 @@ } // force to immediate show status (not waiting for XHR.poll) - XHR.get('<%=luci.dispatcher.build_url("admin", "services", "ddns", "status")%>', null, + XHR.get('<%=url('admin/services/ddns/status')%>', null, function(x, data) { if (data) { _data2elements(x, data); } } ); - XHR.poll(5, '<%=luci.dispatcher.build_url("admin", "services", "ddns", "status")%>', null, + XHR.poll(5, '<%=url('admin/services/ddns/status')%>', null, function(x, data) { if (data) { _data2elements(x, data); } } @@ -126,7 +126,7 @@ //]]>
- <%:Dynamic DNS%> + <%:Dynamic DNS%> -- cgit v1.2.3