diff --git a/css/nouislider.css b/css/nouislider.css new file mode 100644 index 0000000..97a96f0 --- /dev/null +++ b/css/nouislider.css @@ -0,0 +1,260 @@ +/*! nouislider - 10.0.0 - 2017-05-28 14:52:48 */ +/* Functional styling; + * These styles are required for noUiSlider to function. + * You don't need to change these rules to apply your design. + */ +.noUi-target, +.noUi-target * { + -webkit-touch-callout: none; + -webkit-tap-highlight-color: rgba(0, 0, 0, 0); + -webkit-user-select: none; + -ms-touch-action: none; + touch-action: none; + -ms-user-select: none; + -moz-user-select: none; + user-select: none; + -moz-box-sizing: border-box; + box-sizing: border-box; +} +.noUi-target { + position: relative; + direction: ltr; +} +.noUi-base { + width: 100%; + height: 100%; + position: relative; + z-index: 1; + /* Fix 401 */ +} +.noUi-connect { + position: absolute; + right: 0; + top: 0; + left: 0; + bottom: 0; +} +.noUi-origin { + position: absolute; + height: 0; + width: 0; +} +.noUi-handle { + position: relative; + z-index: 1; +} +.noUi-state-tap .noUi-connect, +.noUi-state-tap .noUi-origin { + -webkit-transition: top 0.3s, right 0.3s, bottom 0.3s, left 0.3s; + transition: top 0.3s, right 0.3s, bottom 0.3s, left 0.3s; +} +.noUi-state-drag * { + cursor: inherit !important; +} +/* Painting and performance; + * Browsers can paint handles in their own layer. + */ +.noUi-base, +.noUi-handle { + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); +} +/* Slider size and handle placement; + */ +.noUi-horizontal { + height: 18px; +} +.noUi-horizontal .noUi-handle { + width: 34px; + height: 28px; + left: -17px; + top: -6px; +} +.noUi-vertical { + width: 18px; +} +.noUi-vertical .noUi-handle { + width: 28px; + height: 34px; + left: -6px; + top: -17px; +} +/* Styling; + */ +.noUi-target { + background: #FAFAFA; + border-radius: 4px; + border: 1px solid #D3D3D3; + box-shadow: inset 0 1px 1px #F0F0F0, 0 3px 6px -5px #BBB; +} +.noUi-connect { + background: #3FB8AF; + border-radius: 4px; + box-shadow: inset 0 0 3px rgba(51, 51, 51, 0.45); + -webkit-transition: background 450ms; + transition: background 450ms; +} +/* Handles and cursors; + */ +.noUi-draggable { + cursor: ew-resize; +} +.noUi-vertical .noUi-draggable { + cursor: ns-resize; +} +.noUi-handle { + border: 1px solid #D9D9D9; + border-radius: 3px; + background: #FFF; + cursor: default; + box-shadow: inset 0 0 1px #FFF, inset 0 1px 7px #EBEBEB, 0 3px 6px -3px #BBB; +} +.noUi-active { + box-shadow: inset 0 0 1px #FFF, inset 0 1px 7px #DDD, 0 3px 6px -3px #BBB; +} +/* Handle stripes; + */ +.noUi-handle:before, +.noUi-handle:after { + content: ""; + display: block; + position: absolute; + height: 14px; + width: 1px; + background: #E8E7E6; + left: 14px; + top: 6px; +} +.noUi-handle:after { + left: 17px; +} +.noUi-vertical .noUi-handle:before, +.noUi-vertical .noUi-handle:after { + width: 14px; + height: 1px; + left: 6px; + top: 14px; +} +.noUi-vertical .noUi-handle:after { + top: 17px; +} +/* Disabled state; + */ +[disabled] .noUi-connect { + background: #B8B8B8; +} +[disabled].noUi-target, +[disabled].noUi-handle, +[disabled] .noUi-handle { + cursor: not-allowed; +} +/* Base; + * + */ +.noUi-pips, +.noUi-pips * { + -moz-box-sizing: border-box; + box-sizing: border-box; +} +.noUi-pips { + position: absolute; + color: #999; +} +/* Values; + * + */ +.noUi-value { + position: absolute; + white-space: nowrap; + text-align: center; +} +.noUi-value-sub { + color: #ccc; + font-size: 10px; +} +/* Markings; + * + */ +.noUi-marker { + position: absolute; + background: #CCC; +} +.noUi-marker-sub { + background: #AAA; +} +.noUi-marker-large { + background: #AAA; +} +/* Horizontal layout; + * + */ +.noUi-pips-horizontal { + padding: 10px 0; + height: 80px; + top: 100%; + left: 0; + width: 100%; +} +.noUi-value-horizontal { + -webkit-transform: translate3d(-50%, 50%, 0); + transform: translate3d(-50%, 50%, 0); +} +.noUi-marker-horizontal.noUi-marker { + margin-left: -1px; + width: 2px; + height: 5px; +} +.noUi-marker-horizontal.noUi-marker-sub { + height: 10px; +} +.noUi-marker-horizontal.noUi-marker-large { + height: 15px; +} +/* Vertical layout; + * + */ +.noUi-pips-vertical { + padding: 0 10px; + height: 100%; + top: 0; + left: 100%; +} +.noUi-value-vertical { + -webkit-transform: translate3d(0, 50%, 0); + transform: translate3d(0, 50%, 0); + padding-left: 25px; +} +.noUi-marker-vertical.noUi-marker { + width: 5px; + height: 2px; + margin-top: -1px; +} +.noUi-marker-vertical.noUi-marker-sub { + width: 10px; +} +.noUi-marker-vertical.noUi-marker-large { + width: 15px; +} +.noUi-tooltip { + display: block; + position: absolute; + border: 1px solid #D9D9D9; + border-radius: 3px; + background: #fff; + color: #000; + padding: 5px; + text-align: center; + white-space: nowrap; +} +.noUi-horizontal .noUi-tooltip { + -webkit-transform: translate(-50%, 0); + transform: translate(-50%, 0); + left: 50%; + bottom: 120%; +} +.noUi-vertical .noUi-tooltip { + -webkit-transform: translate(0, -50%); + transform: translate(0, -50%); + top: 50%; + right: 120%; +} diff --git a/ferramentas/opacidademapa/dependencias.php b/ferramentas/opacidademapa/dependencias.php new file mode 100755 index 0000000..005290f --- /dev/null +++ b/ferramentas/opacidademapa/dependencias.php @@ -0,0 +1,22 @@ + ou com a funcao scripttag do i3Geo + * Alem de carregar os scripts, carrega tambem o template no formato MUSTACHE, definindo a variavel + * javascript i3GEOF.filtro.MUSTACHE + * O template e substituido pelos valores definidos em index.js no momento da inicializacao da ferramenta + */ +if(extension_loaded('zlib')){ + ob_start('ob_gzhandler'); +} +header("Content-type: text/javascript"); +include("index.js"); +include("dicionario.js"); +echo "\n"; + +if(extension_loaded('zlib')){ + ob_end_flush(); +} +?> \ No newline at end of file diff --git a/ferramentas/opacidademapa/index.js b/ferramentas/opacidademapa/index.js index 57ca188..77e0cf7 100755 --- a/ferramentas/opacidademapa/index.js +++ b/ferramentas/opacidademapa/index.js @@ -59,30 +59,17 @@ i3GEOF.opacidademapa = { {YAHOO.panel} */ janela: "", - /* - Para efeitos de compatibilidade antes da versão 4.7 que não tinha dicionário - */ - criaJanelaFlutuante: function(){ - i3GEOF.opacidademapa.iniciaDicionario(); - }, - /* - Function: iniciaDicionario - - Carrega o dicionário e chama a função que inicia a ferramenta - - O Javascript é carregado com o id i3GEOF.nomedaferramenta.dicionario_script - */ - iniciaDicionario: function(){ - if(typeof(i3GEOF.opacidademapa.dicionario) === 'undefined'){ - i3GEO.util.scriptTag( - i3GEO.configura.locaplic+"/ferramentas/opacidademapa/dicionario.js", - "i3GEOF.opacidademapa.iniciaJanelaFlutuante()", - "i3GEOF.opacidademapa.dicionario_script" - ); - } - else{ - i3GEOF.opacidademapa.iniciaJanelaFlutuante(); - } + /** + * Template no formato mustache. E preenchido na carga do javascript com o programa dependencias.php + */ + MUSTACHE : "", + /** + * Susbtitutos para o template + */ + mustacheHash : function() { + var dicionario = i3GEO.idioma.objetoIdioma(i3GEOF.opacidademapa.dicionario); + dicionario["locaplic"] = i3GEO.configura.locaplic; + return dicionario; }, /* Function: inicia @@ -94,6 +81,18 @@ i3GEOF.opacidademapa = { iddiv {String} - id do div que receberá o conteudo HTML da ferramenta */ inicia: function(iddiv){ + if(i3GEOF.opacidademapa.MUSTACHE == ""){ + var t1 = i3GEO.configura.locaplic + "/ferramentas/opacidademapa/template_mst.html"; + + $.get(t1).done(function(r1) { + i3GEOF.opacidademapa.MUSTACHE = r1; + i3GEOF.opacidademapa.inicia(iddiv); + }).fail(function() { + i3GEO.janela.closeMsg($trad("erroTpl")); + return; + }); + return; + } if (!$i("i3GEOFopacidademapaComboCabecaSel")) { i3GEO.janela.comboCabecalhoTemasBs("i3GEOFopacidademapaComboCabeca","i3GEOFopacidademapaComboCabecaSel","opacidademapa","ligados",function(evt){ var botao = evt.target; @@ -125,17 +124,7 @@ i3GEOF.opacidademapa = { String com o código html */ html:function(){ - var ins = ""; - if(navm){ - ins += '
' + - '
' + - '
'; - } - else{ - ins += '
' + - '
' + - '
'; - } + var ins = Mustache.render(i3GEOF.opacidademapa.MUSTACHE, i3GEOF.opacidademapa.mustacheHash()); return ins; }, /* @@ -158,10 +147,10 @@ i3GEOF.opacidademapa = { }; var janela,divid,titulo; //cria a janela flutuante - titulo = "
------
"+$trad("t20")+""; + titulo = "
------
"+$trad("t20")+""; janela = i3GEO.janela.cria( - "340px", - "40px", + "360px", + "60px", "", "", "", @@ -182,9 +171,6 @@ i3GEOF.opacidademapa = { $i("i3GEOF.opacidademapa_corpo").style.textAlign = "left"; i3GEOF.opacidademapa.aguarde = $i("i3GEOF.opacidademapa_imagemCabecalho").style; i3GEOF.opacidademapa.inicia(divid); - if(i3GEO.Interface.ATUAL == "googleearth"){ - $i('i3GEOFopacidademapaComboCabeca').style.display = "none"; - } }, /* Function: criaslide @@ -192,14 +178,10 @@ i3GEOF.opacidademapa = { Cria a barra deslizante com base em YAHOO.widget.Slider */ criaslide: function(){ - i3GEOF.opacidademapa.slider = YAHOO.widget.Slider.getHorizSlider($i("slider-bg"),$i("slider-thumb"), 0, 200, 0); - i3GEOF.opacidademapa.slider.setValue(200,false); + i3GEOF.opacidademapa.slider = YAHOO.widget.Slider.getHorizSlider($i("slider-bg"),$i("slider-thumb"), 0, 300, 0); + i3GEOF.opacidademapa.slider.setValue(300,false); i3GEOF.opacidademapa.slider.subscribe("change", function(offsetFromStart) { - i3GEO.Interface.aplicaOpacidade(offsetFromStart / 200,i3GEOF.opacidademapa.tema); + i3GEO.Interface.aplicaOpacidade(offsetFromStart / 300,i3GEOF.opacidademapa.tema); }); - if(navm){ - $i("slider-bg").style.left = "-100px"; - $i("i3GEOF.opacidademapa_corpo").style.background = "url("+i3GEO.configura.locaplic+"/pacotes/yui290/build/slider/assets/bg-h.gif) white no-repeat 10px 0px"; - } } }; \ No newline at end of file diff --git a/ferramentas/opacidademapa/template_mst.html b/ferramentas/opacidademapa/template_mst.html new file mode 100755 index 0000000..380e3a9 --- /dev/null +++ b/ferramentas/opacidademapa/template_mst.html @@ -0,0 +1,8 @@ +
+
+
+ +
+
+
+ diff --git a/js/mapa.js b/js/mapa.js index 8970258..30342d5 100755 --- a/js/mapa.js +++ b/js/mapa.js @@ -620,7 +620,8 @@ i3GEO.mapa = "animacao", "animacao", "dependencias.php", - "i3GEOF.animacao.iniciaJanelaFlutuante()"); + "i3GEOF.animacao.iniciaJanelaFlutuante()" + ); }, /** * Function: opacidade @@ -628,7 +629,13 @@ i3GEO.mapa = * Abre a janela de dialogo da ferramenta de definicao da transparencia das camadas principais do mapa */ opacidade : function() { - i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.opacidade()", "opacidademapa", "opacidademapa"); + i3GEO.util.dialogoFerramenta( + "i3GEO.mapa.dialogo.opacidade()", + "opacidademapa", + "opacidademapa", + "dependencias.php", + "i3GEOF.opacidademapa.iniciaJanelaFlutuante()" + ); }, /** * Function: t3d -- libgit2 0.21.2