Commit 097f2b4f94007e14d6ddfd4052fa96921369e103
1 parent
4f88c088
Exists in
master
and in
7 other branches
--no commit message
Showing
3 changed files
with
58 additions
and
16 deletions
Show diff stats
classesjs/classe_mapa.js
classesjs/classe_util.js
| ... | ... | @@ -628,25 +628,28 @@ i3GEO.util = { |
| 628 | 628 | h {String} - (opcional) altura da imagem |
| 629 | 629 | |
| 630 | 630 | mouseover - funcao que sera executada no evento mouseover |
| 631 | - | |
| 631 | + | |
| 632 | 632 | Retorno: |
| 633 | - | |
| 633 | + | |
| 634 | 634 | array [boolean,obj] - indica se foi criado ou se ja existia | objeto criado |
| 635 | 635 | */ |
| 636 | - criaPin: function(id,imagem,w,h,mouseover){ | |
| 636 | + criaPin: function(id,imagem,w,h,mouseover,onde){ | |
| 637 | 637 | if(typeof(console) !== 'undefined'){console.info("i3GEO.util.criaPin()");} |
| 638 | - if(arguments.length < 1 || id === ""){ | |
| 638 | + if(!id || id === ""){ | |
| 639 | 639 | id = "boxpin"; |
| 640 | 640 | } |
| 641 | - if(arguments.length < 2 || imagem === ""){ | |
| 641 | + if(!imagem || imagem === ""){ | |
| 642 | 642 | imagem = i3GEO.configura.locaplic+'/imagens/marker.png'; |
| 643 | 643 | } |
| 644 | - if(arguments.length < 3 || w === ""){ | |
| 644 | + if(!w || w === ""){ | |
| 645 | 645 | w = 21; |
| 646 | 646 | } |
| 647 | - if(arguments.length < 4 || h === ""){ | |
| 647 | + if(!h || h === ""){ | |
| 648 | 648 | h = 25; |
| 649 | 649 | } |
| 650 | + if(!onde || onde === ""){ | |
| 651 | + onde = document.body; | |
| 652 | + } | |
| 650 | 653 | var p = $i(id); |
| 651 | 654 | if (!p){ |
| 652 | 655 | var novoel = document.createElement("img"); |
| ... | ... | @@ -667,7 +670,7 @@ i3GEO.util = { |
| 667 | 670 | else if(mouseover){ |
| 668 | 671 | novoel.onmouseover = mouseover; |
| 669 | 672 | } |
| 670 | - document.body.appendChild(novoel); | |
| 673 | + onde.appendChild(novoel); | |
| 671 | 674 | i3GEO.util.PINS.push(id); |
| 672 | 675 | return [true,novoel]; |
| 673 | 676 | } |
| ... | ... | @@ -693,18 +696,19 @@ i3GEO.util = { |
| 693 | 696 | */ |
| 694 | 697 | posicionaImagemNoMapa: function(id,x,y){ |
| 695 | 698 | //TODO permitir posicionar imagem usando lat long |
| 696 | - if(typeof(console) !== 'undefined'){console.warn("i3GEO.util.posicionaImagemNoMapa()");} | |
| 697 | 699 | var i,mx,my; |
| 698 | - if(x && x != "") | |
| 699 | - {objposicaocursor.telax = x;} | |
| 700 | - if(y && y != "") | |
| 701 | - {objposicaocursor.telay = y;} | |
| 700 | + if(!x){ | |
| 701 | + x = objposicaocursor.telax; | |
| 702 | + } | |
| 703 | + if(!y){ | |
| 704 | + y = objposicaocursor.telay; | |
| 705 | + } | |
| 702 | 706 | i = $i(id); |
| 703 | 707 | mx = parseInt(i.style.width,10) / 2; |
| 704 | 708 | my = parseInt(i.style.height,10) / 2; |
| 705 | - i.style.top = objposicaocursor.telay - my + "px"; | |
| 706 | - i.style.left = objposicaocursor.telax - mx + "px"; | |
| 707 | - return [objposicaocursor.telay - my,objposicaocursor.telax - mx]; | |
| 709 | + i.style.top = y - my + "px"; | |
| 710 | + i.style.left = x - mx + "px"; | |
| 711 | + return [y - my,x - mx]; | |
| 708 | 712 | }, |
| 709 | 713 | /* |
| 710 | 714 | Function: escondePin |
| ... | ... | @@ -2794,6 +2798,7 @@ i3GEO.util = { |
| 2794 | 2798 | '-//W3C//DTD XHTML 1.0 Transitional//EN', |
| 2795 | 2799 | 'http://www.w3.org/TR/html4/loose.dtd' |
| 2796 | 2800 | ); |
| 2801 | + //var newDoctype = document.implementation.createDocumentType('HTML'); | |
| 2797 | 2802 | if (document.doctype) { |
| 2798 | 2803 | document.doctype.parentNode.replaceChild(newDoctype, document.doctype); |
| 2799 | 2804 | } | ... | ... |
css/geral.css
| ... | ... | @@ -1082,6 +1082,42 @@ h1 { |
| 1082 | 1082 | } |
| 1083 | 1083 | } |
| 1084 | 1084 | |
| 1085 | +.i3geoForm, .i3geoForm150 { | |
| 1086 | + width: 252px; | |
| 1087 | + overflow: hidden; | |
| 1088 | + background: #F8F8F8; | |
| 1089 | + border: 1px solid #DDDDDD; | |
| 1090 | + height: 22px; | |
| 1091 | + border-radius: 2px; | |
| 1092 | +} | |
| 1093 | + | |
| 1094 | +.i3geoForm150 { | |
| 1095 | + width: 150px; | |
| 1096 | +} | |
| 1097 | + | |
| 1098 | +.i3geoFormIconeEdita { | |
| 1099 | + background: transparent url("../imagens/gisicons/edit2.png") no-repeat scroll 100% 5px; | |
| 1100 | + @media (-webkit-min-device-pixel-ratio: 2), | |
| 1101 | + (min-resolution: 192dpi) { | |
| 1102 | + background: transparent url("../imagens/gisicons/edit2.png") no-repeat scroll 100% 5px; | |
| 1103 | + background-size: 16px 144px; | |
| 1104 | + } | |
| 1105 | +} | |
| 1106 | + | |
| 1107 | +.i3geoForm input, .i3geoForm150 input { | |
| 1108 | + width: 90%; | |
| 1109 | + height: 22px; | |
| 1110 | + border: 0; | |
| 1111 | + box-shadow: none; | |
| 1112 | + line-height: 1.5; | |
| 1113 | + -webkit-appearance: none; | |
| 1114 | + -moz-appearance: none; | |
| 1115 | + text-indent: 0.01px; | |
| 1116 | + text-overflow: ''; | |
| 1117 | + font-size: 12px; | |
| 1118 | + appearance: none; | |
| 1119 | +} | |
| 1120 | + | |
| 1085 | 1121 | /*hack opera */ |
| 1086 | 1122 | @media all and (-webkit-min-device-pixel-ratio:10000) , not all and |
| 1087 | 1123 | (-webkit-min-device-pixel-ratio:0) { | ... | ... |