Commit c957e991ba50afec59b46a4972249f5ac7f84c5e

Authored by Edmar Moretti
1 parent 93b89037

Inclusão de ícone para escolha de cores no editor de classes (metaestat)

admin/js/estat_variavel.js
... ... @@ -558,18 +558,30 @@ i3GEOadmin.variaveis = {
558 558 {titulo:"Express&atilde;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 559 {titulo:"S&iacute;mbolo:",id:"Esimbolo",size:"10",value:i.simbolo,tipo:"text",div:""},
560 560 {titulo:"Tamanho do s&iacute;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 562 {titulo:"Verde:",id:"Everde",size:"10",value:i.verde,tipo:"text",div:""},
563 563 {titulo:"Azul:",id:"Eazul",size:"10",value:i.azul,tipo:"text",div:""},
564 564 {titulo:"Contorno - tamanho do s&iacute;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 566 {titulo:"Contorno - Verde:",id:"Eoverde",size:"10",value:i.overde,tipo:"text",div:""},
567 567 {titulo:"Contorno - Azul:",id:"Eoazul",size:"10",value:i.oazul,tipo:"text",div:""}
568 568 ]
569 569 };
570 570 ins += core_geraLinhas(param);
571 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 587 parametro:{
... ... @@ -867,7 +879,7 @@ i3GEOadmin.variaveis = {
867 879 core_montaEditor("","480px","300px","","Testes",false);
868 880 ins = "<p><b>Select simples:</b> "+dados.sql;
869 881 ins += "<p><b>Mapserver:</b> "+dados.sqlmapserver;
870   - ins += "<p><b>ltima URL:</b><div id='ultimaUrl'></div> ";
  882 + ins += "<p><b>&Uacute;ltima URL:</b><div id='ultimaUrl'></div> ";
871 883 ins += "<p><b>Colunas:</b> "+dados.colunas;
872 884 ins +="<p><input style='position:relative;top:2px' type='checkbox' id='incluirtodascolunas' />Incluir todas as colunas no resultado";
873 885 ins +="<p>Filtro opcional (exemplo: valor = 1)<br>";
... ...
ferramentas/colorpicker/index.htm
... ... @@ -4,10 +4,10 @@
4 4 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
5 5 <style type="text/css">
6 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 11 body {
12 12 margin:0;
13 13 padding:0;border:0px;
... ... @@ -24,8 +24,8 @@ body {
24 24 <!--begin custom header content for this example-->
25 25  
26 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 29 </style>
30 30 <!--end custom header content for this example-->
31 31 <title></title>
... ... @@ -39,18 +39,18 @@ body {
39 39 API -->
40 40 <script type="text/javascript">
41 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 49 images: {
50 50 PICKER_THUMB: window.parent.i3GEO.configura.locaplic+"/pacotes/yui290/build/colorpicker/assets/picker_thumb.png",
51 51 HUE_THUMB: window.parent.i3GEO.configura.locaplic+"/pacotes/yui290/build/colorpicker/assets/hue_thumb.png"
52   - }
53   - });
  52 + }
  53 + });
54 54 var onRgbChange = function(o) {
55 55 };
56 56 picker.on("rgbChange", onRgbChange);
... ... @@ -64,12 +64,13 @@ API --&gt;
64 64 });
65 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 74 function aplicarCor()
74 75 {
75 76 navm = false; // IE
... ...