Commit c957e991ba50afec59b46a4972249f5ac7f84c5e
1 parent
93b89037
Exists in
master
and in
7 other branches
Inclusão de ícone para escolha de cores no editor de classes (metaestat)
Showing
2 changed files
with
34 additions
and
21 deletions
Show diff stats
admin/js/estat_variavel.js
| @@ -558,18 +558,30 @@ i3GEOadmin.variaveis = { | @@ -558,18 +558,30 @@ i3GEOadmin.variaveis = { | ||
| 558 | {titulo:"Expressão (no estilo Mapserver)<br> exemplo (([nu_farm_funcionando] > 0) and ([nu_farm_funcionando] < 5)):",id:"Eexpressao",size:"50",value:i.expressao,tipo:"text",div:""}, | 558 | {titulo:"Expressão (no estilo Mapserver)<br> exemplo (([nu_farm_funcionando] > 0) and ([nu_farm_funcionando] < 5)):",id:"Eexpressao",size:"50",value:i.expressao,tipo:"text",div:""}, |
| 559 | {titulo:"Símbolo:",id:"Esimbolo",size:"10",value:i.simbolo,tipo:"text",div:""}, | 559 | {titulo:"Símbolo:",id:"Esimbolo",size:"10",value:i.simbolo,tipo:"text",div:""}, |
| 560 | {titulo:"Tamanho do símbolo:",id:"Etamanho",size:"10",value:i.tamanho,tipo:"text",div:""}, | 560 | {titulo:"Tamanho do símbolo:",id:"Etamanho",size:"10",value:i.tamanho,tipo:"text",div:""}, |
| 561 | - {titulo:"Vermelho:",id:"Evermelho",size:"10",value:i.vermelho,tipo:"text",div:""}, | 561 | + {titulo:"Vermelho: <img src='../../imagens/aquarela.gif' style='cursor:pointer;' onclick='core_abreCor(\"\",\"inputEventoCor\");' />",id:"Evermelho",size:"10",value:i.vermelho,tipo:"text",div:""}, |
| 562 | {titulo:"Verde:",id:"Everde",size:"10",value:i.verde,tipo:"text",div:""}, | 562 | {titulo:"Verde:",id:"Everde",size:"10",value:i.verde,tipo:"text",div:""}, |
| 563 | {titulo:"Azul:",id:"Eazul",size:"10",value:i.azul,tipo:"text",div:""}, | 563 | {titulo:"Azul:",id:"Eazul",size:"10",value:i.azul,tipo:"text",div:""}, |
| 564 | {titulo:"Contorno - tamanho do símbolo:",id:"Eotamanho",size:"10",value:i.otamanho,tipo:"text",div:""}, | 564 | {titulo:"Contorno - tamanho do símbolo:",id:"Eotamanho",size:"10",value:i.otamanho,tipo:"text",div:""}, |
| 565 | - {titulo:"Contorno - Vermelho:",id:"Eovermelho",size:"10",value:i.overmelho,tipo:"text",div:""}, | 565 | + {titulo:"Contorno - Vermelho <img src='../../imagens/aquarela.gif' style='cursor:pointer;' onclick='core_abreCor(\"\",\"inputEventoOutlineCor\");' />:",id:"Eovermelho",size:"10",value:i.overmelho,tipo:"text",div:""}, |
| 566 | {titulo:"Contorno - Verde:",id:"Eoverde",size:"10",value:i.overde,tipo:"text",div:""}, | 566 | {titulo:"Contorno - Verde:",id:"Eoverde",size:"10",value:i.overde,tipo:"text",div:""}, |
| 567 | {titulo:"Contorno - Azul:",id:"Eoazul",size:"10",value:i.oazul,tipo:"text",div:""} | 567 | {titulo:"Contorno - Azul:",id:"Eoazul",size:"10",value:i.oazul,tipo:"text",div:""} |
| 568 | ] | 568 | ] |
| 569 | }; | 569 | }; |
| 570 | ins += core_geraLinhas(param); | 570 | ins += core_geraLinhas(param); |
| 571 | //ins += "<br><br><br>"; | 571 | //ins += "<br><br><br>"; |
| 572 | - $i("editor_bd").innerHTML = ins; | 572 | + //o input hidden recebe a cor da janela de selecao interativa e executa o preenchimento dos campos rgb |
| 573 | + | ||
| 574 | + $i("editor_bd").innerHTML = ins+"<input type=hidden value='' id='inputEventoCor' onchange='i3GEOadmin.variaveis.classes.preencheCores(\"inputEventoCor\",\"E\")' />"; | ||
| 575 | + $i("editor_bd").innerHTML = ins+"<input type=hidden value='' id='inputEventoOutlineCor' onchange='i3GEOadmin.variaveis.classes.preencheCores(\"inputEventoOutlineCor\",\"Eo\")' />"; | ||
| 576 | + | ||
| 577 | + }, | ||
| 578 | + preencheCores: function(id,prefixo){ | ||
| 579 | + var cor = $i(id).value.split(","); | ||
| 580 | + if(cor.length == 3){ | ||
| 581 | + $i(prefixo+"vermelho").value = cor[0]; | ||
| 582 | + $i(prefixo+"verde").value = cor[1]; | ||
| 583 | + $i(prefixo+"azul").value = cor[2]; | ||
| 584 | + } | ||
| 573 | } | 585 | } |
| 574 | }, | 586 | }, |
| 575 | parametro:{ | 587 | parametro:{ |
| @@ -867,7 +879,7 @@ i3GEOadmin.variaveis = { | @@ -867,7 +879,7 @@ i3GEOadmin.variaveis = { | ||
| 867 | core_montaEditor("","480px","300px","","Testes",false); | 879 | core_montaEditor("","480px","300px","","Testes",false); |
| 868 | ins = "<p><b>Select simples:</b> "+dados.sql; | 880 | ins = "<p><b>Select simples:</b> "+dados.sql; |
| 869 | ins += "<p><b>Mapserver:</b> "+dados.sqlmapserver; | 881 | ins += "<p><b>Mapserver:</b> "+dados.sqlmapserver; |
| 870 | - ins += "<p><b>�ltima URL:</b><div id='ultimaUrl'></div> "; | 882 | + ins += "<p><b>Última URL:</b><div id='ultimaUrl'></div> "; |
| 871 | ins += "<p><b>Colunas:</b> "+dados.colunas; | 883 | ins += "<p><b>Colunas:</b> "+dados.colunas; |
| 872 | ins +="<p><input style='position:relative;top:2px' type='checkbox' id='incluirtodascolunas' />Incluir todas as colunas no resultado"; | 884 | ins +="<p><input style='position:relative;top:2px' type='checkbox' id='incluirtodascolunas' />Incluir todas as colunas no resultado"; |
| 873 | ins +="<p>Filtro opcional (exemplo: valor = 1)<br>"; | 885 | ins +="<p>Filtro opcional (exemplo: valor = 1)<br>"; |
ferramentas/colorpicker/index.htm
| @@ -4,10 +4,10 @@ | @@ -4,10 +4,10 @@ | ||
| 4 | <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> | 4 | <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> |
| 5 | <style type="text/css"> | 5 | <style type="text/css"> |
| 6 | /*margin and padding on body element | 6 | /*margin and padding on body element |
| 7 | - can introduce errors in determining | ||
| 8 | - element position and are not recommended; | ||
| 9 | - we turn them off as a foundation for YUI | ||
| 10 | - CSS treatments. */ | 7 | + can introduce errors in determining |
| 8 | + element position and are not recommended; | ||
| 9 | + we turn them off as a foundation for YUI | ||
| 10 | + CSS treatments. */ | ||
| 11 | body { | 11 | body { |
| 12 | margin:0; | 12 | margin:0; |
| 13 | padding:0;border:0px; | 13 | padding:0;border:0px; |
| @@ -24,8 +24,8 @@ body { | @@ -24,8 +24,8 @@ body { | ||
| 24 | <!--begin custom header content for this example--> | 24 | <!--begin custom header content for this example--> |
| 25 | 25 | ||
| 26 | <style type="text/css"> | 26 | <style type="text/css"> |
| 27 | - #container { position: relative; padding: 6px; background-color: #eeeeee; width: 300px; height:200px; } | ||
| 28 | - .yui-picker-controls li {padding: 01px;} | 27 | + #container { position: relative; padding: 6px; background-color: #eeeeee; width: 300px; height:200px; } |
| 28 | + .yui-picker-controls li {padding: 01px;} | ||
| 29 | </style> | 29 | </style> |
| 30 | <!--end custom header content for this example--> | 30 | <!--end custom header content for this example--> |
| 31 | <title></title> | 31 | <title></title> |
| @@ -39,18 +39,18 @@ body { | @@ -39,18 +39,18 @@ body { | ||
| 39 | API --> | 39 | API --> |
| 40 | <script type="text/javascript"> | 40 | <script type="text/javascript"> |
| 41 | (function() { | 41 | (function() { |
| 42 | - var Event = YAHOO.util.Event, | ||
| 43 | - picker; | 42 | + var Event = YAHOO.util.Event, |
| 43 | + picker; | ||
| 44 | 44 | ||
| 45 | - Event.onDOMReady(function() { | ||
| 46 | - picker = new YAHOO.widget.ColorPicker("container", { | ||
| 47 | - showhsvcontrols: true, | ||
| 48 | - showhexcontrols: true, | 45 | + Event.onDOMReady(function() { |
| 46 | + picker = new YAHOO.widget.ColorPicker("container", { | ||
| 47 | + showhsvcontrols: true, | ||
| 48 | + showhexcontrols: true, | ||
| 49 | images: { | 49 | images: { |
| 50 | PICKER_THUMB: window.parent.i3GEO.configura.locaplic+"/pacotes/yui290/build/colorpicker/assets/picker_thumb.png", | 50 | PICKER_THUMB: window.parent.i3GEO.configura.locaplic+"/pacotes/yui290/build/colorpicker/assets/picker_thumb.png", |
| 51 | HUE_THUMB: window.parent.i3GEO.configura.locaplic+"/pacotes/yui290/build/colorpicker/assets/hue_thumb.png" | 51 | HUE_THUMB: window.parent.i3GEO.configura.locaplic+"/pacotes/yui290/build/colorpicker/assets/hue_thumb.png" |
| 52 | - } | ||
| 53 | - }); | 52 | + } |
| 53 | + }); | ||
| 54 | var onRgbChange = function(o) { | 54 | var onRgbChange = function(o) { |
| 55 | }; | 55 | }; |
| 56 | picker.on("rgbChange", onRgbChange); | 56 | picker.on("rgbChange", onRgbChange); |
| @@ -64,12 +64,13 @@ API --> | @@ -64,12 +64,13 @@ API --> | ||
| 64 | }); | 64 | }); |
| 65 | Event.on("gethex", "click", function(e) { | 65 | Event.on("gethex", "click", function(e) { |
| 66 | }); | 66 | }); |
| 67 | - }); | 67 | + }); |
| 68 | 68 | ||
| 69 | })(); | 69 | })(); |
| 70 | // | 70 | // |
| 71 | -//utilize tipo para definir o tipo de cor de retorno | ||
| 72 | -// | 71 | +//utilize tipo na url para definir o tipo de cor de retorno |
| 72 | +//default e hex | ||
| 73 | +//se for usado rgbSep, o retorno sera em rgb separado por " " | ||
| 73 | function aplicarCor() | 74 | function aplicarCor() |
| 74 | { | 75 | { |
| 75 | navm = false; // IE | 76 | navm = false; // IE |