Commit eaa4aa9439ee778a60898bba9b22568ef277cc45
1 parent
501d6042
Exists in
master
and in
7 other branches
Inclusão de exemplos de customização com codemirror
Showing
2 changed files
with
46 additions
and
44 deletions
Show diff stats
exemplos/codemirror.php
@@ -5,20 +5,20 @@ if($_GET["nopage"] != "sim"){ | @@ -5,20 +5,20 @@ if($_GET["nopage"] != "sim"){ | ||
5 | echo " | 5 | echo " |
6 | <script> | 6 | <script> |
7 | i3GEO.janela.cria( | 7 | i3GEO.janela.cria( |
8 | - '950px', | ||
9 | - '390px', | ||
10 | - 'codemirror.php?pagina={$p}&nopage=sim', | ||
11 | - '', | ||
12 | - '', | ||
13 | - 'Código', | ||
14 | - 'codigoPagina', | ||
15 | - false, | ||
16 | - 'hd', | ||
17 | - function(){}, | ||
18 | - function(){ | ||
19 | - i3GEO.janela.minimiza('codigoPagina'); | ||
20 | - } | ||
21 | - ); | 8 | + '950px', |
9 | + '390px', | ||
10 | + 'codemirror.php?pagina={$p}&nopage=sim', | ||
11 | + '', | ||
12 | + '', | ||
13 | + 'Código', | ||
14 | + 'codigoPagina', | ||
15 | + false, | ||
16 | + 'hd', | ||
17 | + function(){}, | ||
18 | + function(){ | ||
19 | + i3GEO.janela.minimiza('codigoPagina'); | ||
20 | + } | ||
21 | + ); | ||
22 | </script> | 22 | </script> |
23 | "; | 23 | "; |
24 | exit; | 24 | exit; |
@@ -26,33 +26,35 @@ if($_GET["nopage"] != "sim"){ | @@ -26,33 +26,35 @@ if($_GET["nopage"] != "sim"){ | ||
26 | ?> | 26 | ?> |
27 | <!doctype html> | 27 | <!doctype html> |
28 | <head> | 28 | <head> |
29 | - <title>CodeMirror: HTML completion demo</title> | ||
30 | - <meta charset="utf-8"/> | ||
31 | - <link rel=stylesheet href="../pacotes/codemirror/doc/docs.css"> | 29 | +<title>CodeMirror: HTML completion demo</title> |
30 | +<meta charset="utf-8" /> | ||
31 | +<link rel=stylesheet href="../pacotes/codemirror/doc/docs.css"> | ||
32 | 32 | ||
33 | - <link rel="stylesheet" href="../pacotes/codemirror/lib/codemirror.css"> | ||
34 | - <link rel="stylesheet" href="../pacotes/codemirror/addon/hint/show-hint.css"> | ||
35 | - <script src="../pacotes/codemirror/lib/codemirror.js"></script> | ||
36 | - <script src="../pacotes/codemirror/addon/hint/show-hint.js"></script> | ||
37 | - <script src="../pacotes/codemirror/addon/hint/xml-hint.js"></script> | ||
38 | - <script src="../pacotes/codemirror/addon/hint/html-hint.js"></script> | ||
39 | - <script src="../pacotes/codemirror/mode/xml/xml.js"></script> | ||
40 | - <script src="../pacotes/codemirror/mode/javascript/javascript.js"></script> | ||
41 | - <script src="../pacotes/codemirror/mode/css/css.js"></script> | ||
42 | - <script src="../pacotes/codemirror/mode/htmlmixed/htmlmixed.js"></script> | ||
43 | - <style type="text/css"> | ||
44 | - .CodeMirror {border-top: 1px solid #888; border-bottom: 1px solid #888;} | ||
45 | - </style> | 33 | +<link rel="stylesheet" href="../pacotes/codemirror/lib/codemirror.css"> |
34 | +<link rel="stylesheet" href="../pacotes/codemirror/addon/hint/show-hint.css"> | ||
35 | +<script src="../pacotes/codemirror/lib/codemirror.js"></script> | ||
36 | +<script src="../pacotes/codemirror/addon/hint/show-hint.js"></script> | ||
37 | +<script src="../pacotes/codemirror/addon/hint/xml-hint.js"></script> | ||
38 | +<script src="../pacotes/codemirror/addon/hint/html-hint.js"></script> | ||
39 | +<script src="../pacotes/codemirror/mode/xml/xml.js"></script> | ||
40 | +<script src="../pacotes/codemirror/mode/javascript/javascript.js"></script> | ||
41 | +<script src="../pacotes/codemirror/mode/css/css.js"></script> | ||
42 | +<script src="../pacotes/codemirror/mode/htmlmixed/htmlmixed.js"></script> | ||
43 | +<style type="text/css"> | ||
44 | +.CodeMirror { | ||
45 | + border-top: 1px solid #888; | ||
46 | + border-bottom: 1px solid #888; | ||
47 | +} | ||
48 | +</style> | ||
46 | </head> | 49 | </head> |
47 | <body> | 50 | <body> |
48 | -Código:<br> | ||
49 | -<textarea id="codeArea" style="text-align:left;width:90%;height:95%"> | 51 | + <textarea id="codeArea" style="text-align: left; width: 90%; height: 95%"> |
50 | <?php include ($p); ?> | 52 | <?php include ($p); ?> |
51 | </textarea> | 53 | </textarea> |
52 | -<script> | 54 | + <script> |
53 | CodeMirror.fromTextArea(document.getElementById("codeArea"), { | 55 | CodeMirror.fromTextArea(document.getElementById("codeArea"), { |
54 | - mode: "text/html", | ||
55 | - lineNumbers: true | ||
56 | - }); | 56 | + mode: "text/html", |
57 | + lineNumbers: true | ||
58 | +}); | ||
57 | </script> | 59 | </script> |
58 | -</body> | ||
59 | \ No newline at end of file | 60 | \ No newline at end of file |
61 | +</body> |
exemplos/index.html
@@ -60,19 +60,19 @@ body,td { | @@ -60,19 +60,19 @@ body,td { | ||
60 | Sequência de exemplos que abordam a construção de interfaces customizadas. O código dos exemplos são mostrados em uma janela flutuante e foram organizados para facilitar o entendimento do funcionamento do código do i3Geo | 60 | Sequência de exemplos que abordam a construção de interfaces customizadas. O código dos exemplos são mostrados em uma janela flutuante e foram organizados para facilitar o entendimento do funcionamento do código do i3Geo |
61 | </p> | 61 | </p> |
62 | <p> | 62 | <p> |
63 | - <a href="codemirror.php?pagina=cursodsv1.htm" target="_blank">[1]</a> | 63 | + <a href="codemirror.php?&pagina=cursodsv1.htm" target="_blank">[1]</a> |
64 | | 64 | |
65 | - <a href="codemirror.php?pagina=cursodsv2.htm" target="_blank">[2]</a> | 65 | + <a href="codemirror.php?&pagina=cursodsv2.htm" target="_blank">[2]</a> |
66 | | 66 | |
67 | - <a href="codemirror.php?pagina=cursodsv3.htm" target="_blank">[3]</a> | 67 | + <a href="codemirror.php?&pagina=cursodsv3.htm" target="_blank">[3]</a> |
68 | | 68 | |
69 | - <a href="codemirror.php?pagina=cursodsv4.htm" target="_blank">[4]</a> | 69 | + <a href="codemirror.php?&pagina=cursodsv4.htm" target="_blank">[4]</a> |
70 | | 70 | |
71 | - <a href="codemirror.php?pagina=cursodsv5.htm" target="_blank">[5]</a> | 71 | + <a href="codemirror.php?&pagina=cursodsv5.htm" target="_blank">[5]</a> |
72 | | 72 | |
73 | - <a href="codemirror.php?pagina=cursodsv6.htm" target="_blank">[6]</a> | 73 | + <a href="codemirror.php?&pagina=cursodsv6.htm" target="_blank">[6]</a> |
74 | | 74 | |
75 | - <a href="codemirror.php?pagina=cursodsv7.htm" target="_blank">[7]</a> | 75 | + <a href="codemirror.php?&pagina=cursodsv7.htm" target="_blank">[7]</a> |
76 | </p> | 76 | </p> |
77 | </fieldset> | 77 | </fieldset> |
78 | <fieldset> | 78 | <fieldset> |