summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-app-ddns/luasrc/view
diff options
context:
space:
mode:
authorChristian Schoenebeck <christian.schoenebeck@gmail.com>2015-01-18 19:22:54 +0100
committerChristian Schoenebeck <christian.schoenebeck@gmail.com>2015-01-18 19:22:54 +0100
commit819a733df3c9e93619dbad1159f67de70d406da7 (patch)
treef73dc2f21f5ca0a71c01f68cdbbe192380cac0d3 /applications/luci-app-ddns/luasrc/view
parent52ecc90b3129c72a856c3d16534276ab7e192179 (diff)
luci-app-ddns: Update to version 2.1.1-0
- adaption Makefile to changed luci.mk - description in Makefile for correct version handling - modified handling to detect and display installed version - new functions ipkg_ver_installed() and ipkg_ver_compare - correct wrong spellings - modified language template and German translation Signed-off-by: Christian Schoenebeck <christian.schoenebeck@gmail.com>
Diffstat (limited to 'applications/luci-app-ddns/luasrc/view')
-rw-r--r--applications/luci-app-ddns/luasrc/view/ddns/detail_lvalue.htm2
-rw-r--r--applications/luci-app-ddns/luasrc/view/ddns/detail_value.htm2
-rw-r--r--applications/luci-app-ddns/luasrc/view/ddns/overview_startstop.htm2
-rw-r--r--applications/luci-app-ddns/luasrc/view/ddns/overview_status.htm36
-rw-r--r--applications/luci-app-ddns/luasrc/view/ddns/system_status.htm7
5 files changed, 12 insertions, 37 deletions
diff --git a/applications/luci-app-ddns/luasrc/view/ddns/detail_lvalue.htm b/applications/luci-app-ddns/luasrc/view/ddns/detail_lvalue.htm
index d516837b2b..0bcfd44283 100644
--- a/applications/luci-app-ddns/luasrc/view/ddns/detail_lvalue.htm
+++ b/applications/luci-app-ddns/luasrc/view/ddns/detail_lvalue.htm
@@ -1,6 +1,6 @@
<!-- ++ BEGIN ++ Dynamic DNS ++ detail_lvalue.htm ++ -->
-<!-- no value header to supress next line -->
+<!-- no value header to suppress next line -->
&#160;
<% if self.widget == "select" then %>
<select class="cbi-input-select" onchange="cbi_d_update(this.id)"<%= attr("id", cbid) .. attr("name", cbid) .. ifattr(self.size, "size") %>>
diff --git a/applications/luci-app-ddns/luasrc/view/ddns/detail_value.htm b/applications/luci-app-ddns/luasrc/view/ddns/detail_value.htm
index 7cb28e282e..cbe76abc6e 100644
--- a/applications/luci-app-ddns/luasrc/view/ddns/detail_value.htm
+++ b/applications/luci-app-ddns/luasrc/view/ddns/detail_value.htm
@@ -5,5 +5,5 @@
attr("name", cbid) .. attr("id", cbid) .. attr("value", self:cfgvalue(section) or self.default) ..
ifattr(self.size, "size") .. ifattr(self.placeholder, "placeholder")
%> />
-<!-- no value footer to supress next line -->
+<!-- no value footer to suppress next line -->
<!-- ++ END ++ Dynamic DNS ++ detail_value.htm ++ -->
diff --git a/applications/luci-app-ddns/luasrc/view/ddns/overview_startstop.htm b/applications/luci-app-ddns/luasrc/view/ddns/overview_startstop.htm
index 8255aa63f3..327028cbea 100644
--- a/applications/luci-app-ddns/luasrc/view/ddns/overview_startstop.htm
+++ b/applications/luci-app-ddns/luasrc/view/ddns/overview_startstop.htm
@@ -6,7 +6,7 @@
-- We need to garantie that function cfgvalue run first to set missing parameters
%>
<!-- style="font-size: 100%;" needed for openwrt theme to fix font size -->
- <!-- type="button" onclick="..." enable standard onclick functionalty -->
+ <!-- type="button" onclick="..." enable standard onclick functionality -->
<input class="cbi-button cbi-input-<%=self.inputstyle or "button" %>" style="font-size: 100%;" type="button" onclick="onclick_startstop(this.id)"
<%=
attr("name", section) .. attr("id", cbid) .. attr("value", self.inputtitle) .. ifattr(self.disabled, "disabled")
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 37c54be25f..6cca0e75d9 100644
--- a/applications/luci-app-ddns/luasrc/view/ddns/overview_status.htm
+++ b/applications/luci-app-ddns/luasrc/view/ddns/overview_status.htm
@@ -2,12 +2,6 @@
<!-- ++ BEGIN ++ Dynamic DNS ++ overview_status.htm ++ -->
<script type="text/javascript">//<![CDATA[
- // variables to store version information
- var luci_version
- var luci_build
- var ddns_version
- var ddns_required
-
// helper to extract section from objects id
// cbi.ddns.SECTION._xyz
function _id2section(id) {
@@ -19,13 +13,6 @@
// screen objects
// called by XHR.poll and onclick_startstop
function _data2elements(data) {
- // DDNS Service
- // fill Version informations
- luci_version = data[0].luci_ver
- luci_build = data[0].luci_build
- ddns_version = data[0].script_ver
- ddns_required = data[0].script_min
-
// Service sections
for( i = 1; i < data.length; i++ )
{
@@ -135,27 +122,13 @@
}
}
- // event handler for map.title link
- function onclick_maptitle() {
- var str = "<%:Version Information%>";
- str += "\n\nluci-app-ddns:";
- str += "\n\t<%:Version%>:\t" + luci_version;
- str += "\n\t<%:Build%>:\t" + luci_build;
- str += "\n\nddns-scripts <%:required%>:";
- str += "\n\t<%:Version%>:\t" + ddns_required + " <%:or greater%>";
- str += "\n\nddns-scripts <%:installed%>:";
- str += "\n\t<%:Version%>:\t" + ddns_version;
- str += "\n\n"
- alert(str);
- }
-
// event handler for start/stop button
function onclick_startstop(id) {
// extract section
var section = _id2section(id);
// get elements
var cbx = document.getElementById("cbid.ddns." + section + ".enabled"); // Enabled
- var obj = document.getElementById("cbi-ddns-overview-status-legend"); // objext defined below to make in-/visible
+ var obj = document.getElementById("cbi-ddns-overview-status-legend"); // object defined below to make in-/visible
if ( !(obj && cbx) ) { return; } // security check
// make me visible
@@ -165,7 +138,7 @@
var btnXHR = new XHR();
btnXHR.get('<%=luci.dispatcher.build_url("admin", "services", "ddns", "startstop")%>/' + section + '/' + cbx.checked, null,
function(x, data) {
- if (x.responseText == "_uncommited_") {
+ if (x.responseText == "_uncommitted_") {
// we need a trick to display Ampersand "&" in stead of "&#38;" or "&amp;"
// after translation
txt="<%:Please [Save & Apply] your changes first%>";
@@ -182,8 +155,9 @@
);
}
+ var ddns_ov_XHR = new XHR();
// force to immediate show status on page load (not waiting for XHR.poll)
- XHR.get('<%=luci.dispatcher.build_url("admin", "services", "ddns", "status")%>', null,
+ ddns_ov_XHR.get('<%=luci.dispatcher.build_url("admin", "services", "ddns", "status")%>', null,
function(x, data) {
_data2elements(data);
}
@@ -192,7 +166,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,
+ ddns_ov_XHR.poll(15, '<%=luci.dispatcher.build_url("admin", "services", "ddns", "status")%>', null,
function(x, 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 db9d1d1a01..7c60726e24 100644
--- a/applications/luci-app-ddns/luasrc/view/ddns/system_status.htm
+++ b/applications/luci-app-ddns/luasrc/view/ddns/system_status.htm
@@ -106,7 +106,7 @@
break;
}
- // monitored interfacce
+ // monitored interface
if (data[i].iface == "_nonet_")
tr.insertCell(-1).innerHTML = '<em><%:Config error%></em>';
else
@@ -125,14 +125,15 @@
}
}
+ var ddns_status_XHR = new XHR();
// force to immediate show status (not waiting for XHR.poll)
- XHR.get('<%=luci.dispatcher.build_url("admin", "services", "ddns", "status")%>', null,
+ ddns_status_XHR.get('<%=luci.dispatcher.build_url("admin", "services", "ddns", "status")%>', null,
function(x, data) {
_data2elements(x, data);
}
);
- XHR.poll(10, '<%=luci.dispatcher.build_url("admin", "services", "ddns", "status")%>', null,
+ ddns_status_XHR.poll(10, '<%=luci.dispatcher.build_url("admin", "services", "ddns", "status")%>', null,
function(x, data) {
_data2elements(x, data);
}