Commit 51ada8eb3a25dc44c6b1155ad9dcbca7fbea2bcd
1 parent
31662211
Exists in
master
and in
7 other branches
Adaptação do Painel de botoes do editor vetorial para OL3
Showing
1 changed file
with
17 additions
and
5 deletions
Show diff stats
ferramentas/editorol/editorol.js
... | ... | @@ -1920,24 +1920,25 @@ i3GEO.editorOL = |
1920 | 1920 | temp.style.height = "100px"; |
1921 | 1921 | temp.innerHTML = ins; |
1922 | 1922 | }, |
1923 | - //TODO incuir um botao para executar a operacao ao inves do evento onchange | |
1924 | 1923 | ferramentas : function() { |
1924 | + var b, ins; | |
1925 | 1925 | if (!document.getElementById("panelferramentasEditor")) { |
1926 | 1926 | YAHOO.namespace("editorOL.ferramentas"); |
1927 | 1927 | YAHOO.editorOL.ferramentas.panel = new YAHOO.widget.Panel("panelferramentasEditor", { |
1928 | 1928 | zIndex : 20000, |
1929 | 1929 | iframe : true, |
1930 | 1930 | width : "300px", |
1931 | + height : "150px", | |
1931 | 1932 | visible : false, |
1932 | 1933 | draggable : true, |
1933 | 1934 | close : true |
1934 | 1935 | }); |
1935 | - var ins = | |
1936 | + ins = | |
1936 | 1937 | "" + '<p class=paragrafo >' |
1937 | 1938 | + $trad("opsel") |
1938 | 1939 | + ':</p>' |
1939 | 1940 | + '<div class=styled-select >' |
1940 | - + '<select onchange="i3GEO.editorOL.processageo(this.value);this.value = \'\'" >' | |
1941 | + + '<select id="panelferramentasEditorOpcoes">' | |
1941 | 1942 | + ' <option value="">---</option>' |
1942 | 1943 | + ' <option value=union >União</option>'; |
1943 | 1944 | if (i3GEO.php) { |
... | ... | @@ -1947,8 +1948,9 @@ i3GEO.editorOL = |
1947 | 1948 | + ' <option value=difference >Diferença</option>' |
1948 | 1949 | + ' <option value=symdifference >Diferença simétrica</option>'; |
1949 | 1950 | } |
1950 | - ins += | |
1951 | - '</select></div>'; | |
1951 | + ins += '</select></p>'; | |
1952 | + ins += '</div>'; | |
1953 | + ins += '<br><p class=paragrafo ><input id="panelferramentasEditorAplicar" type="button" value="' + $trad("p14") + '" />'; | |
1952 | 1954 | |
1953 | 1955 | YAHOO.editorOL.ferramentas.panel.setBody(ins); |
1954 | 1956 | if (i3GEO && typeof i3GEO != undefined && i3GEO != "") { |
... | ... | @@ -1969,10 +1971,20 @@ i3GEO.editorOL = |
1969 | 1971 | i3GEO.janela.minimiza("panelferramentasEditor"); |
1970 | 1972 | }; |
1971 | 1973 | } |
1974 | + b = new YAHOO.widget.Button( | |
1975 | + "panelferramentasEditorAplicar",{ | |
1976 | + onclick:{ | |
1977 | + fn: function(){ | |
1978 | + i3GEO.editorOL.processageo($i("panelferramentasEditorOpcoes").value); | |
1979 | + } | |
1980 | + } | |
1981 | + }); | |
1982 | + b.addClass("rodar"); | |
1972 | 1983 | } else { |
1973 | 1984 | YAHOO.editorOL.ferramentas.panel.render(document.body); |
1974 | 1985 | } |
1975 | 1986 | YAHOO.editorOL.ferramentas.panel.show(); |
1987 | + | |
1976 | 1988 | }, |
1977 | 1989 | //TODO implementar ao atualizar OL3 |
1978 | 1990 | snap : function() { | ... | ... |