Commit eaa4aa9439ee778a60898bba9b22568ef277cc45

Authored by Edmar Moretti
1 parent 501d6042

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&oacute;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&oacute;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[&quot;nopage&quot;] != &quot;sim&quot;){ @@ -26,33 +26,35 @@ if($_GET[&quot;nopage&quot;] != &quot;sim&quot;){
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&oacute;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&ecirc;ncia de exemplos que abordam a constru&ccedil;&atilde;o de interfaces customizadas. O c&oacute;digo dos exemplos s&atilde;o mostrados em uma janela flutuante e foram organizados para facilitar o entendimento do funcionamento do c&oacute;digo do i3Geo 60 Sequ&ecirc;ncia de exemplos que abordam a constru&ccedil;&atilde;o de interfaces customizadas. O c&oacute;digo dos exemplos s&atilde;o mostrados em uma janela flutuante e foram organizados para facilitar o entendimento do funcionamento do c&oacute;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 &nbsp;&nbsp; 64 &nbsp;&nbsp;
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 &nbsp;&nbsp; 66 &nbsp;&nbsp;
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 &nbsp;&nbsp; 68 &nbsp;&nbsp;
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 &nbsp;&nbsp; 70 &nbsp;&nbsp;
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 &nbsp;&nbsp; 72 &nbsp;&nbsp;
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 &nbsp;&nbsp; 74 &nbsp;&nbsp;
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>