Commit cf657cb3dc2149f0203619679068319f65aa74f0
1 parent
5cf0f807
Exists in
master
and in
7 other branches
Criação de template para listas do tipo send
Showing
66 changed files
with
1010 additions
and
992 deletions
Show diff stats
interface/carto_ol.htm
| ... | ... | @@ -125,7 +125,7 @@ |
| 125 | 125 | <!--<img style="width:16px;" src="../imagens/gisicons/graticule.png">--> |
| 126 | 126 | <i class="material-icons">grid_on</i> |
| 127 | 127 | </button> |
| 128 | - <button class="hidden-xs hidden-sm" title="{{{x79}}}" data-template="templates/ferramentasLink.html" onclick="i3GEO.marcador.inicia(this)" style="float: left;"> | |
| 128 | + <button class="hidden-xs hidden-sm" title="{{{x79}}}" data-template="templates/ferramentasSend.html" onclick="i3GEO.marcador.inicia(this)" style="float: left;"> | |
| 129 | 129 | <!--<img style="width:20px;" src="../imagens/gisicons/save1.png">--> |
| 130 | 130 | <i class="material-icons">bookmark_border</i> |
| 131 | 131 | </button> | ... | ... |
interface/gm.phtml
| ... | ... | @@ -140,7 +140,7 @@ include("../ms_configura.php"); |
| 140 | 140 | <!--<img style="width:16px;" src="../imagens/gisicons/graticule.png">--> |
| 141 | 141 | <i class="material-icons">grid_on</i> |
| 142 | 142 | </button> |
| 143 | - <button class="hidden-xs hidden-sm" title="{{{x79}}}" data-template="templates/ferramentasLink.html" onclick="i3GEO.marcador.inicia(this)" style="float: left;"> | |
| 143 | + <button class="hidden-xs hidden-sm" title="{{{x79}}}" data-template="templates/ferramentasSend.html" onclick="i3GEO.marcador.inicia(this)" style="float: left;"> | |
| 144 | 144 | <!--<img style="width:20px;" src="../imagens/gisicons/save1.png">--> |
| 145 | 145 | <i class="material-icons">bookmark_border</i> |
| 146 | 146 | </button> | ... | ... |
interface/gmdebug.phtml
| ... | ... | @@ -140,7 +140,7 @@ include("../ms_configura.php"); |
| 140 | 140 | <!--<img style="width:16px;" src="../imagens/gisicons/graticule.png">--> |
| 141 | 141 | <i class="material-icons">grid_on</i> |
| 142 | 142 | </button> |
| 143 | - <button class="hidden-xs hidden-sm" title="{{{x79}}}" data-template="templates/ferramentasLink.html" onclick="i3GEO.marcador.inicia(this)" style="float: left;"> | |
| 143 | + <button class="hidden-xs hidden-sm" title="{{{x79}}}" data-template="templates/ferramentasSend.html" onclick="i3GEO.marcador.inicia(this)" style="float: left;"> | |
| 144 | 144 | <!--<img style="width:20px;" src="../imagens/gisicons/save1.png">--> |
| 145 | 145 | <i class="material-icons">bookmark_border</i> |
| 146 | 146 | </button> | ... | ... |
interface/googlemaps_noite.phtml
| ... | ... | @@ -140,7 +140,7 @@ include("../ms_configura.php"); |
| 140 | 140 | <!--<img style="width:16px;" src="../imagens/gisicons/graticule.png">--> |
| 141 | 141 | <i class="material-icons">grid_on</i> |
| 142 | 142 | </button> |
| 143 | - <button class="hidden-xs hidden-sm" title="{{{x79}}}" data-template="templates/ferramentasLink.html" onclick="i3GEO.marcador.inicia(this)" style="float: left;"> | |
| 143 | + <button class="hidden-xs hidden-sm" title="{{{x79}}}" data-template="templates/ferramentasSend.html" onclick="i3GEO.marcador.inicia(this)" style="float: left;"> | |
| 144 | 144 | <!--<img style="width:20px;" src="../imagens/gisicons/save1.png">--> |
| 145 | 145 | <i class="material-icons">bookmark_border</i> |
| 146 | 146 | </button> | ... | ... |
interface/ol.htm
| ... | ... | @@ -125,7 +125,7 @@ |
| 125 | 125 | <!--<img style="width:16px;" src="../imagens/gisicons/graticule.png">--> |
| 126 | 126 | <i class="material-icons">grid_on</i> |
| 127 | 127 | </button> |
| 128 | - <button class="hidden-xs hidden-sm" title="{{{x79}}}" data-template="templates/ferramentasLink.html" onclick="i3GEO.marcador.inicia(this)" style="float: left;"> | |
| 128 | + <button class="hidden-xs hidden-sm" title="{{{x79}}}" data-template="templates/ferramentasSend.html" onclick="i3GEO.marcador.inicia(this)" style="float: left;"> | |
| 129 | 129 | <!--<img style="width:20px;" src="../imagens/gisicons/save1.png">--> |
| 130 | 130 | <i class="material-icons">bookmark_border</i> |
| 131 | 131 | </button> | ... | ... |
interface/openlayersdebug.htm
| ... | ... | @@ -125,7 +125,7 @@ |
| 125 | 125 | <!--<img style="width:16px;" src="../imagens/gisicons/graticule.png">--> |
| 126 | 126 | <i class="material-icons">grid_on</i> |
| 127 | 127 | </button> |
| 128 | - <button class="hidden-xs hidden-sm" title="{{{x79}}}" data-template="templates/ferramentasLink.html" onclick="i3GEO.marcador.inicia(this)" style="float: left;"> | |
| 128 | + <button class="hidden-xs hidden-sm" title="{{{x79}}}" data-template="templates/ferramentasSend.html" onclick="i3GEO.marcador.inicia(this)" style="float: left;"> | |
| 129 | 129 | <!--<img style="width:20px;" src="../imagens/gisicons/save1.png">--> |
| 130 | 130 | <i class="material-icons">bookmark_border</i> |
| 131 | 131 | </button> | ... | ... |
interface/osm.htm
| ... | ... | @@ -125,7 +125,7 @@ |
| 125 | 125 | <!--<img style="width:16px;" src="../imagens/gisicons/graticule.png">--> |
| 126 | 126 | <i class="material-icons">grid_on</i> |
| 127 | 127 | </button> |
| 128 | - <button class="hidden-xs hidden-sm" title="{{{x79}}}" data-template="templates/ferramentasLink.html" onclick="i3GEO.marcador.inicia(this)" style="float: left;"> | |
| 128 | + <button class="hidden-xs hidden-sm" title="{{{x79}}}" data-template="templates/ferramentasSend.html" onclick="i3GEO.marcador.inicia(this)" style="float: left;"> | |
| 129 | 129 | <!--<img style="width:20px;" src="../imagens/gisicons/save1.png">--> |
| 130 | 130 | <i class="material-icons">bookmark_border</i> |
| 131 | 131 | </button> | ... | ... |
interface/osmdebug.htm
| ... | ... | @@ -125,7 +125,7 @@ |
| 125 | 125 | <!--<img style="width:16px;" src="../imagens/gisicons/graticule.png">--> |
| 126 | 126 | <i class="material-icons">grid_on</i> |
| 127 | 127 | </button> |
| 128 | - <button class="hidden-xs hidden-sm" title="{{{x79}}}" data-template="templates/ferramentasLink.html" onclick="i3GEO.marcador.inicia(this)" style="float: left;"> | |
| 128 | + <button class="hidden-xs hidden-sm" title="{{{x79}}}" data-template="templates/ferramentasSend.html" onclick="i3GEO.marcador.inicia(this)" style="float: left;"> | |
| 129 | 129 | <!--<img style="width:20px;" src="../imagens/gisicons/save1.png">--> |
| 130 | 130 | <i class="material-icons">bookmark_border</i> |
| 131 | 131 | </button> | ... | ... |
| ... | ... | @@ -0,0 +1,15 @@ |
| 1 | + <div class="list-group condensed"> | |
| 2 | + <div class="row-content text-left"> | |
| 3 | + <a role="button" class="btn btn-primary btn-fab btn-fab-max" href="{{{url}}}" target="{{{target}}}"> | |
| 4 | + <span class="material-icons">send</span> | |
| 5 | + </a> | |
| 6 | + <label class="nomeTemaCurto" > | |
| 7 | + <a href="{{{url}}}" target="{{{target}}}" ><h4> | |
| 8 | + {{{nome}}} | |
| 9 | + </h4></a> | |
| 10 | + <h6>{{{descricao}}}</h6> | |
| 11 | + </label> | |
| 12 | + {{{opcional}}} | |
| 13 | + </div> | |
| 14 | + </div> | |
| 15 | + <hr> | |
| 0 | 16 | \ No newline at end of file | ... | ... |
js/janela.js
| ... | ... | @@ -33,7 +33,7 @@ |
| 33 | 33 | * 330, Boston, MA 02111-1307 USA. |
| 34 | 34 | */ |
| 35 | 35 | if (typeof (i3GEO) === 'undefined') { |
| 36 | - var i3GEO = {}; | |
| 36 | + var i3GEO = {}; | |
| 37 | 37 | } |
| 38 | 38 | /** |
| 39 | 39 | * YAHOO.namespace |
| ... | ... | @@ -51,7 +51,7 @@ YAHOO.namespace("i3GEO.janela"); |
| 51 | 51 | * {YAHOO.widget.OverlayManager} |
| 52 | 52 | */ |
| 53 | 53 | YAHOO.i3GEO.janela.manager = new YAHOO.widget.OverlayManager(); |
| 54 | -// para efeitos de compatibilidade com a versão 4.6 | |
| 54 | +//para efeitos de compatibilidade com a versão 4.6 | |
| 55 | 55 | YAHOO.namespace("janelaDoca.xp"); |
| 56 | 56 | YAHOO.janelaDoca.xp.manager = new YAHOO.widget.OverlayManager(); |
| 57 | 57 | /** |
| ... | ... | @@ -65,998 +65,998 @@ YAHOO.janelaDoca.xp.manager = new YAHOO.widget.OverlayManager(); |
| 65 | 65 | */ |
| 66 | 66 | YAHOO.i3GEO.janela.managerAguarde = new YAHOO.widget.OverlayManager(); |
| 67 | 67 | |
| 68 | -// TODO criar janela que permita inserir um link e salva-la junto com o mapa | |
| 68 | +//TODO criar janela que permita inserir um link e salva-la junto com o mapa | |
| 69 | 69 | i3GEO.janela = |
| 70 | - { | |
| 71 | - //Config do plugin que controla a barra de rolagem | |
| 72 | - scrollBar: { | |
| 73 | - theme: "3d-dark", | |
| 74 | - axis: "yx", | |
| 75 | - scrollbarPosition: "inside", | |
| 76 | - advanced:{ autoExpandHorizontalScroll: true }, | |
| 77 | - scrollButtons:{ enable: true } | |
| 78 | - }, | |
| 79 | - /** | |
| 80 | - * Cada vez que uma janela flutuante é criada, esse valor é acrescido de 1 | |
| 81 | - */ | |
| 82 | - ULTIMOZINDEX : 5, | |
| 83 | - //aplica a estilizacao da barra de rolagem | |
| 84 | - //https://github.com/malihu/malihu-custom-scrollbar-plugin | |
| 85 | - applyScrollBar: function(iddiv,seletor,config) { | |
| 86 | - var a = i3GEO.janela.scrollBar; | |
| 87 | - if(config){ | |
| 88 | - a = i3GEO.util.cloneObj(i3GEO.janela.scrollBar); | |
| 89 | - $.each( config, function( key, value ) { | |
| 90 | - a[key] = value; | |
| 91 | - }); | |
| 92 | - } | |
| 93 | - var i = $($i(iddiv)); | |
| 94 | - if(seletor && selector != ""){ | |
| 95 | - i.find(seletor).mCustomScrollbar(a); | |
| 96 | - } else { | |
| 97 | - i.mCustomScrollbar(a); | |
| 98 | - } | |
| 99 | - }, | |
| 100 | - /** | |
| 101 | - * Executa funções default antes de abrir a janela | |
| 102 | - */ | |
| 103 | - prepara : function() { | |
| 104 | - if (typeof (console) !== 'undefined') | |
| 105 | - console.info("i3GEO.janela.prepara()"); | |
| 70 | +{ | |
| 71 | + //Config do plugin que controla a barra de rolagem | |
| 72 | + scrollBar: { | |
| 73 | + theme: "3d-dark", | |
| 74 | + axis: "yx", | |
| 75 | + scrollbarPosition: "inside", | |
| 76 | + advanced:{ autoExpandHorizontalScroll: true }, | |
| 77 | + scrollButtons:{ enable: true } | |
| 78 | + }, | |
| 79 | + /** | |
| 80 | + * Cada vez que uma janela flutuante é criada, esse valor é acrescido de 1 | |
| 81 | + */ | |
| 82 | + ULTIMOZINDEX : 5, | |
| 83 | + //aplica a estilizacao da barra de rolagem | |
| 84 | + //https://github.com/malihu/malihu-custom-scrollbar-plugin | |
| 85 | + applyScrollBar: function(iddiv,seletor,config) { | |
| 86 | + var a = i3GEO.janela.scrollBar; | |
| 87 | + if(config){ | |
| 88 | + a = i3GEO.util.cloneObj(i3GEO.janela.scrollBar); | |
| 89 | + $.each( config, function( key, value ) { | |
| 90 | + a[key] = value; | |
| 91 | + }); | |
| 92 | + } | |
| 93 | + var i = $($i(iddiv)); | |
| 94 | + if(seletor && selector != ""){ | |
| 95 | + i.find(seletor).mCustomScrollbar(a); | |
| 96 | + } else { | |
| 97 | + i.mCustomScrollbar(a); | |
| 98 | + } | |
| 99 | + }, | |
| 100 | + /** | |
| 101 | + * Executa funções default antes de abrir a janela | |
| 102 | + */ | |
| 103 | + prepara : function() { | |
| 104 | + if (typeof (console) !== 'undefined') | |
| 105 | + console.info("i3GEO.janela.prepara()"); | |
| 106 | 106 | |
| 107 | - // | |
| 108 | - // esconde o box de zoom e outros objetos temporários se | |
| 109 | - // estiverem visíveis | |
| 110 | - // | |
| 111 | - var iu = i3GEO.util; | |
| 112 | - // iu.escondePin(); | |
| 113 | - iu.escondeBox(); | |
| 114 | - }, | |
| 115 | - /** | |
| 116 | - * Function: cria | |
| 117 | - * | |
| 118 | - * Cria uma janela flutuante. | |
| 119 | - * | |
| 120 | - * Vc pode obter o elemento HTML interno da janela por meio de: | |
| 121 | - * | |
| 122 | - * retorno[2].innerHTML | |
| 123 | - * | |
| 124 | - * Vc pode recuperar uma janela com o comando | |
| 125 | - * | |
| 126 | - * YAHOO.i3GEO.janela.manager.find(id); | |
| 127 | - * | |
| 128 | - * Parametros: | |
| 129 | - * | |
| 130 | - * {integer} - largura da janela em pixels | |
| 131 | - * | |
| 132 | - * {integer} - altura da janela em pixels | |
| 133 | - * | |
| 134 | - * {String} - URL que será incluída no SRC do iframe interno da janela. Se for "", o iframe não será | |
| 135 | - * criado | |
| 136 | - * | |
| 137 | - * {Integer} - posição x da janela em pixels. Se for "" será fixada no centro | |
| 138 | - * | |
| 139 | - * {Integer} - posição y da janela em pixels. Se for "" será fixada no centro | |
| 140 | - * | |
| 141 | - * {String} - texto do cabeçalho | |
| 142 | - * | |
| 143 | - * {String} - (opcional) nome que será dado ao id que conterá a janela. Se não for definido, será usado | |
| 144 | - * o id="wdoca". O id do iframe interno é sempre igual ao id + a letra i. Por default, será "wdocai". O id do | |
| 145 | - * cabçalho será igual a id+"_cabecalho" e o id do corpo será id+"_corpo". O id também é | |
| 146 | - * utilizado na função de fechamento da janela. Quando for usada a técnica de script tag, ao fechar a janela a | |
| 147 | - * função de mesmo nome do id será definida como "null". | |
| 148 | - * | |
| 149 | - * {Boolean} - (opcional) indica se a janela bloqueará as inferiores ou não. Por default é false | |
| 150 | - * | |
| 151 | - * {String} - (opcional) classe CSS que será aplicada a barra de menu. Por default o valor é hd2. Na interface Google | |
| 152 | - * Earth, esse valor é sempre alterado para "hd". | |
| 153 | - * | |
| 154 | - * {function} - (opcional) funcao que será executada quando o usuário clicar no cabecalho | |
| 155 | - * | |
| 156 | - * {function} - (opcional) funcao que será executada para minimizar a janela | |
| 157 | - * | |
| 158 | - * {function} - (opcional) funcao que será executada para alterar o tamanho da janela | |
| 159 | - * | |
| 160 | - * {boolean} - (opcional) a janela pode ser redimensionada ou nao pelo usuario | |
| 161 | - * | |
| 162 | - * {string} - (opcional) icone que será mostrado no canto superior esquerdo da janela | |
| 163 | - * | |
| 164 | - * {funcao} - funcao executada quando o icone + for clicado | |
| 165 | - * | |
| 166 | - * {sim|nao} - (opcional) indica se o efeito de transparência nos eventos mouseover/out será aplicado | |
| 167 | - * | |
| 168 | - * Return: | |
| 169 | - * | |
| 170 | - * {Array} Array contendo objeto YAHOO.panel criado,elemento HTML com o cabecalho, elemento HTML com o corpo | |
| 171 | - */ | |
| 172 | - cria : function(wlargura, waltura, wsrc, nx, ny, texto, id, modal, classe, funcaoCabecalho, funcaoMinimiza, funcaoAposRedim, | |
| 173 | - dimensionavel, icone, funcaoDuplica, opacidade, classeAdicional, idajuda) { | |
| 174 | - if (typeof (console) !== 'undefined') | |
| 175 | - console.info("i3GEO.janela.cria()"); | |
| 107 | + // | |
| 108 | + // esconde o box de zoom e outros objetos temporários se | |
| 109 | + // estiverem visíveis | |
| 110 | + // | |
| 111 | + var iu = i3GEO.util; | |
| 112 | + // iu.escondePin(); | |
| 113 | + iu.escondeBox(); | |
| 114 | + }, | |
| 115 | + /** | |
| 116 | + * Function: cria | |
| 117 | + * | |
| 118 | + * Cria uma janela flutuante. | |
| 119 | + * | |
| 120 | + * Vc pode obter o elemento HTML interno da janela por meio de: | |
| 121 | + * | |
| 122 | + * retorno[2].innerHTML | |
| 123 | + * | |
| 124 | + * Vc pode recuperar uma janela com o comando | |
| 125 | + * | |
| 126 | + * YAHOO.i3GEO.janela.manager.find(id); | |
| 127 | + * | |
| 128 | + * Parametros: | |
| 129 | + * | |
| 130 | + * {integer} - largura da janela em pixels | |
| 131 | + * | |
| 132 | + * {integer} - altura da janela em pixels | |
| 133 | + * | |
| 134 | + * {String} - URL que será incluída no SRC do iframe interno da janela. Se for "", o iframe não será | |
| 135 | + * criado | |
| 136 | + * | |
| 137 | + * {Integer} - posição x da janela em pixels. Se for "" será fixada no centro | |
| 138 | + * | |
| 139 | + * {Integer} - posição y da janela em pixels. Se for "" será fixada no centro | |
| 140 | + * | |
| 141 | + * {String} - texto do cabeçalho | |
| 142 | + * | |
| 143 | + * {String} - (opcional) nome que será dado ao id que conterá a janela. Se não for definido, será usado | |
| 144 | + * o id="wdoca". O id do iframe interno é sempre igual ao id + a letra i. Por default, será "wdocai". O id do | |
| 145 | + * cabçalho será igual a id+"_cabecalho" e o id do corpo será id+"_corpo". O id também é | |
| 146 | + * utilizado na função de fechamento da janela. Quando for usada a técnica de script tag, ao fechar a janela a | |
| 147 | + * função de mesmo nome do id será definida como "null". | |
| 148 | + * | |
| 149 | + * {Boolean} - (opcional) indica se a janela bloqueará as inferiores ou não. Por default é false | |
| 150 | + * | |
| 151 | + * {String} - (opcional) classe CSS que será aplicada a barra de menu. Por default o valor é hd2. Na interface Google | |
| 152 | + * Earth, esse valor é sempre alterado para "hd". | |
| 153 | + * | |
| 154 | + * {function} - (opcional) funcao que será executada quando o usuário clicar no cabecalho | |
| 155 | + * | |
| 156 | + * {function} - (opcional) funcao que será executada para minimizar a janela | |
| 157 | + * | |
| 158 | + * {function} - (opcional) funcao que será executada para alterar o tamanho da janela | |
| 159 | + * | |
| 160 | + * {boolean} - (opcional) a janela pode ser redimensionada ou nao pelo usuario | |
| 161 | + * | |
| 162 | + * {string} - (opcional) icone que será mostrado no canto superior esquerdo da janela | |
| 163 | + * | |
| 164 | + * {funcao} - funcao executada quando o icone + for clicado | |
| 165 | + * | |
| 166 | + * {sim|nao} - (opcional) indica se o efeito de transparência nos eventos mouseover/out será aplicado | |
| 167 | + * | |
| 168 | + * Return: | |
| 169 | + * | |
| 170 | + * {Array} Array contendo objeto YAHOO.panel criado,elemento HTML com o cabecalho, elemento HTML com o corpo | |
| 171 | + */ | |
| 172 | + cria : function(wlargura, waltura, wsrc, nx, ny, texto, id, modal, classe, funcaoCabecalho, funcaoMinimiza, funcaoAposRedim, | |
| 173 | + dimensionavel, icone, funcaoDuplica, opacidade, classeAdicional, idajuda) { | |
| 174 | + if (typeof (console) !== 'undefined') | |
| 175 | + console.info("i3GEO.janela.cria()"); | |
| 176 | 176 | |
| 177 | - if (arguments.length < 13 ) { | |
| 178 | - dimensionavel = true; | |
| 179 | - } | |
| 180 | - if(arguments.length < 17){ | |
| 181 | - classeAdicional = "i3geo6"; | |
| 182 | - } | |
| 183 | - if (!icone) { | |
| 184 | - icone = ""; | |
| 185 | - } | |
| 186 | - var i, wlargurA, ins, novoel, wdocaiframe, temp, fix, underlay, ifr, janela; | |
| 187 | - if ($i(id)) { | |
| 188 | - janela = YAHOO.i3GEO.janela.manager.find(id); | |
| 189 | - janela.show(); | |
| 190 | - janela.bringToTop(); | |
| 191 | - return; | |
| 192 | - } | |
| 193 | - i3GEO.janela.prepara(); | |
| 194 | - // define os parametros default | |
| 195 | - if (!classe || classe == "") { | |
| 196 | - classe = "hd"; | |
| 197 | - } | |
| 198 | - if (!id || id === "") { | |
| 199 | - id = "wdoca"; | |
| 200 | - } | |
| 201 | - if (!modal || modal === "") { | |
| 202 | - modal = false; | |
| 203 | - } | |
| 204 | - ifr = false; | |
| 205 | - fix = "contained"; | |
| 206 | - if (nx === "" || nx === "center") { | |
| 207 | - fix = true; | |
| 208 | - } | |
| 209 | - // no IE, com CSS3, a sombra não funciona | |
| 210 | - if (modal === true) { | |
| 211 | - underlay = "none"; | |
| 212 | - } else { | |
| 213 | - underlay = "shadow"; | |
| 214 | - } | |
| 215 | - // cria as marcações html para a janela | |
| 216 | - temp = navm ? 0 : 2; | |
| 217 | - wlargurA = parseInt(wlargura, 10) + temp + "px"; | |
| 218 | - ins = '<div id="' + id + '_cabecalho" class="' + classe + ' ' + classeAdicional + '" >'; | |
| 219 | - if (i3GEO.configura !== undefined) { | |
| 220 | - ins += | |
| 221 | - "<img id='" + id | |
| 222 | - + "_imagemCabecalho' class='i3GeoAguardeJanela' style='visibility:hidden;' src=\'" | |
| 223 | - + i3GEO.configura.locaplic | |
| 224 | - + "/imagens/aguarde2.gif\' />"; | |
| 225 | - } | |
| 226 | - if (icone != "") { | |
| 227 | - ins += "<img class='i3GeoIconeJanela' src='" + icone + "' >"; | |
| 228 | - } | |
| 229 | - if(idajuda){ | |
| 230 | - ins += texto; | |
| 231 | - } else { | |
| 232 | - ins += "<span style='font-size:10px;'>" + texto + "</span>"; | |
| 233 | - } | |
| 234 | - if (funcaoDuplica && funcaoDuplica != "") { | |
| 235 | - ins += "<div id='" + id + "_duplicaJanela' class='container-duplica'></div>"; | |
| 236 | - } | |
| 237 | - if (funcaoMinimiza && funcaoMinimiza != "") { | |
| 238 | - ins += "<div id='" + id + "_minimizaCabecalho' class='container-minimiza'></div>"; | |
| 239 | - } | |
| 240 | - ins += '</div><div id="' + id + '_corpo" class="bd ' + classeAdicional + '" style="display:block;padding:0px">'; | |
| 241 | - if (wsrc !== "") { | |
| 242 | - ins += '<div class="container-fluid"><iframe name="' + id + 'i" id="' + id + 'i" valign="top" style="border:0px white solid;width:100%"></iframe></div>'; | |
| 243 | - } | |
| 244 | - ins += '</div>'; | |
| 245 | - if(idajuda){ | |
| 246 | - ins += '<div class="ft ' + classeAdicional + '"><i onclick="i3GEO.ajuda.ferramenta(\''+idajuda+'\')" class="material-icons iconeAjudaFerramentas" >help</i></div>'; | |
| 247 | - } else { | |
| 248 | - ins += '<div class="ft ' + classeAdicional + '"></div>'; | |
| 249 | - } | |
| 250 | - novoel = document.createElement("div"); | |
| 251 | - novoel.id = id; | |
| 252 | - novoel.style.display = "block"; | |
| 253 | - novoel.innerHTML = ins; | |
| 254 | - document.body.appendChild(novoel); | |
| 255 | - wdocaiframe = $i(id + "i"); | |
| 256 | - if (wdocaiframe) { | |
| 257 | - temp = wdocaiframe.style; | |
| 258 | - // temp.width = parseInt(wlargura,10)-12 + "px"; | |
| 259 | - temp.height = waltura; | |
| 260 | - temp.display = "block"; | |
| 261 | - wdocaiframe.src = wsrc; | |
| 262 | - } else { | |
| 263 | - if (waltura !== "auto") { | |
| 264 | - $i(id + '_corpo').style.height = parseInt(waltura, 10) + "px"; | |
| 265 | - } | |
| 266 | - $i(id + '_corpo').style.width = '100%'; // parseInt(wlargura,10)+"px"; | |
| 267 | - $i(id + '_corpo').style.overflow = "auto"; | |
| 268 | - } | |
| 269 | - // cria a janela | |
| 270 | - if (waltura === "auto" || dimensionavel == false) { | |
| 271 | - janela = new YAHOO.widget.Panel(id, { | |
| 272 | - iframe : ifr, | |
| 273 | - modal : modal, | |
| 274 | - width : wlargurA, | |
| 275 | - underlay : underlay, | |
| 276 | - fixedcenter : fix, | |
| 277 | - constraintoviewport : true, | |
| 278 | - visible : true, | |
| 279 | - monitorresize : false, | |
| 280 | - dragOnly : true, | |
| 281 | - keylisteners : null | |
| 282 | - }); | |
| 283 | - } else { | |
| 284 | - janela = new YAHOO.widget.Panel(id, { | |
| 285 | - hideMode : 'offsets', | |
| 286 | - iframe : ifr, | |
| 287 | - underlay : underlay, | |
| 288 | - modal : modal, | |
| 289 | - width : wlargurA, | |
| 290 | - fixedcenter : fix, | |
| 291 | - constraintoviewport : true, | |
| 292 | - visible : true, | |
| 293 | - monitorresize : false, | |
| 294 | - dragOnly : true, | |
| 295 | - keylisteners : null | |
| 296 | - }); | |
| 297 | - } | |
| 298 | - if (YAHOO.util.Resize && dimensionavel == true) { | |
| 299 | - var resize = new YAHOO.util.Resize(id, { | |
| 300 | - handles : [ | |
| 301 | - 'br' | |
| 302 | - ], | |
| 303 | - autoRatio : false, | |
| 304 | - minWidth : 10, | |
| 305 | - minHeight : 10, | |
| 306 | - status : false, | |
| 307 | - proxy : true, | |
| 308 | - ghost : false, | |
| 309 | - animate : false, | |
| 310 | - useShim : true | |
| 311 | - }); | |
| 312 | - resize.on('resize', function(args) { | |
| 313 | - this.cfg.setProperty("height", args.height + "px"); | |
| 314 | - if (wdocaiframe) { | |
| 315 | - wdocaiframe.style.height = args.height - 50 + "px"; | |
| 316 | - } | |
| 317 | - }, janela, true); | |
| 318 | - if (funcaoAposRedim && funcaoAposRedim != "") { | |
| 319 | - resize.on('endResize', function(args) { | |
| 320 | - i3GEO.janela.minimiza(); | |
| 321 | - funcaoAposRedim.call(); | |
| 322 | - }, janela, true); | |
| 323 | - } | |
| 324 | - resize.getProxyEl().style.height = "0px"; | |
| 325 | - } | |
| 177 | + if (arguments.length < 13 ) { | |
| 178 | + dimensionavel = true; | |
| 179 | + } | |
| 180 | + if(arguments.length < 17){ | |
| 181 | + classeAdicional = "i3geo6"; | |
| 182 | + } | |
| 183 | + if (!icone) { | |
| 184 | + icone = ""; | |
| 185 | + } | |
| 186 | + var i, wlargurA, ins, novoel, wdocaiframe, temp, fix, underlay, ifr, janela; | |
| 187 | + if ($i(id)) { | |
| 188 | + janela = YAHOO.i3GEO.janela.manager.find(id); | |
| 189 | + janela.show(); | |
| 190 | + janela.bringToTop(); | |
| 191 | + return; | |
| 192 | + } | |
| 193 | + i3GEO.janela.prepara(); | |
| 194 | + // define os parametros default | |
| 195 | + if (!classe || classe == "") { | |
| 196 | + classe = "hd"; | |
| 197 | + } | |
| 198 | + if (!id || id === "") { | |
| 199 | + id = "wdoca"; | |
| 200 | + } | |
| 201 | + if (!modal || modal === "") { | |
| 202 | + modal = false; | |
| 203 | + } | |
| 204 | + ifr = false; | |
| 205 | + fix = "contained"; | |
| 206 | + if (nx === "" || nx === "center") { | |
| 207 | + fix = true; | |
| 208 | + } | |
| 209 | + // no IE, com CSS3, a sombra não funciona | |
| 210 | + if (modal === true) { | |
| 211 | + underlay = "none"; | |
| 212 | + } else { | |
| 213 | + underlay = "shadow"; | |
| 214 | + } | |
| 215 | + // cria as marcações html para a janela | |
| 216 | + temp = navm ? 0 : 2; | |
| 217 | + wlargurA = parseInt(wlargura, 10) + temp + "px"; | |
| 218 | + ins = '<div id="' + id + '_cabecalho" class="' + classe + ' ' + classeAdicional + '" >'; | |
| 219 | + if (i3GEO.configura !== undefined) { | |
| 220 | + ins += | |
| 221 | + "<img id='" + id | |
| 222 | + + "_imagemCabecalho' class='i3GeoAguardeJanela' style='visibility:hidden;' src=\'" | |
| 223 | + + i3GEO.configura.locaplic | |
| 224 | + + "/imagens/aguarde2.gif\' />"; | |
| 225 | + } | |
| 226 | + if (icone != "") { | |
| 227 | + ins += "<img class='i3GeoIconeJanela' src='" + icone + "' >"; | |
| 228 | + } | |
| 229 | + if(idajuda){ | |
| 230 | + ins += texto; | |
| 231 | + } else { | |
| 232 | + ins += "<span style='font-size:10px;'>" + texto + "</span>"; | |
| 233 | + } | |
| 234 | + if (funcaoDuplica && funcaoDuplica != "") { | |
| 235 | + ins += "<div id='" + id + "_duplicaJanela' class='container-duplica'></div>"; | |
| 236 | + } | |
| 237 | + if (funcaoMinimiza && funcaoMinimiza != "") { | |
| 238 | + ins += "<div id='" + id + "_minimizaCabecalho' class='container-minimiza'></div>"; | |
| 239 | + } | |
| 240 | + ins += '</div><div id="' + id + '_corpo" class="bd ' + classeAdicional + '" style="display:block;padding:0px">'; | |
| 241 | + if (wsrc !== "") { | |
| 242 | + ins += '<div class="container-fluid"><iframe name="' + id + 'i" id="' + id + 'i" valign="top" style="border:0px white solid;width:100%"></iframe></div>'; | |
| 243 | + } | |
| 244 | + ins += '</div>'; | |
| 245 | + if(idajuda){ | |
| 246 | + ins += '<div class="ft ' + classeAdicional + '"><i onclick="i3GEO.ajuda.ferramenta(\''+idajuda+'\')" class="material-icons iconeAjudaFerramentas" >help</i></div>'; | |
| 247 | + } else { | |
| 248 | + ins += '<div class="ft ' + classeAdicional + '"></div>'; | |
| 249 | + } | |
| 250 | + novoel = document.createElement("div"); | |
| 251 | + novoel.id = id; | |
| 252 | + novoel.style.display = "block"; | |
| 253 | + novoel.innerHTML = ins; | |
| 254 | + document.body.appendChild(novoel); | |
| 255 | + wdocaiframe = $i(id + "i"); | |
| 256 | + if (wdocaiframe) { | |
| 257 | + temp = wdocaiframe.style; | |
| 258 | + // temp.width = parseInt(wlargura,10)-12 + "px"; | |
| 259 | + temp.height = waltura; | |
| 260 | + temp.display = "block"; | |
| 261 | + wdocaiframe.src = wsrc; | |
| 262 | + } else { | |
| 263 | + if (waltura !== "auto") { | |
| 264 | + $i(id + '_corpo').style.height = parseInt(waltura, 10) + "px"; | |
| 265 | + } | |
| 266 | + $i(id + '_corpo').style.width = '100%'; // parseInt(wlargura,10)+"px"; | |
| 267 | + $i(id + '_corpo').style.overflow = "auto"; | |
| 268 | + } | |
| 269 | + // cria a janela | |
| 270 | + if (waltura === "auto" || dimensionavel == false) { | |
| 271 | + janela = new YAHOO.widget.Panel(id, { | |
| 272 | + iframe : ifr, | |
| 273 | + modal : modal, | |
| 274 | + width : wlargurA, | |
| 275 | + underlay : underlay, | |
| 276 | + fixedcenter : fix, | |
| 277 | + constraintoviewport : true, | |
| 278 | + visible : true, | |
| 279 | + monitorresize : false, | |
| 280 | + dragOnly : true, | |
| 281 | + keylisteners : null | |
| 282 | + }); | |
| 283 | + } else { | |
| 284 | + janela = new YAHOO.widget.Panel(id, { | |
| 285 | + hideMode : 'offsets', | |
| 286 | + iframe : ifr, | |
| 287 | + underlay : underlay, | |
| 288 | + modal : modal, | |
| 289 | + width : wlargurA, | |
| 290 | + fixedcenter : fix, | |
| 291 | + constraintoviewport : true, | |
| 292 | + visible : true, | |
| 293 | + monitorresize : false, | |
| 294 | + dragOnly : true, | |
| 295 | + keylisteners : null | |
| 296 | + }); | |
| 297 | + } | |
| 298 | + if (YAHOO.util.Resize && dimensionavel == true) { | |
| 299 | + var resize = new YAHOO.util.Resize(id, { | |
| 300 | + handles : [ | |
| 301 | + 'br' | |
| 302 | + ], | |
| 303 | + autoRatio : false, | |
| 304 | + minWidth : 10, | |
| 305 | + minHeight : 10, | |
| 306 | + status : false, | |
| 307 | + proxy : true, | |
| 308 | + ghost : false, | |
| 309 | + animate : false, | |
| 310 | + useShim : true | |
| 311 | + }); | |
| 312 | + resize.on('resize', function(args) { | |
| 313 | + this.cfg.setProperty("height", args.height + "px"); | |
| 314 | + if (wdocaiframe) { | |
| 315 | + wdocaiframe.style.height = args.height - 50 + "px"; | |
| 316 | + } | |
| 317 | + }, janela, true); | |
| 318 | + if (funcaoAposRedim && funcaoAposRedim != "") { | |
| 319 | + resize.on('endResize', function(args) { | |
| 320 | + i3GEO.janela.minimiza(); | |
| 321 | + funcaoAposRedim.call(); | |
| 322 | + }, janela, true); | |
| 323 | + } | |
| 324 | + resize.getProxyEl().style.height = "0px"; | |
| 325 | + } | |
| 326 | 326 | |
| 327 | - if (nx !== "" && nx !== "center") { | |
| 328 | - janela.moveTo(nx, ny + 50); | |
| 329 | - } | |
| 330 | - YAHOO.i3GEO.janela.manager.register(janela); | |
| 331 | - janela.cfg.setProperty("effect", [ | |
| 332 | - { | |
| 333 | - effect : YAHOO.widget.ContainerEffect.FADE, | |
| 334 | - duration : 0.5 | |
| 335 | - } | |
| 336 | - ]); | |
| 327 | + if (nx !== "" && nx !== "center") { | |
| 328 | + janela.moveTo(nx, ny + 50); | |
| 329 | + } | |
| 330 | + YAHOO.i3GEO.janela.manager.register(janela); | |
| 331 | + janela.cfg.setProperty("effect", [ | |
| 332 | + { | |
| 333 | + effect : YAHOO.widget.ContainerEffect.FADE, | |
| 334 | + duration : 0.5 | |
| 335 | + } | |
| 336 | + ]); | |
| 337 | 337 | |
| 338 | - janela.cfg.setProperty("zIndex", [ | |
| 339 | - 4 | |
| 340 | - ]); | |
| 341 | - janela.render(); | |
| 338 | + janela.cfg.setProperty("zIndex", [ | |
| 339 | + 4 | |
| 340 | + ]); | |
| 341 | + janela.render(); | |
| 342 | 342 | |
| 343 | - if (ifr === true) { | |
| 344 | - janela.iframe.style.zIndex = 4; | |
| 345 | - } | |
| 343 | + if (ifr === true) { | |
| 344 | + janela.iframe.style.zIndex = 4; | |
| 345 | + } | |
| 346 | 346 | |
| 347 | - YAHOO.util.Event.addListener($i(id + '_corpo'), "click", YAHOO.util.Event.stopPropagation); | |
| 348 | - // finaliza | |
| 349 | - if (funcaoDuplica && funcaoDuplica != "") { | |
| 350 | - $i(id + '_duplicaJanela').onclick = funcaoDuplica; | |
| 351 | - } | |
| 352 | - if (funcaoCabecalho && funcaoCabecalho != "") { | |
| 353 | - $i(id + '_cabecalho').onclick = funcaoCabecalho; | |
| 354 | - } | |
| 355 | - if (funcaoMinimiza && funcaoMinimiza != "") { | |
| 356 | - $i(id + "_minimizaCabecalho").onclick = funcaoMinimiza; | |
| 357 | - } | |
| 347 | + YAHOO.util.Event.addListener($i(id + '_corpo'), "click", YAHOO.util.Event.stopPropagation); | |
| 348 | + // finaliza | |
| 349 | + if (funcaoDuplica && funcaoDuplica != "") { | |
| 350 | + $i(id + '_duplicaJanela').onclick = funcaoDuplica; | |
| 351 | + } | |
| 352 | + if (funcaoCabecalho && funcaoCabecalho != "") { | |
| 353 | + $i(id + '_cabecalho').onclick = funcaoCabecalho; | |
| 354 | + } | |
| 355 | + if (funcaoMinimiza && funcaoMinimiza != "") { | |
| 356 | + $i(id + "_minimizaCabecalho").onclick = funcaoMinimiza; | |
| 357 | + } | |
| 358 | 358 | |
| 359 | - YAHOO.util.Event.addListener(janela.close, "click", i3GEO.janela.fecha, janela, { | |
| 360 | - id : id | |
| 361 | - }, true); | |
| 359 | + YAHOO.util.Event.addListener(janela.close, "click", i3GEO.janela.fecha, janela, { | |
| 360 | + id : id | |
| 361 | + }, true); | |
| 362 | 362 | |
| 363 | - temp = $i(id + "_c"); | |
| 364 | - if(temp && temp.style){ | |
| 365 | - temp.style.maxWidth = "90%"; | |
| 366 | - //temp.style.zIndex = 50000; | |
| 367 | - } | |
| 368 | - temp = $i(id); | |
| 369 | - if(temp && temp.style){ | |
| 370 | - temp.style.maxWidth = "100%"; | |
| 371 | - } | |
| 372 | - temp = $i(id + "_corpo"); | |
| 363 | + temp = $i(id + "_c"); | |
| 364 | + if(temp && temp.style){ | |
| 365 | + temp.style.maxWidth = "90%"; | |
| 366 | + //temp.style.zIndex = 50000; | |
| 367 | + } | |
| 368 | + temp = $i(id); | |
| 369 | + if(temp && temp.style){ | |
| 370 | + temp.style.maxWidth = "100%"; | |
| 371 | + } | |
| 372 | + temp = $i(id + "_corpo"); | |
| 373 | 373 | |
| 374 | - janela.bringToTop(); | |
| 375 | - if(waltura !== "auto" && wsrc == ""){ | |
| 376 | - i3GEO.janela.applyScrollBar(temp.id,"",{live:true,liveSelector:".customScrollBar"}); | |
| 377 | - i3GEO.janela.applyScrollBar(temp.id,"",{live:true,liveSelector:".customScrollBarXY",advanced:{ autoExpandHorizontalScroll: false }}); | |
| 378 | - } | |
| 379 | - return ([ | |
| 380 | - janela, $i(id + "_cabecalho"), temp | |
| 381 | - ]); | |
| 382 | - }, | |
| 383 | - /** | |
| 384 | - * Minimiza uma janela na forma de um icone com opcoes de fechar e abrir novamente | |
| 385 | - * | |
| 386 | - * Parametro: | |
| 387 | - * | |
| 388 | - * {string} - id da janela | |
| 389 | - * | |
| 390 | - * {number} - largura em pixels da janela iconizada | |
| 391 | - * | |
| 392 | - * {string} - (opcional) id do rodape da janela | |
| 393 | - */ | |
| 394 | - iconiza : function(id,w,rodape){ | |
| 395 | - var j,r,t = i3GEO.janela.minimiza(id, w+"px",rodape); | |
| 396 | - r = YAHOO.util.Resize.getResizeById(id); | |
| 397 | - j = $i(id + "I"); | |
| 398 | - if(!j){ | |
| 399 | - return; | |
| 400 | - } | |
| 401 | - if (t === "min") { | |
| 402 | - j.style.display = "none"; | |
| 403 | - if(r){ | |
| 404 | - r.lock(); | |
| 405 | - } | |
| 406 | - if(rodape){ | |
| 407 | - $i(rodape).style.display = "none"; | |
| 408 | - } | |
| 409 | - } else { | |
| 410 | - j.style.display = "block"; | |
| 411 | - if(r){ | |
| 412 | - r.unlock(); | |
| 413 | - } | |
| 414 | - if(rodape){ | |
| 415 | - $i(rodape).style.display = "block"; | |
| 416 | - } | |
| 417 | - } | |
| 418 | - }, | |
| 419 | - /** | |
| 420 | - * Minimiza ou maximiza a janela | |
| 421 | - * | |
| 422 | - * Parametro: | |
| 423 | - * | |
| 424 | - * {string} - prefixo utilizado na composição do id da janela | |
| 425 | - * | |
| 426 | - * {string} - (opcional) largura minima da janela | |
| 427 | - * | |
| 428 | - * Return: | |
| 429 | - * | |
| 430 | - * {min|max} indicativo se minimizou ou maximizou | |
| 431 | - */ | |
| 432 | - minimiza : function(id, min) { | |
| 433 | - var temp = $i(id + "_corpo"), n, i, m = YAHOO.i3GEO.janela.manager.find(id), c = $i(id), t = "min", r = YAHOO.util.Resize.getResizeById(id), | |
| 434 | - tipo = ""; | |
| 374 | + janela.bringToTop(); | |
| 375 | + if(waltura !== "auto" && wsrc == ""){ | |
| 376 | + i3GEO.janela.applyScrollBar(temp.id,"",{live:true,liveSelector:".customScrollBar"}); | |
| 377 | + i3GEO.janela.applyScrollBar(temp.id,"",{live:true,liveSelector:".customScrollBarXY",advanced:{ autoExpandHorizontalScroll: false }}); | |
| 378 | + } | |
| 379 | + return ([ | |
| 380 | + janela, $i(id + "_cabecalho"), temp | |
| 381 | + ]); | |
| 382 | + }, | |
| 383 | + /** | |
| 384 | + * Minimiza uma janela na forma de um icone com opcoes de fechar e abrir novamente | |
| 385 | + * | |
| 386 | + * Parametro: | |
| 387 | + * | |
| 388 | + * {string} - id da janela | |
| 389 | + * | |
| 390 | + * {number} - largura em pixels da janela iconizada | |
| 391 | + * | |
| 392 | + * {string} - (opcional) id do rodape da janela | |
| 393 | + */ | |
| 394 | + iconiza : function(id,w,rodape){ | |
| 395 | + var j,r,t = i3GEO.janela.minimiza(id, w+"px",rodape); | |
| 396 | + r = YAHOO.util.Resize.getResizeById(id); | |
| 397 | + j = $i(id + "I"); | |
| 398 | + if(!j){ | |
| 399 | + return; | |
| 400 | + } | |
| 401 | + if (t === "min") { | |
| 402 | + j.style.display = "none"; | |
| 403 | + if(r){ | |
| 404 | + r.lock(); | |
| 405 | + } | |
| 406 | + if(rodape){ | |
| 407 | + $i(rodape).style.display = "none"; | |
| 408 | + } | |
| 409 | + } else { | |
| 410 | + j.style.display = "block"; | |
| 411 | + if(r){ | |
| 412 | + r.unlock(); | |
| 413 | + } | |
| 414 | + if(rodape){ | |
| 415 | + $i(rodape).style.display = "block"; | |
| 416 | + } | |
| 417 | + } | |
| 418 | + }, | |
| 419 | + /** | |
| 420 | + * Minimiza ou maximiza a janela | |
| 421 | + * | |
| 422 | + * Parametro: | |
| 423 | + * | |
| 424 | + * {string} - prefixo utilizado na composição do id da janela | |
| 425 | + * | |
| 426 | + * {string} - (opcional) largura minima da janela | |
| 427 | + * | |
| 428 | + * Return: | |
| 429 | + * | |
| 430 | + * {min|max} indicativo se minimizou ou maximizou | |
| 431 | + */ | |
| 432 | + minimiza : function(id, min) { | |
| 433 | + var temp = $i(id + "_corpo"), n, i, m = YAHOO.i3GEO.janela.manager.find(id), c = $i(id), t = "min", r = YAHOO.util.Resize.getResizeById(id), | |
| 434 | + tipo = ""; | |
| 435 | 435 | |
| 436 | - if (temp) { | |
| 437 | - if (temp.style.display === "block") { | |
| 438 | - temp.style.display = "none"; | |
| 439 | - if (m) { | |
| 440 | - m.hideIframe(); | |
| 441 | - } | |
| 442 | - m.winicial = c.style.width; | |
| 443 | - if (min) { | |
| 444 | - c.style.width = parseInt(min,10)+"px"; | |
| 445 | - } | |
| 446 | - tipo = "none"; | |
| 447 | - if(r){ | |
| 448 | - r.lock(); | |
| 449 | - } | |
| 450 | - } else { | |
| 451 | - temp.style.display = "block"; | |
| 452 | - if (m) { | |
| 453 | - m.showIframe(); | |
| 454 | - } | |
| 455 | - c.style.width = m.winicial; | |
| 456 | - t = "max"; | |
| 457 | - tipo = "block"; | |
| 458 | - if(r){ | |
| 459 | - r.unlock(); | |
| 460 | - } | |
| 461 | - } | |
| 462 | - } | |
| 463 | - temp = $i(id + "_c"); | |
| 464 | - if (temp) { | |
| 465 | - $(temp).find(".comboTemasCabecalhoBs,.ft,.yui-resize-handle,.underlay,.bd").css("display",tipo); | |
| 466 | - } | |
| 467 | - temp = $i(id + "_corpo"); | |
| 468 | - if (temp) { | |
| 469 | - temp.style.display = tipo; | |
| 470 | - } | |
| 471 | - temp = $i(id); | |
| 472 | - if (temp) { | |
| 473 | - if (tipo === "block") { | |
| 474 | - temp.style.height = "100%"; | |
| 475 | - } else { | |
| 476 | - temp.style.height = "10%"; | |
| 477 | - } | |
| 478 | - } | |
| 479 | - return t; | |
| 480 | - }, | |
| 481 | - /** | |
| 482 | - * Elimina alguns objetos que são comumente adicionados por algumas | |
| 483 | - * operações do i3geo como box, pin | |
| 484 | - * | |
| 485 | - * Parametros: | |
| 486 | - * | |
| 487 | - * event {objeto} - objeto YUI do evento que gerou o fechamento da janela | |
| 488 | - * | |
| 489 | - * args {objeto} - parametros do evento que fechou a janela | |
| 490 | - */ | |
| 491 | - fecha : function(event, args) { | |
| 492 | - if (typeof (console) !== 'undefined') | |
| 493 | - console.info("i3GEO.janela.fecha()"); | |
| 436 | + if (temp) { | |
| 437 | + if (temp.style.display === "block") { | |
| 438 | + temp.style.display = "none"; | |
| 439 | + if (m) { | |
| 440 | + m.hideIframe(); | |
| 441 | + } | |
| 442 | + m.winicial = c.style.width; | |
| 443 | + if (min) { | |
| 444 | + c.style.width = parseInt(min,10)+"px"; | |
| 445 | + } | |
| 446 | + tipo = "none"; | |
| 447 | + if(r){ | |
| 448 | + r.lock(); | |
| 449 | + } | |
| 450 | + } else { | |
| 451 | + temp.style.display = "block"; | |
| 452 | + if (m) { | |
| 453 | + m.showIframe(); | |
| 454 | + } | |
| 455 | + c.style.width = m.winicial; | |
| 456 | + t = "max"; | |
| 457 | + tipo = "block"; | |
| 458 | + if(r){ | |
| 459 | + r.unlock(); | |
| 460 | + } | |
| 461 | + } | |
| 462 | + } | |
| 463 | + temp = $i(id + "_c"); | |
| 464 | + if (temp) { | |
| 465 | + $(temp).find(".comboTemasCabecalhoBs,.ft,.yui-resize-handle,.underlay,.bd").css("display",tipo); | |
| 466 | + } | |
| 467 | + temp = $i(id + "_corpo"); | |
| 468 | + if (temp) { | |
| 469 | + temp.style.display = tipo; | |
| 470 | + } | |
| 471 | + temp = $i(id); | |
| 472 | + if (temp) { | |
| 473 | + if (tipo === "block") { | |
| 474 | + temp.style.height = "100%"; | |
| 475 | + } else { | |
| 476 | + temp.style.height = "10%"; | |
| 477 | + } | |
| 478 | + } | |
| 479 | + return t; | |
| 480 | + }, | |
| 481 | + /** | |
| 482 | + * Elimina alguns objetos que são comumente adicionados por algumas | |
| 483 | + * operações do i3geo como box, pin | |
| 484 | + * | |
| 485 | + * Parametros: | |
| 486 | + * | |
| 487 | + * event {objeto} - objeto YUI do evento que gerou o fechamento da janela | |
| 488 | + * | |
| 489 | + * args {objeto} - parametros do evento que fechou a janela | |
| 490 | + */ | |
| 491 | + fecha : function(event, args) { | |
| 492 | + if (typeof (console) !== 'undefined') | |
| 493 | + console.info("i3GEO.janela.fecha()"); | |
| 494 | 494 | |
| 495 | - var i, id; | |
| 496 | - // esconde elementos gráficos q a ferramenta pode ter aberto | |
| 497 | - // i3GEO.util.escondePin(); | |
| 498 | - i3GEO.util.escondeBox(); | |
| 499 | - if (i3GEO.janela.id) { | |
| 500 | - id = i3GEO.janela.id; | |
| 501 | - } else { | |
| 502 | - id = event.id; | |
| 503 | - } | |
| 504 | - if (id == undefined) { | |
| 505 | - id = args.id; | |
| 506 | - } | |
| 507 | - i3GEO.janela.destroi(id); | |
| 508 | - }, | |
| 509 | - /** | |
| 510 | - * Destroi uma janela sem aplicar as funcoes adicionais | |
| 511 | - * | |
| 512 | - * Parametros: | |
| 513 | - * | |
| 514 | - * id {string} - id da janela | |
| 515 | - */ | |
| 516 | - destroi : function(id) { | |
| 517 | - if (typeof (console) !== 'undefined') | |
| 518 | - console.info("i3GEO.janela.destroi() " + id); | |
| 495 | + var i, id; | |
| 496 | + // esconde elementos gráficos q a ferramenta pode ter aberto | |
| 497 | + // i3GEO.util.escondePin(); | |
| 498 | + i3GEO.util.escondeBox(); | |
| 499 | + if (i3GEO.janela.id) { | |
| 500 | + id = i3GEO.janela.id; | |
| 501 | + } else { | |
| 502 | + id = event.id; | |
| 503 | + } | |
| 504 | + if (id == undefined) { | |
| 505 | + id = args.id; | |
| 506 | + } | |
| 507 | + i3GEO.janela.destroi(id); | |
| 508 | + }, | |
| 509 | + /** | |
| 510 | + * Destroi uma janela sem aplicar as funcoes adicionais | |
| 511 | + * | |
| 512 | + * Parametros: | |
| 513 | + * | |
| 514 | + * id {string} - id da janela | |
| 515 | + */ | |
| 516 | + destroi : function(id) { | |
| 517 | + if (typeof (console) !== 'undefined') | |
| 518 | + console.info("i3GEO.janela.destroi() " + id); | |
| 519 | 519 | |
| 520 | - if(typeof(YAHOO) != "undefined"){ | |
| 521 | - var janela = YAHOO.i3GEO.janela.manager.find(id); | |
| 522 | - i3GEO.util.removeScriptTag(id + "_script"); | |
| 523 | - i3GEO.util.removeScriptTag(id + ".dicionario_script"); | |
| 524 | - if (janela) { | |
| 525 | - YAHOO.i3GEO.janela.manager.remove(janela); | |
| 526 | - // janela.destroy(); | |
| 527 | - // destroy remove os listeners!!!! | |
| 528 | - janela = $i(id + "_c"); | |
| 529 | - if(janela){ | |
| 530 | - janela.parentNode.removeChild(janela); | |
| 531 | - try{ | |
| 532 | - YAHOO.util.Resize.getResizeById(id).destroy(); | |
| 533 | - } catch(e){} | |
| 534 | - } | |
| 535 | - } | |
| 536 | - } | |
| 537 | - }, | |
| 538 | - /** | |
| 539 | - * Function: alteraTamanho | |
| 540 | - * | |
| 541 | - * Altera o tamanho de uma janela aberta | |
| 542 | - * | |
| 543 | - * Parametros: | |
| 544 | - * | |
| 545 | - * {Integer} - nova largura | |
| 546 | - * | |
| 547 | - * {Integer} - nova altura | |
| 548 | - * | |
| 549 | - * {String} - (opcional) id que identifica a janela aberta | |
| 550 | - */ | |
| 551 | - alteraTamanho : function(w, h, id) { | |
| 552 | - if (typeof (console) !== 'undefined') | |
| 553 | - console.info("i3GEO.janela.alteraTamanho()"); | |
| 520 | + if(typeof(YAHOO) != "undefined"){ | |
| 521 | + var janela = YAHOO.i3GEO.janela.manager.find(id); | |
| 522 | + i3GEO.util.removeScriptTag(id + "_script"); | |
| 523 | + i3GEO.util.removeScriptTag(id + ".dicionario_script"); | |
| 524 | + if (janela) { | |
| 525 | + YAHOO.i3GEO.janela.manager.remove(janela); | |
| 526 | + // janela.destroy(); | |
| 527 | + // destroy remove os listeners!!!! | |
| 528 | + janela = $i(id + "_c"); | |
| 529 | + if(janela){ | |
| 530 | + janela.parentNode.removeChild(janela); | |
| 531 | + try{ | |
| 532 | + YAHOO.util.Resize.getResizeById(id).destroy(); | |
| 533 | + } catch(e){} | |
| 534 | + } | |
| 535 | + } | |
| 536 | + } | |
| 537 | + }, | |
| 538 | + /** | |
| 539 | + * Function: alteraTamanho | |
| 540 | + * | |
| 541 | + * Altera o tamanho de uma janela aberta | |
| 542 | + * | |
| 543 | + * Parametros: | |
| 544 | + * | |
| 545 | + * {Integer} - nova largura | |
| 546 | + * | |
| 547 | + * {Integer} - nova altura | |
| 548 | + * | |
| 549 | + * {String} - (opcional) id que identifica a janela aberta | |
| 550 | + */ | |
| 551 | + alteraTamanho : function(w, h, id) { | |
| 552 | + if (typeof (console) !== 'undefined') | |
| 553 | + console.info("i3GEO.janela.alteraTamanho()"); | |
| 554 | 554 | |
| 555 | - var i; | |
| 556 | - if (arguments.length === 3) { | |
| 557 | - i = $i(id); | |
| 558 | - } else { | |
| 559 | - i = $i("wdoca"); | |
| 560 | - } | |
| 561 | - if (i) { | |
| 562 | - i.style.width = w + "px"; | |
| 563 | - i.style.height = h + "px"; | |
| 564 | - } | |
| 565 | - }, | |
| 566 | - CONTADORAGUARDE : [], | |
| 567 | - /** | |
| 568 | - * Function: abreAguarde | |
| 569 | - * | |
| 570 | - * Abre uma janela com a mensagem de aguarde | |
| 571 | - * | |
| 572 | - * Parametros: | |
| 573 | - * | |
| 574 | - * {String} - id da nova janela | |
| 575 | - * | |
| 576 | - * {String} - texto da janela | |
| 577 | - */ | |
| 578 | - abreAguarde : function(id, texto) { | |
| 579 | - var p = $i("i3GEObarraAguarde"); | |
| 580 | - if(p){ | |
| 581 | - p.style.width = "100%"; | |
| 582 | - } | |
| 583 | - i3GEO.janela.CONTADORAGUARDE.push(" "); | |
| 584 | - }, | |
| 585 | - /** | |
| 586 | - * Function: fechaAguarde | |
| 587 | - * | |
| 588 | - * Fecha uma janela do tipo aguarde | |
| 589 | - * | |
| 590 | - * Paremeters: | |
| 591 | - * | |
| 592 | - * {String} - id da janela que será fechada. Se não for definido, tenta fechar as janelas principais. | |
| 593 | - */ | |
| 594 | - fechaAguarde : function(id) { | |
| 595 | - var p = $i("i3GEObarraAguarde"); | |
| 596 | - if (p){ | |
| 597 | - if (i3GEO.janela.CONTADORAGUARDE.length == 1) { | |
| 598 | - p.style.width = "0px"; | |
| 599 | - } | |
| 600 | - i3GEO.janela.CONTADORAGUARDE.pop(); | |
| 601 | - } | |
| 602 | - }, | |
| 603 | - /** | |
| 604 | - * Function: tempoMsg | |
| 605 | - * | |
| 606 | - * Abre uma janela com uma mensagem temporaria | |
| 607 | - * | |
| 608 | - * Parametros: | |
| 609 | - * | |
| 610 | - * {String} - texto da janela | |
| 611 | - * | |
| 612 | - * {segundos} | |
| 613 | - */ | |
| 614 | - tempoMsg : function(texto, tempo) { | |
| 615 | - if(!i3GEO.janela.tempoModal){ | |
| 616 | - i3GEO.janela.tempoModal = $( | |
| 617 | - '<div class="modal fade" data-keyboard="false" tabindex="-1" role="dialog" aria-hidden="true" style="z-index:500000;overflow-y:visible;">' + | |
| 618 | - '<div class="modal-dialog">' + | |
| 619 | - '<div class="modal-content">' + | |
| 620 | - '<div class="modal-body" >' + | |
| 621 | - '<div id="i3GEOMensagemTempoModal" >' + | |
| 622 | - texto + | |
| 623 | - '</div>' + | |
| 624 | - '<div class="progress progress-striped active" style="margin-bottom:0;margin-top:10px;"><div class="progress-bar" style="width: 100%"></div></div>' + | |
| 625 | - '</div>' + | |
| 626 | - '</div></div></div>' | |
| 627 | - ); | |
| 628 | - } else { | |
| 629 | - $i("i3GEOMensagemTempoModal").innerHTML = texto; | |
| 630 | - } | |
| 631 | - i3GEO.janela.tempoModal.modal("show"); | |
| 632 | - if(!tempo){ | |
| 633 | - tempo = 3000; | |
| 634 | - } | |
| 635 | - setTimeout(function() { | |
| 636 | - i3GEO.janela.tempoModal.modal("hide"); | |
| 637 | - }, tempo); | |
| 638 | - }, | |
| 555 | + var i; | |
| 556 | + if (arguments.length === 3) { | |
| 557 | + i = $i(id); | |
| 558 | + } else { | |
| 559 | + i = $i("wdoca"); | |
| 560 | + } | |
| 561 | + if (i) { | |
| 562 | + i.style.width = w + "px"; | |
| 563 | + i.style.height = h + "px"; | |
| 564 | + } | |
| 565 | + }, | |
| 566 | + CONTADORAGUARDE : [], | |
| 567 | + /** | |
| 568 | + * Function: abreAguarde | |
| 569 | + * | |
| 570 | + * Abre uma janela com a mensagem de aguarde | |
| 571 | + * | |
| 572 | + * Parametros: | |
| 573 | + * | |
| 574 | + * {String} - id da nova janela | |
| 575 | + * | |
| 576 | + * {String} - texto da janela | |
| 577 | + */ | |
| 578 | + abreAguarde : function(id, texto) { | |
| 579 | + var p = $i("i3GEObarraAguarde"); | |
| 580 | + if(p){ | |
| 581 | + p.style.width = "100%"; | |
| 582 | + } | |
| 583 | + i3GEO.janela.CONTADORAGUARDE.push(" "); | |
| 584 | + }, | |
| 585 | + /** | |
| 586 | + * Function: fechaAguarde | |
| 587 | + * | |
| 588 | + * Fecha uma janela do tipo aguarde | |
| 589 | + * | |
| 590 | + * Paremeters: | |
| 591 | + * | |
| 592 | + * {String} - id da janela que será fechada. Se não for definido, tenta fechar as janelas principais. | |
| 593 | + */ | |
| 594 | + fechaAguarde : function(id) { | |
| 595 | + var p = $i("i3GEObarraAguarde"); | |
| 596 | + if (p){ | |
| 597 | + if (i3GEO.janela.CONTADORAGUARDE.length == 1) { | |
| 598 | + p.style.width = "0px"; | |
| 599 | + } | |
| 600 | + i3GEO.janela.CONTADORAGUARDE.pop(); | |
| 601 | + } | |
| 602 | + }, | |
| 603 | + /** | |
| 604 | + * Function: tempoMsg | |
| 605 | + * | |
| 606 | + * Abre uma janela com uma mensagem temporaria | |
| 607 | + * | |
| 608 | + * Parametros: | |
| 609 | + * | |
| 610 | + * {String} - texto da janela | |
| 611 | + * | |
| 612 | + * {segundos} | |
| 613 | + */ | |
| 614 | + tempoMsg : function(texto, tempo) { | |
| 615 | + if(!i3GEO.janela.tempoModal){ | |
| 616 | + i3GEO.janela.tempoModal = $( | |
| 617 | + '<div class="modal fade" data-keyboard="false" tabindex="-1" role="dialog" aria-hidden="true" style="z-index:500000;overflow-y:visible;">' + | |
| 618 | + '<div class="modal-dialog">' + | |
| 619 | + '<div class="modal-content">' + | |
| 620 | + '<div class="modal-body" >' + | |
| 621 | + '<div id="i3GEOMensagemTempoModal" >' + | |
| 622 | + texto + | |
| 623 | + '</div>' + | |
| 624 | + '<div class="progress progress-striped active" style="margin-bottom:0;margin-top:10px;"><div class="progress-bar" style="width: 100%"></div></div>' + | |
| 625 | + '</div>' + | |
| 626 | + '</div></div></div>' | |
| 627 | + ); | |
| 628 | + } else { | |
| 629 | + $i("i3GEOMensagemTempoModal").innerHTML = texto; | |
| 630 | + } | |
| 631 | + i3GEO.janela.tempoModal.modal("show"); | |
| 632 | + if(!tempo){ | |
| 633 | + tempo = 3000; | |
| 634 | + } | |
| 635 | + setTimeout(function() { | |
| 636 | + i3GEO.janela.tempoModal.modal("hide"); | |
| 637 | + }, tempo); | |
| 638 | + }, | |
| 639 | 639 | |
| 640 | - closeModal: false, | |
| 641 | - closeMsg : function(texto) { | |
| 642 | - if(!i3GEO.janela.closeModal){ | |
| 643 | - i3GEO.janela.closeModal = $( | |
| 644 | - '<div class="modal fade" data-keyboard="false" tabindex="-1" role="dialog" aria-hidden="true" style="z-index:500000;overflow-y:visible;">' + | |
| 645 | - ' <div class="modal-dialog">' + | |
| 646 | - ' <div class="modal-content">' + | |
| 647 | - ' <div class="modal-header">' + | |
| 648 | - ' <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>' + | |
| 649 | - ' </div>' + | |
| 650 | - ' <div id="i3GEOMensagemCloseModal" class="modal-body text-left" >' + | |
| 651 | - texto + | |
| 652 | - ' </div>' + | |
| 653 | - ' </div>' + | |
| 654 | - ' </div>' + | |
| 655 | - '</div>' | |
| 656 | - ); | |
| 657 | - } else { | |
| 658 | - $("#i3GEOMensagemCloseModal").html(texto); | |
| 659 | - i3GEO.janela.closeModal.modal("show"); | |
| 660 | - return; | |
| 661 | - } | |
| 662 | - i3GEO.janela.closeModal.modal("show"); | |
| 663 | - }, | |
| 640 | + closeModal: false, | |
| 641 | + closeMsg : function(texto) { | |
| 642 | + if(!i3GEO.janela.closeModal){ | |
| 643 | + i3GEO.janela.closeModal = $( | |
| 644 | + '<div class="modal fade" data-keyboard="false" tabindex="-1" role="dialog" aria-hidden="true" style="z-index:500000;overflow-y:visible;">' + | |
| 645 | + ' <div class="modal-dialog">' + | |
| 646 | + ' <div class="modal-content">' + | |
| 647 | + ' <div class="modal-header">' + | |
| 648 | + ' <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>' + | |
| 649 | + ' </div>' + | |
| 650 | + ' <div id="i3GEOMensagemCloseModal" class="modal-body text-left" >' + | |
| 651 | + texto + | |
| 652 | + ' </div>' + | |
| 653 | + ' </div>' + | |
| 654 | + ' </div>' + | |
| 655 | + '</div>' | |
| 656 | + ); | |
| 657 | + } else { | |
| 658 | + $("#i3GEOMensagemCloseModal").html(texto); | |
| 659 | + i3GEO.janela.closeModal.modal("show"); | |
| 660 | + return; | |
| 661 | + } | |
| 662 | + i3GEO.janela.closeModal.modal("show"); | |
| 663 | + }, | |
| 664 | 664 | |
| 665 | - /** | |
| 666 | - * Function: ativaAlerta | |
| 667 | - * | |
| 668 | - * Substitui a janelça de alerta padrão do sistema operacional por uma outra customizada | |
| 669 | - */ | |
| 670 | - ativaAlerta : function() { | |
| 671 | - window.alert = function(texto) { | |
| 672 | - var textoI, janela = YAHOO.i3GEO.janela.managerAguarde.find("alerta"); | |
| 673 | - if (!janela) { | |
| 674 | - janela = new YAHOO.widget.SimpleDialog("alerta", { | |
| 675 | - width : "300px", | |
| 676 | - fixedcenter : true, | |
| 677 | - visible : false, | |
| 678 | - draggable : false, | |
| 679 | - zIndex : 100000, | |
| 680 | - textAlign : "left", | |
| 681 | - close : true, | |
| 682 | - modal : false, | |
| 683 | - effect : { | |
| 684 | - effect : YAHOO.widget.ContainerEffect.FADE, | |
| 685 | - duration : 0.25 | |
| 686 | - }, | |
| 687 | - constraintoviewport : true, | |
| 688 | - buttons : [ | |
| 689 | - { | |
| 690 | - text : $trad("x74"), | |
| 691 | - handler : function() { | |
| 692 | - this.destroy(); | |
| 693 | - }, | |
| 694 | - isDefault : true | |
| 695 | - } | |
| 696 | - ], | |
| 697 | - icon : YAHOO.widget.SimpleDialog.ICON_WARN, | |
| 698 | - text : "" | |
| 699 | - }); | |
| 700 | - // YAHOO.i3GEO.janela.dialogInfo.cfg.setProperty("icon",YAHOO.widget.SimpleDialog.ICON_WARN); | |
| 701 | - YAHOO.i3GEO.janela.managerAguarde.register(janela); | |
| 702 | - janela.setHeader(" "); | |
| 703 | - janela.render(document.body); | |
| 704 | - } | |
| 705 | - textoI = janela.cfg.getProperty("text"); | |
| 706 | - if (textoI != "") { | |
| 707 | - textoI += "<br>"; | |
| 708 | - } | |
| 709 | - texto = textoI + texto; | |
| 710 | - janela.cfg.setProperty("text", texto); | |
| 711 | - janela.show(); | |
| 712 | - }; | |
| 713 | - }, | |
| 714 | - /** | |
| 715 | - * Function: confirma | |
| 716 | - * | |
| 717 | - * Janela de confirmacao | |
| 718 | - * | |
| 719 | - * Parametros: | |
| 720 | - * | |
| 721 | - * {string} - texto da pegunta | |
| 722 | - * | |
| 723 | - * {numeric} - largura da janela | |
| 724 | - * | |
| 725 | - * {string} - (opcional) texto do botao 1 | |
| 726 | - * | |
| 727 | - * {string} - (opcional) texto do botao 2 | |
| 728 | - * | |
| 729 | - * {function} - (opcional) funcao do botao 1 | |
| 730 | - * | |
| 731 | - * {function} - (opcional) funcao do botao 2 | |
| 732 | - */ | |
| 733 | - confirma : function(pergunta, w, resposta1, resposta2, funcao1, funcao2) { | |
| 734 | - var b, f1, f2, f3, janela = YAHOO.i3GEO.janela.managerAguarde.find("confirma"); | |
| 735 | - if (!w || w == "") { | |
| 736 | - w = 300; | |
| 737 | - } | |
| 738 | - if (!funcao1 || funcao1 == "") { | |
| 739 | - f1 = function() { | |
| 740 | - YAHOO.i3GEO.janela.managerAguarde.find("confirma").destroy(); | |
| 741 | - return true; | |
| 742 | - }; | |
| 743 | - } else { | |
| 744 | - f1 = function() { | |
| 745 | - funcao1.call(); | |
| 746 | - YAHOO.i3GEO.janela.managerAguarde.find("confirma").destroy(); | |
| 747 | - }; | |
| 748 | - } | |
| 749 | - if (!funcao2 || funcao2 == "") { | |
| 750 | - f2 = function() { | |
| 751 | - YAHOO.i3GEO.janela.managerAguarde.find("confirma").destroy(); | |
| 752 | - return false; | |
| 753 | - }; | |
| 754 | - } else { | |
| 755 | - f2 = function() { | |
| 756 | - funcao2.call(); | |
| 757 | - YAHOO.i3GEO.janela.managerAguarde.find("confirma").destroy(); | |
| 758 | - }; | |
| 759 | - } | |
| 760 | - f3 = function() { | |
| 761 | - YAHOO.i3GEO.janela.managerAguarde.find("confirma").destroy(); | |
| 762 | - }; | |
| 763 | - if (!resposta1 || resposta1 == "") { | |
| 764 | - resposta1 = $trad("x58"); | |
| 765 | - } | |
| 766 | - if (janela) { | |
| 767 | - janela.destroy(); | |
| 768 | - } | |
| 769 | - b = [ | |
| 770 | - { | |
| 771 | - text : $trad("x75"), | |
| 772 | - handler : f3 | |
| 773 | - }, { | |
| 774 | - text : resposta1, | |
| 775 | - handler : f1 | |
| 776 | - } | |
| 777 | - ]; | |
| 778 | - if (resposta2 && resposta2 != "") { | |
| 779 | - b.push({ | |
| 780 | - text : resposta2, | |
| 781 | - handler : f2 | |
| 782 | - }); | |
| 783 | - } | |
| 784 | - janela = new YAHOO.widget.SimpleDialog("confirma", { | |
| 785 | - width : w + "px", | |
| 786 | - fixedcenter : true, | |
| 787 | - visible : false, | |
| 788 | - draggable : false, | |
| 789 | - zIndex : 100000, | |
| 790 | - textAlign : "left", | |
| 791 | - close : false, | |
| 792 | - modal : false, | |
| 793 | - effect : { | |
| 794 | - effect : YAHOO.widget.ContainerEffect.FADE, | |
| 795 | - duration : 0.25 | |
| 796 | - }, | |
| 797 | - constraintoviewport : true, | |
| 798 | - buttons : b, | |
| 799 | - icon : YAHOO.widget.SimpleDialog.ICON_HELP, | |
| 800 | - text : "<p class=paragrafo >" + pergunta | |
| 801 | - }); | |
| 802 | - YAHOO.i3GEO.janela.managerAguarde.register(janela); | |
| 803 | - janela.setHeader(" "); | |
| 804 | - janela.render(document.body); | |
| 805 | - janela.show(); | |
| 806 | - }, | |
| 807 | - /** | |
| 808 | - * Function: prompt | |
| 809 | - * | |
| 810 | - * Janela de prompt para entrada de dados | |
| 811 | - * | |
| 812 | - * O campo para digitacao contem o ID 'i3GEOjanelaprompt' | |
| 813 | - * | |
| 814 | - * Parametros: | |
| 815 | - * | |
| 816 | - * {string} - texto da pegunta | |
| 817 | - * | |
| 818 | - * {function} - (opcional) funcao do botao ok | |
| 819 | - * | |
| 820 | - * {string} - (opcional) valor default | |
| 821 | - */ | |
| 822 | - prompt : function(pergunta, funcaoOk, valorDefault) { | |
| 823 | - if ($i("i3GEOjanelaprompt")) { | |
| 824 | - return; | |
| 825 | - } | |
| 826 | - if (!valorDefault) { | |
| 827 | - valorDefault = ""; | |
| 828 | - } | |
| 829 | - var i = | |
| 830 | - "<br><div class='i3geoForm i3geoFormIconeEdita' ><input id='i3GEOjanelaprompt' type=text value='" + valorDefault + "' />"; | |
| 831 | - i3GEO.janela.confirma(pergunta + i, "", "", "", funcaoOk); | |
| 832 | - }, | |
| 833 | - /** | |
| 834 | - * Function: mensagemSimples | |
| 835 | - * | |
| 836 | - * Mostra uma janela simples com uma mensagem | |
| 837 | - * | |
| 838 | - * Parametros: | |
| 839 | - * | |
| 840 | - * {String} - texto da mensagem | |
| 841 | - * | |
| 842 | - * {String} - texto do cabecalho | |
| 843 | - * | |
| 844 | - * {numeric} - (opcional) largura em pixel | |
| 845 | - * | |
| 846 | - * {numeric} - (opcional) altura em pixel | |
| 847 | - */ | |
| 848 | - mensagemSimples : function(texto, cabecalho, largura, altura) { | |
| 849 | - var janela; | |
| 850 | - if (!largura) { | |
| 851 | - largura = 300; | |
| 852 | - } | |
| 853 | - if (!altura) { | |
| 854 | - altura = 300; | |
| 855 | - } | |
| 856 | - if (!cabecalho) { | |
| 857 | - cabecalho = ""; | |
| 858 | - } | |
| 859 | - janela = new YAHOO.widget.SimpleDialog(i3GEO.util.generateId(), { | |
| 860 | - width : parseInt(largura, 10) + "px", | |
| 861 | - height : parseInt(altura, 10) + "px", | |
| 862 | - fixedcenter : true, | |
| 863 | - visible : true, | |
| 864 | - draggable : true, | |
| 865 | - zIndex : 100000, | |
| 866 | - textAlign : "left", | |
| 867 | - close : true, | |
| 868 | - modal : false, | |
| 869 | - effect : { | |
| 870 | - effect : YAHOO.widget.ContainerEffect.FADE, | |
| 871 | - duration : 0.25 | |
| 872 | - }, | |
| 873 | - constraintoviewport : true, | |
| 874 | - text : "" | |
| 875 | - }); | |
| 876 | - YAHOO.i3GEO.janela.manager.register(janela); | |
| 877 | - // $i(id + '_corpo').style.height = parseInt(waltura, 10) + "px"; | |
| 878 | - janela.setHeader(cabecalho); | |
| 879 | - janela.render(document.body); | |
| 880 | - janela.setHeader("<div class='i3GeoTituloJanela'>"+cabecalho+"</div>"); | |
| 881 | - janela.cfg.setProperty("text", texto); | |
| 882 | - janela.bringToTop(); | |
| 883 | - janela.show(); | |
| 884 | - return janela; | |
| 885 | - }, | |
| 886 | - slider : function(funcao, inicial) { | |
| 887 | - var scaleFactor, bottomConstraint, topConstraint, janela, novoel, Event, slider = "", bg, thumb; | |
| 888 | - janela = i3GEO.janela.cria(230, 200, "", "", "", "<div class='i3GeoTituloJanela'>"+$trad("t20")+"</div>", "opacidadeG"); | |
| 889 | - novoel = document.createElement("div"); | |
| 890 | - novoel.id = "slider-bg"; | |
| 891 | - novoel.tabindex = "-1"; | |
| 892 | - novoel.innerHTML = | |
| 893 | - '<div style="cursor:default;position:absolute;top:4px" id="slider-thumb"><img src="' + i3GEO.configura.locaplic | |
| 894 | - + '/imagens/thumb-n.gif"></div>'; | |
| 895 | - janela[2].appendChild(novoel); | |
| 896 | - Event = YAHOO.util.Event; | |
| 897 | - bg = "slider-bg"; | |
| 898 | - thumb = "slider-thumb"; | |
| 899 | - novoel.style.position = "relative"; | |
| 900 | - novoel.style.background = 'url(' + i3GEO.configura.locaplic + '/imagens/bg-fader.gif) 5px 0 no-repeat'; | |
| 901 | - novoel.style.height = "28px"; | |
| 902 | - novoel.style.width = "228px"; | |
| 903 | - // The slider can move 0 pixels up | |
| 904 | - topConstraint = 0; | |
| 905 | - // The slider can move 200 pixels down | |
| 906 | - bottomConstraint = 200; | |
| 907 | - // Custom scale factor for converting the pixel offset into a real | |
| 908 | - // value | |
| 909 | - scaleFactor = 1; | |
| 910 | - // The amount the slider moves when the value is changed with the | |
| 911 | - // arrow | |
| 912 | - // keys | |
| 913 | - Event.onDOMReady(function() { | |
| 914 | - slider = YAHOO.widget.Slider.getHorizSlider(bg, thumb, topConstraint, bottomConstraint, 20); | |
| 915 | - slider.setValue(parseInt(inicial, 10)); | |
| 916 | - slider.getRealValue = function() { | |
| 917 | - return Math.round(this.getValue() * scaleFactor); | |
| 918 | - }; | |
| 919 | - slider.subscribe("slideEnd", function(offsetFromStart) { | |
| 920 | - var actualValue = slider.getRealValue(); | |
| 921 | - eval(funcao + "(" + actualValue + ")"); | |
| 922 | - }); | |
| 923 | - }); | |
| 924 | - // Use setValue to reset the value to white: | |
| 925 | - Event.on("putval", "click", function(e) { | |
| 926 | - slider.setValue(100, false); // false here means to animate if possible | |
| 927 | - }); | |
| 928 | - }, | |
| 929 | - /** | |
| 930 | - * Adiciona no cabeçalho da janela um combo com a lista de temas para janelas abertas por ferramentas | |
| 931 | - * | |
| 932 | - * Essa função é utilizada pelas ferramentas que operam sobre um determinado tema. O combo permite que o | |
| 933 | - * usuário selecione um tema e ative a ferramenta para funcionar com esse tema | |
| 934 | - * | |
| 935 | - * Parametros: | |
| 936 | - * | |
| 937 | - * idDiv {string} - id do elemento HTML que receberá o combo | |
| 938 | - * | |
| 939 | - * idCombo {string} - id do combo que será criado | |
| 940 | - * | |
| 941 | - * ferramenta {string} - nome da ferramenta (namespace da classe, por exemplo "tabela" para a classe i3GEOF.tabela | |
| 942 | - * | |
| 943 | - * tipo {string} - tipo de combo | |
| 944 | - * | |
| 945 | - * onButtonClick {function} - funcao que sera executada no evento onchange do combo a ser criado | |
| 946 | - */ | |
| 947 | - comboCabecalhoTemas : function(idDiv, idCombo, ferramenta, tipo, onButtonClick, temaSel) { | |
| 948 | - var temp = $i(idDiv); | |
| 949 | - // tenta pegar o tema que ja foi escolhido antes | |
| 950 | - if (!temaSel) { | |
| 951 | - temaSel = ""; | |
| 952 | - } | |
| 953 | - if (temaSel == "" && i3GEOF[ferramenta] && i3GEOF[ferramenta].tema && i3GEOF[ferramenta].tema != "") { | |
| 954 | - // o tema escolhido pode estar definido na variavel da ferramenta | |
| 955 | - temaSel = i3GEOF[ferramenta].tema; | |
| 956 | - } | |
| 957 | - if (temp) { | |
| 958 | - i3GEO.util.comboTemas(temp.id + "Sel", function(retorno) { | |
| 959 | - var tema, container = $i(idDiv), botao; | |
| 960 | - container.innerHTML = retorno.dados; | |
| 961 | - botao = new YAHOO.widget.Button(idCombo, { | |
| 962 | - type : "menu", | |
| 963 | - menu : idCombo + "select" | |
| 964 | - }); | |
| 965 | - if (temaSel != "") { | |
| 966 | - tema = i3GEO.arvoreDeCamadas.pegaTema(temaSel); | |
| 967 | - if (tema && tema != undefined) { | |
| 968 | - botao.set("label", "<span class='cabecalhoTemas' >" + tema.tema + "</span> "); | |
| 969 | - } else { | |
| 970 | - botao.set("label", "<span class='cabecalhoTemas' >" + $trad("x92") + "</span> "); | |
| 971 | - } | |
| 972 | - } else { | |
| 973 | - botao.set("label", "<span class='cabecalhoTemas' >" + $trad("x92") + "</span> "); | |
| 974 | - } | |
| 975 | - if (!onButtonClick) { | |
| 976 | - onButtonClick = | |
| 977 | - function(p_sType, p_aArgs) { | |
| 978 | - var oMenuItem = p_aArgs[1]; | |
| 979 | - if (oMenuItem) { | |
| 980 | - i3GEO.mapa.ativaTema(oMenuItem.value); | |
| 981 | - if (oMenuItem.value === "") { | |
| 982 | - i3GEO.temaAtivo = ""; | |
| 983 | - botao.set("label", "<span class='cabecalhoTemas' >" + $trad("x92") + "</span> "); | |
| 984 | - } else { | |
| 985 | - botao.set("label", "<span class='cabecalhoTemas' >" + oMenuItem.cfg.getProperty("text") | |
| 986 | - + "</span> "); | |
| 987 | - } | |
| 988 | - if (i3GEOF[ferramenta]) { | |
| 989 | - i3GEOF[ferramenta].tema = oMenuItem.value; | |
| 990 | - if ($i("i3GEOF." + ferramenta + "_corpo")) { | |
| 991 | - $i("i3GEOF." + ferramenta + "_corpo").innerHTML = ""; | |
| 992 | - eval("i3GEOF." + ferramenta + ".inicia('i3GEOF." + ferramenta + "_corpo');"); | |
| 993 | - } | |
| 994 | - } | |
| 995 | - } | |
| 996 | - }; | |
| 997 | - // | |
| 998 | - // a busca nao funciona com parametros dentro de parenteses | |
| 999 | - // por isso e necessario zerar o array | |
| 1000 | - // | |
| 1001 | - if (i3GEO.eventos.ATUALIZAARVORECAMADAS.length > 20) { | |
| 1002 | - i3GEO.eventos.ATUALIZAARVORECAMADAS = []; | |
| 1003 | - } | |
| 1004 | - i3GEO.eventos.adicionaEventos("ATUALIZAARVORECAMADAS", [ | |
| 1005 | - "i3GEO.janela.comboCabecalhoTemas('" + idDiv + "','" + idCombo + "','" + ferramenta + "','" + tipo + "')" | |
| 1006 | - ]); | |
| 1007 | - } | |
| 1008 | - botao.getMenu().subscribe("click", onButtonClick, botao); | |
| 1009 | - }, temp.id, "", false, tipo, "", true, true, ""); | |
| 1010 | - } | |
| 1011 | - }, | |
| 1012 | - comboCabecalhoTemasBs : function(idDiv, idCombo, ferramenta, tipo, onButtonClick, temaSel) { | |
| 1013 | - var temp = $i(idDiv); | |
| 1014 | - // tenta pegar o tema que ja foi escolhido antes | |
| 1015 | - if (!temaSel) { | |
| 1016 | - temaSel = ""; | |
| 1017 | - } | |
| 1018 | - if (temaSel == "" && i3GEOF[ferramenta] && i3GEOF[ferramenta].tema && i3GEOF[ferramenta].tema != "") { | |
| 1019 | - // o tema escolhido pode estar definido na variavel da ferramenta | |
| 1020 | - temaSel = i3GEOF[ferramenta].tema; | |
| 1021 | - } else { | |
| 1022 | - temaSel = i3GEO.temaAtivo; | |
| 1023 | - if (i3GEOF[ferramenta] && i3GEOF[ferramenta].tema) { | |
| 1024 | - i3GEOF[ferramenta].tema = temaSel; | |
| 1025 | - } | |
| 1026 | - } | |
| 1027 | - if (temp) { | |
| 1028 | - i3GEO.util.comboTemas(temp.id + "Sel", function(retorno) { | |
| 1029 | - var tema, container = $i(idDiv), botao; | |
| 1030 | - container.innerHTML += retorno.dados; | |
| 1031 | - botao = $i(temp.id + "Sel"); | |
| 665 | + /** | |
| 666 | + * Function: ativaAlerta | |
| 667 | + * | |
| 668 | + * Substitui a janelça de alerta padrão do sistema operacional por uma outra customizada | |
| 669 | + */ | |
| 670 | + ativaAlerta : function() { | |
| 671 | + window.alert = function(texto) { | |
| 672 | + var textoI, janela = YAHOO.i3GEO.janela.managerAguarde.find("alerta"); | |
| 673 | + if (!janela) { | |
| 674 | + janela = new YAHOO.widget.SimpleDialog("alerta", { | |
| 675 | + width : "300px", | |
| 676 | + fixedcenter : true, | |
| 677 | + visible : false, | |
| 678 | + draggable : false, | |
| 679 | + zIndex : 100000, | |
| 680 | + textAlign : "left", | |
| 681 | + close : true, | |
| 682 | + modal : false, | |
| 683 | + effect : { | |
| 684 | + effect : YAHOO.widget.ContainerEffect.FADE, | |
| 685 | + duration : 0.25 | |
| 686 | + }, | |
| 687 | + constraintoviewport : true, | |
| 688 | + buttons : [ | |
| 689 | + { | |
| 690 | + text : $trad("x74"), | |
| 691 | + handler : function() { | |
| 692 | + this.destroy(); | |
| 693 | + }, | |
| 694 | + isDefault : true | |
| 695 | + } | |
| 696 | + ], | |
| 697 | + icon : YAHOO.widget.SimpleDialog.ICON_WARN, | |
| 698 | + text : "" | |
| 699 | + }); | |
| 700 | + // YAHOO.i3GEO.janela.dialogInfo.cfg.setProperty("icon",YAHOO.widget.SimpleDialog.ICON_WARN); | |
| 701 | + YAHOO.i3GEO.janela.managerAguarde.register(janela); | |
| 702 | + janela.setHeader(" "); | |
| 703 | + janela.render(document.body); | |
| 704 | + } | |
| 705 | + textoI = janela.cfg.getProperty("text"); | |
| 706 | + if (textoI != "") { | |
| 707 | + textoI += "<br>"; | |
| 708 | + } | |
| 709 | + texto = textoI + texto; | |
| 710 | + janela.cfg.setProperty("text", texto); | |
| 711 | + janela.show(); | |
| 712 | + }; | |
| 713 | + }, | |
| 714 | + /** | |
| 715 | + * Function: confirma | |
| 716 | + * | |
| 717 | + * Janela de confirmacao | |
| 718 | + * | |
| 719 | + * Parametros: | |
| 720 | + * | |
| 721 | + * {string} - texto da pegunta | |
| 722 | + * | |
| 723 | + * {numeric} - largura da janela | |
| 724 | + * | |
| 725 | + * {string} - (opcional) texto do botao 1 | |
| 726 | + * | |
| 727 | + * {string} - (opcional) texto do botao 2 | |
| 728 | + * | |
| 729 | + * {function} - (opcional) funcao do botao 1 | |
| 730 | + * | |
| 731 | + * {function} - (opcional) funcao do botao 2 | |
| 732 | + */ | |
| 733 | + confirma : function(pergunta, w, resposta1, resposta2, funcao1, funcao2) { | |
| 734 | + var b, f1, f2, f3, janela = YAHOO.i3GEO.janela.managerAguarde.find("confirma"); | |
| 735 | + if (!w || w == "") { | |
| 736 | + w = 300; | |
| 737 | + } | |
| 738 | + if (!funcao1 || funcao1 == "") { | |
| 739 | + f1 = function() { | |
| 740 | + YAHOO.i3GEO.janela.managerAguarde.find("confirma").destroy(); | |
| 741 | + return true; | |
| 742 | + }; | |
| 743 | + } else { | |
| 744 | + f1 = function() { | |
| 745 | + funcao1.call(); | |
| 746 | + YAHOO.i3GEO.janela.managerAguarde.find("confirma").destroy(); | |
| 747 | + }; | |
| 748 | + } | |
| 749 | + if (!funcao2 || funcao2 == "") { | |
| 750 | + f2 = function() { | |
| 751 | + YAHOO.i3GEO.janela.managerAguarde.find("confirma").destroy(); | |
| 752 | + return false; | |
| 753 | + }; | |
| 754 | + } else { | |
| 755 | + f2 = function() { | |
| 756 | + funcao2.call(); | |
| 757 | + YAHOO.i3GEO.janela.managerAguarde.find("confirma").destroy(); | |
| 758 | + }; | |
| 759 | + } | |
| 760 | + f3 = function() { | |
| 761 | + YAHOO.i3GEO.janela.managerAguarde.find("confirma").destroy(); | |
| 762 | + }; | |
| 763 | + if (!resposta1 || resposta1 == "") { | |
| 764 | + resposta1 = $trad("x58"); | |
| 765 | + } | |
| 766 | + if (janela) { | |
| 767 | + janela.destroy(); | |
| 768 | + } | |
| 769 | + b = [ | |
| 770 | + { | |
| 771 | + text : $trad("x75"), | |
| 772 | + handler : f3 | |
| 773 | + }, { | |
| 774 | + text : resposta1, | |
| 775 | + handler : f1 | |
| 776 | + } | |
| 777 | + ]; | |
| 778 | + if (resposta2 && resposta2 != "") { | |
| 779 | + b.push({ | |
| 780 | + text : resposta2, | |
| 781 | + handler : f2 | |
| 782 | + }); | |
| 783 | + } | |
| 784 | + janela = new YAHOO.widget.SimpleDialog("confirma", { | |
| 785 | + width : w + "px", | |
| 786 | + fixedcenter : true, | |
| 787 | + visible : false, | |
| 788 | + draggable : false, | |
| 789 | + zIndex : 100000, | |
| 790 | + textAlign : "left", | |
| 791 | + close : false, | |
| 792 | + modal : false, | |
| 793 | + effect : { | |
| 794 | + effect : YAHOO.widget.ContainerEffect.FADE, | |
| 795 | + duration : 0.25 | |
| 796 | + }, | |
| 797 | + constraintoviewport : true, | |
| 798 | + buttons : b, | |
| 799 | + icon : YAHOO.widget.SimpleDialog.ICON_HELP, | |
| 800 | + text : "<p class=paragrafo >" + pergunta | |
| 801 | + }); | |
| 802 | + YAHOO.i3GEO.janela.managerAguarde.register(janela); | |
| 803 | + janela.setHeader(" "); | |
| 804 | + janela.render(document.body); | |
| 805 | + janela.show(); | |
| 806 | + }, | |
| 807 | + /** | |
| 808 | + * Function: prompt | |
| 809 | + * | |
| 810 | + * Janela de prompt para entrada de dados | |
| 811 | + * | |
| 812 | + * O campo para digitacao contem o ID 'i3GEOjanelaprompt' | |
| 813 | + * | |
| 814 | + * Parametros: | |
| 815 | + * | |
| 816 | + * {string} - texto da pegunta | |
| 817 | + * | |
| 818 | + * {function} - (opcional) funcao do botao ok | |
| 819 | + * | |
| 820 | + * {string} - (opcional) valor default | |
| 821 | + */ | |
| 822 | + prompt : function(pergunta, funcaoOk, valorDefault) { | |
| 823 | + if ($i("i3GEOjanelaprompt")) { | |
| 824 | + return; | |
| 825 | + } | |
| 826 | + if (!valorDefault) { | |
| 827 | + valorDefault = ""; | |
| 828 | + } | |
| 829 | + var i = "<div class='form-group label-fixed condensed' ><label class='control-label' for='i3GEOjanelaprompt'>"+pergunta+"</label><input class='form-control input-lg' type='text' id='i3GEOjanelaprompt' value='"+ valorDefault +"' /></div>"; | |
| 1032 | 830 | |
| 1033 | - if (temaSel != "") { | |
| 1034 | - tema = i3GEO.arvoreDeCamadas.pegaTema(temaSel); | |
| 1035 | - if (tema && tema != undefined) { | |
| 1036 | - botao.value = tema.name; | |
| 1037 | - } else { | |
| 1038 | - botao.value= ""; | |
| 1039 | - } | |
| 1040 | - } else { | |
| 1041 | - botao.value= ""; | |
| 1042 | - } | |
| 1043 | - if (!onButtonClick) { | |
| 1044 | - onButtonClick = function(botao){ | |
| 1045 | - i3GEO.mapa.ativaTema(botao.value); | |
| 1046 | - if(botao.value == ""){ | |
| 1047 | - i3GEO.temaAtivo = ""; | |
| 1048 | - } | |
| 1049 | - if (i3GEOF[ferramenta]) { | |
| 1050 | - i3GEOF[ferramenta].tema = botao.value; | |
| 1051 | - if ($i("i3GEOF." + ferramenta + "_corpo")) { | |
| 1052 | - $i("i3GEOF." + ferramenta + "_corpo").innerHTML = ""; | |
| 1053 | - eval("i3GEOF." + ferramenta + ".inicia('i3GEOF." + ferramenta + "_corpo');"); | |
| 1054 | - } | |
| 1055 | - } | |
| 1056 | - }; | |
| 1057 | - } | |
| 1058 | - botao.onchange = onButtonClick; | |
| 1059 | - }, temp.id, "", false, tipo, "font-size: 12px;width: 95%;color:white;", false, true, "form-control comboTema"); | |
| 1060 | - } | |
| 1061 | - } | |
| 1062 | - }; | |
| 831 | + i3GEO.janela.confirma(i, "", "", "", funcaoOk); | |
| 832 | + }, | |
| 833 | + /** | |
| 834 | + * Function: mensagemSimples | |
| 835 | + * | |
| 836 | + * Mostra uma janela simples com uma mensagem | |
| 837 | + * | |
| 838 | + * Parametros: | |
| 839 | + * | |
| 840 | + * {String} - texto da mensagem | |
| 841 | + * | |
| 842 | + * {String} - texto do cabecalho | |
| 843 | + * | |
| 844 | + * {numeric} - (opcional) largura em pixel | |
| 845 | + * | |
| 846 | + * {numeric} - (opcional) altura em pixel | |
| 847 | + */ | |
| 848 | + mensagemSimples : function(texto, cabecalho, largura, altura) { | |
| 849 | + var janela; | |
| 850 | + if (!largura) { | |
| 851 | + largura = 300; | |
| 852 | + } | |
| 853 | + if (!altura) { | |
| 854 | + altura = 300; | |
| 855 | + } | |
| 856 | + if (!cabecalho) { | |
| 857 | + cabecalho = ""; | |
| 858 | + } | |
| 859 | + janela = new YAHOO.widget.SimpleDialog(i3GEO.util.generateId(), { | |
| 860 | + width : parseInt(largura, 10) + "px", | |
| 861 | + height : parseInt(altura, 10) + "px", | |
| 862 | + fixedcenter : true, | |
| 863 | + visible : true, | |
| 864 | + draggable : true, | |
| 865 | + zIndex : 100000, | |
| 866 | + textAlign : "left", | |
| 867 | + close : true, | |
| 868 | + modal : false, | |
| 869 | + effect : { | |
| 870 | + effect : YAHOO.widget.ContainerEffect.FADE, | |
| 871 | + duration : 0.25 | |
| 872 | + }, | |
| 873 | + constraintoviewport : true, | |
| 874 | + text : "" | |
| 875 | + }); | |
| 876 | + YAHOO.i3GEO.janela.manager.register(janela); | |
| 877 | + // $i(id + '_corpo').style.height = parseInt(waltura, 10) + "px"; | |
| 878 | + janela.setHeader(cabecalho); | |
| 879 | + janela.render(document.body); | |
| 880 | + janela.setHeader("<div class='i3GeoTituloJanela'>"+cabecalho+"</div>"); | |
| 881 | + janela.cfg.setProperty("text", texto); | |
| 882 | + janela.bringToTop(); | |
| 883 | + janela.show(); | |
| 884 | + return janela; | |
| 885 | + }, | |
| 886 | + slider : function(funcao, inicial) { | |
| 887 | + var scaleFactor, bottomConstraint, topConstraint, janela, novoel, Event, slider = "", bg, thumb; | |
| 888 | + janela = i3GEO.janela.cria(230, 200, "", "", "", "<div class='i3GeoTituloJanela'>"+$trad("t20")+"</div>", "opacidadeG"); | |
| 889 | + novoel = document.createElement("div"); | |
| 890 | + novoel.id = "slider-bg"; | |
| 891 | + novoel.tabindex = "-1"; | |
| 892 | + novoel.innerHTML = | |
| 893 | + '<div style="cursor:default;position:absolute;top:4px" id="slider-thumb"><img src="' + i3GEO.configura.locaplic | |
| 894 | + + '/imagens/thumb-n.gif"></div>'; | |
| 895 | + janela[2].appendChild(novoel); | |
| 896 | + Event = YAHOO.util.Event; | |
| 897 | + bg = "slider-bg"; | |
| 898 | + thumb = "slider-thumb"; | |
| 899 | + novoel.style.position = "relative"; | |
| 900 | + novoel.style.background = 'url(' + i3GEO.configura.locaplic + '/imagens/bg-fader.gif) 5px 0 no-repeat'; | |
| 901 | + novoel.style.height = "28px"; | |
| 902 | + novoel.style.width = "228px"; | |
| 903 | + // The slider can move 0 pixels up | |
| 904 | + topConstraint = 0; | |
| 905 | + // The slider can move 200 pixels down | |
| 906 | + bottomConstraint = 200; | |
| 907 | + // Custom scale factor for converting the pixel offset into a real | |
| 908 | + // value | |
| 909 | + scaleFactor = 1; | |
| 910 | + // The amount the slider moves when the value is changed with the | |
| 911 | + // arrow | |
| 912 | + // keys | |
| 913 | + Event.onDOMReady(function() { | |
| 914 | + slider = YAHOO.widget.Slider.getHorizSlider(bg, thumb, topConstraint, bottomConstraint, 20); | |
| 915 | + slider.setValue(parseInt(inicial, 10)); | |
| 916 | + slider.getRealValue = function() { | |
| 917 | + return Math.round(this.getValue() * scaleFactor); | |
| 918 | + }; | |
| 919 | + slider.subscribe("slideEnd", function(offsetFromStart) { | |
| 920 | + var actualValue = slider.getRealValue(); | |
| 921 | + eval(funcao + "(" + actualValue + ")"); | |
| 922 | + }); | |
| 923 | + }); | |
| 924 | + // Use setValue to reset the value to white: | |
| 925 | + Event.on("putval", "click", function(e) { | |
| 926 | + slider.setValue(100, false); // false here means to animate if possible | |
| 927 | + }); | |
| 928 | + }, | |
| 929 | + /** | |
| 930 | + * Adiciona no cabeçalho da janela um combo com a lista de temas para janelas abertas por ferramentas | |
| 931 | + * | |
| 932 | + * Essa função é utilizada pelas ferramentas que operam sobre um determinado tema. O combo permite que o | |
| 933 | + * usuário selecione um tema e ative a ferramenta para funcionar com esse tema | |
| 934 | + * | |
| 935 | + * Parametros: | |
| 936 | + * | |
| 937 | + * idDiv {string} - id do elemento HTML que receberá o combo | |
| 938 | + * | |
| 939 | + * idCombo {string} - id do combo que será criado | |
| 940 | + * | |
| 941 | + * ferramenta {string} - nome da ferramenta (namespace da classe, por exemplo "tabela" para a classe i3GEOF.tabela | |
| 942 | + * | |
| 943 | + * tipo {string} - tipo de combo | |
| 944 | + * | |
| 945 | + * onButtonClick {function} - funcao que sera executada no evento onchange do combo a ser criado | |
| 946 | + */ | |
| 947 | + comboCabecalhoTemas : function(idDiv, idCombo, ferramenta, tipo, onButtonClick, temaSel) { | |
| 948 | + var temp = $i(idDiv); | |
| 949 | + // tenta pegar o tema que ja foi escolhido antes | |
| 950 | + if (!temaSel) { | |
| 951 | + temaSel = ""; | |
| 952 | + } | |
| 953 | + if (temaSel == "" && i3GEOF[ferramenta] && i3GEOF[ferramenta].tema && i3GEOF[ferramenta].tema != "") { | |
| 954 | + // o tema escolhido pode estar definido na variavel da ferramenta | |
| 955 | + temaSel = i3GEOF[ferramenta].tema; | |
| 956 | + } | |
| 957 | + if (temp) { | |
| 958 | + i3GEO.util.comboTemas(temp.id + "Sel", function(retorno) { | |
| 959 | + var tema, container = $i(idDiv), botao; | |
| 960 | + container.innerHTML = retorno.dados; | |
| 961 | + botao = new YAHOO.widget.Button(idCombo, { | |
| 962 | + type : "menu", | |
| 963 | + menu : idCombo + "select" | |
| 964 | + }); | |
| 965 | + if (temaSel != "") { | |
| 966 | + tema = i3GEO.arvoreDeCamadas.pegaTema(temaSel); | |
| 967 | + if (tema && tema != undefined) { | |
| 968 | + botao.set("label", "<span class='cabecalhoTemas' >" + tema.tema + "</span> "); | |
| 969 | + } else { | |
| 970 | + botao.set("label", "<span class='cabecalhoTemas' >" + $trad("x92") + "</span> "); | |
| 971 | + } | |
| 972 | + } else { | |
| 973 | + botao.set("label", "<span class='cabecalhoTemas' >" + $trad("x92") + "</span> "); | |
| 974 | + } | |
| 975 | + if (!onButtonClick) { | |
| 976 | + onButtonClick = | |
| 977 | + function(p_sType, p_aArgs) { | |
| 978 | + var oMenuItem = p_aArgs[1]; | |
| 979 | + if (oMenuItem) { | |
| 980 | + i3GEO.mapa.ativaTema(oMenuItem.value); | |
| 981 | + if (oMenuItem.value === "") { | |
| 982 | + i3GEO.temaAtivo = ""; | |
| 983 | + botao.set("label", "<span class='cabecalhoTemas' >" + $trad("x92") + "</span> "); | |
| 984 | + } else { | |
| 985 | + botao.set("label", "<span class='cabecalhoTemas' >" + oMenuItem.cfg.getProperty("text") | |
| 986 | + + "</span> "); | |
| 987 | + } | |
| 988 | + if (i3GEOF[ferramenta]) { | |
| 989 | + i3GEOF[ferramenta].tema = oMenuItem.value; | |
| 990 | + if ($i("i3GEOF." + ferramenta + "_corpo")) { | |
| 991 | + $i("i3GEOF." + ferramenta + "_corpo").innerHTML = ""; | |
| 992 | + eval("i3GEOF." + ferramenta + ".inicia('i3GEOF." + ferramenta + "_corpo');"); | |
| 993 | + } | |
| 994 | + } | |
| 995 | + } | |
| 996 | + }; | |
| 997 | + // | |
| 998 | + // a busca nao funciona com parametros dentro de parenteses | |
| 999 | + // por isso e necessario zerar o array | |
| 1000 | + // | |
| 1001 | + if (i3GEO.eventos.ATUALIZAARVORECAMADAS.length > 20) { | |
| 1002 | + i3GEO.eventos.ATUALIZAARVORECAMADAS = []; | |
| 1003 | + } | |
| 1004 | + i3GEO.eventos.adicionaEventos("ATUALIZAARVORECAMADAS", [ | |
| 1005 | + "i3GEO.janela.comboCabecalhoTemas('" + idDiv + "','" + idCombo + "','" + ferramenta + "','" + tipo + "')" | |
| 1006 | + ]); | |
| 1007 | + } | |
| 1008 | + botao.getMenu().subscribe("click", onButtonClick, botao); | |
| 1009 | + }, temp.id, "", false, tipo, "", true, true, ""); | |
| 1010 | + } | |
| 1011 | + }, | |
| 1012 | + comboCabecalhoTemasBs : function(idDiv, idCombo, ferramenta, tipo, onButtonClick, temaSel) { | |
| 1013 | + var temp = $i(idDiv); | |
| 1014 | + // tenta pegar o tema que ja foi escolhido antes | |
| 1015 | + if (!temaSel) { | |
| 1016 | + temaSel = ""; | |
| 1017 | + } | |
| 1018 | + if (temaSel == "" && i3GEOF[ferramenta] && i3GEOF[ferramenta].tema && i3GEOF[ferramenta].tema != "") { | |
| 1019 | + // o tema escolhido pode estar definido na variavel da ferramenta | |
| 1020 | + temaSel = i3GEOF[ferramenta].tema; | |
| 1021 | + } else { | |
| 1022 | + temaSel = i3GEO.temaAtivo; | |
| 1023 | + if (i3GEOF[ferramenta] && i3GEOF[ferramenta].tema) { | |
| 1024 | + i3GEOF[ferramenta].tema = temaSel; | |
| 1025 | + } | |
| 1026 | + } | |
| 1027 | + if (temp) { | |
| 1028 | + i3GEO.util.comboTemas(temp.id + "Sel", function(retorno) { | |
| 1029 | + var tema, container = $i(idDiv), botao; | |
| 1030 | + container.innerHTML += retorno.dados; | |
| 1031 | + botao = $i(temp.id + "Sel"); | |
| 1032 | + | |
| 1033 | + if (temaSel != "") { | |
| 1034 | + tema = i3GEO.arvoreDeCamadas.pegaTema(temaSel); | |
| 1035 | + if (tema && tema != undefined) { | |
| 1036 | + botao.value = tema.name; | |
| 1037 | + } else { | |
| 1038 | + botao.value= ""; | |
| 1039 | + } | |
| 1040 | + } else { | |
| 1041 | + botao.value= ""; | |
| 1042 | + } | |
| 1043 | + if (!onButtonClick) { | |
| 1044 | + onButtonClick = function(botao){ | |
| 1045 | + i3GEO.mapa.ativaTema(botao.value); | |
| 1046 | + if(botao.value == ""){ | |
| 1047 | + i3GEO.temaAtivo = ""; | |
| 1048 | + } | |
| 1049 | + if (i3GEOF[ferramenta]) { | |
| 1050 | + i3GEOF[ferramenta].tema = botao.value; | |
| 1051 | + if ($i("i3GEOF." + ferramenta + "_corpo")) { | |
| 1052 | + $i("i3GEOF." + ferramenta + "_corpo").innerHTML = ""; | |
| 1053 | + eval("i3GEOF." + ferramenta + ".inicia('i3GEOF." + ferramenta + "_corpo');"); | |
| 1054 | + } | |
| 1055 | + } | |
| 1056 | + }; | |
| 1057 | + } | |
| 1058 | + botao.onchange = onButtonClick; | |
| 1059 | + }, temp.id, "", false, tipo, "font-size: 12px;width: 95%;color:white;", false, true, "form-control comboTema"); | |
| 1060 | + } | |
| 1061 | + } | |
| 1062 | +}; | ... | ... |
js/marcador.js
| ... | ... | @@ -39,7 +39,7 @@ i3GEO.marcador = |
| 39 | 39 | IDONDE: "", |
| 40 | 40 | TEMPLATE: "", |
| 41 | 41 | config: { |
| 42 | - "template": "templates/ferramentasLink.html" | |
| 42 | + "template": "templates/ferramentasSend.html" | |
| 43 | 43 | }, |
| 44 | 44 | carregaTemplates: function(){ |
| 45 | 45 | $.get(i3GEO.marcador.config.template, function(template) { |
| ... | ... | @@ -62,7 +62,7 @@ i3GEO.marcador = |
| 62 | 62 | "", |
| 63 | 63 | "", |
| 64 | 64 | "", |
| 65 | - "<div class='i3GeoTituloJanela'>" + $trad("x79") + "</div>", | |
| 65 | + "<span class='i3GeoTituloJanelaBsNolink' >" + $trad("x79") + "</span></div>", | |
| 66 | 66 | "i3GEOmarcador", |
| 67 | 67 | false, |
| 68 | 68 | "hd", |
| ... | ... | @@ -70,7 +70,10 @@ i3GEO.marcador = |
| 70 | 70 | "", |
| 71 | 71 | "", |
| 72 | 72 | true, |
| 73 | - i3GEO.configura.locaplic + "/imagens/oxygen/16x16/games-config-custom.png" | |
| 73 | + "", | |
| 74 | + "", | |
| 75 | + "", | |
| 76 | + "" | |
| 74 | 77 | ); |
| 75 | 78 | i3GEO.marcador.IDONDE = janela[2].id; |
| 76 | 79 | i3GEO.marcador.redesenha(); |
| ... | ... | @@ -108,7 +111,7 @@ i3GEO.marcador = |
| 108 | 111 | "{{#data}}" + i3GEO.template.marcador + "{{/data}}", |
| 109 | 112 | {"data":i3GEO.marcador.itensMenu()} |
| 110 | 113 | ); |
| 111 | - $("#" + i3GEO.marcador.IDONDE).html(t); | |
| 114 | + $("#" + i3GEO.marcador.IDONDE).html("<div class='container-fluid'>" + t + "</div>"); | |
| 112 | 115 | }, |
| 113 | 116 | exporta : function() { |
| 114 | 117 | var c = i3GEO.util.pegaCookie("marcadoresDoI3Geo"), texto; | ... | ... |
pacotes/yui290/build/container/container_compacto.js
100644 → 100755
pacotes/yui290/build/container/container_core_compacto.js
100644 → 100755
pacotes/yui290/build/utilities/utilities_compacto.js
100644 → 100755