Commit 8a65953c1fb0231c891b128830a3462a6f2786c5
1 parent
670079e7
Exists in
master
and in
7 other branches
--no commit message
Showing
3 changed files
with
29 additions
and
28 deletions
Show diff stats
admin/html/editormapfile.html
... | ... | @@ -104,7 +104,7 @@ i3geo/admin/html/editormapfile.html |
104 | 104 | |
105 | 105 | <script> |
106 | 106 | YAHOO.util.Event.addListener(window, "load", initMenu); |
107 | -var letras = "A B C D E F G H I J K L M N O P Q R S T U V X Y Z _ 1 2 3 4 5 6 7 8 9".split(" "), | |
107 | +var letras = "Todos A B C D E F G H I J K L M N O P Q R S T U V X Y Z _ 1 2 3 4 5 6 7 8 9".split(" "), | |
108 | 108 | nletras = letras.length, |
109 | 109 | i, |
110 | 110 | ins = "<p>"; |
... | ... | @@ -115,6 +115,8 @@ document.getElementById("letras").innerHTML = ins+ " <input onclick='filtraLetr |
115 | 115 | |
116 | 116 | function filtraLetra(letra){ |
117 | 117 | document.getElementById("tabela").innerHTML = "<span style=color:red >Aguarde...</span>"; |
118 | + if(letra == "Todos") | |
119 | + {letra = "";} | |
118 | 120 | core_pegaMapfiles("montaArvore()",letra) |
119 | 121 | } |
120 | 122 | ... | ... |
admin/js/core.js
... | ... | @@ -1192,39 +1192,33 @@ function core_montaEditor(funcaoOK,w,h,funcaoClose) |
1192 | 1192 | var w = "400px"; |
1193 | 1193 | var h = w; |
1194 | 1194 | } |
1195 | - if(funcaoOK != "") | |
1196 | - { | |
1197 | - function on_editorCheckBoxChange(p_oEvent) | |
1198 | - { | |
1199 | - var ins = ""; | |
1200 | - if(p_oEvent.newValue.get("value") == "OK") | |
1201 | - { | |
1202 | - eval(funcaoOK); | |
1203 | - } | |
1204 | - else | |
1205 | - { | |
1206 | - YAHOO.example.container.panelEditor.destroy(); | |
1207 | - YAHOO.example.container.panelEditor = null; | |
1208 | - } | |
1209 | - }; | |
1210 | - } | |
1211 | 1195 | if(!YAHOO.example.container.panelEditor) |
1212 | 1196 | { |
1213 | 1197 | var novoel = document.createElement("div"); |
1214 | 1198 | novoel.id = "janela_editor"; |
1215 | 1199 | var ins = '<div class="hd">Editor</div>'; |
1216 | 1200 | ins += "<div class='bd' style='height:354px;overflow:auto'>"; |
1217 | - ins += "<div id='okcancel_checkbox'></div><div id='editor_bd'></div>"; | |
1201 | + ins += "<div id='okcancel_checkbox'></div>"; | |
1202 | + ins += "<div id='editor_bd'></div>"; | |
1218 | 1203 | novoel.innerHTML = ins; |
1219 | 1204 | document.body.appendChild(novoel); |
1220 | 1205 | if(funcaoOK != "") |
1221 | 1206 | { |
1222 | - var editorBotoes = new YAHOO.widget.ButtonGroup({id:"okcancel_checkbox_id", name: "okcancel_checkbox_id", container: "okcancel_checkbox" }); | |
1223 | - editorBotoes.addButtons([ | |
1224 | - { label: "Salva", value: "OK", checked: false}, | |
1225 | - { label: "Cancela", value: "CANCEL", checked: false } | |
1226 | - ]); | |
1227 | - editorBotoes.on("checkedButtonChange", on_editorCheckBoxChange); | |
1207 | + var lb = $i("okcancel_checkbox"); | |
1208 | + lb.innerHTML = "<input id=okcancel_checkboxOK type='buttom' value='Salva' /><input id=okcancel_checkboxCANCEL type='buttom' value='Cancela' />"; | |
1209 | + new YAHOO.widget.Button( | |
1210 | + "okcancel_checkboxOK", | |
1211 | + {onclick:{fn: function(){ | |
1212 | + eval(funcaoOK); | |
1213 | + }}} | |
1214 | + ); | |
1215 | + new YAHOO.widget.Button( | |
1216 | + "okcancel_checkboxCANCEL", | |
1217 | + {onclick:{fn: function(){ | |
1218 | + YAHOO.example.container.panelEditor.destroy(); | |
1219 | + YAHOO.example.container.panelEditor = null; | |
1220 | + }}} | |
1221 | + ); | |
1228 | 1222 | } |
1229 | 1223 | YAHOO.example.container.panelEditor = new YAHOO.widget.Panel("janela_editor", { fixedcenter:true,close:true,width:w, overflow:"auto",modal: true,visible:false,constraintoviewport:true } ); |
1230 | 1224 | YAHOO.example.container.panelEditor.render(); | ... | ... |
admin/js/editormapfile.js
... | ... | @@ -238,8 +238,10 @@ function montaNosRaiz(redesenha) |
238 | 238 | conteudo = " <img style=\"position:relative;cursor:pointer;top:2px\" onclick=\"excluirMapfile('"+$mapfiles[i].codigo+"')\" title=excluir src=\"../imagens/01.png\" />" |
239 | 239 | conteudo += " <img style=\"position:relative;cursor:pointer;top:2px\" onclick=\"clonarMapfile('"+$mapfiles[i].codigo+"')\" title='cria uma cópia' src=\"../imagens/clonar.png\" />" |
240 | 240 | conteudo += " <img style=\"position:relative;cursor:pointer;top:2px\" onclick=\"limparCacheMapfile('"+$mapfiles[i].codigo+"')\" title='limpa o chache de imagens se houver' src=\"../imagens/limparcache.png\" />" |
241 | - conteudo += " <img style=\"position:relative;cursor:pointer;top:2px\" onclick=\"editorTemaMapfile('"+$mapfiles[i].codigo+"')\" title='editar tema associado' src=\"../imagens/06.png\" />" | |
242 | - conteudo += " <img style=\"position:relative;cursor:pointer;top:2px\" onclick=\"testarMapfile('"+$mapfiles[i].codigo+"')\" title='testar!' src=\"../imagens/41.png\" /><a href='../php/editortexto.php?mapfile="+$mapfiles[i].codigo+"' target=_self ><b> <span>"+$mapfiles[i].codigo+" <span style=color:gray >"+$mapfiles[i].nome+"</span></span></a>" | |
241 | + conteudo += " <img style=\"position:relative;cursor:pointer;top:2px\" onclick=\"editorTemaMapfile('"+$mapfiles[i].codigo+"')\" title='editar tema associado' src=\"../imagens/03.png\" />" | |
242 | + conteudo += "<a href='../php/editortexto.php?mapfile="+$mapfiles[i].codigo+"' target=_self > <img title='Editor de textos' style=\"position:relative;cursor:pointer;top:2px\" src=\"../imagens/06.png\" /></a>" | |
243 | + conteudo += " <img style=\"position:relative;cursor:pointer;top:2px\" onclick=\"testarMapfile('"+$mapfiles[i].codigo+"')\" title='testar!' src=\"../imagens/41.png\" />" | |
244 | + conteudo += "<b> <span>"+$mapfiles[i].codigo+" <span style=color:gray >"+$mapfiles[i].nome+"</span></span>" | |
243 | 245 | if($mapfiles[i].imagem != "" && $i("mostraMini").checked == true){ |
244 | 246 | conteudo += "</b><br><img src='../../temas/miniaturas/"+$mapfiles[i].imagem+"'/>"; |
245 | 247 | } |
... | ... | @@ -522,14 +524,17 @@ Adiciona um novo mapfile |
522 | 524 | */ |
523 | 525 | function adicionaNovoMapfile() |
524 | 526 | { |
525 | - core_carregando("ativa"); | |
526 | - core_carregando(" adicionando um novo mapfile"); | |
527 | 527 | var nome = $i("Etitulo").value |
528 | 528 | var it = $i("EtituloIT").value |
529 | 529 | var es = $i("EtituloES").value |
530 | 530 | var en = $i("EtituloEN").value |
531 | 531 | var codigo = $i("Ecodigo").value |
532 | + if(codigo === "") | |
533 | + {alert("Digite o nome do arquivo");return;} | |
532 | 534 | sUrl = "../php/editormapfile.php?funcao=criarNovoMap&nome="+nome+"&codigo="+codigo+"&it="+it+"&en="+en+"&es="+es |
535 | + core_carregando("ativa"); | |
536 | + core_carregando(" adicionando um novo mapfile"); | |
537 | + | |
533 | 538 | var callback = |
534 | 539 | { |
535 | 540 | success:function(o) | ... | ... |