2 cc-by-sa Andreas Pittrich <andreas.pittrich@web.de>
3 in behalf of the german pirate party (Piratenpartei)
10 <script type="text/javascript">
11 function set_lat_lon() {
17 net = document.getElementById('cbid.ffwizward.1.net').value;
22 lon = document.getElementById('cbid.ffwizward.1.latlon.centerlon');
23 lat = document.getElementById('cbid.ffwizward.1.latlon.centerlat');
24 zoom = document.getElementById('cbid.ffwizward.1.latlon.zoom');
25 if ( !lon.value || lon.value == '' || lon.value == 0 || lon.value == 10 ) {
26 for ( var i = 0 ; true ; i++ ) {
27 if (i == cbi_d.length) {
30 if (cbi_d[i].id == 'cbi-ffwizward-1-net_lon') {
32 for (var j=0; true; j++) {
33 if ( entry.node.children[0].children[j] ){
34 if ( entry.node.children[0].children[j].value == net ) {
35 lon.value = entry.node.children[0].children[j].text;
47 if ( !lat.value || lat.value == '' || lat.value == 0 || lat.value == 52 ) {
48 for (var i=0; true; i++) {
49 if (i == cbi_d.length) {
52 if (cbi_d[i].id == 'cbi-ffwizward-1-net_lat') {
54 for (var j=0; true; j++) {
55 if ( entry.node.children[0].children[j] ){
56 if ( entry.node.children[0].children[j].value == net ) {
57 lat.value = entry.node.children[0].children[j].text;
71 <% if self:cfgvalue(section) ~= false then %>
72 <% if self.latfield and self.lonfield then %>
73 <input type="hidden" <%= attr("value", string.format('cbid.%s.%s.%s', self.config, section, self.latfield))..attr("id", cbid..".latfield")..attr("name", cbid..".latfield")%>/>
74 <input type="hidden" <%= attr("value", string.format('cbid.%s.%s.%s', self.config, section, self.lonfield))..attr("id", cbid..".lonfield")..attr("name", cbid..".lonfield")%>/>
76 <input type="hidden" <%= attr("value", self.centerlat)..attr("id", cbid..".centerlat")..attr("name", cbid..".centerlat")%>/>
77 <input type="hidden" <%= attr("value", self.centerlon)..attr("id", cbid..".centerlon")..attr("name", cbid..".centerlon")%>/>
78 <input type="hidden" <%= attr("value", self.zoom)..attr("id", cbid..".zoom")..attr("name", cbid..".zoom")%>/>
81 <% if self.popup then %>
82 <input class="cbi-input-button" type="button"<%= attr("name", cbid..".button")..attr("id", cbid..".button")..attr("value", self.displaytext)%>
84 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');
91 <input class="cbi-input-button" type="button"<%= attr("name", cbid..".displayosm")..attr("id", cbid..".displayosm")..attr("value", self.displaytext)%>
94 document.getElementById('<%=cbid..".hideosm"%>').style.display='inline';
95 document.getElementById('<%=cbid..".displayosm"%>').style.display='none';
96 for(var i = 0; Math.min(i, window.frames.length)!=window.frames.lengths; i++){
97 if(frames[i].name=='<%=cbid..".iframe"%>'){
98 document.getElementById('<%=cbid..".iframediv"%>').style.display='block';
99 frames[i].location.href='/luci-static/resources/OSMLatLon.htm';
104 <input class="cbi-input-button" style="display:none" type="button"<%= attr("name", cbid..".hideosm")..attr("id", cbid..".hideosm")..attr("value", self.hidetext)%>
106 document.getElementById('<%=cbid..".displayosm"%>').style.display='inline';
107 document.getElementById('<%=cbid..".hideosm"%>').style.display='none';
108 document.getElementById('<%=cbid..".iframediv"%>').style.display='none';
112 <div class="cbi-value-osmiframesection" id="<%=cbid..".iframediv"%>" style="display:none">
113 <iframe src="" <%= attr("id", cbid..".iframe")..attr("name", cbid..".iframe")..attr("width", self.width)..attr("height", self.height)%> frameborder="0" scrolling="no"></iframe>