Commit 8758633d7dc34cc5273e8118728aa813a637b615
1 parent
16536148
Exists in
master
and in
7 other branches
#551 #552
Showing
6 changed files
with
83 additions
and
15 deletions
Show diff stats
admin/html/menus.html
| ... | ... | @@ -62,10 +62,10 @@ body { |
| 62 | 62 | <option value="it">Italiano</option> |
| 63 | 63 | </select> |
| 64 | 64 | </p> |
| 65 | - <input type=button id=adicionaNovoMenu value="Adicionar um novo menu" | |
| 66 | - style="left: -5px;" /> | |
| 65 | + <input type=button id=adicionaNovoMenu value="Adicionar um novo menu" style="left: -5px;" /> | |
| 67 | 66 | <p> |
| 68 | - <br> | |
| 67 | + <div id="letras_M" ></div> | |
| 68 | + <br> | |
| 69 | 69 | <div id="tabela" style="left: -5px;"></div> |
| 70 | 70 | </div> |
| 71 | 71 | </div> | ... | ... |
admin/js/arvore.js
| ... | ... | @@ -64,19 +64,19 @@ function initMenu(){ |
| 64 | 64 | var editorDeMenus = function() { |
| 65 | 65 | if($i("editor_bd")){return;} |
| 66 | 66 | core_montaEditor("","600px","500px","pegaMenus","Menu"); |
| 67 | - $i("editor_bd").innerHTML = '<input type=button id=adicionaNovoMenu value="Adicionar um novo menu" style="left:-5px;" /><br><br><div id="tabela" style="left:-5px;"> </div>'; | |
| 67 | + $i("editor_bd").innerHTML = '<input type=button id=adicionaNovoMenu value="Adicionar um novo menu" style="left:-5px;" /><br><br><div id="letras_M" ></div><br><br><div id="tabela" style="left:-5px;"> </div>'; | |
| 68 | 68 | initEditorMenu(); |
| 69 | 69 | }, |
| 70 | 70 | editorDeGrupos = function(){ |
| 71 | 71 | if($i("editor_bd")){return;} |
| 72 | 72 | core_montaEditor("","600px","500px","","Grupos"); |
| 73 | - $i("editor_bd").innerHTML = '<p class=paragrafo >Clique nas células da tabela para editar a característica de cada item. Finalize com "enter". Após editar, salve o item.</p><p class=paragrafo ><input type=button id=adicionaNovoGrupo value="Adicionar um novo grupo" style="left:-5px;" /></p><p><br><div id="tabela" style="left:-5px;"> </div>'; | |
| 73 | + $i("editor_bd").innerHTML = '<p class=paragrafo >Clique nas células da tabela para editar a característica de cada item. Finalize com "enter". Após editar, salve o item.</p><p class=paragrafo ><input type=button id=adicionaNovoGrupo value="Adicionar um novo grupo" style="left:-5px;" /></p><p><br><br><div id="letras_G" ></div><br><div id="tabela" style="left:-5px;"> </div>'; | |
| 74 | 74 | initEditorGrupos(); |
| 75 | 75 | }, |
| 76 | 76 | editorDeSubGrupos = function() { |
| 77 | 77 | if($i("editor_bd")){return;} |
| 78 | 78 | core_montaEditor("","600px","500px","","Subgrupos"); |
| 79 | - $i("editor_bd").innerHTML = '<p class=paragrafo >Clique nas c�lulas da tabela para editar a caracter�stica de cada item. Finalize com "enter". Ap�s editar, salve o item.</p><p class=paragrafo ><input type=button id=adicionaNovoSubGrupo value="Adicionar um novo sub-grupo" style="left:-5px;" /></p><br><div id="tabela" style="left:-5px;"> </div>'; | |
| 79 | + $i("editor_bd").innerHTML = '<p class=paragrafo >Clique nas células da tabela para editar a caracter&iacutre;stica de cada item. Finalize com "enter". Após editar, salve o item.</p><p class=paragrafo ><input type=button id=adicionaNovoSubGrupo value="Adicionar um novo sub-grupo" style="left:-5px;" /></p><br><br><div id="letras_S" ></div><br><div id="tabela" style="left:-5px;"> </div>'; | |
| 80 | 80 | initEditorSubGrupos(); |
| 81 | 81 | }; |
| 82 | 82 | new YAHOO.widget.Button("botaoEditorMenu",{ onclick: { fn: editorDeMenus } }); | ... | ... |
admin/js/grupos.js
| ... | ... | @@ -50,12 +50,34 @@ Obt&eacute;m a lista de grupos |
| 50 | 50 | */ |
| 51 | 51 | function pegaGrupos_G() |
| 52 | 52 | { |
| 53 | + dados_G = ""; | |
| 53 | 54 | core_carregando("ativa"); |
| 54 | 55 | core_pegaDados("buscando grupos...","../php/menutemas.php?funcao=pegaGrupos","montaTabela_G"); |
| 55 | 56 | } |
| 57 | +function filtraDadosLetras_G(letra){ | |
| 58 | + var i,temp, | |
| 59 | + n = dados_G.length, | |
| 60 | + novo = []; | |
| 61 | + if(letra == "Todos"){ | |
| 62 | + novo = dados_G; | |
| 63 | + } | |
| 64 | + else{ | |
| 65 | + for(i=0;i<n;i++){ | |
| 66 | + temp = dados_G[i].nome_grupo; | |
| 67 | + if(temp.charAt(0).toUpperCase() == letra.toUpperCase()){ | |
| 68 | + novo.push(dados_G[i]); | |
| 69 | + } | |
| 70 | + } | |
| 71 | + } | |
| 72 | + montaTabela_G(novo); | |
| 73 | +} | |
| 56 | 74 | function montaTabela_G(dados) |
| 57 | 75 | { |
| 58 | - YAHOO.example.InlineCellEditing = new function() | |
| 76 | + if(dados_G == ""){ | |
| 77 | + dados_G = dados; | |
| 78 | + } | |
| 79 | + core_listaDeLetras("letras_G","filtraDadosLetras_G"); | |
| 80 | + YAHOO.example.InlineCellEditing = new function() | |
| 59 | 81 | { |
| 60 | 82 | // Custom formatter for "address" column to preserve line breaks |
| 61 | 83 | var formatTexto = function(elCell, oRecord, oColumn, oData) |
| ... | ... | @@ -138,7 +160,7 @@ function montaTabela_G(dados) |
| 138 | 160 | if(oArgs.editor.column.key === "active") |
| 139 | 161 | { |
| 140 | 162 | this.saveCellEditor(); |
| 141 | - | |
| 163 | + | |
| 142 | 164 | } |
| 143 | 165 | }); |
| 144 | 166 | myDataTable.subscribe("editorBlurEvent", function(oArgs) | ... | ... |
admin/js/menu.js
| ... | ... | @@ -51,12 +51,34 @@ Obt&eacute;m a lista de menus |
| 51 | 51 | */ |
| 52 | 52 | function pegaMenus_M() |
| 53 | 53 | { |
| 54 | + dados_M = ""; | |
| 54 | 55 | core_carregando("ativa"); |
| 55 | 56 | core_pegaDados("buscando menus...","../php/menutemas.php?funcao=pegaMenus","montaTabela_M"); |
| 56 | 57 | } |
| 58 | +function filtraDadosLetras_M(letra){ | |
| 59 | + var i,temp, | |
| 60 | + n = dados_M.length, | |
| 61 | + novo = []; | |
| 62 | + if(letra == "Todos"){ | |
| 63 | + novo = dados_M; | |
| 64 | + } | |
| 65 | + else{ | |
| 66 | + for(i=0;i<n;i++){ | |
| 67 | + temp = dados_M[i].nome_menu; | |
| 68 | + if(temp.charAt(0).toUpperCase() == letra.toUpperCase()){ | |
| 69 | + novo.push(dados_M[i]); | |
| 70 | + } | |
| 71 | + } | |
| 72 | + } | |
| 73 | + montaTabela_M(novo); | |
| 74 | +} | |
| 57 | 75 | function montaTabela_M(dados) |
| 58 | 76 | { |
| 59 | - YAHOO.example.InlineCellEditing = new function() | |
| 77 | + if(dados_M == ""){ | |
| 78 | + dados_M = dados; | |
| 79 | + } | |
| 80 | + core_listaDeLetras("letras_M","filtraDadosLetras_M"); | |
| 81 | + YAHOO.example.InlineCellEditing = new function() | |
| 60 | 82 | { |
| 61 | 83 | // Custom formatter for "address" column to preserve line breaks |
| 62 | 84 | var formatTexto = function(elCell, oRecord, oColumn, oData) |
| ... | ... | @@ -129,7 +151,7 @@ function montaTabela_M(dados) |
| 129 | 151 | }, |
| 130 | 152 | failure:core_handleFailure, |
| 131 | 153 | argument: { foo:"foo", bar:"bar" } |
| 132 | - }; | |
| 154 | + }; | |
| 133 | 155 | core_makeRequest(sUrl,callback); |
| 134 | 156 | } |
| 135 | 157 | }); |
| ... | ... | @@ -154,14 +176,16 @@ function montaEditor_M(dados,id,recordid) |
| 154 | 176 | var ins = '<div class="hd">Editor</div>'; |
| 155 | 177 | ins += "<div class='bd' style='height:354px;overflow:auto'>"; |
| 156 | 178 | ins += "<div id='okcancel_checkbox2'></div><div id='editor_bd2'></div>"; |
| 179 | + ins += "<div id='letras_M'></div>"; | |
| 157 | 180 | novoel.innerHTML = ins; |
| 181 | + | |
| 158 | 182 | document.body.appendChild(novoel); |
| 159 | 183 | var editorBotoes = new YAHOO.widget.ButtonGroup({id:"okcancel_checkbox_id2", name: "okcancel_checkbox_id2", container: "okcancel_checkbox2" }); |
| 160 | 184 | editorBotoes.addButtons([ |
| 161 | 185 | { label: "Salva", value: "OK", checked: false}, |
| 162 | 186 | { label: "Cancela", value: "CANCEL", checked: false } |
| 163 | 187 | ]); |
| 164 | - editorBotoes.on("checkedButtonChange", on_editorCheckBoxChange); | |
| 188 | + editorBotoes.on("checkedButtonChange", on_editorCheckBoxChange); | |
| 165 | 189 | YAHOO.admin.container.panelEditor2 = new YAHOO.widget.Panel("janela_editor2", { fixedcenter:true,close:false,width:"400px", height:"480px",overflow:"auto", visible:false,constraintoviewport:true } ); |
| 166 | 190 | YAHOO.admin.container.panelEditor2.render(); |
| 167 | 191 | } |
| ... | ... | @@ -250,7 +274,7 @@ function gravaDados_M(id,recordid) |
| 250 | 274 | }, |
| 251 | 275 | failure:core_handleFailure, |
| 252 | 276 | argument: { foo:"foo", bar:"bar" } |
| 253 | - }; | |
| 277 | + }; | |
| 254 | 278 | core_makeRequest(sUrl,callback); |
| 255 | 279 | } |
| 256 | 280 | function excluiLinha_M(id,row) | ... | ... |
admin/js/subgrupos.js
| ... | ... | @@ -51,12 +51,34 @@ Obt&eacute;m a lista de subgrupos |
| 51 | 51 | */ |
| 52 | 52 | function pegaSubGrupos_S() |
| 53 | 53 | { |
| 54 | + dados_S = ""; | |
| 54 | 55 | core_carregando("ativa"); |
| 55 | 56 | core_pegaDados("buscando sub-grupos...","../php/menutemas.php?funcao=pegaSubGrupos","montaTabela_S"); |
| 56 | 57 | } |
| 58 | +function filtraDadosLetras_S(letra){ | |
| 59 | + var i,temp, | |
| 60 | + n = dados_S.length, | |
| 61 | + novo = []; | |
| 62 | + if(letra == "Todos"){ | |
| 63 | + novo = dados_S; | |
| 64 | + } | |
| 65 | + else{ | |
| 66 | + for(i=0;i<n;i++){ | |
| 67 | + temp = dados_S[i].nome_subgrupo; | |
| 68 | + if(temp.charAt(0).toUpperCase() == letra.toUpperCase()){ | |
| 69 | + novo.push(dados_S[i]); | |
| 70 | + } | |
| 71 | + } | |
| 72 | + } | |
| 73 | + montaTabela_S(novo); | |
| 74 | +} | |
| 57 | 75 | function montaTabela_S(dados) |
| 58 | 76 | { |
| 59 | - YAHOO.example.InlineCellEditing = new function() | |
| 77 | + if(dados_S == ""){ | |
| 78 | + dados_S = dados; | |
| 79 | + } | |
| 80 | + core_listaDeLetras("letras_S","filtraDadosLetras_S"); | |
| 81 | + YAHOO.example.InlineCellEditing = new function() | |
| 60 | 82 | { |
| 61 | 83 | // Custom formatter for "address" column to preserve line breaks |
| 62 | 84 | var formatTexto = function(elCell, oRecord, oColumn, oData) |
| ... | ... | @@ -140,7 +162,7 @@ function montaTabela_S(dados) |
| 140 | 162 | if(oArgs.editor.column.key === "active") |
| 141 | 163 | { |
| 142 | 164 | this.saveCellEditor(); |
| 143 | - | |
| 165 | + | |
| 144 | 166 | } |
| 145 | 167 | }); |
| 146 | 168 | myDataTable.subscribe("editorBlurEvent", function(oArgs) | ... | ... |
ferramentas/graficointerativo/index.js
| ... | ... | @@ -337,7 +337,7 @@ i3GEOF.graficointerativo = { |
| 337 | 337 | minimiza = function(){ |
| 338 | 338 | i3GEO.janela.minimiza("i3GEOF.graficointerativo"); |
| 339 | 339 | }; |
| 340 | - titulo = " "+$trad("37b")++" <a class=ajuda_usuario target=_blank href='" + i3GEO.configura.locaplic + "/ajuda_usuario.php?idcategoria=3&idajuda=84' > </a>"; | |
| 340 | + titulo = " "+$trad("37b")+" <a class=ajuda_usuario target=_blank href='" + i3GEO.configura.locaplic + "/ajuda_usuario.php?idcategoria=3&idajuda=84' > </a>"; | |
| 341 | 341 | janela = i3GEO.janela.cria( |
| 342 | 342 | "380px", |
| 343 | 343 | "300px", | ... | ... |