Commit 3fb31839b2b6d13c7a53d43d4768d6e674ad219f

Authored by Edmar Moretti
1 parent 8515f095

Conversão para Bootstrap da opção Ferramentas, existente no editor vetorial

ferramentas/editorol/editorol.js
... ... @@ -58,6 +58,7 @@ if (!i3GEO || typeof (i3GEO) === 'undefined') {
58 58 i3GEO.editorOL =
59 59 {
60 60 MUSTACHESALVAGEOMETRIAS: "",
  61 + MUSTACHEFERRAMENTAS: "",
61 62 layerDefault: "",
62 63 simbologia : {
63 64 opacidade : 0.8,
... ... @@ -2126,6 +2127,13 @@ i3GEO.editorOL =
2126 2127 temp.innerHTML = ins;
2127 2128 },
2128 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 2137 var b, ins;
2130 2138 if (!document.getElementById("panelferramentasEditor")) {
2131 2139 YAHOO.namespace("editorOL.ferramentas");
... ... @@ -2133,37 +2141,21 @@ i3GEO.editorOL =
2133 2141 zIndex : 20000,
2134 2142 iframe : true,
2135 2143 width : "300px",
2136   - height : "150px",
2137 2144 visible : false,
2138 2145 draggable : true,
2139 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&atilde;o</option>';
  2148 + var hash = {
  2149 + "opsel": $trad("opsel"),
  2150 + "p14": $trad("p14"),
  2151 + "hidden": "hidden"
  2152 + };
2149 2153 if (i3GEO.php) {
2150   - ins +=
2151   - ' <option value=intersection >Intersec&ccedil;&atilde;o</option>' + ' <option value=convexhull >Convex hull</option>'
2152   - + ' <option value=boundary >Bordas</option>'
2153   - + ' <option value=difference >Diferen&ccedil;a</option>'
2154   - + ' <option value=symdifference >Diferen&ccedil;a sim&eacute;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 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 2160 YAHOO.editorOL.ferramentas.panel.setFooter("");
2169 2161 YAHOO.editorOL.ferramentas.panel.render(document.body);
... ... @@ -2176,20 +2168,10 @@ i3GEO.editorOL =
2176 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 2171 } else {
2189 2172 YAHOO.editorOL.ferramentas.panel.render(document.body);
2190 2173 }
2191 2174 YAHOO.editorOL.ferramentas.panel.show();
2192   -
2193 2175 },
2194 2176 //TODO implementar ao atualizar OL3
2195 2177 snap : function() {
... ...
ferramentas/editorol/templateFerramentas_mst.html 0 → 100755
... ... @@ -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&atilde;o</option>
  9 + <option class="{{{hidden}}}" value=intersection>Intersec&ccedil;&atilde;o</option>
  10 + <option value=convexhull>Convex hull</option>
  11 + <option class="{{{hidden}}}" value=boundary>Bordas</option>
  12 + <option class="{{{hidden}}}" value=difference>Diferen&ccedil;a</option>
  13 + <option class="{{{hidden}}}" value=symdifference>Diferen&ccedil;a sim&eacute;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 19 \ No newline at end of file
... ...