summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-ffwizard/luasrc/view
diff options
context:
space:
mode:
authorManuel Munz <freifunk@somakoma.de>2011-03-12 17:13:36 +0000
committerManuel Munz <freifunk@somakoma.de>2011-03-12 17:13:36 +0000
commit945076c895cce30a862c68bd32205b74f30098cd (patch)
treecc5e6d3620cae3e805bd303b71a3e1b49f256638 /applications/luci-ffwizard/luasrc/view
parent3b4450a58bbdd026306cc3778314998c08f6c753 (diff)
modules/freifunk: OSM in basics fixed thanks to Andreas Pittrich
Diffstat (limited to 'applications/luci-ffwizard/luasrc/view')
-rw-r--r--applications/luci-ffwizard/luasrc/view/cbi/osmll_value.htm116
1 files changed, 0 insertions, 116 deletions
diff --git a/applications/luci-ffwizard/luasrc/view/cbi/osmll_value.htm b/applications/luci-ffwizard/luasrc/view/cbi/osmll_value.htm
deleted file mode 100644
index 07bd7582b6..0000000000
--- a/applications/luci-ffwizard/luasrc/view/cbi/osmll_value.htm
+++ /dev/null
@@ -1,116 +0,0 @@
-<%#
-cc-by-sa Andreas Pittrich <andreas.pittrich@web.de>
-in behalf of the german pirate party (Piratenpartei)
-www.piratenpartei.de
-
-$Id$
-
--%>
-<%+cbi/valueheader%>
-<script type="text/javascript">
-function set_lat_lon() {
- var net
- var entry
- var lon
- var lat
- var zoom
- net = document.getElementById('cbid.ffwizward.1.net').value;
- if (!net){
- return
- }
-
- lon = document.getElementById('cbid.ffwizward.1.latlon.centerlon');
- lat = document.getElementById('cbid.ffwizward.1.latlon.centerlat');
- zoom = document.getElementById('cbid.ffwizward.1.latlon.zoom');
- if ( !lon.value || lon.value == '' || lon.value == 0 || lon.value == 10 ) {
- for ( var i = 0 ; true ; i++ ) {
- if (i == cbi_d.length) {
- break;
- }
- if (cbi_d[i].id == 'cbi-ffwizward-1-net_lon') {
- entry = cbi_d[i];
- for (var j=0; true; j++) {
- if ( entry.node.children[0].children[j] ){
- if ( entry.node.children[0].children[j].value == net ) {
- lon.value = entry.node.children[0].children[j].text;
- zoom.value = '14';
- break;
- }
- } else {
- break;
- }
- }
- break;
- }
- }
- }
- if ( !lat.value || lat.value == '' || lat.value == 0 || lat.value == 52 ) {
- for (var i=0; true; i++) {
- if (i == cbi_d.length) {
- break;
- }
- if (cbi_d[i].id == 'cbi-ffwizward-1-net_lat') {
- entry = cbi_d[i];
- for (var j=0; true; j++) {
- if ( entry.node.children[0].children[j] ){
- if ( entry.node.children[0].children[j].value == net ) {
- lat.value = entry.node.children[0].children[j].text;
- break;
- }
- } else {
- break;
- }
- }
- break;
- }
- }
- }
-}
-</script>
-
- <% if self:cfgvalue(section) ~= false then %>
- <% if self.latfield and self.lonfield then %>
- <input type="hidden" <%= attr("value", string.format('cbid.%s.%s.%s', self.config, section, self.latfield))..attr("id", cbid..".latfield")..attr("name", cbid..".latfield")%>/>
- <input type="hidden" <%= attr("value", string.format('cbid.%s.%s.%s', self.config, section, self.lonfield))..attr("id", cbid..".lonfield")..attr("name", cbid..".lonfield")%>/>
- <% end %>
- <input type="hidden" <%= attr("value", self.centerlat)..attr("id", cbid..".centerlat")..attr("name", cbid..".centerlat")%>/>
- <input type="hidden" <%= attr("value", self.centerlon)..attr("id", cbid..".centerlon")..attr("name", cbid..".centerlon")%>/>
- <input type="hidden" <%= attr("value", self.zoom)..attr("id", cbid..".zoom")..attr("name", cbid..".zoom")%>/>
- <% end %>
-
- <% if self.popup then %>
- <input class="cbi-input-button" type="button"<%= attr("name", cbid..".button")..attr("id", cbid..".button")..attr("value", self.displaytext)%>
- onclick="
- popup=window.open('/luci-static/resources/OSMLatLon.htm', '<%=cbid%>.window', 'innerWidth=<%=self.width%>, innerHeight=<%=self.height%>, location=no, menubar=no, scrollbars=no, status=no, toolbar=no');
- popup.focus();
- "
- />
- </div>
- <div>
- <% else %>
- <input class="cbi-input-button" type="button"<%= attr("name", cbid..".displayosm")..attr("id", cbid..".displayosm")..attr("value", self.displaytext)%>
- onclick="
- set_lat_lon();
- document.getElementById('<%=cbid..".hideosm"%>').style.display='inline';
- document.getElementById('<%=cbid..".displayosm"%>').style.display='none';
- for(var i = 0; Math.min(i, window.frames.length)!=window.frames.lengths; i++){
- if(frames[i].name=='<%=cbid..".iframe"%>'){
- document.getElementById('<%=cbid..".iframediv"%>').style.display='block';
- frames[i].location.href='/luci-static/resources/OSMLatLon.htm';
- }
- }
- "
- />
- <input class="cbi-input-button" style="display:none" type="button"<%= attr("name", cbid..".hideosm")..attr("id", cbid..".hideosm")..attr("value", self.hidetext)%>
- onclick="
- document.getElementById('<%=cbid..".displayosm"%>').style.display='inline';
- document.getElementById('<%=cbid..".hideosm"%>').style.display='none';
- document.getElementById('<%=cbid..".iframediv"%>').style.display='none';
- "
- />
- </div>
- <div class="cbi-value-osmiframesection" id="<%=cbid..".iframediv"%>" style="display:none">
- <iframe src="" <%= attr("id", cbid..".iframe")..attr("name", cbid..".iframe")..attr("width", self.width)..attr("height", self.height)%> frameborder="0" scrolling="no"></iframe>
- <%end%>
-
-<%+cbi/valuefooter%>