Commit 3fb31839b2b6d13c7a53d43d4768d6e674ad219f
1 parent
8515f095
Exists in
master
and in
7 other branches
Conversão para Bootstrap da opção Ferramentas, existente no editor vetorial
Showing
2 changed files
with
34 additions
and
34 deletions
Show diff stats
ferramentas/editorol/editorol.js
@@ -58,6 +58,7 @@ if (!i3GEO || typeof (i3GEO) === 'undefined') { | @@ -58,6 +58,7 @@ if (!i3GEO || typeof (i3GEO) === 'undefined') { | ||
58 | i3GEO.editorOL = | 58 | i3GEO.editorOL = |
59 | { | 59 | { |
60 | MUSTACHESALVAGEOMETRIAS: "", | 60 | MUSTACHESALVAGEOMETRIAS: "", |
61 | + MUSTACHEFERRAMENTAS: "", | ||
61 | layerDefault: "", | 62 | layerDefault: "", |
62 | simbologia : { | 63 | simbologia : { |
63 | opacidade : 0.8, | 64 | opacidade : 0.8, |
@@ -2126,6 +2127,13 @@ i3GEO.editorOL = | @@ -2126,6 +2127,13 @@ i3GEO.editorOL = | ||
2126 | temp.innerHTML = ins; | 2127 | temp.innerHTML = ins; |
2127 | }, | 2128 | }, |
2128 | ferramentas : function() { | 2129 | ferramentas : function() { |
2130 | + if(i3GEO.editorOL.MUSTACHEFERRAMENTAS == ""){ | ||
2131 | + $.get(i3GEO.configura.locaplic + "/ferramentas/editorol/templateFerramentas_mst.html", function(template) { | ||
2132 | + i3GEO.editorOL.MUSTACHEFERRAMENTAS = template; | ||
2133 | + i3GEO.editorOL.ferramentas(); | ||
2134 | + }); | ||
2135 | + return; | ||
2136 | + } | ||
2129 | var b, ins; | 2137 | var b, ins; |
2130 | if (!document.getElementById("panelferramentasEditor")) { | 2138 | if (!document.getElementById("panelferramentasEditor")) { |
2131 | YAHOO.namespace("editorOL.ferramentas"); | 2139 | YAHOO.namespace("editorOL.ferramentas"); |
@@ -2133,37 +2141,21 @@ i3GEO.editorOL = | @@ -2133,37 +2141,21 @@ i3GEO.editorOL = | ||
2133 | zIndex : 20000, | 2141 | zIndex : 20000, |
2134 | iframe : true, | 2142 | iframe : true, |
2135 | width : "300px", | 2143 | width : "300px", |
2136 | - height : "150px", | ||
2137 | visible : false, | 2144 | visible : false, |
2138 | draggable : true, | 2145 | draggable : true, |
2139 | close : true | 2146 | close : true |
2140 | }); | 2147 | }); |
2141 | - ins = | ||
2142 | - "" + '<p class=paragrafo >' | ||
2143 | - + $trad("opsel") | ||
2144 | - + ':</p>' | ||
2145 | - + '<div class=styled-select >' | ||
2146 | - + '<select id="panelferramentasEditorOpcoes">' | ||
2147 | - + ' <option value="">---</option>' | ||
2148 | - + ' <option value=union >União</option>'; | 2148 | + var hash = { |
2149 | + "opsel": $trad("opsel"), | ||
2150 | + "p14": $trad("p14"), | ||
2151 | + "hidden": "hidden" | ||
2152 | + }; | ||
2149 | if (i3GEO.php) { | 2153 | if (i3GEO.php) { |
2150 | - ins += | ||
2151 | - ' <option value=intersection >Intersecção</option>' + ' <option value=convexhull >Convex hull</option>' | ||
2152 | - + ' <option value=boundary >Bordas</option>' | ||
2153 | - + ' <option value=difference >Diferença</option>' | ||
2154 | - + ' <option value=symdifference >Diferença simétrica</option>'; | 2154 | + hash.hidden = ""; |
2155 | } | 2155 | } |
2156 | - ins += '</select></p>'; | ||
2157 | - ins += '</div>'; | ||
2158 | - ins += '<br><p class=paragrafo ><input id="panelferramentasEditorAplicar" type="button" value="' + $trad("p14") + '" />'; | ||
2159 | - | 2156 | + ins = Mustache.render(i3GEO.editorOL.MUSTACHEFERRAMENTAS, hash); |
2160 | YAHOO.editorOL.ferramentas.panel.setBody(ins); | 2157 | YAHOO.editorOL.ferramentas.panel.setBody(ins); |
2161 | - if (i3GEO && typeof i3GEO != undefined && i3GEO != "") { | ||
2162 | - YAHOO.editorOL.ferramentas.panel | ||
2163 | - .setHeader("Ferramentas <div id='panelferramentasEditor_minimizaCabecalho' class='container-minimiza'></div>"); | ||
2164 | - } else { | ||
2165 | - YAHOO.editorOL.ferramentas.panel.setHeader("Ferramentas"); | ||
2166 | - } | 2158 | + YAHOO.editorOL.ferramentas.panel.setHeader("<span class='i3GeoTituloJanelaBsNolink' >Ferramentas</span>"); |
2167 | 2159 | ||
2168 | YAHOO.editorOL.ferramentas.panel.setFooter(""); | 2160 | YAHOO.editorOL.ferramentas.panel.setFooter(""); |
2169 | YAHOO.editorOL.ferramentas.panel.render(document.body); | 2161 | YAHOO.editorOL.ferramentas.panel.render(document.body); |
@@ -2176,20 +2168,10 @@ i3GEO.editorOL = | @@ -2176,20 +2168,10 @@ i3GEO.editorOL = | ||
2176 | i3GEO.janela.minimiza("panelferramentasEditor"); | 2168 | i3GEO.janela.minimiza("panelferramentasEditor"); |
2177 | }; | 2169 | }; |
2178 | } | 2170 | } |
2179 | - b = new YAHOO.widget.Button( | ||
2180 | - "panelferramentasEditorAplicar",{ | ||
2181 | - onclick:{ | ||
2182 | - fn: function(){ | ||
2183 | - i3GEO.editorOL.processageo($i("panelferramentasEditorOpcoes").value); | ||
2184 | - } | ||
2185 | - } | ||
2186 | - }); | ||
2187 | - b.addClass("rodar"); | ||
2188 | } else { | 2171 | } else { |
2189 | YAHOO.editorOL.ferramentas.panel.render(document.body); | 2172 | YAHOO.editorOL.ferramentas.panel.render(document.body); |
2190 | } | 2173 | } |
2191 | YAHOO.editorOL.ferramentas.panel.show(); | 2174 | YAHOO.editorOL.ferramentas.panel.show(); |
2192 | - | ||
2193 | }, | 2175 | }, |
2194 | //TODO implementar ao atualizar OL3 | 2176 | //TODO implementar ao atualizar OL3 |
2195 | snap : function() { | 2177 | snap : function() { |
@@ -0,0 +1,18 @@ | @@ -0,0 +1,18 @@ | ||
1 | +<div class='container-fluid'> | ||
2 | + <h5>{{{opsel}}}</h5> | ||
3 | + <div style="width: 100%;" class='form-group label-fixed condensed'> | ||
4 | + <label class="control-label" for="i3GEOtoponimiaDivListaFonte">{{{fonte}}}</label> | ||
5 | + <div style="width: 100%;" class="input-group"> | ||
6 | + <select class="form-control" id="panelferramentasEditorOpcoes"> | ||
7 | + <option value="">---</option> | ||
8 | + <option value=union>União</option> | ||
9 | + <option class="{{{hidden}}}" value=intersection>Intersecção</option> | ||
10 | + <option value=convexhull>Convex hull</option> | ||
11 | + <option class="{{{hidden}}}" value=boundary>Bordas</option> | ||
12 | + <option class="{{{hidden}}}" value=difference>Diferença</option> | ||
13 | + <option class="{{{hidden}}}" value=symdifference>Diferença simétrica</option> | ||
14 | + </select> | ||
15 | + </div> | ||
16 | + </div> | ||
17 | + <button onclick="i3GEO.editorOL.processageo($i('panelferramentasEditorOpcoes').value)" class='btn btn-primary btn-sm btn-raised'>{{{p14}}}</button> | ||
18 | +</div> | ||
0 | \ No newline at end of file | 19 | \ No newline at end of file |