Wp-Insert - Version 1.7

Version Description

Download this release

Release Info

Developer namith.jawahar
Plugin Icon 128x128 Wp-Insert
Version 1.7
Comparing to
See all releases

Code changes from version 1.6.2 to 1.7

Files changed (117) hide show
  1. codepress/codepress.css +0 -21
  2. codepress/codepress.html +0 -35
  3. codepress/codepress.js +0 -138
  4. codepress/engines/gecko.js +0 -293
  5. codepress/engines/khtml.js +0 -0
  6. codepress/engines/msie.js +0 -304
  7. codepress/engines/older.js +0 -0
  8. codepress/engines/opera.js +0 -260
  9. codepress/images/line-numbers.png +0 -0
  10. codepress/index.html +0 -443
  11. codepress/languages/asp.css +0 -71
  12. codepress/languages/asp.js +0 -117
  13. codepress/languages/autoit.css +0 -13
  14. codepress/languages/autoit.js +0 -32
  15. codepress/languages/csharp.css +0 -9
  16. codepress/languages/csharp.js +0 -25
  17. codepress/languages/css.css +0 -10
  18. codepress/languages/css.js +0 -23
  19. codepress/languages/generic.css +0 -9
  20. codepress/languages/generic.js +0 -25
  21. codepress/languages/html.css +0 -13
  22. codepress/languages/html.js +0 -59
  23. codepress/languages/java.css +0 -7
  24. codepress/languages/java.js +0 -24
  25. codepress/languages/javascript.css +0 -8
  26. codepress/languages/javascript.js +0 -30
  27. codepress/languages/perl.css +0 -11
  28. codepress/languages/perl.js +0 -27
  29. codepress/languages/php.css +0 -12
  30. codepress/languages/php.js +0 -61
  31. codepress/languages/ruby.css +0 -10
  32. codepress/languages/ruby.js +0 -26
  33. codepress/languages/sql.css +0 -10
  34. codepress/languages/sql.js +0 -30
  35. codepress/languages/text.css +0 -5
  36. codepress/languages/text.js +0 -9
  37. codepress/languages/vbscript.css +0 -71
  38. codepress/languages/vbscript.js +0 -117
  39. codepress/languages/xsl.css +0 -15
  40. codepress/languages/xsl.js +0 -103
  41. editarea/change_log.txt +293 -0
  42. editarea/edit_area.css +530 -0
  43. editarea/edit_area_full.js +38 -0
  44. editarea/images/autocompletion.gif +0 -0
  45. editarea/images/close.gif +0 -0
  46. editarea/images/fullscreen.gif +0 -0
  47. editarea/images/go_to_line.gif +0 -0
  48. editarea/images/help.gif +0 -0
  49. editarea/images/highlight.gif +0 -0
  50. editarea/images/load.gif +0 -0
  51. editarea/images/move.gif +0 -0
  52. editarea/images/newdocument.gif +0 -0
  53. editarea/images/opacity.png +0 -0
  54. editarea/images/processing.gif +0 -0
  55. editarea/images/redo.gif +0 -0
  56. editarea/images/reset_highlight.gif +0 -0
  57. editarea/images/save.gif +0 -0
  58. editarea/images/search.gif +0 -0
  59. editarea/images/smooth_selection.gif +0 -0
  60. editarea/images/spacer.gif +0 -0
  61. editarea/images/statusbar_resize.gif +0 -0
  62. editarea/images/undo.gif +0 -0
  63. editarea/images/word_wrap.gif +0 -0
  64. editarea/langs/bg.js +54 -0
  65. editarea/langs/cs.js +48 -0
  66. editarea/langs/de.js +48 -0
  67. editarea/langs/dk.js +48 -0
  68. editarea/langs/en.js +48 -0
  69. editarea/langs/eo.js +48 -0
  70. editarea/langs/es.js +48 -0
  71. editarea/langs/fi.js +48 -0
  72. editarea/langs/fr.js +48 -0
  73. editarea/langs/hr.js +48 -0
  74. editarea/langs/id.js +48 -0
  75. editarea/langs/it.js +48 -0
  76. editarea/langs/ja.js +48 -0
  77. editarea/langs/mk.js +48 -0
  78. editarea/langs/nl.js +48 -0
  79. editarea/langs/pl.js +48 -0
  80. editarea/langs/pt.js +48 -0
  81. editarea/langs/ru.js +48 -0
  82. editarea/langs/sk.js +48 -0
  83. editarea/langs/zh.js +48 -0
  84. editarea/license_apache.txt +7 -0
  85. editarea/license_bsd.txt +10 -0
  86. codepress/license.txt → editarea/license_lgpl.txt +458 -458
  87. editarea/reg_syntax/basic.js +70 -0
  88. editarea/reg_syntax/brainfuck.js +45 -0
  89. editarea/reg_syntax/c.js +63 -0
  90. editarea/reg_syntax/coldfusion.js +120 -0
  91. editarea/reg_syntax/cpp.js +66 -0
  92. editarea/reg_syntax/css.js +85 -0
  93. editarea/reg_syntax/html.js +51 -0
  94. editarea/reg_syntax/java.js +57 -0
  95. editarea/reg_syntax/js.js +94 -0
  96. editarea/reg_syntax/pas.js +83 -0
  97. editarea/reg_syntax/perl.js +88 -0
  98. editarea/reg_syntax/php.js +157 -0
  99. editarea/reg_syntax/python.js +145 -0
  100. editarea/reg_syntax/robotstxt.js +25 -0
  101. editarea/reg_syntax/ruby.js +68 -0
  102. editarea/reg_syntax/sql.js +56 -0
  103. editarea/reg_syntax/tsql.js +88 -0
  104. editarea/reg_syntax/vb.js +53 -0
  105. editarea/reg_syntax/xml.js +57 -0
  106. editarea/todo.txt +71 -0
  107. highlighter/syntax.php +0 -87
  108. includes/ads.php +0 -18
  109. includes/adsadvanced.php +1 -1
  110. includes/essentials.php +3 -2
  111. includes/menu.php +66 -0
  112. includes/privacypolicy.php +7 -7
  113. includes/syntax-highlighter.php +105 -0
  114. includes/tandc.php +8 -8
  115. readme.txt +4 -2
  116. screenshot-6.png +0 -0
  117. wp-insert.php +1 -2
codepress/codepress.css DELETED
@@ -1,21 +0,0 @@
1
- body {
2
- margin-top:13px;
3
- _margin-top:14px;
4
- background:white;
5
- margin-left:32px;
6
- font-family:monospace;
7
- font-size:13px;
8
- white-space:pre;
9
- background-image:url("images/line-numbers.png");
10
- background-repeat:repeat-y;
11
- background-position:0 3px;
12
- line-height:16px;
13
- height:100%;
14
- }
15
- pre {margin:0;}
16
- html>body{background-position:0 2px;}
17
- P {margin:0;padding:0;border:0;outline:0;display:block;white-space:pre;}
18
- b, i, s, u, a, em, tt, ins, big, cite, strong, var, dfn {text-decoration:none;font-weight:normal;font-style:normal;font-size:13px;}
19
-
20
- body.hide-line-numbers {background:white;margin-left:16px;}
21
- body.show-line-numbers {background-image:url("images/line-numbers.png");margin-left:32px;}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
codepress/codepress.html DELETED
@@ -1,35 +0,0 @@
1
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
2
- <html>
3
- <head>
4
- <title>CodePress - Real Time Syntax Highlighting Editor written in JavaScript</title>
5
- <meta name="description" content="CodePress - source code editor window" />
6
-
7
- <script type="text/javascript">
8
- var language = 'generic';
9
- var engine = 'older';
10
- var ua = navigator.userAgent;
11
- var ts = (new Date).getTime(); // timestamp to avoid cache
12
- var lh = location.href;
13
-
14
- if(ua.match('MSIE')) engine = 'msie';
15
- else if(ua.match('KHTML')) engine = 'khtml';
16
- else if(ua.match('Opera')) engine = 'opera';
17
- else if(ua.match('Gecko')) engine = 'gecko';
18
-
19
- if(lh.match('language=')) language = lh.replace(/.*language=(.*?)(&.*)?$/,'$1');
20
-
21
- document.write('<link type="text/css" href="codepress.css?ts='+ts+'" rel="stylesheet" />');
22
- document.write('<link type="text/css" href="languages/'+language+'.css?ts='+ts+'" rel="stylesheet" id="cp-lang-style" />');
23
- document.write('<scr'+'ipt type="text/javascript" src="engines/'+engine+'.js?ts='+ts+'"></scr'+'ipt>');
24
- document.write('<scr'+'ipt type="text/javascript" src="languages/'+language+'.js?ts='+ts+'"></scr'+'ipt>');
25
- </script>
26
-
27
- </head>
28
-
29
- <script type="text/javascript">
30
- if(engine == "msie" || engine == "gecko") document.write('<body><pre> </pre></body>');
31
- else if(engine == "opera") document.write('<body></body>');
32
- // else if(engine == "khtml") document.write('<body> </body>');
33
- </script>
34
-
35
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
codepress/codepress.js DELETED
@@ -1,138 +0,0 @@
1
- /*
2
- * CodePress - Real Time Syntax Highlighting Editor written in JavaScript - http://codepress.org/
3
- *
4
- * Copyright (C) 2006 Fernando M.A.d.S. <fermads@gmail.com>
5
- *
6
- * This program is free software; you can redistribute it and/or modify it under the terms of the
7
- * GNU Lesser General Public License as published by the Free Software Foundation.
8
- *
9
- * Read the full licence: http://www.opensource.org/licenses/lgpl-license.php
10
- */
11
-
12
- CodePress = function(obj) {
13
- var self = document.createElement('iframe');
14
- self.textarea = obj;
15
- self.textarea.disabled = true;
16
- self.textarea.style.overflow = 'hidden';
17
- self.style.height = self.textarea.clientHeight +'px';
18
- self.style.width = self.textarea.clientWidth +'px';
19
- self.textarea.style.overflow = 'auto';
20
- self.style.border = '1px solid gray';
21
- self.frameBorder = 0; // remove IE internal iframe border
22
- self.style.visibility = 'hidden';
23
- self.style.position = 'absolute';
24
- self.options = self.textarea.className;
25
-
26
- self.initialize = function() {
27
- self.editor = self.contentWindow.CodePress;
28
- self.editor.body = self.contentWindow.document.getElementsByTagName('body')[0];
29
- self.editor.setCode(self.textarea.value);
30
- self.setOptions();
31
- self.editor.syntaxHighlight('init');
32
- self.textarea.style.display = 'none';
33
- self.style.position = 'static';
34
- self.style.visibility = 'visible';
35
- self.style.display = 'inline';
36
- }
37
-
38
- // obj can by a textarea id or a string (code)
39
- self.edit = function(obj,language) {
40
- if(obj) self.textarea.value = document.getElementById(obj) ? document.getElementById(obj).value : obj;
41
- if(!self.textarea.disabled) return;
42
- self.language = language ? language : self.getLanguage();
43
- self.src = CodePress.path+'codepress.html?language='+self.language+'&ts='+(new Date).getTime();
44
- if(self.attachEvent) self.attachEvent('onload',self.initialize);
45
- else self.addEventListener('load',self.initialize,false);
46
- }
47
-
48
- self.getLanguage = function() {
49
- for (language in CodePress.languages)
50
- if(self.options.match('\\b'+language+'\\b'))
51
- return CodePress.languages[language] ? language : 'generic';
52
- }
53
-
54
- self.setOptions = function() {
55
- if(self.options.match('autocomplete-off')) self.toggleAutoComplete();
56
- if(self.options.match('readonly-on')) self.toggleReadOnly();
57
- if(self.options.match('linenumbers-off')) self.toggleLineNumbers();
58
- }
59
-
60
- self.getCode = function() {
61
- return self.textarea.disabled ? self.editor.getCode() : self.textarea.value;
62
- }
63
-
64
- self.setCode = function(code) {
65
- self.textarea.disabled ? self.editor.setCode(code) : self.textarea.value = code;
66
- }
67
-
68
- self.toggleAutoComplete = function() {
69
- self.editor.autocomplete = (self.editor.autocomplete) ? false : true;
70
- }
71
-
72
- self.toggleReadOnly = function() {
73
- self.textarea.readOnly = (self.textarea.readOnly) ? false : true;
74
- if(self.style.display != 'none') // prevent exception on FF + iframe with display:none
75
- self.editor.readOnly(self.textarea.readOnly ? true : false);
76
- }
77
-
78
- self.toggleLineNumbers = function() {
79
- var cn = self.editor.body.className;
80
- self.editor.body.className = (cn==''||cn=='show-line-numbers') ? 'hide-line-numbers' : 'show-line-numbers';
81
- }
82
-
83
- self.toggleEditor = function() {
84
- if(self.textarea.disabled) {
85
- self.textarea.value = self.getCode();
86
- self.textarea.disabled = false;
87
- self.style.display = 'none';
88
- self.textarea.style.display = 'inline';
89
- }
90
- else {
91
- self.textarea.disabled = true;
92
- self.setCode(self.textarea.value);
93
- self.editor.syntaxHighlight('init');
94
- self.style.display = 'inline';
95
- self.textarea.style.display = 'none';
96
- }
97
- }
98
-
99
- self.edit();
100
- return self;
101
- }
102
-
103
- CodePress.languages = {
104
- csharp : 'C#',
105
- css : 'CSS',
106
- generic : 'Generic',
107
- html : 'HTML',
108
- java : 'Java',
109
- javascript : 'JavaScript',
110
- perl : 'Perl',
111
- ruby : 'Ruby',
112
- php : 'PHP',
113
- text : 'Text',
114
- sql : 'SQL',
115
- vbscript : 'VBScript'
116
- }
117
-
118
-
119
- CodePress.run = function() {
120
- s = document.getElementsByTagName('script');
121
- for(var i=0,n=s.length;i<n;i++) {
122
- if(s[i].src.match('codepress.js')) {
123
- CodePress.path = s[i].src.replace('codepress.js','');
124
- }
125
- }
126
- t = document.getElementsByTagName('textarea');
127
- for(var i=0,n=t.length;i<n;i++) {
128
- if(t[i].className.match('codepress')) {
129
- id = t[i].id;
130
- t[i].id = id+'_cp';
131
- eval(id+' = new CodePress(t[i])');
132
- t[i].parentNode.insertBefore(eval(id), t[i]);
133
- }
134
- }
135
- }
136
-
137
- if(window.attachEvent) window.attachEvent('onload',CodePress.run);
138
- else window.addEventListener('DOMContentLoaded',CodePress.run,false);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
codepress/engines/gecko.js DELETED
@@ -1,293 +0,0 @@
1
- /*
2
- * CodePress - Real Time Syntax Highlighting Editor written in JavaScript - http://codepress.org/
3
- *
4
- * Copyright (C) 2007 Fernando M.A.d.S. <fermads@gmail.com>
5
- *
6
- * Developers:
7
- * Fernando M.A.d.S. <fermads@gmail.com>
8
- * Michael Hurni <michael.hurni@gmail.com>
9
- * Contributors:
10
- * Martin D. Kirk
11
- *
12
- * This program is free software; you can redistribute it and/or modify it under the terms of the
13
- * GNU Lesser General Public License as published by the Free Software Foundation.
14
- *
15
- * Read the full licence: http://www.opensource.org/licenses/lgpl-license.php
16
- */
17
-
18
- CodePress = {
19
- scrolling : false,
20
- autocomplete : true,
21
-
22
- // set initial vars and start sh
23
- initialize : function() {
24
- if(typeof(editor)=='undefined' && !arguments[0]) return;
25
- body = document.getElementsByTagName('body')[0];
26
- body.innerHTML = body.innerHTML.replace(/\n/g,"");
27
- chars = '|32|46|62|8|'; // charcodes that trigger syntax highlighting
28
- cc = '\u2009'; // carret char
29
- editor = document.getElementsByTagName('pre')[0];
30
- document.designMode = 'on';
31
- document.addEventListener('keypress', this.keyHandler, true);
32
- window.addEventListener('scroll', function() { if(!CodePress.scrolling) CodePress.syntaxHighlight('scroll') }, false);
33
- completeChars = this.getCompleteChars();
34
- completeEndingChars = this.getCompleteEndingChars();
35
- },
36
-
37
- // treat key bindings
38
- keyHandler : function(evt) {
39
- keyCode = evt.keyCode;
40
- charCode = evt.charCode;
41
- fromChar = String.fromCharCode(charCode);
42
-
43
- if((evt.ctrlKey || evt.metaKey) && evt.shiftKey && charCode!=90) { // shortcuts = ctrl||appleKey+shift+key!=z(undo)
44
- CodePress.shortcuts(charCode?charCode:keyCode);
45
- }
46
- else if( (completeEndingChars.indexOf('|'+fromChar+'|')!= -1 || completeChars.indexOf('|'+fromChar+'|')!=-1) && CodePress.autocomplete) { // auto complete
47
- if(!CodePress.completeEnding(fromChar))
48
- CodePress.complete(fromChar);
49
- }
50
- else if(chars.indexOf('|'+charCode+'|')!=-1||keyCode==13) { // syntax highlighting
51
- top.setTimeout(function(){CodePress.syntaxHighlight('generic');},100);
52
- }
53
- else if(keyCode==9 || evt.tabKey) { // snippets activation (tab)
54
- CodePress.snippets(evt);
55
- }
56
- else if(keyCode==46||keyCode==8) { // save to history when delete or backspace pressed
57
- CodePress.actions.history[CodePress.actions.next()] = editor.innerHTML;
58
- }
59
- else if((charCode==122||charCode==121||charCode==90) && evt.ctrlKey) { // undo and redo
60
- (charCode==121||evt.shiftKey) ? CodePress.actions.redo() : CodePress.actions.undo();
61
- evt.preventDefault();
62
- }
63
- else if(charCode==118 && evt.ctrlKey) { // handle paste
64
- top.setTimeout(function(){CodePress.syntaxHighlight('generic');},100);
65
- }
66
- else if(charCode==99 && evt.ctrlKey) { // handle cut
67
- //alert(window.getSelection().getRangeAt(0).toString().replace(/\t/g,'FFF'));
68
- }
69
-
70
- },
71
-
72
- // put cursor back to its original position after every parsing
73
- findString : function() {
74
- if(self.find(cc))
75
- window.getSelection().getRangeAt(0).deleteContents();
76
- },
77
-
78
- // split big files, highlighting parts of it
79
- split : function(code,flag) {
80
- if(flag=='scroll') {
81
- this.scrolling = true;
82
- return code;
83
- }
84
- else {
85
- this.scrolling = false;
86
- mid = code.indexOf(cc);
87
- if(mid-2000<0) {ini=0;end=4000;}
88
- else if(mid+2000>code.length) {ini=code.length-4000;end=code.length;}
89
- else {ini=mid-2000;end=mid+2000;}
90
- code = code.substring(ini,end);
91
- return code;
92
- }
93
- },
94
-
95
- getEditor : function() {
96
- if(!document.getElementsByTagName('pre')[0]) {
97
- body = document.getElementsByTagName('body')[0];
98
- if(!body.innerHTML) return body;
99
- if(body.innerHTML=="<br>") body.innerHTML = "<pre> </pre>";
100
- else body.innerHTML = "<pre>"+body.innerHTML+"</pre>";
101
- }
102
- return document.getElementsByTagName('pre')[0];
103
- },
104
-
105
- // syntax highlighting parser
106
- syntaxHighlight : function(flag) {
107
- //if(document.designMode=='off') document.designMode='on'
108
- if(flag != 'init') { window.getSelection().getRangeAt(0).insertNode(document.createTextNode(cc));}
109
- editor = CodePress.getEditor();
110
- o = editor.innerHTML;
111
- o = o.replace(/<br>/g,'\n');
112
- o = o.replace(/<.*?>/g,'');
113
- x = z = this.split(o,flag);
114
- x = x.replace(/\n/g,'<br>');
115
-
116
- if(arguments[1]&&arguments[2]) x = x.replace(arguments[1],arguments[2]);
117
-
118
- for(i=0;i<Language.syntax.length;i++)
119
- x = x.replace(Language.syntax[i].input,Language.syntax[i].output);
120
-
121
- editor.innerHTML = this.actions.history[this.actions.next()] = (flag=='scroll') ? x : o.split(z).join(x);
122
- if(flag!='init') this.findString();
123
- },
124
-
125
- getLastWord : function() {
126
- var rangeAndCaret = CodePress.getRangeAndCaret();
127
- words = rangeAndCaret[0].substring(rangeAndCaret[1]-40,rangeAndCaret[1]);
128
- words = words.replace(/[\s\n\r\);\W]/g,'\n').split('\n');
129
- return words[words.length-1].replace(/[\W]/gi,'').toLowerCase();
130
- },
131
-
132
- snippets : function(evt) {
133
- var snippets = Language.snippets;
134
- var trigger = this.getLastWord();
135
- for (var i=0; i<snippets.length; i++) {
136
- if(snippets[i].input == trigger) {
137
- var content = snippets[i].output.replace(/</g,'&lt;');
138
- content = content.replace(/>/g,'&gt;');
139
- if(content.indexOf('$0')<0) content += cc;
140
- else content = content.replace(/\$0/,cc);
141
- content = content.replace(/\n/g,'<br>');
142
- var pattern = new RegExp(trigger+cc,'gi');
143
- evt.preventDefault(); // prevent the tab key from being added
144
- this.syntaxHighlight('snippets',pattern,content);
145
- }
146
- }
147
- },
148
-
149
- readOnly : function() {
150
- document.designMode = (arguments[0]) ? 'off' : 'on';
151
- },
152
-
153
- complete : function(trigger) {
154
- window.getSelection().getRangeAt(0).deleteContents();
155
- var complete = Language.complete;
156
- for (var i=0; i<complete.length; i++) {
157
- if(complete[i].input == trigger) {
158
- var pattern = new RegExp('\\'+trigger+cc);
159
- var content = complete[i].output.replace(/\$0/g,cc);
160
- parent.setTimeout(function () { CodePress.syntaxHighlight('complete',pattern,content)},0); // wait for char to appear on screen
161
- }
162
- }
163
- },
164
-
165
- getCompleteChars : function() {
166
- var cChars = '';
167
- for(var i=0;i<Language.complete.length;i++)
168
- cChars += '|'+Language.complete[i].input;
169
- return cChars+'|';
170
- },
171
-
172
- getCompleteEndingChars : function() {
173
- var cChars = '';
174
- for(var i=0;i<Language.complete.length;i++)
175
- cChars += '|'+Language.complete[i].output.charAt(Language.complete[i].output.length-1);
176
- return cChars+'|';
177
- },
178
-
179
- completeEnding : function(trigger) {
180
- var range = window.getSelection().getRangeAt(0);
181
- try {
182
- range.setEnd(range.endContainer, range.endOffset+1)
183
- }
184
- catch(e) {
185
- return false;
186
- }
187
- var next_character = range.toString()
188
- range.setEnd(range.endContainer, range.endOffset-1)
189
- if(next_character != trigger) return false;
190
- else {
191
- range.setEnd(range.endContainer, range.endOffset+1)
192
- range.deleteContents();
193
- return true;
194
- }
195
- },
196
-
197
- shortcuts : function() {
198
- var cCode = arguments[0];
199
- if(cCode==13) cCode = '[enter]';
200
- else if(cCode==32) cCode = '[space]';
201
- else cCode = '['+String.fromCharCode(charCode).toLowerCase()+']';
202
- for(var i=0;i<Language.shortcuts.length;i++)
203
- if(Language.shortcuts[i].input == cCode)
204
- this.insertCode(Language.shortcuts[i].output,false);
205
- },
206
-
207
- getRangeAndCaret : function() {
208
- var range = window.getSelection().getRangeAt(0);
209
- var range2 = range.cloneRange();
210
- var node = range.endContainer;
211
- var caret = range.endOffset;
212
- range2.selectNode(node);
213
- return [range2.toString(),caret];
214
- },
215
-
216
- insertCode : function(code,replaceCursorBefore) {
217
- var range = window.getSelection().getRangeAt(0);
218
- var node = window.document.createTextNode(code);
219
- var selct = window.getSelection();
220
- var range2 = range.cloneRange();
221
- // Insert text at cursor position
222
- selct.removeAllRanges();
223
- range.deleteContents();
224
- range.insertNode(node);
225
- // Move the cursor to the end of text
226
- range2.selectNode(node);
227
- range2.collapse(replaceCursorBefore);
228
- selct.removeAllRanges();
229
- selct.addRange(range2);
230
- },
231
-
232
- // get code from editor
233
- getCode : function() {
234
- if(!document.getElementsByTagName('pre')[0] || editor.innerHTML == '')
235
- editor = CodePress.getEditor();
236
- var code = editor.innerHTML;
237
- code = code.replace(/<br>/g,'\n');
238
- code = code.replace(/\u2009/g,'');
239
- code = code.replace(/<.*?>/g,'');
240
- code = code.replace(/&lt;/g,'<');
241
- code = code.replace(/&gt;/g,'>');
242
- code = code.replace(/&amp;/gi,'&');
243
- return code;
244
- },
245
-
246
- // put code inside editor
247
- setCode : function() {
248
- var code = arguments[0];
249
- code = code.replace(/\u2009/gi,'');
250
- code = code.replace(/&/gi,'&amp;');
251
- code = code.replace(/</g,'&lt;');
252
- code = code.replace(/>/g,'&gt;');
253
- editor.innerHTML = code;
254
- if (code == '')
255
- document.getElementsByTagName('body')[0].innerHTML = '';
256
- },
257
-
258
- // undo and redo methods
259
- actions : {
260
- pos : -1, // actual history position
261
- history : [], // history vector
262
-
263
- undo : function() {
264
- editor = CodePress.getEditor();
265
- if(editor.innerHTML.indexOf(cc)==-1){
266
- if(editor.innerHTML != " ")
267
- window.getSelection().getRangeAt(0).insertNode(document.createTextNode(cc));
268
- this.history[this.pos] = editor.innerHTML;
269
- }
270
- this.pos --;
271
- if(typeof(this.history[this.pos])=='undefined') this.pos ++;
272
- editor.innerHTML = this.history[this.pos];
273
- if(editor.innerHTML.indexOf(cc)>-1) editor.innerHTML+=cc;
274
- CodePress.findString();
275
- },
276
-
277
- redo : function() {
278
- // editor = CodePress.getEditor();
279
- this.pos++;
280
- if(typeof(this.history[this.pos])=='undefined') this.pos--;
281
- editor.innerHTML = this.history[this.pos];
282
- CodePress.findString();
283
- },
284
-
285
- next : function() { // get next vector position and clean old ones
286
- if(this.pos>20) this.history[this.pos-21] = undefined;
287
- return ++this.pos;
288
- }
289
- }
290
- }
291
-
292
- Language={};
293
- window.addEventListener('load', function() { CodePress.initialize('new'); }, true);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
codepress/engines/khtml.js DELETED
File without changes
codepress/engines/msie.js DELETED
@@ -1,304 +0,0 @@
1
- /*
2
- * CodePress - Real Time Syntax Highlighting Editor written in JavaScript - http://codepress.org/
3
- *
4
- * Copyright (C) 2007 Fernando M.A.d.S. <fermads@gmail.com>
5
- *
6
- * Developers:
7
- * Fernando M.A.d.S. <fermads@gmail.com>
8
- * Michael Hurni <michael.hurni@gmail.com>
9
- * Contributors:
10
- * Martin D. Kirk
11
- *
12
- * This program is free software; you can redistribute it and/or modify it under the terms of the
13
- * GNU Lesser General Public License as published by the Free Software Foundation.
14
- *
15
- * Read the full licence: http://www.opensource.org/licenses/lgpl-license.php
16
- */
17
-
18
- CodePress = {
19
- scrolling : false,
20
- autocomplete : true,
21
-
22
- // set initial vars and start sh
23
- initialize : function() {
24
- if(typeof(editor)=='undefined' && !arguments[0]) return;
25
- chars = '|32|46|62|'; // charcodes that trigger syntax highlighting
26
- cc = '\u2009'; // carret char
27
- editor = document.getElementsByTagName('pre')[0];
28
- editor.contentEditable = 'true';
29
- document.getElementsByTagName('body')[0].onfocus = function() {editor.focus();}
30
- document.attachEvent('onkeydown', this.metaHandler);
31
- document.attachEvent('onkeypress', this.keyHandler);
32
- window.attachEvent('onscroll', function() { if(!CodePress.scrolling) setTimeout(function(){CodePress.syntaxHighlight('scroll')},1)});
33
- completeChars = this.getCompleteChars();
34
- completeEndingChars = this.getCompleteEndingChars();
35
- setTimeout(function() { window.scroll(0,0) },50); // scroll IE to top
36
- },
37
-
38
- // treat key bindings
39
- keyHandler : function(evt) {
40
- charCode = evt.keyCode;
41
- fromChar = String.fromCharCode(charCode);
42
-
43
- if( (completeEndingChars.indexOf('|'+fromChar+'|')!= -1 || completeChars.indexOf('|'+fromChar+'|')!=-1 )&& CodePress.autocomplete) { // auto complete
44
- if(!CodePress.completeEnding(fromChar))
45
- CodePress.complete(fromChar);
46
- }
47
- else if(chars.indexOf('|'+charCode+'|')!=-1||charCode==13) { // syntax highlighting
48
- CodePress.syntaxHighlight('generic');
49
- }
50
- },
51
-
52
- metaHandler : function(evt) {
53
- keyCode = evt.keyCode;
54
-
55
- if(keyCode==9 || evt.tabKey) {
56
- CodePress.snippets();
57
- }
58
- else if((keyCode==122||keyCode==121||keyCode==90) && evt.ctrlKey) { // undo and redo
59
- (keyCode==121||evt.shiftKey) ? CodePress.actions.redo() : CodePress.actions.undo();
60
- evt.returnValue = false;
61
- }
62
- else if(keyCode==34||keyCode==33) { // handle page up/down for IE
63
- self.scrollBy(0, (keyCode==34) ? 200 : -200);
64
- evt.returnValue = false;
65
- }
66
- else if(keyCode==46||keyCode==8) { // save to history when delete or backspace pressed
67
- CodePress.actions.history[CodePress.actions.next()] = editor.innerHTML;
68
- }
69
- else if((evt.ctrlKey || evt.metaKey) && evt.shiftKey && keyCode!=90) { // shortcuts = ctrl||appleKey+shift+key!=z(undo)
70
- CodePress.shortcuts(keyCode);
71
- evt.returnValue = false;
72
- }
73
- else if(keyCode==86 && evt.ctrlKey) { // handle paste
74
- window.clipboardData.setData('Text',window.clipboardData.getData('Text').replace(/\t/g,'\u2008'));
75
- top.setTimeout(function(){CodePress.syntaxHighlight('paste');},10);
76
- }
77
- else if(keyCode==67 && evt.ctrlKey) { // handle cut
78
- // window.clipboardData.setData('Text',x[0]);
79
- // code = window.clipboardData.getData('Text');
80
- }
81
- },
82
-
83
- // put cursor back to its original position after every parsing
84
-
85
-
86
- findString : function() {
87
- range = self.document.body.createTextRange();
88
- if(range.findText(cc)){
89
- range.select();
90
- range.text = '';
91
- }
92
- },
93
-
94
- // split big files, highlighting parts of it
95
- split : function(code,flag) {
96
- if(flag=='scroll') {
97
- this.scrolling = true;
98
- return code;
99
- }
100
- else {
101
- this.scrolling = false;
102
- mid = code.indexOf(cc);
103
- if(mid-2000<0) {ini=0;end=4000;}
104
- else if(mid+2000>code.length) {ini=code.length-4000;end=code.length;}
105
- else {ini=mid-2000;end=mid+2000;}
106
- code = code.substring(ini,end);
107
- return code.substring(code.indexOf('<P>'),code.lastIndexOf('</P>')+4);
108
- }
109
- },
110
-
111
- // syntax highlighting parser
112
- syntaxHighlight : function(flag) {
113
- if(flag!='init') document.selection.createRange().text = cc;
114
- o = editor.innerHTML;
115
- if(flag=='paste') { // fix pasted text
116
- o = o.replace(/<BR>/g,'\r\n');
117
- o = o.replace(/\u2008/g,'\t');
118
- }
119
- o = o.replace(/<P>/g,'\n');
120
- o = o.replace(/<\/P>/g,'\r');
121
- o = o.replace(/<.*?>/g,'');
122
- o = o.replace(/&nbsp;/g,'');
123
- o = '<PRE><P>'+o+'</P></PRE>';
124
- o = o.replace(/\n\r/g,'<P></P>');
125
- o = o.replace(/\n/g,'<P>');
126
- o = o.replace(/\r/g,'<\/P>');
127
- o = o.replace(/<P>(<P>)+/,'<P>');
128
- o = o.replace(/<\/P>(<\/P>)+/,'</P>');
129
- o = o.replace(/<P><\/P>/g,'<P><BR/></P>');
130
- x = z = this.split(o,flag);
131
-
132
- if(arguments[1]&&arguments[2]) x = x.replace(arguments[1],arguments[2]);
133
-
134
- for(i=0;i<Language.syntax.length;i++)
135
- x = x.replace(Language.syntax[i].input,Language.syntax[i].output);
136
-
137
- editor.innerHTML = this.actions.history[this.actions.next()] = (flag=='scroll') ? x : o.replace(z,x);
138
- if(flag!='init') this.findString();
139
- },
140
-
141
- snippets : function(evt) {
142
- var snippets = Language.snippets;
143
- var trigger = this.getLastWord();
144
- for (var i=0; i<snippets.length; i++) {
145
- if(snippets[i].input == trigger) {
146
- var content = snippets[i].output.replace(/</g,'&lt;');
147
- content = content.replace(/>/g,'&gt;');
148
- if(content.indexOf('$0')<0) content += cc;
149
- else content = content.replace(/\$0/,cc);
150
- content = content.replace(/\n/g,'</P><P>');
151
- var pattern = new RegExp(trigger+cc,"gi");
152
- this.syntaxHighlight('snippets',pattern,content);
153
- }
154
- }
155
- },
156
-
157
- readOnly : function() {
158
- editor.contentEditable = (arguments[0]) ? 'false' : 'true';
159
- },
160
-
161
- complete : function(trigger) {
162
- var complete = Language.complete;
163
- for (var i=0; i<complete.length; i++) {
164
- if(complete[i].input == trigger) {
165
- var pattern = new RegExp('\\'+trigger+cc);
166
- var content = complete[i].output.replace(/\$0/g,cc);
167
- setTimeout(function () { CodePress.syntaxHighlight('complete',pattern,content)},0); // wait for char to appear on screen
168
- }
169
- }
170
- },
171
-
172
- getCompleteChars : function() {
173
- var cChars = '';
174
- for(var i=0;i<Language.complete.length;i++)
175
- cChars += '|'+Language.complete[i].input;
176
- return cChars+'|';
177
- },
178
-
179
- getCompleteEndingChars : function() {
180
- var cChars = '';
181
- for(var i=0;i<Language.complete.length;i++)
182
- cChars += '|'+Language.complete[i].output.charAt(Language.complete[i].output.length-1);
183
- return cChars+'|';
184
- },
185
-
186
- completeEnding : function(trigger) {
187
- var range = document.selection.createRange();
188
- try {
189
- range.moveEnd('character', 1)
190
- }
191
- catch(e) {
192
- return false;
193
- }
194
- var next_character = range.text
195
- range.moveEnd('character', -1)
196
- if(next_character != trigger ) return false;
197
- else {
198
- range.moveEnd('character', 1)
199
- range.text=''
200
- return true;
201
- }
202
- },
203
-
204
- shortcuts : function() {
205
- var cCode = arguments[0];
206
- if(cCode==13) cCode = '[enter]';
207
- else if(cCode==32) cCode = '[space]';
208
- else cCode = '['+String.fromCharCode(keyCode).toLowerCase()+']';
209
- for(var i=0;i<Language.shortcuts.length;i++)
210
- if(Language.shortcuts[i].input == cCode)
211
- this.insertCode(Language.shortcuts[i].output,false);
212
- },
213
-
214
- getLastWord : function() {
215
- var rangeAndCaret = CodePress.getRangeAndCaret();
216
- words = rangeAndCaret[0].substring(rangeAndCaret[1]-40,rangeAndCaret[1]);
217
- words = words.replace(/[\s\n\r\);\W]/g,'\n').split('\n');
218
- return words[words.length-1].replace(/[\W]/gi,'').toLowerCase();
219
- },
220
-
221
- getRangeAndCaret : function() {
222
- var range = document.selection.createRange();
223
- var caret = Math.abs(range.moveStart('character', -1000000)+1);
224
- range = this.getCode();
225
- range = range.replace(/\n\r/gi,' ');
226
- range = range.replace(/\n/gi,'');
227
- return [range.toString(),caret];
228
- },
229
-
230
- insertCode : function(code,replaceCursorBefore) {
231
- var repdeb = '';
232
- var repfin = '';
233
-
234
- if(replaceCursorBefore) { repfin = code; }
235
- else { repdeb = code; }
236
-
237
- if(typeof document.selection != 'undefined') {
238
- var range = document.selection.createRange();
239
- range.text = repdeb + repfin;
240
- range = document.selection.createRange();
241
- range.move('character', -repfin.length);
242
- range.select();
243
- }
244
- },
245
-
246
- // get code from editor
247
- getCode : function() {
248
- var code = editor.innerHTML;
249
- code = code.replace(/<br>/g,'\n');
250
- code = code.replace(/<\/p>/gi,'\r');
251
- code = code.replace(/<p>/i,''); // IE first line fix
252
- code = code.replace(/<p>/gi,'\n');
253
- code = code.replace(/&nbsp;/gi,'');
254
- code = code.replace(/\u2009/g,'');
255
- code = code.replace(/<.*?>/g,'');
256
- code = code.replace(/&lt;/g,'<');
257
- code = code.replace(/&gt;/g,'>');
258
- code = code.replace(/&amp;/gi,'&');
259
- return code;
260
- },
261
-
262
- // put code inside editor
263
- setCode : function() {
264
- var code = arguments[0];
265
- code = code.replace(/\u2009/gi,'');
266
- code = code.replace(/&/gi,'&amp;');
267
- code = code.replace(/</g,'&lt;');
268
- code = code.replace(/>/g,'&gt;');
269
- editor.innerHTML = '<pre>'+code+'</pre>';
270
- },
271
-
272
-
273
- // undo and redo methods
274
- actions : {
275
- pos : -1, // actual history position
276
- history : [], // history vector
277
-
278
- undo : function() {
279
- if(editor.innerHTML.indexOf(cc)==-1){
280
- document.selection.createRange().text = cc;
281
- this.history[this.pos] = editor.innerHTML;
282
- }
283
- this.pos--;
284
- if(typeof(this.history[this.pos])=='undefined') this.pos++;
285
- editor.innerHTML = this.history[this.pos];
286
- CodePress.findString();
287
- },
288
-
289
- redo : function() {
290
- this.pos++;
291
- if(typeof(this.history[this.pos])=='undefined') this.pos--;
292
- editor.innerHTML = this.history[this.pos];
293
- CodePress.findString();
294
- },
295
-
296
- next : function() { // get next vector position and clean old ones
297
- if(this.pos>20) this.history[this.pos-21] = undefined;
298
- return ++this.pos;
299
- }
300
- }
301
- }
302
-
303
- Language={};
304
- window.attachEvent('onload', function() { CodePress.initialize('new');});
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
codepress/engines/older.js DELETED
File without changes
codepress/engines/opera.js DELETED
@@ -1,260 +0,0 @@
1
- /*
2
- * CodePress - Real Time Syntax Highlighting Editor written in JavaScript - http://codepress.org/
3
- *
4
- * Copyright (C) 2007 Fernando M.A.d.S. <fermads@gmail.com>
5
- *
6
- * Contributors :
7
- *
8
- * Michael Hurni <michael.hurni@gmail.com>
9
- *
10
- * This program is free software; you can redistribute it and/or modify it under the terms of the
11
- * GNU Lesser General Public License as published by the Free Software Foundation.
12
- *
13
- * Read the full licence: http://www.opensource.org/licenses/lgpl-license.php
14
- */
15
-
16
-
17
- CodePress = {
18
- scrolling : false,
19
- autocomplete : true,
20
-
21
- // set initial vars and start sh
22
- initialize : function() {
23
- if(typeof(editor)=='undefined' && !arguments[0]) return;
24
- chars = '|32|46|62|'; // charcodes that trigger syntax highlighting
25
- cc = '\u2009'; // control char
26
- editor = document.getElementsByTagName('body')[0];
27
- document.designMode = 'on';
28
- document.addEventListener('keyup', this.keyHandler, true);
29
- window.addEventListener('scroll', function() { if(!CodePress.scrolling) CodePress.syntaxHighlight('scroll') }, false);
30
- completeChars = this.getCompleteChars();
31
- // CodePress.syntaxHighlight('init');
32
- },
33
-
34
- // treat key bindings
35
- keyHandler : function(evt) {
36
- keyCode = evt.keyCode;
37
- charCode = evt.charCode;
38
-
39
- if((evt.ctrlKey || evt.metaKey) && evt.shiftKey && charCode!=90) { // shortcuts = ctrl||appleKey+shift+key!=z(undo)
40
- CodePress.shortcuts(charCode?charCode:keyCode);
41
- }
42
- else if(completeChars.indexOf('|'+String.fromCharCode(charCode)+'|')!=-1 && CodePress.autocomplete) { // auto complete
43
- CodePress.complete(String.fromCharCode(charCode));
44
- }
45
- else if(chars.indexOf('|'+charCode+'|')!=-1||keyCode==13) { // syntax highlighting
46
- CodePress.syntaxHighlight('generic');
47
- }
48
- else if(keyCode==9 || evt.tabKey) { // snippets activation (tab)
49
- CodePress.snippets(evt);
50
- }
51
- else if(keyCode==46||keyCode==8) { // save to history when delete or backspace pressed
52
- CodePress.actions.history[CodePress.actions.next()] = editor.innerHTML;
53
- }
54
- else if((charCode==122||charCode==121||charCode==90) && evt.ctrlKey) { // undo and redo
55
- (charCode==121||evt.shiftKey) ? CodePress.actions.redo() : CodePress.actions.undo();
56
- evt.preventDefault();
57
- }
58
- else if(keyCode==86 && evt.ctrlKey) { // paste
59
- // TODO: pasted text should be parsed and highlighted
60
- }
61
- },
62
-
63
- // put cursor back to its original position after every parsing
64
- findString : function() {
65
- var sel = window.getSelection();
66
- var range = window.document.createRange();
67
- var span = window.document.getElementsByTagName('span')[0];
68
-
69
- range.selectNode(span);
70
- sel.removeAllRanges();
71
- sel.addRange(range);
72
- span.parentNode.removeChild(span);
73
- //if(self.find(cc))
74
- //window.getSelection().getRangeAt(0).deleteContents();
75
- },
76
-
77
- // split big files, highlighting parts of it
78
- split : function(code,flag) {
79
- if(flag=='scroll') {
80
- this.scrolling = true;
81
- return code;
82
- }
83
- else {
84
- this.scrolling = false;
85
- mid = code.indexOf('<SPAN>');
86
- if(mid-2000<0) {ini=0;end=4000;}
87
- else if(mid+2000>code.length) {ini=code.length-4000;end=code.length;}
88
- else {ini=mid-2000;end=mid+2000;}
89
- code = code.substring(ini,end);
90
- return code;
91
- }
92
- },
93
-
94
- // syntax highlighting parser
95
- syntaxHighlight : function(flag) {
96
- //if(document.designMode=='off') document.designMode='on'
97
- if(flag!='init') {
98
- var span = document.createElement('span');
99
- window.getSelection().getRangeAt(0).insertNode(span);
100
- }
101
-
102
- o = editor.innerHTML;
103
- // o = o.replace(/<br>/g,'\r\n');
104
- // o = o.replace(/<(b|i|s|u|a|em|tt|ins|big|cite|strong)?>/g,'');
105
- //alert(o)
106
- o = o.replace(/<(?!span|\/span|br).*?>/gi,'');
107
- // alert(o)
108
- // x = o;
109
- x = z = this.split(o,flag);
110
- //alert(z)
111
- // x = x.replace(/\r\n/g,'<br>');
112
- x = x.replace(/\t/g, ' ');
113
-
114
-
115
- if(arguments[1]&&arguments[2]) x = x.replace(arguments[1],arguments[2]);
116
-
117
- for(i=0;i<Language.syntax.length;i++)
118
- x = x.replace(Language.syntax[i].input,Language.syntax[i].output);
119
-
120
- editor.innerHTML = this.actions.history[this.actions.next()] = (flag=='scroll') ? x : o.split(z).join(x);
121
-
122
- if(flag!='init') this.findString();
123
- },
124
-
125
- getLastWord : function() {
126
- var rangeAndCaret = CodePress.getRangeAndCaret();
127
- words = rangeAndCaret[0].substring(rangeAndCaret[1]-40,rangeAndCaret[1]);
128
- words = words.replace(/[\s\n\r\);\W]/g,'\n').split('\n');
129
- return words[words.length-1].replace(/[\W]/gi,'').toLowerCase();
130
- },
131
-
132
- snippets : function(evt) {
133
- var snippets = Language.snippets;
134
- var trigger = this.getLastWord();
135
- for (var i=0; i<snippets.length; i++) {
136
- if(snippets[i].input == trigger) {
137
- var content = snippets[i].output.replace(/</g,'&lt;');
138
- content = content.replace(/>/g,'&gt;');
139
- if(content.indexOf('$0')<0) content += cc;
140
- else content = content.replace(/\$0/,cc);
141
- content = content.replace(/\n/g,'<br>');
142
- var pattern = new RegExp(trigger+cc,'gi');
143
- evt.preventDefault(); // prevent the tab key from being added
144
- this.syntaxHighlight('snippets',pattern,content);
145
- }
146
- }
147
- },
148
-
149
- readOnly : function() {
150
- document.designMode = (arguments[0]) ? 'off' : 'on';
151
- },
152
-
153
- complete : function(trigger) {
154
- window.getSelection().getRangeAt(0).deleteContents();
155
- var complete = Language.complete;
156
- for (var i=0; i<complete.length; i++) {
157
- if(complete[i].input == trigger) {
158
- var pattern = new RegExp('\\'+trigger+cc);
159
- var content = complete[i].output.replace(/\$0/g,cc);
160
- parent.setTimeout(function () { CodePress.syntaxHighlight('complete',pattern,content)},0); // wait for char to appear on screen
161
- }
162
- }
163
- },
164
-
165
- getCompleteChars : function() {
166
- var cChars = '';
167
- for(var i=0;i<Language.complete.length;i++)
168
- cChars += '|'+Language.complete[i].input;
169
- return cChars+'|';
170
- },
171
-
172
- shortcuts : function() {
173
- var cCode = arguments[0];
174
- if(cCode==13) cCode = '[enter]';
175
- else if(cCode==32) cCode = '[space]';
176
- else cCode = '['+String.fromCharCode(charCode).toLowerCase()+']';
177
- for(var i=0;i<Language.shortcuts.length;i++)
178
- if(Language.shortcuts[i].input == cCode)
179
- this.insertCode(Language.shortcuts[i].output,false);
180
- },
181
-
182
- getRangeAndCaret : function() {
183
- var range = window.getSelection().getRangeAt(0);
184
- var range2 = range.cloneRange();
185
- var node = range.endContainer;
186
- var caret = range.endOffset;
187
- range2.selectNode(node);
188
- return [range2.toString(),caret];
189
- },
190
-
191
- insertCode : function(code,replaceCursorBefore) {
192
- var range = window.getSelection().getRangeAt(0);
193
- var node = window.document.createTextNode(code);
194
- var selct = window.getSelection();
195
- var range2 = range.cloneRange();
196
- // Insert text at cursor position
197
- selct.removeAllRanges();
198
- range.deleteContents();
199
- range.insertNode(node);
200
- // Move the cursor to the end of text
201
- range2.selectNode(node);
202
- range2.collapse(replaceCursorBefore);
203
- selct.removeAllRanges();
204
- selct.addRange(range2);
205
- },
206
-
207
- // get code from editor
208
- getCode : function() {
209
- var code = editor.innerHTML;
210
- code = code.replace(/<br>/g,'\n');
211
- code = code.replace(/\u2009/g,'');
212
- code = code.replace(/<.*?>/g,'');
213
- code = code.replace(/&lt;/g,'<');
214
- code = code.replace(/&gt;/g,'>');
215
- code = code.replace(/&amp;/gi,'&');
216
- return code;
217
- },
218
-
219
- // put code inside editor
220
- setCode : function() {
221
- var code = arguments[0];
222
- code = code.replace(/\u2009/gi,'');
223
- code = code.replace(/&/gi,'&amp;');
224
- code = code.replace(/</g,'&lt;');
225
- code = code.replace(/>/g,'&gt;');
226
- editor.innerHTML = code;
227
- },
228
-
229
- // undo and redo methods
230
- actions : {
231
- pos : -1, // actual history position
232
- history : [], // history vector
233
-
234
- undo : function() {
235
- if(editor.innerHTML.indexOf(cc)==-1){
236
- window.getSelection().getRangeAt(0).insertNode(document.createTextNode(cc));
237
- this.history[this.pos] = editor.innerHTML;
238
- }
239
- this.pos--;
240
- if(typeof(this.history[this.pos])=='undefined') this.pos++;
241
- editor.innerHTML = this.history[this.pos];
242
- CodePress.findString();
243
- },
244
-
245
- redo : function() {
246
- this.pos++;
247
- if(typeof(this.history[this.pos])=='undefined') this.pos--;
248
- editor.innerHTML = this.history[this.pos];
249
- CodePress.findString();
250
- },
251
-
252
- next : function() { // get next vector position and clean old ones
253
- if(this.pos>20) this.history[this.pos-21] = undefined;
254
- return ++this.pos;
255
- }
256
- }
257
- }
258
-
259
- Language={};
260
- window.addEventListener('load', function() { CodePress.initialize('new'); }, true);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
codepress/images/line-numbers.png DELETED
Binary file
codepress/index.html DELETED
@@ -1,443 +0,0 @@
1
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
2
-
3
- <html>
4
- <head>
5
- <title>CodePress - Real Time Syntax Highlighting Editor written in JavaScript</title>
6
-
7
- <style>
8
- body {color:#000;background-color:white;font:15px georgia, "Lucida Grande", "Lucida Sans Unicode", Arial, Helvetica, sans-serif; letter-spacing:0.01em;margin:15px;}
9
- p {margin:0 0 15px 0;}
10
- a,a:visited {color:#7f0055;}
11
- select {background:#ffffe1;}
12
- button {margin-top:5px;}
13
- button.actions {width:171px;font-family:arial;}
14
- h1 {color:#7f0055;margin:0;padding:0;font-size:42px;font-weight:normal;}
15
- h1 a {text-decoration:none;}
16
- h2 {margin:0;}
17
- h2 a {text-decoration:none;font-weight:normal;font-size:22px;color:black !important;}
18
- h3 {font-size:20px;font-weight:normal;padding:0;margin:25px 0 5px 0;color:#7f0055;font-weight:bold;border-bottom:2px dotted #d8d8d8;}
19
- h4 {font-size:18px;font-weight:normal;z-index:0;}
20
- code {color:#0080c0;font-size:13px;font-weight:bold;}
21
- ol, ul {padding:5px 0 5px 25px;margin:0;}
22
- ol li, ul li {margin:8px 0 8px 0;}
23
-
24
- #logo {text-align:center;background-color:#d6d6d6;padding:10px;-moz-border-radius:5px;border:1px solid silver;}
25
- #container {width:700px;margin:20px auto;padding:25px;border:3px solid #d9d9d9;-moz-border-radius:10px;background:#f8f8f8;}
26
- #languages {margin:5px 0;}
27
-
28
- #menu {width:100%;background:#7f0055;-moz-border-radius:4px;}
29
- #menu a {font:bold 17px georgia;color:white;padding:4px;display:block;border-left:1px solid white;text-align:center;text-decoration:none;}
30
- #menu a:hover {background:#b9669e;}
31
-
32
- .hidden-code {display:none;}
33
- .copycode {border:1px dotted gray;padding:10px;background:white;font-family:monospace;color:gray}
34
- </style>
35
-
36
- </head>
37
-
38
- <body>
39
- <div id="container">
40
-
41
- <div id="logo">
42
- <h1><a href="http://codepress.org/">CodePress</a></h1>
43
- <h2><a href="http://codepress.org/">Online Real Time Syntax Highlighting Editor</a></h2>
44
- </div>
45
-
46
- <br />
47
-
48
- <table cellpadding="0" cellspacing="0" id="menu">
49
- <tr>
50
- <td>
51
- <a href="http://www.codepress.org/index.php">Home/Download</a>
52
- </td>
53
- <td>
54
- <a href="http://www.codepress.org/install.php">&nbsp;&nbsp;Install&nbsp;&nbsp;</a>
55
- </td>
56
- <td>
57
- <a href="http://www.codepress.org/to-do.php">&nbsp;&nbsp;To-do&nbsp;&nbsp;</a>
58
- </td>
59
- <td>
60
- <a href="http://www.codepress.org/about.php" id="about">&nbsp;&nbsp;About&nbsp;&nbsp;</a>
61
- </td>
62
- </tr>
63
- </table>
64
-
65
- <h4>
66
- CodePress is web-based source code editor with syntax highlighting written in JavaScript that colors text in real time while it's being typed in the browser.
67
- </h4>
68
-
69
- <p>
70
- Go to <strong><a href="http://codepress.org/">http://codepress.org/</a></strong> for updates.
71
- </p>
72
-
73
- <h3>Demo</h3>
74
- <div id="languages">
75
- <em>choose example in:</em>
76
- <button onclick="cp1.edit('cp-php','php')">PHP</button>
77
- <button onclick="cp1.edit('cp-javascript','javascript')">JavaScript</button>
78
- <button onclick="cp1.edit('cp-java','java')">Java</button>
79
- <button onclick="cp1.edit('cp-perl','perl')">Perl</button>
80
- <button onclick="cp1.edit('cp-sql','sql')">SQL</button>
81
- <button onclick="cp1.edit('cp-html','html')">HTML</button>
82
- <button onclick="cp1.edit('cp-css','css')">CSS</button>
83
- </div>
84
-
85
- <textarea id="cp1" class="codepress php" style="width:700px;height:300px;" wrap="off">
86
- <?php
87
- // Very simple implementation of server side script
88
-
89
- if(isset($_GET['file'])) {
90
- $file = basename($_GET['file']);
91
- $full_file = $path['server'].'/'.$path['webdocs'].'/'.$path['files']."/".$file;
92
- if(file_exists($full_file)) {
93
- $code = file_get_contents($full_file);
94
- $code = preg_replace("/>/","&amp;gt;",$code);
95
- $code = preg_replace("/</","&amp;lt;",$code);
96
- $language = getLanguage($file);
97
- }
98
- }
99
- ?>
100
-
101
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
102
- <html>
103
- <head>
104
- <title>CodePress - Real Time Syntax Highlighting Editor written in JavaScript</title>
105
- <link type="text/css" href="languages/codepress-<?=$language?>.css" rel="stylesheet" id="cp-lang-style" />
106
- <script type="text/javascript" src="codepress.js"></script>
107
- <script type="text/javascript">
108
- CodePress.language = '<?=$language?>';
109
- </script>
110
- </head>
111
- <body id="ffedt"><pre id="ieedt"><?=$code?></pre></body>
112
- </html>
113
- </textarea>
114
-
115
- <br /><br />
116
-
117
- <textarea id="codepress2" class="codepress javascript linenumbers-off" style="width:700px;height:200px;" wrap="off">
118
- //set language
119
- this.setLanguage = function() {
120
- if(arguments[0]) {
121
- language = (typeof(Content.languages[arguments[0]])!='undefined') ? arguments[0] : this.setLanguage();
122
- cpLanguage.innerHTML = Content.languages[language].name;
123
- if(cpBody.document.designMode=='on') cpBody.document.designMode = 'off';
124
- CodePress.loadScript(cpBody.document, '../languages/'+language+'.js', function () { cpBody.CodePress.syntaxHighlight('init'); })
125
- cpBody.document.getElementById('cp-lang-style').href = '../languages/'+language+'.css';
126
- this.hideMenu();
127
- }
128
- else {
129
- var extension = filename.replace(/.*\.([^\.]+)$/,'$1');
130
- var aux = false;
131
- for(lang in Content.languages) {
132
- extensions = ','+Content.languages[lang].extensions+',';
133
- if(extensions.match(','+extension+',')) aux = lang;
134
- }
135
- language = (aux) ? aux : 'generic';
136
- }
137
- }
138
- </textarea>
139
-
140
- <p>
141
- <button class="actions" onclick="alert(codepress2.getCode())">get code from editor</button>
142
- <button class="actions" onclick="codepress2.toggleEditor()">turn on/off CodePress</button>
143
- <button class="actions" onclick="codepress2.toggleLineNumbers()">show/hide line numbers</button>
144
- <button class="actions" onclick="codepress2.toggleAutoComplete()">turn on/off auto-complete</button>
145
- <button class="actions" onclick="codepress2.toggleReadOnly()">turn on/off read only</button>
146
- </p>
147
-
148
-
149
-
150
- <h3>Installation</h3>
151
- <ol>
152
- <li>
153
- <p>
154
- <a href="http://codepress.org/">Download</a> and uncompress CodePress under a directory inside your webserver.<br>
155
- Example:<strong> http://yourserver/codepress/</strong><br />
156
- Since CodePress is pure JavaScript and HTML, you can also test it without a webserver.
157
- </p>
158
- </li>
159
- <li>
160
- <p>
161
- Insert CodePress script somewhere in your page inside the <code>&lt;head&gt;</code> or above the <code>&lt;/body&gt;</code> tag.
162
- </p>
163
-
164
- <p class="copycode">
165
- &lt;script src="/codepress/codepress.js" type="text/javascript"&gt;&lt;/script&gt;
166
- </p>
167
- </li>
168
-
169
- <li>
170
- <p>
171
- Add the <code>&lt;textarea&gt;</code> tag to the place on your page you want CodePress to appear. CodePress will inherit the width and height of your textarea.
172
- When the page loads, it will automatically replace your textarea with a CodePress window.
173
- </p>
174
- <p class="copycode">
175
- &lt;textarea id="myCpWindow" class="codepress javascript linenumbers-off"&gt;<br />
176
- &nbsp;&nbsp;&nbsp;// your code here<br />
177
- &lt;/textarea&gt;
178
- </p>
179
- <ul>
180
- <li>
181
- The <code>javascript</code> portion of the class="" means that the language being edited is JavaScript.
182
- </li>
183
- <li>
184
- The <code>codepress</code> portion of the class="" is mandatory and indicates a textarea to be replaced for a CodePress window.
185
- </li>
186
- <li>
187
- Other class options are <code>linenumbers-off</code>, <code>autocomplete-off</code> and <code>readonly-on</code>.
188
- </li>
189
- <li>
190
- Careful not to use the same id for two different CodePress windows (<code>&lt;textarea id="<strong>xx</strong>"...&gt;</code>)
191
- </li>
192
- </ul>
193
-
194
- </li>
195
- </ol>
196
-
197
- <h3>You also can...</h3>
198
- <ol>
199
- <li>
200
- Open/edit code from a different textarea.<br />
201
- Example: <code>textarea_id.edit('other_textarea_id','language')</code><br>
202
- </li>
203
- <li>
204
- Get code from CodePress window.<br />
205
- Example: <code>textarea_id.getCode()</code><br>
206
- </li>
207
- <li>
208
- Turn on/off CodePress editor and return to the regular textarea.<br />
209
- Example: <code>textarea_id.toggleEditor()</code><br>
210
- </li>
211
- <li>
212
- Turn on/off line numbers.<br />
213
- Example: <code>textarea_id.toggleLineNumbers()</code><br>
214
- </li>
215
- <li>
216
- Turn on/off read only.<br />
217
- Example: <code>textarea_id.toggleReadOnly()</code><br>
218
- </li>
219
- <li>
220
- Turn on/off auto-complete.<br />
221
- Example: <code>textarea_id.toggleAutoComplete()</code><br>
222
- </li>
223
-
224
- </ol>
225
-
226
- <!-- p>
227
- You may want to use [id].getCode() to get the content code from CodePress window and save it to your server since CodePress only edit files and do not save them.
228
- </p>
229
- <p>
230
- You may also want to open files from server. You'll have to write a server side script and replace the JavaScript call on codepress.js from codepress.html to codepress.php (if your server side language is PHP, of course).
231
- </p -->
232
-
233
- <h3>License</h3>
234
- <p>
235
- CodePress is distributed under the <a href="http://www.opensource.org/licenses/lgpl-license.php">LGPL</a>. If your software is <a href="http://www.gnu.org/philosophy/license-list.html#GPLCompatibleLicenses">compatible</a> with this licence or it is under <a href="http://creativecommons.org/">Creative Commons</a>, you can use it as you want. Just keep the credits somewhere around.
236
- </p>
237
-
238
-
239
- </div><!--/container-->
240
-
241
-
242
-
243
- <!-- hidden codes for loading -->
244
- <textarea id="cp-php" class="hidden-code">
245
- <?php
246
- // Very simple implementation of server side script
247
-
248
- if(isset($_GET['file'])) {
249
- $file = basename($_GET['file']);
250
- $full_file = $path['server'].'/'.$path['webdocs'].'/'.$path['files']."/".$file;
251
- if(file_exists($full_file)) {
252
- $code = file_get_contents($full_file);
253
- $code = preg_replace("/>/","&amp;gt;",$code);
254
- $code = preg_replace("/</","&amp;lt;",$code);
255
- $language = getLanguage($file);
256
- }
257
- }
258
- ?>
259
-
260
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
261
- <html>
262
- <head>
263
- <title>CodePress - Real Time Syntax Highlighting Editor written in JavaScript</title>
264
- <link type="text/css" href="languages/codepress-<?=$language?>.css" rel="stylesheet" id="cp-lang-style" />
265
- <script type="text/javascript" src="codepress.js"></script>
266
- <script type="text/javascript">
267
- CodePress.language = '<?=$language?>';
268
- </script>
269
- </head>
270
- <body id="ffedt"><pre id="ieedt"><?=$code?></pre></body>
271
- </html>
272
- </textarea>
273
-
274
- <textarea id="cp-javascript" class="hidden-code">
275
- CodePress = function(obj) {
276
- var self = document.createElement('iframe');
277
- self.textarea = obj;
278
- self.textarea.disabled = true;
279
- self.style.height = self.textarea.clientHeight +'px';
280
- self.style.width = self.textarea.clientWidth +'px';
281
-
282
- self.initialize = function() {
283
- self.editor = self.contentWindow.CodePress;
284
- self.editor.body = self.contentWindow.document.getElementsByTagName('body')[0];
285
- self.editor.setCode(self.textarea.value);
286
- self.editor.syntaxHighlight('init');
287
- }
288
-
289
- self.edit = function(id,language) {
290
- self.language = (language) ? language : self.textarea.className.replace(/ ?codepress ?/,'');
291
- self.src = cpPath+'modules/codepress.html?engine='+self.getEngine()+'&language='+self.language;
292
- if(self.attachEvent) self.attachEvent('onload',self.initialize);
293
- else self.addEventListener('load',self.initialize,false);
294
- }
295
- }
296
- </textarea>
297
-
298
- <textarea id="cp-autoit" class="hidden-code">
299
- #include
300
- IsNumber(15)
301
- @Macro
302
- ;comment
303
- $var = "string"
304
- </textarea>
305
-
306
- <textarea id="cp-java" class="hidden-code">
307
- import java.io.FileFilter;
308
- import java.io.IOException;
309
- import java.io.PrintWriter;
310
-
311
- /**
312
- * Project ECCO - File manager class
313
- * @author Fernando M.A.d.S.
314
- */
315
- public class FileManager extends HttpServlet {
316
-
317
- private static final long serialVersionUID = 1L;
318
- private static String login = "feanndor"; // session var should come here
319
- private static String usersPath = System.getProperty("user.dir")+File.separator+"htdocs"+File.separator+"ecco"+File.separator+"users"+File.separator;
320
- private static File dir = new File(usersPath+login+File.separator);
321
- static boolean existDirectories = false;
322
- static int isDirectory = 0;
323
-
324
- public FileFilter filterFiles(File dir) {
325
- return (new FileFilter() {
326
- public boolean accept(File pathname) {
327
- return !(pathname.isDirectory());
328
- }
329
- });
330
- }
331
- }
332
- </textarea>
333
-
334
- <textarea id="cp-perl" class="hidden-code">
335
- #!/usr/bin/perl
336
- # The first line of the script envokes Perl
337
-
338
- # Scalar variables
339
- $var1 = "Hello World";
340
- $var2 = 14.6;
341
-
342
- # Array variables
343
- @arr1 = ("zero","one","two","three","four");
344
-
345
- # Hash variable, or associative array
346
- %hash1 = ("one","Monday","two", "Tuesday","three", "Wednesday","four","Thursday");
347
-
348
- # Some simple printing
349
- print $var1;
350
-
351
- # Subroutine
352
- sub test() {
353
- print "ok";
354
- }
355
- </textarea>
356
-
357
- <textarea id="cp-sql" class="hidden-code">
358
- --
359
- -- simple select example
360
- --
361
- SELECT * FROM books
362
- WHERE price > 100.00 and price < 150.00
363
- ORDER BY title
364
-
365
- SELECT books.title, count(*) AS Authors
366
- FROM books
367
- JOIN book_authors
368
- ON books.book_number = book_authors.book_number
369
- GROUP BY books.title
370
-
371
- -- insert, update and delete examples
372
-
373
- INSERT INTO my_table (field1, field2, field3) VALUES ('test', 'N', NULL);
374
-
375
- BEGIN WORK;
376
- UPDATE inventory SET quantity = quantity - 3 WHERE item = 'pants';
377
- COMMIT;
378
- </textarea>
379
-
380
- <textarea id="cp-html" class="hidden-code">
381
- <html>
382
- <head>
383
- <title>CodePress - Online Real Time Syntax Highlighting Editor</title>
384
-
385
- <style type="text/css">
386
- @import url(styles.css);
387
- </style>
388
- <script type="text/javascript">
389
- function getCode() {
390
- alert(textWithoutHighlighting);
391
- }
392
- </script>
393
- </head>
394
- <body>
395
- <div id="logo">
396
- <h1><a href="http://codepress.org/">CodePress</a></h1>
397
- <h2>Online Real Time Syntax Highlighting Editor</h2>
398
- <img src="testimage.gif" />
399
- </div>
400
- <div id="languages">
401
- <em>choose language:</em>
402
- <button onclick="edit('codepress.php',this)" id="default">PHP</button>
403
- <button onclick="edit('FileManager.java',this)">Java</button>
404
- </div>
405
- </body>
406
- </html>
407
- </textarea>
408
-
409
- <textarea id="cp-css" class="hidden-code">
410
- /* CSS comment */
411
-
412
- body {
413
- color:#000;
414
- background-color:white;
415
- font:15px Georgia, "Lucida Grande", Arial, sans-serif;
416
- letter-spacing:0.01em;
417
- margin:15px;
418
- }
419
-
420
- p {
421
- margin:0 0 15px 0;
422
- }
423
-
424
- a,a:visited {
425
- color:#7f0055;
426
- }
427
-
428
- select {
429
- background:#ffffe1;
430
- }
431
-
432
- h1 {
433
- color:#7f0055;
434
- margin:0;
435
- padding:0;
436
- font-size:42px;
437
- }
438
- </textarea>
439
-
440
-
441
- <script src="codepress.js" type="text/javascript"></script>
442
- </body>
443
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
codepress/languages/asp.css DELETED
@@ -1,71 +0,0 @@
1
- /*
2
- * CodePress color styles for ASP-VB syntax highlighting
3
- * By Martin D. Kirk
4
- */
5
- /* tags */
6
-
7
- b {
8
- color:#000080;
9
- }
10
- /* comments */
11
- big, big b, big em, big ins, big s, strong i, strong i b, strong i s, strong i u, strong i a, strong i a u, strong i s u {
12
- color:gray;
13
- font-weight:normal;
14
- }
15
- /* ASP comments */
16
- strong dfn, strong dfn a,strong dfn var, strong dfn a u, strong dfn u{
17
- color:gray;
18
- font-weight:normal;
19
- }
20
- /* attributes */
21
- s, s b, span s u, span s cite, strong span s {
22
- color:#5656fa ;
23
- font-weight:normal;
24
- }
25
- /* strings */
26
- strong s,strong s b, strong s u, strong s cite {
27
- color:#009900;
28
- font-weight:normal;
29
- }
30
- strong ins{
31
- color:#000000;
32
- font-weight:bold;
33
- }
34
- /* Syntax */
35
- strong a, strong a u {
36
- color:#0000FF;
37
- font-weight:;
38
- }
39
- /* Native Keywords */
40
- strong u {
41
- color:#990099;
42
- font-weight:bold;
43
- }
44
- /* Numbers */
45
- strong var{
46
- color:#FF0000;
47
- }
48
- /* ASP Language */
49
- span{
50
- color:#990000;
51
- font-weight:bold;
52
- }
53
- strong i,strong a i, strong u i {
54
- color:#009999;
55
- }
56
- /* style */
57
- em {
58
- color:#800080;
59
- font-style:normal;
60
- }
61
- /* script */
62
- ins {
63
- color:#800000;
64
- font-weight:bold;
65
- }
66
-
67
- /* <?php and ?> */
68
- cite, s cite {
69
- color:red;
70
- font-weight:bold;
71
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
codepress/languages/asp.js DELETED
@@ -1,117 +0,0 @@
1
- /*
2
- * CodePress regular expressions for ASP-vbscript syntax highlighting
3
- */
4
-
5
- // ASP VBScript
6
- Language.syntax = [
7
- // all tags
8
- { input : /(&lt;[^!%|!%@]*?&gt;)/g, output : '<b>$1</b>' },
9
- // style tags
10
- { input : /(&lt;style.*?&gt;)(.*?)(&lt;\/style&gt;)/g, output : '<em>$1</em><em>$2</em><em>$3</em>' },
11
- // script tags
12
- { input : /(&lt;script.*?&gt;)(.*?)(&lt;\/script&gt;)/g, output : '<ins>$1</ins><ins>$2</ins><ins>$3</ins>' },
13
- // strings "" and attributes
14
- { input : /\"(.*?)(\"|<br>|<\/P>)/g, output : '<s>"$1$2</s>' },
15
- // ASP Comment
16
- { input : /\'(.*?)(\'|<br>|<\/P>)/g, output : '<dfn>\'$1$2</dfn>'},
17
- // <%.*
18
- { input : /(&lt;%)/g, output : '<strong>$1' },
19
- // .*%>
20
- { input : /(%&gt;)/g, output : '$1</strong>' },
21
- // <%@...%>
22
- { input : /(&lt;%@)(.+?)(%&gt;)/gi, output : '$1<span>$2</span>$3' },
23
- //Numbers
24
- { input : /\b([\d]+)\b/g, output : '<var>$1</var>' },
25
- // Reserved Words 1 (Blue)
26
- { input : /\b(And|As|ByRef|ByVal|Call|Case|Class|Const|Dim|Do|Each|Else|ElseIf|Empty|End|Eqv|Exit|False|For|Function)\b/gi, output : '<a>$1</a>' },
27
- { input : /\b(Get|GoTo|If|Imp|In|Is|Let|Loop|Me|Mod|Enum|New|Next|Not|Nothing|Null|On|Option|Or|Private|Public|ReDim|Rem)\b/gi, output : '<a>$1</a>' },
28
- { input : /\b(Resume|Select|Set|Stop|Sub|Then|To|True|Until|Wend|While|With|Xor|Execute|Randomize|Erase|ExecuteGlobal|Explicit|step)\b/gi, output : '<a>$1</a>' },
29
- // Reserved Words 2 (Purple)
30
- { input : /\b(Abandon|Abs|AbsolutePage|AbsolutePosition|ActiveCommand|ActiveConnection|ActualSize|AddHeader|AddNew|AppendChunk)\b/gi, output : '<u>$1</u>' },
31
- { input : /\b(AppendToLog|Application|Array|Asc|Atn|Attributes|BeginTrans|BinaryRead|BinaryWrite|BOF|Bookmark|Boolean|Buffer|Byte)\b/gi, output : '<u>$1</u>' },
32
- { input : /\b(CacheControl|CacheSize|Cancel|CancelBatch|CancelUpdate|CBool|CByte|CCur|CDate|CDbl|Charset|Chr|CInt|Clear)\b/gi, output : '<u>$1</u>' },
33
- { input : /\b(ClientCertificate|CLng|Clone|Close|CodePage|CommandText|CommandType|CommandTimeout|CommitTrans|CompareBookmarks|ConnectionString|ConnectionTimeout)\b/gi, output : '<u>$1</u>' },
34
- { input : /\b(Contents|ContentType|Cookies|Cos|CreateObject|CreateParameter|CSng|CStr|CursorLocation|CursorType|DataMember|DataSource|Date|DateAdd|DateDiff)\b/gi, output : '<u>$1</u>' },
35
- { input : /\b(DatePart|DateSerial|DateValue|Day|DefaultDatabase|DefinedSize|Delete|Description|Double|EditMode|Eof|EOF|err|Error)\b/gi, output : '<u>$1</u>' },
36
- { input : /\b(Exp|Expires|ExpiresAbsolute|Filter|Find|Fix|Flush|Form|FormatCurrency|FormatDateTime|FormatNumber|FormatPercent)\b/gi, output : '<u>$1</u>' },
37
- { input : /\b(GetChunk|GetLastError|GetRows|GetString|Global|HelpContext|HelpFile|Hex|Hour|HTMLEncode|IgnoreCase|Index|InStr|InStrRev)\b/gi, output : '<u>$1</u>' },
38
- { input : /\b(Int|Integer|IsArray|IsClientConnected|IsDate|IsolationLevel|Join|LBound|LCase|LCID|Left|Len|Lock|LockType|Log|Long|LTrim)\b/gi, output : '<u>$1</u>' },
39
- { input : /\b(MapPath|MarshalOptions|MaxRecords|Mid|Minute|Mode|Month|MonthName|Move|MoveFirst|MoveLast|MoveNext|MovePrevious|Name|NextRecordset)\b/gi, output : '<u>$1</u>' },
40
- { input : /\b(Now|Number|NumericScale|ObjectContext|Oct|Open|OpenSchema|OriginalValue|PageCount|PageSize|Pattern|PICS|Precision|Prepared|Property)\b/gi, output : '<u>$1</u>' },
41
- { input : /\b(Provider|QueryString|RecordCount|Redirect|RegExp|Remove|RemoveAll|Replace|Requery|Request|Response|Resync|Right|Rnd)\b/gi, output : '<u>$1</u>' },
42
- { input : /\b(RollbackTrans|RTrim|Save|ScriptTimeout|Second|Seek|Server|ServerVariables|Session|SessionID|SetAbort|SetComplete|Sgn)\b/gi, output : '<u>$1</u>' },
43
- { input : /\b(Sin|Size|Sort|Source|Space|Split|Sqr|State|StaticObjects|Status|StayInSync|StrComp|String|StrReverse|Supports|Tan|Time)\b/gi, output : '<u>$1</u>' },
44
- { input : /\b(Timeout|Timer|TimeSerial|TimeValue|TotalBytes|Transfer|Trim|Type|Type|UBound|UCase|UnderlyingValue|UnLock|Update|UpdateBatch)\b/gi, output : '<u>$1</u>' },
45
- { input : /\b(URLEncode|Value|Value|Version|Weekday|WeekdayName|Write|Year)\b/gi, output : '<u>$1</u>' },
46
- // Reserved Words 3 (Turquis)
47
- { input : /\b(vbBlack|vbRed|vbGreen|vbYellow|vbBlue|vbMagenta|vbCyan|vbWhite|vbBinaryCompare|vbTextCompare)\b/gi, output : '<i>$1</i>' },
48
- { input : /\b(vbSunday|vbMonday|vbTuesday|vbWednesday|vbThursday|vbFriday|vbSaturday|vbUseSystemDayOfWeek)\b/gi, output : '<i>$1</i>' },
49
- { input : /\b(vbFirstJan1|vbFirstFourDays|vbFirstFullWeek|vbGeneralDate|vbLongDate|vbShortDate|vbLongTime|vbShortTime)\b/gi, output : '<i>$1</i>' },
50
- { input : /\b(vbObjectError|vbCr|VbCrLf|vbFormFeed|vbLf|vbNewLine|vbNullChar|vbNullString|vbTab|vbVerticalTab|vbUseDefault|vbTrue)\b/gi, output : '<i>$1</i>' },
51
- { input : /\b(vbFalse|vbEmpty|vbNull|vbInteger|vbLong|vbSingle|vbDouble|vbCurrency|vbDate|vbString|vbObject|vbError|vbBoolean|vbVariant)\b/gi, output : '<i>$1</i>' },
52
- { input : /\b(vbDataObject|vbDecimal|vbByte|vbArray)\b/gi, output : '<i>$1</i>' },
53
- // html comments
54
- { input : /(&lt;!--.*?--&gt.)/g, output : '<big>$1</big>' }
55
- ]
56
-
57
- Language.Functions = [
58
- // Output at index 0, must be the desired tagname surrounding a $1
59
- // Name is the index from the regex that marks the functionname
60
- {input : /(function|sub)([ ]*?)(\w+)([ ]*?\()/gi , output : '<ins>$1</ins>', name : '$3'}
61
- ]
62
-
63
- Language.snippets = [
64
- //Conditional
65
- { input : 'if', output : 'If $0 Then\n\t\nEnd If' },
66
- { input : 'ifelse', output : 'If $0 Then\n\t\n\nElse\n\t\nEnd If' },
67
- { input : 'case', output : 'Select Case $0\n\tCase ?\n\tCase Else\nEnd Select'},
68
- //Response
69
- { input : 'rw', output : 'Response.Write( $0 )' },
70
- { input : 'resc', output : 'Response.Cookies( $0 )' },
71
- { input : 'resb', output : 'Response.Buffer'},
72
- { input : 'resflu', output : 'Response.Flush()'},
73
- { input : 'resend', output : 'Response.End'},
74
- //Request
75
- { input : 'reqc', output : 'Request.Cookies( $0 )' },
76
- { input : 'rq', output : 'Request.Querystring("$0")' },
77
- { input : 'rf', output : 'Request.Form("$0")' },
78
- //FSO
79
- { input : 'fso', output : 'Set fso = Server.CreateObject("Scripting.FileSystemObject")\n$0' },
80
- { input : 'setfo', output : 'Set fo = fso.getFolder($0)' },
81
- { input : 'setfi', output : 'Set fi = fso.getFile($0)' },
82
- { input : 'twr', output : 'Set f = fso.CreateTextFile($0,true)\'overwrite\nf.WriteLine()\nf.Close'},
83
- { input : 'tre', output : 'Set f = fso.OpenTextFile($0, 1)\nf.ReadAll\nf.Close'},
84
- //Server
85
- { input : 'mapp', output : 'Server.Mappath($0)' },
86
- //Loops
87
- { input : 'foreach', output : 'For Each $0 in ?\n\t\nNext' },
88
- { input : 'for', output : 'For $0 to ? step ?\n\t\nNext' },
89
- { input : 'do', output : 'Do While($0)\n\t\nLoop' },
90
- { input : 'untilrs', output : 'do until rs.eof\n\t\nrs.movenext\nloop' },
91
- //ADO
92
- { input : 'adorec', output : 'Set rs = Server.CreateObject("ADODB.Recordset")' },
93
- { input : 'adocon', output : 'Set Conn = Server.CreateObject("ADODB.Connection")' },
94
- { input : 'adostr', output : 'Set oStr = Server.CreateObject("ADODB.Stream")' },
95
- //Http Request
96
- { input : 'xmlhttp', output : 'Set xmlHttp = Server.CreateObject("Microsoft.XMLHTTP")\nxmlHttp.open("GET", $0, false)\nxmlHttp.send()\n?=xmlHttp.responseText' },
97
- { input : 'xmldoc', output : 'Set xmldoc = Server.CreateObject("Microsoft.XMLDOM")\nxmldoc.async=false\nxmldoc.load(request)'},
98
- //Functions
99
- { input : 'func', output : 'Function $0()\n\t\n\nEnd Function'},
100
- { input : 'sub', output : 'Sub $0()\n\t\nEnd Sub'}
101
-
102
- ]
103
-
104
- Language.complete = [
105
- //{ input : '\'', output : '\'$0\'' },
106
- { input : '"', output : '"$0"' },
107
- { input : '(', output : '\($0\)' },
108
- { input : '[', output : '\[$0\]' },
109
- { input : '{', output : '{\n\t$0\n}' }
110
- ]
111
-
112
- Language.shortcuts = [
113
- { input : '[space]', output : '&nbsp;' },
114
- { input : '[enter]', output : '<br />' } ,
115
- { input : '[j]', output : 'testing' },
116
- { input : '[7]', output : '&amp;' }
117
- ]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
codepress/languages/autoit.css DELETED
@@ -1,13 +0,0 @@
1
- /**
2
- * CodePress color styles for AutoIt syntax highlighting
3
- */
4
-
5
- u {font-style:normal;color:#000090;font-weight:bold;font-family:Monospace;}
6
- var {color:#AA0000;font-weight:bold;font-style:normal;}
7
- em {color:#FF33FF;}
8
- ins {color:#AC00A9;}
9
- i {color:#F000FF;}
10
- b {color:#FF0000;}
11
- a {color:#0080FF;font-weight:bold;}
12
- s, s u, s b {color:#9999CC;font-weight:normal;}
13
- cite, cite *{color:#009933;font-weight:normal;}
 
 
 
 
 
 
 
 
 
 
 
 
 
codepress/languages/autoit.js DELETED
@@ -1,32 +0,0 @@
1
- /**
2
- * CodePress regular expressions for AutoIt syntax highlighting
3
- * @author: James Brooks, Michael HURNI
4
- */
5
-
6
- // AutoIt
7
- Language.syntax = [
8
- { input : /({|}|\(|\))/g, output : '<b>$1</b>' }, // Brackets
9
- { input : /(\*|\+|-)/g, output : '<b>$1</b>' }, // Operator
10
- { input : /\"(.*?)(\"|<br>|<\/P>)/g, output : "<s>\"$1$2</s>" }, // strings double
11
- { input : /\'(.*?)(\'|<br>|<\/P>)/g, output : '<s>\'$1$2</s>' }, // strings single
12
- { input : /\b([\d]+)\b/g, output : '<ins>$1</ins>' }, // Numbers
13
- { input : /#(.*?)(<br>|<\/P>)/g, output : '<i>#$1</i>$2' }, // Directives and Includes
14
- { input : /(\$[\w\.]*)/g, output : '<var>$1</var>' }, // vars
15
- { input : /(_[\w\.]*)/g, output : '<a>$1</a>' }, // underscored word
16
- { input : /(\@[\w\.]*)/g, output : '<em>$1</em>' }, // Macros
17
- { input : /\b(Abs|ACos|AdlibDisable|AdlibEnable|Asc|AscW|ASin|Assign|ATan|AutoItSetOption|AutoItWinGetTitle|AutoItWinSetTitle|Beep|Binary|BinaryLen|BinaryMid|BinaryToString|BitAND|BitNOT|BitOR|BitSHIFT|BitXOR|BlockInput|Break|Call|CDTray|Ceiling|Chr|ChrW|ClipGet|ClipPut|ConsoleRead|ConsoleWrite|ConsoleWriteError|ControlClick|ControlCommand|ControlDisable|ControlEnable|ControlFocus|ControlGetFocus|ControlGetHandle|ControlGetPos|ControlGetText|ControlHide|ControlListView|ControlMove|ControlSend|ControlSetText|ControlShow|Cos|Dec|DirCopy|DirCreate|DirGetSize|DirMove|DirRemove|DllCall|DllCall|DllClose|DllOpen|DllStructCreate|DllStructGetData|DllStructGetPtr|DllStructGetSize|DllStructSetData|DriveGetDrive|DriveGetFileSystem|DriveGetLabel|DriveGetSerial|DriveGetType|DriveMapAdd|DriveMapDel|DriveMapGet|DriveSetLabel|DriveSpaceFree|DriveSpaceTotal|DriveStatus|EnvGet|EnvSet|EnvUpdate|Eval|Execute|Exp|FileChangeDir|FileClose|FileCopy|FileCreateNTFS|FileCreateShortcut|FileDelete|FileExists|FileFindFirstFile|FileFindNextFile|FileGetAttrib|FileGetLongName|FileGetShortcut|FileGetShortName|FileGetSize|FileGetTime|FileGetVersion|FileInstall|FileMove|FileOpen|FileOpenDialog|FileRead|FileReadLine|FileRecycle|FileRecycleEmpty|FileSaveDialog|FileSelectFolder|FileSetAttrib|FileSetTime|FileWrite|FileWriteLine|Floor|FtpSetProxy|GuiCreate|GuiCtrlCreateAvi|GuiCtrlCreateButton|GuiCtrlCreateCheckbox|GuiCtrlCreateCombo|GuiCtrlCreateContextMenu|GuiCtrlCreateDate|GuiCtrlCreateDummy|GuiCtrlCreateEdit|GuiCtrlCreateGraphic|GuiCtrlCreateGroup|GuiCtrlCreateIcon|GuiCtrlCreateInput|GuiCtrlCreateLabel|GuiCtrlCreateList|GuiCtrlCreateListView|GuiCtrlCreateListViewItem|GuiCtrlCreateMenu|GuiCtrlCreateMenuItem|GuiCtrlCreateMonthCal|GuiCtrlCreateObj|GuiCtrlCreatePic|GuiCtrlCreateProgress|GuiCtrlCreateRadio|GuiCtrlCreateSlider|GuiCtrlCreateTab|GuiCtrlCreateTabItem|GuiCtrlCreateUpdown|GuiCtrlDelete|GuiCtrlGetHandle|GuiCtrlGetState|GuiCtrlRead|GuiCtrlRecvMsg|GuiCtrlSentMsg|GuiCtrlSendToDummy|GuiCtrlSetBkColor|GuiCtrlSetColor|GuiCtrlSetCursor|GuiCtrlSetData|GuiCtrlSetFont|GuiCtrlSetGraphic|GuiCtrlSetImage|GuiCtrlSetLimit|GuiCtrlSetOnEvent|GuiCtrlSetPos|GuiCtrlResizing|GuiCtrlSetState|GuiCtrlSetTip|GuiDelete|GuiGetCursorInfo|GuiGetMsg|GuiGetStyle|GuiRegisterMsg|GuiSetBkColor|GuiSetCoord|GuiSetCursor|GuiSetFont|GuiSetHelp|GuiSetIcon|GuiSetOnEvent|GuiSetStat|GuiSetStyle|GuiStartGroup|GuiSwitch|Hex|HotKeySet|HttpSetProxy|HWnd|InetGet|InetGetSize|IniDelete|IniRead|IniReadSection|IniReadSectionNames|IniRenameSection|IniWrite|IniWriteSection|InputBox|Int|IsAdmin|IsArray|IsBinary|IsBool|IsDeclared|IsDllStruct|IsFloat|IsHWnd|IsInt|IsKeyword|IsNumber|IsObj|IsString|Log|MemGetStats|Mod|MouseClick|MouseClickDrag|MouseDown|MouseGetCursor|MouseGetPos|MouseMove|MouseUp|MouseWheel|MsgBox|Number|ObjCreate|ObjEvent|ObjGet|ObjName|Ping|PixelCheckSum|PixelGetColor|PixelSearch|ProcessClose|ProcessExists|ProcessList|ProcessSetPriority|ProcessWait|ProcessWaitClose|ProgressOff|ProcessOn|ProgressSet|Random|RegDelete|RegEnumKey|RegEnumVal|RegRead|RegWrite|Round|Run|RunAsSet|RunWait|Send|SetError|SetExtended|ShellExecute|ShellExecuteWait|Shutdown|Sin|Sleep|SoundPlay|SoundSetWaveVolume|SplashImageOn|SplashOff|SplashTextOn|Sqrt|SRandom|StatusbarGetText|StderrRead|StdinWrite|StdoutRead|String|StringAddCR|StringCompare|StringFormat|StringInStr|StringIsAlNum|StringIsAlpha|StringIsASCII|StringIsDigit|StringIsFloat|StringIsInt|StringIsLower|StringIsSpace|StringIsUpper|StringIsXDigit|StringLeft|StringLen|StringLower|StringMid|StringRegExp|StringRegExpReplace|StringReplace|StringRight|StringSplit|StringStripCR|StringStripWS|StringToBinary|StringTrimLeft|StringTrimRight|StringUpper|Tan|TCPAccept|TCPCloseSocket|TCPConnect|TCPListen|TCPNameToIP|TCPrecv|TCPSend|TCPShutdown|TCPStartup|TimerDiff|TimerInit|ToolTip|TrayCreateItem|TrayCreateMenu|TrayGetMenu|TrayGetMsg|TrayItemDelete|TrayItemGetHandle|TrayItemGetState|TrayItemGetText|TrayItemSetOnEvent|TrayItemSetState|TrayItemSetText|TraySetClick|TraySetIcon|TraySetOnEvent|TraySetPauseIcon|TraySetState|TraySetToolTip|TrayTip|UBound|UDPBind|UDPCloseSocket|UDPOpen|UDPRecv|UDPSend|WinActivate|WinActive|WinClose|WinExists|WinFlash|WinGetCaretPos|WinGetClassList|WinGetClientSize|WinGetHandle|WinGetPos|WinGetProcess|WinGetState|WinGetText|WinGetTitle|WinKill|WinList|WinMenuSelectItem|WinMinimizeAll|WinMinimizeAllUndo|WinMove|WinSetOnTop|WinSetState|WinSetTitle|WinSetTrans|WinWait|WinWaitActive|WinWaitClose|WinWaitNotActive)\b/g, output : '<u>$1</u>' } ,// reserved words
18
- { input : /\B;(.*?)(<br>|<\/P>)/g, output : '<cite>;$1</cite>$2' }, // comments
19
- { input : /#CS(.*?)#CE/g, output : '<cite>#CS$1#CE</cite>' } // Block Comments
20
- ]
21
-
22
- Language.snippets = []
23
-
24
- Language.complete = [
25
- { input : '\'',output : '\'$0\'' },
26
- { input : '"', output : '"$0"' },
27
- { input : '(', output : '\($0\)' },
28
- { input : '[', output : '\[$0\]' },
29
- { input : '{', output : '{\n\t$0\n}' }
30
- ]
31
-
32
- Language.shortcuts = []
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
codepress/languages/csharp.css DELETED
@@ -1,9 +0,0 @@
1
- /*
2
- * CodePress color styles for Java syntax highlighting
3
- * By Edwin de Jonge
4
- */
5
-
6
- b {color:#7F0055;font-weight:bold;font-style:normal;} /* reserved words */
7
- a {color:#2A0088;font-weight:bold;font-style:normal;} /* types */
8
- i, i b, i s {color:#3F7F5F;font-weight:bold;} /* comments */
9
- s, s b {color:#2A00FF;font-weight:normal;} /* strings */
 
 
 
 
 
 
 
 
 
codepress/languages/csharp.js DELETED
@@ -1,25 +0,0 @@
1
- /*
2
- * CodePress regular expressions for C# syntax highlighting
3
- * By Edwin de Jonge
4
- */
5
-
6
- Language.syntax = [ // C#
7
- { input : /\"(.*?)(\"|<br>|<\/P>)/g, output : '<s>"$1$2</s>' }, // strings double quote
8
- { input : /\'(.?)(\'|<br>|<\/P>)/g, output : '<s>\'$1$2</s>' }, // strings single quote
9
- { input : /\b(abstract|as|base|break|case|catch|checked|continue|default|delegate|do|else|event|explicit|extern|false|finally|fixed|for|foreach|get|goto|if|implicit|in|interface|internal|is|lock|namespace|new|null|object|operator|out|override|params|partial|private|protected|public|readonly|ref|return|set|sealed|sizeof|static|stackalloc|switch|this|throw|true|try|typeof|unchecked|unsafe|using|value|virtual|while)\b/g, output : '<b>$1</b>' }, // reserved words
10
- { input : /\b(bool|byte|char|class|double|float|int|interface|long|string|struct|void)\b/g, output : '<a>$1</a>' }, // types
11
- { input : /([^:]|^)\/\/(.*?)(<br|<\/P)/g, output : '$1<i>//$2</i>$3' }, // comments //
12
- { input : /\/\*(.*?)\*\//g, output : '<i>/*$1*/</i>' } // comments /* */
13
- ];
14
-
15
- Language.snippets = [];
16
-
17
- Language.complete = [ // Auto complete only for 1 character
18
- {input : '\'',output : '\'$0\'' },
19
- {input : '"', output : '"$0"' },
20
- {input : '(', output : '\($0\)' },
21
- {input : '[', output : '\[$0\]' },
22
- {input : '{', output : '{\n\t$0\n}' }
23
- ];
24
-
25
- Language.shortcuts = [];
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
codepress/languages/css.css DELETED
@@ -1,10 +0,0 @@
1
- /*
2
- * CodePress color styles for CSS syntax highlighting
3
- */
4
-
5
- b, b a, b u {color:#000080;} /* tags, ids, classes */
6
- i, i b, i s, i a, i u {color:gray;} /* comments */
7
- s, s b {color:#a0a0dd;} /* parameters */
8
- a {color:#0000ff;} /* keys */
9
- u {color:red;} /* values */
10
-
 
 
 
 
 
 
 
 
 
 
codepress/languages/css.js DELETED
@@ -1,23 +0,0 @@
1
- /*
2
- * CodePress regular expressions for CSS syntax highlighting
3
- */
4
-
5
- // CSS
6
- Language.syntax = [
7
- { input : /(.*?){(.*?)}/g,output : '<b>$1</b>{<u>$2</u>}' }, // tags, ids, classes, values
8
- { input : /([\w-]*?):([^\/])/g,output : '<a>$1</a>:$2' }, // keys
9
- { input : /\((.*?)\)/g,output : '(<s>$1</s>)' }, // parameters
10
- { input : /\/\*(.*?)\*\//g,output : '<i>/*$1*/</i>'} // comments
11
- ]
12
-
13
- Language.snippets = []
14
-
15
- Language.complete = [
16
- { input : '\'',output : '\'$0\'' },
17
- { input : '"', output : '"$0"' },
18
- { input : '(', output : '\($0\)' },
19
- { input : '[', output : '\[$0\]' },
20
- { input : '{', output : '{\n\t$0\n}' }
21
- ]
22
-
23
- Language.shortcuts = []
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
codepress/languages/generic.css DELETED
@@ -1,9 +0,0 @@
1
- /*
2
- * CodePress color styles for generic syntax highlighting
3
- */
4
-
5
- b {color:#7F0055;font-weight:bold;} /* reserved words */
6
- u {color:darkblue;font-weight:bold;} /* special words */
7
- i, i b, i s, i u, i em {color:green;font-weight:normal;} /* comments */
8
- s, s b, s em {color:#2A00FF;font-weight:normal;} /* strings */
9
- em {font-weight:bold;} /* special chars */
 
 
 
 
 
 
 
 
 
codepress/languages/generic.js DELETED
@@ -1,25 +0,0 @@
1
- /*
2
- * CodePress regular expressions for generic syntax highlighting
3
- */
4
-
5
- // generic languages
6
- Language.syntax = [
7
- { input : /\"(.*?)(\"|<br>|<\/P>)/g, output : '<s>"$1$2</s>' }, // strings double quote
8
- { input : /\'(.*?)(\'|<br>|<\/P>)/g, output : '<s>\'$1$2</s>' }, // strings single quote
9
- { input : /\b(abstract|continue|for|new|switch|default|goto|boolean|do|if|private|this|break|double|protected|throw|byte|else|import|public|throws|case|return|catch|extends|int|short|try|char|final|interface|static|void|class|finally|long|const|float|while|function|label)\b/g, output : '<b>$1</b>' }, // reserved words
10
- { input : /([\(\){}])/g, output : '<em>$1</em>' }, // special chars;
11
- { input : /([^:]|^)\/\/(.*?)(<br|<\/P)/g, output : '$1<i>//$2</i>$3' }, // comments //
12
- { input : /\/\*(.*?)\*\//g, output : '<i>/*$1*/</i>' } // comments /* */
13
- ]
14
-
15
- Language.snippets = []
16
-
17
- Language.complete = [
18
- { input : '\'', output : '\'$0\'' },
19
- { input : '"', output : '"$0"' },
20
- { input : '(', output : '\($0\)' },
21
- { input : '[', output : '\[$0\]' },
22
- { input : '{', output : '{\n\t$0\n}' }
23
- ]
24
-
25
- Language.shortcuts = []
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
codepress/languages/html.css DELETED
@@ -1,13 +0,0 @@
1
- /*
2
- * CodePress color styles for HTML syntax highlighting
3
- */
4
-
5
- b {color:#000080;} /* tags */
6
- ins, ins b, ins s, ins em {color:gray;} /* comments */
7
- s, s b {color:#7777e4;} /* attribute values */
8
- a {color:green;} /* links */
9
- u {color:#E67300;} /* forms */
10
- big {color:#db0000;} /* images */
11
- em, em b {color:#800080;} /* style */
12
- strong {color:#800000;} /* script */
13
- tt i {color:darkblue;font-weight:bold;} /* script reserved words */
 
 
 
 
 
 
 
 
 
 
 
 
 
codepress/languages/html.js DELETED
@@ -1,59 +0,0 @@
1
- /*
2
- * CodePress regular expressions for HTML syntax highlighting
3
- */
4
-
5
- // HTML
6
- Language.syntax = [
7
- { input : /(&lt;[^!]*?&gt;)/g, output : '<b>$1</b>' }, // all tags
8
- { input : /(&lt;a .*?&gt;|&lt;\/a&gt;)/g, output : '<a>$1</a>' }, // links
9
- { input : /(&lt;img .*?&gt;)/g, output : '<big>$1</big>' }, // images
10
- { input : /(&lt;\/?(button|textarea|form|input|select|option|label).*?&gt;)/g, output : '<u>$1</u>' }, // forms
11
- { input : /(&lt;style.*?&gt;)(.*?)(&lt;\/style&gt;)/g, output : '<em>$1</em><em>$2</em><em>$3</em>' }, // style tags
12
- { input : /(&lt;script.*?&gt;)(.*?)(&lt;\/script&gt;)/g, output : '<strong>$1</strong><tt>$2</tt><strong>$3</strong>' }, // script tags
13
- { input : /=(".*?")/g, output : '=<s>$1</s>' }, // atributes double quote
14
- { input : /=('.*?')/g, output : '=<s>$1</s>' }, // atributes single quote
15
- { input : /(&lt;!--.*?--&gt.)/g, output : '<ins>$1</ins>' }, // comments
16
- { input : /\b(alert|window|document|break|continue|do|for|new|this|void|case|default|else|function|return|typeof|while|if|label|switch|var|with|catch|boolean|int|try|false|throws|null|true|goto)\b/g, output : '<i>$1</i>' } // script reserved words
17
- ]
18
-
19
- Language.snippets = [
20
- { input : 'aref', output : '<a href="$0"></a>' },
21
- { input : 'h1', output : '<h1>$0</h1>' },
22
- { input : 'h2', output : '<h2>$0</h2>' },
23
- { input : 'h3', output : '<h3>$0</h3>' },
24
- { input : 'h4', output : '<h4>$0</h4>' },
25
- { input : 'h5', output : '<h5>$0</h5>' },
26
- { input : 'h6', output : '<h6>$0</h6>' },
27
- { input : 'html', output : '<html>\n\t$0\n</html>' },
28
- { input : 'head', output : '<head>\n\t<meta http-equiv="content-type" content="text/html; charset=utf-8" />\n\t<title>$0</title>\n\t\n</head>' },
29
- { input : 'img', output : '<img src="$0" alt="" />' },
30
- { input : 'input', output : '<input name="$0" id="" type="" value="" />' },
31
- { input : 'label', output : '<label for="$0"></label>' },
32
- { input : 'legend', output : '<legend>\n\t$0\n</legend>' },
33
- { input : 'link', output : '<link rel="stylesheet" href="$0" type="text/css" media="screen" charset="utf-8" />' },
34
- { input : 'base', output : '<base href="$0" />' },
35
- { input : 'body', output : '<body>\n\t$0\n</body>' },
36
- { input : 'css', output : '<link rel="stylesheet" href="$0" type="text/css" media="screen" charset="utf-8" />' },
37
- { input : 'div', output : '<div>\n\t$0\n</div>' },
38
- { input : 'divid', output : '<div id="$0">\n\t\n</div>' },
39
- { input : 'dl', output : '<dl>\n\t<dt>\n\t\t$0\n\t</dt>\n\t<dd></dd>\n</dl>' },
40
- { input : 'fieldset', output : '<fieldset>\n\t$0\n</fieldset>' },
41
- { input : 'form', output : '<form action="$0" method="" name="">\n\t\n</form>' },
42
- { input : 'meta', output : '<meta name="$0" content="" />' },
43
- { input : 'p', output : '<p>$0</p>' },
44
- { input : 'script', output : '<script type="text/javascript" language="javascript" charset="utf-8">\n\t$0\t\n</script>' },
45
- { input : 'scriptsrc', output : '<script src="$0" type="text/javascript" language="javascript" charset="utf-8"></script>' },
46
- { input : 'span', output : '<span>$0</span>' },
47
- { input : 'table', output : '<table border="$0" cellspacing="" cellpadding="">\n\t<tr><th></th></tr>\n\t<tr><td></td></tr>\n</table>' },
48
- { input : 'style', output : '<style type="text/css" media="screen">\n\t$0\n</style>' }
49
- ]
50
-
51
- Language.complete = [
52
- { input : '\'',output : '\'$0\'' },
53
- { input : '"', output : '"$0"' },
54
- { input : '(', output : '\($0\)' },
55
- { input : '[', output : '\[$0\]' },
56
- { input : '{', output : '{\n\t$0\n}' }
57
- ]
58
-
59
- Language.shortcuts = []
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
codepress/languages/java.css DELETED
@@ -1,7 +0,0 @@
1
- /*
2
- * CodePress color styles for Java syntax highlighting
3
- */
4
-
5
- b {color:#7F0055;font-weight:bold;font-style:normal;} /* reserved words */
6
- i, i b, i s {color:#3F7F5F;font-weight:bold;} /* comments */
7
- s, s b {color:#2A00FF;font-weight:normal;} /* strings */
 
 
 
 
 
 
 
codepress/languages/java.js DELETED
@@ -1,24 +0,0 @@
1
- /*
2
- * CodePress regular expressions for Java syntax highlighting
3
- */
4
-
5
- // Java
6
- Language.syntax = [
7
- { input : /\"(.*?)(\"|<br>|<\/P>)/g, output : '<s>"$1$2</s>'}, // strings double quote
8
- { input : /\'(.*?)(\'|<br>|<\/P>)/g, output : '<s>\'$1$2</s>'}, // strings single quote
9
- { input : /\b(abstract|continue|for|new|switch|assert|default|goto|package|synchronized|boolean|do|if|private|this|break|double|implements|protected|throw|byte|else|import|public|throws|case|enum|instanceof|return|transient|catch|extends|int|short|try|char|final|interface|static|void|class|finally|long|strictfp|volatile|const|float|native|super|while)\b/g, output : '<b>$1</b>'}, // reserved words
10
- { input : /([^:]|^)\/\/(.*?)(<br|<\/P)/g, output : '$1<i>//$2</i>$3'}, // comments //
11
- { input : /\/\*(.*?)\*\//g, output : '<i>/*$1*/</i>' }// comments /* */
12
- ]
13
-
14
- Language.snippets = []
15
-
16
- Language.complete = [
17
- { input : '\'',output : '\'$0\'' },
18
- { input : '"', output : '"$0"' },
19
- { input : '(', output : '\($0\)' },
20
- { input : '[', output : '\[$0\]' },
21
- { input : '{', output : '{\n\t$0\n}' }
22
- ]
23
-
24
- Language.shortcuts = []
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
codepress/languages/javascript.css DELETED
@@ -1,8 +0,0 @@
1
- /*
2
- * CodePress color styles for JavaScript syntax highlighting
3
- */
4
-
5
- b {color:#7F0055;font-weight:bold;} /* reserved words */
6
- u {color:darkblue;font-weight:bold;} /* special words */
7
- i, i b, i s, i u {color:green;font-weight:normal;} /* comments */
8
- s, s b, s u {color:#2A00FF;font-weight:normal;} /* strings */
 
 
 
 
 
 
 
 
codepress/languages/javascript.js DELETED
@@ -1,30 +0,0 @@
1
- /*
2
- * CodePress regular expressions for JavaScript syntax highlighting
3
- */
4
-
5
- // JavaScript
6
- Language.syntax = [
7
- { input : /\"(.*?)(\"|<br>|<\/P>)/g, output : '<s>"$1$2</s>' }, // strings double quote
8
- { input : /\'(.*?)(\'|<br>|<\/P>)/g, output : '<s>\'$1$2</s>' }, // strings single quote
9
- { input : /\b(break|continue|do|for|new|this|void|case|default|else|function|return|typeof|while|if|label|switch|var|with|catch|boolean|int|try|false|throws|null|true|goto)\b/g, output : '<b>$1</b>' }, // reserved words
10
- { input : /\b(alert|isNaN|parent|Array|parseFloat|parseInt|blur|clearTimeout|prompt|prototype|close|confirm|length|Date|location|Math|document|element|name|self|elements|setTimeout|navigator|status|String|escape|Number|submit|eval|Object|event|onblur|focus|onerror|onfocus|onclick|top|onload|toString|onunload|unescape|open|valueOf|window|onmouseover)\b/g, output : '<u>$1</u>' }, // special words
11
- { input : /([^:]|^)\/\/(.*?)(<br|<\/P)/g, output : '$1<i>//$2</i>$3' }, // comments //
12
- { input : /\/\*(.*?)\*\//g, output : '<i>/*$1*/</i>' } // comments /* */
13
- ]
14
-
15
- Language.snippets = [
16
- { input : 'dw', output : 'document.write(\'$0\');' },
17
- { input : 'getid', output : 'document.getElementById(\'$0\')' },
18
- { input : 'fun', output : 'function $0(){\n\t\n}' },
19
- { input : 'func', output : 'function $0(){\n\t\n}' }
20
- ]
21
-
22
- Language.complete = [
23
- { input : '\'',output : '\'$0\'' },
24
- { input : '"', output : '"$0"' },
25
- { input : '(', output : '\($0\)' },
26
- { input : '[', output : '\[$0\]' },
27
- { input : '{', output : '{\n\t$0\n}' }
28
- ]
29
-
30
- Language.shortcuts = []
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
codepress/languages/perl.css DELETED
@@ -1,11 +0,0 @@
1
- /*
2
- * CodePress color styles for Perl syntax highlighting
3
- * By J. Nick Koston
4
- */
5
-
6
- b {color:#7F0055;font-weight:bold;} /* reserved words */
7
- i, i b, i s, i em, i a, i u {color:gray;font-weight:normal;} /* comments */
8
- s, s b, s a, s em, s u {color:#2A00FF;font-weight:normal;} /* strings */
9
- a {color:#006700;font-weight:bold;} /* variables */
10
- em {color:darkblue;font-weight:bold;} /* functions */
11
- u {font-weight:bold;} /* special chars */
 
 
 
 
 
 
 
 
 
 
 
codepress/languages/perl.js DELETED
@@ -1,27 +0,0 @@
1
- /*
2
- * CodePress regular expressions for Perl syntax highlighting
3
- * By J. Nick Koston
4
- */
5
-
6
- // Perl
7
- Language.syntax = [
8
- { input : /\"(.*?)(\"|<br>|<\/P>)/g, output : '<s>"$1$2</s>' }, // strings double quote
9
- { input : /\'(.*?)(\'|<br>|<\/P>)/g, output : '<s>\'$1$2</s>' }, // strings single quote
10
- { input : /([\$\@\%][\w\.]*)/g, output : '<a>$1</a>' }, // vars
11
- { input : /(sub\s+)([\w\.]*)/g, output : '$1<em>$2</em>' }, // functions
12
- { input : /\b(abs|accept|alarm|atan2|bind|binmode|bless|caller|chdir|chmod|chomp|chop|chown|chr|chroot|close|closedir|connect|continue|cos|crypt|dbmclose|dbmopen|defined|delete|die|do|dump|each|else|elsif|endgrent|endhostent|endnetent|endprotoent|endpwent|eof|eval|exec|exists|exit|fcntl|fileno|find|flock|for|foreach|fork|format|formlinegetc|getgrent|getgrgid|getgrnam|gethostbyaddr|gethostbyname|gethostent|getlogin|getnetbyaddr|getnetbyname|getnetent|getpeername|getpgrp|getppid|getpriority|getprotobyname|getprotobynumber|getprotoent|getpwent|getpwnam|getpwuid|getservbyaddr|getservbyname|getservbyport|getservent|getsockname|getsockopt|glob|gmtime|goto|grep|hex|hostname|if|import|index|int|ioctl|join|keys|kill|last|lc|lcfirst|length|link|listen|LoadExternals|local|localtime|log|lstat|map|mkdir|msgctl|msgget|msgrcv|msgsnd|my|next|no|oct|open|opendir|ordpack|package|pipe|pop|pos|print|printf|push|pwd|qq|quotemeta|qw|rand|read|readdir|readlink|recv|redo|ref|rename|require|reset|return|reverse|rewinddir|rindex|rmdir|scalar|seek|seekdir|select|semctl|semget|semop|send|setgrent|sethostent|setnetent|setpgrp|setpriority|setprotoent|setpwent|setservent|setsockopt|shift|shmctl|shmget|shmread|shmwrite|shutdown|sin|sleep|socket|socketpair|sort|splice|split|sprintf|sqrt|srand|stat|stty|study|sub|substr|symlink|syscall|sysopen|sysread|system|syswritetell|telldir|tie|tied|time|times|tr|truncate|uc|ucfirst|umask|undef|unless|unlink|until|unpack|unshift|untie|use|utime|values|vec|waitpid|wantarray|warn|while|write)\b/g, output : '<b>$1</b>' }, // reserved words
13
- { input : /([\(\){}])/g, output : '<u>$1</u>' }, // special chars
14
- { input : /#(.*?)(<br>|<\/P>)/g, output : '<i>#$1</i>$2' } // comments
15
- ]
16
-
17
- Language.snippets = []
18
-
19
- Language.complete = [
20
- { input : '\'',output : '\'$0\'' },
21
- { input : '"', output : '"$0"' },
22
- { input : '(', output : '\($0\)' },
23
- { input : '[', output : '\[$0\]' },
24
- { input : '{', output : '{\n\t$0\n}' }
25
- ]
26
-
27
- Language.shortcuts = []
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
codepress/languages/php.css DELETED
@@ -1,12 +0,0 @@
1
- /*
2
- * CodePress color styles for PHP syntax highlighting
3
- */
4
-
5
- b {color:#000080;} /* tags */
6
- big, big b, big em, big ins, big s, strong i, strong i b, strong i s, strong i u, strong i a, strong i a u, strong i s u {color:gray;font-weight:normal;} /* comments */
7
- s, s b, strong s u, strong s cite {color:#5656fa;font-weight:normal;} /* attributes and strings */
8
- strong a, strong a u {color:#006700;font-weight:bold;} /* variables */
9
- em {color:#800080;font-style:normal;} /* style */
10
- ins {color:#800000;} /* script */
11
- strong u {color:#7F0055;font-weight:bold;} /* reserved words */
12
- cite, s cite {color:red;font-weight:bold;} /* <?php and ?> */
 
 
 
 
 
 
 
 
 
 
 
 
codepress/languages/php.js DELETED
@@ -1,61 +0,0 @@
1
- /*
2
- * CodePress regular expressions for PHP syntax highlighting
3
- */
4
-
5
- // PHP
6
- Language.syntax = [
7
- { input : /(&lt;[^!\?]*?&gt;)/g, output : '<b>$1</b>' }, // all tags
8
- { input : /(&lt;style.*?&gt;)(.*?)(&lt;\/style&gt;)/g, output : '<em>$1</em><em>$2</em><em>$3</em>' }, // style tags
9
- { input : /(&lt;script.*?&gt;)(.*?)(&lt;\/script&gt;)/g, output : '<ins>$1</ins><ins>$2</ins><ins>$3</ins>' }, // script tags
10
- { input : /\"(.*?)(\"|<br>|<\/P>)/g, output : '<s>"$1$2</s>' }, // strings double quote
11
- { input : /\'(.*?)(\'|<br>|<\/P>)/g, output : '<s>\'$1$2</s>'}, // strings single quote
12
- { input : /(&lt;\?)/g, output : '<strong>$1' }, // <?.*
13
- { input : /(\?&gt;)/g, output : '$1</strong>' }, // .*?>
14
- { input : /(&lt;\?php|&lt;\?=|&lt;\?|\?&gt;)/g, output : '<cite>$1</cite>' }, // php tags
15
- { input : /(\$[\w\.]*)/g, output : '<a>$1</a>' }, // vars
16
- { input : /\b(false|true|and|or|xor|__FILE__|exception|__LINE__|array|as|break|case|class|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|eval|exit|extends|for|foreach|function|global|if|include|include_once|isset|list|new|print|require|require_once|return|static|switch|unset|use|while|__FUNCTION__|__CLASS__|__METHOD__|final|php_user_filter|interface|implements|extends|public|private|protected|abstract|clone|try|catch|throw|this)\b/g, output : '<u>$1</u>' }, // reserved words
17
- { input : /([^:])\/\/(.*?)(<br|<\/P)/g, output : '$1<i>//$2</i>$3' }, // php comments //
18
- { input : /([^:])#(.*?)(<br|<\/P)/g, output : '$1<i>#$2</i>$3' }, // php comments #
19
- { input : /\/\*(.*?)\*\//g, output : '<i>/*$1*/</i>' }, // php comments /* */
20
- { input : /(&lt;!--.*?--&gt.)/g, output : '<big>$1</big>' } // html comments
21
- ]
22
-
23
- Language.snippets = [
24
- { input : 'if', output : 'if($0){\n\t\n}' },
25
- { input : 'ifelse', output : 'if($0){\n\t\n}\nelse{\n\t\n}' },
26
- { input : 'else', output : '}\nelse {\n\t' },
27
- { input : 'elseif', output : '}\nelseif($0) {\n\t' },
28
- { input : 'do', output : 'do{\n\t$0\n}\nwhile();' },
29
- { input : 'inc', output : 'include_once("$0");' },
30
- { input : 'fun', output : 'function $0(){\n\t\n}' },
31
- { input : 'func', output : 'function $0(){\n\t\n}' },
32
- { input : 'while', output : 'while($0){\n\t\n}' },
33
- { input : 'for', output : 'for($0,,){\n\t\n}' },
34
- { input : 'fore', output : 'foreach($0 as ){\n\t\n}' },
35
- { input : 'foreach', output : 'foreach($0 as ){\n\t\n}' },
36
- { input : 'echo', output : 'echo \'$0\';' },
37
- { input : 'switch', output : 'switch($0) {\n\tcase "": break;\n\tdefault: ;\n}' },
38
- { input : 'case', output : 'case "$0" : break;' },
39
- { input : 'ret0', output : 'return false;' },
40
- { input : 'retf', output : 'return false;' },
41
- { input : 'ret1', output : 'return true;' },
42
- { input : 'rett', output : 'return true;' },
43
- { input : 'ret', output : 'return $0;' },
44
- { input : 'def', output : 'define(\'$0\',\'\');' },
45
- { input : '<?', output : 'php\n$0\n?>' }
46
- ]
47
-
48
- Language.complete = [
49
- { input : '\'', output : '\'$0\'' },
50
- { input : '"', output : '"$0"' },
51
- { input : '(', output : '\($0\)' },
52
- { input : '[', output : '\[$0\]' },
53
- { input : '{', output : '{\n\t$0\n}' }
54
- ]
55
-
56
- Language.shortcuts = [
57
- { input : '[space]', output : '&nbsp;' },
58
- { input : '[enter]', output : '<br />' } ,
59
- { input : '[j]', output : 'testing' },
60
- { input : '[7]', output : '&amp;' }
61
- ]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
codepress/languages/ruby.css DELETED
@@ -1,10 +0,0 @@
1
- /*
2
- * CodePress color styles for Ruby syntax highlighting
3
- */
4
-
5
- b {color:#7F0055;font-weight:bold;} /* reserved words */
6
- i, i b, i s, i em, i a, i u {color:gray;font-weight:normal;} /* comments */
7
- s, s b, s a, s em, s u {color:#2A00FF;font-weight:normal;} /* strings */
8
- a {color:#006700;font-weight:bold;} /* variables */
9
- em {color:darkblue;font-weight:bold;} /* functions */
10
- u {font-weight:bold;} /* special chars */
 
 
 
 
 
 
 
 
 
 
codepress/languages/ruby.js DELETED
@@ -1,26 +0,0 @@
1
- /*
2
- * CodePress regular expressions for Perl syntax highlighting
3
- */
4
-
5
- // Ruby
6
- Language.syntax = [
7
- { input : /\"(.*?)(\"|<br>|<\/P>)/g, output : '<s>"$1$2</s>' }, // strings double quote
8
- { input : /\'(.*?)(\'|<br>|<\/P>)/g, output : '<s>\'$1$2</s>' }, // strings single quote
9
- { input : /([\$\@\%]+)([\w\.]*)/g, output : '<a>$1$2</a>' }, // vars
10
- { input : /(def\s+)([\w\.]*)/g, output : '$1<em>$2</em>' }, // functions
11
- { input : /\b(alias|and|BEGIN|begin|break|case|class|def|defined|do|else|elsif|END|end|ensure|false|for|if|in|module|next|nil|not|or|redo|rescue|retry|return|self|super|then|true|undef|unless|until|when|while|yield)\b/g, output : '<b>$1</b>' }, // reserved words
12
- { input : /([\(\){}])/g, output : '<u>$1</u>' }, // special chars
13
- { input : /#(.*?)(<br>|<\/P>)/g, output : '<i>#$1</i>$2' } // comments
14
- ];
15
-
16
- Language.snippets = []
17
-
18
- Language.complete = [
19
- { input : '\'',output : '\'$0\'' },
20
- { input : '"', output : '"$0"' },
21
- { input : '(', output : '\($0\)' },
22
- { input : '[', output : '\[$0\]' },
23
- { input : '{', output : '{\n\t$0\n}' }
24
- ]
25
-
26
- Language.shortcuts = []
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
codepress/languages/sql.css DELETED
@@ -1,10 +0,0 @@
1
- /*
2
- * CodePress color styles for SQL syntax highlighting
3
- * By Merlin Moncure
4
- */
5
-
6
- b {color:#0000FF;font-style:normal;font-weight:bold;} /* reserved words */
7
- u {color:#FF0000;font-style:normal;} /* types */
8
- a {color:#CD6600;font-style:normal;font-weight:bold;} /* commands */
9
- i, i b, i u, i a, i s {color:#A9A9A9;font-weight:normal;font-style:italic;} /* comments */
10
- s, s b, s u, s a, s i {color:#2A00FF;font-weight:normal;} /* strings */
 
 
 
 
 
 
 
 
 
 
codepress/languages/sql.js DELETED
@@ -1,30 +0,0 @@
1
- /*
2
- * CodePress regular expressions for SQL syntax highlighting
3
- * By Merlin Moncure
4
- */
5
-
6
- // SQL
7
- Language.syntax = [
8
- { input : /\'(.*?)(\')/g, output : '<s>\'$1$2</s>' }, // strings single quote
9
- { input : /\b(add|after|aggregate|alias|all|and|as|authorization|between|by|cascade|cache|cache|called|case|check|column|comment|constraint|createdb|createuser|cycle|database|default|deferrable|deferred|diagnostics|distinct|domain|each|else|elseif|elsif|encrypted|except|exception|for|foreign|from|from|full|function|get|group|having|if|immediate|immutable|in|increment|initially|increment|index|inherits|inner|input|intersect|into|invoker|is|join|key|language|left|like|limit|local|loop|match|maxvalue|minvalue|natural|nextval|no|nocreatedb|nocreateuser|not|null|of|offset|oids|on|only|operator|or|order|outer|owner|partial|password|perform|plpgsql|primary|record|references|replace|restrict|return|returns|right|row|rule|schema|security|sequence|session|sql|stable|statistics|table|temp|temporary|then|time|to|transaction|trigger|type|unencrypted|union|unique|user|using|valid|value|values|view|volatile|when|where|with|without|zone)\b/gi, output : '<b>$1</b>' }, // reserved words
10
- { input : /\b(bigint|bigserial|bit|boolean|box|bytea|char|character|cidr|circle|date|decimal|double|float4|float8|inet|int2|int4|int8|integer|interval|line|lseg|macaddr|money|numeric|oid|path|point|polygon|precision|real|refcursor|serial|serial4|serial8|smallint|text|timestamp|varbit|varchar)\b/gi, output : '<u>$1</u>' }, // types
11
- { input : /\b(abort|alter|analyze|begin|checkpoint|close|cluster|comment|commit|copy|create|deallocate|declare|delete|drop|end|execute|explain|fetch|grant|insert|listen|load|lock|move|notify|prepare|reindex|reset|restart|revoke|rollback|select|set|show|start|truncate|unlisten|update)\b/gi, output : '<a>$1</a>' }, // commands
12
- { input : /([^:]|^)\-\-(.*?)(<br|<\/P)/g, output: '$1<i>--$2</i>$3' } // comments //
13
- ]
14
-
15
- Language.snippets = [
16
- { input : 'select', output : 'select $0 from where ' }
17
- ]
18
-
19
- Language.complete = [
20
- { input : '\'', output : '\'$0\'' },
21
- { input : '"', output : '"$0"' },
22
- { input : '(', output : '\($0\)' },
23
- { input : '[', output : '\[$0\]' },
24
- { input : '{', output : '{\n\t$0\n}' }
25
- ]
26
-
27
- Language.shortcuts = []
28
-
29
-
30
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
codepress/languages/text.css DELETED
@@ -1,5 +0,0 @@
1
- /*
2
- * CodePress color styles for Text syntax highlighting
3
- */
4
-
5
- /* do nothing as expected */
 
 
 
 
 
codepress/languages/text.js DELETED
@@ -1,9 +0,0 @@
1
- /*
2
- * CodePress regular expressions for Text syntax highlighting
3
- */
4
-
5
- // plain text
6
- Language.syntax = []
7
- Language.snippets = []
8
- Language.complete = []
9
- Language.shortcuts = []
 
 
 
 
 
 
 
 
 
codepress/languages/vbscript.css DELETED
@@ -1,71 +0,0 @@
1
- /*
2
- * CodePress color styles for ASP-VB syntax highlighting
3
- * By Martin D. Kirk
4
- */
5
-
6
- /* tags */
7
- b {
8
- color:#000080;
9
- }
10
- /* comments */
11
- big, big b, big em, big ins, big s, strong i, strong i b, strong i s, strong i u, strong i a, strong i a u, strong i s u {
12
- color:gray;
13
- font-weight:normal;
14
- }
15
- /* ASP comments */
16
- strong dfn, strong dfn a,strong dfn var, strong dfn a u, strong dfn u{
17
- color:gray;
18
- font-weight:normal;
19
- }
20
- /* attributes */
21
- s, s b, span s u, span s cite, strong span s {
22
- color:#5656fa ;
23
- font-weight:normal;
24
- }
25
- /* strings */
26
- strong s,strong s b, strong s u, strong s cite {
27
- color:#009900;
28
- font-weight:normal;
29
- }
30
- strong ins{
31
- color:#000000;
32
- font-weight:bold;
33
- }
34
- /* Syntax */
35
- strong a, strong a u {
36
- color:#0000FF;
37
- font-weight:;
38
- }
39
- /* Native Keywords */
40
- strong u {
41
- color:#990099;
42
- font-weight:bold;
43
- }
44
- /* Numbers */
45
- strong var{
46
- color:#FF0000;
47
- }
48
- /* ASP Language */
49
- span{
50
- color:#990000;
51
- font-weight:bold;
52
- }
53
- strong i,strong a i, strong u i {
54
- color:#009999;
55
- }
56
- /* style */
57
- em {
58
- color:#800080;
59
- font-style:normal;
60
- }
61
- /* script */
62
- ins {
63
- color:#800000;
64
- font-weight:bold;
65
- }
66
-
67
- /* <?php and ?> */
68
- cite, s cite {
69
- color:red;
70
- font-weight:bold;
71
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
codepress/languages/vbscript.js DELETED
@@ -1,117 +0,0 @@
1
- /*
2
- * CodePress regular expressions for ASP-vbscript syntax highlighting
3
- */
4
-
5
- // ASP VBScript
6
- Language.syntax = [
7
- // all tags
8
- { input : /(&lt;[^!%|!%@]*?&gt;)/g, output : '<b>$1</b>' },
9
- // style tags
10
- { input : /(&lt;style.*?&gt;)(.*?)(&lt;\/style&gt;)/g, output : '<em>$1</em><em>$2</em><em>$3</em>' },
11
- // script tags
12
- { input : /(&lt;script.*?&gt;)(.*?)(&lt;\/script&gt;)/g, output : '<ins>$1</ins><ins>$2</ins><ins>$3</ins>' },
13
- // strings "" and attributes
14
- { input : /\"(.*?)(\"|<br>|<\/P>)/g, output : '<s>"$1$2</s>' },
15
- // ASP Comment
16
- { input : /\'(.*?)(\'|<br>|<\/P>)/g, output : '<dfn>\'$1$2</dfn>'},
17
- // <%.*
18
- { input : /(&lt;%)/g, output : '<strong>$1' },
19
- // .*%>
20
- { input : /(%&gt;)/g, output : '$1</strong>' },
21
- // <%@...%>
22
- { input : /(&lt;%@)(.+?)(%&gt;)/gi, output : '$1<span>$2</span>$3' },
23
- //Numbers
24
- { input : /\b([\d]+)\b/g, output : '<var>$1</var>' },
25
- // Reserved Words 1 (Blue)
26
- { input : /\b(And|As|ByRef|ByVal|Call|Case|Class|Const|Dim|Do|Each|Else|ElseIf|Empty|End|Eqv|Exit|False|For|Function)\b/gi, output : '<a>$1</a>' },
27
- { input : /\b(Get|GoTo|If|Imp|In|Is|Let|Loop|Me|Mod|Enum|New|Next|Not|Nothing|Null|On|Option|Or|Private|Public|ReDim|Rem)\b/gi, output : '<a>$1</a>' },
28
- { input : /\b(Resume|Select|Set|Stop|Sub|Then|To|True|Until|Wend|While|With|Xor|Execute|Randomize|Erase|ExecuteGlobal|Explicit|step)\b/gi, output : '<a>$1</a>' },
29
- // Reserved Words 2 (Purple)
30
- { input : /\b(Abandon|Abs|AbsolutePage|AbsolutePosition|ActiveCommand|ActiveConnection|ActualSize|AddHeader|AddNew|AppendChunk)\b/gi, output : '<u>$1</u>' },
31
- { input : /\b(AppendToLog|Application|Array|Asc|Atn|Attributes|BeginTrans|BinaryRead|BinaryWrite|BOF|Bookmark|Boolean|Buffer|Byte)\b/gi, output : '<u>$1</u>' },
32
- { input : /\b(CacheControl|CacheSize|Cancel|CancelBatch|CancelUpdate|CBool|CByte|CCur|CDate|CDbl|Charset|Chr|CInt|Clear)\b/gi, output : '<u>$1</u>' },
33
- { input : /\b(ClientCertificate|CLng|Clone|Close|CodePage|CommandText|CommandType|CommandTimeout|CommitTrans|CompareBookmarks|ConnectionString|ConnectionTimeout)\b/gi, output : '<u>$1</u>' },
34
- { input : /\b(Contents|ContentType|Cookies|Cos|CreateObject|CreateParameter|CSng|CStr|CursorLocation|CursorType|DataMember|DataSource|Date|DateAdd|DateDiff)\b/gi, output : '<u>$1</u>' },
35
- { input : /\b(DatePart|DateSerial|DateValue|Day|DefaultDatabase|DefinedSize|Delete|Description|Double|EditMode|Eof|EOF|err|Error)\b/gi, output : '<u>$1</u>' },
36
- { input : /\b(Exp|Expires|ExpiresAbsolute|Filter|Find|Fix|Flush|Form|FormatCurrency|FormatDateTime|FormatNumber|FormatPercent)\b/gi, output : '<u>$1</u>' },
37
- { input : /\b(GetChunk|GetLastError|GetRows|GetString|Global|HelpContext|HelpFile|Hex|Hour|HTMLEncode|IgnoreCase|Index|InStr|InStrRev)\b/gi, output : '<u>$1</u>' },
38
- { input : /\b(Int|Integer|IsArray|IsClientConnected|IsDate|IsolationLevel|Join|LBound|LCase|LCID|Left|Len|Lock|LockType|Log|Long|LTrim)\b/gi, output : '<u>$1</u>' },
39
- { input : /\b(MapPath|MarshalOptions|MaxRecords|Mid|Minute|Mode|Month|MonthName|Move|MoveFirst|MoveLast|MoveNext|MovePrevious|Name|NextRecordset)\b/gi, output : '<u>$1</u>' },
40
- { input : /\b(Now|Number|NumericScale|ObjectContext|Oct|Open|OpenSchema|OriginalValue|PageCount|PageSize|Pattern|PICS|Precision|Prepared|Property)\b/gi, output : '<u>$1</u>' },
41
- { input : /\b(Provider|QueryString|RecordCount|Redirect|RegExp|Remove|RemoveAll|Replace|Requery|Request|Response|Resync|Right|Rnd)\b/gi, output : '<u>$1</u>' },
42
- { input : /\b(RollbackTrans|RTrim|Save|ScriptTimeout|Second|Seek|Server|ServerVariables|Session|SessionID|SetAbort|SetComplete|Sgn)\b/gi, output : '<u>$1</u>' },
43
- { input : /\b(Sin|Size|Sort|Source|Space|Split|Sqr|State|StaticObjects|Status|StayInSync|StrComp|String|StrReverse|Supports|Tan|Time)\b/gi, output : '<u>$1</u>' },
44
- { input : /\b(Timeout|Timer|TimeSerial|TimeValue|TotalBytes|Transfer|Trim|Type|Type|UBound|UCase|UnderlyingValue|UnLock|Update|UpdateBatch)\b/gi, output : '<u>$1</u>' },
45
- { input : /\b(URLEncode|Value|Value|Version|Weekday|WeekdayName|Write|Year)\b/gi, output : '<u>$1</u>' },
46
- // Reserved Words 3 (Turquis)
47
- { input : /\b(vbBlack|vbRed|vbGreen|vbYellow|vbBlue|vbMagenta|vbCyan|vbWhite|vbBinaryCompare|vbTextCompare)\b/gi, output : '<i>$1</i>' },
48
- { input : /\b(vbSunday|vbMonday|vbTuesday|vbWednesday|vbThursday|vbFriday|vbSaturday|vbUseSystemDayOfWeek)\b/gi, output : '<i>$1</i>' },
49
- { input : /\b(vbFirstJan1|vbFirstFourDays|vbFirstFullWeek|vbGeneralDate|vbLongDate|vbShortDate|vbLongTime|vbShortTime)\b/gi, output : '<i>$1</i>' },
50
- { input : /\b(vbObjectError|vbCr|VbCrLf|vbFormFeed|vbLf|vbNewLine|vbNullChar|vbNullString|vbTab|vbVerticalTab|vbUseDefault|vbTrue)\b/gi, output : '<i>$1</i>' },
51
- { input : /\b(vbFalse|vbEmpty|vbNull|vbInteger|vbLong|vbSingle|vbDouble|vbCurrency|vbDate|vbString|vbObject|vbError|vbBoolean|vbVariant)\b/gi, output : '<i>$1</i>' },
52
- { input : /\b(vbDataObject|vbDecimal|vbByte|vbArray)\b/gi, output : '<i>$1</i>' },
53
- // html comments
54
- { input : /(&lt;!--.*?--&gt.)/g, output : '<big>$1</big>' }
55
- ]
56
-
57
- Language.Functions = [
58
- // Output at index 0, must be the desired tagname surrounding a $1
59
- // Name is the index from the regex that marks the functionname
60
- {input : /(function|sub)([ ]*?)(\w+)([ ]*?\()/gi , output : '<ins>$1</ins>', name : '$3'}
61
- ]
62
-
63
- Language.snippets = [
64
- //Conditional
65
- { input : 'if', output : 'If $0 Then\n\t\nEnd If' },
66
- { input : 'ifelse', output : 'If $0 Then\n\t\n\nElse\n\t\nEnd If' },
67
- { input : 'case', output : 'Select Case $0\n\tCase ?\n\tCase Else\nEnd Select'},
68
- //Response
69
- { input : 'rw', output : 'Response.Write( $0 )' },
70
- { input : 'resc', output : 'Response.Cookies( $0 )' },
71
- { input : 'resb', output : 'Response.Buffer'},
72
- { input : 'resflu', output : 'Response.Flush()'},
73
- { input : 'resend', output : 'Response.End'},
74
- //Request
75
- { input : 'reqc', output : 'Request.Cookies( $0 )' },
76
- { input : 'rq', output : 'Request.Querystring("$0")' },
77
- { input : 'rf', output : 'Request.Form("$0")' },
78
- //FSO
79
- { input : 'fso', output : 'Set fso = Server.CreateObject("Scripting.FileSystemObject")\n$0' },
80
- { input : 'setfo', output : 'Set fo = fso.getFolder($0)' },
81
- { input : 'setfi', output : 'Set fi = fso.getFile($0)' },
82
- { input : 'twr', output : 'Set f = fso.CreateTextFile($0,true)\'overwrite\nf.WriteLine()\nf.Close'},
83
- { input : 'tre', output : 'Set f = fso.OpenTextFile($0, 1)\nf.ReadAll\nf.Close'},
84
- //Server
85
- { input : 'mapp', output : 'Server.Mappath($0)' },
86
- //Loops
87
- { input : 'foreach', output : 'For Each $0 in ?\n\t\nNext' },
88
- { input : 'for', output : 'For $0 to ? step ?\n\t\nNext' },
89
- { input : 'do', output : 'Do While($0)\n\t\nLoop' },
90
- { input : 'untilrs', output : 'do until rs.eof\n\t\nrs.movenext\nloop' },
91
- //ADO
92
- { input : 'adorec', output : 'Set rs = Server.CreateObject("ADODB.Recordset")' },
93
- { input : 'adocon', output : 'Set Conn = Server.CreateObject("ADODB.Connection")' },
94
- { input : 'adostr', output : 'Set oStr = Server.CreateObject("ADODB.Stream")' },
95
- //Http Request
96
- { input : 'xmlhttp', output : 'Set xmlHttp = Server.CreateObject("Microsoft.XMLHTTP")\nxmlHttp.open("GET", $0, false)\nxmlHttp.send()\n?=xmlHttp.responseText' },
97
- { input : 'xmldoc', output : 'Set xmldoc = Server.CreateObject("Microsoft.XMLDOM")\nxmldoc.async=false\nxmldoc.load(request)'},
98
- //Functions
99
- { input : 'func', output : 'Function $0()\n\t\n\nEnd Function'},
100
- { input : 'sub', output : 'Sub $0()\n\t\nEnd Sub'}
101
-
102
- ]
103
-
104
- Language.complete = [
105
- //{ input : '\'', output : '\'$0\'' },
106
- { input : '"', output : '"$0"' },
107
- { input : '(', output : '\($0\)' },
108
- { input : '[', output : '\[$0\]' },
109
- { input : '{', output : '{\n\t$0\n}' }
110
- ]
111
-
112
- Language.shortcuts = [
113
- { input : '[space]', output : '&nbsp;' },
114
- { input : '[enter]', output : '<br />' } ,
115
- { input : '[j]', output : 'testing' },
116
- { input : '[7]', output : '&amp;' }
117
- ]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
codepress/languages/xsl.css DELETED
@@ -1,15 +0,0 @@
1
- /*
2
- * CodePress color styles for HTML syntax highlighting
3
- * By RJ Bruneel
4
- */
5
-
6
- b {color:#000080;} /* tags */
7
- ins, ins b, ins s, ins em {color:gray;} /* comments */
8
- s, s b {color:#7777e4;} /* attribute values */
9
- a {color:#E67300;} /* links */
10
- u {color:#CC66CC;} /* forms */
11
- big {color:#db0000;} /* images */
12
- em, em b {color:#800080;} /* style */
13
- strong {color:#800000;} /* script */
14
- tt i {color:darkblue;font-weight:bold;} /* script reserved words */
15
- xsl {color:green;} /* xsl */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
codepress/languages/xsl.js DELETED
@@ -1,103 +0,0 @@
1
- /*
2
- * CodePress regular expressions for XSL syntax highlighting
3
- * By RJ Bruneel
4
- */
5
-
6
- Language.syntax = [ // XSL
7
- {
8
- input : /(&lt;[^!]*?&gt;)/g,
9
- output : '<b>$1</b>' // all tags
10
- },{
11
- input : /(&lt;a.*?&gt;|&lt;\/a&gt;)/g,
12
- output : '<a>$1</a>' // links
13
- },{
14
- input : /(&lt;img .*?&gt;)/g,
15
- output : '<big>$1</big>' // images
16
- },{
17
- input : /(&lt;\/?(button|textarea|form|input|select|option|label).*?&gt;)/g,
18
- output : '<u>$1</u>' // forms
19
- },{
20
- input : /(&lt;style.*?&gt;)(.*?)(&lt;\/style&gt;)/g,
21
- output : '<em>$1</em><em>$2</em><em>$3</em>' // style tags
22
- },{
23
- input : /(&lt;script.*?&gt;)(.*?)(&lt;\/script&gt;)/g,
24
- output : '<strong>$1</strong><tt>$2</tt><strong>$3</strong>' // script tags
25
- },{
26
- input : /(&lt;xsl.*?&gt;|&lt;\/xsl.*?&gt;)/g,
27
- output : '<xsl>$1</xsl>' // xsl
28
- },{
29
- input : /=(".*?")/g,
30
- output : '=<s>$1</s>' // atributes double quote
31
- },{
32
- input : /=('.*?')/g,
33
- output : '=<s>$1</s>' // atributes single quote
34
- },{
35
- input : /(&lt;!--.*?--&gt.)/g,
36
- output : '<ins>$1</ins>' // comments
37
- },{
38
- input : /\b(alert|window|document|break|continue|do|for|new|this|void|case|default|else|function|return|typeof|while|if|label|switch|var|with|catch|boolean|int|try|false|throws|null|true|goto)\b/g,
39
- output : '<i>$1</i>' // script reserved words
40
- }
41
- ];
42
-
43
- Language.snippets = [
44
- {input : 'aref', output : '<a href="$0"></a>' },
45
- {input : 'h1', output : '<h1>$0</h1>' },
46
- {input : 'h2', output : '<h2>$0</h2>' },
47
- {input : 'h3', output : '<h3>$0</h3>' },
48
- {input : 'h4', output : '<h4>$0</h4>' },
49
- {input : 'h5', output : '<h5>$0</h5>' },
50
- {input : 'h6', output : '<h6>$0</h6>' },
51
- {input : 'html', output : '<html>\n\t$0\n</html>' },
52
- {input : 'head', output : '<head>\n\t<meta http-equiv="content-type" content="text/html; charset=utf-8" />\n\t<title>$0</title>\n\t\n</head>' },
53
- {input : 'img', output : '<img src="$0" width="" height="" alt="" border="0" />' },
54
- {input : 'input', output : '<input name="$0" id="" type="" value="" />' },
55
- {input : 'label', output : '<label for="$0"></label>' },
56
- {input : 'legend', output : '<legend>\n\t$0\n</legend>' },
57
- {input : 'link', output : '<link rel="stylesheet" href="$0" type="text/css" media="screen" charset="utf-8" />' },
58
- {input : 'base', output : '<base href="$0" />' },
59
- {input : 'body', output : '<body>\n\t$0\n</body>' },
60
- {input : 'css', output : '<link rel="stylesheet" href="$0" type="text/css" media="screen" charset="utf-8" />' },
61
- {input : 'div', output : '<div>\n\t$0\n</div>' },
62
- {input : 'divid', output : '<div id="$0">\n\t\n</div>' },
63
- {input : 'dl', output : '<dl>\n\t<dt>\n\t\t$0\n\t</dt>\n\t<dd></dd>\n</dl>' },
64
- {input : 'fieldset', output : '<fieldset>\n\t$0\n</fieldset>' },
65
- {input : 'form', output : '<form action="$0" method="" name="">\n\t\n</form>' },
66
- {input : 'meta', output : '<meta name="$0" content="" />' },
67
- {input : 'p', output : '<p>$0</p>' },
68
- {input : 'b', output : '<b>$0</b>' },
69
- {input : 'li', output : '<li>$0</li>' },
70
- {input : 'ul', output : '<ul>$0</ul>' },
71
- {input : 'ol', output : '<ol>$0</ol>' },
72
- {input : 'strong', output : '<strong>$0</strong>' },
73
- {input : 'br', output : '<br />' },
74
- {input : 'script', output : '<script type="text/javascript" language="javascript" charset="utf-8">\n\t$0\t\n</script>' },
75
- {input : 'scriptsrc', output : '<script src="$0" type="text/javascript" language="javascript" charset="utf-8"></script>' },
76
- {input : 'span', output : '<span>$0</span>' },
77
- {input : 'table', output : '<table border="$0" cellspacing="" cellpadding="">\n\t<tr><th></th></tr>\n\t<tr><td></td></tr>\n</table>' },
78
- {input : 'style', output : '<style type="text/css" media="screen">\n\t$0\n</style>' },
79
- {input : 'xsl:stylesheet', output : '<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">' },
80
- {input : 'xsl:template', output : '<xsl:template>$0</xsl:template>' },
81
- {input : 'xsl:for-each', output : '<xsl:for-each select="$0"></xsl:for-each>' },
82
- {input : 'xsl:choose', output : '<xsl:choose>$0<\xsl:choose>' },
83
- {input : 'xsl:param', output : '<xsl:param name="$0" />' },
84
- {input : 'xsl:variable', output : '<xsl:variable name="$0"></xsl:variable>' },
85
- {input : 'xsl:if', output : '<xsl:if test="$0"></xsl:if>' },
86
- {input : 'xsl:when', output : '<xsl:when test="$0"></xsl:when>' },
87
- {input : 'xsl:otherwise', output : '<xsl:otherwise>$0</xsl:otherwise>' },
88
- {input : 'xsl:attribute', output : '<xsl:attribute name="$0"></xsl:attribute>' },
89
- {input : 'xsl:value-of', output : '<xsl:value-of select="$0"/>' },
90
- {input : 'xsl:with-param', output : '<xsl:with-param name="$0" select="" />' },
91
- {input : 'xsl:call-template', output : '<xsl:call-template name="$0">' }
92
-
93
- ];
94
-
95
- Language.complete = [ // Auto complete only for 1 character
96
- {input : '\'',output : '\'$0\'' },
97
- {input : '"', output : '"$0"' },
98
- {input : '(', output : '\($0\)' },
99
- {input : '[', output : '\[$0\]' },
100
- {input : '{', output : '{\n\t$0\n}' }
101
- ];
102
-
103
- Language.shortcuts = [];
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
editarea/change_log.txt ADDED
@@ -0,0 +1,293 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ **** v 0.8.2 ****
2
+ - Change back to remove the speed optimization for highlight process introduced in 0.8.1 that has too much bugs
3
+ - Syntax name are no more stored in language files but in syntax files. Thoses display names will be used only if the compressor tools is used, otherwise syntax code is displayed
4
+ - Activate word-wrap feature for opera > 9.6
5
+ - Bug fix: Selection wasn't corretcly remembered between file tabs
6
+ - Bug fix: [2886499] Page up and page Down action are no more executed if Alt touch is pressed
7
+ - Bug fix: [2887118] UTF-8 encoded URLs return wrong base URL
8
+ - Bug fix: [2851936] Unresolved reference to isIE in elements_functions.js
9
+ - Bug fix: [2886836] get_IE_selection bug when closed...
10
+ - bug fix: JavaScript error when switching to fullscreen (https://sourceforge.net/projects/editarea/forums/forum/556921/topic/3388824)
11
+ - Bug fix (but not applicable due to change back) : [2854519, 2854642, 2792217, 2834579 ] Desynchronisation occcured with <, > and & characters
12
+
13
+ **** v 0.8.1.1 ****
14
+ - Fix bug of frequent syntax desynchronisation when the first character of the textarea was highlighted
15
+ - In unload now check that parent.editareaLoader still exists before calling it
16
+ - Now consider that gecko and webkit based browser are valid browsers (but I won't test them all)
17
+
18
+ **** v 0.8.1 ****
19
+ - Improved speed of text highlighting process for huge file. Now we try to only insert or delete the changed caracters inside DOM text node instead of refreshing the whole area. (3 time faster in firefox)
20
+ - Greatly improved speed of line-height management in word-wrap context
21
+ - Add java syntax (thanks to Dawson Goodell)
22
+ - Use faster regexp for matching quoted strings
23
+ - Bug fix: if a highlighted quote or comment string contains cariage return, editing text on one of the lines was causin a highlight desynchronisation
24
+ - Bug fix: text war blur on Safari 3.2 (thanks to spellcoder)
25
+ - Bug fix: there had several mistake with non-monospace font (thanks to spellcoder)
26
+ - Bug fix: if show_line_colors was disabled and word wrap enable, highlighted text wasn't refreshed if a new line appears
27
+ - Bug fix: in multi file edition, closing the last tab was throwing an error in Firefox and let the content of the textarea displayed
28
+ - Browser bug detection: when using non-monospace font Firefox will sometime have strange behavior on text-width (the highlighted text-width in the background may change fron textarea one and simply can change after beeing updated); look likes a browser rendering bug
29
+
30
+ **** v 0.8 ****
31
+ - Word-wrap is now supported (except for opera...). The new init() option is 'word_wrap' to set to 'true' (default is false). A new button appears in the default toolbar (button_code: 'word_wrap' )
32
+ - We can now clearly see the selected text
33
+ - Add Internet explorer 8 support (but sadly I must use IE7 emulate mode in iframe due to a bug with tabulation width not beeing resized in IE's textarea)
34
+ - Add Safari 4 support
35
+ - Add Chrome 2 support
36
+ - Better support of Opera 9.6
37
+ - Add Simplified Chinese translation "zh" (thanks to Abentian)
38
+ - Add Bulgarian translation "bg" (thanks to Valentin Hristov)
39
+ - Rename internal function $() by _$()
40
+ - Delete EditArea.add_event() method (duplicate af editAreaLoader.add_event() method)
41
+ - Do some code cleanup-up
42
+ - Bug fix: highlight optimisation process was not working under IE (don't known how long it remain broken but must be since a long time)
43
+ - Bug fix: EditArea.update_size sometimes uses undefined variable (fix this possibility and cleanup events)
44
+ - Bug fix: Template.html was not valid XHTML
45
+ - Bug fix: The checked attribute of the toogle button was not defined in xhtml syntax
46
+ - Bug fix: If the editArea was loaded on a page related to a domain which was itself an iframe comming from another domain a JS error was thrown on load
47
+ - Bug fix: When EditArea is used to replace a textarea which has style="visibility:hidden;", switching off EditArea would throw an error under IE
48
+
49
+ **** v 0.7.3 ****
50
+ - Add Finnish transaltion (thanks to Janne Mäntyharju)
51
+ - Add 'cursor_position' init() option for defining where the cursor should be when the editor is show on the first time ('auto' or 'begin'). This was like 'auto' before now this is like 'begin' by default
52
+ - better add_style method (faster than old one) thanks to Spellcoder
53
+ - Bug fix: fix bug with mootools 1.2
54
+ - Bug fix: if page had no stylesheets when editarea load, it would generate an error
55
+
56
+ **** v 0.7.2.3 ****
57
+ - it's now released under both LGPL, Apache, BSD license (you can use the one you prefer)
58
+ - add support for bonEcho browser
59
+
60
+ **** v 0.7.2.2 ****
61
+ - Fix bug regression introduced in 0.7.2 that make IE7 not working
62
+ - add Esperento translation (thanks to Olivier)
63
+ - add Coldfusion syntax (thanks to Max Leynov)
64
+
65
+ **** v 0.7.2.1 ****
66
+ - fix bug for firefox rendering of highlighted lines that doesn't begin with a tab
67
+ - support for browser with grandParadisio agent instead of firefox
68
+
69
+ **** v 0.7.2 ****
70
+ - add Chrome support
71
+ - add show_line_colors init() option for enabling syntax color display and update on the currently edited line (disable the blue bar) (default to false)
72
+ - Add Perl syntax definition file (thanks to Christoph Pinkel)
73
+ - Bug fix: there allways was an horizontal scrollbar even if the content fit in the area.
74
+
75
+ **** v 0.7.1.3 ****
76
+ - Fix a bug introduced in Firefox 3.0.1 => the browser is no more able to render properly "pre" element with left padding...
77
+ - Add Robots.txt (thanks to Pavle Ggardijan) and T-SQL syntax definition files (thanks to Miladin Joksic)
78
+
79
+ **** v 0.7.1.2 ****
80
+ - Fix a bug on the full screen mode (regression added on 0.7.1.1)
81
+
82
+ **** v 0.7.1.1 ****
83
+ - Firefox 3 RC1 compatibility
84
+ - Code size reduction: 120Ko => 107Ko for edit_area_full.js
85
+
86
+ **** v 0.7.1 ****
87
+ - released under both LGPL and Apache license (you can use the one you prefer)
88
+ - it's now possible to get a readonly mode:
89
+ * new EditAreaLoader.init()'s option: "is_editable": true/false
90
+ * Possibility to switch edition mode by using the execCommand function: editAreaLoader.execCommand('editor_id', 'set_editable', !editAreaLoader.execCommand('editor_id', 'is_editable'));
91
+ - Added Ruby syntax (thanks to Patrice De Saint Steban)
92
+ - Fix a bug where the textarea lose the focus under firefox for Mac
93
+ - Minor other bug fixes
94
+
95
+ **** v 0.7.0.2 ****
96
+ - Fixed a bug with translation files containing non-latin caracters. Translations files must be in UTF-8.
97
+ - Added Czech, Macedionian and Russian translations
98
+
99
+
100
+ **** v 0.7.0.1 ****
101
+ - in multiple file mode, it's now possible to cancel the 'EA_file_close_callback' function. if the callback return false, the edited file won't be closed
102
+ - bug fix: if no syntax was defined in the main init() function in multifile mode, the first time the text was not highlighted
103
+
104
+
105
+ **** v 0.7 ****
106
+ - it's now possible to edit multiple files into one instance of EditArea. This (sponsored by Jupiter) feature comes with:
107
+ * new EditAreaLoader.init()'s option: "is_multi_files": true
108
+ * new editAreaLoader's functions: editAreaLoader.getCurrentFile(editArea_id), editAreaLoader.getFile(editArea_id, file_id), editAreaLoader.getAllFiles(editArea_id), editAreaLoader.openFile(editArea_id, file_infos), editAreaLoader.closeFile(editArea_id, file_id), editAreaLoader.setFileEditedMode(editArea_id, file_id, edited_mode)
109
+ * new callabacks: EA_file_switch_on_callback, EA_file_switch_off_callback, EA_file_close_callback
110
+ - look likes Safari 3 is working with EditArea
111
+ - add spanish translation (thanks Garito)
112
+ - add slovak translation (thanks Gabriel Schwardy)
113
+ - add SQL syntax definition file (thanks to Philippe Lewicki)
114
+ - the syntax selection plugin has been integrated to editarea core and load only needed files (the plugins was loading all the possible syntax files...). Toolbar button name: "syntax_selection", comma separated available syntax list: "syntax_selection_allow"
115
+ - add a 'compression' option in edit_area_compressor.php that allow to set where the code should be compressed or just packed (simple packed mode usefull for debugging)
116
+ - the yellow area that indicate the current edited line is now blue
117
+ - bug fix: parenthesis matching was not working correctly if there where an "<" between parenthesis
118
+
119
+ **** v 0.6.7 ****
120
+ - add a new plugin that allow the user to change the syntax definition in use. It adds a select in the toolbar. - plugin name to add to the plugin list: "syntax_selection". - plugin name to add to the toolbar list: "syntax_selection". - possible parameter to add to EditAreaLoader.init():
121
+ "syntax_selection_allow": (String) define a list separated by "," of possible language syntax to use (eg: "php,js,python,html")
122
+ - add Croatian translation (HR) (thanks to Ivan Vucica and Davor Cihlar)
123
+ - add BASIC, Brainf*ck, C, C++ and Pascal syntax definition files (thanks to Ivan Vucica and Davor Cihlar)
124
+ - add Iceweasel as a known working navigator (its a clone of Firefox)
125
+ - improved the php syntax by highlighting the variables ($...)
126
+ - reactivate gzip compression for IE7 (was desactivate for IE as it sometimes failed). (Let me know if you see that the load fails under IE7)
127
+ - pressing "enter" while being in the search box now perform a search.
128
+ - add Camino as a supported browser
129
+ - bug fix: when clicking between the bottom toolbar and the textarea (when there is only few lines of text), the textarea didn't get the focus
130
+ - bug fix: under IE the delete_instance() method was throwing an error
131
+ - bug fix: if the textarea to convert in an EditArea was in a frame (or iframe) getting back from fullscreen to normal display was not restoring the correct settings to the frame containing the textarea.
132
+ - bug fix (at least I hope): in IE if the textarea to convert in an EditArea was in a frame, resizing the frame was not correctly resizing the editor if it was in fullscreen.
133
+ - bug fix: in Opera the selectionned line was not rendered correctly if containing \t caracters (bug introduced in one of the latest version...)
134
+ - bug fix: "altgr+f" was openning the searchbox and avoid to write "[" and "]" in croatian keyboards.
135
+ - bug fix: in Firefox "ctrl+tab" was inserting a tabulation while switching active tab (window)
136
+
137
+ Note: v 0.6.5 and v 0.6.6 have been private release (change log is regrouped in v 0.6.7)
138
+
139
+ **** v 0.6.4 ****
140
+ - add replace_tab_by_spaces init() option which allow to replace all tabulation caracters typped in the text by a given number of spaces
141
+ - add min_width and min_height init() option for the minimum size in pixel for the editor
142
+ - add dutch translation files (NL) (thanks to Bart Bosma)
143
+ - pressing Shift+Tab when no text is selected now delete the tabulation before the cursor (if a tabulation is present directly behing the cursor)
144
+ - improve Python syntax (thanks to Andre Roberge)
145
+ - bug fix: the fullpage plugin was not working correctly when the Editor was placed inside several divs that have positioning of there own
146
+ - bug fix: one regexp used in edit_area_compressor.php was not compatible with latest PCRE version
147
+
148
+ - fix the my_load and my_save functions of the 'exemple_full.html' page
149
+
150
+ **** v 0.6.3.1 ****
151
+ - regression: restore monospace as default font
152
+ - add little improvements to the PHP compressor: allow to win 7 Ko on edit_area_full.js
153
+ - add the version number in the about popup
154
+ - bug fix: fix a regexp that was not compliant with newer version of PCRE
155
+ - bug fix: fix some bug with the fullscreen mode (still not perfect in Opera)
156
+ - bug fix: the close button of the help popup was not correctly translated
157
+ - bug fix: when deleting an instance of editArea toggle_off was called even if the editArea was not displayed
158
+
159
+
160
+ **** v 0.6.3 ****
161
+ - allow to use non monospace font using the font_family init option. Firefox get smaller tabulation with non monospace fonts. IE doesn't change the tabulation width and Opera doesn't take this option into account... new default font-familly: 'verdana,monospace'
162
+ - add fullscreen option in the toolbar and as an init() option.
163
+ - if the based textarea has a width (or height) in '%', EditArea will get the same '%' width (or height), allowing EditArea to be resized in the same time than the window.
164
+ - add many callback possibility: submit_callback, EA_load_callback, EA_unload_callback, EA_init_callback, EA_toggle_on_callback, EA_toggle_off_callback, EA_delete_callback (see documentation for more information)
165
+ - bug fix: when toggling from textarea to editarea, IE was almost of the time not keeping the selection
166
+ - bug fix: the brackets where still highlighted in red when being deleted
167
+ - bug fix: brackets where not placed correctly when the line contains html entitites (&amp; &quot; etc....)
168
+
169
+
170
+ **** v 0.6.2 ****
171
+ WARNING => POSSIBLE BREAK COMPATIBILITY:
172
+ - the load_callback now receive the 'id' of the textarea and no more a reference to the textarea. Developpers should use editAreaLoder methods rather than modfying directly the textarea.
173
+ - the save_callback now receive the 'id' of the textarea as first argument, and it's content in the second argument.
174
+
175
+ - EditArea is now compatible with javascript libraries like "prototype" (1.5) and "mootools" (release 83)
176
+ - add two function to EditAreaLoader: hide(id) and show(id), that will allow to completly hide/restore both EditArea and normal textarea (usefull when EditArea is included in tabs).
177
+ - it's no more possible to move the search window out of the frame.
178
+ - gecko_spellcheck option is now set to false by default.
179
+ - add a onchange_callback option (cf doc)
180
+ - bug fix: in IE when syntax highlight was on, clicking on the textarea outside the range of the text, the click wasn't taking into account.
181
+ - bug fix: references to the orginal textarea could be lost while using EditArea.
182
+ - bug fix: using insertTags, getSelectionRange when editArea was not focused, IE failed
183
+ - bug fix: main script could fail to load additionnal files in certain specific cases
184
+
185
+ **** v 0.6.1 ****
186
+ - compatiblity with Firefox 2 checked (was already compatible before).
187
+ - compatiblity with IE7 checked (was already compatible before).
188
+ - added possibility to call the editAreaLoader.init() function at any moment (no more limited to window load). Allow to replace an EditArea instance by a new one with other options.
189
+ - added new gecko_spellcheck option, this enables you to disable/enable the FF 2.0 spellchecker.
190
+ - added editAreaLoader.delete_instance(id) to allow to delete an EditArea instance
191
+ - Fix a bug where "Ctrl+G" wasn't openning anymore the go to line prompt box.
192
+
193
+
194
+ **** v 0.6.0.1 ****
195
+ - add italian translation (thanks to Luciano Vernaschi)
196
+ - add polish translation (thanks to Piotr Furman)
197
+ - improve deutsh translation (thanks to Felix Riesterer)
198
+ - add a little style improvement for buttons in search popup. they can't be splited in two line anymore
199
+ - change color for tags in html and xml syntax due to visibility problems
200
+
201
+
202
+ **** v 0.6 ****
203
+ - add plugins possibilies
204
+ - add editAreaLoader.insertTags function to allow easy tags insertion.
205
+ - improve undo & redo functionnality
206
+ - improve php compression: "edit_area_full.js" is 9 Ko smaller
207
+ - improve syntax highlight regexp for quotted string. \\" or \\' (or \\\\", etc...) will now effectively close quotted string
208
+ - add scrollbars to the popups when the popup's height is smaller than the editor's height
209
+ - add japanese translation file (thanks to ISHITOYA Kentaro)
210
+ - add possibility to add line-break in toolbar ("*")
211
+ - disable gzip compression for IE (see: http://support.microsoft.com/default.aspx?scid=kb;en-us;Q312496)
212
+ - bug fix: when submitting form while editarea toggled off, the post value was equals to the old content of editarea and not the visible textarea
213
+ - bug fix: under IE the editor was scrolling when pressing enter
214
+ - bug fix: when insterting text on first line there was an highlight desynchronization
215
+
216
+
217
+
218
+ **** v 0.5.3 ****
219
+ WARNING => POSSIBLE BREAK COMPATIBILITY:
220
+ - correct a spelling error: "toogle" become "toggle" in the whole code. This can perturb the initialization with the "allow_toggle" init parameters
221
+
222
+ - add a case sensitive option in syntax definition files
223
+ - improve html syntax definition file
224
+ - add xml syntax definition file
225
+ - add vb syntax definition file (thanks to Martin Gottlieb)
226
+ - add some function that will allow dynamic EditArea content management, taking into account if the editor is displayed or toggled off (editAreaLodaer.getValue(), editAreaLoader.setValue(), editAreaLoader.getSelectedText(), editAreaLoader.setSelectedText(), editAreaLoader.getSelectionRange and editAreaLoader.setSelectionRange()). See "javascript functions" documentation for more informations
227
+ - add a generic function (editaAreaLoader.execCommand) to allow to access EditArea's functions and datas
228
+ - add portuguese translation file (thanks to Leonardo Sapucaia)
229
+ - add compatibility to IE7 RC1
230
+
231
+
232
+ **** v 0.5.2 ****
233
+ - Opera improvement: text indentation is now working, and "go to line" is now working as in other browsers
234
+ - Bug fix: It was still possible to select text in search popup
235
+ - Bug fix: the "go to line" popup wasn't displaying anymore
236
+ - There was still some hard codded word in the search field => added them to translation files
237
+ - Bug fix: when multiple languages were used in the same page, there could have translation exchange between the different editors
238
+
239
+
240
+ **** v 0.5.1 ****
241
+ - Bug fix: the highlighted bracket was displayed on line 1 when it should be in line 2
242
+ - Bug fix: the highlighted bracket were bad displayed in IE
243
+ - Bug fix: their was some error in the optimisation process of the highlight mode
244
+ - Bug fix: their was a bug when moving the search popup on IE
245
+
246
+ **** v 0.5 ****
247
+ - Now released under LGPL
248
+ - Rewrite nearly from scratch
249
+ - Added Danish translation file (thanks to Peter Klein)
250
+ - Add python syntax
251
+
252
+
253
+ WARNING => BREAK COMPATIBILITY:
254
+ - the whole loading process (javascript include and init function call) is changed (but it's similar to the old version)
255
+ - the languages translation files are not stored in the same variable
256
+
257
+
258
+ IMPROVEMENTS:
259
+ - The whole code is more stable
260
+ - Allow several instance on the same page
261
+ - Faster to load
262
+ - The highlight process is more stable and there is nearly no more to use the "re sync" button
263
+ - Add support of Opera 9 (even if its still not perfect)
264
+ - Add the possibility to load a new compressed script of only 20Ko for the whole core script even if PHP is not installed
265
+ - The textarea can be toggled to an EditArea on window load or later
266
+ - The EditArea is loaded in a iframe => there is no more interaction with user css
267
+ - Support the reset action of a form
268
+ - Add support for "page up" & "page down" button
269
+ - There is now a waiting screen when toggling on the highlight syntax (but it can't be an animated one, even gif are not animated due to CPU load)
270
+ - All supported browsers can now change font-size
271
+
272
+ BUG FIXES:
273
+ - Sometimes while using the "toggle editor" button to turn of the editor, the standard textarea was expanded to the full size of the textarea content.
274
+ - When resizing the area the selection was lost
275
+ - Allow translation for some forgotten hard-coded word (the "move" button for search popup, and "font size", and keys word in help panel).
276
+ - It was possible to "drag" the buttons from the Search/Replace popup into the content of the textarea.
277
+ - On first display (when the files are not in cache) or with xhtml doctype there is a display bug (the content of the textarea exceed of 4px)
278
+ - when the cursor was at the beginning of the 1st line of the textarea, the caracter position was set to 0 instead of 1
279
+
280
+
281
+
282
+ ***v 0.4****
283
+ - Increases syntax highlight proccess speed by 5 => allow a better live editing mode with syntax highlight.
284
+ - Now syntax highlight has a real language syntax. Text is parsing with rules depending of the language definition file. (limitation: there is only one language on the same time > doesn't allow to parse html and php on the same page).
285
+ - Syntax highlight can be easily extended with new code languages (there is currently: php, css, js, html).
286
+ - Add german language file (thanks to Olaf Brambrink).
287
+ - Fix some little bugs.
288
+
289
+
290
+
291
+
292
+ ***v0.33***
293
+ - First release.
editarea/edit_area.css ADDED
@@ -0,0 +1,530 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ body, html{
2
+ margin: 0;
3
+ padding: 0;
4
+ height: 100%;
5
+ border: none;
6
+ overflow: hidden;
7
+ background-color: #FFF;
8
+ }
9
+
10
+ body, html, table, form, textarea{
11
+ font: 12px monospace, sans-serif;
12
+ }
13
+
14
+ #editor{
15
+ border: solid #888 1px;
16
+ overflow: hidden;
17
+ }
18
+
19
+ #result{
20
+ z-index: 4;
21
+ overflow-x: auto;
22
+ overflow-y: scroll;
23
+ border-top: solid #888 1px;
24
+ border-bottom: solid #888 1px;
25
+ position: relative;
26
+ clear: both;
27
+ }
28
+
29
+ #result.empty{
30
+ overflow: hidden;
31
+ }
32
+
33
+ #container{
34
+ overflow: hidden;
35
+ border: solid blue 0;
36
+ position: relative;
37
+ z-index: 10;
38
+ padding: 0 5px 0 45px;
39
+ /*padding-right: 5px;*/
40
+ }
41
+
42
+ #textarea{
43
+ position: relative;
44
+ top: 0;
45
+ left: 0;
46
+ margin: 0;
47
+ padding: 0;
48
+ width: 100%;
49
+ height: 100%;
50
+ overflow: hidden;
51
+ z-index: 7;
52
+ border-width: 0;
53
+ background-color: transparent;
54
+ resize: none;
55
+ }
56
+
57
+ #textarea, #textarea:hover{
58
+ outline: none; /* safari outline fix */
59
+ }
60
+
61
+ #content_highlight{
62
+ white-space: pre;
63
+ margin: 0;
64
+ padding: 0;
65
+ position : absolute;
66
+ z-index: 4;
67
+ overflow: visible;
68
+ }
69
+
70
+
71
+ #selection_field, #selection_field_text{
72
+ margin: 0;
73
+ background-color: #E1F2F9;
74
+ /* height: 1px; */
75
+ position: absolute;
76
+ z-index: 5;
77
+ top: -100px;
78
+ padding: 0;
79
+ white-space: pre;
80
+ overflow: hidden;
81
+ }
82
+
83
+ #selection_field.show_colors {
84
+ z-index: 3;
85
+ background-color:#EDF9FC;
86
+
87
+ }
88
+
89
+ #selection_field strong{
90
+ font-weight:normal;
91
+ }
92
+
93
+ #selection_field.show_colors *, #selection_field_text * {
94
+ visibility: hidden;
95
+ }
96
+
97
+ #selection_field_text{
98
+ background-color:transparent;
99
+ }
100
+
101
+ #selection_field_text strong{
102
+ font-weight:normal;
103
+ background-color:#3399FE;
104
+ color: #FFF;
105
+ visibility:visible;
106
+ }
107
+
108
+ #container.word_wrap #content_highlight,
109
+ #container.word_wrap #selection_field,
110
+ #container.word_wrap #selection_field_text,
111
+ #container.word_wrap #test_font_size{
112
+ white-space: pre-wrap; /* css-3 */
113
+ white-space: -moz-pre-wrap !important; /* Mozilla, since 1999 */
114
+ white-space: -pre-wrap; /* Opera 4-6 */
115
+ white-space: -o-pre-wrap; /* Opera 7 */
116
+ word-wrap: break-word; /* Internet Explorer 5.5+ */
117
+ width: 99%;
118
+ }
119
+
120
+ #line_number{
121
+ position: absolute;
122
+ overflow: hidden;
123
+ border-right: solid black 1px;
124
+ z-index:8;
125
+ width: 38px;
126
+ padding: 0 5px 0 0;
127
+ margin: 0 0 0 -45px;
128
+ text-align: right;
129
+ color: #AAAAAA;
130
+ }
131
+
132
+ #test_font_size{
133
+ padding: 0;
134
+ margin: 0;
135
+ visibility: hidden;
136
+ position: absolute;
137
+ white-space: pre;
138
+ }
139
+
140
+ pre{
141
+ margin: 0;
142
+ padding: 0;
143
+ }
144
+
145
+ .hidden{
146
+ opacity: 0.2;
147
+ filter:alpha(opacity=20);
148
+ }
149
+
150
+ #result .edit_area_cursor{
151
+ position: absolute;
152
+ z-index:6;
153
+ background-color: #FF6633;
154
+ top: -100px;
155
+ margin: 0;
156
+ }
157
+
158
+ #result .edit_area_selection_field .overline{
159
+ background-color: #996600;
160
+ }
161
+
162
+
163
+ /* area popup */
164
+ .editarea_popup{
165
+ border: solid 1px #888888;
166
+ background-color: #ECE9D8;
167
+ width: 250px;
168
+ padding: 4px;
169
+ position: absolute;
170
+ visibility: hidden;
171
+ z-index: 15;
172
+ top: -500px;
173
+ }
174
+
175
+ .editarea_popup, .editarea_popup table{
176
+ font-family: sans-serif;
177
+ font-size: 10pt;
178
+ }
179
+
180
+ .editarea_popup img{
181
+ border: 0;
182
+ }
183
+
184
+ .editarea_popup .close_popup{
185
+ float: right;
186
+ line-height: 16px;
187
+ border: 0;
188
+ padding: 0;
189
+ }
190
+
191
+ .editarea_popup h1,.editarea_popup h2,.editarea_popup h3,.editarea_popup h4,.editarea_popup h5,.editarea_popup h6{
192
+ margin: 0;
193
+ padding: 0;
194
+ }
195
+
196
+ .editarea_popup .copyright{
197
+ text-align: right;
198
+ }
199
+
200
+ /* Area_search */
201
+ div#area_search_replace{
202
+ /*width: 250px;*/
203
+ }
204
+
205
+ div#area_search_replace img{
206
+ border: 0;
207
+ }
208
+
209
+ div#area_search_replace div.button{
210
+ text-align: center;
211
+ line-height: 1.7em;
212
+ }
213
+
214
+ div#area_search_replace .button a{
215
+ cursor: pointer;
216
+ border: solid 1px #888888;
217
+ background-color: #DEDEDE;
218
+ text-decoration: none;
219
+ padding: 0 2px;
220
+ color: #000000;
221
+ white-space: nowrap;
222
+ }
223
+
224
+ div#area_search_replace a:hover{
225
+ /*border: solid 1px #888888;*/
226
+ background-color: #EDEDED;
227
+ }
228
+
229
+ div#area_search_replace #move_area_search_replace{
230
+ cursor: move;
231
+ border: solid 1px #888;
232
+ }
233
+
234
+ div#area_search_replace #close_area_search_replace{
235
+ text-align: right;
236
+ vertical-align: top;
237
+ white-space: nowrap;
238
+ }
239
+
240
+ div#area_search_replace #area_search_msg{
241
+ height: 18px;
242
+ overflow: hidden;
243
+ border-top: solid 1px #888;
244
+ margin-top: 3px;
245
+ }
246
+
247
+ /* area help */
248
+ #edit_area_help{
249
+ width: 350px;
250
+ }
251
+
252
+ #edit_area_help div.close_popup{
253
+ float: right;
254
+ }
255
+
256
+ /* area_toolbar */
257
+ .area_toolbar{
258
+ /*font: 11px sans-serif;*/
259
+ width: 100%;
260
+ /*height: 21px; */
261
+ margin: 0;
262
+ padding: 0;
263
+ background-color: #ECE9D8;
264
+ text-align: center;
265
+ }
266
+
267
+ .area_toolbar, .area_toolbar table{
268
+ font: 11px sans-serif;
269
+ }
270
+
271
+ .area_toolbar img{
272
+ border: 0;
273
+ vertical-align: middle;
274
+ }
275
+
276
+ .area_toolbar input{
277
+ margin: 0;
278
+ padding: 0;
279
+ }
280
+
281
+ .area_toolbar select{
282
+ font-family: 'MS Sans Serif',sans-serif,Verdana,Arial;
283
+ font-size: 7pt;
284
+ font-weight: normal;
285
+ margin: 2px 0 0 0 ;
286
+ padding: 0;
287
+ vertical-align: top;
288
+ background-color: #F0F0EE;
289
+ }
290
+
291
+ table.statusbar{
292
+ width: 100%;
293
+ }
294
+
295
+ .area_toolbar td.infos{
296
+ text-align: center;
297
+ width: 130px;
298
+ border-right: solid 1px #888;
299
+ border-width: 0 1px 0 0;
300
+ padding: 0;
301
+ }
302
+
303
+ .area_toolbar td.total{
304
+ text-align: right;
305
+ width: 50px;
306
+ padding: 0;
307
+ }
308
+
309
+ .area_toolbar td.resize{
310
+ text-align: right;
311
+ }
312
+ /*
313
+ .area_toolbar span{
314
+ line-height: 1px;
315
+ padding: 0;
316
+ margin: 0;
317
+ }*/
318
+
319
+ .area_toolbar span#resize_area{
320
+ cursor: nw-resize;
321
+ visibility: hidden;
322
+ }
323
+
324
+ /* toolbar buttons */
325
+ .editAreaButtonNormal, .editAreaButtonOver, .editAreaButtonDown, .editAreaSeparator, .editAreaSeparatorLine, .editAreaButtonDisabled, .editAreaButtonSelected {
326
+ border: 0; margin: 0; padding: 0; background: transparent;
327
+ margin-top: 0;
328
+ margin-left: 1px;
329
+ padding: 0;
330
+ }
331
+
332
+ .editAreaButtonNormal {
333
+ border: 1px solid #ECE9D8 !important;
334
+ cursor: pointer;
335
+ }
336
+
337
+ .editAreaButtonOver {
338
+ border: 1px solid #0A246A !important;
339
+ cursor: pointer;
340
+ background-color: #B6BDD2;
341
+ }
342
+
343
+ .editAreaButtonDown {
344
+ cursor: pointer;
345
+ border: 1px solid #0A246A !important;
346
+ background-color: #8592B5;
347
+ }
348
+
349
+ .editAreaButtonSelected {
350
+ border: 1px solid #C0C0BB !important;
351
+ cursor: pointer;
352
+ background-color: #F4F2E8;
353
+ }
354
+
355
+ .editAreaButtonDisabled {
356
+ filter:progid:DXImageTransform.Microsoft.Alpha(opacity=30);
357
+ -moz-opacity:0.3;
358
+ opacity: 0.3;
359
+ border: 1px solid #F0F0EE !important;
360
+ cursor: pointer;
361
+ }
362
+
363
+ .editAreaSeparatorLine {
364
+ margin: 1px 2px;
365
+ background-color: #C0C0BB;
366
+ width: 2px;
367
+ height: 18px;
368
+ }
369
+
370
+ /* waiting screen */
371
+ #processing{
372
+ display: none;
373
+ background-color:#ECE9D8;
374
+ border: solid #888 1px;
375
+ position: absolute;
376
+ top: 0;
377
+ left: 0;
378
+ width: 100%;
379
+ height: 100%;
380
+ z-index: 100;
381
+ text-align: center;
382
+ }
383
+
384
+ #processing_text{
385
+ position:absolute;
386
+ left: 50%;
387
+ top: 50%;
388
+ width: 200px;
389
+ height: 20px;
390
+ margin-left: -100px;
391
+ margin-top: -10px;
392
+ text-align: center;
393
+ }
394
+ /* end */
395
+
396
+
397
+ /**** tab browsing area ****/
398
+ #tab_browsing_area{
399
+ display: none;
400
+ background-color: #CCC9A8;
401
+ border-top: 1px solid #888;
402
+ text-align: left;
403
+ margin: 0;
404
+ }
405
+
406
+ #tab_browsing_list {
407
+ padding: 0;
408
+ margin: 0;
409
+ list-style-type: none;
410
+ white-space: nowrap;
411
+ }
412
+ #tab_browsing_list li {
413
+ float: left;
414
+ margin: -1px;
415
+ }
416
+ #tab_browsing_list a {
417
+ position: relative;
418
+ display: block;
419
+ text-decoration: none;
420
+ float: left;
421
+ cursor: pointer;
422
+ line-height:14px;
423
+ }
424
+
425
+ #tab_browsing_list a span {
426
+ display: block;
427
+ color: #000;
428
+ background: #ECE9D8;
429
+ border: 1px solid #888;
430
+ border-width: 1px 1px 0;
431
+ text-align: center;
432
+ padding: 2px 2px 1px 4px;
433
+ position: relative; /*IE 6 hack */
434
+ }
435
+
436
+ #tab_browsing_list a b {
437
+ display: block;
438
+ border-bottom: 2px solid #617994;
439
+ }
440
+
441
+ #tab_browsing_list a .edited {
442
+ display: none;
443
+ }
444
+
445
+ #tab_browsing_list a.edited .edited {
446
+ display: inline;
447
+ }
448
+
449
+ #tab_browsing_list a img{
450
+ margin-left: 7px;
451
+ }
452
+
453
+ #tab_browsing_list a.edited img{
454
+ margin-left: 3px;
455
+ }
456
+
457
+ #tab_browsing_list a:hover span {
458
+ background: #F4F2E8;
459
+ border-color: #0A246A;
460
+ }
461
+
462
+ #tab_browsing_list .selected a span{
463
+ background: #046380;
464
+ color: #FFF;
465
+ }
466
+
467
+
468
+ #no_file_selected{
469
+ height: 100%;
470
+ width: 150%; /* Opera need more than 100% */
471
+ background: #CCC;
472
+ display: none;
473
+ z-index: 20;
474
+ position: absolute;
475
+ }
476
+
477
+
478
+ /*** Non-editable mode ***/
479
+ .non_editable #editor
480
+ {
481
+ border-width: 0 1px;
482
+ }
483
+
484
+ .non_editable .area_toolbar
485
+ {
486
+ display: none;
487
+ }
488
+
489
+ /*** Auto completion ***/
490
+ #auto_completion_area
491
+ {
492
+ background: #FFF;
493
+ border: solid 1px #888;
494
+ position: absolute;
495
+ z-index: 15;
496
+ width: 280px;
497
+ height: 180px;
498
+ overflow: auto;
499
+ display:none;
500
+ }
501
+
502
+ #auto_completion_area a, #auto_completion_area a:visited
503
+ {
504
+ display: block;
505
+ padding: 0 2px 1px;
506
+ color: #000;
507
+ text-decoration:none;
508
+ }
509
+
510
+ #auto_completion_area a:hover, #auto_completion_area a:focus, #auto_completion_area a.focus
511
+ {
512
+ background: #D6E1FE;
513
+ text-decoration:none;
514
+ }
515
+
516
+ #auto_completion_area ul
517
+ {
518
+ margin: 0;
519
+ padding: 0;
520
+ list-style: none inside;
521
+ }
522
+ #auto_completion_area li
523
+ {
524
+ padding: 0;
525
+ }
526
+ #auto_completion_area .prefix
527
+ {
528
+ font-style: italic;
529
+ padding: 0 3px;
530
+ }
editarea/edit_area_full.js ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ function EAL(){var t=this;t.version="0.8.2";date=new Date();t.start_time=date.getTime();t.win="loading";t.error=false;t.baseURL="";t.template="";t.lang={};t.load_syntax={};t.syntax={};t.loadedFiles=[];t.waiting_loading={};t.scripts_to_load=[];t.sub_scripts_to_load=[];t.syntax_display_name={'basic':'Basic','brainfuck':'Brainfuck','c':'C','coldfusion':'Coldfusion','cpp':'CPP','css':'CSS','html':'HTML','java':'Java','js':'Javascript','pas':'Pascal','perl':'Perl','php':'Php','python':'Python','robotstxt':'Robots txt','ruby':'Ruby','sql':'SQL','tsql':'T-SQL','vb':'Visual Basic','xml':'XML'};t.resize=[];t.hidden={};t.default_settings={debug:false,smooth_selection:true,font_size:"10",font_family:"monospace",start_highlight:false,toolbar:"search,go_to_line,fullscreen,|,undo,redo,|,select_font,|,change_smooth_selection,highlight,reset_highlight,word_wrap,|,help",begin_toolbar:"",end_toolbar:"",is_multi_files:false,allow_resize:"both",show_line_colors:false,min_width:400,min_height:125,replace_tab_by_spaces:false,allow_toggle:true,language:"en",syntax:"",syntax_selection_allow:"basic,brainfuck,c,coldfusion,cpp,css,html,java,js,pas,perl,php,python,ruby,robotstxt,sql,tsql,vb,xml",display:"onload",max_undo:30,browsers:"known",plugins:"",gecko_spellcheck:false,fullscreen:false,is_editable:true,cursor_position:"begin",word_wrap:false,autocompletion:false,load_callback:"",save_callback:"",change_callback:"",submit_callback:"",EA_init_callback:"",EA_delete_callback:"",EA_load_callback:"",EA_unload_callback:"",EA_toggle_on_callback:"",EA_toggle_off_callback:"",EA_file_switch_on_callback:"",EA_file_switch_off_callback:"",EA_file_close_callback:""};t.advanced_buttons=[ ['new_document','newdocument.gif','new_document',false],['search','search.gif','show_search',false],['go_to_line','go_to_line.gif','go_to_line',false],['undo','undo.gif','undo',true],['redo','redo.gif','redo',true],['change_smooth_selection','smooth_selection.gif','change_smooth_selection_mode',true],['reset_highlight','reset_highlight.gif','resync_highlight',true],['highlight','highlight.gif','change_highlight',true],['help','help.gif','show_help',false],['save','save.gif','save',false],['load','load.gif','load',false],['fullscreen','fullscreen.gif','toggle_full_screen',false],['word_wrap','word_wrap.gif','toggle_word_wrap',true],['autocompletion','autocompletion.gif','toggle_autocompletion',true] ];t.set_browser_infos(t);if(t.isIE>=6||t.isGecko||(t.isWebKit&&!t.isSafari<3)||t.isOpera>=9||t.isCamino)t.isValidBrowser=true;
2
+ else t.isValidBrowser=false;t.set_base_url();for(var i=0;i<t.scripts_to_load.length;i++){setTimeout("eAL.load_script('"+t.baseURL+t.scripts_to_load[i]+".js');",1);t.waiting_loading[t.scripts_to_load[i]+".js"]=false;}t.add_event(window,"load",EAL.prototype.window_loaded);};EAL.prototype={has_error:function(){this.error=true;for(var i in EAL.prototype){EAL.prototype[i]=function(){};}},set_browser_infos:function(o){ua=navigator.userAgent;o.isWebKit=/WebKit/.test(ua);o.isGecko=!o.isWebKit&&/Gecko/.test(ua);o.isMac=/Mac/.test(ua);o.isIE=(navigator.appName=="Microsoft Internet Explorer");if(o.isIE){o.isIE=ua.replace(/^.*?MSIE\s+([0-9\.]+).*$/,"$1");if(o.isIE<6)o.has_error();}if(o.isOpera=(ua.indexOf('Opera')!=-1)){o.isOpera=ua.replace(/^.*?Opera.*?([0-9\.]+).*$/i,"$1");if(o.isOpera<9)o.has_error();o.isIE=false;}if(o.isFirefox=(ua.indexOf('Firefox')!=-1))o.isFirefox=ua.replace(/^.*?Firefox.*?([0-9\.]+).*$/i,"$1");if(ua.indexOf('Iceweasel')!=-1)o.isFirefox=ua.replace(/^.*?Iceweasel.*?([0-9\.]+).*$/i,"$1");if(ua.indexOf('GranParadiso')!=-1)o.isFirefox=ua.replace(/^.*?GranParadiso.*?([0-9\.]+).*$/i,"$1");if(ua.indexOf('BonEcho')!=-1)o.isFirefox=ua.replace(/^.*?BonEcho.*?([0-9\.]+).*$/i,"$1");if(ua.indexOf('SeaMonkey')!=-1)o.isFirefox=(ua.replace(/^.*?SeaMonkey.*?([0-9\.]+).*$/i,"$1"))+1;if(o.isCamino=(ua.indexOf('Camino')!=-1))o.isCamino=ua.replace(/^.*?Camino.*?([0-9\.]+).*$/i,"$1");if(o.isSafari=(ua.indexOf('Safari')!=-1))o.isSafari=ua.replace(/^.*?Version\/([0-9]+\.[0-9]+).*$/i,"$1");if(o.isChrome=(ua.indexOf('Chrome')!=-1)){o.isChrome=ua.replace(/^.*?Chrome.*?([0-9\.]+).*$/i,"$1");o.isSafari=false;}},window_loaded:function(){eAL.win="loaded";if(document.forms){for(var i=0;i<document.forms.length;i++){var form=document.forms[i];form.edit_area_replaced_submit=null;try{form.edit_area_replaced_submit=form.onsubmit;form.onsubmit="";}catch(e){}eAL.add_event(form,"submit",EAL.prototype.submit);eAL.add_event(form,"reset",EAL.prototype.reset);}}eAL.add_event(window,"unload",function(){for(var i in eAs){eAL.delete_instance(i);}});},init_ie_textarea:function(id){var a=document.getElementById(id);try{if(a&&typeof(a.focused)=="undefined"){a.focus();a.focused=true;a.selectionStart=a.selectionEnd=0;get_IE_selection(a);eAL.add_event(a,"focus",IE_textarea_focus);eAL.add_event(a,"blur",IE_textarea_blur);}}catch(ex){}},init:function(settings){var t=this,s=settings,i;if(!s["id"])t.has_error();if(t.error)return;if(eAs[s["id"]])t.delete_instance(s["id"]);for(i in t.default_settings){if(typeof(s[i])=="undefined")s[i]=t.default_settings[i];}if(s["browsers"]=="known"&&t.isValidBrowser==false){return;}if(s["begin_toolbar"].length>0)s["toolbar"]=s["begin_toolbar"]+","+s["toolbar"];if(s["end_toolbar"].length>0)s["toolbar"]=s["toolbar"]+","+s["end_toolbar"];s["tab_toolbar"]=s["toolbar"].replace(/ /g,"").split(",");s["plugins"]=s["plugins"].replace(/ /g,"").split(",");for(i=0;i<s["plugins"].length;i++){if(s["plugins"][i].length==0)s["plugins"].splice(i,1);}t.get_template();t.load_script(t.baseURL+"langs/"+s["language"]+".js");if(s["syntax"].length>0){s["syntax"]=s["syntax"].toLowerCase();t.load_script(t.baseURL+"reg_syntax/"+s["syntax"]+".js");}eAs[s["id"]]={"settings":s};eAs[s["id"]]["displayed"]=false;eAs[s["id"]]["hidden"]=false;t.start(s["id"]);},delete_instance:function(id){var d=document,fs=window.frames,span,iframe;eAL.execCommand(id,"EA_delete");if(fs["frame_"+id]&&fs["frame_"+id].editArea){if(eAs[id]["displayed"])eAL.toggle(id,"off");fs["frame_"+id].editArea.execCommand("EA_unload");}span=d.getElementById("EditAreaArroundInfos_"+id);if(span)span.parentNode.removeChild(span);iframe=d.getElementById("frame_"+id);if(iframe){iframe.parentNode.removeChild(iframe);try{delete fs["frame_"+id];}catch(e){}}delete eAs[id];},start:function(id){var t=this,d=document,f,span,father,next,html='',html_toolbar_content='',template,content,i;if(t.win!="loaded"){setTimeout("eAL.start('"+id+"');",50);return;}for(i in t.waiting_loading){if(t.waiting_loading[i]!="loaded"&&typeof(t.waiting_loading[i])!="function"){setTimeout("eAL.start('"+id+"');",50);return;}}if(!t.lang[eAs[id]["settings"]["language"]]||(eAs[id]["settings"]["syntax"].length>0&&!t.load_syntax[eAs[id]["settings"]["syntax"]])){setTimeout("eAL.start('"+id+"');",50);return;}if(eAs[id]["settings"]["syntax"].length>0)t.init_syntax_regexp();if(!d.getElementById("EditAreaArroundInfos_"+id)&&(eAs[id]["settings"]["debug"]||eAs[id]["settings"]["allow_toggle"])){span=d.createElement("span");span.id="EditAreaArroundInfos_"+id;if(eAs[id]["settings"]["allow_toggle"]){checked=(eAs[id]["settings"]["display"]=="onload")?"checked='checked'":"";html+="<div id='edit_area_toggle_"+i+"'>";html+="<input id='edit_area_toggle_checkbox_"+id+"' class='toggle_"+id+"' type='checkbox' onclick='eAL.toggle(\""+id+"\");' accesskey='e' "+checked+" />";html+="<label for='edit_area_toggle_checkbox_"+id+"'>{$toggle}</label></div>";}if(eAs[id]["settings"]["debug"])html+="<textarea id='edit_area_debug_"+id+"' spellcheck='off' style='z-index:20;width:100%;height:120px;overflow:auto;border:solid black 1px;'></textarea><br />";html=t.translate(html,eAs[id]["settings"]["language"]);span.innerHTML=html;father=d.getElementById(id).parentNode;next=d.getElementById(id).nextSibling;if(next==null)father.appendChild(span);
3
+ else father.insertBefore(span,next);}if(!eAs[id]["initialized"]){t.execCommand(id,"EA_init");if(eAs[id]["settings"]["display"]=="later"){eAs[id]["initialized"]=true;return;}}if(t.isIE){t.init_ie_textarea(id);}var area=eAs[id];for(i=0;i<area["settings"]["tab_toolbar"].length;i++){html_toolbar_content+=t.get_control_html(area["settings"]["tab_toolbar"][i],area["settings"]["language"]);}html_toolbar_content=t.translate(html_toolbar_content,area["settings"]["language"],"template");if(!t.iframe_script){t.iframe_script="";for(i=0;i<t.sub_scripts_to_load.length;i++)t.iframe_script+='<script language="javascript" type="text/javascript" src="'+t.baseURL+t.sub_scripts_to_load[i]+'.js"></script>';}for(i=0;i<area["settings"]["plugins"].length;i++){if(!t.all_plugins_loaded)t.iframe_script+='<script language="javascript" type="text/javascript" src="'+t.baseURL+'plugins/'+area["settings"]["plugins"][i]+'/'+area["settings"]["plugins"][i]+'.js"></script>';t.iframe_script+='<script language="javascript" type="text/javascript" src="'+t.baseURL+'plugins/'+area["settings"]["plugins"][i]+'/langs/'+area["settings"]["language"]+'.js"></script>';}if(!t.iframe_css){t.iframe_css="<link href='"+t.baseURL+"edit_area.css' rel='stylesheet' type='text/css' />";}template=t.template.replace(/\[__BASEURL__\]/g,t.baseURL);template=template.replace("[__TOOLBAR__]",html_toolbar_content);template=t.translate(template,area["settings"]["language"],"template");template=template.replace("[__CSSRULES__]",t.iframe_css);template=template.replace("[__JSCODE__]",t.iframe_script);template=template.replace("[__EA_VERSION__]",t.version);area.textarea=d.getElementById(area["settings"]["id"]);eAs[area["settings"]["id"]]["textarea"]=area.textarea;if(typeof(window.frames["frame_"+area["settings"]["id"]])!='undefined')delete window.frames["frame_"+area["settings"]["id"]];father=area.textarea.parentNode;content=d.createElement("iframe");content.name="frame_"+area["settings"]["id"];content.id="frame_"+area["settings"]["id"];content.style.borderWidth="0px";setAttribute(content,"frameBorder","0");content.style.overflow="hidden";content.style.display="none";next=area.textarea.nextSibling;if(next==null)father.appendChild(content);
4
+ else father.insertBefore(content,next);f=window.frames["frame_"+area["settings"]["id"]];f.document.open();f.eAs=eAs;f.area_id=area["settings"]["id"];f.document.area_id=area["settings"]["id"];f.document.write(template);f.document.close();},toggle:function(id,toggle_to){if(!toggle_to)toggle_to=(eAs[id]["displayed"]==true)?"off":"on";if(eAs[id]["displayed"]==true&&toggle_to=="off"){this.toggle_off(id);}
5
+ else if(eAs[id]["displayed"]==false&&toggle_to=="on"){this.toggle_on(id);}return false;},toggle_off:function(id){var fs=window.frames,f,t,parNod,nxtSib,selStart,selEnd,scrollTop,scrollLeft;if(fs["frame_"+id]){f=fs["frame_"+id];t=eAs[id]["textarea"];if(f.editArea.fullscreen['isFull'])f.editArea.toggle_full_screen(false);eAs[id]["displayed"]=false;t.wrap="off";setAttribute(t,"wrap","off");parNod=t.parentNode;nxtSib=t.nextSibling;parNod.removeChild(t);parNod.insertBefore(t,nxtSib);t.value=f.editArea.textarea.value;selStart=f.editArea.last_selection["selectionStart"];selEnd=f.editArea.last_selection["selectionEnd"];scrollTop=f.document.getElementById("result").scrollTop;scrollLeft=f.document.getElementById("result").scrollLeft;document.getElementById("frame_"+id).style.display='none';t.style.display="inline";try{t.focus();}catch(e){};if(this.isIE){t.selectionStart=selStart;t.selectionEnd=selEnd;t.focused=true;set_IE_selection(t);}
6
+ else{if(this.isOpera&&this.isOpera < 9.6){t.setSelectionRange(0,0);}try{t.setSelectionRange(selStart,selEnd);}catch(e){};}t.scrollTop=scrollTop;t.scrollLeft=scrollLeft;f.editArea.execCommand("toggle_off");}},toggle_on:function(id){var fs=window.frames,f,t,selStart=0,selEnd=0,scrollTop=0,scrollLeft=0,curPos,elem;if(fs["frame_"+id]){f=fs["frame_"+id];t=eAs[id]["textarea"];area=f.editArea;area.textarea.value=t.value;curPos=eAs[id]["settings"]["cursor_position"];if(t.use_last==true){selStart=t.last_selectionStart;selEnd=t.last_selectionEnd;scrollTop=t.last_scrollTop;scrollLeft=t.last_scrollLeft;t.use_last=false;}
7
+ else if(curPos=="auto"){try{selStart=t.selectionStart;selEnd=t.selectionEnd;scrollTop=t.scrollTop;scrollLeft=t.scrollLeft;}catch(ex){}}this.set_editarea_size_from_textarea(id,document.getElementById("frame_"+id));t.style.display="none";document.getElementById("frame_"+id).style.display="inline";area.execCommand("focus");eAs[id]["displayed"]=true;area.execCommand("update_size");f.document.getElementById("result").scrollTop=scrollTop;f.document.getElementById("result").scrollLeft=scrollLeft;area.area_select(selStart,selEnd-selStart);area.execCommand("toggle_on");}
8
+ else{elem=document.getElementById(id);elem.last_selectionStart=elem.selectionStart;elem.last_selectionEnd=elem.selectionEnd;elem.last_scrollTop=elem.scrollTop;elem.last_scrollLeft=elem.scrollLeft;elem.use_last=true;eAL.start(id);}},set_editarea_size_from_textarea:function(id,frame){var elem,width,height;elem=document.getElementById(id);width=Math.max(eAs[id]["settings"]["min_width"],elem.offsetWidth)+"px";height=Math.max(eAs[id]["settings"]["min_height"],elem.offsetHeight)+"px";if(elem.style.width.indexOf("%")!=-1)width=elem.style.width;if(elem.style.height.indexOf("%")!=-1)height=elem.style.height;frame.style.width=width;frame.style.height=height;},set_base_url:function(){var t=this,elems,i,docBasePath;if(!this.baseURL){elems=document.getElementsByTagName('script');for(i=0;i<elems.length;i++){if(elems[i].src&&elems[i].src.match(/edit_area_[^\\\/]*$/i)){var src=unescape(elems[i].src);src=src.substring(0,src.lastIndexOf('/'));this.baseURL=src;this.file_name=elems[i].src.substr(elems[i].src.lastIndexOf("/")+1);break;}}}docBasePath=document.location.href;if(docBasePath.indexOf('?')!=-1)docBasePath=docBasePath.substring(0,docBasePath.indexOf('?'));docBasePath=docBasePath.substring(0,docBasePath.lastIndexOf('/'));if(t.baseURL.indexOf('://')==-1&&t.baseURL.charAt(0)!='/'){t.baseURL=docBasePath+"/"+t.baseURL;}t.baseURL+="/";},get_button_html:function(id,img,exec,isFileSpecific,baseURL){var cmd,html;if(!baseURL)baseURL=this.baseURL;cmd='editArea.execCommand(\''+exec+'\')';html='<a id="a_'+id+'" href="javascript:'+cmd+'" onclick="'+cmd+';return false;" onmousedown="return false;" target="_self" fileSpecific="'+(isFileSpecific?'yes':'no')+'">';html+='<img id="'+id+'" src="'+baseURL+'images/'+img+'" title="{$'+id+'}" width="20" height="20" class="editAreaButtonNormal" onmouseover="editArea.switchClass(this,\'editAreaButtonOver\');" onmouseout="editArea.restoreClass(this);" onmousedown="editArea.restoreAndSwitchClass(this,\'editAreaButtonDown\');" /></a>';return html;},get_control_html:function(button_name,lang){var t=this,i,but,html,si;for(i=0;i<t.advanced_buttons.length;i++){but=t.advanced_buttons[i];if(but[0]==button_name){return t.get_button_html(but[0],but[1],but[2],but[3]);}}switch(button_name){case "*":case "return":return "<br />";case "|":case "separator":return '<img src="'+t.baseURL+'images/spacer.gif" width="1" height="15" class="editAreaSeparatorLine">';case "select_font":html="<select id='area_font_size' onchange='javascript:editArea.execCommand(\"change_font_size\")' fileSpecific='yes'>";html+="<option value='-1'>{$font_size}</option>";si=[8,9,10,11,12,14];for(i=0;i<si.length;i++){html+="<option value='"+si[i]+"'>"+si[i]+" pt</option>";}html+="</select>";return html;case "syntax_selection":html="<select id='syntax_selection' onchange='javascript:editArea.execCommand(\"change_syntax\",this.value)' fileSpecific='yes'>";html+="<option value='-1'>{$syntax_selection}</option>";html+="</select>";return html;}return "<span id='tmp_tool_"+button_name+"'>["+button_name+"]</span>";},get_template:function(){if(this.template==""){var xhr_object=null;if(window.XMLHttpRequest)xhr_object=new XMLHttpRequest();
9
+ else if(window.ActiveXObject)xhr_object=new ActiveXObject("Microsoft.XMLHTTP");
10
+ else{alert("XMLHTTPRequest not supported. EditArea not loaded");return;}xhr_object.open("GET",this.baseURL+"template.html",false);xhr_object.send(null);if(xhr_object.readyState==4)this.template=xhr_object.responseText;
11
+ else this.has_error();}},translate:function(text,lang,mode){if(mode=="word")text=eAL.get_word_translation(text,lang);
12
+ else if(mode="template"){eAL.current_language=lang;text=text.replace(/\{\$([^\}]+)\}/gm,eAL.translate_template);}return text;},translate_template:function(){return eAL.get_word_translation(EAL.prototype.translate_template.arguments[1],eAL.current_language);},get_word_translation:function(val,lang){var i;for(i in eAL.lang[lang]){if(i==val)return eAL.lang[lang][i];}return "_"+val;},load_script:function(url){var t=this,d=document,script,head;if(t.loadedFiles[url])return;try{script=d.createElement("script");script.type="text/javascript";script.src=url;script.charset="UTF-8";d.getElementsByTagName("head")[0].appendChild(script);}catch(e){d.write('<sc'+'ript language="javascript" type="text/javascript" src="'+url+'" charset="UTF-8"></sc'+'ript>');}t.loadedFiles[url]=true;},add_event:function(obj,name,handler){try{if(obj.attachEvent){obj.attachEvent("on"+name,handler);}
13
+ else{obj.addEventListener(name,handler,false);}}catch(e){}},remove_event:function(obj,name,handler){try{if(obj.detachEvent)obj.detachEvent("on"+name,handler);
14
+ else obj.removeEventListener(name,handler,false);}catch(e){}},reset:function(e){var formObj,is_child,i,x;formObj=eAL.isIE ? window.event.srcElement:e.target;if(formObj.tagName!='FORM')formObj=formObj.form;for(i in eAs){is_child=false;for(x=0;x<formObj.elements.length;x++){if(formObj.elements[x].id==i)is_child=true;}if(window.frames["frame_"+i]&&is_child&&eAs[i]["displayed"]==true){var exec='window.frames["frame_'+i+'"].editArea.textarea.value=document.getElementById("'+i+'").value;';exec+='window.frames["frame_'+i+'"].editArea.execCommand("focus");';exec+='window.frames["frame_'+i+'"].editArea.check_line_selection();';exec+='window.frames["frame_'+i+'"].editArea.execCommand("reset");';window.setTimeout(exec,10);}}return;},submit:function(e){var formObj,is_child,fs=window.frames,i,x;formObj=eAL.isIE ? window.event.srcElement:e.target;if(formObj.tagName!='FORM')formObj=formObj.form;for(i in eAs){is_child=false;for(x=0;x<formObj.elements.length;x++){if(formObj.elements[x].id==i)is_child=true;}if(is_child){if(fs["frame_"+i]&&eAs[i]["displayed"]==true)document.getElementById(i).value=fs["frame_"+i].editArea.textarea.value;eAL.execCommand(i,"EA_submit");}}if(typeof(formObj.edit_area_replaced_submit)=="function"){res=formObj.edit_area_replaced_submit();if(res==false){if(eAL.isIE)return false;
15
+ else e.preventDefault();}}return;},getValue:function(id){if(window.frames["frame_"+id]&&eAs[id]["displayed"]==true){return window.frames["frame_"+id].editArea.textarea.value;}
16
+ else if(elem=document.getElementById(id)){return elem.value;}return false;},setValue:function(id,new_val){var fs=window.frames;if((f=fs["frame_"+id])&&eAs[id]["displayed"]==true){f.editArea.textarea.value=new_val;f.editArea.execCommand("focus");f.editArea.check_line_selection(false);f.editArea.execCommand("onchange");}
17
+ else if(elem=document.getElementById(id)){elem.value=new_val;}},getSelectionRange:function(id){var sel,eA,fs=window.frames;sel={"start":0,"end":0};if(fs["frame_"+id]&&eAs[id]["displayed"]==true){eA=fs["frame_"+id].editArea;sel["start"]=eA.textarea.selectionStart;sel["end"]=eA.textarea.selectionEnd;}
18
+ else if(elem=document.getElementById(id)){sel=getSelectionRange(elem);}return sel;},setSelectionRange:function(id,new_start,new_end){var fs=window.frames;if(fs["frame_"+id]&&eAs[id]["displayed"]==true){fs["frame_"+id].editArea.area_select(new_start,new_end-new_start);if(!this.isIE){fs["frame_"+id].editArea.check_line_selection(false);fs["frame_"+id].editArea.scroll_to_view();}}
19
+ else if(elem=document.getElementById(id)){setSelectionRange(elem,new_start,new_end);}},getSelectedText:function(id){var sel=this.getSelectionRange(id);return this.getValue(id).substring(sel["start"],sel["end"]);},setSelectedText:function(id,new_val){var fs=window.frames,d=document,sel,text,scrollTop,scrollLeft,new_sel_end;new_val=new_val.replace(/\r/g,"");sel=this.getSelectionRange(id);text=this.getValue(id);if(fs["frame_"+id]&&eAs[id]["displayed"]==true){scrollTop=fs["frame_"+id].document.getElementById("result").scrollTop;scrollLeft=fs["frame_"+id].document.getElementById("result").scrollLeft;}
20
+ else{scrollTop=d.getElementById(id).scrollTop;scrollLeft=d.getElementById(id).scrollLeft;}text=text.substring(0,sel["start"])+new_val+text.substring(sel["end"]);this.setValue(id,text);new_sel_end=sel["start"]+new_val.length;this.setSelectionRange(id,sel["start"],new_sel_end);if(new_val !=this.getSelectedText(id).replace(/\r/g,"")){this.setSelectionRange(id,sel["start"],new_sel_end+new_val.split("\n").length-1);}if(fs["frame_"+id]&&eAs[id]["displayed"]==true){fs["frame_"+id].document.getElementById("result").scrollTop=scrollTop;fs["frame_"+id].document.getElementById("result").scrollLeft=scrollLeft;fs["frame_"+id].editArea.execCommand("onchange");}
21
+ else{d.getElementById(id).scrollTop=scrollTop;d.getElementById(id).scrollLeft=scrollLeft;}},insertTags:function(id,open_tag,close_tag){var old_sel,new_sel;old_sel=this.getSelectionRange(id);text=open_tag+this.getSelectedText(id)+close_tag;eAL.setSelectedText(id,text);new_sel=this.getSelectionRange(id);if(old_sel["end"] > old_sel["start"])this.setSelectionRange(id,new_sel["end"],new_sel["end"]);
22
+ else this.setSelectionRange(id,old_sel["start"]+open_tag.length,old_sel["start"]+open_tag.length);},hide:function(id){var fs=window.frames,d=document,t=this,scrollTop,scrollLeft,span;if(d.getElementById(id)&&!t.hidden[id]){t.hidden[id]={};t.hidden[id]["selectionRange"]=t.getSelectionRange(id);if(d.getElementById(id).style.display!="none"){t.hidden[id]["scrollTop"]=d.getElementById(id).scrollTop;t.hidden[id]["scrollLeft"]=d.getElementById(id).scrollLeft;}if(fs["frame_"+id]){t.hidden[id]["toggle"]=eAs[id]["displayed"];if(fs["frame_"+id]&&eAs[id]["displayed"]==true){scrollTop=fs["frame_"+id].document.getElementById("result").scrollTop;scrollLeft=fs["frame_"+id].document.getElementById("result").scrollLeft;}
23
+ else{scrollTop=d.getElementById(id).scrollTop;scrollLeft=d.getElementById(id).scrollLeft;}t.hidden[id]["scrollTop"]=scrollTop;t.hidden[id]["scrollLeft"]=scrollLeft;if(eAs[id]["displayed"]==true)eAL.toggle_off(id);}span=d.getElementById("EditAreaArroundInfos_"+id);if(span){span.style.display='none';}d.getElementById(id).style.display="none";}},show:function(id){var fs=window.frames,d=document,t=this,span;if((elem=d.getElementById(id))&&t.hidden[id]){elem.style.display="inline";elem.scrollTop=t.hidden[id]["scrollTop"];elem.scrollLeft=t.hidden[id]["scrollLeft"];span=d.getElementById("EditAreaArroundInfos_"+id);if(span){span.style.display='inline';}if(fs["frame_"+id]){elem.style.display="inline";if(t.hidden[id]["toggle"]==true)eAL.toggle_on(id);scrollTop=t.hidden[id]["scrollTop"];scrollLeft=t.hidden[id]["scrollLeft"];if(fs["frame_"+id]&&eAs[id]["displayed"]==true){fs["frame_"+id].document.getElementById("result").scrollTop=scrollTop;fs["frame_"+id].document.getElementById("result").scrollLeft=scrollLeft;}
24
+ else{elem.scrollTop=scrollTop;elem.scrollLeft=scrollLeft;}}sel=t.hidden[id]["selectionRange"];t.setSelectionRange(id,sel["start"],sel["end"]);delete t.hidden[id];}},getCurrentFile:function(id){return this.execCommand(id,'get_file',this.execCommand(id,'curr_file'));},getFile:function(id,file_id){return this.execCommand(id,'get_file',file_id);},getAllFiles:function(id){return this.execCommand(id,'get_all_files()');},openFile:function(id,file_infos){return this.execCommand(id,'open_file',file_infos);},closeFile:function(id,file_id){return this.execCommand(id,'close_file',file_id);},setFileEditedMode:function(id,file_id,to){var reg1,reg2;reg1=new RegExp('\\\\','g');reg2=new RegExp('"','g');return this.execCommand(id,'set_file_edited_mode("'+file_id.replace(reg1,'\\\\').replace(reg2,'\\"')+'",'+to+')');},execCommand:function(id,cmd,fct_param){switch(cmd){case "EA_init":if(eAs[id]['settings']["EA_init_callback"].length>0)eval(eAs[id]['settings']["EA_init_callback"]+"('"+id+"');");break;case "EA_delete":if(eAs[id]['settings']["EA_delete_callback"].length>0)eval(eAs[id]['settings']["EA_delete_callback"]+"('"+id+"');");break;case "EA_submit":if(eAs[id]['settings']["submit_callback"].length>0)eval(eAs[id]['settings']["submit_callback"]+"('"+id+"');");break;}if(window.frames["frame_"+id]&&window.frames["frame_"+id].editArea){if(fct_param!=undefined)return eval('window.frames["frame_'+id+'"].editArea.'+cmd+'(fct_param);');
25
+ else return eval('window.frames["frame_'+id+'"].editArea.'+cmd+';');}return false;}};var eAL=new EAL();var eAs={}; function getAttribute(elm,aName){var aValue,taName,i;try{aValue=elm.getAttribute(aName);}catch(exept){}if(! aValue){for(i=0;i < elm.attributes.length;i++){taName=elm.attributes[i] .name.toLowerCase();if(taName==aName){aValue=elm.attributes[i] .value;return aValue;}}}return aValue;};function setAttribute(elm,attr,val){if(attr=="class"){elm.setAttribute("className",val);elm.setAttribute("class",val);}
26
+ else{elm.setAttribute(attr,val);}};function getChildren(elem,elem_type,elem_attribute,elem_attribute_match,option,depth){if(!option)var option="single";if(!depth)var depth=-1;if(elem){var children=elem.childNodes;var result=null;var results=[];for(var x=0;x<children.length;x++){strTagName=new String(children[x].tagName);children_class="?";if(strTagName!="undefined"){child_attribute=getAttribute(children[x],elem_attribute);if((strTagName.toLowerCase()==elem_type.toLowerCase()||elem_type=="")&&(elem_attribute==""||child_attribute==elem_attribute_match)){if(option=="all"){results.push(children[x]);}
27
+ else{return children[x];}}if(depth!=0){result=getChildren(children[x],elem_type,elem_attribute,elem_attribute_match,option,depth-1);if(option=="all"){if(result.length>0){results=results.concat(result);}}
28
+ else if(result!=null){return result;}}}}if(option=="all")return results;}return null;};function isChildOf(elem,parent){if(elem){if(elem==parent)return true;while(elem.parentNode !='undefined'){return isChildOf(elem.parentNode,parent);}}return false;};function getMouseX(e){if(e!=null&&typeof(e.pageX)!="undefined"){return e.pageX;}
29
+ else{return(e!=null?e.x:event.x)+document.documentElement.scrollLeft;}};function getMouseY(e){if(e!=null&&typeof(e.pageY)!="undefined"){return e.pageY;}
30
+ else{return(e!=null?e.y:event.y)+document.documentElement.scrollTop;}};function calculeOffsetLeft(r){return calculeOffset(r,"offsetLeft")};function calculeOffsetTop(r){return calculeOffset(r,"offsetTop")};function calculeOffset(element,attr){var offset=0;while(element){offset+=element[attr];element=element.offsetParent}return offset;};function get_css_property(elem,prop){if(document.defaultView){return document.defaultView.getComputedStyle(elem,null).getPropertyValue(prop);}
31
+ else if(elem.currentStyle){var prop=prop.replace(/-\D/gi,function(sMatch){return sMatch.charAt(sMatch.length-1).toUpperCase();});return elem.currentStyle[prop];}
32
+ else return null;}var _mCE;function start_move_element(e,id,frame){var elem_id=(e.target||e.srcElement).id;if(id)elem_id=id;if(!frame)frame=window;if(frame.event)e=frame.event;_mCE=frame.document.getElementById(elem_id);_mCE.frame=frame;frame.document.onmousemove=move_element;frame.document.onmouseup=end_move_element;mouse_x=getMouseX(e);mouse_y=getMouseY(e);_mCE.start_pos_x=mouse_x-(_mCE.style.left.replace("px","")||calculeOffsetLeft(_mCE));_mCE.start_pos_y=mouse_y-(_mCE.style.top.replace("px","")||calculeOffsetTop(_mCE));return false;};function end_move_element(e){_mCE.frame.document.onmousemove="";_mCE.frame.document.onmouseup="";_mCE=null;};function move_element(e){var newTop,newLeft,maxLeft;if(_mCE.frame&&_mCE.frame.event)e=_mCE.frame.event;newTop=getMouseY(e)-_mCE.start_pos_y;newLeft=getMouseX(e)-_mCE.start_pos_x;maxLeft=_mCE.frame.document.body.offsetWidth-_mCE.offsetWidth;max_top=_mCE.frame.document.body.offsetHeight-_mCE.offsetHeight;newTop=Math.min(Math.max(0,newTop),max_top);newLeft=Math.min(Math.max(0,newLeft),maxLeft);_mCE.style.top=newTop+"px";_mCE.style.left=newLeft+"px";return false;};var nav=eAL.nav;function getSelectionRange(textarea){return{"start":textarea.selectionStart,"end":textarea.selectionEnd};};function setSelectionRange(t,start,end){t.focus();start=Math.max(0,Math.min(t.value.length,start));end=Math.max(start,Math.min(t.value.length,end));if(nav.isOpera&&nav.isOpera < 9.6){t.selectionEnd=1;t.selectionStart=0;t.selectionEnd=1;t.selectionStart=0;}t.selectionStart=start;t.selectionEnd=end;if(nav.isIE)set_IE_selection(t);};function get_IE_selection(t){var d=document,div,range,stored_range,elem,scrollTop,relative_top,line_start,line_nb,range_start,range_end,tab;if(t&&t.focused){if(!t.ea_line_height){div=d.createElement("div");div.style.fontFamily=get_css_property(t,"font-family");div.style.fontSize=get_css_property(t,"font-size");div.style.visibility="hidden";div.innerHTML="0";d.body.appendChild(div);t.ea_line_height=div.offsetHeight;d.body.removeChild(div);}range=d.selection.createRange();try{stored_range=range.duplicate();stored_range.moveToElementText(t);stored_range.setEndPoint('EndToEnd',range);if(stored_range.parentElement()==t){elem=t;scrollTop=0;while(elem.parentNode){scrollTop+=elem.scrollTop;elem=elem.parentNode;}relative_top=range.offsetTop-calculeOffsetTop(t)+scrollTop;line_start=Math.round((relative_top / t.ea_line_height)+1);line_nb=Math.round(range.boundingHeight / t.ea_line_height);range_start=stored_range.text.length-range.text.length;tab=t.value.substr(0,range_start).split("\n");range_start+=(line_start-tab.length)*2;t.selectionStart=range_start;range_end=t.selectionStart+range.text.length;tab=t.value.substr(0,range_start+range.text.length).split("\n");range_end+=(line_start+line_nb-1-tab.length)*2;t.selectionEnd=range_end;}}catch(e){}}if(t&&t.id){setTimeout("get_IE_selection(document.getElementById('"+t.id+"'));",50);}};function IE_textarea_focus(){event.srcElement.focused=true;}function IE_textarea_blur(){event.srcElement.focused=false;}function set_IE_selection(t){var nbLineStart,nbLineStart,nbLineEnd,range;if(!window.closed){nbLineStart=t.value.substr(0,t.selectionStart).split("\n").length-1;nbLineEnd=t.value.substr(0,t.selectionEnd).split("\n").length-1;try{range=document.selection.createRange();range.moveToElementText(t);range.setEndPoint('EndToStart',range);range.moveStart('character',t.selectionStart-nbLineStart);range.moveEnd('character',t.selectionEnd-nbLineEnd-(t.selectionStart-nbLineStart));range.select();}catch(e){}}};eAL.waiting_loading["elements_functions.js"]="loaded";
33
+ EAL.prototype.start_resize_area=function(){var d=document,a,div,width,height,father;d.onmouseup=eAL.end_resize_area;d.onmousemove=eAL.resize_area;eAL.toggle(eAL.resize["id"]);a=eAs[eAL.resize["id"]]["textarea"];div=d.getElementById("edit_area_resize");if(!div){div=d.createElement("div");div.id="edit_area_resize";div.style.border="dashed #888888 1px";}width=a.offsetWidth-2;height=a.offsetHeight-2;div.style.display="block";div.style.width=width+"px";div.style.height=height+"px";father=a.parentNode;father.insertBefore(div,a);a.style.display="none";eAL.resize["start_top"]=calculeOffsetTop(div);eAL.resize["start_left"]=calculeOffsetLeft(div);};EAL.prototype.end_resize_area=function(e){var d=document,div,a,width,height;d.onmouseup="";d.onmousemove="";div=d.getElementById("edit_area_resize");a=eAs[eAL.resize["id"]]["textarea"];width=Math.max(eAs[eAL.resize["id"]]["settings"]["min_width"],div.offsetWidth-4);height=Math.max(eAs[eAL.resize["id"]]["settings"]["min_height"],div.offsetHeight-4);if(eAL.isIE==6){width-=2;height-=2;}a.style.width=width+"px";a.style.height=height+"px";div.style.display="none";a.style.display="inline";a.selectionStart=eAL.resize["selectionStart"];a.selectionEnd=eAL.resize["selectionEnd"];eAL.toggle(eAL.resize["id"]);return false;};EAL.prototype.resize_area=function(e){var allow,newHeight,newWidth;allow=eAs[eAL.resize["id"]]["settings"]["allow_resize"];if(allow=="both"||allow=="y"){newHeight=Math.max(20,getMouseY(e)-eAL.resize["start_top"]);document.getElementById("edit_area_resize").style.height=newHeight+"px";}if(allow=="both"||allow=="x"){newWidth=Math.max(20,getMouseX(e)-eAL.resize["start_left"]);document.getElementById("edit_area_resize").style.width=newWidth+"px";}return false;};eAL.waiting_loading["resize_area.js"]="loaded";
34
+ EAL.prototype.get_regexp=function(text_array){res="(\\b)(";for(i=0;i<text_array.length;i++){if(i>0)res+="|";res+=this.get_escaped_regexp(text_array[i]);}res+=")(\\b)";reg=new RegExp(res);return res;};EAL.prototype.get_escaped_regexp=function(str){return str.toString().replace(/(\.|\?|\*|\+|\\|\(|\)|\[|\]|\}|\{|\$|\^|\|)/g,"\\$1");};EAL.prototype.init_syntax_regexp=function(){var lang_style={};for(var lang in this.load_syntax){if(!this.syntax[lang]){this.syntax[lang]={};this.syntax[lang]["keywords_reg_exp"]={};this.keywords_reg_exp_nb=0;if(this.load_syntax[lang]['KEYWORDS']){param="g";if(this.load_syntax[lang]['KEYWORD_CASE_SENSITIVE']===false)param+="i";for(var i in this.load_syntax[lang]['KEYWORDS']){if(typeof(this.load_syntax[lang]['KEYWORDS'][i])=="function")continue;this.syntax[lang]["keywords_reg_exp"][i]=new RegExp(this.get_regexp(this.load_syntax[lang]['KEYWORDS'][i]),param);this.keywords_reg_exp_nb++;}}if(this.load_syntax[lang]['OPERATORS']){var str="";var nb=0;for(var i in this.load_syntax[lang]['OPERATORS']){if(typeof(this.load_syntax[lang]['OPERATORS'][i])=="function")continue;if(nb>0)str+="|";str+=this.get_escaped_regexp(this.load_syntax[lang]['OPERATORS'][i]);nb++;}if(str.length>0)this.syntax[lang]["operators_reg_exp"]=new RegExp("("+str+")","g");}if(this.load_syntax[lang]['DELIMITERS']){var str="";var nb=0;for(var i in this.load_syntax[lang]['DELIMITERS']){if(typeof(this.load_syntax[lang]['DELIMITERS'][i])=="function")continue;if(nb>0)str+="|";str+=this.get_escaped_regexp(this.load_syntax[lang]['DELIMITERS'][i]);nb++;}if(str.length>0)this.syntax[lang]["delimiters_reg_exp"]=new RegExp("("+str+")","g");}var syntax_trace=[];this.syntax[lang]["quotes"]={};var quote_tab=[];if(this.load_syntax[lang]['QUOTEMARKS']){for(var i in this.load_syntax[lang]['QUOTEMARKS']){if(typeof(this.load_syntax[lang]['QUOTEMARKS'][i])=="function")continue;var x=this.get_escaped_regexp(this.load_syntax[lang]['QUOTEMARKS'][i]);this.syntax[lang]["quotes"][x]=x;quote_tab[quote_tab.length]="("+x+"(\\\\.|[^"+x+"])*(?:"+x+"|$))";syntax_trace.push(x);}}this.syntax[lang]["comments"]={};if(this.load_syntax[lang]['COMMENT_SINGLE']){for(var i in this.load_syntax[lang]['COMMENT_SINGLE']){if(typeof(this.load_syntax[lang]['COMMENT_SINGLE'][i])=="function")continue;var x=this.get_escaped_regexp(this.load_syntax[lang]['COMMENT_SINGLE'][i]);quote_tab[quote_tab.length]="("+x+"(.|\\r|\\t)*(\\n|$))";syntax_trace.push(x);this.syntax[lang]["comments"][x]="\n";}}if(this.load_syntax[lang]['COMMENT_MULTI']){for(var i in this.load_syntax[lang]['COMMENT_MULTI']){if(typeof(this.load_syntax[lang]['COMMENT_MULTI'][i])=="function")continue;var start=this.get_escaped_regexp(i);var end=this.get_escaped_regexp(this.load_syntax[lang]['COMMENT_MULTI'][i]);quote_tab[quote_tab.length]="("+start+"(.|\\n|\\r)*?("+end+"|$))";syntax_trace.push(start);syntax_trace.push(end);this.syntax[lang]["comments"][i]=this.load_syntax[lang]['COMMENT_MULTI'][i];}}if(quote_tab.length>0)this.syntax[lang]["comment_or_quote_reg_exp"]=new RegExp("("+quote_tab.join("|")+")","gi");if(syntax_trace.length>0)this.syntax[lang]["syntax_trace_regexp"]=new RegExp("((.|\n)*?)(\\\\*("+syntax_trace.join("|")+"|$))","gmi");if(this.load_syntax[lang]['SCRIPT_DELIMITERS']){this.syntax[lang]["script_delimiters"]={};for(var i in this.load_syntax[lang]['SCRIPT_DELIMITERS']){if(typeof(this.load_syntax[lang]['SCRIPT_DELIMITERS'][i])=="function")continue;this.syntax[lang]["script_delimiters"][i]=this.load_syntax[lang]['SCRIPT_DELIMITERS'];}}this.syntax[lang]["custom_regexp"]={};if(this.load_syntax[lang]['REGEXPS']){for(var i in this.load_syntax[lang]['REGEXPS']){if(typeof(this.load_syntax[lang]['REGEXPS'][i])=="function")continue;var val=this.load_syntax[lang]['REGEXPS'][i];if(!this.syntax[lang]["custom_regexp"][val['execute']])this.syntax[lang]["custom_regexp"][val['execute']]={};this.syntax[lang]["custom_regexp"][val['execute']][i]={'regexp':new RegExp(val['search'],val['modifiers']),'class':val['class']};}}if(this.load_syntax[lang]['STYLES']){lang_style[lang]={};for(var i in this.load_syntax[lang]['STYLES']){if(typeof(this.load_syntax[lang]['STYLES'][i])=="function")continue;if(typeof(this.load_syntax[lang]['STYLES'][i])!="string"){for(var j in this.load_syntax[lang]['STYLES'][i]){lang_style[lang][j]=this.load_syntax[lang]['STYLES'][i][j];}}
35
+ else{lang_style[lang][i]=this.load_syntax[lang]['STYLES'][i];}}}var style="";for(var i in lang_style[lang]){if(lang_style[lang][i].length>0){style+="."+lang+" ."+i.toLowerCase()+" span{"+lang_style[lang][i]+"}\n";style+="."+lang+" ."+i.toLowerCase()+"{"+lang_style[lang][i]+"}\n";}}this.syntax[lang]["styles"]=style;}}};eAL.waiting_loading["reg_syntax.js"]="loaded";
36
+ var editAreaLoader= eAL;var editAreas=eAs;EditAreaLoader=EAL;editAreaLoader.iframe_script= "<script type='text/javascript'> Ã EA(){var t=Á;t.error=Ì;t.inlinePopup=[{popup_id:\"area_search_replace\",icon_id:\"search\"},{popup_id:\"edit_area_help\",icon_id:\"help\"}];t.plugins={};t.line_number=0;È.eAL.set_browser_infos(t);if(t.isIE >=8)t.isIE=7;t.É={};t.last_text_to_highlight=\"\";t.last_hightlighted_text=\"\";t.syntax_list=[];t.allready_used_syntax={};t.check_line_selection_timer=50;t.ÂFocused=Ì;t.highlight_selection_line=null;t.previous=[];t.next=[];t.last_undo=\"\";t.files={};t.filesIdAssoc={};t.curr_file='';t.assocBracket={};t.revertAssocBracket={};t.assocBracket[\"(\"]=\")\";t.assocBracket[\"{\"]=\"}\";t.assocBracket[\"[\"]=\"]\";for(var index in t.assocBracket){t.revertAssocBracket[t.assocBracket[index]]=index;}t.is_editable=Ë;t.lineHeight=16;t.tab_nb_char=8;if(t.isOpera)t.tab_nb_char=6;t.is_tabbing=Ì;t.fullscreen={'isFull':Ì};t.isResizing=Ì;t.id=area_id;t.Å=eAs[t.id][\"Å\"];if((\"\"+t.Å['replace_tab_by_spaces']).match(/^[0-9]+$/)){t.tab_nb_char=t.Å['replace_tab_by_spaces'];t.tabulation=\"\";for(var i=0;i<t.tab_nb_char;i++)t.tabulation+=\" \";}\nelse{t.tabulation=\"\t\";}if(t.Å[\"syntax_selection_allow\"]&&t.Å[\"syntax_selection_allow\"].Æ>0)t.syntax_list=t.Å[\"syntax_selection_allow\"].replace(/ /g,\"\").split(\",\");if(t.Å['syntax'])t.allready_used_syntax[t.Å['syntax']]=Ë;};EA.Ä.init=Ã(){var t=Á,a,s=t.Å;t.Â=_$(\"Â\");t.container=_$(\"container\");t.result=_$(\"result\");t.content_highlight=_$(\"content_highlight\");t.selection_field=_$(\"selection_field\");t.selection_field_text=_$(\"selection_field_text\");t.processing_screen=_$(\"processing\");t.editor_area=_$(\"editor\");t.tab_browsing_area=_$(\"tab_browsing_area\");t.test_font_size=_$(\"test_font_size\");a=t.Â;if(!s['is_editable'])t.set_editable(Ì);t.set_show_line_colors(s['show_line_colors']);if(syntax_selec=_$(\"syntax_selection\")){for(var i=0;i<t.syntax_list.Æ;i++){var syntax=t.syntax_list[i];var option=document.createElement(\"option\");option.Ê=syntax;if(syntax==s['syntax'])option.selected=\"selected\";dispSyntax=È.eAL.syntax_display_name[ syntax ];option.innerHTML=typeof(dispSyntax)=='undefined' ? syntax.substring(0,1).toUpperCase()+syntax.substring(1):dispSyntax;syntax_selec.appendChild(option);}}spans=È.getChildren(_$(\"toolbar_1\"),\"span\",\"\",\"\",\"all\",-1);for(var i=0;i<spans.Æ;i++){id=spans[i].id.replace(/tmp_tool_(.*)/,\"$1\");if(id!=spans[i].id){for(var j in t.plugins){if(typeof(t.plugins[j].get_control_html)==\"Ã\"){html=t.plugins[j].get_control_html(id);if(html!=Ì){html=t.get_translation(html,\"template\");var new_span=document.createElement(\"span\");new_span.innerHTML=html;var father=spans[i].ÈNode;spans[i].ÈNode.replaceChild(new_span,spans[i]);break;}}}}}if(s[\"debug\"]){t.debug=È.document.getElementById(\"edit_area_debug_\"+t.id);}if(_$(\"redo\")!=null)t.switchClassSticky(_$(\"redo\"),'editAreaButtonDisabled',Ë);if(typeof(È.eAL.syntax[s[\"syntax\"]])!=\"undefined\"){for(var i in È.eAL.syntax){if(typeof(È.eAL.syntax[i][\"Çs\"])!=\"undefined\"){t.add_Ç(È.eAL.syntax[i][\"Çs\"]);}}}if(t.isOpera)_$(\"editor\").onkeypress=keyDown;\nelse _$(\"editor\").onkeydown=keyDown;for(var i=0;i<t.inlinePopup.Æ;i++){if(t.isOpera)_$(t.inlinePopup[i][\"popup_id\"]).onkeypress=keyDown;\nelse _$(t.inlinePopup[i][\"popup_id\"]).onkeydown=keyDown;}if(s[\"allow_resize\"]==\"both\"||s[\"allow_resize\"]==\"x\"||s[\"allow_resize\"]==\"y\")t.allow_resize(Ë);È.eAL.toggle(t.id,\"on\");t.change_smooth_selection_mode(eA.smooth_selection);t.execCommand(\"change_highlight\",s[\"start_highlight\"]);t.set_font(eA.Å[\"font_family\"],eA.Å[\"font_size\"]);children=È.getChildren(document.body,\"\",\"selec\",\"none\",\"all\",-1);for(var i=0;i<children.Æ;i++){if(t.isIE)children[i].unselectable=Ë;\nelse children[i].onmousedown=Ã(){return Ì};}a.spellcheck=s[\"gecko_spellcheck\"];if(t.isFirefox >='3'){t.content_highlight.Ç.paddingLeft=\"1px\";t.selection_field.Ç.paddingLeft=\"1px\";t.selection_field_text.Ç.paddingLeft=\"1px\";}if(t.isIE&&t.isIE < 8){a.Ç.marginTop=\"-1px\";}if(t.isSafari){t.editor_area.Ç.position=\"absolute\";a.Ç.marginLeft=\"-3px\";if(t.isSafari < 3.2)a.Ç.marginTop=\"1px\";}È.eAL.add_event(t.result,\"click\",Ã(e){if((e.target||e.srcElement)==eA.result){eA.area_select(eA.Â.Ê.Æ,0);}});if(s['is_multi_files']!=Ì)t.open_file({'id':t.curr_file,'text':''});t.set_word_wrap(s['word_wrap']);setTimeout(\"eA.focus();eA.manage_size();eA.execCommand('EA_load');\",10);t.check_undo();t.check_line_selection(Ë);t.scroll_to_view();for(var i in t.plugins){if(typeof(t.plugins[i].onload)==\"Ã\")t.plugins[i].onload();}if(s['fullscreen']==Ë)t.toggle_full_screen(Ë);È.eAL.add_event(window,\"resize\",eA.update_size);È.eAL.add_event(È.window,\"resize\",eA.update_size);È.eAL.add_event(top.window,\"resize\",eA.update_size);È.eAL.add_event(window,\"unload\",Ã(){if(È.eAL){È.eAL.remove_event(È.window,\"resize\",eA.update_size);È.eAL.remove_event(top.window,\"resize\",eA.update_size);}if(eAs[eA.id]&&eAs[eA.id][\"displayed\"]){eA.execCommand(\"EA_unload\");}});};EA.Ä.update_size=Ã(){var d=document,pd=È.document,height,width,popup,maxLeft,maxTop;if(typeof eAs !='undefined'&&eAs[eA.id]&&eAs[eA.id][\"displayed\"]==Ë){if(eA.fullscreen['isFull']){pd.getElementById(\"frame_\"+eA.id).Ç.width=pd.getElementsByTagName(\"html\")[0].clientWidth+\"px\";pd.getElementById(\"frame_\"+eA.id).Ç.height=pd.getElementsByTagName(\"html\")[0].clientHeight+\"px\";}if(eA.tab_browsing_area.Ç.display=='block'&&(!eA.isIE||eA.isIE >=8)){eA.tab_browsing_area.Ç.height=\"0px\";eA.tab_browsing_area.Ç.height=(eA.result.offsetTop-eA.tab_browsing_area.offsetTop-1)+\"px\";}height=d.body.offsetHeight-eA.get_all_toolbar_height()-4;eA.result.Ç.height=height+\"px\";width=d.body.offsetWidth-2;eA.result.Ç.width=width+\"px\";for(i=0;i < eA.inlinePopup.Æ;i++){popup=_$(eA.inlinePopup[i][\"popup_id\"]);maxLeft=d.body.offsetWidth-popup.offsetWidth;maxTop=d.body.offsetHeight-popup.offsetHeight;if(popup.offsetTop > maxTop)popup.Ç.top=maxTop+\"px\";if(popup.offsetLeft > maxLeft)popup.Ç.left=maxLeft+\"px\";}eA.manage_size(Ë);eA.fixLinesHeight(eA.Â.Ê,0,-1);}};EA.Ä.manage_size=Ã(onlyOneTime){if(!eAs[Á.id])return Ì;if(eAs[Á.id][\"displayed\"]==Ë&&Á.ÂFocused){var area_height,resized=Ì;if(!Á.Å['word_wrap']){var area_width=Á.Â.scrollWidth;area_height=Á.Â.scrollHeight;if(Á.isOpera&&Á.isOpera < 9.6){area_width=10000;}if(Á.Â.previous_scrollWidth!=area_width){Á.container.Ç.width=area_width+\"px\";Á.Â.Ç.width=area_width+\"px\";Á.content_highlight.Ç.width=area_width+\"px\";Á.Â.previous_scrollWidth=area_width;resized=Ë;}}if(Á.Å['word_wrap']){newW=Á.Â.offsetWidth;if(Á.isFirefox||Á.isIE)newW-=2;if(Á.isSafari)newW-=6;Á.content_highlight.Ç.width=Á.selection_field_text.Ç.width=Á.selection_field.Ç.width=Á.test_font_size.Ç.width=newW+\"px\";}if(Á.isOpera||Á.isFirefox||Á.isSafari){area_height=Á.getLinePosTop(Á.É[\"nb_line\"]+1);}\nelse{area_height=Á.Â.scrollHeight;}if(Á.Â.previous_scrollHeight!=area_height){Á.container.Ç.height=(area_height+2)+\"px\";Á.Â.Ç.height=area_height+\"px\";Á.content_highlight.Ç.height=area_height+\"px\";Á.Â.previous_scrollHeight=area_height;resized=Ë;}if(Á.É[\"nb_line\"] >=Á.line_number){var newLines='',destDiv=_$(\"line_number\"),start=Á.line_number,end=Á.É[\"nb_line\"]+100;for(i=start+1;i < end;i++){newLines+='<div id=\"line_'+i+'\">'+i+\"</div>\";Á.line_number++;}destDiv.innerHTML=destDiv.innerHTML+newLines;if(Á.Å['word_wrap']){Á.fixLinesHeight(Á.Â.Ê,start,-1);}}Á.Â.scrollTop=\"0px\";Á.Â.scrollLeft=\"0px\";if(resized==Ë){Á.scroll_to_view();}}if(!onlyOneTime)setTimeout(\"eA.manage_size();\",100);};EA.Ä.execCommand=Ã(cmd,param){for(var i in Á.plugins){if(typeof(Á.plugins[i].execCommand)==\"Ã\"){if(!Á.plugins[i].execCommand(cmd,param))return;}}switch(cmd){case \"save\":if(Á.Å[\"save_callback\"].Æ>0)eval(\"È.\"+Á.Å[\"save_callback\"]+\"('\"+Á.id+\"',eA.Â.Ê);\");break;case \"load\":if(Á.Å[\"load_callback\"].Æ>0)eval(\"È.\"+Á.Å[\"load_callback\"]+\"('\"+Á.id+\"');\");break;case \"onchange\":if(Á.Å[\"change_callback\"].Æ>0)eval(\"È.\"+Á.Å[\"change_callback\"]+\"('\"+Á.id+\"');\");break;case \"EA_load\":if(Á.Å[\"EA_load_callback\"].Æ>0)eval(\"È.\"+Á.Å[\"EA_load_callback\"]+\"('\"+Á.id+\"');\");break;case \"EA_unload\":if(Á.Å[\"EA_unload_callback\"].Æ>0)eval(\"È.\"+Á.Å[\"EA_unload_callback\"]+\"('\"+Á.id+\"');\");break;case \"toggle_on\":if(Á.Å[\"EA_toggle_on_callback\"].Æ>0)eval(\"È.\"+Á.Å[\"EA_toggle_on_callback\"]+\"('\"+Á.id+\"');\");break;case \"toggle_off\":if(Á.Å[\"EA_toggle_off_callback\"].Æ>0)eval(\"È.\"+Á.Å[\"EA_toggle_off_callback\"]+\"('\"+Á.id+\"');\");break;case \"re_sync\":if(!Á.do_highlight)break;case \"file_switch_on\":if(Á.Å[\"EA_file_switch_on_callback\"].Æ>0)eval(\"È.\"+Á.Å[\"EA_file_switch_on_callback\"]+\"(param);\");break;case \"file_switch_off\":if(Á.Å[\"EA_file_switch_off_callback\"].Æ>0)eval(\"È.\"+Á.Å[\"EA_file_switch_off_callback\"]+\"(param);\");break;case \"file_close\":if(Á.Å[\"EA_file_close_callback\"].Æ>0)return eval(\"È.\"+Á.Å[\"EA_file_close_callback\"]+\"(param);\");break;default:if(typeof(eval(\"eA.\"+cmd))==\"Ã\"){if(Á.Å[\"debug\"])eval(\"eA.\"+cmd+\"(param);\");\nelse try{eval(\"eA.\"+cmd+\"(param);\");}catch(e){};}}};EA.Ä.get_translation=Ã(word,mode){if(mode==\"template\")return È.eAL.translate(word,Á.Å[\"language\"],mode);\nelse return È.eAL.get_word_translation(word,Á.Å[\"language\"]);};EA.Ä.add_plugin=Ã(plug_name,plug_obj){for(var i=0;i<Á.Å[\"plugins\"].Æ;i++){if(Á.Å[\"plugins\"][i]==plug_name){Á.plugins[plug_name]=plug_obj;plug_obj.baseURL=È.eAL.baseURL+\"plugins/\"+plug_name+\"/\";if(typeof(plug_obj.init)==\"Ã\")plug_obj.init();}}};EA.Ä.load_css=Ã(url){try{link=document.createElement(\"link\");link.type=\"text/css\";link.rel=\"Çsheet\";link.media=\"all\";link.href=url;head=document.getElementsByTagName(\"head\");head[0].appendChild(link);}catch(e){document.write(\"<link href='\"+url+\"' rel='Çsheet' type='text/css' />\");}};EA.Ä.load_script=Ã(url){try{script=document.createElement(\"script\");script.type=\"text/javascript\";script.src=url;script.charset=\"UTF-8\";head=document.getElementsByTagName(\"head\");head[0].appendChild(script);}catch(e){document.write(\"<script type='text/javascript' src='\"+url+\"' charset=\\\"UTF-8\\\"><\"+\"/script>\");}};EA.Ä.add_lang=Ã(language,Ês){if(!È.eAL.lang[language])È.eAL.lang[language]={};for(var i in Ês)È.eAL.lang[language][i]=Ês[i];};Ã _$(id){return document.getElementById(id);};var eA=new EA();È.eAL.add_event(window,\"load\",init);Ã init(){setTimeout(\"eA.init();\",10);}; EA.Ä.focus=Ã(){Á.Â.focus();Á.ÂFocused=Ë;};EA.Ä.check_line_selection=Ã(timer_checkup){var changes,infos,new_top,new_width,i;var t1=t2=t2_1=t3=tLines=tend=new Date().getTime();if(!eAs[Á.id])return Ì;if(!Á.smooth_selection&&!Á.do_highlight){}\nelse if(Á.ÂFocused&&eAs[Á.id][\"displayed\"]==Ë&&Á.isResizing==Ì){infos=Á.get_selection_infos();changes=Á.checkTextEvolution(typeof(Á.É['full_text'])=='undefined' ? '':Á.É['full_text'],infos['full_text']);t2=new Date().getTime();if(Á.É[\"line_start\"] !=infos[\"line_start\"]||Á.É[\"line_nb\"] !=infos[\"line_nb\"]||infos[\"full_text\"] !=Á.É[\"full_text\"]||Á.reload_highlight||Á.É[\"selectionStart\"] !=infos[\"selectionStart\"]||Á.É[\"selectionEnd\"] !=infos[\"selectionEnd\"]||!timer_checkup){new_top=Á.getLinePosTop(infos[\"line_start\"]);new_width=Math.max(Á.Â.scrollWidth,Á.container.clientWidth-50);Á.selection_field.Ç.top=Á.selection_field_text.Ç.top=new_top+\"px\";if(!Á.Å['word_wrap']){Á.selection_field.Ç.width=Á.selection_field_text.Ç.width=Á.test_font_size.Ç.width=new_width+\"px\";}if(Á.do_highlight==Ë){var curr_text=infos[\"full_text\"].split(\"\\n\");var content=\"\";var start=Math.max(0,infos[\"line_start\"]-1);var end=Math.min(curr_text.Æ,infos[\"line_start\"]+infos[\"line_nb\"]-1);for(i=start;i< end;i++){content+=curr_text[i]+\"\\n\";}selLength=infos['selectionEnd']-infos['selectionStart'];content=content.substr(0,infos[\"curr_pos\"]-1)+\"\\r\\r\"+content.substr(infos[\"curr_pos\"]-1,selLength)+\"\\r\\r\"+content.substr(infos[\"curr_pos\"]-1+selLength);content='<span>'+content.replace(/&/g,\"&amp;\").replace(/</g,\"&lt;\").replace(/>/g,\"&gt;\").replace(\"\\r\\r\",'</span><strong>').replace(\"\\r\\r\",'</strong><span>')+'</span>';if(Á.isIE||(Á.isOpera&&Á.isOpera < 9.6)){Á.selection_field.innerHTML=\"<pre>\"+content.replace(/^\\r?\\n/,\"<br>\")+\"</pre>\";}\nelse{Á.selection_field.innerHTML=content;}Á.selection_field_text.innerHTML=Á.selection_field.innerHTML;t2_1=new Date().getTime();if(Á.reload_highlight||(infos[\"full_text\"] !=Á.last_text_to_highlight&&(Á.É[\"line_start\"]!=infos[\"line_start\"]||Á.show_line_colors||Á.Å['word_wrap']||Á.É[\"line_nb\"]!=infos[\"line_nb\"]||Á.É[\"nb_line\"]!=infos[\"nb_line\"]))){Á.maj_highlight(infos);}}}t3=new Date().getTime();if(Á.Å['word_wrap']&&infos[\"full_text\"] !=Á.É[\"full_text\"]){if(changes.newText.split(\"\\n\").Æ==1&&Á.É['nb_line']&&infos['nb_line']==Á.É['nb_line']){Á.fixLinesHeight(infos['full_text'],changes.lineStart,changes.lineStart);}\nelse{Á.fixLinesHeight(infos['full_text'],changes.lineStart,-1);}}tLines=new Date().getTime();if(infos[\"line_start\"] !=Á.É[\"line_start\"]||infos[\"curr_pos\"] !=Á.É[\"curr_pos\"]||infos[\"full_text\"].Æ!=Á.É[\"full_text\"].Æ||Á.reload_highlight||!timer_checkup){var selec_char=infos[\"curr_line\"].charAt(infos[\"curr_pos\"]-1);var no_real_move=Ë;if(infos[\"line_nb\"]==1&&(Á.assocBracket[selec_char]||Á.revertAssocBracket[selec_char])){no_real_move=Ì;if(Á.findEndBracket(infos,selec_char)===Ë){_$(\"end_bracket\").Ç.visibility=\"visible\";_$(\"cursor_pos\").Ç.visibility=\"visible\";_$(\"cursor_pos\").innerHTML=selec_char;_$(\"end_bracket\").innerHTML=(Á.assocBracket[selec_char]||Á.revertAssocBracket[selec_char]);}\nelse{_$(\"end_bracket\").Ç.visibility=\"hidden\";_$(\"cursor_pos\").Ç.visibility=\"hidden\";}}\nelse{_$(\"cursor_pos\").Ç.visibility=\"hidden\";_$(\"end_bracket\").Ç.visibility=\"hidden\";}Á.displayToCursorPosition(\"cursor_pos\",infos[\"line_start\"],infos[\"curr_pos\"]-1,infos[\"curr_line\"],no_real_move);if(infos[\"line_nb\"]==1&&infos[\"line_start\"]!=Á.É[\"line_start\"])Á.scroll_to_view();}Á.É=infos;}tend=new Date().getTime();if(timer_checkup){setTimeout(\"eA.check_line_selection(Ë)\",Á.check_line_selection_timer);}};EA.Ä.get_selection_infos=Ã(){var sel={},start,end,len,str;Á.getIESelection();start=Á.Â.selectionStart;end=Á.Â.selectionEnd;if(Á.É[\"selectionStart\"]==start&&Á.É[\"selectionEnd\"]==end&&Á.É[\"full_text\"]==Á.Â.Ê){return Á.É;}if(Á.tabulation!=\"\t\"&&Á.Â.Ê.indexOf(\"\t\")!=-1){len=Á.Â.Ê.Æ;Á.Â.Ê=Á.replace_tab(Á.Â.Ê);start=end=start+(Á.Â.Ê.Æ-len);Á.area_select(start,0);}sel[\"selectionStart\"]=start;sel[\"selectionEnd\"]=end;sel[\"full_text\"]=Á.Â.Ê;sel[\"line_start\"]=1;sel[\"line_nb\"]=1;sel[\"curr_pos\"]=0;sel[\"curr_line\"]=\"\";sel[\"indexOfCursor\"]=0;sel[\"selec_direction\"]=Á.É[\"selec_direction\"];var splitTab=sel[\"full_text\"].split(\"\\n\");var nbLine=Math.max(0,splitTab.Æ);var nbChar=Math.max(0,sel[\"full_text\"].Æ-(nbLine-1));if(sel[\"full_text\"].indexOf(\"\\r\")!=-1)nbChar=nbChar-(nbLine-1);sel[\"nb_line\"]=nbLine;sel[\"nb_char\"]=nbChar;if(start>0){str=sel[\"full_text\"].substr(0,start);sel[\"curr_pos\"]=start-str.lastIndexOf(\"\\n\");sel[\"line_start\"]=Math.max(1,str.split(\"\\n\").Æ);}\nelse{sel[\"curr_pos\"]=1;}if(end>start){sel[\"line_nb\"]=sel[\"full_text\"].substring(start,end).split(\"\\n\").Æ;}sel[\"indexOfCursor\"]=start;sel[\"curr_line\"]=splitTab[Math.max(0,sel[\"line_start\"]-1)];if(sel[\"selectionStart\"]==Á.É[\"selectionStart\"]){if(sel[\"selectionEnd\"]>Á.É[\"selectionEnd\"])sel[\"selec_direction\"]=\"down\";\nelse if(sel[\"selectionEnd\"]==Á.É[\"selectionStart\"])sel[\"selec_direction\"]=Á.É[\"selec_direction\"];}\nelse if(sel[\"selectionStart\"]==Á.É[\"selectionEnd\"]&&sel[\"selectionEnd\"]>Á.É[\"selectionEnd\"]){sel[\"selec_direction\"]=\"down\";}\nelse{sel[\"selec_direction\"]=\"up\";}_$(\"nbLine\").innerHTML=nbLine;_$(\"nbChar\").innerHTML=nbChar;_$(\"linePos\").innerHTML=sel[\"line_start\"];_$(\"currPos\").innerHTML=sel[\"curr_pos\"];return sel;};EA.Ä.getIESelection=Ã(){var selectionStart,selectionEnd,range,stored_range;if(!Á.isIE)return Ì;if(Á.Å['word_wrap'])Á.Â.wrap='off';try{range=document.selection.createRange();stored_range=range.duplicate();stored_range.moveToElementText(Á.Â);stored_range.setEndPoint('EndToEnd',range);if(stored_range.ÈElement()!=Á.Â)throw \"invalid focus\";var scrollTop=Á.result.scrollTop+document.body.scrollTop;var relative_top=range.offsetTop-È.calculeOffsetTop(Á.Â)+scrollTop;var line_start=Math.round((relative_top / Á.lineHeight)+1);var line_nb=Math.round(range.boundingHeight / Á.lineHeight);selectionStart=stored_range.text.Æ-range.text.Æ;selectionStart+=(line_start-Á.Â.Ê.substr(0,selectionStart).split(\"\\n\").Æ)*2;selectionStart-=(line_start-Á.Â.Ê.substr(0,selectionStart).split(\"\\n\").Æ)* 2;selectionEnd=selectionStart+range.text.Æ;selectionEnd+=(line_start+line_nb-1-Á.Â.Ê.substr(0,selectionEnd).split(\"\\n\").Æ)*2;Á.Â.selectionStart=selectionStart;Á.Â.selectionEnd=selectionEnd;}catch(e){}if(Á.Å['word_wrap'])Á.Â.wrap='soft';};EA.Ä.setIESelection=Ã(){var a=Á.Â,nbLineStart,nbLineEnd,range;if(!Á.isIE)return Ì;nbLineStart=a.Ê.substr(0,a.selectionStart).split(\"\\n\").Æ-1;nbLineEnd=a.Ê.substr(0,a.selectionEnd).split(\"\\n\").Æ-1;range=document.selection.createRange();range.moveToElementText(a);range.setEndPoint('EndToStart',range);range.moveStart('character',a.selectionStart-nbLineStart);range.moveEnd('character',a.selectionEnd-nbLineEnd-(a.selectionStart-nbLineStart));range.select();};EA.Ä.checkTextEvolution=Ã(lastText,newText){var ch={},baseStep=200,cpt=0,end,step,tStart=new Date().getTime();end=Math.min(newText.Æ,lastText.Æ);step=baseStep;while(cpt<end&&step>=1){if(lastText.substr(cpt,step)==newText.substr(cpt,step)){cpt+=step;}\nelse{step=Math.floor(step/2);}}ch.posStart=cpt;ch.lineStart=newText.substr(0,ch.posStart).split(\"\\n\").Æ-1;cpt_last=lastText.Æ;cpt=newText.Æ;step=baseStep;while(cpt>=0&&cpt_last>=0&&step>=1){if(lastText.substr(cpt_last-step,step)==newText.substr(cpt-step,step)){cpt-=step;cpt_last-=step;}\nelse{step=Math.floor(step/2);}}ch.posNewEnd=cpt;ch.posLastEnd=cpt_last;if(ch.posNewEnd<=ch.posStart){if(lastText.Æ < newText.Æ){ch.posNewEnd=ch.posStart+newText.Æ-lastText.Æ;ch.posLastEnd=ch.posStart;}\nelse{ch.posLastEnd=ch.posStart+lastText.Æ-newText.Æ;ch.posNewEnd=ch.posStart;}}ch.newText=newText.substring(ch.posStart,ch.posNewEnd);ch.lastText=lastText.substring(ch.posStart,ch.posLastEnd);ch.lineNewEnd=newText.substr(0,ch.posNewEnd).split(\"\\n\").Æ-1;ch.lineLastEnd=lastText.substr(0,ch.posLastEnd).split(\"\\n\").Æ-1;ch.newTextLine=newText.split(\"\\n\").slice(ch.lineStart,ch.lineNewEnd+1).join(\"\\n\");ch.lastTextLine=lastText.split(\"\\n\").slice(ch.lineStart,ch.lineLastEnd+1).join(\"\\n\");return ch;};EA.Ä.tab_selection=Ã(){if(Á.is_tabbing)return;Á.is_tabbing=Ë;Á.getIESelection();var start=Á.Â.selectionStart;var end=Á.Â.selectionEnd;var insText=Á.Â.Ê.substring(start,end);var pos_start=start;var pos_end=end;if(insText.Æ==0){Á.Â.Ê=Á.Â.Ê.substr(0,start)+Á.tabulation+Á.Â.Ê.substr(end);pos_start=start+Á.tabulation.Æ;pos_end=pos_start;}\nelse{start=Math.max(0,Á.Â.Ê.substr(0,start).lastIndexOf(\"\\n\")+1);endText=Á.Â.Ê.substr(end);startText=Á.Â.Ê.substr(0,start);tmp=Á.Â.Ê.substring(start,end).split(\"\\n\");insText=Á.tabulation+tmp.join(\"\\n\"+Á.tabulation);Á.Â.Ê=startText+insText+endText;pos_start=start;pos_end=Á.Â.Ê.indexOf(\"\\n\",startText.Æ+insText.Æ);if(pos_end==-1)pos_end=Á.Â.Ê.Æ;}Á.Â.selectionStart=pos_start;Á.Â.selectionEnd=pos_end;if(Á.isIE){Á.setIESelection();setTimeout(\"eA.is_tabbing=Ì;\",100);}\nelse{Á.is_tabbing=Ì;}};EA.Ä.invert_tab_selection=Ã(){var t=Á,a=Á.Â;if(t.is_tabbing)return;t.is_tabbing=Ë;t.getIESelection();var start=a.selectionStart;var end=a.selectionEnd;var insText=a.Ê.substring(start,end);var pos_start=start;var pos_end=end;if(insText.Æ==0){if(a.Ê.substring(start-t.tabulation.Æ,start)==t.tabulation){a.Ê=a.Ê.substr(0,start-t.tabulation.Æ)+a.Ê.substr(end);pos_start=Math.max(0,start-t.tabulation.Æ);pos_end=pos_start;}}\nelse{start=a.Ê.substr(0,start).lastIndexOf(\"\\n\")+1;endText=a.Ê.substr(end);startText=a.Ê.substr(0,start);tmp=a.Ê.substring(start,end).split(\"\\n\");insText=\"\";for(i=0;i<tmp.Æ;i++){for(j=0;j<t.tab_nb_char;j++){if(tmp[i].charAt(0)==\"\t\"){tmp[i]=tmp[i].substr(1);j=t.tab_nb_char;}\nelse if(tmp[i].charAt(0)==\" \")tmp[i]=tmp[i].substr(1);}insText+=tmp[i];if(i<tmp.Æ-1)insText+=\"\\n\";}a.Ê=startText+insText+endText;pos_start=start;pos_end=a.Ê.indexOf(\"\\n\",startText.Æ+insText.Æ);if(pos_end==-1)pos_end=a.Ê.Æ;}a.selectionStart=pos_start;a.selectionEnd=pos_end;if(t.isIE){t.setIESelection();setTimeout(\"eA.is_tabbing=Ì;\",100);}\nelse t.is_tabbing=Ì;};EA.Ä.press_enter=Ã(){if(!Á.smooth_selection)return Ì;Á.getIESelection();var scrollTop=Á.result.scrollTop;var scrollLeft=Á.result.scrollLeft;var start=Á.Â.selectionStart;var end=Á.Â.selectionEnd;var start_last_line=Math.max(0,Á.Â.Ê.substring(0,start).lastIndexOf(\"\\n\")+1);var begin_line=Á.Â.Ê.substring(start_last_line,start).replace(/^([ \t]*).*/gm,\"$1\");var lineStart=Á.Â.Ê.substring(0,start).split(\"\\n\").Æ;if(begin_line==\"\\n\"||begin_line==\"\\r\"||begin_line.Æ==0){return Ì;}if(Á.isIE||(Á.isOpera&&Á.isOpera < 9.6)){begin_line=\"\\r\\n\"+begin_line;}\nelse{begin_line=\"\\n\"+begin_line;}Á.Â.Ê=Á.Â.Ê.substring(0,start)+begin_line+Á.Â.Ê.substring(end);Á.area_select(start+begin_line.Æ,0);if(Á.isIE){Á.result.scrollTop=scrollTop;Á.result.scrollLeft=scrollLeft;}return Ë;};EA.Ä.findEndBracket=Ã(infos,bracket){var start=infos[\"indexOfCursor\"];var normal_order=Ë;if(Á.assocBracket[bracket])endBracket=Á.assocBracket[bracket];\nelse if(Á.revertAssocBracket[bracket]){endBracket=Á.revertAssocBracket[bracket];normal_order=Ì;}var end=-1;var nbBracketOpen=0;for(var i=start;i<infos[\"full_text\"].Æ&&i>=0;){if(infos[\"full_text\"].charAt(i)==endBracket){nbBracketOpen--;if(nbBracketOpen<=0){end=i;break;}}\nelse if(infos[\"full_text\"].charAt(i)==bracket)nbBracketOpen++;if(normal_order)i++;\nelse i--;}if(end==-1)return Ì;var endLastLine=infos[\"full_text\"].substr(0,end).lastIndexOf(\"\\n\");if(endLastLine==-1)line=1;\nelse line=infos[\"full_text\"].substr(0,endLastLine).split(\"\\n\").Æ+1;var curPos=end-endLastLine-1;var endLineLength=infos[\"full_text\"].substring(end).split(\"\\n\")[0].Æ;Á.displayToCursorPosition(\"end_bracket\",line,curPos,infos[\"full_text\"].substring(endLastLine+1,end+endLineLength));return Ë;};EA.Ä.displayToCursorPosition=Ã(id,start_line,cur_pos,lineContent,no_real_move){var elem,dest,content,posLeft=0,posTop,fixPadding,topOffset,endElem;elem=Á.test_font_size;dest=_$(id);content=\"<span id='test_font_size_inner'>\"+lineContent.substr(0,cur_pos).replace(/&/g,\"&amp;\").replace(/</g,\"&lt;\")+\"</span><span id='endTestFont'>\"+lineContent.substr(cur_pos).replace(/&/g,\"&amp;\").replace(/</g,\"&lt;\")+\"</span>\";if(Á.isIE||(Á.isOpera&&Á.isOpera < 9.6)){elem.innerHTML=\"<pre>\"+content.replace(/^\\r?\\n/,\"<br>\")+\"</pre>\";}\nelse{elem.innerHTML=content;}endElem=_$('endTestFont');topOffset=endElem.offsetTop;fixPadding=parseInt(Á.content_highlight.Ç.paddingLeft.replace(\"px\",\"\"));posLeft=45+endElem.offsetLeft+(!isNaN(fixPadding)&&topOffset > 0 ? fixPadding:0);posTop=Á.getLinePosTop(start_line)+topOffset;if(Á.isIE&&cur_pos > 0&&endElem.offsetLeft==0){posTop+=Á.lineHeight;}if(no_real_move!=Ë){dest.Ç.top=posTop+\"px\";dest.Ç.left=posLeft+\"px\";}dest.cursor_top=posTop;dest.cursor_left=posLeft;};EA.Ä.getLinePosTop=Ã(start_line){var elem=_$('line_'+start_line),posTop=0;if(elem)posTop=elem.offsetTop;\nelse posTop=Á.lineHeight *(start_line-1);return posTop;};EA.Ä.getTextHeight=Ã(text){var t=Á,elem,height;elem=t.test_font_size;content=text.replace(/&/g,\"&amp;\").replace(/</g,\"&lt;\");if(t.isIE||(Á.isOpera&&Á.isOpera < 9.6)){elem.innerHTML=\"<pre>\"+content.replace(/^\\r?\\n/,\"<br>\")+\"</pre>\";}\nelse{elem.innerHTML=content;}height=elem.offsetHeight;height=Math.max(1,Math.floor(elem.offsetHeight / Á.lineHeight))* Á.lineHeight;return height;};EA.Ä.fixLinesHeight=Ã(textValue,lineStart,lineEnd){var aText=textValue.split(\"\\n\");if(lineEnd==-1)lineEnd=aText.Æ-1;for(var i=Math.max(0,lineStart);i <=lineEnd;i++){if(elem=_$('line_'+(i+1))){elem.Ç.height=typeof(aText[i])!=\"undefined\" ? Á.getTextHeight(aText[i])+\"px\":Á.lineHeight;}}};EA.Ä.area_select=Ã(start,Æ){Á.Â.focus();start=Math.max(0,Math.min(Á.Â.Ê.Æ,start));end=Math.max(start,Math.min(Á.Â.Ê.Æ,start+Æ));if(Á.isIE){Á.Â.selectionStart=start;Á.Â.selectionEnd=end;Á.setIESelection();}\nelse{if(Á.isOpera&&Á.isOpera < 9.6){Á.Â.setSelectionRange(0,0);}Á.Â.setSelectionRange(start,end);}Á.check_line_selection();};EA.Ä.area_get_selection=Ã(){var text=\"\";if(document.selection){var range=document.selection.createRange();text=range.text;}\nelse{text=Á.Â.Ê.substring(Á.Â.selectionStart,Á.Â.selectionEnd);}return text;}; EA.Ä.replace_tab=Ã(text){return text.replace(/((\\n?)([^\t\\n]*)\t)/gi,eA.smartTab);};EA.Ä.smartTab=Ã(){val=\" \";return EA.Ä.smartTab.arguments[2]+EA.Ä.smartTab.arguments[3]+val.substr(0,eA.tab_nb_char-(EA.Ä.smartTab.arguments[3].Æ)%eA.tab_nb_char);};EA.Ä.show_waiting_screen=Ã(){width=Á.editor_area.offsetWidth;height=Á.editor_area.offsetHeight;if(!(Á.isIE&&Á.isIE<6)){width-=2;height-=2;}Á.processing_screen.Ç.display=\"block\";Á.processing_screen.Ç.width=width+\"px\";Á.processing_screen.Ç.height=height+\"px\";Á.waiting_screen_displayed=Ë;};EA.Ä.hide_waiting_screen=Ã(){Á.processing_screen.Ç.display=\"none\";Á.waiting_screen_displayed=Ì;};EA.Ä.add_Ç=Ã(Çs){if(Çs.Æ>0){newcss=document.createElement(\"Ç\");newcss.type=\"text/css\";newcss.media=\"all\";if(newcss.ÇSheet){newcss.ÇSheet.cssText=Çs;}\nelse{newcss.appendChild(document.createTextNode(Çs));}document.getElementsByTagName(\"head\")[0].appendChild(newcss);}};EA.Ä.set_font=Ã(family,size){var t=Á,a=Á.Â,s=Á.Å,elem_font,i,elem;var elems=[\"Â\",\"content_highlight\",\"cursor_pos\",\"end_bracket\",\"selection_field\",\"selection_field_text\",\"line_number\"];if(family&&family!=\"\")s[\"font_family\"]=family;if(size&&size>0)s[\"font_size\"]=size;if(t.isOpera&&t.isOpera < 9.6)s['font_family']=\"monospace\";if(elem_font=_$(\"area_font_size\")){for(i=0;i < elem_font.Æ;i++){if(elem_font.options[i].Ê&&elem_font.options[i].Ê==s[\"font_size\"])elem_font.options[i].selected=Ë;}}if(t.isFirefox){var nbTry=3;do{var div1=document.createElement('div'),text1=document.createElement('Â');var Çs={width:'40px',overflow:'scroll',zIndex:50,visibility:'hidden',fontFamily:s[\"font_family\"],fontSize:s[\"font_size\"]+\"pt\",lineHeight:t.lineHeight+\"px\",padding:'0',margin:'0',border:'none',whiteSpace:'nowrap'};var diff,changed=Ì;for(i in Çs){div1.Ç[ i ]=Çs[i];text1.Ç[ i ]=Çs[i];}text1.wrap='off';text1.setAttribute('wrap','off');t.container.appendChild(div1);t.container.appendChild(text1);div1.innerHTML=text1.Ê='azertyuiopqsdfghjklm';div1.innerHTML=text1.Ê=text1.Ê+'wxcvbn^p*ù$!:;,,';diff=text1.scrollWidth-div1.scrollWidth;if(Math.abs(diff)>=2){s[\"font_size\"]++;changed=Ë;}t.container.removeChild(div1);t.container.removeChild(text1);nbTry--;}while(changed&&nbTry > 0);}elem=t.test_font_size;elem.Ç.fontFamily=\"\"+s[\"font_family\"];elem.Ç.fontSize=s[\"font_size\"]+\"pt\";elem.innerHTML=\"0\";t.lineHeight=elem.offsetHeight;for(i=0;i<elems.Æ;i++){elem=_$(elems[i]);elem.Ç.fontFamily=s[\"font_family\"];elem.Ç.fontSize=s[\"font_size\"]+\"pt\";elem.Ç.lineHeight=t.lineHeight+\"px\";}t.add_Ç(\"pre{font-family:\"+s[\"font_family\"]+\"}\");if((t.isOpera&&t.isOpera < 9.6)||t.isIE >=8){var parNod=a.ÈNode,nxtSib=a.nextSibling,start=a.selectionStart,end=a.selectionEnd;parNod.removeChild(a);parNod.insertBefore(a,nxtSib);t.area_select(start,end-start);}Á.focus();Á.update_size();Á.check_line_selection();};EA.Ä.change_font_size=Ã(){var size=_$(\"area_font_size\").Ê;if(size>0)Á.set_font(\"\",size);};EA.Ä.open_inline_popup=Ã(popup_id){Á.close_all_inline_popup();var popup=_$(popup_id);var editor=_$(\"editor\");for(var i=0;i<Á.inlinePopup.Æ;i++){if(Á.inlinePopup[i][\"popup_id\"]==popup_id){var icon=_$(Á.inlinePopup[i][\"icon_id\"]);if(icon){Á.switchClassSticky(icon,'editAreaButtonSelected',Ë);break;}}}popup.Ç.height=\"auto\";popup.Ç.overflow=\"visible\";if(document.body.offsetHeight< popup.offsetHeight){popup.Ç.height=(document.body.offsetHeight-10)+\"px\";popup.Ç.overflow=\"auto\";}if(!popup.positionned){var new_left=editor.offsetWidth /2-popup.offsetWidth /2;var new_top=editor.offsetHeight /2-popup.offsetHeight /2;popup.Ç.left=new_left+\"px\";popup.Ç.top=new_top+\"px\";popup.positionned=Ë;}popup.Ç.visibility=\"visible\";};EA.Ä.close_inline_popup=Ã(popup_id){var popup=_$(popup_id);for(var i=0;i<Á.inlinePopup.Æ;i++){if(Á.inlinePopup[i][\"popup_id\"]==popup_id){var icon=_$(Á.inlinePopup[i][\"icon_id\"]);if(icon){Á.switchClassSticky(icon,'editAreaButtonNormal',Ì);break;}}}popup.Ç.visibility=\"hidden\";};EA.Ä.close_all_inline_popup=Ã(e){for(var i=0;i<Á.inlinePopup.Æ;i++){Á.close_inline_popup(Á.inlinePopup[i][\"popup_id\"]);}Á.Â.focus();};EA.Ä.show_help=Ã(){Á.open_inline_popup(\"edit_area_help\");};EA.Ä.new_document=Ã(){Á.Â.Ê=\"\";Á.area_select(0,0);};EA.Ä.get_all_toolbar_height=Ã(){var area=_$(\"editor\");var results=È.getChildren(area,\"div\",\"class\",\"area_toolbar\",\"all\",\"0\");var height=0;for(var i=0;i<results.Æ;i++){height+=results[i].offsetHeight;}return height;};EA.Ä.go_to_line=Ã(line){if(!line){var icon=_$(\"go_to_line\");if(icon !=null){Á.restoreClass(icon);Á.switchClassSticky(icon,'editAreaButtonSelected',Ë);}line=prompt(Á.get_translation(\"go_to_line_prompt\"));if(icon !=null)Á.switchClassSticky(icon,'editAreaButtonNormal',Ì);}if(line&&line!=null&&line.search(/^[0-9]+$/)!=-1){var start=0;var lines=Á.Â.Ê.split(\"\\n\");if(line > lines.Æ)start=Á.Â.Ê.Æ;\nelse{for(var i=0;i<Math.min(line-1,lines.Æ);i++)start+=lines[i].Æ+1;}Á.area_select(start,0);}};EA.Ä.change_smooth_selection_mode=Ã(setTo){if(Á.do_highlight)return;if(setTo !=null){if(setTo===Ì)Á.smooth_selection=Ë;\nelse Á.smooth_selection=Ì;}var icon=_$(\"change_smooth_selection\");Á.Â.focus();if(Á.smooth_selection===Ë){Á.switchClassSticky(icon,'editAreaButtonNormal',Ì);Á.smooth_selection=Ì;Á.selection_field.Ç.display=\"none\";_$(\"cursor_pos\").Ç.display=\"none\";_$(\"end_bracket\").Ç.display=\"none\";}\nelse{Á.switchClassSticky(icon,'editAreaButtonSelected',Ì);Á.smooth_selection=Ë;Á.selection_field.Ç.display=\"block\";_$(\"cursor_pos\").Ç.display=\"block\";_$(\"end_bracket\").Ç.display=\"block\";}};EA.Ä.scroll_to_view=Ã(show){var zone,lineElem;if(!Á.smooth_selection)return;zone=_$(\"result\");var cursor_pos_top=_$(\"cursor_pos\").cursor_top;if(show==\"bottom\"){cursor_pos_top+=Á.getLinePosTop(Á.É['line_start']+Á.É['line_nb']-1);}var max_height_visible=zone.clientHeight+zone.scrollTop;var miss_top=cursor_pos_top+Á.lineHeight-max_height_visible;if(miss_top>0){zone.scrollTop=zone.scrollTop+miss_top;}\nelse if(zone.scrollTop > cursor_pos_top){zone.scrollTop=cursor_pos_top;}var cursor_pos_left=_$(\"cursor_pos\").cursor_left;var max_width_visible=zone.clientWidth+zone.scrollLeft;var miss_left=cursor_pos_left+10-max_width_visible;if(miss_left>0){zone.scrollLeft=zone.scrollLeft+miss_left+50;}\nelse if(zone.scrollLeft > cursor_pos_left){zone.scrollLeft=cursor_pos_left;}\nelse if(zone.scrollLeft==45){zone.scrollLeft=0;}};EA.Ä.check_undo=Ã(only_once){if(!eAs[Á.id])return Ì;if(Á.ÂFocused&&eAs[Á.id][\"displayed\"]==Ë){var text=Á.Â.Ê;if(Á.previous.Æ<=1)Á.switchClassSticky(_$(\"undo\"),'editAreaButtonDisabled',Ë);if(!Á.previous[Á.previous.Æ-1]||Á.previous[Á.previous.Æ-1][\"text\"] !=text){Á.previous.push({\"text\":text,\"selStart\":Á.Â.selectionStart,\"selEnd\":Á.Â.selectionEnd});if(Á.previous.Æ > Á.Å[\"max_undo\"]+1)Á.previous.shift();}if(Á.previous.Æ >=2)Á.switchClassSticky(_$(\"undo\"),'editAreaButtonNormal',Ì);}if(!only_once)setTimeout(\"eA.check_undo()\",3000);};EA.Ä.undo=Ã(){if(Á.previous.Æ > 0){Á.getIESelection();Á.next.push({\"text\":Á.Â.Ê,\"selStart\":Á.Â.selectionStart,\"selEnd\":Á.Â.selectionEnd});var prev=Á.previous.pop();if(prev[\"text\"]==Á.Â.Ê&&Á.previous.Æ > 0)prev=Á.previous.pop();Á.Â.Ê=prev[\"text\"];Á.last_undo=prev[\"text\"];Á.area_select(prev[\"selStart\"],prev[\"selEnd\"]-prev[\"selStart\"]);Á.switchClassSticky(_$(\"redo\"),'editAreaButtonNormal',Ì);Á.resync_highlight(Ë);Á.check_file_changes();}};EA.Ä.redo=Ã(){if(Á.next.Æ > 0){var next=Á.next.pop();Á.previous.push(next);Á.Â.Ê=next[\"text\"];Á.last_undo=next[\"text\"];Á.area_select(next[\"selStart\"],next[\"selEnd\"]-next[\"selStart\"]);Á.switchClassSticky(_$(\"undo\"),'editAreaButtonNormal',Ì);Á.resync_highlight(Ë);Á.check_file_changes();}if(Á.next.Æ==0)Á.switchClassSticky(_$(\"redo\"),'editAreaButtonDisabled',Ë);};EA.Ä.check_redo=Ã(){if(eA.next.Æ==0||eA.Â.Ê!=eA.last_undo){eA.next=[];eA.switchClassSticky(_$(\"redo\"),'editAreaButtonDisabled',Ë);}\nelse{Á.switchClassSticky(_$(\"redo\"),'editAreaButtonNormal',Ì);}};EA.Ä.switchClass=Ã(element,class_name,lock_state){var lockChanged=Ì;if(typeof(lock_state)!=\"undefined\"&&element !=null){element.classLock=lock_state;lockChanged=Ë;}if(element !=null&&(lockChanged||!element.classLock)){element.oldClassName=element.className;element.className=class_name;}};EA.Ä.restoreAndSwitchClass=Ã(element,class_name){if(element !=null&&!element.classLock){Á.restoreClass(element);Á.switchClass(element,class_name);}};EA.Ä.restoreClass=Ã(element){if(element !=null&&element.oldClassName&&!element.classLock){element.className=element.oldClassName;element.oldClassName=null;}};EA.Ä.setClassLock=Ã(element,lock_state){if(element !=null)element.classLock=lock_state;};EA.Ä.switchClassSticky=Ã(element,class_name,lock_state){var lockChanged=Ì;if(typeof(lock_state)!=\"undefined\"&&element !=null){element.classLock=lock_state;lockChanged=Ë;}if(element !=null&&(lockChanged||!element.classLock)){element.className=class_name;element.oldClassName=class_name;}};EA.Ä.scroll_page=Ã(params){var dir=params[\"dir\"],shift_pressed=params[\"shift\"];var lines=Á.Â.Ê.split(\"\\n\");var new_pos=0,Æ=0,char_left=0,line_nb=0,curLine=0;var toScrollAmount=_$(\"result\").clientHeight-30;var nbLineToScroll=0,diff=0;if(dir==\"up\"){nbLineToScroll=Math.ceil(toScrollAmount / Á.lineHeight);for(i=Á.É[\"line_start\"];i-diff > Á.É[\"line_start\"]-nbLineToScroll;i--){if(elem=_$('line_'+i)){diff+=Math.floor((elem.offsetHeight-1)/ Á.lineHeight);}}nbLineToScroll-=diff;if(Á.É[\"selec_direction\"]==\"up\"){for(line_nb=0;line_nb< Math.min(Á.É[\"line_start\"]-nbLineToScroll,lines.Æ);line_nb++){new_pos+=lines[line_nb].Æ+1;}char_left=Math.min(lines[Math.min(lines.Æ-1,line_nb)].Æ,Á.É[\"curr_pos\"]-1);if(shift_pressed)Æ=Á.É[\"selectionEnd\"]-new_pos-char_left;Á.area_select(new_pos+char_left,Æ);view=\"top\";}\nelse{view=\"bottom\";for(line_nb=0;line_nb< Math.min(Á.É[\"line_start\"]+Á.É[\"line_nb\"]-1-nbLineToScroll,lines.Æ);line_nb++){new_pos+=lines[line_nb].Æ+1;}char_left=Math.min(lines[Math.min(lines.Æ-1,line_nb)].Æ,Á.É[\"curr_pos\"]-1);if(shift_pressed){start=Math.min(Á.É[\"selectionStart\"],new_pos+char_left);Æ=Math.max(new_pos+char_left,Á.É[\"selectionStart\"])-start;if(new_pos+char_left < Á.É[\"selectionStart\"])view=\"top\";}\nelse start=new_pos+char_left;Á.area_select(start,Æ);}}\nelse{var nbLineToScroll=Math.floor(toScrollAmount / Á.lineHeight);for(i=Á.É[\"line_start\"];i+diff < Á.É[\"line_start\"]+nbLineToScroll;i++){if(elem=_$('line_'+i)){diff+=Math.floor((elem.offsetHeight-1)/ Á.lineHeight);}}nbLineToScroll-=diff;if(Á.É[\"selec_direction\"]==\"down\"){view=\"bottom\";for(line_nb=0;line_nb< Math.min(Á.É[\"line_start\"]+Á.É[\"line_nb\"]-2+nbLineToScroll,lines.Æ);line_nb++){if(line_nb==Á.É[\"line_start\"]-1)char_left=Á.É[\"selectionStart\"]-new_pos;new_pos+=lines[line_nb].Æ+1;}if(shift_pressed){Æ=Math.abs(Á.É[\"selectionStart\"]-new_pos);Æ+=Math.min(lines[Math.min(lines.Æ-1,line_nb)].Æ,Á.É[\"curr_pos\"]);Á.area_select(Math.min(Á.É[\"selectionStart\"],new_pos),Æ);}\nelse{Á.area_select(new_pos+char_left,0);}}\nelse{view=\"top\";for(line_nb=0;line_nb< Math.min(Á.É[\"line_start\"]+nbLineToScroll-1,lines.Æ,lines.Æ);line_nb++){if(line_nb==Á.É[\"line_start\"]-1)char_left=Á.É[\"selectionStart\"]-new_pos;new_pos+=lines[line_nb].Æ+1;}if(shift_pressed){Æ=Math.abs(Á.É[\"selectionEnd\"]-new_pos-char_left);Æ+=Math.min(lines[Math.min(lines.Æ-1,line_nb)].Æ,Á.É[\"curr_pos\"])-char_left-1;Á.area_select(Math.min(Á.É[\"selectionEnd\"],new_pos+char_left),Æ);if(new_pos+char_left > Á.É[\"selectionEnd\"])view=\"bottom\";}\nelse{Á.area_select(new_pos+char_left,0);}}}Á.check_line_selection();Á.scroll_to_view(view);};EA.Ä.start_resize=Ã(e){È.eAL.resize[\"id\"]=eA.id;È.eAL.resize[\"start_x\"]=(e)? e.pageX:event.x+document.body.scrollLeft;È.eAL.resize[\"start_y\"]=(e)? e.pageY:event.y+document.body.scrollTop;if(eA.isIE){eA.Â.focus();eA.getIESelection();}È.eAL.resize[\"selectionStart\"]=eA.Â.selectionStart;È.eAL.resize[\"selectionEnd\"]=eA.Â.selectionEnd;È.eAL.start_resize_area();};EA.Ä.toggle_full_screen=Ã(to){var t=Á,p=È,a=t.Â,html,frame,selStart,selEnd,old,icon;if(typeof(to)==\"undefined\")to=!t.fullscreen['isFull'];old=t.fullscreen['isFull'];t.fullscreen['isFull']=to;icon=_$(\"fullscreen\");selStart=t.Â.selectionStart;selEnd=t.Â.selectionEnd;html=p.document.getElementsByTagName(\"html\")[0];frame=p.document.getElementById(\"frame_\"+t.id);if(to&&to!=old){t.fullscreen['old_overflow']=p.get_css_property(html,\"overflow\");t.fullscreen['old_height']=p.get_css_property(html,\"height\");t.fullscreen['old_width']=p.get_css_property(html,\"width\");t.fullscreen['old_scrollTop']=html.scrollTop;t.fullscreen['old_scrollLeft']=html.scrollLeft;t.fullscreen['old_zIndex']=p.get_css_property(frame,\"z-index\");if(t.isOpera){html.Ç.height=\"100%\";html.Ç.width=\"100%\";}html.Ç.overflow=\"hidden\";html.scrollTop=0;html.scrollLeft=0;frame.Ç.position=\"absolute\";frame.Ç.width=html.clientWidth+\"px\";frame.Ç.height=html.clientHeight+\"px\";frame.Ç.display=\"block\";frame.Ç.zIndex=\"999999\";frame.Ç.top=\"0px\";frame.Ç.left=\"0px\";frame.Ç.top=\"-\"+p.calculeOffsetTop(frame)+\"px\";frame.Ç.left=\"-\"+p.calculeOffsetLeft(frame)+\"px\";t.switchClassSticky(icon,'editAreaButtonSelected',Ì);t.fullscreen['allow_resize']=t.resize_allowed;t.allow_resize(Ì);if(t.isFirefox){p.eAL.execCommand(t.id,\"update_size();\");t.area_select(selStart,selEnd-selStart);t.scroll_to_view();t.focus();}\nelse{setTimeout(\"È.eAL.execCommand('\"+t.id+\"','update_size();');eA.focus();\",10);}}\nelse if(to!=old){frame.Ç.position=\"static\";frame.Ç.zIndex=t.fullscreen['old_zIndex'];if(t.isOpera){html.Ç.height=\"auto\";html.Ç.width=\"auto\";html.Ç.overflow=\"auto\";}\nelse if(t.isIE&&p!=top){html.Ç.overflow=\"auto\";}\nelse{html.Ç.overflow=t.fullscreen['old_overflow'];}html.scrollTop=t.fullscreen['old_scrollTop'];html.scrollLeft=t.fullscreen['old_scrollLeft'];p.eAL.hide(t.id);p.eAL.show(t.id);t.switchClassSticky(icon,'editAreaButtonNormal',Ì);if(t.fullscreen['allow_resize'])t.allow_resize(t.fullscreen['allow_resize']);if(t.isFirefox){t.area_select(selStart,selEnd-selStart);setTimeout(\"eA.scroll_to_view();\",10);}}};EA.Ä.allow_resize=Ã(allow){var resize=_$(\"resize_area\");if(allow){resize.Ç.visibility=\"visible\";È.eAL.add_event(resize,\"mouseup\",eA.start_resize);}\nelse{resize.Ç.visibility=\"hidden\";È.eAL.remove_event(resize,\"mouseup\",eA.start_resize);}Á.resize_allowed=allow;};EA.Ä.change_syntax=Ã(new_syntax,is_waiting){if(new_syntax==Á.Å['syntax'])return Ë;var founded=Ì;for(var i=0;i<Á.syntax_list.Æ;i++){if(Á.syntax_list[i]==new_syntax)founded=Ë;}if(founded==Ë){if(!È.eAL.load_syntax[new_syntax]){if(!is_waiting)È.eAL.load_script(È.eAL.baseURL+\"reg_syntax/\"+new_syntax+\".js\");setTimeout(\"eA.change_syntax('\"+new_syntax+\"',Ë);\",100);Á.show_waiting_screen();}\nelse{if(!Á.allready_used_syntax[new_syntax]){È.eAL.init_syntax_regexp();Á.add_Ç(È.eAL.syntax[new_syntax][\"Çs\"]);Á.allready_used_syntax[new_syntax]=Ë;}var sel=_$(\"syntax_selection\");if(sel&&sel.Ê!=new_syntax){for(var i=0;i<sel.Æ;i++){if(sel.options[i].Ê&&sel.options[i].Ê==new_syntax)sel.options[i].selected=Ë;}}Á.Å['syntax']=new_syntax;Á.resync_highlight(Ë);Á.hide_waiting_screen();return Ë;}}return Ì;};EA.Ä.set_editable=Ã(is_editable){if(is_editable){document.body.className=\"\";Á.Â.readOnly=Ì;Á.is_editable=Ë;}\nelse{document.body.className=\"non_editable\";Á.Â.readOnly=Ë;Á.is_editable=Ì;}if(eAs[Á.id][\"displayed\"]==Ë)Á.update_size();};EA.Ä.toggle_word_wrap=Ã(){Á.set_word_wrap(!Á.Å['word_wrap']);};EA.Ä.set_word_wrap=Ã(to){var t=Á,a=t.Â;if(t.isOpera&&t.isOpera < 9.8){Á.Å['word_wrap']=Ì;t.switchClassSticky(_$(\"word_wrap\"),'editAreaButtonDisabled',Ë);return Ì;}if(to){wrap_mode='soft';Á.container.className+=' word_wrap';Á.container.Ç.width=\"\";Á.content_highlight.Ç.width=\"\";a.Ç.width=\"100%\";if(t.isIE&&t.isIE < 7){a.Ç.width=(a.offsetWidth-5)+\"px\";}t.switchClassSticky(_$(\"word_wrap\"),'editAreaButtonSelected',Ì);}\nelse{wrap_mode='off';Á.container.className=Á.container.className.replace(/word_wrap/g,'');t.switchClassSticky(_$(\"word_wrap\"),'editAreaButtonNormal',Ë);}Á.Â.previous_scrollWidth='';Á.Â.previous_scrollHeight='';a.wrap=wrap_mode;a.setAttribute('wrap',wrap_mode);if(!Á.isIE){var start=a.selectionStart,end=a.selectionEnd;var parNod=a.ÈNode,nxtSib=a.nextSibling;parNod.removeChild(a);parNod.insertBefore(a,nxtSib);Á.area_select(start,end-start);}Á.Å['word_wrap']=to;Á.focus();Á.update_size();Á.check_line_selection();};EA.Ä.open_file=Ã(Å){if(Å['id']!=\"undefined\"){var id=Å['id'];var new_file={};new_file['id']=id;new_file['title']=id;new_file['text']=\"\";new_file['É']=\"\";new_file['last_text_to_highlight']=\"\";new_file['last_hightlighted_text']=\"\";new_file['previous']=[];new_file['next']=[];new_file['last_undo']=\"\";new_file['smooth_selection']=Á.Å['smooth_selection'];new_file['do_highlight']=Á.Å['start_highlight'];new_file['syntax']=Á.Å['syntax'];new_file['scroll_top']=0;new_file['scroll_left']=0;new_file['selection_start']=0;new_file['selection_end']=0;new_file['edited']=Ì;new_file['font_size']=Á.Å[\"font_size\"];new_file['font_family']=Á.Å[\"font_family\"];new_file['word_wrap']=Á.Å[\"word_wrap\"];new_file['toolbar']={'links':{},'selects':{}};new_file['compare_edited_text']=new_file['text'];Á.files[id]=new_file;Á.update_file(id,Å);Á.files[id]['compare_edited_text']=Á.files[id]['text'];var html_id='tab_file_'+encodeURIComponent(id);Á.filesIdAssoc[html_id]=id;Á.files[id]['html_id']=html_id;if(!_$(Á.files[id]['html_id'])&&id!=\"\"){Á.tab_browsing_area.Ç.display=\"block\";var elem=document.createElement('li');elem.id=Á.files[id]['html_id'];var close=\"<img src=\\\"\"+È.eAL.baseURL+\"images/close.gif\\\" title=\\\"\"+Á.get_translation('close_tab','word')+\"\\\" onclick=\\\"eA.execCommand('close_file',eA.filesIdAssoc['\"+html_id+\"']);return Ì;\\\" class=\\\"hidden\\\" onmouseover=\\\"Á.className=''\\\" onmouseout=\\\"Á.className='hidden'\\\" />\";elem.innerHTML=\"<a onclick=\\\"javascript:eA.execCommand('switch_to_file',eA.filesIdAssoc['\"+html_id+\"']);\\\" selec=\\\"none\\\"><b><span><strong class=\\\"edited\\\">*</strong>\"+Á.files[id]['title']+close+\"</span></b></a>\";_$('tab_browsing_list').appendChild(elem);var elem=document.createElement('text');Á.update_size();}if(id!=\"\")Á.execCommand('file_open',Á.files[id]);Á.switch_to_file(id,Ë);return Ë;}\nelse return Ì;};EA.Ä.close_file=Ã(id){if(Á.files[id]){Á.save_file(id);if(Á.execCommand('file_close',Á.files[id])!==Ì){var li=_$(Á.files[id]['html_id']);li.ÈNode.removeChild(li);if(id==Á.curr_file){var next_file=\"\";var is_next=Ì;for(var i in Á.files){if(is_next){next_file=i;break;}\nelse if(i==id)is_next=Ë;\nelse next_file=i;}Á.switch_to_file(next_file);}delete(Á.files[id]);Á.update_size();}}};EA.Ä.save_file=Ã(id){var t=Á,save,a_links,a_selects,save_butt,img,i;if(t.files[id]){var save=t.files[id];save['É']=t.É;save['last_text_to_highlight']=t.last_text_to_highlight;save['last_hightlighted_text']=t.last_hightlighted_text;save['previous']=t.previous;save['next']=t.next;save['last_undo']=t.last_undo;save['smooth_selection']=t.smooth_selection;save['do_highlight']=t.do_highlight;save['syntax']=t.Å['syntax'];save['text']=t.Â.Ê;save['scroll_top']=t.result.scrollTop;save['scroll_left']=t.result.scrollLeft;save['selection_start']=t.É[\"selectionStart\"];save['selection_end']=t.É[\"selectionEnd\"];save['font_size']=t.Å[\"font_size\"];save['font_family']=t.Å[\"font_family\"];save['word_wrap']=t.Å[\"word_wrap\"];save['toolbar']={'links':{},'selects':{}};a_links=_$(\"toolbar_1\").getElementsByTagName(\"a\");for(i=0;i<a_links.Æ;i++){if(a_links[i].getAttribute('fileSpecific')=='yes'){save_butt={};img=a_links[i].getElementsByTagName('img')[0];save_butt['classLock']=img.classLock;save_butt['className']=img.className;save_butt['oldClassName']=img.oldClassName;save['toolbar']['links'][a_links[i].id]=save_butt;}}a_selects=_$(\"toolbar_1\").getElementsByTagName(\"select\");for(i=0;i<a_selects.Æ;i++){if(a_selects[i].getAttribute('fileSpecific')=='yes'){save['toolbar']['selects'][a_selects[i].id]=a_selects[i].Ê;}}t.files[id]=save;return save;}return Ì;};EA.Ä.update_file=Ã(id,new_Ês){for(var i in new_Ês){Á.files[id][i]=new_Ês[i];}};EA.Ä.display_file=Ã(id){var t=Á,a=t.Â,new_file,a_lis,a_selects,a_links,a_options,i,j;if(id==''){a.readOnly=Ë;t.tab_browsing_area.Ç.display=\"none\";_$(\"no_file_selected\").Ç.display=\"block\";t.result.className=\"empty\";if(!t.files['']){t.open_file({id:''});}}\nelse if(typeof(t.files[id])=='undefined'){return Ì;}\nelse{t.result.className=\"\";a.readOnly=!t.is_editable;_$(\"no_file_selected\").Ç.display=\"none\";t.tab_browsing_area.Ç.display=\"block\";}t.check_redo(Ë);t.check_undo(Ë);t.curr_file=id;a_lis=t.tab_browsing_area.getElementsByTagName('li');for(i=0;i<a_lis.Æ;i++){if(a_lis[i].id==t.files[id]['html_id'])a_lis[i].className='selected';\nelse a_lis[i].className='';}new_file=t.files[id];a.Ê=new_file['text'];t.set_font(new_file['font_family'],new_file['font_size']);t.area_select(new_file['selection_start'],new_file['selection_end']-new_file['selection_start']);t.manage_size(Ë);t.result.scrollTop=new_file['scroll_top'];t.result.scrollLeft=new_file['scroll_left'];t.previous=new_file['previous'];t.next=new_file['next'];t.last_undo=new_file['last_undo'];t.check_redo(Ë);t.check_undo(Ë);t.execCommand(\"change_highlight\",new_file['do_highlight']);t.execCommand(\"change_syntax\",new_file['syntax']);t.execCommand(\"change_smooth_selection_mode\",new_file['smooth_selection']);t.execCommand(\"set_word_wrap\",new_file['word_wrap']);a_links=new_file['toolbar']['links'];for(i in a_links){if(img=_$(i).getElementsByTagName('img')[0]){img.classLock=a_links[i]['classLock'];img.className=a_links[i]['className'];img.oldClassName=a_links[i]['oldClassName'];}}a_selects=new_file['toolbar']['selects'];for(i in a_selects){a_options=_$(i).options;for(j=0;j<a_options.Æ;j++){if(a_options[j].Ê==a_selects[i])_$(i).options[j].selected=Ë;}}};EA.Ä.switch_to_file=Ã(file_to_show,force_refresh){if(file_to_show!=Á.curr_file||force_refresh){Á.save_file(Á.curr_file);if(Á.curr_file!='')Á.execCommand('file_switch_off',Á.files[Á.curr_file]);Á.display_file(file_to_show);if(file_to_show!='')Á.execCommand('file_switch_on',Á.files[file_to_show]);}};EA.Ä.get_file=Ã(id){if(id==Á.curr_file)Á.save_file(id);return Á.files[id];};EA.Ä.get_all_files=Ã(){tmp_files=Á.files;Á.save_file(Á.curr_file);if(tmp_files[''])delete(Á.files['']);return tmp_files;};EA.Ä.check_file_changes=Ã(){var id=Á.curr_file;if(Á.files[id]&&Á.files[id]['compare_edited_text']!=undefined){if(Á.files[id]['compare_edited_text'].Æ==Á.Â.Ê.Æ&&Á.files[id]['compare_edited_text']==Á.Â.Ê){if(Á.files[id]['edited']!=Ì)Á.set_file_edited_mode(id,Ì);}\nelse{if(Á.files[id]['edited']!=Ë)Á.set_file_edited_mode(id,Ë);}}};EA.Ä.set_file_edited_mode=Ã(id,to){if(Á.files[id]&&_$(Á.files[id]['html_id'])){var link=_$(Á.files[id]['html_id']).getElementsByTagName('a')[0];if(to==Ë){link.className='edited';}\nelse{link.className='';if(id==Á.curr_file)text=Á.Â.Ê;\nelse text=Á.files[id]['text'];Á.files[id]['compare_edited_text']=text;}Á.files[id]['edited']=to;}};EA.Ä.set_show_line_colors=Ã(new_Ê){Á.show_line_colors=new_Ê;if(new_Ê)Á.selection_field.className+=' show_colors';\nelse Á.selection_field.className=Á.selection_field.className.replace(/ show_colors/g,'');};var EA_keys={8:\"Retour arriere\",9:\"Tabulation\",12:\"Milieu(pave numerique)\",13:\"Entrer\",16:\"Shift\",17:\"Ctrl\",18:\"Alt\",19:\"Pause\",20:\"Verr Maj\",27:\"Esc\",32:\"Space\",33:\"Page up\",34:\"Page down\",35:\"End\",36:\"Begin\",37:\"Left\",38:\"Up\",39:\"Right\",40:\"Down\",44:\"Impr ecran\",45:\"Inser\",46:\"Suppr\",91:\"Menu Demarrer Windows / touche pomme Mac\",92:\"Menu Demarrer Windows\",93:\"Menu contextuel Windows\",112:\"F1\",113:\"F2\",114:\"F3\",115:\"F4\",116:\"F5\",117:\"F6\",118:\"F7\",119:\"F8\",120:\"F9\",121:\"F10\",122:\"F11\",123:\"F12\",144:\"Verr Num\",145:\"Arret defil\"};Ã keyDown(e){if(!e){e=event;}for(var i in eA.plugins){if(typeof(eA.plugins[i].onkeydown)==\"Ã\"){if(eA.plugins[i].onkeydown(e)===Ì){if(eA.isIE)e.keyCode=0;return Ì;}}}var target_id=(e.target||e.srcElement).id;var use=Ì;if(EA_keys[e.keyCode])letter=EA_keys[e.keyCode];\nelse letter=String.fromCharCode(e.keyCode);var low_letter=letter.toLowerCase();if(letter==\"Page up\"&&!AltPressed(e)&&!eA.isOpera){eA.execCommand(\"scroll_page\",{\"dir\":\"up\",\"shift\":ShiftPressed(e)});use=Ë;}\nelse if(letter==\"Page down\"&&!AltPressed(e)&&!eA.isOpera){eA.execCommand(\"scroll_page\",{\"dir\":\"down\",\"shift\":ShiftPressed(e)});use=Ë;}\nelse if(eA.is_editable==Ì){return Ë;}\nelse if(letter==\"Tabulation\"&&target_id==\"Â\"&&!CtrlPressed(e)&&!AltPressed(e)){if(ShiftPressed(e))eA.execCommand(\"invert_tab_selection\");\nelse eA.execCommand(\"tab_selection\");use=Ë;if(eA.isOpera||(eA.isFirefox&&eA.isMac))setTimeout(\"eA.execCommand('focus');\",1);}\nelse if(letter==\"Entrer\"&&target_id==\"Â\"){if(eA.press_enter())use=Ë;}\nelse if(letter==\"Entrer\"&&target_id==\"area_search\"){eA.execCommand(\"area_search\");use=Ë;}\nelse if(letter==\"Esc\"){eA.execCommand(\"close_all_inline_popup\",e);use=Ë;}\nelse if(CtrlPressed(e)&&!AltPressed(e)&&!ShiftPressed(e)){switch(low_letter){case \"f\":eA.execCommand(\"area_search\");use=Ë;break;case \"r\":eA.execCommand(\"area_replace\");use=Ë;break;case \"q\":eA.execCommand(\"close_all_inline_popup\",e);use=Ë;break;case \"h\":eA.execCommand(\"change_highlight\");use=Ë;break;case \"g\":setTimeout(\"eA.execCommand('go_to_line');\",5);use=Ë;break;case \"e\":eA.execCommand(\"show_help\");use=Ë;break;case \"z\":use=Ë;eA.execCommand(\"undo\");break;case \"y\":use=Ë;eA.execCommand(\"redo\");break;default:break;}}if(eA.next.Æ > 0){setTimeout(\"eA.check_redo();\",10);}setTimeout(\"eA.check_file_changes();\",10);if(use){if(eA.isIE)e.keyCode=0;return Ì;}return Ë;};Ã AltPressed(e){if(window.event){return(window.event.altKey);}\nelse{if(e.modifiers)return(e.altKey||(e.modifiers % 2));\nelse return e.altKey;}};Ã CtrlPressed(e){if(window.event){return(window.event.ctrlKey);}\nelse{return(e.ctrlKey||(e.modifiers==2)||(e.modifiers==3)||(e.modifiers>5));}};Ã ShiftPressed(e){if(window.event){return(window.event.shiftKey);}\nelse{return(e.shiftKey||(e.modifiers>3));}}; EA.Ä.show_search=Ã(){if(_$(\"area_search_replace\").Ç.visibility==\"visible\"){Á.hidden_search();}\nelse{Á.open_inline_popup(\"area_search_replace\");var text=Á.area_get_selection();var search=text.split(\"\\n\")[0];_$(\"area_search\").Ê=search;_$(\"area_search\").focus();}};EA.Ä.hidden_search=Ã(){Á.close_inline_popup(\"area_search_replace\");};EA.Ä.area_search=Ã(mode){if(!mode)mode=\"search\";_$(\"area_search_msg\").innerHTML=\"\";var search=_$(\"area_search\").Ê;Á.Â.focus();Á.Â.ÂFocused=Ë;var infos=Á.get_selection_infos();var start=infos[\"selectionStart\"];var pos=-1;var pos_begin=-1;var Æ=search.Æ;if(_$(\"area_search_replace\").Ç.visibility!=\"visible\"){Á.show_search();return;}if(search.Æ==0){_$(\"area_search_msg\").innerHTML=Á.get_translation(\"search_field_empty\");return;}if(mode!=\"replace\"){if(_$(\"area_search_reg_exp\").checked)start++;\nelse start+=search.Æ;}if(_$(\"area_search_reg_exp\").checked){var opt=\"m\";if(!_$(\"area_search_match_case\").checked)opt+=\"i\";var reg=new RegExp(search,opt);pos=infos[\"full_text\"].substr(start).search(reg);pos_begin=infos[\"full_text\"].search(reg);if(pos!=-1){pos+=start;Æ=infos[\"full_text\"].substr(start).match(reg)[0].Æ;}\nelse if(pos_begin!=-1){Æ=infos[\"full_text\"].match(reg)[0].Æ;}}\nelse{if(_$(\"area_search_match_case\").checked){pos=infos[\"full_text\"].indexOf(search,start);pos_begin=infos[\"full_text\"].indexOf(search);}\nelse{pos=infos[\"full_text\"].toLowerCase().indexOf(search.toLowerCase(),start);pos_begin=infos[\"full_text\"].toLowerCase().indexOf(search.toLowerCase());}}if(pos==-1&&pos_begin==-1){_$(\"area_search_msg\").innerHTML=\"<strong>\"+search+\"</strong> \"+Á.get_translation(\"not_found\");return;}\nelse if(pos==-1&&pos_begin !=-1){begin=pos_begin;_$(\"area_search_msg\").innerHTML=Á.get_translation(\"restart_search_at_begin\");}\nelse begin=pos;if(mode==\"replace\"&&pos==infos[\"indexOfCursor\"]){var replace=_$(\"area_replace\").Ê;var new_text=\"\";if(_$(\"area_search_reg_exp\").checked){var opt=\"m\";if(!_$(\"area_search_match_case\").checked)opt+=\"i\";var reg=new RegExp(search,opt);new_text=infos[\"full_text\"].substr(0,begin)+infos[\"full_text\"].substr(start).replace(reg,replace);}\nelse{new_text=infos[\"full_text\"].substr(0,begin)+replace+infos[\"full_text\"].substr(begin+Æ);}Á.Â.Ê=new_text;Á.area_select(begin,Æ);Á.area_search();}\nelse Á.area_select(begin,Æ);};EA.Ä.area_replace=Ã(){Á.area_search(\"replace\");};EA.Ä.area_replace_all=Ã(){var base_text=Á.Â.Ê;var search=_$(\"area_search\").Ê;var replace=_$(\"area_replace\").Ê;if(search.Æ==0){_$(\"area_search_msg\").innerHTML=Á.get_translation(\"search_field_empty\");return;}var new_text=\"\";var nb_change=0;if(_$(\"area_search_reg_exp\").checked){var opt=\"mg\";if(!_$(\"area_search_match_case\").checked)opt+=\"i\";var reg=new RegExp(search,opt);nb_change=infos[\"full_text\"].match(reg).Æ;new_text=infos[\"full_text\"].replace(reg,replace);}\nelse{if(_$(\"area_search_match_case\").checked){var tmp_tab=base_text.split(search);nb_change=tmp_tab.Æ-1;new_text=tmp_tab.join(replace);}\nelse{var lower_Ê=base_text.toLowerCase();var lower_search=search.toLowerCase();var start=0;var pos=lower_Ê.indexOf(lower_search);while(pos!=-1){nb_change++;new_text+=Á.Â.Ê.substring(start,pos)+replace;start=pos+search.Æ;pos=lower_Ê.indexOf(lower_search,pos+1);}new_text+=Á.Â.Ê.substring(start);}}if(new_text==base_text){_$(\"area_search_msg\").innerHTML=\"<strong>\"+search+\"</strong> \"+Á.get_translation(\"not_found\");}\nelse{Á.Â.Ê=new_text;_$(\"area_search_msg\").innerHTML=\"<strong>\"+nb_change+\"</strong> \"+Á.get_translation(\"occurrence_replaced\");setTimeout(\"eA.Â.focus();eA.Â.ÂFocused=Ë;\",100);}}; EA.Ä.change_highlight=Ã(change_to){if(Á.Å[\"syntax\"].Æ==0&&change_to==Ì){Á.switchClassSticky(_$(\"highlight\"),'editAreaButtonDisabled',Ë);Á.switchClassSticky(_$(\"reset_highlight\"),'editAreaButtonDisabled',Ë);return Ì;}if(Á.do_highlight==change_to)return Ì;Á.getIESelection();var pos_start=Á.Â.selectionStart;var pos_end=Á.Â.selectionEnd;if(Á.do_highlight===Ë||change_to==Ì)Á.disable_highlight();\nelse Á.enable_highlight();Á.Â.focus();Á.Â.selectionStart=pos_start;Á.Â.selectionEnd=pos_end;Á.setIESelection();};EA.Ä.disable_highlight=Ã(displayOnly){var t=Á,a=t.Â,new_Obj,old_class,new_class;t.selection_field.innerHTML=\"\";t.selection_field_text.innerHTML=\"\";t.content_highlight.Ç.visibility=\"hidden\";new_Obj=t.content_highlight.cloneNode(Ì);new_Obj.innerHTML=\"\";t.content_highlight.ÈNode.insertBefore(new_Obj,t.content_highlight);t.content_highlight.ÈNode.removeChild(t.content_highlight);t.content_highlight=new_Obj;old_class=È.getAttribute(a,\"class\");if(old_class){new_class=old_class.replace(\"hidden\",\"\");È.setAttribute(a,\"class\",new_class);}a.Ç.backgroundColor=\"transÈ\";t.switchClassSticky(_$(\"highlight\"),'editAreaButtonNormal',Ë);t.switchClassSticky(_$(\"reset_highlight\"),'editAreaButtonDisabled',Ë);t.do_highlight=Ì;t.switchClassSticky(_$(\"change_smooth_selection\"),'editAreaButtonSelected',Ë);if(typeof(t.smooth_selection_before_highlight)!=\"undefined\"&&t.smooth_selection_before_highlight===Ì){t.change_smooth_selection_mode(Ì);}};EA.Ä.enable_highlight=Ã(){var t=Á,a=t.Â,new_class;t.show_waiting_screen();t.content_highlight.Ç.visibility=\"visible\";new_class=È.getAttribute(a,\"class\")+\" hidden\";È.setAttribute(a,\"class\",new_class);if(t.isIE)a.Ç.backgroundColor=\"#FFFFFF\";t.switchClassSticky(_$(\"highlight\"),'editAreaButtonSelected',Ì);t.switchClassSticky(_$(\"reset_highlight\"),'editAreaButtonNormal',Ì);t.smooth_selection_before_highlight=t.smooth_selection;if(!t.smooth_selection)t.change_smooth_selection_mode(Ë);t.switchClassSticky(_$(\"change_smooth_selection\"),'editAreaButtonDisabled',Ë);t.do_highlight=Ë;t.resync_highlight();t.hide_waiting_screen();};EA.Ä.maj_highlight=Ã(infos){var debug_opti=\"\",tps_start=new Date().getTime(),tps_middle_opti=new Date().getTime();var t=Á,hightlighted_text,updated_highlight;var textToHighlight=infos[\"full_text\"],doSyntaxOpti=Ì,doHtmlOpti=Ì,stay_begin=\"\",stay_end=\"\",trace_new,trace_last;if(t.last_text_to_highlight==infos[\"full_text\"]&&t.resync_highlight!==Ë)return;if(t.reload_highlight===Ë){t.reload_highlight=Ì;}\nelse if(textToHighlight.Æ==0){textToHighlight=\"\\n \";}\nelse{changes=t.checkTextEvolution(t.last_text_to_highlight,textToHighlight);trace_new=t.get_syntax_trace(changes.newTextLine).replace(/\\r/g,'');trace_last=t.get_syntax_trace(changes.lastTextLine).replace(/\\r/g,'');doSyntaxOpti=(trace_new==trace_last);if(!doSyntaxOpti&&trace_new==\"\\n\"+trace_last&&/^[ \t\s]*\\n[ \t\s]*$/.test(changes.newText.replace(/\\r/g,''))&&changes.lastText==\"\"){doSyntaxOpti=Ë;}if(doSyntaxOpti){tps_middle_opti=new Date().getTime();stay_begin=t.last_hightlighted_text.split(\"\\n\").slice(0,changes.lineStart).join(\"\\n\");if(changes.lineStart>0)stay_begin+=\"\\n\";stay_end=t.last_hightlighted_text.split(\"\\n\").slice(changes.lineLastEnd+1).join(\"\\n\");if(stay_end.Æ>0)stay_end=\"\\n\"+stay_end;if(stay_begin.split('<span').Æ !=stay_begin.split('</span').Æ||stay_end.split('<span').Æ !=stay_end.split('</span').Æ){doSyntaxOpti=Ì;stay_end='';stay_begin='';}\nelse{if(stay_begin.Æ==0&&changes.posLastEnd==-1)changes.newTextLine+=\"\\n\";textToHighlight=changes.newTextLine;}}if(t.Å[\"debug\"]){var ch=changes;debug_opti=(doSyntaxOpti?\"Optimisation\":\"No optimisation\")+\" start:\"+ch.posStart+\"(\"+ch.lineStart+\")\"+\" end_new:\"+ch.posNewEnd+\"(\"+ch.lineNewEnd+\")\"+\" end_last:\"+ch.posLastEnd+\"(\"+ch.lineLastEnd+\")\"+\"\\nchanged_text:\"+ch.newText+\"=> trace:\"+trace_new+\"\\nchanged_last_text:\"+ch.lastText+\"=> trace:\"+trace_last+\"\\nchanged_line:\"+ch.newTextLine+\"\\nlast_changed_line:\"+ch.lastTextLine+\"\\nstay_begin:\"+stay_begin.slice(-100)+\"\\nstay_end:\"+stay_end.substr(0,100);+\"\\n\";}}tps_end_opti=new Date().getTime();updated_highlight=t.colorize_text(textToHighlight);tpsAfterReg=new Date().getTime();doSyntaxOpti=doHtmlOpti=Ì;if(doSyntaxOpti){try{var replacedBloc,i,nbStart='',nbEnd='',newHtml,ÆOld,ÆNew;replacedBloc=t.last_hightlighted_text.substring(stay_begin.Æ,t.last_hightlighted_text.Æ-stay_end.Æ);ÆOld=replacedBloc.Æ;ÆNew=updated_highlight.Æ;for(i=0;i < ÆOld&&i < ÆNew&&replacedBloc.charAt(i)==updated_highlight.charAt(i);i++){}nbStart=i;for(i=0;i+nbStart < ÆOld&&i+nbStart < ÆNew&&replacedBloc.charAt(ÆOld-i-1)==updated_highlight.charAt(ÆNew-i-1);i++){}nbEnd=i;lastHtml=replacedBloc.substring(nbStart,ÆOld-nbEnd);newHtml=updated_highlight.substring(nbStart,ÆNew-nbEnd);if(newHtml.indexOf('<span')==-1&&newHtml.indexOf('</span')==-1&&lastHtml.indexOf('<span')==-1&&lastHtml.indexOf('</span')==-1){var beginStr,nbOpendedSpan,nbClosedSpan,nbUnchangedChars,span,textNode;doHtmlOpti=Ë;beginStr=t.last_hightlighted_text.substr(0,stay_begin.Æ+nbStart);newHtml=newHtml.replace(/&lt;/g,'<').replace(/&gt;/g,'>').replace(/&amp;/g,'&');nbOpendedSpan=beginStr.split('<span').Æ-1;nbClosedSpan=beginStr.split('</span').Æ-1;span=t.content_highlight.getElementsByTagName('span')[ nbOpendedSpan ];ÈSpan=span;maxStartOffset=maxEndOffset=0;if(nbOpendedSpan==nbClosedSpan){while(ÈSpan.ÈNode !=t.content_highlight&&ÈSpan.ÈNode.tagName !='PRE'){ÈSpan=ÈSpan.ÈNode;}}\nelse{maxStartOffset=maxEndOffset=beginStr.Æ+1;nbClosed=beginStr.substr(Math.max(0,beginStr.lastIndexOf('<span',maxStartOffset-1))).split('</span').Æ-1;while(nbClosed > 0){nbClosed--;ÈSpan=ÈSpan.ÈNode;}while(ÈSpan.ÈNode !=t.content_highlight&&ÈSpan.ÈNode.tagName !='PRE'&&(tmpMaxStartOffset=Math.max(0,beginStr.lastIndexOf('<span',maxStartOffset-1)))<(tmpMaxEndOffset=Math.max(0,beginStr.lastIndexOf('</span',maxEndOffset-1)))){maxStartOffset=tmpMaxStartOffset;maxEndOffset=tmpMaxEndOffset;}}if(ÈSpan.ÈNode==t.content_highlight||ÈSpan.ÈNode.tagName=='PRE'){maxStartOffset=Math.max(0,beginStr.indexOf('<span'));}if(maxStartOffset==beginStr.Æ){nbSubSpanBefore=0;}\nelse{lastEndPos=Math.max(0,beginStr.lastIndexOf('>',maxStartOffset));nbSubSpanBefore=beginStr.substr(lastEndPos).split('<span').Æ-1;}if(nbSubSpanBefore==0){textNode=ÈSpan.firstChild;}\nelse{lastSubSpan=ÈSpan.getElementsByTagName('span')[ nbSubSpanBefore-1 ];while(lastSubSpan.ÈNode !=ÈSpan){lastSubSpan=lastSubSpan.ÈNode;}if(lastSubSpan.nextSibling==null||lastSubSpan.nextSibling.nodeType !=3){textNode=document.createTextNode('');lastSubSpan.ÈNode.insertBefore(textNode,lastSubSpan.nextSibling);}\nelse{textNode=lastSubSpan.nextSibling;}}if((lastIndex=beginStr.lastIndexOf('>'))==-1){nbUnchangedChars=beginStr.Æ;}\nelse{nbUnchangedChars=beginStr.substr(lastIndex+1).replace(/&lt;/g,'<').replace(/&gt;/g,'>').replace(/&amp;/g,'&').Æ;}if(t.isIE){nbUnchangedChars-=(beginStr.substr(beginStr.Æ-nbUnchangedChars).split(\"\\n\").Æ-1);textNode.replaceData(nbUnchangedChars,lastHtml.replace(/\\n/g,'').Æ,newHtml.replace(/\\n/g,''));}\nelse{textNode.replaceData(nbUnchangedChars,lastHtml.Æ,newHtml);}}}catch(e){doHtmlOpti=Ì;}}tpsAfterOpti2=new Date().getTime();hightlighted_text=stay_begin+updated_highlight+stay_end;if(!doHtmlOpti){var new_Obj=t.content_highlight.cloneNode(Ì);if((t.isIE&&t.isIE < 8)||(t.isOpera&&t.isOpera < 9.6))new_Obj.innerHTML=\"<pre><span class='\"+t.Å[\"syntax\"]+\"'>\"+hightlighted_text+\"</span></pre>\";\nelse new_Obj.innerHTML=\"<span class='\"+t.Å[\"syntax\"]+\"'>\"+hightlighted_text+\"</span>\";t.content_highlight.ÈNode.replaceChild(new_Obj,t.content_highlight);t.content_highlight=new_Obj;}t.last_text_to_highlight=infos[\"full_text\"];t.last_hightlighted_text=hightlighted_text;tps3=new Date().getTime();if(t.Å[\"debug\"]){t.debug.Ê=\"Tps optimisation \"+(tps_end_opti-tps_start)+\" | tps reg exp:\"+(tpsAfterReg-tps_end_opti)+\" | tps opti HTML:\"+(tpsAfterOpti2-tpsAfterReg)+' '+(doHtmlOpti ? 'yes':'no')+\" | tps update highlight content:\"+(tps3-tpsAfterOpti2)+\" | tpsTotal:\"+(tps3-tps_start)+\"(\"+tps3+\")\\n\"+debug_opti;}};EA.Ä.resync_highlight=Ã(reload_now){Á.reload_highlight=Ë;Á.last_text_to_highlight=\"\";Á.focus();if(reload_now)Á.check_line_selection(Ì);}; EA.Ä.comment_or_quote=Ã(){var new_class=\"\",close_tag=\"\",sy,arg,i;sy=È.eAL.syntax[eA.current_code_lang];arg=EA.Ä.comment_or_quote.arguments[0];for(i in sy[\"quotes\"]){if(arg.indexOf(i)==0){new_class=\"quotesmarks\";close_tag=sy[\"quotes\"][i];}}if(new_class.Æ==0){for(var i in sy[\"comments\"]){if(arg.indexOf(i)==0){new_class=\"comments\";close_tag=sy[\"comments\"][i];}}}if(close_tag==\"\\n\"){return \"µ__\"+new_class+\"__µ\"+arg.replace(/(\\r?\\n)?$/m,\"µ_END_µ$1\");}\nelse{reg=new RegExp(È.eAL.get_escaped_regexp(close_tag)+\"$\",\"m\");if(arg.search(reg)!=-1)return \"µ__\"+new_class+\"__µ\"+arg+\"µ_END_µ\";\nelse return \"µ__\"+new_class+\"__µ\"+arg;}};EA.Ä.get_syntax_trace=Ã(text){if(Á.Å[\"syntax\"].Æ>0&&È.eAL.syntax[Á.Å[\"syntax\"]][\"syntax_trace_regexp\"])return text.replace(È.eAL.syntax[Á.Å[\"syntax\"]][\"syntax_trace_regexp\"],\"$3\");};EA.Ä.colorize_text=Ã(text){text=\" \"+text;if(Á.Å[\"syntax\"].Æ>0)text=Á.apply_syntax(text,Á.Å[\"syntax\"]);return text.substr(1).replace(/&/g,\"&amp;\").replace(/</g,\"&lt;\").replace(/>/g,\"&gt;\").replace(/µ_END_µ/g,\"</span>\").replace(/µ__([a-zA-Z0-9]+)__µ/g,\"<span class='$1'>\");};EA.Ä.apply_syntax=Ã(text,lang){var sy;Á.current_code_lang=lang;if(!È.eAL.syntax[lang])return text;sy=È.eAL.syntax[lang];if(sy[\"custom_regexp\"]['before']){for(var i in sy[\"custom_regexp\"]['before']){var convert=\"$1µ__\"+sy[\"custom_regexp\"]['before'][i]['class']+\"__µ$2µ_END_µ$3\";text=text.replace(sy[\"custom_regexp\"]['before'][i]['regexp'],convert);}}if(sy[\"comment_or_quote_reg_exp\"]){text=text.replace(sy[\"comment_or_quote_reg_exp\"],Á.comment_or_quote);}if(sy[\"keywords_reg_exp\"]){for(var i in sy[\"keywords_reg_exp\"]){text=text.replace(sy[\"keywords_reg_exp\"][i],'µ__'+i+'__µ$2µ_END_µ');}}if(sy[\"delimiters_reg_exp\"]){text=text.replace(sy[\"delimiters_reg_exp\"],'µ__delimiters__µ$1µ_END_µ');}if(sy[\"operators_reg_exp\"]){text=text.replace(sy[\"operators_reg_exp\"],'µ__operators__µ$1µ_END_µ');}if(sy[\"custom_regexp\"]['after']){for(var i in sy[\"custom_regexp\"]['after']){var convert=\"$1µ__\"+sy[\"custom_regexp\"]['after'][i]['class']+\"__µ$2µ_END_µ$3\";text=text.replace(sy[\"custom_regexp\"]['after'][i]['regexp'],convert);}}return text;};var editArea= eA;EditArea=EA;</script>".replace(/Á/g,'this').replace(/Â/g,'textarea').replace(/Ã/g,'function').replace(/Ä/g,'prototype').replace(/Å/g,'settings').replace(/Æ/g,'length').replace(/Ç/g,'style').replace(/È/g,'parent').replace(/É/g,'last_selection').replace(/Ê/g,'value').replace(/Ë/g,'true').replace(/Ì/g,'false');
37
+ editAreaLoader.template= "<?xml version=\"1.0\" encoding=\"UTF-8\"?> <!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.1//EN\" \"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd\"> <html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en\" > <head> <title>EditArea</title> <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" /> <meta http-equiv=\"X-UA-Compatible\" content=\"IE=EmulateIE7\"/> [__CSSRULES__] [__JSCODE__] </head> <body> <div id='editor'> <div class='area_toolbar' id='toolbar_1'>[__TOOLBAR__]</div> <div class='area_toolbar' id='tab_browsing_area'><ul id='tab_browsing_list' class='menu'> <li> </li> </ul></div> <div id='result'> <div id='no_file_selected'></div> <div id='container'> <div id='cursor_pos' class='edit_area_cursor'>&nbsp;</div> <div id='end_bracket' class='edit_area_cursor'>&nbsp;</div> <div id='selection_field'></div> <div id='line_number' selec='none'></div> <div id='content_highlight'></div> <div id='test_font_size'></div> <div id='selection_field_text'></div> <textarea id='textarea' wrap='off' onchange='editArea.execCommand(\"onchange\");' onfocus='javascript:editArea.textareaFocused=true;' onblur='javascript:editArea.textareaFocused=false;'> </textarea> </div> </div> <div class='area_toolbar' id='toolbar_2'> <table class='statusbar' cellspacing='0' cellpadding='0'> <tr> <td class='total' selec='none'>{$position}:</td> <td class='infos' selec='none'> {$line_abbr} <span id='linePos'>0</span>, {$char_abbr} <span id='currPos'>0</span> </td> <td class='total' selec='none'>{$total}:</td> <td class='infos' selec='none'> {$line_abbr} <span id='nbLine'>0</span>, {$char_abbr} <span id='nbChar'>0</span> </td> <td class='resize'> <span id='resize_area'><img src='[__BASEURL__]images/statusbar_resize.gif' alt='resize' selec='none'></span> </td> </tr> </table> </div> </div> <div id='processing'> <div id='processing_text'> {$processing} </div> </div> <div id='area_search_replace' class='editarea_popup'> <table cellspacing='2' cellpadding='0' style='width: 100%'> <tr> <td selec='none'>{$search}</td> <td><input type='text' id='area_search' /></td> <td id='close_area_search_replace'> <a onclick='Javascript:editArea.execCommand(\"hidden_search\")'><img selec='none' src='[__BASEURL__]images/close.gif' alt='{$close_popup}' title='{$close_popup}' /></a><br /> </tr><tr> <td selec='none'>{$replace}</td> <td><input type='text' id='area_replace' /></td> <td><img id='move_area_search_replace' onmousedown='return parent.start_move_element(event,\"area_search_replace\", parent.frames[\"frame_\"+editArea.id]);' src='[__BASEURL__]images/move.gif' alt='{$move_popup}' title='{$move_popup}' /></td> </tr> </table> <div class='button'> <input type='checkbox' id='area_search_match_case' /><label for='area_search_match_case' selec='none'>{$match_case}</label> <input type='checkbox' id='area_search_reg_exp' /><label for='area_search_reg_exp' selec='none'>{$reg_exp}</label> <br /> <a onclick='Javascript:editArea.execCommand(\"area_search\")' selec='none'>{$find_next}</a> <a onclick='Javascript:editArea.execCommand(\"area_replace\")' selec='none'>{$replace}</a> <a onclick='Javascript:editArea.execCommand(\"area_replace_all\")' selec='none'>{$replace_all}</a><br /> </div> <div id='area_search_msg' selec='none'></div> </div> <div id='edit_area_help' class='editarea_popup'> <div class='close_popup'> <a onclick='Javascript:editArea.execCommand(\"close_all_inline_popup\")'><img src='[__BASEURL__]images/close.gif' alt='{$close_popup}' title='{$close_popup}' /></a> </div> <div><h3>Editarea [__EA_VERSION__] by <a href=\"http://www.cdolivet.com/index.php?page=editArea\" target=\"_blank\">Christophe Dolivet</a></h3><br /> <h3>{$shortcuts}:</h3> {$tab}: {$add_tab}<br /> {$shift}+{$tab}: {$remove_tab}<br /> {$ctrl}+f: {$search_command}<br /> {$ctrl}+r: {$replace_command}<br /> {$ctrl}+h: {$highlight}<br /> {$ctrl}+g: {$go_to_line}<br /> {$ctrl}+z: {$undo}<br /> {$ctrl}+y: {$redo}<br /> {$ctrl}+e: {$help}<br /> {$ctrl}+q, {$esc}: {$close_popup}<br /> {$accesskey} E: {$toggle}<br /> <br /> <em>{$about_notice}</em> <br /><div class='copyright'>&copy; Christophe Dolivet 2007-2010</div> </div> </div> </body> </html> ";
38
+ editAreaLoader.iframe_css= "<style>body,html{margin:0;padding:0;height:100%;border:none;overflow:hidden;background-color:#FFF;}body,html,table,form,textarea{font:12px monospace,sans-serif;}#editor{border:solid #888 1px;overflow:hidden;}#result{z-index:4;overflow-x:auto;overflow-y:scroll;border-top:solid #888 1px;border-bottom:solid #888 1px;position:relative;clear:both;}#result.empty{overflow:hidden;}#container{overflow:hidden;border:solid blue 0;position:relative;z-index:10;padding:0 5px 0 45px;}#textarea{position:relative;top:0;left:0;margin:0;padding:0;width:100%;height:100%;overflow:hidden;z-index:7;border-width:0;background-color:transparent;resize:none;}#textarea,#textarea:hover{outline:none;}#content_highlight{white-space:pre;margin:0;padding:0;position:absolute;z-index:4;overflow:visible;}#selection_field,#selection_field_text{margin:0;background-color:#E1F2F9;position:absolute;z-index:5;top:-100px;padding:0;white-space:pre;overflow:hidden;}#selection_field.show_colors {z-index:3;background-color:#EDF9FC;}#selection_field strong{font-weight:normal;}#selection_field.show_colors *,#selection_field_text * {visibility:hidden;}#selection_field_text{background-color:transparent;}#selection_field_text strong{font-weight:normal;background-color:#3399FE;color:#FFF;visibility:visible;}#container.word_wrap #content_highlight,#container.word_wrap #selection_field,#container.word_wrap #selection_field_text,#container.word_wrap #test_font_size{white-space:pre-wrap;white-space:-moz-pre-wrap !important;white-space:-pre-wrap;white-space:-o-pre-wrap;word-wrap:break-word;width:99%;}#line_number{position:absolute;overflow:hidden;border-right:solid black 1px;z-index:8;width:38px;padding:0 5px 0 0;margin:0 0 0 -45px;text-align:right;color:#AAAAAA;}#test_font_size{padding:0;margin:0;visibility:hidden;position:absolute;white-space:pre;}pre{margin:0;padding:0;}.hidden{opacity:0.2;filter:alpha(opacity=20);}#result .edit_area_cursor{position:absolute;z-index:6;background-color:#FF6633;top:-100px;margin:0;}#result .edit_area_selection_field .overline{background-color:#996600;}.editarea_popup{border:solid 1px #888888;background-color:#ECE9D8;width:250px;padding:4px;position:absolute;visibility:hidden;z-index:15;top:-500px;}.editarea_popup,.editarea_popup table{font-family:sans-serif;font-size:10pt;}.editarea_popup img{border:0;}.editarea_popup .close_popup{float:right;line-height:16px;border:0;padding:0;}.editarea_popup h1,.editarea_popup h2,.editarea_popup h3,.editarea_popup h4,.editarea_popup h5,.editarea_popup h6{margin:0;padding:0;}.editarea_popup .copyright{text-align:right;}div#area_search_replace{}div#area_search_replace img{border:0;}div#area_search_replace div.button{text-align:center;line-height:1.7em;}div#area_search_replace .button a{cursor:pointer;border:solid 1px #888888;background-color:#DEDEDE;text-decoration:none;padding:0 2px;color:#000000;white-space:nowrap;}div#area_search_replace a:hover{background-color:#EDEDED;}div#area_search_replace #move_area_search_replace{cursor:move;border:solid 1px #888;}div#area_search_replace #close_area_search_replace{text-align:right;vertical-align:top;white-space:nowrap;}div#area_search_replace #area_search_msg{height:18px;overflow:hidden;border-top:solid 1px #888;margin-top:3px;}#edit_area_help{width:350px;}#edit_area_help div.close_popup{float:right;}.area_toolbar{width:100%;margin:0;padding:0;background-color:#ECE9D8;text-align:center;}.area_toolbar,.area_toolbar table{font:11px sans-serif;}.area_toolbar img{border:0;vertical-align:middle;}.area_toolbar input{margin:0;padding:0;}.area_toolbar select{font-family:'MS Sans Serif',sans-serif,Verdana,Arial;font-size:7pt;font-weight:normal;margin:2px 0 0 0 ;padding:0;vertical-align:top;background-color:#F0F0EE;}table.statusbar{width:100%;}.area_toolbar td.infos{text-align:center;width:130px;border-right:solid 1px #888;border-width:0 1px 0 0;padding:0;}.area_toolbar td.total{text-align:right;width:50px;padding:0;}.area_toolbar td.resize{text-align:right;}.area_toolbar span#resize_area{cursor:nw-resize;visibility:hidden;}.editAreaButtonNormal,.editAreaButtonOver,.editAreaButtonDown,.editAreaSeparator,.editAreaSeparatorLine,.editAreaButtonDisabled,.editAreaButtonSelected {border:0; margin:0; padding:0; background:transparent;margin-top:0;margin-left:1px;padding:0;}.editAreaButtonNormal {border:1px solid #ECE9D8 !important;cursor:pointer;}.editAreaButtonOver {border:1px solid #0A246A !important;cursor:pointer;background-color:#B6BDD2;}.editAreaButtonDown {cursor:pointer;border:1px solid #0A246A !important;background-color:#8592B5;}.editAreaButtonSelected {border:1px solid #C0C0BB !important;cursor:pointer;background-color:#F4F2E8;}.editAreaButtonDisabled {filter:progid:DXImageTransform.Microsoft.Alpha(opacity=30);-moz-opacity:0.3;opacity:0.3;border:1px solid #F0F0EE !important;cursor:pointer;}.editAreaSeparatorLine {margin:1px 2px;background-color:#C0C0BB;width:2px;height:18px;}#processing{display:none;background-color:#ECE9D8;border:solid #888 1px;position:absolute;top:0;left:0;width:100%;height:100%;z-index:100;text-align:center;}#processing_text{position:absolute;left:50%;top:50%;width:200px;height:20px;margin-left:-100px;margin-top:-10px;text-align:center;}#tab_browsing_area{display:none;background-color:#CCC9A8;border-top:1px solid #888;text-align:left;margin:0;}#tab_browsing_list {padding:0;margin:0;list-style-type:none;white-space:nowrap;}#tab_browsing_list li {float:left;margin:-1px;}#tab_browsing_list a {position:relative;display:block;text-decoration:none;float:left;cursor:pointer;line-height:14px;}#tab_browsing_list a span {display:block;color:#000;background:#ECE9D8;border:1px solid #888;border-width:1px 1px 0;text-align:center;padding:2px 2px 1px 4px;position:relative;}#tab_browsing_list a b {display:block;border-bottom:2px solid #617994;}#tab_browsing_list a .edited {display:none;}#tab_browsing_list a.edited .edited {display:inline;}#tab_browsing_list a img{margin-left:7px;}#tab_browsing_list a.edited img{margin-left:3px;}#tab_browsing_list a:hover span {background:#F4F2E8;border-color:#0A246A;}#tab_browsing_list .selected a span{background:#046380;color:#FFF;}#no_file_selected{height:100%;width:150%;background:#CCC;display:none;z-index:20;position:absolute;}.non_editable #editor{border-width:0 1px;}.non_editable .area_toolbar{display:none;}#auto_completion_area{background:#FFF;border:solid 1px #888;position:absolute;z-index:15;width:280px;height:180px;overflow:auto;display:none;}#auto_completion_area a,#auto_completion_area a:visited{display:block;padding:0 2px 1px;color:#000;text-decoration:none;}#auto_completion_area a:hover,#auto_completion_area a:focus,#auto_completion_area a.focus{background:#D6E1FE;text-decoration:none;}#auto_completion_area ul{margin:0;padding:0;list-style:none inside;}#auto_completion_area li{padding:0;}#auto_completion_area .prefix{font-style:italic;padding:0 3px;}</style>";
editarea/images/autocompletion.gif ADDED
Binary file
editarea/images/close.gif ADDED
Binary file
editarea/images/fullscreen.gif ADDED
Binary file
editarea/images/go_to_line.gif ADDED
Binary file
editarea/images/help.gif ADDED
Binary file
editarea/images/highlight.gif ADDED
Binary file
editarea/images/load.gif ADDED
Binary file
editarea/images/move.gif ADDED
Binary file
editarea/images/newdocument.gif ADDED
Binary file
editarea/images/opacity.png ADDED
Binary file
editarea/images/processing.gif ADDED
Binary file
editarea/images/redo.gif ADDED
Binary file
editarea/images/reset_highlight.gif ADDED
Binary file
editarea/images/save.gif ADDED
Binary file
editarea/images/search.gif ADDED
Binary file
editarea/images/smooth_selection.gif ADDED
Binary file
editarea/images/spacer.gif ADDED
Binary file
editarea/images/statusbar_resize.gif ADDED
Binary file
editarea/images/undo.gif ADDED
Binary file
editarea/images/word_wrap.gif ADDED
Binary file
editarea/langs/bg.js ADDED
@@ -0,0 +1,54 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * Bulgarian translation
3
+ * Author: Valentin Hristov
4
+ * Company: SOFTKIT Bulgarian
5
+ * Site: http://www.softkit-bg.com
6
+ */
7
+ editAreaLoader.lang["bg"]={
8
+ new_document: "нов документ",
9
+ search_button: "търсене и замяна",
10
+ search_command: "търси следващия / отвори прозорец с търсачка",
11
+ search: "търсене",
12
+ replace: "замяна",
13
+ replace_command: "замяна / отвори прозорец с търсачка",
14
+ find_next: "намери следващия",
15
+ replace_all: "замени всички",
16
+ reg_exp: "реголярни изрази",
17
+ match_case: "чуствителен към регистъра",
18
+ not_found: "няма резултат.",
19
+ occurrence_replaced: "замяната е осъществена.",
20
+ search_field_empty: "Полето за търсене е празно",
21
+ restart_search_at_begin: "До края на документа. Почни с началото.",
22
+ move_popup: "премести прозореца с търсачката",
23
+ font_size: "--Размер на шрифта--",
24
+ go_to_line: "премени към реда",
25
+ go_to_line_prompt: "премени към номера на реда:",
26
+ undo: "отмени",
27
+ redo: "върни",
28
+ change_smooth_selection: "включи/изключи някой от функциите за преглед (по красиво, но повече натоварва)",
29
+ highlight: "превключване на оцветяване на синтаксиса включена/изключена",
30
+ reset_highlight: "въстанови оцветяване на синтаксиса (ако не е синхронизиран с текста)",
31
+ word_wrap: "режим на пренасяне на дълги редове",
32
+ help: "за програмата",
33
+ save: "съхрани",
34
+ load: "зареди",
35
+ line_abbr: "Стр",
36
+ char_abbr: "Стлб",
37
+ position: "Позиция",
38
+ total: "Всичко",
39
+ close_popup: "затвори прозореца",
40
+ shortcuts: "Бързи клавиши",
41
+ add_tab: "добави табулация в текста",
42
+ remove_tab: "премахни табулацията в текста",
43
+ about_notice: "Внимание: използвайте функцията оцветяване на синтаксиса само за малки текстове",
44
+ toggle: "Превключи редактор",
45
+ accesskey: "Бърз клавиш",
46
+ tab: "Tab",
47
+ shift: "Shift",
48
+ ctrl: "Ctrl",
49
+ esc: "Esc",
50
+ processing: "Зареждане...",
51
+ fullscreen: "на цял екран",
52
+ syntax_selection: "--Синтаксис--",
53
+ close_tab: "Затвори файла"
54
+ };
editarea/langs/cs.js ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ editAreaLoader.lang["cs"]={
2
+ new_document: "Nový dokument",
3
+ search_button: "Najdi a nahraď",
4
+ search_command: "Hledej další / otevři vyhledávací pole",
5
+ search: "Hledej",
6
+ replace: "Nahraď",
7
+ replace_command: "Nahraď / otevři vyhledávací pole",
8
+ find_next: "Najdi další",
9
+ replace_all: "Nahraď vše",
10
+ reg_exp: "platné výrazy",
11
+ match_case: "vyhodnocené výrazy",
12
+ not_found: "nenalezené.",
13
+ occurrence_replaced: "výskyty nahrazené.",
14
+ search_field_empty: "Pole vyhledávání je prázdné",
15
+ restart_search_at_begin: "Dosažen konec souboru, začínám od začátku.",
16
+ move_popup: "Přesuň vyhledávací okno",
17
+ font_size: "--Velikost textu--",
18
+ go_to_line: "Přejdi na řádek",
19
+ go_to_line_prompt: "Přejdi na řádek:",
20
+ undo: "krok zpět",
21
+ redo: "znovu",
22
+ change_smooth_selection: "Povolit nebo zakázat některé ze zobrazených funkcí (účelnější zobrazení požaduje větší zatížení procesoru)",
23
+ highlight: "Zvýrazňování syntaxe zap./vyp.",
24
+ reset_highlight: "Obnovit zvýraznění (v případě nesrovnalostí)",
25
+ word_wrap: "toggle word wrapping mode",
26
+ help: "O programu",
27
+ save: "Uložit",
28
+ load: "Otevřít",
29
+ line_abbr: "Ř.",
30
+ char_abbr: "S.",
31
+ position: "Pozice",
32
+ total: "Celkem",
33
+ close_popup: "Zavřít okno",
34
+ shortcuts: "Zkratky",
35
+ add_tab: "Přidat tabulování textu",
36
+ remove_tab: "Odtsranit tabulování textu",
37
+ about_notice: "Upozornění! Funkce zvýrazňování textu je k dispozici pouze pro malý text",
38
+ toggle: "Přepnout editor",
39
+ accesskey: "Přístupová klávesa",
40
+ tab: "Záložka",
41
+ shift: "Shift",
42
+ ctrl: "Ctrl",
43
+ esc: "Esc",
44
+ processing: "Zpracovávám ...",
45
+ fullscreen: "Celá obrazovka",
46
+ syntax_selection: "--vyber zvýrazňovač--",
47
+ close_tab: "Close file"
48
+ };
editarea/langs/de.js ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ editAreaLoader.lang["de"]={
2
+ new_document: "Neues Dokument",
3
+ search_button: "Suchen und Ersetzen",
4
+ search_command: "Weitersuchen / &ouml;ffne Suchfeld",
5
+ search: "Suchen",
6
+ replace: "Ersetzen",
7
+ replace_command: "Ersetzen / &ouml;ffne Suchfeld",
8
+ find_next: "Weitersuchen",
9
+ replace_all: "Ersetze alle Treffer",
10
+ reg_exp: "regul&auml;re Ausdr&uuml;cke",
11
+ match_case: "passt auf den Begriff<br />",
12
+ not_found: "Nicht gefunden.",
13
+ occurrence_replaced: "Die Vorkommen wurden ersetzt.",
14
+ search_field_empty: "Leeres Suchfeld",
15
+ restart_search_at_begin: "Ende des zu durchsuchenden Bereiches erreicht. Es wird die Suche von Anfang an fortgesetzt.", //find a shorter translation
16
+ move_popup: "Suchfenster bewegen",
17
+ font_size: "--Schriftgr&ouml;&szlig;e--",
18
+ go_to_line: "Gehe zu Zeile",
19
+ go_to_line_prompt: "Gehe zu Zeilennummmer:",
20
+ undo: "R&uuml;ckg&auml;ngig",
21
+ redo: "Wiederherstellen",
22
+ change_smooth_selection: "Aktiviere/Deaktiviere einige Features (weniger Bildschirmnutzung aber mehr CPU-Belastung)",
23
+ highlight: "Syntax Highlighting an- und ausschalten",
24
+ reset_highlight: "Highlighting zur&uuml;cksetzen (falls mit Text nicht konform)",
25
+ word_wrap: "Toggle word wrapping mode",
26
+ help: "Info",
27
+ save: "Speichern",
28
+ load: "&Ouml;ffnen",
29
+ line_abbr: "Ln",
30
+ char_abbr: "Ch",
31
+ position: "Position",
32
+ total: "Gesamt",
33
+ close_popup: "Popup schlie&szlig;en",
34
+ shortcuts: "Shortcuts",
35
+ add_tab: "Tab zum Text hinzuf&uuml;gen",
36
+ remove_tab: "Tab aus Text entfernen",
37
+ about_notice: "Bemerkung: Syntax Highlighting ist nur f&uuml;r kurze Texte",
38
+ toggle: "Editor an- und ausschalten",
39
+ accesskey: "Accesskey",
40
+ tab: "Tab",
41
+ shift: "Shift",
42
+ ctrl: "Ctrl",
43
+ esc: "Esc",
44
+ processing: "In Bearbeitung...",
45
+ fullscreen: "Full-Screen",
46
+ syntax_selection: "--Syntax--",
47
+ close_tab: "Close file"
48
+ };
editarea/langs/dk.js ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ editAreaLoader.lang["dk"]={
2
+ new_document: "nyt tomt dokument",
3
+ search_button: "s&oslash;g og erstat",
4
+ search_command: "find n&aelig;ste / &aring;ben s&oslash;gefelt",
5
+ search: "s&oslash;g",
6
+ replace: "erstat",
7
+ replace_command: "erstat / &aring;ben s&oslash;gefelt",
8
+ find_next: "find n&aelig;ste",
9
+ replace_all: "erstat alle",
10
+ reg_exp: "regular expressions",
11
+ match_case: "forskel på store/sm&aring; bogstaver<br />",
12
+ not_found: "not found.",
13
+ occurrence_replaced: "occurences replaced.",
14
+ search_field_empty: "Search field empty",
15
+ restart_search_at_begin: "End of area reached. Restart at begin.",
16
+ move_popup: "flyt søgepopup",
17
+ font_size: "--Skriftstørrelse--",
18
+ go_to_line: "g&aring; til linie",
19
+ go_to_line_prompt: "gå til linienummer:",
20
+ undo: "fortryd",
21
+ redo: "gentag",
22
+ change_smooth_selection: "sl&aring; display funktioner til/fra (smartere display men mere CPU kr&aelig;vende)",
23
+ highlight: "sl&aring; syntax highlight til/fra",
24
+ reset_highlight: "nulstil highlight (hvis den er desynkroniseret fra teksten)",
25
+ word_wrap: "toggle word wrapping mode",
26
+ help: "om",
27
+ save: "gem",
28
+ load: "hent",
29
+ line_abbr: "Ln",
30
+ char_abbr: "Ch",
31
+ position: "Position",
32
+ total: "Total",
33
+ close_popup: "luk popup",
34
+ shortcuts: "Genveje",
35
+ add_tab: "tilf&oslash;j tabulation til tekst",
36
+ remove_tab: "fjern tabulation fra tekst",
37
+ about_notice: "Husk: syntax highlight funktionen b&oslash;r kun bruge til sm&aring; tekster",
38
+ toggle: "Sl&aring; editor til / fra",
39
+ accesskey: "Accesskey",
40
+ tab: "Tab",
41
+ shift: "Skift",
42
+ ctrl: "Ctrl",
43
+ esc: "Esc",
44
+ processing: "Processing...",
45
+ fullscreen: "fullscreen",
46
+ syntax_selection: "--Syntax--",
47
+ close_tab: "Close file"
48
+ };
editarea/langs/en.js ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ editAreaLoader.lang["en"]={
2
+ new_document: "new empty document",
3
+ search_button: "search and replace",
4
+ search_command: "search next / open search area",
5
+ search: "search",
6
+ replace: "replace",
7
+ replace_command: "replace / open search area",
8
+ find_next: "find next",
9
+ replace_all: "replace all",
10
+ reg_exp: "regular expressions",
11
+ match_case: "match case",
12
+ not_found: "not found.",
13
+ occurrence_replaced: "occurences replaced.",
14
+ search_field_empty: "Search field empty",
15
+ restart_search_at_begin: "End of area reached. Restart at begin.",
16
+ move_popup: "move search popup",
17
+ font_size: "--Font size--",
18
+ go_to_line: "go to line",
19
+ go_to_line_prompt: "go to line number:",
20
+ undo: "undo",
21
+ redo: "redo",
22
+ change_smooth_selection: "enable/disable some display features (smarter display but more CPU charge)",
23
+ highlight: "toggle syntax highlight on/off",
24
+ reset_highlight: "reset highlight (if desyncronized from text)",
25
+ word_wrap: "toggle word wrapping mode",
26
+ help: "about",
27
+ save: "save",
28
+ load: "load",
29
+ line_abbr: "Ln",
30
+ char_abbr: "Ch",
31
+ position: "Position",
32
+ total: "Total",
33
+ close_popup: "close popup",
34
+ shortcuts: "Shortcuts",
35
+ add_tab: "add tabulation to text",
36
+ remove_tab: "remove tabulation to text",
37
+ about_notice: "Notice: syntax highlight function is only for small text",
38
+ toggle: "Toggle editor",
39
+ accesskey: "Accesskey",
40
+ tab: "Tab",
41
+ shift: "Shift",
42
+ ctrl: "Ctrl",
43
+ esc: "Esc",
44
+ processing: "Processing...",
45
+ fullscreen: "fullscreen",
46
+ syntax_selection: "--Syntax--",
47
+ close_tab: "Close file"
48
+ };
editarea/langs/eo.js ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ editAreaLoader.lang["eo"]={
2
+ new_document: "nova dokumento (vakigas la enhavon)",
3
+ search_button: "ser&#265;i / anstata&#365;igi",
4
+ search_command: "pluser&#265;i / malfermi la ser&#265;o-fenestron",
5
+ search: "ser&#265;i",
6
+ replace: "anstata&#365;igi",
7
+ replace_command: "anstata&#365;igi / malfermi la ser&#265;o-fenestron",
8
+ find_next: "ser&#265;i",
9
+ replace_all: "anstata&#365;igi &#265;ion",
10
+ reg_exp: "regula esprimo",
11
+ match_case: "respekti la usklecon",
12
+ not_found: "ne trovita.",
13
+ occurrence_replaced: "anstata&#365;igoj plenumitaj.",
14
+ search_field_empty: "La kampo estas malplena.",
15
+ restart_search_at_begin: "Fino de teksto &#285;isrirata, &#265;u da&#365;rigi el la komenco?",
16
+ move_popup: "movi la ser&#265;o-fenestron",
17
+ font_size: "--Tipara grando--",
18
+ go_to_line: "iri al la linio",
19
+ go_to_line_prompt: "iri al la linio numero:",
20
+ undo: "rezigni",
21
+ redo: "refari",
22
+ change_smooth_selection: "ebligi/malebligi la funkcioj de vidigo (pli bona vidigo, sed pli da &#349;ar&#285;o de la &#265;eforgano)",
23
+ highlight: "ebligi/malebligi la sintaksan kolorigon",
24
+ reset_highlight: "repravalorizi la sintaksan kolorigon (se malsinkronigon de la teksto)",
25
+ word_wrap: "toggle word wrapping mode",
26
+ help: "pri",
27
+ save: "registri",
28
+ load: "&#349;ar&#285;i",
29
+ line_abbr: "Ln",
30
+ char_abbr: "Sg",
31
+ position: "Pozicio",
32
+ total: "Sumo",
33
+ close_popup: "fermi la &#349;prucfenestron",
34
+ shortcuts: "Fulmoklavo",
35
+ add_tab: "aldoni tabon en la tekston",
36
+ remove_tab: "forigi tablon el la teksto",
37
+ about_notice: "Noto: la sintaksa kolorigo estas nur prikalkulita por mallongaj tekstoj.",
38
+ toggle: "baskuligi la redaktilon",
39
+ accesskey: "Fulmoklavo",
40
+ tab: "Tab",
41
+ shift: "Maj",
42
+ ctrl: "Ktrl",
43
+ esc: "Esk",
44
+ processing: "&#349;argante...",
45
+ fullscreen: "plenekrane",
46
+ syntax_selection: "--Sintakso--",
47
+ close_tab: "Fermi la dosieron"
48
+ };
editarea/langs/es.js ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ editAreaLoader.lang["es"]={
2
+ new_document: "nuevo documento vacío",
3
+ search_button: "buscar y reemplazar",
4
+ search_command: "buscar siguiente / abrir área de búsqueda",
5
+ search: "buscar",
6
+ replace: "reemplazar",
7
+ replace_command: "reemplazar / abrir área de búsqueda",
8
+ find_next: "encontrar siguiente",
9
+ replace_all: "reemplazar todos",
10
+ reg_exp: "expresiones regulares",
11
+ match_case: "coincidir capitalización",
12
+ not_found: "no encontrado.",
13
+ occurrence_replaced: "ocurrencias reemplazadas.",
14
+ search_field_empty: "Campo de búsqueda vacío",
15
+ restart_search_at_begin: "Se ha llegado al final del área. Se va a seguir desde el principio.",
16
+ move_popup: "mover la ventana de búsqueda",
17
+ font_size: "--Tamaño de la fuente--",
18
+ go_to_line: "ir a la línea",
19
+ go_to_line_prompt: "ir a la línea número:",
20
+ undo: "deshacer",
21
+ redo: "rehacer",
22
+ change_smooth_selection: "activar/desactivar algunas características de visualización (visualización más inteligente pero más carga de CPU)",
23
+ highlight: "intercambiar resaltado de sintaxis",
24
+ reset_highlight: "reinicializar resaltado (si no esta sincronizado con el texto)",
25
+ word_wrap: "toggle word wrapping mode",
26
+ help: "acerca",
27
+ save: "guardar",
28
+ load: "cargar",
29
+ line_abbr: "Ln",
30
+ char_abbr: "Ch",
31
+ position: "Posición",
32
+ total: "Total",
33
+ close_popup: "recuadro de cierre",
34
+ shortcuts: "Atajos",
35
+ add_tab: "añadir tabulado al texto",
36
+ remove_tab: "borrar tabulado del texto",
37
+ about_notice: "Aviso: el resaltado de sintaxis sólo funciona para texto pequeño",
38
+ toggle: "Cambiar editor",
39
+ accesskey: "Tecla de acceso",
40
+ tab: "Tab",
41
+ shift: "Mayúsc",
42
+ ctrl: "Ctrl",
43
+ esc: "Esc",
44
+ processing: "Procesando...",
45
+ fullscreen: "pantalla completa",
46
+ syntax_selection: "--Syntax--",
47
+ close_tab: "Close file"
48
+ };
editarea/langs/fi.js ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ editAreaLoader.lang["fi"]={
2
+ new_document: "uusi tyhjä dokumentti",
3
+ search_button: "etsi ja korvaa",
4
+ search_command: "etsi seuraava / avaa etsintävalikko",
5
+ search: "etsi",
6
+ replace: "korvaa",
7
+ replace_command: "korvaa / avaa etsintävalikko",
8
+ find_next: "etsi seuraava",
9
+ replace_all: "korvaa kaikki",
10
+ reg_exp: "säännölliset lausekkeet",
11
+ match_case: "täsmää kirjainkokoon",
12
+ not_found: "ei löytynyt.",
13
+ occurrence_replaced: "esiintymää korvattu.",
14
+ search_field_empty: "Haettava merkkijono on tyhjä",
15
+ restart_search_at_begin: "Alueen loppu saavutettiin. Aloitetaan alusta.",
16
+ move_popup: "siirrä etsintävalikkoa",
17
+ font_size: "--Fontin koko--",
18
+ go_to_line: "siirry riville",
19
+ go_to_line_prompt: "mene riville:",
20
+ undo: "peruuta",
21
+ redo: "tee uudelleen",
22
+ change_smooth_selection: "kytke/sammuta joitakin näyttötoimintoja (Älykkäämpi toiminta, mutta suurempi CPU kuormitus)",
23
+ highlight: "kytke syntaksikorostus päälle/pois",
24
+ reset_highlight: "resetoi syntaksikorostus (jos teksti ei ole synkassa korostuksen kanssa)",
25
+ word_wrap: "toggle word wrapping mode",
26
+ help: "tietoja",
27
+ save: "tallenna",
28
+ load: "lataa",
29
+ line_abbr: "Rv",
30
+ char_abbr: "Pos",
31
+ position: "Paikka",
32
+ total: "Yhteensä",
33
+ close_popup: "sulje valikko",
34
+ shortcuts: "Pikatoiminnot",
35
+ add_tab: "lisää sisennys tekstiin",
36
+ remove_tab: "poista sisennys tekstistä",
37
+ about_notice: "Huomautus: syntaksinkorostus toimii vain pienelle tekstille",
38
+ toggle: "Kytke editori",
39
+ accesskey: "Pikanäppäin",
40
+ tab: "Tab",
41
+ shift: "Shift",
42
+ ctrl: "Ctrl",
43
+ esc: "Esc",
44
+ processing: "Odota...",
45
+ fullscreen: "koko ruutu",
46
+ syntax_selection: "--Syntaksi--",
47
+ close_tab: "Sulje tiedosto"
48
+ };
editarea/langs/fr.js ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ editAreaLoader.lang["fr"]={
2
+ new_document: "nouveau document (efface le contenu)",
3
+ search_button: "rechercher / remplacer",
4
+ search_command: "rechercher suivant / ouvrir la fen&ecirc;tre de recherche",
5
+ search: "rechercher",
6
+ replace: "remplacer",
7
+ replace_command: "remplacer / ouvrir la fen&ecirc;tre de recherche",
8
+ find_next: "rechercher",
9
+ replace_all: "tout remplacer",
10
+ reg_exp: "expr. r&eacute;guli&egrave;re",
11
+ match_case: "respecter la casse",
12
+ not_found: "pas trouv&eacute;.",
13
+ occurrence_replaced: "remplacements &eacute;ffectu&eacute;s.",
14
+ search_field_empty: "Le champ de recherche est vide.",
15
+ restart_search_at_begin: "Fin du texte atteint, poursuite au d&eacute;but.",
16
+ move_popup: "d&eacute;placer la fen&ecirc;tre de recherche",
17
+ font_size: "--Taille police--",
18
+ go_to_line: "aller &agrave; la ligne",
19
+ go_to_line_prompt: "aller a la ligne numero:",
20
+ undo: "annuler",
21
+ redo: "refaire",
22
+ change_smooth_selection: "activer/d&eacute;sactiver des fonctions d'affichage (meilleur affichage mais plus de charge processeur)",
23
+ highlight: "activer/d&eacute;sactiver la coloration syntaxique",
24
+ reset_highlight: "r&eacute;initialiser la coloration syntaxique (si d&eacute;syncronis&eacute;e du texte)",
25
+ word_wrap: "activer/d&eacute;sactiver les retours &agrave; la ligne automatiques",
26
+ help: "&agrave; propos",
27
+ save: "sauvegarder",
28
+ load: "charger",
29
+ line_abbr: "Ln",
30
+ char_abbr: "Ch",
31
+ position: "Position",
32
+ total: "Total",
33
+ close_popup: "fermer le popup",
34
+ shortcuts: "Racourcis clavier",
35
+ add_tab: "ajouter une tabulation dans le texte",
36
+ remove_tab: "retirer une tabulation dans le texte",
37
+ about_notice: "Note: la coloration syntaxique n'est pr&eacute;vue que pour de courts textes.",
38
+ toggle: "basculer l'&eacute;diteur",
39
+ accesskey: "Accesskey",
40
+ tab: "Tab",
41
+ shift: "Maj",
42
+ ctrl: "Ctrl",
43
+ esc: "Esc",
44
+ processing: "chargement...",
45
+ fullscreen: "plein &eacute;cran",
46
+ syntax_selection: "--Syntaxe--",
47
+ close_tab: "Fermer le fichier"
48
+ };
editarea/langs/hr.js ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ editAreaLoader.lang["hr"]={
2
+ new_document: "Novi dokument",
3
+ search_button: "Traži i izmijeni",
4
+ search_command: "Traži dalje / Otvori prozor za traženje",
5
+ search: "Traži",
6
+ replace: "Izmijeni",
7
+ replace_command: "Izmijeni / Otvori prozor za traženje",
8
+ find_next: "Traži dalje",
9
+ replace_all: "Izmjeni sve",
10
+ reg_exp: "Regularni izrazi",
11
+ match_case: "Bitna vel. slova",
12
+ not_found: "nije naðeno.",
13
+ occurrence_replaced: "izmjenjenih.",
14
+ search_field_empty: "Prazno polje za traženje!",
15
+ restart_search_at_begin: "Došao do kraja. Poèeo od poèetka.",
16
+ move_popup: "Pomakni prozor",
17
+ font_size: "--Velièina teksta--",
18
+ go_to_line: "Odi na redak",
19
+ go_to_line_prompt: "Odi na redak:",
20
+ undo: "Vrati natrag",
21
+ redo: "Napravi ponovo",
22
+ change_smooth_selection: "Ukljuèi/iskljuèi neke moguænosti prikaza (pametniji prikaz, ali zagušeniji CPU)",
23
+ highlight: "Ukljuèi/iskljuèi bojanje sintakse",
24
+ reset_highlight: "Ponovi kolorizaciju (ako je nesinkronizirana s tekstom)",
25
+ word_wrap: "toggle word wrapping mode",
26
+ help: "O edit_area",
27
+ save: "Spremi",
28
+ load: "Uèitaj",
29
+ line_abbr: "Ln",
30
+ char_abbr: "Zn",
31
+ position: "Pozicija",
32
+ total: "Ukupno",
33
+ close_popup: "Zatvori prozor",
34
+ shortcuts: "Kratice",
35
+ add_tab: "Dodaj tabulaciju",
36
+ remove_tab: "Makni tabulaciju",
37
+ about_notice: "Napomena: koloriziranje sintakse je samo za kratke kodove",
38
+ toggle: "Prebaci naèin ureðivanja",
39
+ accesskey: "Accesskey",
40
+ tab: "Tab",
41
+ shift: "Shift",
42
+ ctrl: "Ctrl",
43
+ esc: "Esc",
44
+ processing: "Procesiram...",
45
+ fullscreen: "Cijeli prozor",
46
+ syntax_selection: "--Syntax--",
47
+ close_tab: "Close file"
48
+ };
editarea/langs/id.js ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ editAreaLoader.lang["id"]={
2
+ new_document: "dokumen baru",
3
+ search_button: "cari dan ganti",
4
+ search_command: "cari lagi / buka area pencarian",
5
+ search: "cari",
6
+ replace: "ganti",
7
+ replace_command: "ganti / buka area pencarian",
8
+ find_next: "cari lagi",
9
+ replace_all: "ganti semua",
10
+ reg_exp: "regular expressions",
11
+ match_case: "kapitalisasi",
12
+ not_found: "tidak ditemukan.",
13
+ occurrence_replaced: "occurences replaced.",
14
+ search_field_empty: "Kata kunci kosong",
15
+ restart_search_at_begin: "Area habis. Mulai lagi dari awal.",
16
+ move_popup: "geser popup pencarian",
17
+ font_size: "--Ukuran huruf--",
18
+ go_to_line: "menuju baris",
19
+ go_to_line_prompt: "menuju baris ke:",
20
+ undo: "undo",
21
+ redo: "redo",
22
+ change_smooth_selection: "hidupkan/matikan beberapa fitur tampilan (tampilan lebih baik, sumberdaya CPU lebih besar)",
23
+ highlight: "penanda syntax matikan/hidupkan",
24
+ reset_highlight: "reset highlight (jika tidak sinkron dengan text)",
25
+ word_wrap: "potong baris panjang",
26
+ help: "tentang",
27
+ save: "simpan",
28
+ load: "ambil",
29
+ line_abbr: "Baris",
30
+ char_abbr: "Kolom",
31
+ position: "Posisi",
32
+ total: "Total",
33
+ close_popup: "tutup popup",
34
+ shortcuts: "Pintasan",
35
+ add_tab: "tambah tab ke text",
36
+ remove_tab: "hapus tab dari text",
37
+ about_notice: "Catatan: fungsi syntax highlight hanya untuk text kecil",
38
+ toggle: "Matikan/hidupkan editor",
39
+ accesskey: "Kunci akses",
40
+ tab: "Tab",
41
+ shift: "Shift",
42
+ ctrl: "Ctrl",
43
+ esc: "Esc",
44
+ processing: "Memproses...",
45
+ fullscreen: "layarpenuh",
46
+ syntax_selection: "--Bahasa--",
47
+ close_tab: "Tutup file"
48
+ };
editarea/langs/it.js ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ editAreaLoader.lang["it"]={
2
+ new_document: "nuovo documento vuoto",
3
+ search_button: "cerca e sostituisci",
4
+ search_command: "trova successivo / apri finestra di ricerca",
5
+ search: "cerca",
6
+ replace: "sostituisci",
7
+ replace_command: "sostituisci / apri finestra di ricerca",
8
+ find_next: "trova successivo",
9
+ replace_all: "sostituisci tutti",
10
+ reg_exp: "espressioni regolari",
11
+ match_case: "confronta maiuscole/minuscole<br />",
12
+ not_found: "non trovato.",
13
+ occurrence_replaced: "occorrenze sostituite.",
14
+ search_field_empty: "Campo ricerca vuoto",
15
+ restart_search_at_begin: "Fine del testo raggiunta. Ricomincio dall'inizio.",
16
+ move_popup: "sposta popup di ricerca",
17
+ font_size: "-- Dimensione --",
18
+ go_to_line: "vai alla linea",
19
+ go_to_line_prompt: "vai alla linea numero:",
20
+ undo: "annulla",
21
+ redo: "ripeti",
22
+ change_smooth_selection: "abilita/disabilita alcune caratteristiche della visualizzazione",
23
+ highlight: "abilita/disabilita colorazione della sintassi",
24
+ reset_highlight: "aggiorna colorazione (se non sincronizzata)",
25
+ word_wrap: "toggle word wrapping mode",
26
+ help: "informazioni su...",
27
+ save: "salva",
28
+ load: "carica",
29
+ line_abbr: "Ln",
30
+ char_abbr: "Ch",
31
+ position: "Posizione",
32
+ total: "Totale",
33
+ close_popup: "chiudi popup",
34
+ shortcuts: "Scorciatoie",
35
+ add_tab: "aggiungi tabulazione",
36
+ remove_tab: "rimuovi tabulazione",
37
+ about_notice: "Avviso: la colorazione della sintassi vale solo con testo piccolo",
38
+ toggle: "Abilita/disabilita editor",
39
+ accesskey: "Accesskey",
40
+ tab: "Tab",
41
+ shift: "Shift",
42
+ ctrl: "Ctrl",
43
+ esc: "Esc",
44
+ processing: "In corso...",
45
+ fullscreen: "fullscreen",
46
+ syntax_selection: "--Syntax--",
47
+ close_tab: "Close file"
48
+ };
editarea/langs/ja.js ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ editAreaLoader.lang["ja"]={
2
+ new_document: "新規作成",
3
+ search_button: "検索・置換",
4
+ search_command: "次を検索 / 検索窓を表示",
5
+ search: "検索",
6
+ replace: "置換",
7
+ replace_command: "置換 / 置換窓を表示",
8
+ find_next: "次を検索",
9
+ replace_all: "全置換",
10
+ reg_exp: "正規表現",
11
+ match_case: "大文字小文字の区別",
12
+ not_found: "見つかりません。",
13
+ occurrence_replaced: "置換しました。",
14
+ search_field_empty: "検索対象文字列が空です。",
15
+ restart_search_at_begin: "終端に達しました、始めに戻ります",
16
+ move_popup: "検索窓を移動",
17
+ font_size: "--フォントサイズ--",
18
+ go_to_line: "指定行へ移動",
19
+ go_to_line_prompt: "指定行へ移動します:",
20
+ undo: "元に戻す",
21
+ redo: "やり直し",
22
+ change_smooth_selection: "スムース表示の切り替え(CPUを使います)",
23
+ highlight: "構文強調表示の切り替え",
24
+ reset_highlight: "構文強調表示のリセット",
25
+ word_wrap: "toggle word wrapping mode",
26
+ help: "ヘルプを表示",
27
+ save: "保存",
28
+ load: "読み込み",
29
+ line_abbr: "行",
30
+ char_abbr: "文字",
31
+ position: "位置",
32
+ total: "合計",
33
+ close_popup: "ポップアップを閉じる",
34
+ shortcuts: "ショートカット",
35
+ add_tab: "タブを挿入する",
36
+ remove_tab: "タブを削除する",
37
+ about_notice: "注意:構文強調表示は短いテキストでしか有効に機能しません。",
38
+ toggle: "テキストエリアとeditAreaの切り替え",
39
+ accesskey: "アクセスキー",
40
+ tab: "Tab",
41
+ shift: "Shift",
42
+ ctrl: "Ctrl",
43
+ esc: "Esc",
44
+ processing: "処理中です...",
45
+ fullscreen: "fullscreen",
46
+ syntax_selection: "--Syntax--",
47
+ close_tab: "Close file"
48
+ };
editarea/langs/mk.js ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ editAreaLoader.lang["mk"]={
2
+ new_document: "Нов документ",
3
+ search_button: "Најди и замени",
4
+ search_command: "Барај следно / Отвори нов прозорец за пребарување",
5
+ search: "Барај",
6
+ replace: "Замени",
7
+ replace_command: "Замени / Отвори прозорец за пребарување",
8
+ find_next: "најди следно",
9
+ replace_all: "Замени ги сите",
10
+ reg_exp: "Регуларни изрази",
11
+ match_case: "Битна е големината на буквите",
12
+ not_found: "не е пронајдено.",
13
+ occurrence_replaced: "замени.",
14
+ search_field_empty: "Полето за пребарување е празно",
15
+ restart_search_at_begin: "Крај на областа. Стартувај од почеток.",
16
+ move_popup: "Помести го прозорецот",
17
+ font_size: "--Големина на текстот--",
18
+ go_to_line: "Оди на линија",
19
+ go_to_line_prompt: "Оди на линија со број:",
20
+ undo: "Врати",
21
+ redo: "Повтори",
22
+ change_smooth_selection: "Вклучи/исклучи некои карактеристики за приказ (попаметен приказ, но поголемо оптеретување за процесорот)",
23
+ highlight: "Вклучи/исклучи осветлување на синтакса",
24
+ reset_highlight: "Ресетирај го осветлувањето на синтакса (доколку е десинхронизиранo со текстот)",
25
+ word_wrap: "toggle word wrapping mode",
26
+ help: "За",
27
+ save: "Зачувај",
28
+ load: "Вчитај",
29
+ line_abbr: "Лн",
30
+ char_abbr: "Зн",
31
+ position: "Позиција",
32
+ total: "Вкупно",
33
+ close_popup: "Затвори го прозорецот",
34
+ shortcuts: "Кратенки",
35
+ add_tab: "Додај табулација на текстот",
36
+ remove_tab: "Отстрани ја табулацијата",
37
+ about_notice: "Напомена: Осветлувањето на синтанса е само за краток текст",
38
+ toggle: "Смени начин на уредување",
39
+ accesskey: "Accesskey",
40
+ tab: "Tab",
41
+ shift: "Shift",
42
+ ctrl: "Ctrl",
43
+ esc: "Esc",
44
+ processing: "Обработувам...",
45
+ fullscreen: "Цел прозорец",
46
+ syntax_selection: "--Синтакса--",
47
+ close_tab: "Избери датотека"
48
+ };
editarea/langs/nl.js ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ editAreaLoader.lang["nl"]={
2
+ new_document: "nieuw leeg document",
3
+ search_button: "zoek en vervang",
4
+ search_command: "zoek volgende / zoekscherm openen",
5
+ search: "zoek",
6
+ replace: "vervang",
7
+ replace_command: "vervang / zoekscherm openen",
8
+ find_next: "volgende vinden",
9
+ replace_all: "alles vervangen",
10
+ reg_exp: "reguliere expressies",
11
+ match_case: "hoofdletter gevoelig",
12
+ not_found: "niet gevonden.",
13
+ occurrence_replaced: "object vervangen.",
14
+ search_field_empty: "Zoek veld leeg",
15
+ restart_search_at_begin: "Niet meer instanties gevonden, begin opnieuw",
16
+ move_popup: "versleep zoek scherm",
17
+ font_size: "--Letter grootte--",
18
+ go_to_line: "Ga naar regel",
19
+ go_to_line_prompt: "Ga naar regel nummer:",
20
+ undo: "Ongedaan maken",
21
+ redo: "Opnieuw doen",
22
+ change_smooth_selection: "zet wat schermopties aan/uit (kan langzamer zijn)",
23
+ highlight: "zet syntax highlight aan/uit",
24
+ reset_highlight: "reset highlight (indien gedesynchronizeerd)",
25
+ word_wrap: "toggle word wrapping mode",
26
+ help: "informatie",
27
+ save: "opslaan",
28
+ load: "laden",
29
+ line_abbr: "Ln",
30
+ char_abbr: "Ch",
31
+ position: "Positie",
32
+ total: "Totaal",
33
+ close_popup: "Popup sluiten",
34
+ shortcuts: "Snelkoppelingen",
35
+ add_tab: "voeg tabs toe in tekst",
36
+ remove_tab: "verwijder tabs uit tekst",
37
+ about_notice: "Notitie: syntax highlight functie is alleen voor kleine tekst",
38
+ toggle: "geavanceerde bewerkingsopties",
39
+ accesskey: "Accessknop",
40
+ tab: "Tab",
41
+ shift: "Shift",
42
+ ctrl: "Ctrl",
43
+ esc: "Esc",
44
+ processing: "Verwerken...",
45
+ fullscreen: "fullscreen",
46
+ syntax_selection: "--Syntax--",
47
+ close_tab: "Close file"
48
+ };
editarea/langs/pl.js ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ editAreaLoader.lang["pl"]={
2
+ new_document: "nowy dokument",
3
+ search_button: "znajdź i zamień",
4
+ search_command: "znajdź następny",
5
+ search: "znajdź",
6
+ replace: "zamień",
7
+ replace_command: "zamień",
8
+ find_next: "następny",
9
+ replace_all: "zamień wszystko",
10
+ reg_exp: "wyrażenie regularne",
11
+ match_case: "uwzględnij wielkość liter<br />",
12
+ not_found: "nie znaleziono.",
13
+ occurrence_replaced: "wystąpień zamieniono.",
14
+ search_field_empty: "Nie wprowadzono tekstu",
15
+ restart_search_at_begin: "Koniec dokumentu. Wyszukiwanie od początku.",
16
+ move_popup: "przesuń okienko wyszukiwania",
17
+ font_size: "Rozmiar",
18
+ go_to_line: "idź do linii",
19
+ go_to_line_prompt: "numer linii:",
20
+ undo: "cofnij",
21
+ redo: "przywróć",
22
+ change_smooth_selection: "włącz/wyłącz niektóre opcje wyglądu (zaawansowane opcje wyglądu obciążają procesor)",
23
+ highlight: "włącz/wyłącz podświetlanie składni",
24
+ reset_highlight: "odśwież podświetlanie składni (jeśli rozsynchronizowało się z tekstem)",
25
+ word_wrap: "toggle word wrapping mode",
26
+ help: "o programie",
27
+ save: "zapisz",
28
+ load: "otwórz",
29
+ line_abbr: "Ln",
30
+ char_abbr: "Zn",
31
+ position: "Pozycja",
32
+ total: "W sumie",
33
+ close_popup: "zamknij okienko",
34
+ shortcuts: "Skróty klawiaturowe",
35
+ add_tab: "dodaj wcięcie do zaznaczonego tekstu",
36
+ remove_tab: "usuń wcięcie",
37
+ about_notice: "Uwaga: podświetlanie składni nie jest zalecane dla długich tekstów",
38
+ toggle: "Włącz/wyłącz edytor",
39
+ accesskey: "Alt+",
40
+ tab: "Tab",
41
+ shift: "Shift",
42
+ ctrl: "Ctrl",
43
+ esc: "Esc",
44
+ processing: "Przetwarzanie...",
45
+ fullscreen: "fullscreen",
46
+ syntax_selection: "--Syntax--",
47
+ close_tab: "Close file"
48
+ };
editarea/langs/pt.js ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ editAreaLoader.lang["pt"]={
2
+ new_document: "Novo documento",
3
+ search_button: "Localizar e substituir",
4
+ search_command: "Localizar próximo",
5
+ search: "Localizar",
6
+ replace: "Substituir",
7
+ replace_command: "Substituir",
8
+ find_next: "Localizar",
9
+ replace_all: "Subst. tudo",
10
+ reg_exp: "Expressões regulares",
11
+ match_case: "Diferenciar maiúsculas e minúsculas",
12
+ not_found: "Não encontrado.",
13
+ occurrence_replaced: "Ocorrências substituidas",
14
+ search_field_empty: "Campo localizar vazio.",
15
+ restart_search_at_begin: "Fim das ocorrências. Recomeçar do inicio.",
16
+ move_popup: "Mover janela",
17
+ font_size: "--Tamanho da fonte--",
18
+ go_to_line: "Ir para linha",
19
+ go_to_line_prompt: "Ir para a linha:",
20
+ undo: "Desfazer",
21
+ redo: "Refazer",
22
+ change_smooth_selection: "Opções visuais",
23
+ highlight: "Cores de sintaxe",
24
+ reset_highlight: "Resetar cores (se não sincronizado)",
25
+ word_wrap: "toggle word wrapping mode",
26
+ help: "Sobre",
27
+ save: "Salvar",
28
+ load: "Carregar",
29
+ line_abbr: "Ln",
30
+ char_abbr: "Ch",
31
+ position: "Posição",
32
+ total: "Total",
33
+ close_popup: "Fechar",
34
+ shortcuts: "Shortcuts",
35
+ add_tab: "Adicionar tabulação",
36
+ remove_tab: "Remover tabulação",
37
+ about_notice: "Atenção: Cores de sintaxe são indicados somente para textos pequenos",
38
+ toggle: "Exibir editor",
39
+ accesskey: "Accesskey",
40
+ tab: "Tab",
41
+ shift: "Shift",
42
+ ctrl: "Ctrl",
43
+ esc: "Esc",
44
+ processing: "Processando...",
45
+ fullscreen: "fullscreen",
46
+ syntax_selection: "--Syntax--",
47
+ close_tab: "Close file"
48
+ };
editarea/langs/ru.js ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ editAreaLoader.lang["ru"]={
2
+ new_document: "новый пустой документ",
3
+ search_button: "поиск и замена",
4
+ search_command: "искать следующий / открыть панель поиска",
5
+ search: "поиск",
6
+ replace: "замена",
7
+ replace_command: "заменить / открыть панель поиска",
8
+ find_next: "найти следующее",
9
+ replace_all: "заменить все",
10
+ reg_exp: "регулярное выражение",
11
+ match_case: "учитывать регистр",
12
+ not_found: "не найдено.",
13
+ occurrence_replaced: "вхождение заменено.",
14
+ search_field_empty: "Поле поиска пустое",
15
+ restart_search_at_begin: "Достигнут конец документа. Начинаю с начала.",
16
+ move_popup: "переместить окно поиска",
17
+ font_size: "--Размер шрифта--",
18
+ go_to_line: "перейти к строке",
19
+ go_to_line_prompt: "перейти к строке номер:",
20
+ undo: "отменить",
21
+ redo: "вернуть",
22
+ change_smooth_selection: "включить/отключить некоторые функции просмотра (более красиво, но больше использует процессор)",
23
+ highlight: "переключить подсветку синтаксиса включена/выключена",
24
+ reset_highlight: "восстановить подсветку (если разсинхронизирована от текста)",
25
+ word_wrap: "toggle word wrapping mode",
26
+ help: "о программе",
27
+ save: "сохранить",
28
+ load: "загрузить",
29
+ line_abbr: "Стр",
30
+ char_abbr: "Стлб",
31
+ position: "Позиция",
32
+ total: "Всего",
33
+ close_popup: "закрыть всплывающее окно",
34
+ shortcuts: "Горячие клавиши",
35
+ add_tab: "добавить табуляцию в текст",
36
+ remove_tab: "убрать табуляцию из текста",
37
+ about_notice: "Внимание: функция подсветки синтаксиса только для небольших текстов",
38
+ toggle: "Переключить редактор",
39
+ accesskey: "Горячая клавиша",
40
+ tab: "Tab",
41
+ shift: "Shift",
42
+ ctrl: "Ctrl",
43
+ esc: "Esc",
44
+ processing: "Обработка...",
45
+ fullscreen: "полный экран",
46
+ syntax_selection: "--Синтакс--",
47
+ close_tab: "Закрыть файл"
48
+ };
editarea/langs/sk.js ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ editAreaLoader.lang["sk"]={
2
+ new_document: "nový prázdy dokument",
3
+ search_button: "vyhľadaj a nahraď",
4
+ search_command: "hľadaj ďalsšie / otvor vyhľadávacie pole",
5
+ search: "hľadaj",
6
+ replace: "nahraď",
7
+ replace_command: "nahraď / otvor vyhľadávacie pole",
8
+ find_next: "nájdi ďalšie",
9
+ replace_all: "nahraď všetko",
10
+ reg_exp: "platné výrazy",
11
+ match_case: "zhodujúce sa výrazy",
12
+ not_found: "nenájdené.",
13
+ occurrence_replaced: "výskyty nahradené.",
14
+ search_field_empty: "Pole vyhľadávanie je prádzne",
15
+ restart_search_at_begin: "End of area reached. Restart at begin.",
16
+ move_popup: "presuň vyhľadávacie okno",
17
+ font_size: "--Veľkosť textu--",
18
+ go_to_line: "prejdi na riadok",
19
+ go_to_line_prompt: "prejdi na riadok:",
20
+ undo: "krok späť",
21
+ redo: "prepracovať",
22
+ change_smooth_selection: "povoliť/zamietnúť niektoré zo zobrazených funkcií (účelnejšie zobrazenie vyžaduje väčšie zaťaženie procesora CPU)",
23
+ highlight: "prepnúť zvýrazňovanie syntaxe zap/vyp",
24
+ reset_highlight: "zrušiť zvýrazňovanie (ak je nesynchronizované s textom)",
25
+ word_wrap: "toggle word wrapping mode",
26
+ help: "o programe",
27
+ save: "uložiť",
28
+ load: "načítať",
29
+ line_abbr: "Ln",
30
+ char_abbr: "Ch",
31
+ position: "Pozícia",
32
+ total: "Spolu",
33
+ close_popup: "zavrieť okno",
34
+ shortcuts: "Skratky",
35
+ add_tab: "pridať tabulovanie textu",
36
+ remove_tab: "odstrániť tabulovanie textu",
37
+ about_notice: "Upozornenie: funkcia zvýrazňovania syntaxe je dostupná iba pre malý text",
38
+ toggle: "Prepnúť editor",
39
+ accesskey: "Accesskey",
40
+ tab: "Záložka",
41
+ shift: "Shift",
42
+ ctrl: "Ctrl",
43
+ esc: "Esc",
44
+ processing: "Spracúvam...",
45
+ fullscreen: "cel=a obrazovka",
46
+ syntax_selection: "--Vyber Syntax--",
47
+ close_tab: "Close file"
48
+ };
editarea/langs/zh.js ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ editAreaLoader.lang["zh"]={
2
+ new_document: "新建空白文档",
3
+ search_button: "查找与替换",
4
+ search_command: "查找下一个 / 打开查找框",
5
+ search: "查找",
6
+ replace: "替换",
7
+ replace_command: "替换 / 打开查找框",
8
+ find_next: "查找下一个",
9
+ replace_all: "全部替换",
10
+ reg_exp: "正则表达式",
11
+ match_case: "匹配大小写",
12
+ not_found: "未找到.",
13
+ occurrence_replaced: "处被替换.",
14
+ search_field_empty: "查找框没有内容",
15
+ restart_search_at_begin: "已到到文档末尾. 从头重新查找.",
16
+ move_popup: "移动查找对话框",
17
+ font_size: "--字体大小--",
18
+ go_to_line: "转到行",
19
+ go_to_line_prompt: "转到行:",
20
+ undo: "恢复",
21
+ redo: "重做",
22
+ change_smooth_selection: "启用/禁止一些显示特性(更好看但更耗费资源)",
23
+ highlight: "启用/禁止语法高亮",
24
+ reset_highlight: "重置语法高亮(当文本显示不同步时)",
25
+ word_wrap: "toggle word wrapping mode",
26
+ help: "关于",
27
+ save: "保存",
28
+ load: "加载",
29
+ line_abbr: "行",
30
+ char_abbr: "字符",
31
+ position: "位置",
32
+ total: "总计",
33
+ close_popup: "关闭对话框",
34
+ shortcuts: "快捷键",
35
+ add_tab: "添加制表符(Tab)",
36
+ remove_tab: "移除制表符(Tab)",
37
+ about_notice: "注意:语法高亮功能仅用于较少内容的文本(文件内容太大会导致浏览器反应慢)",
38
+ toggle: "切换编辑器",
39
+ accesskey: "快捷键",
40
+ tab: "Tab",
41
+ shift: "Shift",
42
+ ctrl: "Ctrl",
43
+ esc: "Esc",
44
+ processing: "正在处理中...",
45
+ fullscreen: "全屏编辑",
46
+ syntax_selection: "--语法--",
47
+ close_tab: "关闭文件"
48
+ };
editarea/license_apache.txt ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
1
+ Copyright 2008 Christophe Dolivet
2
+
3
+ Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
4
+
5
+ http://www.apache.org/licenses/LICENSE-2.0
6
+
7
+ Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
editarea/license_bsd.txt ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ Copyright (c) 2008, Christophe Dolivet
2
+ All rights reserved.
3
+
4
+ Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
5
+
6
+ * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
7
+ * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
8
+ * Neither the name of EditArea nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
9
+
10
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
codepress/license.txt → editarea/license_lgpl.txt RENAMED
@@ -1,458 +1,458 @@
1
- GNU LESSER GENERAL PUBLIC LICENSE
2
- Version 2.1, February 1999
3
-
4
- Copyright (C) 1991, 1999 Free Software Foundation, Inc.
5
- 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
6
- Everyone is permitted to copy and distribute verbatim copies
7
- of this license document, but changing it is not allowed.
8
-
9
- [This is the first released version of the Lesser GPL. It also counts
10
- as the successor of the GNU Library Public License, version 2, hence
11
- the version number 2.1.]
12
-
13
- Preamble
14
-
15
- The licenses for most software are designed to take away your
16
- freedom to share and change it. By contrast, the GNU General Public
17
- Licenses are intended to guarantee your freedom to share and change
18
- free software--to make sure the software is free for all its users.
19
-
20
- This license, the Lesser General Public License, applies to some
21
- specially designated software packages--typically libraries--of the
22
- Free Software Foundation and other authors who decide to use it. You
23
- can use it too, but we suggest you first think carefully about whether
24
- this license or the ordinary General Public License is the better
25
- strategy to use in any particular case, based on the explanations below.
26
-
27
- When we speak of free software, we are referring to freedom of use,
28
- not price. Our General Public Licenses are designed to make sure that
29
- you have the freedom to distribute copies of free software (and charge
30
- for this service if you wish); that you receive source code or can get
31
- it if you want it; that you can change the software and use pieces of
32
- it in new free programs; and that you are informed that you can do
33
- these things.
34
-
35
- To protect your rights, we need to make restrictions that forbid
36
- distributors to deny you these rights or to ask you to surrender these
37
- rights. These restrictions translate to certain responsibilities for
38
- you if you distribute copies of the library or if you modify it.
39
-
40
- For example, if you distribute copies of the library, whether gratis
41
- or for a fee, you must give the recipients all the rights that we gave
42
- you. You must make sure that they, too, receive or can get the source
43
- code. If you link other code with the library, you must provide
44
- complete object files to the recipients, so that they can relink them
45
- with the library after making changes to the library and recompiling
46
- it. And you must show them these terms so they know their rights.
47
-
48
- We protect your rights with a two-step method: (1) we copyright the
49
- library, and (2) we offer you this license, which gives you legal
50
- permission to copy, distribute and/or modify the library.
51
-
52
- To protect each distributor, we want to make it very clear that
53
- there is no warranty for the free library. Also, if the library is
54
- modified by someone else and passed on, the recipients should know
55
- that what they have is not the original version, so that the original
56
- author's reputation will not be affected by problems that might be
57
- introduced by others.
58
-
59
- Finally, software patents pose a constant threat to the existence of
60
- any free program. We wish to make sure that a company cannot
61
- effectively restrict the users of a free program by obtaining a
62
- restrictive license from a patent holder. Therefore, we insist that
63
- any patent license obtained for a version of the library must be
64
- consistent with the full freedom of use specified in this license.
65
-
66
- Most GNU software, including some libraries, is covered by the
67
- ordinary GNU General Public License. This license, the GNU Lesser
68
- General Public License, applies to certain designated libraries, and
69
- is quite different from the ordinary General Public License. We use
70
- this license for certain libraries in order to permit linking those
71
- libraries into non-free programs.
72
-
73
- When a program is linked with a library, whether statically or using
74
- a shared library, the combination of the two is legally speaking a
75
- combined work, a derivative of the original library. The ordinary
76
- General Public License therefore permits such linking only if the
77
- entire combination fits its criteria of freedom. The Lesser General
78
- Public License permits more lax criteria for linking other code with
79
- the library.
80
-
81
- We call this license the "Lesser" General Public License because it
82
- does Less to protect the user's freedom than the ordinary General
83
- Public License. It also provides other free software developers Less
84
- of an advantage over competing non-free programs. These disadvantages
85
- are the reason we use the ordinary General Public License for many
86
- libraries. However, the Lesser license provides advantages in certain
87
- special circumstances.
88
-
89
- For example, on rare occasions, there may be a special need to
90
- encourage the widest possible use of a certain library, so that it becomes
91
- a de-facto standard. To achieve this, non-free programs must be
92
- allowed to use the library. A more frequent case is that a free
93
- library does the same job as widely used non-free libraries. In this
94
- case, there is little to gain by limiting the free library to free
95
- software only, so we use the Lesser General Public License.
96
-
97
- In other cases, permission to use a particular library in non-free
98
- programs enables a greater number of people to use a large body of
99
- free software. For example, permission to use the GNU C Library in
100
- non-free programs enables many more people to use the whole GNU
101
- operating system, as well as its variant, the GNU/Linux operating
102
- system.
103
-
104
- Although the Lesser General Public License is Less protective of the
105
- users' freedom, it does ensure that the user of a program that is
106
- linked with the Library has the freedom and the wherewithal to run
107
- that program using a modified version of the Library.
108
-
109
- The precise terms and conditions for copying, distribution and
110
- modification follow. Pay close attention to the difference between a
111
- "work based on the library" and a "work that uses the library". The
112
- former contains code derived from the library, whereas the latter must
113
- be combined with the library in order to run.
114
-
115
- GNU LESSER GENERAL PUBLIC LICENSE
116
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
117
-
118
- 0. This License Agreement applies to any software library or other
119
- program which contains a notice placed by the copyright holder or
120
- other authorized party saying it may be distributed under the terms of
121
- this Lesser General Public License (also called "this License").
122
- Each licensee is addressed as "you".
123
-
124
- A "library" means a collection of software functions and/or data
125
- prepared so as to be conveniently linked with application programs
126
- (which use some of those functions and data) to form executables.
127
-
128
- The "Library", below, refers to any such software library or work
129
- which has been distributed under these terms. A "work based on the
130
- Library" means either the Library or any derivative work under
131
- copyright law: that is to say, a work containing the Library or a
132
- portion of it, either verbatim or with modifications and/or translated
133
- straightforwardly into another language. (Hereinafter, translation is
134
- included without limitation in the term "modification".)
135
-
136
- "Source code" for a work means the preferred form of the work for
137
- making modifications to it. For a library, complete source code means
138
- all the source code for all modules it contains, plus any associated
139
- interface definition files, plus the scripts used to control compilation
140
- and installation of the library.
141
-
142
- Activities other than copying, distribution and modification are not
143
- covered by this License; they are outside its scope. The act of
144
- running a program using the Library is not restricted, and output from
145
- such a program is covered only if its contents constitute a work based
146
- on the Library (independent of the use of the Library in a tool for
147
- writing it). Whether that is true depends on what the Library does
148
- and what the program that uses the Library does.
149
-
150
- 1. You may copy and distribute verbatim copies of the Library's
151
- complete source code as you receive it, in any medium, provided that
152
- you conspicuously and appropriately publish on each copy an
153
- appropriate copyright notice and disclaimer of warranty; keep intact
154
- all the notices that refer to this License and to the absence of any
155
- warranty; and distribute a copy of this License along with the
156
- Library.
157
-
158
- You may charge a fee for the physical act of transferring a copy,
159
- and you may at your option offer warranty protection in exchange for a
160
- fee.
161
-
162
- 2. You may modify your copy or copies of the Library or any portion
163
- of it, thus forming a work based on the Library, and copy and
164
- distribute such modifications or work under the terms of Section 1
165
- above, provided that you also meet all of these conditions:
166
-
167
- a) The modified work must itself be a software library.
168
-
169
- b) You must cause the files modified to carry prominent notices
170
- stating that you changed the files and the date of any change.
171
-
172
- c) You must cause the whole of the work to be licensed at no
173
- charge to all third parties under the terms of this License.
174
-
175
- d) If a facility in the modified Library refers to a function or a
176
- table of data to be supplied by an application program that uses
177
- the facility, other than as an argument passed when the facility
178
- is invoked, then you must make a good faith effort to ensure that,
179
- in the event an application does not supply such function or
180
- table, the facility still operates, and performs whatever part of
181
- its purpose remains meaningful.
182
-
183
- (For example, a function in a library to compute square roots has
184
- a purpose that is entirely well-defined independent of the
185
- application. Therefore, Subsection 2d requires that any
186
- application-supplied function or table used by this function must
187
- be optional: if the application does not supply it, the square
188
- root function must still compute square roots.)
189
-
190
- These requirements apply to the modified work as a whole. If
191
- identifiable sections of that work are not derived from the Library,
192
- and can be reasonably considered independent and separate works in
193
- themselves, then this License, and its terms, do not apply to those
194
- sections when you distribute them as separate works. But when you
195
- distribute the same sections as part of a whole which is a work based
196
- on the Library, the distribution of the whole must be on the terms of
197
- this License, whose permissions for other licensees extend to the
198
- entire whole, and thus to each and every part regardless of who wrote
199
- it.
200
-
201
- Thus, it is not the intent of this section to claim rights or contest
202
- your rights to work written entirely by you; rather, the intent is to
203
- exercise the right to control the distribution of derivative or
204
- collective works based on the Library.
205
-
206
- In addition, mere aggregation of another work not based on the Library
207
- with the Library (or with a work based on the Library) on a volume of
208
- a storage or distribution medium does not bring the other work under
209
- the scope of this License.
210
-
211
- 3. You may opt to apply the terms of the ordinary GNU General Public
212
- License instead of this License to a given copy of the Library. To do
213
- this, you must alter all the notices that refer to this License, so
214
- that they refer to the ordinary GNU General Public License, version 2,
215
- instead of to this License. (If a newer version than version 2 of the
216
- ordinary GNU General Public License has appeared, then you can specify
217
- that version instead if you wish.) Do not make any other change in
218
- these notices.
219
-
220
- Once this change is made in a given copy, it is irreversible for
221
- that copy, so the ordinary GNU General Public License applies to all
222
- subsequent copies and derivative works made from that copy.
223
-
224
- This option is useful when you wish to copy part of the code of
225
- the Library into a program that is not a library.
226
-
227
- 4. You may copy and distribute the Library (or a portion or
228
- derivative of it, under Section 2) in object code or executable form
229
- under the terms of Sections 1 and 2 above provided that you accompany
230
- it with the complete corresponding machine-readable source code, which
231
- must be distributed under the terms of Sections 1 and 2 above on a
232
- medium customarily used for software interchange.
233
-
234
- If distribution of object code is made by offering access to copy
235
- from a designated place, then offering equivalent access to copy the
236
- source code from the same place satisfies the requirement to
237
- distribute the source code, even though third parties are not
238
- compelled to copy the source along with the object code.
239
-
240
- 5. A program that contains no derivative of any portion of the
241
- Library, but is designed to work with the Library by being compiled or
242
- linked with it, is called a "work that uses the Library". Such a
243
- work, in isolation, is not a derivative work of the Library, and
244
- therefore falls outside the scope of this License.
245
-
246
- However, linking a "work that uses the Library" with the Library
247
- creates an executable that is a derivative of the Library (because it
248
- contains portions of the Library), rather than a "work that uses the
249
- library". The executable is therefore covered by this License.
250
- Section 6 states terms for distribution of such executables.
251
-
252
- When a "work that uses the Library" uses material from a header file
253
- that is part of the Library, the object code for the work may be a
254
- derivative work of the Library even though the source code is not.
255
- Whether this is true is especially significant if the work can be
256
- linked without the Library, or if the work is itself a library. The
257
- threshold for this to be true is not precisely defined by law.
258
-
259
- If such an object file uses only numerical parameters, data
260
- structure layouts and accessors, and small macros and small inline
261
- functions (ten lines or less in length), then the use of the object
262
- file is unrestricted, regardless of whether it is legally a derivative
263
- work. (Executables containing this object code plus portions of the
264
- Library will still fall under Section 6.)
265
-
266
- Otherwise, if the work is a derivative of the Library, you may
267
- distribute the object code for the work under the terms of Section 6.
268
- Any executables containing that work also fall under Section 6,
269
- whether or not they are linked directly with the Library itself.
270
-
271
- 6. As an exception to the Sections above, you may also combine or
272
- link a "work that uses the Library" with the Library to produce a
273
- work containing portions of the Library, and distribute that work
274
- under terms of your choice, provided that the terms permit
275
- modification of the work for the customer's own use and reverse
276
- engineering for debugging such modifications.
277
-
278
- You must give prominent notice with each copy of the work that the
279
- Library is used in it and that the Library and its use are covered by
280
- this License. You must supply a copy of this License. If the work
281
- during execution displays copyright notices, you must include the
282
- copyright notice for the Library among them, as well as a reference
283
- directing the user to the copy of this License. Also, you must do one
284
- of these things:
285
-
286
- a) Accompany the work with the complete corresponding
287
- machine-readable source code for the Library including whatever
288
- changes were used in the work (which must be distributed under
289
- Sections 1 and 2 above); and, if the work is an executable linked
290
- with the Library, with the complete machine-readable "work that
291
- uses the Library", as object code and/or source code, so that the
292
- user can modify the Library and then relink to produce a modified
293
- executable containing the modified Library. (It is understood
294
- that the user who changes the contents of definitions files in the
295
- Library will not necessarily be able to recompile the application
296
- to use the modified definitions.)
297
-
298
- b) Use a suitable shared library mechanism for linking with the
299
- Library. A suitable mechanism is one that (1) uses at run time a
300
- copy of the library already present on the user's computer system,
301
- rather than copying library functions into the executable, and (2)
302
- will operate properly with a modified version of the library, if
303
- the user installs one, as long as the modified version is
304
- interface-compatible with the version that the work was made with.
305
-
306
- c) Accompany the work with a written offer, valid for at
307
- least three years, to give the same user the materials
308
- specified in Subsection 6a, above, for a charge no more
309
- than the cost of performing this distribution.
310
-
311
- d) If distribution of the work is made by offering access to copy
312
- from a designated place, offer equivalent access to copy the above
313
- specified materials from the same place.
314
-
315
- e) Verify that the user has already received a copy of these
316
- materials or that you have already sent this user a copy.
317
-
318
- For an executable, the required form of the "work that uses the
319
- Library" must include any data and utility programs needed for
320
- reproducing the executable from it. However, as a special exception,
321
- the materials to be distributed need not include anything that is
322
- normally distributed (in either source or binary form) with the major
323
- components (compiler, kernel, and so on) of the operating system on
324
- which the executable runs, unless that component itself accompanies
325
- the executable.
326
-
327
- It may happen that this requirement contradicts the license
328
- restrictions of other proprietary libraries that do not normally
329
- accompany the operating system. Such a contradiction means you cannot
330
- use both them and the Library together in an executable that you
331
- distribute.
332
-
333
- 7. You may place library facilities that are a work based on the
334
- Library side-by-side in a single library together with other library
335
- facilities not covered by this License, and distribute such a combined
336
- library, provided that the separate distribution of the work based on
337
- the Library and of the other library facilities is otherwise
338
- permitted, and provided that you do these two things:
339
-
340
- a) Accompany the combined library with a copy of the same work
341
- based on the Library, uncombined with any other library
342
- facilities. This must be distributed under the terms of the
343
- Sections above.
344
-
345
- b) Give prominent notice with the combined library of the fact
346
- that part of it is a work based on the Library, and explaining
347
- where to find the accompanying uncombined form of the same work.
348
-
349
- 8. You may not copy, modify, sublicense, link with, or distribute
350
- the Library except as expressly provided under this License. Any
351
- attempt otherwise to copy, modify, sublicense, link with, or
352
- distribute the Library is void, and will automatically terminate your
353
- rights under this License. However, parties who have received copies,
354
- or rights, from you under this License will not have their licenses
355
- terminated so long as such parties remain in full compliance.
356
-
357
- 9. You are not required to accept this License, since you have not
358
- signed it. However, nothing else grants you permission to modify or
359
- distribute the Library or its derivative works. These actions are
360
- prohibited by law if you do not accept this License. Therefore, by
361
- modifying or distributing the Library (or any work based on the
362
- Library), you indicate your acceptance of this License to do so, and
363
- all its terms and conditions for copying, distributing or modifying
364
- the Library or works based on it.
365
-
366
- 10. Each time you redistribute the Library (or any work based on the
367
- Library), the recipient automatically receives a license from the
368
- original licensor to copy, distribute, link with or modify the Library
369
- subject to these terms and conditions. You may not impose any further
370
- restrictions on the recipients' exercise of the rights granted herein.
371
- You are not responsible for enforcing compliance by third parties with
372
- this License.
373
-
374
- 11. If, as a consequence of a court judgment or allegation of patent
375
- infringement or for any other reason (not limited to patent issues),
376
- conditions are imposed on you (whether by court order, agreement or
377
- otherwise) that contradict the conditions of this License, they do not
378
- excuse you from the conditions of this License. If you cannot
379
- distribute so as to satisfy simultaneously your obligations under this
380
- License and any other pertinent obligations, then as a consequence you
381
- may not distribute the Library at all. For example, if a patent
382
- license would not permit royalty-free redistribution of the Library by
383
- all those who receive copies directly or indirectly through you, then
384
- the only way you could satisfy both it and this License would be to
385
- refrain entirely from distribution of the Library.
386
-
387
- If any portion of this section is held invalid or unenforceable under any
388
- particular circumstance, the balance of the section is intended to apply,
389
- and the section as a whole is intended to apply in other circumstances.
390
-
391
- It is not the purpose of this section to induce you to infringe any
392
- patents or other property right claims or to contest validity of any
393
- such claims; this section has the sole purpose of protecting the
394
- integrity of the free software distribution system which is
395
- implemented by public license practices. Many people have made
396
- generous contributions to the wide range of software distributed
397
- through that system in reliance on consistent application of that
398
- system; it is up to the author/donor to decide if he or she is willing
399
- to distribute software through any other system and a licensee cannot
400
- impose that choice.
401
-
402
- This section is intended to make thoroughly clear what is believed to
403
- be a consequence of the rest of this License.
404
-
405
- 12. If the distribution and/or use of the Library is restricted in
406
- certain countries either by patents or by copyrighted interfaces, the
407
- original copyright holder who places the Library under this License may add
408
- an explicit geographical distribution limitation excluding those countries,
409
- so that distribution is permitted only in or among countries not thus
410
- excluded. In such case, this License incorporates the limitation as if
411
- written in the body of this License.
412
-
413
- 13. The Free Software Foundation may publish revised and/or new
414
- versions of the Lesser General Public License from time to time.
415
- Such new versions will be similar in spirit to the present version,
416
- but may differ in detail to address new problems or concerns.
417
-
418
- Each version is given a distinguishing version number. If the Library
419
- specifies a version number of this License which applies to it and
420
- "any later version", you have the option of following the terms and
421
- conditions either of that version or of any later version published by
422
- the Free Software Foundation. If the Library does not specify a
423
- license version number, you may choose any version ever published by
424
- the Free Software Foundation.
425
-
426
- 14. If you wish to incorporate parts of the Library into other free
427
- programs whose distribution conditions are incompatible with these,
428
- write to the author to ask for permission. For software which is
429
- copyrighted by the Free Software Foundation, write to the Free
430
- Software Foundation; we sometimes make exceptions for this. Our
431
- decision will be guided by the two goals of preserving the free status
432
- of all derivatives of our free software and of promoting the sharing
433
- and reuse of software generally.
434
-
435
- NO WARRANTY
436
-
437
- 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
438
- WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
439
- EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
440
- OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
441
- KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
442
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
443
- PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
444
- LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
445
- THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
446
-
447
- 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
448
- WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
449
- AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
450
- FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
451
- CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
452
- LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
453
- RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
454
- FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
455
- SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
456
- DAMAGES.
457
-
458
- END OF TERMS AND CONDITIONS
1
+ GNU LESSER GENERAL PUBLIC LICENSE
2
+ Version 2.1, February 1999
3
+
4
+ Copyright (C) 1991, 1999 Free Software Foundation, Inc.
5
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
6
+ Everyone is permitted to copy and distribute verbatim copies
7
+ of this license document, but changing it is not allowed.
8
+
9
+ [This is the first released version of the Lesser GPL. It also counts
10
+ as the successor of the GNU Library Public License, version 2, hence
11
+ the version number 2.1.]
12
+
13
+ Preamble
14
+
15
+ The licenses for most software are designed to take away your
16
+ freedom to share and change it. By contrast, the GNU General Public
17
+ Licenses are intended to guarantee your freedom to share and change
18
+ free software--to make sure the software is free for all its users.
19
+
20
+ This license, the Lesser General Public License, applies to some
21
+ specially designated software packages--typically libraries--of the
22
+ Free Software Foundation and other authors who decide to use it. You
23
+ can use it too, but we suggest you first think carefully about whether
24
+ this license or the ordinary General Public License is the better
25
+ strategy to use in any particular case, based on the explanations below.
26
+
27
+ When we speak of free software, we are referring to freedom of use,
28
+ not price. Our General Public Licenses are designed to make sure that
29
+ you have the freedom to distribute copies of free software (and charge
30
+ for this service if you wish); that you receive source code or can get
31
+ it if you want it; that you can change the software and use pieces of
32
+ it in new free programs; and that you are informed that you can do
33
+ these things.
34
+
35
+ To protect your rights, we need to make restrictions that forbid
36
+ distributors to deny you these rights or to ask you to surrender these
37
+ rights. These restrictions translate to certain responsibilities for
38
+ you if you distribute copies of the library or if you modify it.
39
+
40
+ For example, if you distribute copies of the library, whether gratis
41
+ or for a fee, you must give the recipients all the rights that we gave
42
+ you. You must make sure that they, too, receive or can get the source
43
+ code. If you link other code with the library, you must provide
44
+ complete object files to the recipients, so that they can relink them
45
+ with the library after making changes to the library and recompiling
46
+ it. And you must show them these terms so they know their rights.
47
+
48
+ We protect your rights with a two-step method: (1) we copyright the
49
+ library, and (2) we offer you this license, which gives you legal
50
+ permission to copy, distribute and/or modify the library.
51
+
52
+ To protect each distributor, we want to make it very clear that
53
+ there is no warranty for the free library. Also, if the library is
54
+ modified by someone else and passed on, the recipients should know
55
+ that what they have is not the original version, so that the original
56
+ author's reputation will not be affected by problems that might be
57
+ introduced by others.
58
+
59
+ Finally, software patents pose a constant threat to the existence of
60
+ any free program. We wish to make sure that a company cannot
61
+ effectively restrict the users of a free program by obtaining a
62
+ restrictive license from a patent holder. Therefore, we insist that
63
+ any patent license obtained for a version of the library must be
64
+ consistent with the full freedom of use specified in this license.
65
+
66
+ Most GNU software, including some libraries, is covered by the
67
+ ordinary GNU General Public License. This license, the GNU Lesser
68
+ General Public License, applies to certain designated libraries, and
69
+ is quite different from the ordinary General Public License. We use
70
+ this license for certain libraries in order to permit linking those
71
+ libraries into non-free programs.
72
+
73
+ When a program is linked with a library, whether statically or using
74
+ a shared library, the combination of the two is legally speaking a
75
+ combined work, a derivative of the original library. The ordinary
76
+ General Public License therefore permits such linking only if the
77
+ entire combination fits its criteria of freedom. The Lesser General
78
+ Public License permits more lax criteria for linking other code with
79
+ the library.
80
+
81
+ We call this license the "Lesser" General Public License because it
82
+ does Less to protect the user's freedom than the ordinary General
83
+ Public License. It also provides other free software developers Less
84
+ of an advantage over competing non-free programs. These disadvantages
85
+ are the reason we use the ordinary General Public License for many
86
+ libraries. However, the Lesser license provides advantages in certain
87
+ special circumstances.
88
+
89
+ For example, on rare occasions, there may be a special need to
90
+ encourage the widest possible use of a certain library, so that it becomes
91
+ a de-facto standard. To achieve this, non-free programs must be
92
+ allowed to use the library. A more frequent case is that a free
93
+ library does the same job as widely used non-free libraries. In this
94
+ case, there is little to gain by limiting the free library to free
95
+ software only, so we use the Lesser General Public License.
96
+
97
+ In other cases, permission to use a particular library in non-free
98
+ programs enables a greater number of people to use a large body of
99
+ free software. For example, permission to use the GNU C Library in
100
+ non-free programs enables many more people to use the whole GNU
101
+ operating system, as well as its variant, the GNU/Linux operating
102
+ system.
103
+
104
+ Although the Lesser General Public License is Less protective of the
105
+ users' freedom, it does ensure that the user of a program that is
106
+ linked with the Library has the freedom and the wherewithal to run
107
+ that program using a modified version of the Library.
108
+
109
+ The precise terms and conditions for copying, distribution and
110
+ modification follow. Pay close attention to the difference between a
111
+ "work based on the library" and a "work that uses the library". The
112
+ former contains code derived from the library, whereas the latter must
113
+ be combined with the library in order to run.
114
+
115
+ GNU LESSER GENERAL PUBLIC LICENSE
116
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
117
+
118
+ 0. This License Agreement applies to any software library or other
119
+ program which contains a notice placed by the copyright holder or
120
+ other authorized party saying it may be distributed under the terms of
121
+ this Lesser General Public License (also called "this License").
122
+ Each licensee is addressed as "you".
123
+
124
+ A "library" means a collection of software functions and/or data
125
+ prepared so as to be conveniently linked with application programs
126
+ (which use some of those functions and data) to form executables.
127
+
128
+ The "Library", below, refers to any such software library or work
129
+ which has been distributed under these terms. A "work based on the
130
+ Library" means either the Library or any derivative work under
131
+ copyright law: that is to say, a work containing the Library or a
132
+ portion of it, either verbatim or with modifications and/or translated
133
+ straightforwardly into another language. (Hereinafter, translation is
134
+ included without limitation in the term "modification".)
135
+
136
+ "Source code" for a work means the preferred form of the work for
137
+ making modifications to it. For a library, complete source code means
138
+ all the source code for all modules it contains, plus any associated
139
+ interface definition files, plus the scripts used to control compilation
140
+ and installation of the library.
141
+
142
+ Activities other than copying, distribution and modification are not
143
+ covered by this License; they are outside its scope. The act of
144
+ running a program using the Library is not restricted, and output from
145
+ such a program is covered only if its contents constitute a work based
146
+ on the Library (independent of the use of the Library in a tool for
147
+ writing it). Whether that is true depends on what the Library does
148
+ and what the program that uses the Library does.
149
+
150
+ 1. You may copy and distribute verbatim copies of the Library's
151
+ complete source code as you receive it, in any medium, provided that
152
+ you conspicuously and appropriately publish on each copy an
153
+ appropriate copyright notice and disclaimer of warranty; keep intact
154
+ all the notices that refer to this License and to the absence of any
155
+ warranty; and distribute a copy of this License along with the
156
+ Library.
157
+
158
+ You may charge a fee for the physical act of transferring a copy,
159
+ and you may at your option offer warranty protection in exchange for a
160
+ fee.
161
+
162
+ 2. You may modify your copy or copies of the Library or any portion
163
+ of it, thus forming a work based on the Library, and copy and
164
+ distribute such modifications or work under the terms of Section 1
165
+ above, provided that you also meet all of these conditions:
166
+
167
+ a) The modified work must itself be a software library.
168
+
169
+ b) You must cause the files modified to carry prominent notices
170
+ stating that you changed the files and the date of any change.
171
+
172
+ c) You must cause the whole of the work to be licensed at no
173
+ charge to all third parties under the terms of this License.
174
+
175
+ d) If a facility in the modified Library refers to a function or a
176
+ table of data to be supplied by an application program that uses
177
+ the facility, other than as an argument passed when the facility
178
+ is invoked, then you must make a good faith effort to ensure that,
179
+ in the event an application does not supply such function or
180
+ table, the facility still operates, and performs whatever part of
181
+ its purpose remains meaningful.
182
+
183
+ (For example, a function in a library to compute square roots has
184
+ a purpose that is entirely well-defined independent of the
185
+ application. Therefore, Subsection 2d requires that any
186
+ application-supplied function or table used by this function must
187
+ be optional: if the application does not supply it, the square
188
+ root function must still compute square roots.)
189
+
190
+ These requirements apply to the modified work as a whole. If
191
+ identifiable sections of that work are not derived from the Library,
192
+ and can be reasonably considered independent and separate works in
193
+ themselves, then this License, and its terms, do not apply to those
194
+ sections when you distribute them as separate works. But when you
195
+ distribute the same sections as part of a whole which is a work based
196
+ on the Library, the distribution of the whole must be on the terms of
197
+ this License, whose permissions for other licensees extend to the
198
+ entire whole, and thus to each and every part regardless of who wrote
199
+ it.
200
+
201
+ Thus, it is not the intent of this section to claim rights or contest
202
+ your rights to work written entirely by you; rather, the intent is to
203
+ exercise the right to control the distribution of derivative or
204
+ collective works based on the Library.
205
+
206
+ In addition, mere aggregation of another work not based on the Library
207
+ with the Library (or with a work based on the Library) on a volume of
208
+ a storage or distribution medium does not bring the other work under
209
+ the scope of this License.
210
+
211
+ 3. You may opt to apply the terms of the ordinary GNU General Public
212
+ License instead of this License to a given copy of the Library. To do
213
+ this, you must alter all the notices that refer to this License, so
214
+ that they refer to the ordinary GNU General Public License, version 2,
215
+ instead of to this License. (If a newer version than version 2 of the
216
+ ordinary GNU General Public License has appeared, then you can specify
217
+ that version instead if you wish.) Do not make any other change in
218
+ these notices.
219
+
220
+ Once this change is made in a given copy, it is irreversible for
221
+ that copy, so the ordinary GNU General Public License applies to all
222
+ subsequent copies and derivative works made from that copy.
223
+
224
+ This option is useful when you wish to copy part of the code of
225
+ the Library into a program that is not a library.
226
+
227
+ 4. You may copy and distribute the Library (or a portion or
228
+ derivative of it, under Section 2) in object code or executable form
229
+ under the terms of Sections 1 and 2 above provided that you accompany
230
+ it with the complete corresponding machine-readable source code, which
231
+ must be distributed under the terms of Sections 1 and 2 above on a
232
+ medium customarily used for software interchange.
233
+
234
+ If distribution of object code is made by offering access to copy
235
+ from a designated place, then offering equivalent access to copy the
236
+ source code from the same place satisfies the requirement to
237
+ distribute the source code, even though third parties are not
238
+ compelled to copy the source along with the object code.
239
+
240
+ 5. A program that contains no derivative of any portion of the
241
+ Library, but is designed to work with the Library by being compiled or
242
+ linked with it, is called a "work that uses the Library". Such a
243
+ work, in isolation, is not a derivative work of the Library, and
244
+ therefore falls outside the scope of this License.
245
+
246
+ However, linking a "work that uses the Library" with the Library
247
+ creates an executable that is a derivative of the Library (because it
248
+ contains portions of the Library), rather than a "work that uses the
249
+ library". The executable is therefore covered by this License.
250
+ Section 6 states terms for distribution of such executables.
251
+
252
+ When a "work that uses the Library" uses material from a header file
253
+ that is part of the Library, the object code for the work may be a
254
+ derivative work of the Library even though the source code is not.
255
+ Whether this is true is especially significant if the work can be
256
+ linked without the Library, or if the work is itself a library. The
257
+ threshold for this to be true is not precisely defined by law.
258
+
259
+ If such an object file uses only numerical parameters, data
260
+ structure layouts and accessors, and small macros and small inline
261
+ functions (ten lines or less in length), then the use of the object
262
+ file is unrestricted, regardless of whether it is legally a derivative
263
+ work. (Executables containing this object code plus portions of the
264
+ Library will still fall under Section 6.)
265
+
266
+ Otherwise, if the work is a derivative of the Library, you may
267
+ distribute the object code for the work under the terms of Section 6.
268
+ Any executables containing that work also fall under Section 6,
269
+ whether or not they are linked directly with the Library itself.
270
+
271
+ 6. As an exception to the Sections above, you may also combine or
272
+ link a "work that uses the Library" with the Library to produce a
273
+ work containing portions of the Library, and distribute that work
274
+ under terms of your choice, provided that the terms permit
275
+ modification of the work for the customer's own use and reverse
276
+ engineering for debugging such modifications.
277
+
278
+ You must give prominent notice with each copy of the work that the
279
+ Library is used in it and that the Library and its use are covered by
280
+ this License. You must supply a copy of this License. If the work
281
+ during execution displays copyright notices, you must include the
282
+ copyright notice for the Library among them, as well as a reference
283
+ directing the user to the copy of this License. Also, you must do one
284
+ of these things:
285
+
286
+ a) Accompany the work with the complete corresponding
287
+ machine-readable source code for the Library including whatever
288
+ changes were used in the work (which must be distributed under
289
+ Sections 1 and 2 above); and, if the work is an executable linked
290
+ with the Library, with the complete machine-readable "work that
291
+ uses the Library", as object code and/or source code, so that the
292
+ user can modify the Library and then relink to produce a modified
293
+ executable containing the modified Library. (It is understood
294
+ that the user who changes the contents of definitions files in the
295
+ Library will not necessarily be able to recompile the application
296
+ to use the modified definitions.)
297
+
298
+ b) Use a suitable shared library mechanism for linking with the
299
+ Library. A suitable mechanism is one that (1) uses at run time a
300
+ copy of the library already present on the user's computer system,
301
+ rather than copying library functions into the executable, and (2)
302
+ will operate properly with a modified version of the library, if
303
+ the user installs one, as long as the modified version is
304
+ interface-compatible with the version that the work was made with.
305
+
306
+ c) Accompany the work with a written offer, valid for at
307
+ least three years, to give the same user the materials
308
+ specified in Subsection 6a, above, for a charge no more
309
+ than the cost of performing this distribution.
310
+
311
+ d) If distribution of the work is made by offering access to copy
312
+ from a designated place, offer equivalent access to copy the above
313
+ specified materials from the same place.
314
+
315
+ e) Verify that the user has already received a copy of these
316
+ materials or that you have already sent this user a copy.
317
+
318
+ For an executable, the required form of the "work that uses the
319
+ Library" must include any data and utility programs needed for
320
+ reproducing the executable from it. However, as a special exception,
321
+ the materials to be distributed need not include anything that is
322
+ normally distributed (in either source or binary form) with the major
323
+ components (compiler, kernel, and so on) of the operating system on
324
+ which the executable runs, unless that component itself accompanies
325
+ the executable.
326
+
327
+ It may happen that this requirement contradicts the license
328
+ restrictions of other proprietary libraries that do not normally
329
+ accompany the operating system. Such a contradiction means you cannot
330
+ use both them and the Library together in an executable that you
331
+ distribute.
332
+
333
+ 7. You may place library facilities that are a work based on the
334
+ Library side-by-side in a single library together with other library
335
+ facilities not covered by this License, and distribute such a combined
336
+ library, provided that the separate distribution of the work based on
337
+ the Library and of the other library facilities is otherwise
338
+ permitted, and provided that you do these two things:
339
+
340
+ a) Accompany the combined library with a copy of the same work
341
+ based on the Library, uncombined with any other library
342
+ facilities. This must be distributed under the terms of the
343
+ Sections above.
344
+
345
+ b) Give prominent notice with the combined library of the fact
346
+ that part of it is a work based on the Library, and explaining
347
+ where to find the accompanying uncombined form of the same work.
348
+
349
+ 8. You may not copy, modify, sublicense, link with, or distribute
350
+ the Library except as expressly provided under this License. Any
351
+ attempt otherwise to copy, modify, sublicense, link with, or
352
+ distribute the Library is void, and will automatically terminate your
353
+ rights under this License. However, parties who have received copies,
354
+ or rights, from you under this License will not have their licenses
355
+ terminated so long as such parties remain in full compliance.
356
+
357
+ 9. You are not required to accept this License, since you have not
358
+ signed it. However, nothing else grants you permission to modify or
359
+ distribute the Library or its derivative works. These actions are
360
+ prohibited by law if you do not accept this License. Therefore, by
361
+ modifying or distributing the Library (or any work based on the
362
+ Library), you indicate your acceptance of this License to do so, and
363
+ all its terms and conditions for copying, distributing or modifying
364
+ the Library or works based on it.
365
+
366
+ 10. Each time you redistribute the Library (or any work based on the
367
+ Library), the recipient automatically receives a license from the
368
+ original licensor to copy, distribute, link with or modify the Library
369
+ subject to these terms and conditions. You may not impose any further
370
+ restrictions on the recipients' exercise of the rights granted herein.
371
+ You are not responsible for enforcing compliance by third parties with
372
+ this License.
373
+
374
+ 11. If, as a consequence of a court judgment or allegation of patent
375
+ infringement or for any other reason (not limited to patent issues),
376
+ conditions are imposed on you (whether by court order, agreement or
377
+ otherwise) that contradict the conditions of this License, they do not
378
+ excuse you from the conditions of this License. If you cannot
379
+ distribute so as to satisfy simultaneously your obligations under this
380
+ License and any other pertinent obligations, then as a consequence you
381
+ may not distribute the Library at all. For example, if a patent
382
+ license would not permit royalty-free redistribution of the Library by
383
+ all those who receive copies directly or indirectly through you, then
384
+ the only way you could satisfy both it and this License would be to
385
+ refrain entirely from distribution of the Library.
386
+
387
+ If any portion of this section is held invalid or unenforceable under any
388
+ particular circumstance, the balance of the section is intended to apply,
389
+ and the section as a whole is intended to apply in other circumstances.
390
+
391
+ It is not the purpose of this section to induce you to infringe any
392
+ patents or other property right claims or to contest validity of any
393
+ such claims; this section has the sole purpose of protecting the
394
+ integrity of the free software distribution system which is
395
+ implemented by public license practices. Many people have made
396
+ generous contributions to the wide range of software distributed
397
+ through that system in reliance on consistent application of that
398
+ system; it is up to the author/donor to decide if he or she is willing
399
+ to distribute software through any other system and a licensee cannot
400
+ impose that choice.
401
+
402
+ This section is intended to make thoroughly clear what is believed to
403
+ be a consequence of the rest of this License.
404
+
405
+ 12. If the distribution and/or use of the Library is restricted in
406
+ certain countries either by patents or by copyrighted interfaces, the
407
+ original copyright holder who places the Library under this License may add
408
+ an explicit geographical distribution limitation excluding those countries,
409
+ so that distribution is permitted only in or among countries not thus
410
+ excluded. In such case, this License incorporates the limitation as if
411
+ written in the body of this License.
412
+
413
+ 13. The Free Software Foundation may publish revised and/or new
414
+ versions of the Lesser General Public License from time to time.
415
+ Such new versions will be similar in spirit to the present version,
416
+ but may differ in detail to address new problems or concerns.
417
+
418
+ Each version is given a distinguishing version number. If the Library
419
+ specifies a version number of this License which applies to it and
420
+ "any later version", you have the option of following the terms and
421
+ conditions either of that version or of any later version published by
422
+ the Free Software Foundation. If the Library does not specify a
423
+ license version number, you may choose any version ever published by
424
+ the Free Software Foundation.
425
+
426
+ 14. If you wish to incorporate parts of the Library into other free
427
+ programs whose distribution conditions are incompatible with these,
428
+ write to the author to ask for permission. For software which is
429
+ copyrighted by the Free Software Foundation, write to the Free
430
+ Software Foundation; we sometimes make exceptions for this. Our
431
+ decision will be guided by the two goals of preserving the free status
432
+ of all derivatives of our free software and of promoting the sharing
433
+ and reuse of software generally.
434
+
435
+ NO WARRANTY
436
+
437
+ 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
438
+ WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
439
+ EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
440
+ OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
441
+ KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
442
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
443
+ PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
444
+ LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
445
+ THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
446
+
447
+ 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
448
+ WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
449
+ AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
450
+ FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
451
+ CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
452
+ LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
453
+ RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
454
+ FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
455
+ SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
456
+ DAMAGES.
457
+
458
+ END OF TERMS AND CONDITIONS
editarea/reg_syntax/basic.js ADDED
@@ -0,0 +1,70 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ editAreaLoader.load_syntax["basic"] = {
2
+ 'DISPLAY_NAME' : 'Basic'
3
+ ,'COMMENT_SINGLE' : {1 : "'", 2 : 'rem'}
4
+ ,'COMMENT_MULTI' : { }
5
+ ,'QUOTEMARKS' : {1: '"'}
6
+ ,'KEYWORD_CASE_SENSITIVE' : false
7
+ ,'KEYWORDS' : {
8
+ 'statements' : [
9
+ 'if','then','for','wend','while',
10
+ 'else','elseif','select','case','end select',
11
+ 'until','next','step','to','end if', 'call'
12
+ ]
13
+ ,'keywords' : [
14
+ 'sub', 'end sub', 'function', 'end function', 'exit',
15
+ 'exit function', 'dim', 'redim', 'shared', 'const',
16
+ 'is', 'absolute', 'access', 'any', 'append', 'as',
17
+ 'base', 'beep', 'binary', 'bload', 'bsave', 'chain',
18
+ 'chdir', 'circle', 'clear', 'close', 'cls', 'color',
19
+ 'com', 'common', 'data', 'date', 'declare', 'def',
20
+ 'defdbl', 'defint', 'deflng', 'defsng', 'defstr',
21
+ 'double', 'draw', 'environ', 'erase', 'error', 'field',
22
+ 'files', 'fn', 'get', 'gosub', 'goto', 'integer', 'key',
23
+ 'kill', 'let', 'line', 'list', 'locate', 'lock', 'long',
24
+ 'lprint', 'lset', 'mkdir', 'name', 'off', 'on', 'open',
25
+ 'option', 'out', 'output', 'paint', 'palette', 'pcopy',
26
+ 'poke', 'preset', 'print', 'pset', 'put', 'random',
27
+ 'randomize', 'read', 'reset', 'restore', 'resume',
28
+ 'return', 'rmdir', 'rset', 'run', 'screen', 'seg',
29
+ 'shell', 'single', 'sleep', 'sound', 'static', 'stop',
30
+ 'strig', 'string', 'swap', 'system', 'time', 'timer',
31
+ 'troff', 'tron', 'type', 'unlock', 'using', 'view',
32
+ 'wait', 'width', 'window', 'write'
33
+ ]
34
+ ,'functions' : [
35
+ 'abs', 'asc', 'atn', 'cdbl', 'chr', 'cint', 'clng',
36
+ 'cos', 'csng', 'csrlin', 'cvd', 'cvdmbf', 'cvi', 'cvl',
37
+ 'cvs', 'cvsmbf', 'eof', 'erdev', 'erl', 'err', 'exp',
38
+ 'fileattr', 'fix', 'fre', 'freefile', 'hex', 'inkey',
39
+ 'inp', 'input', 'instr', 'int', 'ioctl', 'lbound',
40
+ 'lcase', 'left', 'len', 'loc', 'lof', 'log', 'lpos',
41
+ 'ltrim', 'mid', 'mkd', 'mkdmbf', 'mki', 'mkl', 'mks',
42
+ 'mksmbf', 'oct', 'peek', 'pen', 'play', 'pmap', 'point',
43
+ 'pos', 'right', 'rnd', 'rtrim', 'seek', 'sgn', 'sin',
44
+ 'space', 'spc', 'sqr', 'stick', 'str', 'tab', 'tan',
45
+ 'ubound', 'ucase', 'val', 'varptr', 'varseg'
46
+ ]
47
+ ,'operators' : [
48
+ 'and', 'eqv', 'imp', 'mod', 'not', 'or', 'xor'
49
+ ]
50
+ }
51
+ ,'OPERATORS' :[
52
+ '+', '-', '/', '*', '=', '<', '>', '!', '&'
53
+ ]
54
+ ,'DELIMITERS' :[
55
+ '(', ')', '[', ']', '{', '}'
56
+ ]
57
+ ,'STYLES' : {
58
+ 'COMMENTS': 'color: #99CC00;'
59
+ ,'QUOTESMARKS': 'color: #333399;'
60
+ ,'KEYWORDS' : {
61
+ 'keywords' : 'color: #3366FF;'
62
+ ,'functions' : 'color: #0000FF;'
63
+ ,'statements' : 'color: #3366FF;'
64
+ ,'operators' : 'color: #FF0000;'
65
+ }
66
+ ,'OPERATORS' : 'color: #FF0000;'
67
+ ,'DELIMITERS' : 'color: #0000FF;'
68
+
69
+ }
70
+ };
editarea/reg_syntax/brainfuck.js ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ editAreaLoader.load_syntax["brainfuck"] = {
2
+ 'DISPLAY_NAME' : 'Brainfuck'
3
+ ,'COMMENT_SINGLE' : {}
4
+ ,'COMMENT_MULTI' : {}
5
+ ,'QUOTEMARKS' : {}
6
+ ,'KEYWORD_CASE_SENSITIVE' : true
7
+ ,'OPERATORS' :[
8
+ '+', '-'
9
+ ]
10
+ ,'DELIMITERS' :[
11
+ '[', ']'
12
+ ]
13
+ ,'REGEXPS' : {
14
+ 'bfispis' : {
15
+ 'search' : '()(\\.)()'
16
+ ,'class' : 'bfispis'
17
+ ,'modifiers' : 'g'
18
+ ,'execute' : 'before'
19
+ }
20
+ ,'bfupis' : {
21
+ 'search' : '()(\\,)()'
22
+ ,'class' : 'bfupis'
23
+ ,'modifiers' : 'g'
24
+ ,'execute' : 'before'
25
+ }
26
+ ,'bfmemory' : {
27
+ 'search' : '()([<>])()'
28
+ ,'class' : 'bfmemory'
29
+ ,'modifiers' : 'g'
30
+ ,'execute' : 'before'
31
+ }
32
+ }
33
+ ,'STYLES' : {
34
+ 'COMMENTS': 'color: #AAAAAA;'
35
+ ,'QUOTESMARKS': 'color: #6381F8;'
36
+ ,'OPERATORS' : 'color: #88AA00;'
37
+ ,'DELIMITERS' : 'color: #00C138;'
38
+ ,'REGEXPS' : {
39
+ 'bfispis' : 'color: #EE0000;'
40
+ ,'bfupis' : 'color: #4455ee;'
41
+ ,'bfmemory' : 'color: #DD00DD;'
42
+ }
43
+ }
44
+ };
45
+
editarea/reg_syntax/c.js ADDED
@@ -0,0 +1,63 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ editAreaLoader.load_syntax["c"] = {
2
+ 'DISPLAY_NAME' : 'C'
3
+ ,'COMMENT_SINGLE' : {1 : '//'}
4
+ ,'COMMENT_MULTI' : {'/*' : '*/'}
5
+ ,'QUOTEMARKS' : {1: "'", 2: '"'}
6
+ ,'KEYWORD_CASE_SENSITIVE' : true
7
+ ,'KEYWORDS' : {
8
+ 'constants' : [
9
+ 'NULL', 'false', 'stdin', 'stdout', 'stderr', 'true'
10
+ ]
11
+ ,'types' : [
12
+ 'FILE', 'auto', 'char', 'const', 'double',
13
+ 'extern', 'float', 'inline', 'int', 'long', 'register',
14
+ 'short', 'signed', 'size_t', 'static', 'struct',
15
+ 'time_t', 'typedef', 'union', 'unsigned', 'void',
16
+ 'volatile'
17
+ ]
18
+ ,'statements' : [
19
+ 'do', 'else', 'enum', 'for', 'goto', 'if', 'sizeof',
20
+ 'switch', 'while'
21
+ ]
22
+ ,'keywords' : [
23
+ 'break', 'case', 'continue', 'default', 'delete',
24
+ 'return'
25
+ ]
26
+ }
27
+ ,'OPERATORS' :[
28
+ '+', '-', '/', '*', '=', '<', '>', '%', '!', '?', ':', '&'
29
+ ]
30
+ ,'DELIMITERS' :[
31
+ '(', ')', '[', ']', '{', '}'
32
+ ]
33
+ ,'REGEXPS' : {
34
+ 'precompiler' : {
35
+ 'search' : '()(#[^\r\n]*)()'
36
+ ,'class' : 'precompiler'
37
+ ,'modifiers' : 'g'
38
+ ,'execute' : 'before'
39
+ }
40
+ /* ,'precompilerstring' : {
41
+ 'search' : '(#[\t ]*include[\t ]*)([^\r\n]*)([^\r\n]*[\r\n])'
42
+ ,'class' : 'precompilerstring'
43
+ ,'modifiers' : 'g'
44
+ ,'execute' : 'before'
45
+ }*/
46
+ }
47
+ ,'STYLES' : {
48
+ 'COMMENTS': 'color: #AAAAAA;'
49
+ ,'QUOTESMARKS': 'color: #6381F8;'
50
+ ,'KEYWORDS' : {
51
+ 'constants' : 'color: #EE0000;'
52
+ ,'types' : 'color: #0000EE;'
53
+ ,'statements' : 'color: #60CA00;'
54
+ ,'keywords' : 'color: #48BDDF;'
55
+ }
56
+ ,'OPERATORS' : 'color: #FF00FF;'
57
+ ,'DELIMITERS' : 'color: #0038E1;'
58
+ ,'REGEXPS' : {
59
+ 'precompiler' : 'color: #009900;'
60
+ ,'precompilerstring' : 'color: #994400;'
61
+ }
62
+ }
63
+ };
editarea/reg_syntax/coldfusion.js ADDED
@@ -0,0 +1,120 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ editAreaLoader.load_syntax["coldfusion"] = {
2
+ 'DISPLAY_NAME' : 'Coldfusion'
3
+ ,'COMMENT_SINGLE' : {1 : '//', 2 : '#'}
4
+ ,'COMMENT_MULTI' : {'<!--' : '-->'}
5
+ ,'COMMENT_MULTI2' : {'<!---' : '--->'}
6
+ ,'QUOTEMARKS' : {1: "'", 2: '"'}
7
+ ,'KEYWORD_CASE_SENSITIVE' : false
8
+ ,'KEYWORDS' : {
9
+ 'statements' : [
10
+ 'include', 'require', 'include_once', 'require_once',
11
+ 'for', 'foreach', 'as', 'if', 'elseif', 'else', 'while', 'do', 'endwhile',
12
+ 'endif', 'switch', 'case', 'endswitch',
13
+ 'return', 'break', 'continue'
14
+ ]
15
+ ,'reserved' : [
16
+ 'AND', 'break', 'case', 'CONTAIN', 'CONTAINS', 'continue', 'default', 'do',
17
+ 'DOES', 'else', 'EQ', 'EQUAL', 'EQUALTO', 'EQV', 'FALSE', 'for', 'GE',
18
+ 'GREATER', 'GT', 'GTE', 'if', 'IMP', 'in', 'IS', 'LE', 'LESS', 'LT', 'LTE',
19
+ 'MOD', 'NEQ', 'NOT', 'OR', 'return', 'switch', 'THAN', 'TO', 'TRUE', 'var',
20
+ 'while', 'XOR'
21
+ ]
22
+ ,'functions' : [
23
+ 'Abs', 'ACos', 'ArrayAppend', 'ArrayAvg', 'ArrayClear', 'ArrayDeleteAt', 'ArrayInsertAt',
24
+ 'ArrayIsEmpty', 'ArrayLen', 'ArrayMax', 'ArrayMin', 'ArrayNew', 'ArrayPrepend', 'ArrayResize',
25
+ 'ArraySet', 'ArraySort', 'ArraySum', 'ArraySwap', 'ArrayToList', 'Asc', 'ASin', 'Atn', 'AuthenticatedContext',
26
+ 'AuthenticatedUser', 'BitAnd', 'BitMaskClear', 'BitMaskRead', 'BitMaskSet', 'BitNot', 'BitOr',
27
+ 'BitSHLN', 'BitSHRN', 'BitXor', 'Ceiling', 'Chr', 'CJustify', 'Compare', 'CompareNoCase', 'Cos',
28
+ 'CreateDate', 'CreateDateTime', 'CreateODBCDate', 'CreateODBCDateTime', 'CreateODBCTime',
29
+ 'CreateTime', 'CreateTimeSpan', 'DateAdd', 'DateCompare', 'DateConvert', 'DateDiff',
30
+ 'DateFormat', 'DatePart', 'Day', 'DayOfWeek', 'DayOfWeekAsString', 'DayOfYear', 'DaysInMonth',
31
+ 'DaysInYear', 'DE', 'DecimalFormat', 'DecrementValue', 'Decrypt', 'DeleteClientVariable',
32
+ 'DirectoryExists', 'DollarFormat', 'Duplicate', 'Encrypt', 'Evaluate', 'Exp', 'ExpandPath',
33
+ 'FileExists', 'Find', 'FindNoCase', 'FindOneOf', 'FirstDayOfMonth', 'Fix', 'FormatBaseN',
34
+ 'GetBaseTagData', 'GetBaseTagList', 'GetBaseTemplatePath', 'GetClientVariablesList',
35
+ 'GetCurrentTemplatePath', 'GetDirectoryFromPath', 'GetException', 'GetFileFromPath',
36
+ 'GetFunctionList', 'GetHttpTimeString', 'GetHttpRequestData', 'GetLocale', 'GetMetricData',
37
+ 'GetProfileString', 'GetTempDirectory', 'GetTempFile', 'GetTemplatePath', 'GetTickCount',
38
+ 'GetTimeZoneInfo', 'GetToken', 'Hash', 'Hour', 'HTMLCodeFormat', 'HTMLEditFormat', 'IIf',
39
+ 'IncrementValue', 'InputBaseN', 'Insert', 'Int', 'IsArray', 'IsAuthenticated', 'IsAuthorized',
40
+ 'IsBoolean', 'IsBinary', 'IsCustomFunction', 'IsDate', 'IsDebugMode', 'IsDefined', 'IsLeapYear',
41
+ 'IsNumeric', 'IsNumericDate', 'IsProtected', 'IsQuery', 'IsSimpleValue', 'IsStruct', 'IsWDDX',
42
+ 'JavaCast', 'JSStringFormat', 'LCase', 'Left', 'Len', 'ListAppend', 'ListChangeDelims',
43
+ 'ListContains', 'ListContainsNoCase', 'ListDeleteAt', 'ListFind', 'ListFindNoCase', 'ListFirst',
44
+ 'ListGetAt', 'ListInsertAt', 'ListLast', 'ListLen', 'ListPrepend', 'ListQualify', 'ListRest',
45
+ 'ListSetAt', 'ListSort', 'ListToArray', 'ListValueCount', 'ListValueCountNoCase', 'LJustify',
46
+ 'Log', 'Log10', 'LSCurrencyFormat', 'LSDateFormat', 'LSEuroCurrencyFormat', 'LSIsCurrency',
47
+ 'LSIsDate', 'LSIsNumeric', 'LSNumberFormat', 'LSParseCurrency', 'LSParseDateTime', 'LSParseNumber',
48
+ 'LSTimeFormat', 'LTrim', 'Max', 'Mid', 'Min', 'Minute', 'Month', 'MonthAsString', 'Now', 'NumberFormat',
49
+ 'ParagraphFormat', 'ParameterExists', 'ParseDateTime', 'Pi', 'PreserveSingleQuotes', 'Quarter',
50
+ 'QueryAddRow', 'QueryNew', 'QuerySetCell', 'QuotedValueList', 'Rand', 'Randomize', 'RandRange',
51
+ 'REFind', 'REFindNoCase', 'RemoveChars', 'RepeatString', 'Replace', 'ReplaceList', 'ReplaceNoCase',
52
+ 'REReplace', 'REReplaceNoCase', 'Reverse', 'Right', 'RJustify', 'Round', 'RTrim', 'Second', 'SetLocale',
53
+ 'SetProfileString', 'SetVariable', 'Sgn', 'Sin', 'SpanExcluding', 'SpanIncluding', 'Sqr', 'StripCR',
54
+ 'StructAppend', 'StructClear', 'StructCopy', 'StructCount', 'StructDelete', 'StructFind', 'StructFindKey',
55
+ 'StructFindValue', 'StructGet', 'StructInsert', 'StructIsEmpty', 'StructKeyArray', 'StructKeyExists',
56
+ 'StructKeyList', 'StructNew', 'StructSort', 'StructUpdate', 'Tan', 'TimeFormat', 'ToBase64', 'ToBinary',
57
+ 'ToString', 'Trim', 'UCase', 'URLDecode', 'URLEncodedFormat', 'Val', 'ValueList', 'Week', 'WriteOutput',
58
+ 'XMLFormat', 'Year', 'YesNoFormat'
59
+ ]
60
+ }
61
+ ,'OPERATORS' :[
62
+ '+', '-', '/', '*', '%', '!', '&&', '||'
63
+ ]
64
+ ,'DELIMITERS' :[
65
+ '(', ')', '[', ']', '{', '}'
66
+ ]
67
+ ,'REGEXPS' : {
68
+ 'doctype' : {
69
+ 'search' : '()(<!DOCTYPE[^>]*>)()'
70
+ ,'class' : 'doctype'
71
+ ,'modifiers' : ''
72
+ ,'execute' : 'before' // before or after
73
+ }
74
+ ,'cftags' : {
75
+ 'search' : '(<)(/cf[a-z][^ \r\n\t>]*)([^>]*>)'
76
+ ,'class' : 'cftags'
77
+ ,'modifiers' : 'gi'
78
+ ,'execute' : 'before' // before or after
79
+ }
80
+ ,'cftags2' : {
81
+ 'search' : '(<)(cf[a-z][^ \r\n\t>]*)([^>]*>)'
82
+ ,'class' : 'cftags2'
83
+ ,'modifiers' : 'gi'
84
+ ,'execute' : 'before' // before or after
85
+ }
86
+ ,'tags' : {
87
+ 'search' : '(<)(/?[a-z][^ \r\n\t>]*)([^>]*>)'
88
+ ,'class' : 'tags'
89
+ ,'modifiers' : 'gi'
90
+ ,'execute' : 'before' // before or after
91
+ }
92
+ ,'attributes' : {
93
+ 'search' : '( |\n|\r|\t)([^ \r\n\t=]+)(=)'
94
+ ,'class' : 'attributes'
95
+ ,'modifiers' : 'g'
96
+ ,'execute' : 'before' // before or after
97
+ }
98
+ }
99
+ ,'STYLES' : {
100
+ 'COMMENTS': 'color: #AAAAAA;'
101
+ ,'QUOTESMARKS': 'color: #6381F8;'
102
+ ,'KEYWORDS' : {
103
+ 'reserved' : 'color: #48BDDF;'
104
+ ,'functions' : 'color: #0000FF;'
105
+ ,'statements' : 'color: #60CA00;'
106
+ }
107
+ ,'OPERATORS' : 'color: #E775F0;'
108
+ ,'DELIMITERS' : ''
109
+ ,'REGEXPS' : {
110
+ 'attributes': 'color: #990033;'
111
+ ,'cftags': 'color: #990033;'
112
+ ,'cftags2': 'color: #990033;'
113
+ ,'tags': 'color: #000099;'
114
+ ,'doctype': 'color: #8DCFB5;'
115
+ ,'test': 'color: #00FF00;'
116
+ }
117
+ }
118
+ };
119
+
120
+
editarea/reg_syntax/cpp.js ADDED
@@ -0,0 +1,66 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ editAreaLoader.load_syntax["cpp"] = {
2
+ 'DISPLAY_NAME' : 'CPP'
3
+ ,'COMMENT_SINGLE' : {1 : '//'}
4
+ ,'COMMENT_MULTI' : {'/*' : '*/'}
5
+ ,'QUOTEMARKS' : {1: "'", 2: '"'}
6
+ ,'KEYWORD_CASE_SENSITIVE' : true
7
+ ,'KEYWORDS' : {
8
+ 'constants' : [
9
+ 'NULL', 'false', 'std', 'stdin', 'stdout', 'stderr',
10
+ 'true'
11
+ ]
12
+ ,'types' : [
13
+ 'FILE', 'auto', 'char', 'class', 'const', 'double',
14
+ 'extern', 'float', 'friend', 'inline', 'int',
15
+ 'iterator', 'long', 'map', 'operator', 'queue',
16
+ 'register', 'short', 'signed', 'size_t', 'stack',
17
+ 'static', 'string', 'struct', 'time_t', 'typedef',
18
+ 'union', 'unsigned', 'vector', 'void', 'volatile'
19
+ ]
20
+ ,'statements' : [
21
+ 'catch', 'do', 'else', 'enum', 'for', 'goto', 'if',
22
+ 'sizeof', 'switch', 'this', 'throw', 'try', 'while'
23
+ ]
24
+ ,'keywords' : [
25
+ 'break', 'case', 'continue', 'default', 'delete',
26
+ 'namespace', 'new', 'private', 'protected', 'public',
27
+ 'return', 'using'
28
+ ]
29
+ }
30
+ ,'OPERATORS' :[
31
+ '+', '-', '/', '*', '=', '<', '>', '%', '!', '?', ':', '&'
32
+ ]
33
+ ,'DELIMITERS' :[
34
+ '(', ')', '[', ']', '{', '}'
35
+ ]
36
+ ,'REGEXPS' : {
37
+ 'precompiler' : {
38
+ 'search' : '()(#[^\r\n]*)()'
39
+ ,'class' : 'precompiler'
40
+ ,'modifiers' : 'g'
41
+ ,'execute' : 'before'
42
+ }
43
+ /* ,'precompilerstring' : {
44
+ 'search' : '(#[\t ]*include[\t ]*)([^\r\n]*)([^\r\n]*[\r\n])'
45
+ ,'class' : 'precompilerstring'
46
+ ,'modifiers' : 'g'
47
+ ,'execute' : 'before'
48
+ }*/
49
+ }
50
+ ,'STYLES' : {
51
+ 'COMMENTS': 'color: #AAAAAA;'
52
+ ,'QUOTESMARKS': 'color: #6381F8;'
53
+ ,'KEYWORDS' : {
54
+ 'constants' : 'color: #EE0000;'
55
+ ,'types' : 'color: #0000EE;'
56
+ ,'statements' : 'color: #60CA00;'
57
+ ,'keywords' : 'color: #48BDDF;'
58
+ }
59
+ ,'OPERATORS' : 'color: #FF00FF;'
60
+ ,'DELIMITERS' : 'color: #0038E1;'
61
+ ,'REGEXPS' : {
62
+ 'precompiler' : 'color: #009900;'
63
+ ,'precompilerstring' : 'color: #994400;'
64
+ }
65
+ }
66
+ };
editarea/reg_syntax/css.js ADDED
@@ -0,0 +1,85 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ editAreaLoader.load_syntax["css"] = {
2
+ 'DISPLAY_NAME' : 'CSS'
3
+ ,'COMMENT_SINGLE' : {1 : '@'}
4
+ ,'COMMENT_MULTI' : {'/*' : '*/'}
5
+ ,'QUOTEMARKS' : ['"', "'"]
6
+ ,'KEYWORD_CASE_SENSITIVE' : false
7
+ ,'KEYWORDS' : {
8
+ 'attributes' : [
9
+ 'aqua', 'azimuth', 'background-attachment', 'background-color',
10
+ 'background-image', 'background-position', 'background-repeat',
11
+ 'background', 'border-bottom-color', 'border-bottom-style',
12
+ 'border-bottom-width', 'border-left-color', 'border-left-style',
13
+ 'border-left-width', 'border-right', 'border-right-color',
14
+ 'border-right-style', 'border-right-width', 'border-top-color',
15
+ 'border-top-style', 'border-top-width','border-bottom', 'border-collapse',
16
+ 'border-left', 'border-width', 'border-color', 'border-spacing',
17
+ 'border-style', 'border-top', 'border', 'caption-side',
18
+ 'clear', 'clip', 'color', 'content', 'counter-increment', 'counter-reset',
19
+ 'cue-after', 'cue-before', 'cue', 'cursor', 'direction', 'display',
20
+ 'elevation', 'empty-cells', 'float', 'font-family', 'font-size',
21
+ 'font-size-adjust', 'font-stretch', 'font-style', 'font-variant',
22
+ 'font-weight', 'font', 'height', 'letter-spacing', 'line-height',
23
+ 'list-style', 'list-style-image', 'list-style-position', 'list-style-type',
24
+ 'margin-bottom', 'margin-left', 'margin-right', 'margin-top', 'margin',
25
+ 'marker-offset', 'marks', 'max-height', 'max-width', 'min-height',
26
+ 'min-width', 'opacity', 'orphans', 'outline', 'outline-color', 'outline-style',
27
+ 'outline-width', 'overflow', 'padding-bottom', 'padding-left',
28
+ 'padding-right', 'padding-top', 'padding', 'page', 'page-break-after',
29
+ 'page-break-before', 'page-break-inside', 'pause-after', 'pause-before',
30
+ 'pause', 'pitch', 'pitch-range', 'play-during', 'position', 'quotes',
31
+ 'richness', 'right', 'size', 'speak-header', 'speak-numeral', 'speak-punctuation',
32
+ 'speak', 'speech-rate', 'stress', 'table-layout', 'text-align', 'text-decoration',
33
+ 'text-indent', 'text-shadow', 'text-transform', 'top', 'unicode-bidi',
34
+ 'vertical-align', 'visibility', 'voice-family', 'volume', 'white-space', 'widows',
35
+ 'width', 'word-spacing', 'z-index', 'bottom', 'left'
36
+ ]
37
+ ,'values' : [
38
+ 'above', 'absolute', 'always', 'armenian', 'aural', 'auto', 'avoid',
39
+ 'baseline', 'behind', 'below', 'bidi-override', 'black', 'blue', 'blink', 'block', 'bold', 'bolder', 'both',
40
+ 'capitalize', 'center-left', 'center-right', 'center', 'circle', 'cjk-ideographic',
41
+ 'close-quote', 'collapse', 'condensed', 'continuous', 'crop', 'crosshair', 'cross', 'cursive',
42
+ 'dashed', 'decimal-leading-zero', 'decimal', 'default', 'digits', 'disc', 'dotted', 'double',
43
+ 'e-resize', 'embed', 'extra-condensed', 'extra-expanded', 'expanded',
44
+ 'fantasy', 'far-left', 'far-right', 'faster', 'fast', 'fixed', 'fuchsia',
45
+ 'georgian', 'gray', 'green', 'groove', 'hebrew', 'help', 'hidden', 'hide', 'higher',
46
+ 'high', 'hiragana-iroha', 'hiragana', 'icon', 'inherit', 'inline-table', 'inline',
47
+ 'inset', 'inside', 'invert', 'italic', 'justify', 'katakana-iroha', 'katakana',
48
+ 'landscape', 'larger', 'large', 'left-side', 'leftwards', 'level', 'lighter', 'lime', 'line-through', 'list-item', 'loud', 'lower-alpha', 'lower-greek', 'lower-roman', 'lowercase', 'ltr', 'lower', 'low',
49
+ 'maroon', 'medium', 'message-box', 'middle', 'mix', 'monospace',
50
+ 'n-resize', 'narrower', 'navy', 'ne-resize', 'no-close-quote', 'no-open-quote', 'no-repeat', 'none', 'normal', 'nowrap', 'nw-resize',
51
+ 'oblique', 'olive', 'once', 'open-quote', 'outset', 'outside', 'overline',
52
+ 'pointer', 'portrait', 'purple', 'px',
53
+ 'red', 'relative', 'repeat-x', 'repeat-y', 'repeat', 'rgb', 'ridge', 'right-side', 'rightwards',
54
+ 's-resize', 'sans-serif', 'scroll', 'se-resize', 'semi-condensed', 'semi-expanded', 'separate', 'serif', 'show', 'silent', 'silver', 'slow', 'slower', 'small-caps', 'small-caption', 'smaller', 'soft', 'solid', 'spell-out', 'square',
55
+ 'static', 'status-bar', 'super', 'sw-resize',
56
+ 'table-caption', 'table-cell', 'table-column', 'table-column-group', 'table-footer-group', 'table-header-group', 'table-row', 'table-row-group', 'teal', 'text', 'text-bottom', 'text-top', 'thick', 'thin', 'transparent',
57
+ 'ultra-condensed', 'ultra-expanded', 'underline', 'upper-alpha', 'upper-latin', 'upper-roman', 'uppercase', 'url',
58
+ 'visible',
59
+ 'w-resize', 'wait', 'white', 'wider',
60
+ 'x-fast', 'x-high', 'x-large', 'x-loud', 'x-low', 'x-small', 'x-soft', 'xx-large', 'xx-small',
61
+ 'yellow', 'yes'
62
+ ]
63
+ ,'specials' : [
64
+ 'important'
65
+ ]
66
+ }
67
+ ,'OPERATORS' :[
68
+ ':', ';', '!', '.', '#'
69
+ ]
70
+ ,'DELIMITERS' :[
71
+ '{', '}'
72
+ ]
73
+ ,'STYLES' : {
74
+ 'COMMENTS': 'color: #AAAAAA;'
75
+ ,'QUOTESMARKS': 'color: #6381F8;'
76
+ ,'KEYWORDS' : {
77
+ 'attributes' : 'color: #48BDDF;'
78
+ ,'values' : 'color: #2B60FF;'
79
+ ,'specials' : 'color: #FF0000;'
80
+ }
81
+ ,'OPERATORS' : 'color: #FF00FF;'
82
+ ,'DELIMITERS' : 'color: #60CA00;'
83
+
84
+ }
85
+ };
editarea/reg_syntax/html.js ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * last update: 2006-08-24
3
+ */
4
+
5
+ editAreaLoader.load_syntax["html"] = {
6
+ 'DISPLAY_NAME' : 'HTML'
7
+ ,'COMMENT_SINGLE' : {}
8
+ ,'COMMENT_MULTI' : {'<!--' : '-->'}
9
+ ,'QUOTEMARKS' : {1: "'", 2: '"'}
10
+ ,'KEYWORD_CASE_SENSITIVE' : false
11
+ ,'KEYWORDS' : {
12
+ }
13
+ ,'OPERATORS' :[
14
+ ]
15
+ ,'DELIMITERS' :[
16
+ ]
17
+ ,'REGEXPS' : {
18
+ 'doctype' : {
19
+ 'search' : '()(<!DOCTYPE[^>]*>)()'
20
+ ,'class' : 'doctype'
21
+ ,'modifiers' : ''
22
+ ,'execute' : 'before' // before or after
23
+ }
24
+ ,'tags' : {
25
+ 'search' : '(<)(/?[a-z][^ \r\n\t>]*)([^>]*>)'
26
+ ,'class' : 'tags'
27
+ ,'modifiers' : 'gi'
28
+ ,'execute' : 'before' // before or after
29
+ }
30
+ ,'attributes' : {
31
+ 'search' : '( |\n|\r|\t)([^ \r\n\t=]+)(=)'
32
+ ,'class' : 'attributes'
33
+ ,'modifiers' : 'g'
34
+ ,'execute' : 'before' // before or after
35
+ }
36
+ }
37
+ ,'STYLES' : {
38
+ 'COMMENTS': 'color: #AAAAAA;'
39
+ ,'QUOTESMARKS': 'color: #6381F8;'
40
+ ,'KEYWORDS' : {
41
+ }
42
+ ,'OPERATORS' : 'color: #E775F0;'
43
+ ,'DELIMITERS' : ''
44
+ ,'REGEXPS' : {
45
+ 'attributes': 'color: #B1AC41;'
46
+ ,'tags': 'color: #E62253;'
47
+ ,'doctype': 'color: #8DCFB5;'
48
+ ,'test': 'color: #00FF00;'
49
+ }
50
+ }
51
+ };
editarea/reg_syntax/java.js ADDED
@@ -0,0 +1,57 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ editAreaLoader.load_syntax["java"] = {
2
+ 'DISPLAY_NAME' : 'Java'
3
+ ,'COMMENT_SINGLE': { 1: '//', 2: '@' }
4
+ , 'COMMENT_MULTI': { '/*': '*/' }
5
+ , 'QUOTEMARKS': { 1: "'", 2: '"' }
6
+ , 'KEYWORD_CASE_SENSITIVE': true
7
+ , 'KEYWORDS': {
8
+ 'constants': [
9
+ 'null', 'false', 'true'
10
+ ]
11
+ , 'types': [
12
+ 'String', 'int', 'short', 'long', 'char', 'double', 'byte',
13
+ 'float', 'static', 'void', 'private', 'boolean', 'protected',
14
+ 'public', 'const', 'class', 'final', 'abstract', 'volatile',
15
+ 'enum', 'transient', 'interface'
16
+ ]
17
+ , 'statements': [
18
+ 'this', 'extends', 'if', 'do', 'while', 'try', 'catch', 'finally',
19
+ 'throw', 'throws', 'else', 'for', 'switch', 'continue', 'implements',
20
+ 'break', 'case', 'default', 'goto'
21
+ ]
22
+ , 'keywords': [
23
+ 'new', 'return', 'import', 'native', 'super', 'package', 'assert', 'synchronized',
24
+ 'instanceof', 'strictfp'
25
+ ]
26
+ }
27
+ , 'OPERATORS': [
28
+ '+', '-', '/', '*', '=', '<', '>', '%', '!', '?', ':', '&'
29
+ ]
30
+ , 'DELIMITERS': [
31
+ '(', ')', '[', ']', '{', '}'
32
+ ]
33
+ , 'REGEXPS': {
34
+ 'precompiler': {
35
+ 'search': '()(#[^\r\n]*)()'
36
+ , 'class': 'precompiler'
37
+ , 'modifiers': 'g'
38
+ , 'execute': 'before'
39
+ }
40
+ }
41
+ , 'STYLES': {
42
+ 'COMMENTS': 'color: #AAAAAA;'
43
+ , 'QUOTESMARKS': 'color: #6381F8;'
44
+ , 'KEYWORDS': {
45
+ 'constants': 'color: #EE0000;'
46
+ , 'types': 'color: #0000EE;'
47
+ , 'statements': 'color: #60CA00;'
48
+ , 'keywords': 'color: #48BDDF;'
49
+ }
50
+ , 'OPERATORS': 'color: #FF00FF;'
51
+ , 'DELIMITERS': 'color: #0038E1;'
52
+ , 'REGEXPS': {
53
+ 'precompiler': 'color: #009900;'
54
+ , 'precompilerstring': 'color: #994400;'
55
+ }
56
+ }
57
+ };
editarea/reg_syntax/js.js ADDED
@@ -0,0 +1,94 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ editAreaLoader.load_syntax["js"] = {
2
+ 'DISPLAY_NAME' : 'Javascript'
3
+ ,'COMMENT_SINGLE' : {1 : '//'}
4
+ ,'COMMENT_MULTI' : {'/*' : '*/'}
5
+ ,'QUOTEMARKS' : {1: "'", 2: '"'}
6
+ ,'KEYWORD_CASE_SENSITIVE' : false
7
+ ,'KEYWORDS' : {
8
+ 'statements' : [
9
+ 'as', 'break', 'case', 'catch', 'continue', 'decodeURI', 'delete', 'do',
10
+ 'else', 'encodeURI', 'eval', 'finally', 'for', 'if', 'in', 'is', 'item',
11
+ 'instanceof', 'return', 'switch', 'this', 'throw', 'try', 'typeof', 'void',
12
+ 'while', 'write', 'with'
13
+ ]
14
+ ,'keywords' : [
15
+ 'class', 'const', 'default', 'debugger', 'export', 'extends', 'false',
16
+ 'function', 'import', 'namespace', 'new', 'null', 'package', 'private',
17
+ 'protected', 'public', 'super', 'true', 'use', 'var', 'window', 'document',
18
+ // the list below must be sorted and checked (if it is a keywords or a function and if it is not present twice
19
+ 'Link ', 'outerHeight ', 'Anchor', 'FileUpload',
20
+ 'location', 'outerWidth', 'Select', 'Area', 'find', 'Location', 'Packages', 'self',
21
+ 'arguments', 'locationbar', 'pageXoffset', 'Form',
22
+ 'Math', 'pageYoffset', 'setTimeout', 'assign', 'Frame', 'menubar', 'parent', 'status',
23
+ 'blur', 'frames', 'MimeType', 'parseFloat', 'statusbar', 'Boolean', 'Function', 'moveBy',
24
+ 'parseInt', 'stop', 'Button', 'getClass', 'moveTo', 'Password', 'String', 'callee', 'Hidden',
25
+ 'name', 'personalbar', 'Submit', 'caller', 'history', 'NaN', 'Plugin', 'sun', 'captureEvents',
26
+ 'History', 'navigate', 'print', 'taint', 'Checkbox', 'home', 'navigator', 'prompt', 'Text',
27
+ 'Image', 'Navigator', 'prototype', 'Textarea', 'clearTimeout', 'Infinity',
28
+ 'netscape', 'Radio', 'toolbar', 'close', 'innerHeight', 'Number', 'ref', 'top', 'closed',
29
+ 'innerWidth', 'Object', 'RegExp', 'toString', 'confirm', 'isFinite', 'onBlur', 'releaseEvents',
30
+ 'unescape', 'constructor', 'isNan', 'onError', 'Reset', 'untaint', 'Date', 'java', 'onFocus',
31
+ 'resizeBy', 'unwatch', 'defaultStatus', 'JavaArray', 'onLoad', 'resizeTo', 'valueOf', 'document',
32
+ 'JavaClass', 'onUnload', 'routeEvent', 'watch', 'Document', 'JavaObject', 'open', 'scroll', 'window',
33
+ 'Element', 'JavaPackage', 'opener', 'scrollbars', 'Window', 'escape', 'length', 'Option', 'scrollBy'
34
+ ]
35
+ ,'functions' : [
36
+ // common functions for Window object
37
+ 'alert', 'Array', 'back', 'blur', 'clearInterval', 'close', 'confirm', 'eval ', 'focus', 'forward', 'home',
38
+ 'name', 'navigate', 'onblur', 'onerror', 'onfocus', 'onload', 'onmove',
39
+ 'onresize', 'onunload', 'open', 'print', 'prompt', 'scroll', 'scrollTo', 'setInterval', 'status',
40
+ 'stop'
41
+ ]
42
+ }
43
+ ,'OPERATORS' :[
44
+ '+', '-', '/', '*', '=', '<', '>', '%', '!'
45
+ ]
46
+ ,'DELIMITERS' :[
47
+ '(', ')', '[', ']', '{', '}'
48
+ ]
49
+ ,'STYLES' : {
50
+ 'COMMENTS': 'color: #AAAAAA;'
51
+ ,'QUOTESMARKS': 'color: #6381F8;'
52
+ ,'KEYWORDS' : {
53
+ 'statements' : 'color: #60CA00;'
54
+ ,'keywords' : 'color: #48BDDF;'
55
+ ,'functions' : 'color: #2B60FF;'
56
+ }
57
+ ,'OPERATORS' : 'color: #FF00FF;'
58
+ ,'DELIMITERS' : 'color: #0038E1;'
59
+
60
+ }
61
+ ,'AUTO_COMPLETION' : {
62
+ "default": { // the name of this definition group. It's posisble to have different rules inside the same definition file
63
+ "REGEXP": { "before_word": "[^a-zA-Z0-9_]|^" // \\s|\\.|
64
+ ,"possible_words_letters": "[a-zA-Z0-9_]+"
65
+ ,"letter_after_word_must_match": "[^a-zA-Z0-9_]|$"
66
+ ,"prefix_separator": "\\."
67
+ }
68
+ ,"CASE_SENSITIVE": true
69
+ ,"MAX_TEXT_LENGTH": 100 // the maximum length of the text being analyzed before the cursor position
70
+ ,"KEYWORDS": {
71
+ '': [ // the prefix of thoses items
72
+ /**
73
+ * 0 : the keyword the user is typing
74
+ * 1 : (optionnal) the string inserted in code ("{@}" being the new position of the cursor, "§" beeing the equivalent to the value the typed string indicated if the previous )
75
+ * If empty the keyword will be displayed
76
+ * 2 : (optionnal) the text that appear in the suggestion box (if empty, the string to insert will be displayed)
77
+ */
78
+ ['Array', '§()', '']
79
+ ,['alert', '§({@})', 'alert(String message)']
80
+ ,['document']
81
+ ,['window']
82
+ ]
83
+ ,'window' : [
84
+ ['location']
85
+ ,['document']
86
+ ,['scrollTo', 'scrollTo({@})', 'scrollTo(Int x,Int y)']
87
+ ]
88
+ ,'location' : [
89
+ ['href']
90
+ ]
91
+ }
92
+ }
93
+ }
94
+ };
editarea/reg_syntax/pas.js ADDED
@@ -0,0 +1,83 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ editAreaLoader.load_syntax["pas"] = {
2
+ 'DISPLAY_NAME' : 'Pascal'
3
+ ,'COMMENT_SINGLE' : {}
4
+ ,'COMMENT_MULTI' : {'{' : '}', '(*':'*)'}
5
+ ,'QUOTEMARKS' : {1: '"', 2: "'"}
6
+ ,'KEYWORD_CASE_SENSITIVE' : false
7
+ ,'KEYWORDS' : {
8
+ 'constants' : [
9
+ 'Blink', 'Black', 'Blue', 'Green', 'Cyan', 'Red',
10
+ 'Magenta', 'Brown', 'LightGray', 'DarkGray',
11
+ 'LightBlue', 'LightGreen', 'LightCyan', 'LightRed',
12
+ 'LightMagenta', 'Yellow', 'White', 'MaxSIntValue',
13
+ 'MaxUIntValue', 'maxint', 'maxLongint', 'maxSmallint',
14
+ 'erroraddr', 'errorcode', 'LineEnding'
15
+ ]
16
+ ,'keywords' : [
17
+ 'in', 'or', 'div', 'mod', 'and', 'shl', 'shr', 'xor',
18
+ 'pow', 'is', 'not','Absolute', 'And_then', 'Array',
19
+ 'Begin', 'Bindable', 'Case', 'Const', 'Do', 'Downto',
20
+ 'Else', 'End', 'Export', 'File', 'For', 'Function',
21
+ 'Goto', 'If', 'Import', 'Implementation', 'Inherited',
22
+ 'Inline', 'Interface', 'Label', 'Module', 'Nil',
23
+ 'Object', 'Of', 'Only', 'Operator', 'Or_else',
24
+ 'Otherwise', 'Packed', 'Procedure', 'Program',
25
+ 'Protected', 'Qualified', 'Record', 'Repeat',
26
+ 'Restricted', 'Set', 'Then', 'To', 'Type', 'Unit',
27
+ 'Until', 'Uses', 'Value', 'Var', 'Virtual', 'While',
28
+ 'With'
29
+ ]
30
+ ,'functions' : [
31
+ 'Abs', 'Addr', 'Append', 'Arctan', 'Assert', 'Assign',
32
+ 'Assigned', 'BinStr', 'Blockread', 'Blockwrite',
33
+ 'Break', 'Chdir', 'Chr', 'Close', 'CompareByte',
34
+ 'CompareChar', 'CompareDWord', 'CompareWord', 'Concat',
35
+ 'Continue', 'Copy', 'Cos', 'CSeg', 'Dec', 'Delete',
36
+ 'Dispose', 'DSeg', 'Eof', 'Eoln', 'Erase', 'Exclude',
37
+ 'Exit', 'Exp', 'Filepos', 'Filesize', 'FillByte',
38
+ 'Fillchar', 'FillDWord', 'Fillword', 'Flush', 'Frac',
39
+ 'Freemem', 'Getdir', 'Getmem', 'GetMemoryManager',
40
+ 'Halt', 'HexStr', 'Hi', 'High', 'Inc', 'Include',
41
+ 'IndexByte', 'IndexChar', 'IndexDWord', 'IndexWord',
42
+ 'Insert', 'IsMemoryManagerSet', 'Int', 'IOresult',
43
+ 'Length', 'Ln', 'Lo', 'LongJmp', 'Low', 'Lowercase',
44
+ 'Mark', 'Maxavail', 'Memavail', 'Mkdir', 'Move',
45
+ 'MoveChar0', 'New', 'Odd', 'OctStr', 'Ofs', 'Ord',
46
+ 'Paramcount', 'Paramstr', 'Pi', 'Pos', 'Power', 'Pred',
47
+ 'Ptr', 'Random', 'Randomize', 'Read', 'Readln',
48
+ 'Real2Double', 'Release', 'Rename', 'Reset', 'Rewrite',
49
+ 'Rmdir', 'Round', 'Runerror', 'Seek', 'SeekEof',
50
+ 'SeekEoln', 'Seg', 'SetMemoryManager', 'SetJmp',
51
+ 'SetLength', 'SetString', 'SetTextBuf', 'Sin', 'SizeOf',
52
+ 'Sptr', 'Sqr', 'Sqrt', 'SSeg', 'Str', 'StringOfChar',
53
+ 'Succ', 'Swap', 'Trunc', 'Truncate', 'Upcase', 'Val',
54
+ 'Write', 'WriteLn'
55
+ ]
56
+ ,'types' : [
57
+ 'Integer', 'Shortint', 'SmallInt', 'Longint',
58
+ 'Longword', 'Int64', 'Byte', 'Word', 'Cardinal',
59
+ 'QWord', 'Boolean', 'ByteBool', 'LongBool', 'Char',
60
+ 'Real', 'Single', 'Double', 'Extended', 'Comp',
61
+ 'String', 'ShortString', 'AnsiString', 'PChar'
62
+ ]
63
+ }
64
+ ,'OPERATORS' :[
65
+ '@', '*', '+', '-', '/', '^', ':=', '<', '=', '>'
66
+ ]
67
+ ,'DELIMITERS' :[
68
+ '(', ')', '[', ']'
69
+ ]
70
+ ,'STYLES' : {
71
+ 'COMMENTS': 'color: #AAAAAA;'
72
+ ,'QUOTESMARKS': 'color: #6381F8;'
73
+ ,'KEYWORDS' : {
74
+ 'specials' : 'color: #EE0000;'
75
+ ,'constants' : 'color: #654321;'
76
+ ,'keywords' : 'color: #48BDDF;'
77
+ ,'functions' : 'color: #449922;'
78
+ ,'types' : 'color: #2B60FF;'
79
+ }
80
+ ,'OPERATORS' : 'color: #FF00FF;'
81
+ ,'DELIMITERS' : 'color: #60CA00;'
82
+ }
83
+ };
editarea/reg_syntax/perl.js ADDED
@@ -0,0 +1,88 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /***************************************************************************
2
+ * (c) 2008 - file created by Christoph Pinkel, MTC Infomedia OHG.
3
+ *
4
+ * You may choose any license of the current release or any future release
5
+ * of editarea to use, modify and/or redistribute this file.
6
+ *
7
+ * This language specification file supports for syntax checking on
8
+ * a large subset of Perl 5.x.
9
+ * The basic common syntax of Perl is fully supported, but as for
10
+ * the highlighting of built-in operations, it's mainly designed
11
+ * to support for hightlighting Perl code in a Safe environment (compartment)
12
+ * as used by CoMaNet for evaluation of administrative scripts. This Safe
13
+ * compartment basically allows for all of Opcode's :default operations,
14
+ * but little others. See http://perldoc.perl.org/Opcode.html to learn
15
+ * more.
16
+ ***************************************************************************/
17
+
18
+ editAreaLoader.load_syntax["perl"] = {
19
+ 'DISPLAY_NAME' : 'Perl',
20
+ 'COMMENT_SINGLE' : {1 : '#'},
21
+ 'QUOTEMARKS' : {1: "'", 2: '"'},
22
+ 'KEYWORD_CASE_SENSITIVE' : true,
23
+ 'KEYWORDS' :
24
+ {
25
+ 'core' :
26
+ [ "if", "else", "elsif", "while", "for", "each", "foreach",
27
+ "next", "last", "goto", "exists", "delete", "undef",
28
+ "my", "our", "local", "use", "require", "package", "keys", "values",
29
+ "sub", "bless", "ref", "return" ],
30
+ 'functions' :
31
+ [
32
+ //from :base_core
33
+ "int", "hex", "oct", "abs", "substr", "vec", "study", "pos",
34
+ "length", "index", "rindex", "ord", "chr", "ucfirst", "lcfirst",
35
+ "uc", "lc", "quotemeta", "chop", "chomp", "split", "list", "splice",
36
+ "push", "pop", "shift", "unshift", "reverse", "and", "or", "dor",
37
+ "xor", "warn", "die", "prototype",
38
+ //from :base_mem
39
+ "concat", "repeat", "join", "range",
40
+ //none from :base_loop, as we'll see them as basic statements...
41
+ //from :base_orig
42
+ "sprintf", "crypt", "tie", "untie", "select", "localtime", "gmtime",
43
+ //others
44
+ "print", "open", "close"
45
+ ]
46
+ },
47
+ 'OPERATORS' :
48
+ [ '+', '-', '/', '*', '=', '<', '>', '!', '||', '.', '&&',
49
+ ' eq ', ' ne ', '=~' ],
50
+ 'DELIMITERS' :
51
+ [ '(', ')', '[', ']', '{', '}' ],
52
+ 'REGEXPS' :
53
+ {
54
+ 'packagedecl' : { 'search': '(package )([^ \r\n\t#;]*)()',
55
+ 'class' : 'scopingnames',
56
+ 'modifiers' : 'g', 'execute' : 'before' },
57
+ 'subdecl' : { 'search': '(sub )([^ \r\n\t#]*)()',
58
+ 'class' : 'scopingnames',
59
+ 'modifiers' : 'g', 'execute' : 'before' },
60
+ 'scalars' : { 'search': '()(\\\$[a-zA-Z0-9_:]*)()',
61
+ 'class' : 'vars',
62
+ 'modifiers' : 'g', 'execute' : 'after' },
63
+ 'arrays' : { 'search': '()(@[a-zA-Z0-9_:]*)()',
64
+ 'class' : 'vars',
65
+ 'modifiers' : 'g', 'execute' : 'after' },
66
+ 'hashs' : { 'search': '()(%[a-zA-Z0-9_:]*)()',
67
+ 'class' : 'vars',
68
+ 'modifiers' : 'g', 'execute' : 'after' },
69
+ },
70
+
71
+ 'STYLES' :
72
+ {
73
+ 'COMMENTS': 'color: #AAAAAA;',
74
+ 'QUOTESMARKS': 'color: #DC0000;',
75
+ 'KEYWORDS' :
76
+ {
77
+ 'core' : 'color: #8aca00;',
78
+ 'functions' : 'color: #2B60FF;'
79
+ },
80
+ 'OPERATORS' : 'color: #8aca00;',
81
+ 'DELIMITERS' : 'color: #0038E1;',
82
+ 'REGEXPS':
83
+ {
84
+ 'scopingnames' : 'color: #ff0000;',
85
+ 'vars' : 'color: #00aaaa;',
86
+ }
87
+ } //'STYLES'
88
+ };
editarea/reg_syntax/php.js ADDED
@@ -0,0 +1,157 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ editAreaLoader.load_syntax["php"] = {
2
+ 'DISPLAY_NAME' : 'Php'
3
+ ,'COMMENT_SINGLE' : {1 : '//', 2 : '#'}
4
+ ,'COMMENT_MULTI' : {'/*' : '*/'}
5
+ ,'QUOTEMARKS' : {1: "'", 2: '"'}
6
+ ,'KEYWORD_CASE_SENSITIVE' : false
7
+ ,'KEYWORDS' : {
8
+ 'statements' : [
9
+ 'include', 'require', 'include_once', 'require_once',
10
+ 'for', 'foreach', 'as', 'if', 'elseif', 'else', 'while', 'do', 'endwhile',
11
+ 'endif', 'switch', 'case', 'endswitch',
12
+ 'return', 'break', 'continue'
13
+ ]
14
+ ,'reserved' : [
15
+ '_GET', '_POST', '_SESSION', '_SERVER', '_FILES', '_ENV', '_COOKIE', '_REQUEST',
16
+ 'null', '__LINE__', '__FILE__',
17
+ 'false', '&lt;?php', '?&gt;', '&lt;?',
18
+ '&lt;script language', '&lt;/script&gt;',
19
+ 'true', 'var', 'default',
20
+ 'function', 'class', 'new', '&amp;new', 'this',
21
+ '__FUNCTION__', '__CLASS__', '__METHOD__', 'PHP_VERSION',
22
+ 'PHP_OS', 'DEFAULT_INCLUDE_PATH', 'PEAR_INSTALL_DIR', 'PEAR_EXTENSION_DIR',
23
+ 'PHP_EXTENSION_DIR', 'PHP_BINDIR', 'PHP_LIBDIR', 'PHP_DATADIR', 'PHP_SYSCONFDIR',
24
+ 'PHP_LOCALSTATEDIR', 'PHP_CONFIG_FILE_PATH', 'PHP_OUTPUT_HANDLER_START', 'PHP_OUTPUT_HANDLER_CONT',
25
+ 'PHP_OUTPUT_HANDLER_END', 'E_ERROR', 'E_WARNING', 'E_PARSE', 'E_NOTICE',
26
+ 'E_CORE_ERROR', 'E_CORE_WARNING', 'E_COMPILE_ERROR', 'E_COMPILE_WARNING', 'E_USER_ERROR',
27
+ 'E_USER_WARNING', 'E_USER_NOTICE', 'E_ALL'
28
+
29
+ ]
30
+ ,'functions' : [
31
+ 'func_num_args', 'func_get_arg', 'func_get_args', 'strlen', 'strcmp', 'strncmp', 'strcasecmp', 'strncasecmp', 'each', 'error_reporting', 'define', 'defined',
32
+ 'trigger_error', 'user_error', 'set_error_handler', 'restore_error_handler', 'get_declared_classes', 'get_loaded_extensions',
33
+ 'extension_loaded', 'get_extension_funcs', 'debug_backtrace',
34
+ 'constant', 'bin2hex', 'sleep', 'usleep', 'time', 'mktime', 'gmmktime', 'strftime', 'gmstrftime', 'strtotime', 'date', 'gmdate', 'getdate', 'localtime', 'checkdate', 'flush', 'wordwrap', 'htmlspecialchars', 'htmlentities', 'html_entity_decode', 'md5', 'md5_file', 'crc32', 'getimagesize', 'image_type_to_mime_type', 'phpinfo', 'phpversion', 'phpcredits', 'strnatcmp', 'strnatcasecmp', 'substr_count', 'strspn', 'strcspn', 'strtok', 'strtoupper', 'strtolower', 'strpos', 'strrpos', 'strrev', 'hebrev', 'hebrevc', 'nl2br', 'basename', 'dirname', 'pathinfo', 'stripslashes', 'stripcslashes', 'strstr', 'stristr', 'strrchr', 'str_shuffle', 'str_word_count', 'strcoll', 'substr', 'substr_replace', 'quotemeta', 'ucfirst', 'ucwords', 'strtr', 'addslashes', 'addcslashes', 'rtrim', 'str_replace', 'str_repeat', 'count_chars', 'chunk_split', 'trim', 'ltrim', 'strip_tags', 'similar_text', 'explode', 'implode', 'setlocale', 'localeconv',
35
+ 'parse_str', 'str_pad', 'chop', 'strchr', 'sprintf', 'printf', 'vprintf', 'vsprintf', 'sscanf', 'fscanf', 'parse_url', 'urlencode', 'urldecode', 'rawurlencode', 'rawurldecode', 'readlink', 'linkinfo', 'link', 'unlink', 'exec', 'system', 'escapeshellcmd', 'escapeshellarg', 'passthru', 'shell_exec', 'proc_open', 'proc_close', 'rand', 'srand', 'getrandmax', 'mt_rand', 'mt_srand', 'mt_getrandmax', 'base64_decode', 'base64_encode', 'abs', 'ceil', 'floor', 'round', 'is_finite', 'is_nan', 'is_infinite', 'bindec', 'hexdec', 'octdec', 'decbin', 'decoct', 'dechex', 'base_convert', 'number_format', 'fmod', 'ip2long', 'long2ip', 'getenv', 'putenv', 'getopt', 'microtime', 'gettimeofday', 'getrusage', 'uniqid', 'quoted_printable_decode', 'set_time_limit', 'get_cfg_var', 'magic_quotes_runtime', 'set_magic_quotes_runtime', 'get_magic_quotes_gpc', 'get_magic_quotes_runtime',
36
+ 'import_request_variables', 'error_log', 'serialize', 'unserialize', 'memory_get_usage', 'var_dump', 'var_export', 'debug_zval_dump', 'print_r','highlight_file', 'show_source', 'highlight_string', 'ini_get', 'ini_get_all', 'ini_set', 'ini_alter', 'ini_restore', 'get_include_path', 'set_include_path', 'restore_include_path', 'setcookie', 'header', 'headers_sent', 'connection_aborted', 'connection_status', 'ignore_user_abort', 'parse_ini_file', 'is_uploaded_file', 'move_uploaded_file', 'intval', 'floatval', 'doubleval', 'strval', 'gettype', 'settype', 'is_null', 'is_resource', 'is_bool', 'is_long', 'is_float', 'is_int', 'is_integer', 'is_double', 'is_real', 'is_numeric', 'is_string', 'is_array', 'is_object', 'is_scalar',
37
+ 'ereg', 'ereg_replace', 'eregi', 'eregi_replace', 'split', 'spliti', 'join', 'sql_regcase', 'dl', 'pclose', 'popen', 'readfile', 'rewind', 'rmdir', 'umask', 'fclose', 'feof', 'fgetc', 'fgets', 'fgetss', 'fread', 'fopen', 'fpassthru', 'ftruncate', 'fstat', 'fseek', 'ftell', 'fflush', 'fwrite', 'fputs', 'mkdir', 'rename', 'copy', 'tempnam', 'tmpfile', 'file', 'file_get_contents', 'stream_select', 'stream_context_create', 'stream_context_set_params', 'stream_context_set_option', 'stream_context_get_options', 'stream_filter_prepend', 'stream_filter_append', 'fgetcsv', 'flock', 'get_meta_tags', 'stream_set_write_buffer', 'set_file_buffer', 'set_socket_blocking', 'stream_set_blocking', 'socket_set_blocking', 'stream_get_meta_data', 'stream_register_wrapper', 'stream_wrapper_register', 'stream_set_timeout', 'socket_set_timeout', 'socket_get_status', 'realpath', 'fnmatch', 'fsockopen', 'pfsockopen', 'pack', 'unpack', 'get_browser', 'crypt', 'opendir', 'closedir', 'chdir', 'getcwd', 'rewinddir', 'readdir', 'dir', 'glob', 'fileatime', 'filectime', 'filegroup', 'fileinode', 'filemtime', 'fileowner', 'fileperms', 'filesize', 'filetype', 'file_exists', 'is_writable', 'is_writeable', 'is_readable', 'is_executable', 'is_file', 'is_dir', 'is_link', 'stat', 'lstat', 'chown',
38
+ 'touch', 'clearstatcache', 'mail', 'ob_start', 'ob_flush', 'ob_clean', 'ob_end_flush', 'ob_end_clean', 'ob_get_flush', 'ob_get_clean', 'ob_get_length', 'ob_get_level', 'ob_get_status', 'ob_get_contents', 'ob_implicit_flush', 'ob_list_handlers', 'ksort', 'krsort', 'natsort', 'natcasesort', 'asort', 'arsort', 'sort', 'rsort', 'usort', 'uasort', 'uksort', 'shuffle', 'array_walk', 'count', 'end', 'prev', 'next', 'reset', 'current', 'key', 'min', 'max', 'in_array', 'array_search', 'extract', 'compact', 'array_fill', 'range', 'array_multisort', 'array_push', 'array_pop', 'array_shift', 'array_unshift', 'array_splice', 'array_slice', 'array_merge', 'array_merge_recursive', 'array_keys', 'array_values', 'array_count_values', 'array_reverse', 'array_reduce', 'array_pad', 'array_flip', 'array_change_key_case', 'array_rand', 'array_unique', 'array_intersect', 'array_intersect_assoc', 'array_diff', 'array_diff_assoc', 'array_sum', 'array_filter', 'array_map', 'array_chunk', 'array_key_exists', 'pos', 'sizeof', 'key_exists', 'assert', 'assert_options', 'version_compare', 'ftok', 'str_rot13', 'aggregate',
39
+ 'session_name', 'session_module_name', 'session_save_path', 'session_id', 'session_regenerate_id', 'session_decode', 'session_register', 'session_unregister', 'session_is_registered', 'session_encode',
40
+ 'session_start', 'session_destroy', 'session_unset', 'session_set_save_handler', 'session_cache_limiter', 'session_cache_expire', 'session_set_cookie_params', 'session_get_cookie_params', 'session_write_close', 'preg_match', 'preg_match_all', 'preg_replace', 'preg_replace_callback', 'preg_split', 'preg_quote', 'preg_grep', 'overload', 'ctype_alnum', 'ctype_alpha', 'ctype_cntrl', 'ctype_digit', 'ctype_lower', 'ctype_graph', 'ctype_print', 'ctype_punct', 'ctype_space', 'ctype_upper', 'ctype_xdigit', 'virtual', 'apache_request_headers', 'apache_note', 'apache_lookup_uri', 'apache_child_terminate', 'apache_setenv', 'apache_response_headers', 'apache_get_version', 'getallheaders', 'mysql_connect', 'mysql_pconnect', 'mysql_close', 'mysql_select_db', 'mysql_create_db', 'mysql_drop_db', 'mysql_query', 'mysql_unbuffered_query', 'mysql_db_query', 'mysql_list_dbs', 'mysql_list_tables', 'mysql_list_fields', 'mysql_list_processes', 'mysql_error', 'mysql_errno', 'mysql_affected_rows', 'mysql_insert_id', 'mysql_result', 'mysql_num_rows', 'mysql_num_fields', 'mysql_fetch_row', 'mysql_fetch_array', 'mysql_fetch_assoc', 'mysql_fetch_object', 'mysql_data_seek', 'mysql_fetch_lengths', 'mysql_fetch_field', 'mysql_field_seek', 'mysql_free_result', 'mysql_field_name', 'mysql_field_table', 'mysql_field_len', 'mysql_field_type', 'mysql_field_flags', 'mysql_escape_string', 'mysql_real_escape_string', 'mysql_stat',
41
+ 'mysql_thread_id', 'mysql_client_encoding', 'mysql_get_client_info', 'mysql_get_host_info', 'mysql_get_proto_info', 'mysql_get_server_info', 'mysql_info', 'mysql', 'mysql_fieldname', 'mysql_fieldtable', 'mysql_fieldlen', 'mysql_fieldtype', 'mysql_fieldflags', 'mysql_selectdb', 'mysql_createdb', 'mysql_dropdb', 'mysql_freeresult', 'mysql_numfields', 'mysql_numrows', 'mysql_listdbs', 'mysql_listtables', 'mysql_listfields', 'mysql_db_name', 'mysql_dbname', 'mysql_tablename', 'mysql_table_name', 'pg_connect', 'pg_pconnect', 'pg_close', 'pg_connection_status', 'pg_connection_busy', 'pg_connection_reset', 'pg_host', 'pg_dbname', 'pg_port', 'pg_tty', 'pg_options', 'pg_ping', 'pg_query', 'pg_send_query', 'pg_cancel_query', 'pg_fetch_result', 'pg_fetch_row', 'pg_fetch_assoc', 'pg_fetch_array', 'pg_fetch_object', 'pg_fetch_all', 'pg_affected_rows', 'pg_get_result', 'pg_result_seek', 'pg_result_status', 'pg_free_result', 'pg_last_oid', 'pg_num_rows', 'pg_num_fields', 'pg_field_name', 'pg_field_num', 'pg_field_size', 'pg_field_type', 'pg_field_prtlen', 'pg_field_is_null', 'pg_get_notify', 'pg_get_pid', 'pg_result_error', 'pg_last_error', 'pg_last_notice', 'pg_put_line', 'pg_end_copy', 'pg_copy_to', 'pg_copy_from',
42
+ 'pg_trace', 'pg_untrace', 'pg_lo_create', 'pg_lo_unlink', 'pg_lo_open', 'pg_lo_close', 'pg_lo_read', 'pg_lo_write', 'pg_lo_read_all', 'pg_lo_import', 'pg_lo_export', 'pg_lo_seek', 'pg_lo_tell', 'pg_escape_string', 'pg_escape_bytea', 'pg_unescape_bytea', 'pg_client_encoding', 'pg_set_client_encoding', 'pg_meta_data', 'pg_convert', 'pg_insert', 'pg_update', 'pg_delete', 'pg_select', 'pg_exec', 'pg_getlastoid', 'pg_cmdtuples', 'pg_errormessage', 'pg_numrows', 'pg_numfields', 'pg_fieldname', 'pg_fieldsize', 'pg_fieldtype', 'pg_fieldnum', 'pg_fieldprtlen', 'pg_fieldisnull', 'pg_freeresult', 'pg_result', 'pg_loreadall', 'pg_locreate', 'pg_lounlink', 'pg_loopen', 'pg_loclose', 'pg_loread', 'pg_lowrite', 'pg_loimport', 'pg_loexport',
43
+ 'echo', 'print', 'global', 'static', 'exit', 'array', 'empty', 'eval', 'isset', 'unset', 'die'
44
+
45
+ ]
46
+ }
47
+ ,'OPERATORS' :[
48
+ '+', '-', '/', '*', '=', '<', '>', '%', '!', '&&', '||'
49
+ ]
50
+ ,'DELIMITERS' :[
51
+ '(', ')', '[', ']', '{', '}'
52
+ ]
53
+ ,'REGEXPS' : {
54
+ // highlight all variables ($...)
55
+ 'variables' : {
56
+ 'search' : '()(\\$\\w+)()'
57
+ ,'class' : 'variables'
58
+ ,'modifiers' : 'g'
59
+ ,'execute' : 'before' // before or after
60
+ }
61
+ }
62
+ ,'STYLES' : {
63
+ 'COMMENTS': 'color: #AAAAAA;'
64
+ ,'QUOTESMARKS': 'color: #879EFA;'
65
+ ,'KEYWORDS' : {
66
+ 'reserved' : 'color: #48BDDF;'
67
+ ,'functions' : 'color: #0040FD;'
68
+ ,'statements' : 'color: #60CA00;'
69
+ }
70
+ ,'OPERATORS' : 'color: #FF00FF;'
71
+ ,'DELIMITERS' : 'color: #2B60FF;'
72
+ ,'REGEXPS' : {
73
+ 'variables' : 'color: #E0BD54;'
74
+ }
75
+ }
76
+ ,'AUTO_COMPLETION' : {
77
+ "default": { // the name of this definition group. It's posisble to have different rules inside the same definition file
78
+ "REGEXP": { "before_word": "[^a-zA-Z0-9_]|^" // \\s|\\.|
79
+ ,"possible_words_letters": "[a-zA-Z0-9_\$]+"
80
+ ,"letter_after_word_must_match": "[^a-zA-Z0-9_]|$"
81
+ ,"prefix_separator": "\\-\\>|\\:\\:"
82
+ }
83
+ ,"CASE_SENSITIVE": true
84
+ ,"MAX_TEXT_LENGTH": 100 // the maximum length of the text being analyzed before the cursor position
85
+ ,"KEYWORDS": {
86
+ '': [ // the prefix of thoses items
87
+ /**
88
+ * 0 : the keyword the user is typing
89
+ * 1 : (optionnal) the string inserted in code ("{@}" being the new position of the cursor, "§" beeing the equivalent to the value the typed string indicated if the previous )
90
+ * If empty the keyword will be displayed
91
+ * 2 : (optionnal) the text that appear in the suggestion box (if empty, the string to insert will be displayed)
92
+ */
93
+ ['$_POST']
94
+ ,['$_GET']
95
+ ,['$_SESSION']
96
+ ,['$_SERVER']
97
+ ,['$_FILES']
98
+ ,['$_ENV']
99
+ ,['$_COOKIE']
100
+ ,['$_REQUEST']
101
+ // magic methods
102
+ ,['__construct', '§( {@} )']
103
+ ,['__destruct', '§( {@} )']
104
+ ,['__sleep', '§( {@} )']
105
+ ,['__wakeup', '§( {@} )']
106
+ ,['__toString', '§( {@} )']
107
+ // include
108
+ ,['include', '§ "{@}";']
109
+ ,['include_once', '§ "{@}";']
110
+ ,['require', '§ "{@}";']
111
+ ,['require_once', '§ "{@}";']
112
+ // statements
113
+ ,['for', '§( {@} )']
114
+ ,['foreach', '§( {@} )']
115
+ ,['if', '§( {@} )']
116
+ ,['elseif', '§( {@} )']
117
+ ,['while', '§( {@} )']
118
+ ,['switch', '§( {@} )']
119
+ ,['break']
120
+ ,['case']
121
+ ,['continue']
122
+ ,['do']
123
+ ,['else']
124
+ ,['endif']
125
+ ,['endswitch']
126
+ ,['endwhile']
127
+ ,['return']
128
+ // function
129
+ ,['unset', '§( {@} )']
130
+ ]
131
+ }
132
+ }
133
+ ,"live": {
134
+
135
+ // class NAME: /class\W+([a-z]+)\W+/gi
136
+ // method: /^(public|private|protected)?\s*function\s+([a-z][a-z0-9\_]*)\s*(\([^\{]*\))/gmi
137
+ // static: /^(public|private|protected)?\s+static\s+(public|private|protected)?\s*function\s+([a-z][a-z0-9\_]*)\s*(\([^\{]*\))/gmi
138
+ // attributes: /(\$this\-\>|(?:var|public|protected|private)\W+\$)([a-z0-9\_]+)(?!\()\b/gi
139
+ // v1 : /(\$this\-\>|var\W+|public\W+|protected\W+|private\W+)([a-z0-9\_]+)\W*(=|;)/gi
140
+ // var type: /(\$(this\-\>)?[a-z0-9\_]+)\s*\=\s*new\s+([a-z0-9\_])+/gi
141
+
142
+
143
+ "REGEXP": { "before_word": "[^a-zA-Z0-9_]|^" // \\s|\\.|
144
+ ,"possible_words_letters": "[a-zA-Z0-9_\$]+"
145
+ ,"letter_after_word_must_match": "[^a-zA-Z0-9_]|$"
146
+ ,"prefix_separator": "\\-\\>"
147
+ }
148
+ ,"CASE_SENSITIVE": true
149
+ ,"MAX_TEXT_LENGTH": 100 // the maximum length of the text being analyzed before the cursor position
150
+ ,"KEYWORDS": {
151
+ '$this': [ // the prefix of thoses items
152
+ ['test']
153
+ ]
154
+ }
155
+ }
156
+ }
157
+ };
editarea/reg_syntax/python.js ADDED
@@ -0,0 +1,145 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * Python syntax v 1.1
3
+ *
4
+ * v1.1 by Andre Roberge (2006/12/27)
5
+ *
6
+ **/
7
+ editAreaLoader.load_syntax["python"] = {
8
+ 'DISPLAY_NAME' : 'Python'
9
+ ,'COMMENT_SINGLE' : {1 : '#'}
10
+ ,'COMMENT_MULTI' : {}
11
+ ,'QUOTEMARKS' : {1: "'", 2: '"'}
12
+ ,'KEYWORD_CASE_SENSITIVE' : true
13
+ ,'KEYWORDS' : {
14
+ /*
15
+ ** Set 1: reserved words
16
+ ** http://python.org/doc/current/ref/keywords.html
17
+ ** Note: 'as' and 'with' have been added starting with Python 2.5
18
+ */
19
+ 'reserved' : [
20
+ 'and', 'as', 'assert', 'break', 'class', 'continue', 'def', 'del', 'elif',
21
+ 'else', 'except', 'exec', 'finally', 'for', 'from', 'global', 'if',
22
+ 'import', 'is', 'in', 'lambda', 'not', 'or', 'pass', 'print', 'raise',
23
+ 'return', 'try', 'while', 'with', 'yield'
24
+ //the following are *almost* reserved; we'll treat them as such
25
+ , 'False', 'True', 'None'
26
+ ]
27
+ /*
28
+ ** Set 2: builtins
29
+ ** http://python.org/doc/current/lib/built-in-funcs.html
30
+ */
31
+ ,'builtins' : [
32
+ '__import__', 'abs', 'basestring', 'bool', 'callable', 'chr', 'classmethod', 'cmp',
33
+ 'compile', 'complex', 'delattr', 'dict', 'dir', 'divmod', 'enumerate', 'eval', 'execfile',
34
+ 'file', 'filter', 'float', 'frozenset', 'getattr', 'globals', 'hasattr', 'hash', 'help',
35
+ 'hex', 'id', 'input', 'int', 'isinstance', 'issubclass', 'iter', 'len', 'list', 'locals',
36
+ 'long', 'map', 'max', 'min', 'object', 'oct', 'open', 'ord', 'pow', 'property', 'range',
37
+ 'raw_input', 'reduce', 'reload', 'repr', 'reversed', 'round', 'set', 'setattr', 'slice',
38
+ 'sorted', 'staticmethod', 'str', 'sum', 'super', 'tuple', 'type', 'unichr', 'unicode',
39
+ 'vars', 'xrange', 'zip',
40
+ // Built-in constants: http://www.python.org/doc/2.4.1/lib/node35.html
41
+ //'False', 'True', 'None' have been included in 'reserved'
42
+ 'NotImplemented', 'Ellipsis',
43
+ // Built-in Exceptions: http://python.org/doc/current/lib/module-exceptions.html
44
+ 'Exception', 'StandardError', 'ArithmeticError', 'LookupError', 'EnvironmentError',
45
+ 'AssertionError', 'AttributeError', 'EOFError', 'FloatingPointError', 'IOError',
46
+ 'ImportError', 'IndexError', 'KeyError', 'KeyboardInterrupt', 'MemoryError', 'NameError',
47
+ 'NotImplementedError', 'OSError', 'OverflowError', 'ReferenceError', 'RuntimeError',
48
+ 'StopIteration', 'SyntaxError', 'SystemError', 'SystemExit', 'TypeError',
49
+ 'UnboundlocalError', 'UnicodeError', 'UnicodeEncodeError', 'UnicodeDecodeError',
50
+ 'UnicodeTranslateError', 'ValueError', 'WindowsError', 'ZeroDivisionError', 'Warning',
51
+ 'UserWarning', 'DeprecationWarning', 'PendingDeprecationWarning', 'SyntaxWarning',
52
+ 'RuntimeWarning', 'FutureWarning',
53
+ // we will include the string methods as well
54
+ // http://python.org/doc/current/lib/string-methods.html
55
+ 'capitalize', 'center', 'count', 'decode', 'encode', 'endswith', 'expandtabs',
56
+ 'find', 'index', 'isalnum', 'isaplpha', 'isdigit', 'islower', 'isspace', 'istitle',
57
+ 'isupper', 'join', 'ljust', 'lower', 'lstrip', 'replace', 'rfind', 'rindex', 'rjust',
58
+ 'rsplit', 'rstrip', 'split', 'splitlines', 'startswith', 'strip', 'swapcase', 'title',
59
+ 'translate', 'upper', 'zfill'
60
+ ]
61
+ /*
62
+ ** Set 3: standard library
63
+ ** http://python.org/doc/current/lib/modindex.html
64
+ */
65
+ ,'stdlib' : [
66
+ '__builtin__', '__future__', '__main__', '_winreg', 'aifc', 'AL', 'al', 'anydbm',
67
+ 'array', 'asynchat', 'asyncore', 'atexit', 'audioop', 'base64', 'BaseHTTPServer',
68
+ 'Bastion', 'binascii', 'binhex', 'bisect', 'bsddb', 'bz2', 'calendar', 'cd', 'cgi',
69
+ 'CGIHTTPServer', 'cgitb', 'chunk', 'cmath', 'cmd', 'code', 'codecs', 'codeop',
70
+ 'collections', 'colorsys', 'commands', 'compileall', 'compiler', 'compiler',
71
+ 'ConfigParser', 'Cookie', 'cookielib', 'copy', 'copy_reg', 'cPickle', 'crypt',
72
+ 'cStringIO', 'csv', 'curses', 'datetime', 'dbhash', 'dbm', 'decimal', 'DEVICE',
73
+ 'difflib', 'dircache', 'dis', 'distutils', 'dl', 'doctest', 'DocXMLRPCServer', 'dumbdbm',
74
+ 'dummy_thread', 'dummy_threading', 'email', 'encodings', 'errno', 'exceptions', 'fcntl',
75
+ 'filecmp', 'fileinput', 'FL', 'fl', 'flp', 'fm', 'fnmatch', 'formatter', 'fpectl',
76
+ 'fpformat', 'ftplib', 'gc', 'gdbm', 'getopt', 'getpass', 'gettext', 'GL', 'gl', 'glob',
77
+ 'gopherlib', 'grp', 'gzip', 'heapq', 'hmac', 'hotshot', 'htmlentitydefs', 'htmllib',
78
+ 'HTMLParser', 'httplib', 'imageop', 'imaplib', 'imgfile', 'imghdr', 'imp', 'inspect',
79
+ 'itertools', 'jpeg', 'keyword', 'linecache', 'locale', 'logging', 'mailbox', 'mailcap',
80
+ 'marshal', 'math', 'md5', 'mhlib', 'mimetools', 'mimetypes', 'MimeWriter', 'mimify',
81
+ 'mmap', 'msvcrt', 'multifile', 'mutex', 'netrc', 'new', 'nis', 'nntplib', 'operator',
82
+ 'optparse', 'os', 'ossaudiodev', 'parser', 'pdb', 'pickle', 'pickletools', 'pipes',
83
+ 'pkgutil', 'platform', 'popen2', 'poplib', 'posix', 'posixfile', 'pprint', 'profile',
84
+ 'pstats', 'pty', 'pwd', 'py_compile', 'pyclbr', 'pydoc', 'Queue', 'quopri', 'random',
85
+ 're', 'readline', 'repr', 'resource', 'rexec', 'rfc822', 'rgbimg', 'rlcompleter',
86
+ 'robotparser', 'sched', 'ScrolledText', 'select', 'sets', 'sgmllib', 'sha', 'shelve',
87
+ 'shlex', 'shutil', 'signal', 'SimpleHTTPServer', 'SimpleXMLRPCServer', 'site', 'smtpd',
88
+ 'smtplib', 'sndhdr', 'socket', 'SocketServer', 'stat', 'statcache', 'statvfs', 'string',
89
+ 'StringIO', 'stringprep', 'struct', 'subprocess', 'sunau', 'SUNAUDIODEV', 'sunaudiodev',
90
+ 'symbol', 'sys', 'syslog', 'tabnanny', 'tarfile', 'telnetlib', 'tempfile', 'termios',
91
+ 'test', 'textwrap', 'thread', 'threading', 'time', 'timeit', 'Tix', 'Tkinter', 'token',
92
+ 'tokenize', 'traceback', 'tty', 'turtle', 'types', 'unicodedata', 'unittest', 'urllib2',
93
+ 'urllib', 'urlparse', 'user', 'UserDict', 'UserList', 'UserString', 'uu', 'warnings',
94
+ 'wave', 'weakref', 'webbrowser', 'whichdb', 'whrandom', 'winsound', 'xdrlib', 'xml',
95
+ 'xmllib', 'xmlrpclib', 'zipfile', 'zipimport', 'zlib'
96
+
97
+ ]
98
+ /*
99
+ ** Set 4: special methods
100
+ ** http://python.org/doc/current/ref/specialnames.html
101
+ */
102
+ ,'special' : [
103
+ // Basic customization: http://python.org/doc/current/ref/customization.html
104
+ '__new__', '__init__', '__del__', '__repr__', '__str__',
105
+ '__lt__', '__le__', '__eq__', '__ne__', '__gt__', '__ge__', '__cmp__', '__rcmp__',
106
+ '__hash__', '__nonzero__', '__unicode__', '__dict__',
107
+ // Attribute access: http://python.org/doc/current/ref/attribute-access.html
108
+ '__setattr__', '__delattr__', '__getattr__', '__getattribute__', '__get__', '__set__',
109
+ '__delete__', '__slots__',
110
+ // Class creation, callable objects
111
+ '__metaclass__', '__call__',
112
+ // Container types: http://python.org/doc/current/ref/sequence-types.html
113
+ '__len__', '__getitem__', '__setitem__', '__delitem__', '__iter__', '__contains__',
114
+ '__getslice__', '__setslice__', '__delslice__',
115
+ // Numeric types: http://python.org/doc/current/ref/numeric-types.html
116
+ '__abs__','__add__','__and__','__coerce__','__div__','__divmod__','__float__',
117
+ '__hex__','__iadd__','__isub__','__imod__','__idiv__','__ipow__','__iand__',
118
+ '__ior__','__ixor__', '__ilshift__','__irshift__','__invert__','__int__',
119
+ '__long__','__lshift__',
120
+ '__mod__','__mul__','__neg__','__oct__','__or__','__pos__','__pow__',
121
+ '__radd__','__rdiv__','__rdivmod__','__rmod__','__rpow__','__rlshift__','__rrshift__',
122
+ '__rshift__','__rsub__','__rmul__','__repr__','__rand__','__rxor__','__ror__',
123
+ '__sub__','__xor__'
124
+ ]
125
+ }
126
+ ,'OPERATORS' :[
127
+ '+', '-', '/', '*', '=', '<', '>', '%', '!', '&', ';', '?', '`', ':', ','
128
+ ]
129
+ ,'DELIMITERS' :[
130
+ '(', ')', '[', ']', '{', '}'
131
+ ]
132
+ ,'STYLES' : {
133
+ 'COMMENTS': 'color: #AAAAAA;'
134
+ ,'QUOTESMARKS': 'color: #660066;'
135
+ ,'KEYWORDS' : {
136
+ 'reserved' : 'color: #0000FF;'
137
+ ,'builtins' : 'color: #009900;'
138
+ ,'stdlib' : 'color: #009900;'
139
+ ,'special': 'color: #006666;'
140
+ }
141
+ ,'OPERATORS' : 'color: #993300;'
142
+ ,'DELIMITERS' : 'color: #993300;'
143
+
144
+ }
145
+ };
editarea/reg_syntax/robotstxt.js ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ editAreaLoader.load_syntax["robotstxt"] = {
2
+ 'DISPLAY_NAME' : 'Robots txt',
3
+ 'COMMENT_SINGLE' : {1 : '#'},
4
+ 'COMMENT_MULTI' : {},
5
+ 'QUOTEMARKS' : [],
6
+ 'KEYWORD_CASE_SENSITIVE' : false,
7
+ 'KEYWORDS' : {
8
+ 'attributes' : ['User-agent', 'Disallow', 'Allow', 'Crawl-delay'],
9
+ 'values' : ['*'],
10
+ 'specials' : ['*']
11
+ },
12
+ 'OPERATORS' :[':'],
13
+ 'DELIMITERS' :[],
14
+ 'STYLES' : {
15
+ 'COMMENTS': 'color: #AAAAAA;',
16
+ 'QUOTESMARKS': 'color: #6381F8;',
17
+ 'KEYWORDS' : {
18
+ 'attributes' : 'color: #48BDDF;',
19
+ 'values' : 'color: #2B60FF;',
20
+ 'specials' : 'color: #FF0000;'
21
+ },
22
+ 'OPERATORS' : 'color: #FF00FF;',
23
+ 'DELIMITERS' : 'color: #60CA00;'
24
+ }
25
+ };
editarea/reg_syntax/ruby.js ADDED
@@ -0,0 +1,68 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * Ruby syntax v 1.0
3
+ *
4
+ * v1.0 by Patrice De Saint Steban (2007/01/03)
5
+ *
6
+ **/
7
+ editAreaLoader.load_syntax["ruby"] = {
8
+ 'DISPLAY_NAME' : 'Ruby'
9
+ ,'COMMENT_SINGLE' : {1 : '#'}
10
+ ,'COMMENT_MULTI' : {}
11
+ ,'QUOTEMARKS' : {1: "'", 2: '"'}
12
+ ,'KEYWORD_CASE_SENSITIVE' : true
13
+ ,'KEYWORDS' : {
14
+ 'reserved' : [
15
+ 'alias', 'and', 'BEGIN', 'begin', 'break', 'case', 'class', 'def', 'defined', 'do', 'else',
16
+ 'elsif', 'END', 'end', 'ensure', 'false', 'for', 'if',
17
+ 'in', 'module', 'next', 'not', 'or', 'redo', 'rescue', 'retry',
18
+ 'return', 'self', 'super', 'then', 'true', 'undef', 'unless', 'until', 'when', 'while', 'yield'
19
+ ]
20
+ }
21
+ ,'OPERATORS' :[
22
+ '+', '-', '/', '*', '=', '<', '>', '%', '!', '&', ';', '?', '`', ':', ','
23
+ ]
24
+ ,'DELIMITERS' :[
25
+ '(', ')', '[', ']', '{', '}'
26
+ ]
27
+ ,'REGEXPS' : {
28
+ 'constants' : {
29
+ 'search' : '()([A-Z]\\w*)()'
30
+ ,'class' : 'constants'
31
+ ,'modifiers' : 'g'
32
+ ,'execute' : 'before'
33
+ }
34
+ ,'variables' : {
35
+ 'search' : '()([\$\@\%]+\\w+)()'
36
+ ,'class' : 'variables'
37
+ ,'modifiers' : 'g'
38
+ ,'execute' : 'before'
39
+ }
40
+ ,'numbers' : {
41
+ 'search' : '()(-?[0-9]+)()'
42
+ ,'class' : 'numbers'
43
+ ,'modifiers' : 'g'
44
+ ,'execute' : 'before'
45
+ }
46
+ ,'symbols' : {
47
+ 'search' : '()(:\\w+)()'
48
+ ,'class' : 'symbols'
49
+ ,'modifiers' : 'g'
50
+ ,'execute' : 'before'
51
+ }
52
+ }
53
+ ,'STYLES' : {
54
+ 'COMMENTS': 'color: #AAAAAA;'
55
+ ,'QUOTESMARKS': 'color: #660066;'
56
+ ,'KEYWORDS' : {
57
+ 'reserved' : 'font-weight: bold; color: #0000FF;'
58
+ }
59
+ ,'OPERATORS' : 'color: #993300;'
60
+ ,'DELIMITERS' : 'color: #993300;'
61
+ ,'REGEXPS' : {
62
+ 'variables' : 'color: #E0BD54;'
63
+ ,'numbers' : 'color: green;'
64
+ ,'constants' : 'color: #00AA00;'
65
+ ,'symbols' : 'color: #879EFA;'
66
+ }
67
+ }
68
+ };
editarea/reg_syntax/sql.js ADDED
@@ -0,0 +1,56 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ editAreaLoader.load_syntax["sql"] = {
2
+ 'DISPLAY_NAME' : 'SQL'
3
+ ,'COMMENT_SINGLE' : {1 : '--'}
4
+ ,'COMMENT_MULTI' : {'/*' : '*/'}
5
+ ,'QUOTEMARKS' : {1: "'", 2: '"', 3: '`'}
6
+ ,'KEYWORD_CASE_SENSITIVE' : false
7
+ ,'KEYWORDS' : {
8
+ 'statements' : [
9
+ 'select', 'SELECT', 'where', 'order', 'by',
10
+ 'insert', 'from', 'update', 'grant', 'left join', 'right join',
11
+ 'union', 'group', 'having', 'limit', 'alter', 'LIKE','IN','CASE'
12
+ ]
13
+ ,'reserved' : [
14
+ 'null', 'enum', 'int', 'boolean', 'add', 'varchar'
15
+
16
+ ]
17
+ ,'functions' : [
18
+ 'ABS','ACOS','ADDDATE','ADDTIME','AES_DECRYPT','AES_ENCRYPT','ASCII','ASIN','ATAN2 ATAN','ATAN','AVG','BENCHMARK','DISTINCT','BIN','BIT_AND','BIT_COUNT','BIT_LENGTH','BIT_OR','BIT_XOR','CAST','CEILING CEIL','CHAR_LENGTH','CHAR',
19
+ 'CHARACTER_LENGTH','CHARSET','COALESCE','COERCIBILITY','COLLATION','COMPRESS','CONCAT_WS','CONCAT','CONNECTION_ID','CONV','CONVERT_TZ','COS','COT','COUNT','CRC32','CURDATE','CURRENT_DATE','CURRENT_TIME','CURRENT_TIMESTAMP','CURRENT_USER','CURTIME','DATABASE','DATE_ADD','DATE_FORMAT','DATE_SUB','DATE','DATEDIFF','DAY','DAYNAME','DAYOFMONTH',
20
+ 'DAYOFWEEK','DAYOFYEAR','DECODE','DEFAULT','DEGREES','DES_DECRYPT','DES_ENCRYPT','ELT','ENCODE','ENCRYPT','EXP','EXPORT_SET','EXTRACT','FIELD','FIND_IN_SET','FLOOR','FORMAT','FOUND_ROWS','FROM_DAYS','FROM_UNIXTIME','GET_FORMAT','GET_LOCK','GREATEST','GROUP_CONCAT','HEX','HOUR','IF','IFNULL','INET_ATON','INET_NTOA',
21
+ 'INSERT','INSTR','INTERVAL','IS_FREE_LOCK','IS_USED_LOCK','ISNULL','LAST_DAY','LAST_INSERT_ID','LCASE','LEAST','LEFT','LENGTH','LN','LOAD_FILE','LOCALTIME','LOCALTIMESTAMP','LOCATE','LOG10','LOG2','LOG','LOWER','LPAD','LTRIM','MAKE_SET','MAKEDATE','MAKETIME','MASTER_POS_WAIT','MAX','MD5','MICROSECOND',
22
+ 'MID','MIN','MINUTE','MOD','MONTH','MONTHNAME','NOW','NULLIF','OCT','OCTET_LENGTH','OLD_PASSWORD','ORD','PASSWORD','PERIOD_ADD','PERIOD_DIFF','PI','POSITION','POW','POWER','PROCEDURE ANALYSE','QUARTER','QUOTE','RADIANS','RAND','RELEASE_LOCK','REPEAT','REPLACE','REVERSE','RIGHT','ROUND',
23
+ 'RPAD','RTRIM','SEC_TO_TIME','SECOND','SESSION_USER','SHA1','SHA','SIGN','SIN','SOUNDEX','SOUNDS LIKE','SPACE','SQRT','STD','STDDEV','STR_TO_DATE','STRCMP','SUBDATE','SUBSTRING_INDEX','SUBSTRING','SUBSTR','SUBTIME','SUM','SYSDATE','SYSTEM_USER','TAN','TIME_FORMAT','TIME_TO_SEC','TIME','TIMEDIFF',
24
+ 'TIMESTAMP','TO_DAYS','TRIM','TRUNCATE','UCASE','UNCOMPRESS','UNCOMPRESSED_LENGTH','UNHEX','UNIX_TIMESTAMP','UPPER','USER','UTC_DATE','UTC_TIME','UTC_TIMESTAMP','UUID','VALUES','VARIANCE','WEEK','WEEKDAY','WEEKOFYEAR','YEAR','YEARWEEK'
25
+ ]
26
+ }
27
+ ,'OPERATORS' :[
28
+ 'AND','&&','BETWEEN','BINARY','&','|','^','/','DIV','<=>','=','>=','>','<<','>>','IS','NULL','<=','<','-','%','!=','<>','!','||','OR','+','REGEXP','RLIKE','XOR','~','*'
29
+ ]
30
+ ,'DELIMITERS' :[
31
+ '(', ')', '[', ']', '{', '}'
32
+ ]
33
+ ,'REGEXPS' : {
34
+ // highlight all variables (@...)
35
+ 'variables' : {
36
+ 'search' : '()(\\@\\w+)()'
37
+ ,'class' : 'variables'
38
+ ,'modifiers' : 'g'
39
+ ,'execute' : 'before' // before or after
40
+ }
41
+ }
42
+ ,'STYLES' : {
43
+ 'COMMENTS': 'color: #AAAAAA;'
44
+ ,'QUOTESMARKS': 'color: #879EFA;'
45
+ ,'KEYWORDS' : {
46
+ 'reserved' : 'color: #48BDDF;'
47
+ ,'functions' : 'color: #0040FD;'
48
+ ,'statements' : 'color: #60CA00;'
49
+ }
50
+ ,'OPERATORS' : 'color: #FF00FF;'
51
+ ,'DELIMITERS' : 'color: #2B60FF;'
52
+ ,'REGEXPS' : {
53
+ 'variables' : 'color: #E0BD54;'
54
+ }
55
+ }
56
+ };
editarea/reg_syntax/tsql.js ADDED
@@ -0,0 +1,88 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ editAreaLoader.load_syntax["tsql"] = {
2
+ 'DISPLAY_NAME' : 'T-SQL'
3
+ ,'COMMENT_SINGLE' : {1 : '--'}
4
+ ,'COMMENT_MULTI' : {'/*' : '*/'}
5
+ ,'QUOTEMARKS' : {1: "'" }
6
+ ,'KEYWORD_CASE_SENSITIVE' : false
7
+ ,'KEYWORDS' : {
8
+ 'statements': [
9
+ 'ADD', 'EXCEPT', 'PERCENT', 'EXEC', 'PLAN', 'ALTER', 'EXECUTE', 'PRECISION',
10
+ 'PRIMARY', 'EXIT', 'PRINT', 'AS', 'FETCH', 'PROC', 'ASC',
11
+ 'FILE', 'PROCEDURE', 'AUTHORIZATION', 'FILLFACTOR', 'PUBLIC', 'BACKUP', 'FOR', 'RAISERROR',
12
+ 'BEGIN', 'FOREIGN', 'READ', 'FREETEXT', 'READTEXT', 'BREAK', 'FREETEXTTABLE',
13
+ 'RECONFIGURE', 'BROWSE', 'FROM', 'REFERENCES', 'BULK', 'FULL', 'REPLICATION', 'BY',
14
+ 'FUNCTION', 'RESTORE', 'CASCADE', 'GOTO', 'RESTRICT', 'CASE', 'GRANT', 'RETURN',
15
+ 'CHECK', 'GROUP', 'REVOKE', 'CHECKPOINT', 'HAVING', 'RIGHT', 'CLOSE', 'HOLDLOCK', 'ROLLBACK',
16
+ 'CLUSTERED', 'IDENTITY', 'ROWCOUNT', 'IDENTITY_INSERT', 'ROWGUIDCOL', 'COLLATE',
17
+ 'IDENTITYCOL', 'RULE', 'COLUMN', 'IF', 'SAVE', 'COMMIT', 'SCHEMA', 'COMPUTE', 'INDEX',
18
+ 'SELECT', 'CONSTRAINT', 'CONTAINS', 'INSERT', 'SET',
19
+ 'CONTAINSTABLE', 'INTERSECT', 'SETUSER', 'CONTINUE', 'INTO', 'SHUTDOWN', 'SOME',
20
+ 'CREATE', 'STATISTICS', 'KEY', 'CURRENT', 'KILL', 'TABLE',
21
+ 'CURRENT_DATE', 'TEXTSIZE', 'CURRENT_TIME', 'THEN', 'LINENO',
22
+ 'TO', 'LOAD', 'TOP', 'CURSOR', 'NATIONAL', 'TRAN', 'DATABASE', 'NOCHECK',
23
+ 'TRANSACTION', 'DBCC', 'NONCLUSTERED', 'TRIGGER', 'DEALLOCATE', 'TRUNCATE',
24
+ 'DECLARE', 'TSEQUAL', 'DEFAULT', 'UNION', 'DELETE', 'OF', 'UNIQUE',
25
+ 'DENY', 'OFF', 'UPDATE', 'DESC', 'OFFSETS', 'UPDATETEXT', 'DISK', 'ON', 'USE', 'DISTINCT', 'OPEN',
26
+ 'DISTRIBUTED', 'OPENDATASOURCE', 'VALUES', 'DOUBLE', 'OPENQUERY', 'VARYING', 'DROP',
27
+ 'OPENROWSET', 'VIEW', 'DUMMY', 'OPENXML', 'WAITFOR', 'DUMP', 'OPTION', 'WHEN', 'ELSE', 'WHERE',
28
+ 'END', 'ORDER', 'WHILE', 'ERRLVL', 'WITH', 'ESCAPE', 'OVER', 'WRITETEXT'
29
+ ],
30
+ 'functions': [
31
+ 'COALESCE', 'SESSION_USER', 'CONVERT', 'SYSTEM_USER', 'CURRENT_TIMESTAMP', 'CURRENT_USER', 'NULLIF', 'USER',
32
+ 'AVG', 'MIN', 'CHECKSUM', 'SUM', 'CHECKSUM_AGG', 'STDEV', 'COUNT', 'STDEVP', 'COUNT_BIG', 'VAR', 'GROUPING', 'VARP', 'MAX',
33
+ '@@DATEFIRST', '@@OPTIONS', '@@DBTS', '@@REMSERVER', '@@LANGID', '@@SERVERNAME', '@@LANGUAGE', '@@SERVICENAME', '@@LOCK_TIMEOUT',
34
+ '@@SPID', '@@MAX_CONNECTIONS', '@@TEXTSIZE', '@@MAX_PRECISION', '@@VERSION', '@@NESTLEVEL',
35
+ '@@CURSOR_ROWS', 'CURSOR_STATUS', '@@FETCH_STATUS',
36
+ 'DATEADD', 'DATEDIFF', 'DATENAME', 'DATEPART', 'DAY', 'GETDATE', 'GETUTCDATE', 'MONTH', 'YEAR',
37
+ 'ABS', 'DEGREES', 'RAND', 'ACOS', 'EXP', 'ROUND', 'ASIN', 'FLOOR', 'SIGN', 'ATAN', 'LOG', 'SIN', 'ATN2', 'LOG10', 'SQRT',
38
+ 'CEILING', 'PI ', 'SQUARE', 'COS', 'POWER', 'TAN', 'COT', 'RADIANS',
39
+ '@@PROCID', 'COL_LENGTH', 'FULLTEXTCATALOGPROPERTY', 'COL_NAME', 'FULLTEXTSERVICEPROPERTY', 'COLUMNPROPERTY', 'INDEX_COL',
40
+ 'DATABASEPROPERTY', 'INDEXKEY_PROPERTY', 'DATABASEPROPERTYEX', 'INDEXPROPERTY', 'DB_ID', 'OBJECT_ID', 'DB_NAME', 'OBJECT_NAME',
41
+ 'FILE_ID', 'OBJECTPROPERTY', 'OBJECTPROPERTYEX', 'FILE_NAME', 'SQL_VARIANT_PROPERTY', 'FILEGROUP_ID', 'FILEGROUP_NAME',
42
+ 'FILEGROUPPROPERTY', 'TYPEPROPERTY', 'FILEPROPERTY',
43
+ 'CURRENT_USER', 'SUSER_ID', 'SUSER_SID', 'IS_MEMBER', 'SUSER_SNAME', 'IS_SRVROLEMEMBER', 'PERMISSIONS', 'SYSTEM_USER',
44
+ 'SUSER_NAME', 'USER_ID', 'SESSION_USER', 'USER_NAME', 'ASCII', 'SOUNDEX', 'PATINDEX', 'SPACE', 'CHARINDEX', 'QUOTENAME',
45
+ 'STR', 'DIFFERENCE', 'REPLACE', 'STUFF', 'REPLICATE', 'SUBSTRING', 'LEN', 'REVERSE', 'UNICODE', 'LOWER',
46
+ 'UPPER', 'LTRIM', 'RTRIM', 'APP_NAME', 'CAST', 'CONVERT', 'COALESCE', 'COLLATIONPROPERTY', 'COLUMNS_UPDATED', 'CURRENT_TIMESTAMP',
47
+ 'CURRENT_USER', 'DATALENGTH', '@@ERROR', 'FORMATMESSAGE', 'GETANSINULL', 'HOST_ID', 'HOST_NAME', 'IDENT_CURRENT', 'IDENT_INCR',
48
+ 'IDENT_SEED', '@@IDENTITY', 'ISDATE', 'ISNULL', 'ISNUMERIC', 'NEWID', 'NULLIF', 'PARSENAME', '@@ROWCOUNT',
49
+ 'SCOPE_IDENTITY', 'SERVERPROPERTY', 'SESSIONPROPERTY', 'SESSION_USER', 'STATS_DATE', 'SYSTEM_USER', '@@TRANCOUNT', 'USER_NAME',
50
+ '@@CONNECTIONS', '@@PACK_RECEIVED', '@@CPU_BUSY', '@@PACK_SENT', '@@TIMETICKS', '@@IDLE', '@@TOTAL_ERRORS', '@@IO_BUSY', '@@TOTAL_READ',
51
+ '@@PACKET_ERRORS', '@@TOTAL_WRITE', 'PATINDEX', 'TEXTVALID', 'TEXTPTR'
52
+ ],
53
+ 'reserved': [
54
+ 'RIGHT', 'INNER', 'IS', 'JOIN', 'CROSS', 'LEFT', 'NULL', 'OUTER'
55
+ ]
56
+ }
57
+ ,'OPERATORS' :[
58
+ '+', '-', '*', '/', '%', '=', '&' ,'|', '^', '>', '<', '>=', '<=', '<>', '!=', '!<', '!>', 'ALL', 'AND', 'ANY', 'BETWEEN', 'EXISTS', 'IN', 'LIKE', 'NOT', 'OR', '~'
59
+ ]
60
+ ,'DELIMITERS' :[
61
+ '(', ')', '[', ']', '{', '}'
62
+ ]
63
+ ,'REGEXPS' : {
64
+ // highlight all variables (@...)
65
+ 'variables' : {
66
+ 'search' : '()(\\@\\w+)()'
67
+ ,'class' : 'variables'
68
+ ,'modifiers' : 'g'
69
+ ,'execute' : 'before' // before or after
70
+ }
71
+ }
72
+ ,'STYLES' : {
73
+ 'COMMENTS': 'color: #008000;'
74
+ ,'QUOTESMARKS': 'color: #FF0000;'
75
+ ,'KEYWORDS' : {
76
+ 'reserved' : 'color: #808080;'
77
+ ,'functions' : 'color: #FF00FF;'
78
+ ,'statements' : 'color: #0000FF;'
79
+ }
80
+ ,'OPERATORS' : 'color: #808080;'
81
+ ,'DELIMITERS' : 'color: #FF8000;'
82
+ ,'REGEXPS' : {
83
+ 'variables' : 'color: #E0BD54;'
84
+ }
85
+ }
86
+ };
87
+
88
+
editarea/reg_syntax/vb.js ADDED
@@ -0,0 +1,53 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ editAreaLoader.load_syntax["vb"] = {
2
+ 'DISPLAY_NAME' : 'Visual Basic'
3
+ ,'COMMENT_SINGLE' : {1 : "'"}
4
+ ,'COMMENT_MULTI' : { }
5
+ ,'QUOTEMARKS' : {1: '"'}
6
+ ,'KEYWORD_CASE_SENSITIVE' : false
7
+ ,'KEYWORDS' : {
8
+ 'statements' : [
9
+ 'if','then','for','each','while','do','loop',
10
+ 'else','elseif','select','case','end select',
11
+ 'until','next','step','to','in','end if'
12
+ ]
13
+ ,'keywords' : [
14
+ 'empty','isempty','nothing','null','isnull','true','false',
15
+ 'set','call',
16
+ 'sub','end sub','function','end function','exit','exit function',
17
+ 'dim','Mod','In','private','public','shared','const'
18
+ ]
19
+
20
+ ,'functions' : [
21
+ 'CDate','Date','DateAdd','DateDiff','DatePart','DateSerial','DateValue','Day','FormatDateTime',
22
+ 'Hour','IsDate','Minute','Month',
23
+ 'MonthName','Now','Second','Time','Timer','TimeSerial','TimeValue','Weekday','WeekdayName ','Year',
24
+ 'Asc','CBool','CByte','CCur','CDate','CDbl','Chr','CInt','CLng','CSng','CStr','Hex','Oct','FormatCurrency',
25
+ 'FormatDateTime','FormatNumber','FormatPercent','Abs','Atn','Cos','Exp','Hex','Int','Fix','Log','Oct',
26
+ 'Rnd','Sgn','Sin','Sqr','Tan',
27
+ 'Array','Filter','IsArray','Join','LBound','Split','UBound',
28
+ 'InStr','InStrRev','LCase','Left','Len','LTrim','RTrim','Trim','Mid','Replace','Right','Space','StrComp',
29
+ 'String','StrReverse','UCase',
30
+ 'CreateObject','Eval','GetLocale','GetObject','GetRef','InputBox','IsEmpty','IsNull','IsNumeric',
31
+ 'IsObject','LoadPicture','MsgBox','RGB','Round','ScriptEngine','ScriptEngineBuildVersion','ScriptEngineMajorVersion',
32
+ 'ScriptEngineMinorVersion','SetLocale','TypeName','VarType'
33
+ ]
34
+ }
35
+ ,'OPERATORS' :[
36
+ '+', '-', '/', '*', '=', '<', '>', '!', '&'
37
+ ]
38
+ ,'DELIMITERS' :[
39
+ '(', ')', '[', ']', '{', '}'
40
+ ]
41
+ ,'STYLES' : {
42
+ 'COMMENTS': 'color: #99CC00;'
43
+ ,'QUOTESMARKS': 'color: #333399;'
44
+ ,'KEYWORDS' : {
45
+ 'keywords' : 'color: #3366FF;'
46
+ ,'functions' : 'color: #0000FF;'
47
+ ,'statements' : 'color: #3366FF;'
48
+ }
49
+ ,'OPERATORS' : 'color: #FF0000;'
50
+ ,'DELIMITERS' : 'color: #0000FF;'
51
+
52
+ }
53
+ };
editarea/reg_syntax/xml.js ADDED
@@ -0,0 +1,57 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * last update: 2006-08-24
3
+ */
4
+
5
+ editAreaLoader.load_syntax["xml"] = {
6
+ 'DISPLAY_NAME' : 'XML'
7
+ ,'COMMENT_SINGLE' : {}
8
+ ,'COMMENT_MULTI' : {'<!--' : '-->'}
9
+ ,'QUOTEMARKS' : {1: "'", 2: '"'}
10
+ ,'KEYWORD_CASE_SENSITIVE' : false
11
+ ,'KEYWORDS' : {
12
+ }
13
+ ,'OPERATORS' :[
14
+ ]
15
+ ,'DELIMITERS' :[
16
+ ]
17
+ ,'REGEXPS' : {
18
+ 'xml' : {
19
+ 'search' : '()(<\\?[^>]*?\\?>)()'
20
+ ,'class' : 'xml'
21
+ ,'modifiers' : 'g'
22
+ ,'execute' : 'before' // before or after
23
+ }
24
+ ,'cdatas' : {
25
+ 'search' : '()(<!\\[CDATA\\[.*?\\]\\]>)()'
26
+ ,'class' : 'cdata'
27
+ ,'modifiers' : 'g'
28
+ ,'execute' : 'before' // before or after
29
+ }
30
+ ,'tags' : {
31
+ 'search' : '(<)(/?[a-z][^ \r\n\t>]*)([^>]*>)'
32
+ ,'class' : 'tags'
33
+ ,'modifiers' : 'gi'
34
+ ,'execute' : 'before' // before or after
35
+ }
36
+ ,'attributes' : {
37
+ 'search' : '( |\n|\r|\t)([^ \r\n\t=]+)(=)'
38
+ ,'class' : 'attributes'
39
+ ,'modifiers' : 'g'
40
+ ,'execute' : 'before' // before or after
41
+ }
42
+ }
43
+ ,'STYLES' : {
44
+ 'COMMENTS': 'color: #AAAAAA;'
45
+ ,'QUOTESMARKS': 'color: #6381F8;'
46
+ ,'KEYWORDS' : {
47
+ }
48
+ ,'OPERATORS' : 'color: #E775F0;'
49
+ ,'DELIMITERS' : ''
50
+ ,'REGEXPS' : {
51
+ 'attributes': 'color: #B1AC41;'
52
+ ,'tags': 'color: #E62253;'
53
+ ,'xml': 'color: #8DCFB5;'
54
+ ,'cdata': 'color: #50B020;'
55
+ }
56
+ }
57
+ };
editarea/todo.txt ADDED
@@ -0,0 +1,71 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FOR AUTOCOMPLETION:
2
+ - work with tab editing (each one having it's context)
3
+ - allow $ in prefix
4
+ - allow to call user function for autocompletion
5
+ - correctly display the box with window limits
6
+ - enable "live" detection for new syntax keyword in the file
7
+ - display a long description of the keyword (arround the box)
8
+
9
+ DONE:
10
+ - beeing able to prefix those word by key words (sort of namespace)
11
+ - hide it on click
12
+ - enable it for ctrl+space in the middle of a word
13
+
14
+ /***** To do Needed *****/
15
+
16
+ - Internet explorer: adding a caracter one the longest line as for consequence to make a scrollLeft=0 (in non wrapped mode)
17
+ - Do optimisation for trying to only update the changed line in content_highlight
18
+ - add real IE8 support (fix the tabulation width bug in IE8 that has now always the same width no matter the font-size and font-family in textarea but not in <pre>...)
19
+ - change_callback is called one time at the beginning event if the text has not changed
20
+ - check later init call with safari 3
21
+ - improve callback documentation.
22
+
23
+ /***** To do Optionnal*****/
24
+
25
+ - possibility to switch on/off line numbers (allow to get more space)
26
+ - amelioration of the scroll_to_view function for when there is several lines selected (center a little more the selected text)
27
+ - improve opera 9 compatibility (very hard, need help for workaround) cf "Browser remarks".
28
+ - optimize scroll_to_view for Opera?
29
+ - add word wrap option for opera (bug with rendering mode of pre-wrap
30
+ - possibility to add larger font sizes as options?
31
+
32
+ /*** Bugs ***/
33
+
34
+ - firefox: when using verdana (or other non-monospace fonts) switching the font size after font load has as results to sometimes give different render in textarea and in content_highlight (espacially near 11 and 12pt)
35
+ - opera: (bloc word-wrap on opera) bug with cursor_end ()[] for a wrapped line (has wrong offsetLeft if rendered as multiline)
36
+ - opera: (bloc word-wrap on opera) bug if first wraped character follow a <span> (or similar) on wrapped lines
37
+ - when pressing "reset highlight" in IE the textarea scroll to the top (don't know how to fix this...)
38
+ - (still pending?) when pressing "shift+page down" and then "shift+page up" the top of the selection move where as it should be to the bottom of the selection to move (to fix it: must know in which direction the selection grow in "get_selection_infos")
39
+
40
+
41
+ /*** Problems ***/
42
+
43
+
44
+ /*** Highlight bugs ***/
45
+
46
+ /*** Highlight problems ***/
47
+ - only one language at the same time (no html and php in the same textarea. This should be possible, but there would have no optimization and be very very slow)
48
+
49
+
50
+ /*** Global remarks ***/
51
+ - editarea must be always visible, to hide it use the hide() function
52
+
53
+
54
+ /*** Browser remarks/bugs ***/
55
+
56
+ OPERA:
57
+ - opera bug: pressing the " key is equals to pressing the scrolldown key (with french keyboard at least) (still in opera 9.6?)
58
+ - currently disabled: scrollDown/Up function (due to the " key error) (still in oera 9.6?)
59
+ - opera is very very slow with syntax highlight (regexp) (still in oera 9.6?)
60
+ - opera doesn't manage correctly the width 100% for the iframe
61
+ - it's possible to make scroll the window in fullscreen
62
+
63
+ IE:
64
+ - IE is far slower than firefox in highlight mode due to opacity filter
65
+ - It's seems impossible to get the selection range when wrap mode is "soft" (and it's still very diffcult when wrap mode is on)
66
+ - The syntax highlight mode is broken when text length is too long (~100000, 150000 chars) don't know why...
67
+
68
+ FIREFOX:
69
+ - the scrollHeight value for the textarea never decresease when lines are deleted (don't remember anything about this)
70
+
71
+
highlighter/syntax.php DELETED
@@ -1,87 +0,0 @@
1
- <?php
2
- add_action("plugins_loaded", "smart_syntaxhighlighting_init");
3
- function smart_syntaxhighlighting_init() {
4
- if(get_option('smart_enable_sh')) {
5
- add_action('admin_footer', 'smart_init_syntaxhighlighting');
6
- }
7
- }
8
-
9
- function smart_init_syntaxhighlighting() {
10
- if(basename($_SERVER['SCRIPT_NAME']) == 'plugin-editor.php' || basename($_SERVER['SCRIPT_NAME']) == 'theme-editor.php') {
11
- global $file;
12
- $ext=strstr(basename($file),'.');
13
- if($ext == '.php') {
14
- $ext = 'php';
15
- }
16
- else if($ext == '.css') {
17
- $ext = 'css';
18
- }
19
- else if($ext == '.js') {
20
- $ext = 'javascript';
21
- }
22
- else if($ext == '.html' ||$ext == '.htm') {
23
- $ext = 'html';
24
- }
25
- else {
26
- $ext = '';
27
- } ?>
28
- <script type="text/javascript" src="<?php echo get_bloginfo('url') ?>/wp-content/plugins/wp-insert/codepress/codepress.js"></script>
29
- <script type="text/javascript">
30
- try {
31
- var smart_editor = document.getElementById('newcontent');
32
- smart_editor.form.onsubmit=function() {
33
- var smart_input = document.createElement("input");
34
- smart_input.setAttribute("type","hidden");
35
- smart_input.setAttribute("name","newcontent");
36
- smart_input.setAttribute("value",newcontent.getCode());
37
- smart_editor.form.appendChild(smart_input);
38
- return true;
39
- }
40
- smart_editor.className="codepress <?php echo $ext ?> linenumbers-on autocomplete-off readonly-off";
41
- var smart_options_content = "<table><tr><td colspan='6'><b><a title='WP-Insert by Smart Logix' href='http://www.smartlogix.co.in'>WP-insert</a> : Syntax Highlighter Options</b></td></tr><tr><td>&nbsp;</td></tr><tr><td><input type='checkbox' onclick='newcontent.toggleAutoComplete()' />&nbsp;Turn on Autocomplete</td><td>&nbsp;&nbsp;&nbsp;</td><td><input type='checkbox' onclick='newcontent.toggleLineNumbers()' />&nbsp;Turn off Linenumbers</td><td>&nbsp;&nbsp;&nbsp;</td><td><input type='checkbox' onclick='newcontent.toggleEditor()' />&nbsp;Turn off Syntax Highlighting</td></tr></table>"
42
- var smart_options = document.createElement("div");
43
- smart_options.innerHTML = smart_options_content;
44
- smart_editor.form.appendChild(smart_options);
45
- }
46
- catch (e) { void(0); }
47
- </script>
48
- <?php }
49
- }
50
-
51
- function smart_add_syntaxhighlighting_pages() { ?>
52
- <div class="wrap">
53
- <h2>WP-INSERT : Syntax Highlighting</h2>
54
- <?php show_support_options(); ?>
55
- <form method="post" action="options.php">
56
- <?php wp_nonce_field('update-options'); ?>
57
- <table class="form-table">
58
- <tr valign="top">
59
- <th scope="row"></th>
60
- <td></td>
61
- </tr>
62
- <tr valign="top">
63
- <th scope="row"><input id="smart_enable_sh" name="smart_enable_sh" type="checkbox" value="1"<?php if(get_option('smart_enable_sh')) echo ' checked="checked"'; ?>/> <b>Plugin/Theme Editor</b></th>
64
- <td>( Syntax highlighting in plugin and theme editor )<br/>
65
- Syntax highlighting by codepress</td>
66
- </tr>
67
- <tr><th>Codepress Features</th>
68
- <td>
69
- <ul>
70
- <li>Real-time syntax highlighting</li>
71
- <li>Code snippets - on PHP pages just type "if" and press [tab]</li>
72
- <li>Auto completion - simple type single/double quotes or ( or [ or {</li>
73
- <li>Shortcuts - on PHP pages press [ctrl][shift][space]. Its shortcut to <code>&<b></b>nbsp;</code></li></ul>
74
- </td>
75
- </tr>
76
- </table>
77
- <input type="hidden" name="action" value="update" />
78
- <input type="hidden" name="page_options" value="smart_enable_sh" />
79
- <p class="submit">
80
- <input type="submit" class="button-primary" value="<?php _e('Save Changes') ?>" />
81
- </p>
82
- </form>
83
- <p>
84
- <script type="text/javascript" src="http://www.wp-insert.smartlogix.co.in/wp-content/plugins/wp-adnetwork/wp-adnetwork.php?showad=1"></script>
85
- </p>
86
- </div>
87
- <?php } ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/ads.php CHANGED
@@ -1,24 +1,6 @@
1
  <?php
2
  require_once (dirname(__FILE__) . '/adwidgets.php');
3
  require_once (dirname(__FILE__) . '/inpostads.php');
4
- // action function for above hook
5
- function smart_add_menu() {
6
- add_menu_page('Wp-Insert', 'Wp-Insert', 8, __FILE__);
7
- add_submenu_page(__FILE__, 'wp-insert', 'Manage Ads<br/>(Posts and Sidebars)', 8, __FILE__, 'wp_insert_add_adspage');
8
- add_submenu_page(__FILE__, 'wp-insert', 'Manage Ads<br/>(Template Tags)', 8, 'Manage Ads Advanced', 'wp_insert_add_advanced_spage');
9
- add_submenu_page(__FILE__, 'wp-insert', 'Manage Privacy Policy', 8, 'Manage Privacy Policy', 'wp_insert_privacy_policy_page');
10
- add_submenu_page(__FILE__, 'wp-insert', 'Manage Terms', 8, 'Terms And Conditions', 'wp_insert_terms_conditions_page');
11
- add_submenu_page(__FILE__, 'wp-insert', 'Manage Pages', 8, 'Manage Pages', 'wp_insert_pages_page');
12
- add_submenu_page(__FILE__, 'wp-insert', 'Manage Feeds', 8, 'Manage Feeds', 'smart_add_feedspage');
13
- add_submenu_page(__FILE__, 'wp-insert', 'Tracking Codes', 8, 'Tracking Codes', 'smart_add_analytics');
14
- add_submenu_page(__FILE__, 'wp-insert', 'WYSIWYG Editor', 8, 'WYSIWYG Editor', 'smart_add_wysiwyg_pages');
15
- add_submenu_page(__FILE__, 'wp-insert', 'Syntax Highlighting', 8, 'Syntax Highlighting', 'smart_add_syntaxhighlighting_pages');
16
- //ensure, that the needed javascripts been loaded to allow drag/drop, expand/collapse and hide/show of boxes
17
- wp_enqueue_script('common');
18
- wp_enqueue_script('wp-lists');
19
- wp_enqueue_script('postbox');
20
- //$columns[$screen] = 2;
21
- }
22
 
23
  function wp_insert_add_adspage() {
24
  global $screen_layout_columns;
1
  <?php
2
  require_once (dirname(__FILE__) . '/adwidgets.php');
3
  require_once (dirname(__FILE__) . '/inpostads.php');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4
 
5
  function wp_insert_add_adspage() {
6
  global $screen_layout_columns;
includes/adsadvanced.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
  require_once (dirname(__FILE__) . '/templateads.php');
3
 
4
- function wp_insert_add_advanced_spage() {
5
  global $screen_layout_columns;
6
 
7
  add_meta_box('wp_insert_multiple_ad_network', 'Multiple Ad Networks', 'wp_insert_multiple_ad_network_HTML', 'col_1');
1
  <?php
2
  require_once (dirname(__FILE__) . '/templateads.php');
3
 
4
+ function wp_insert_add_advanced_page() {
5
  global $screen_layout_columns;
6
 
7
  add_meta_box('wp_insert_multiple_ad_network', 'Multiple Ad Networks', 'wp_insert_multiple_ad_network_HTML', 'col_1');
includes/essentials.php CHANGED
@@ -14,8 +14,6 @@ if ( ! defined( 'WP_PLUGIN_URL' ) )
14
  define( 'WP_PLUGIN_URL', WP_CONTENT_URL. '/plugins' );
15
  if ( ! defined( 'WP_PLUGIN_DIR' ) )
16
  define( 'WP_PLUGIN_DIR', WP_CONTENT_DIR . '/plugins' );
17
-
18
- add_action('admin_menu', 'smart_add_menu');
19
 
20
  function screen_layout_columns($columns, $screen) {
21
  $columns[$screen] = 2;
@@ -126,13 +124,16 @@ require_once (dirname(__FILE__) . '/postpicker.php');
126
  </div>
127
  <?php }
128
 
 
129
 
130
  require_once (dirname(__FILE__) . '/widgethook.php');
131
  require_once (dirname(__FILE__) . '/contenthook.php');
132
  require_once (dirname(__FILE__) . '/ads.php');
133
  require_once (dirname(__FILE__) . '/adsadvanced.php');
134
  require_once (dirname(__FILE__) . '/pages.php');
 
135
  require_once (dirname(__FILE__) . '/privacypolicy.php');
136
  require_once (dirname(__FILE__) . '/tandc.php');
137
  require_once (dirname(__FILE__) . '/feeds.php');
 
138
  ?>
14
  define( 'WP_PLUGIN_URL', WP_CONTENT_URL. '/plugins' );
15
  if ( ! defined( 'WP_PLUGIN_DIR' ) )
16
  define( 'WP_PLUGIN_DIR', WP_CONTENT_DIR . '/plugins' );
 
 
17
 
18
  function screen_layout_columns($columns, $screen) {
19
  $columns[$screen] = 2;
124
  </div>
125
  <?php }
126
 
127
+ require_once (dirname(__FILE__) . '/menu.php');
128
 
129
  require_once (dirname(__FILE__) . '/widgethook.php');
130
  require_once (dirname(__FILE__) . '/contenthook.php');
131
  require_once (dirname(__FILE__) . '/ads.php');
132
  require_once (dirname(__FILE__) . '/adsadvanced.php');
133
  require_once (dirname(__FILE__) . '/pages.php');
134
+ require_once (dirname(__FILE__) . '/syntax-highlighter.php');
135
  require_once (dirname(__FILE__) . '/privacypolicy.php');
136
  require_once (dirname(__FILE__) . '/tandc.php');
137
  require_once (dirname(__FILE__) . '/feeds.php');
138
+
139
  ?>
includes/menu.php ADDED
@@ -0,0 +1,66 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ add_action('admin_menu', 'wp_insert_add_menu');
3
+
4
+ function wp_insert_add_menu() {
5
+ $handle = 'wp-insert';
6
+ add_menu_page(__('Wp-Insert','wp-insert'), __('Wp-Insert','wp-insert'), 'manage_options', $handle, 'wp_insert_add_adspage');
7
+
8
+ $subMenuItems = array(
9
+ 'AdsInContent' => array(
10
+ 'Title' => 'Manage Ads<br/>(Posts and Sidebars)',
11
+ 'Handle' => 'wp-insert',
12
+ 'Function' => 'wp_insert_add_adspage'
13
+ ),
14
+ 'AdsTemplate' => array(
15
+ 'Title' => 'Manage Ads<br/>(Template Tags)',
16
+ 'Handle' => 'ads-template-tags',
17
+ 'Function' => 'wp_insert_add_advanced_page'
18
+ ),
19
+ 'PrivacyPolicy' => array(
20
+ 'Title' => 'Manage Privacy Policy',
21
+ 'Handle' => 'manage-privacy-policy',
22
+ 'Function' => 'wp_insert_privacy_policy_page'
23
+ ),
24
+ 'TandC' => array(
25
+ 'Title' => 'Manage T & C',
26
+ 'Handle' => 'manage-terms-and-conditions',
27
+ 'Function' => 'wp_insert_terms_conditions_page'
28
+ ),
29
+ 'Pages' => array(
30
+ 'Title' => 'Manage Pages',
31
+ 'Handle' => 'manage-pages',
32
+ 'Function' => 'wp_insert_pages_page'
33
+ ),
34
+ 'SyntaxHighlighting' => array(
35
+ 'Title' => 'Syntax Highlighting',
36
+ 'Handle' => 'manage-syntax-highlighting',
37
+ 'Function' => 'wp_insert_syntax_highlighter_page'
38
+ ),
39
+ 'Feed' => array(
40
+ 'Title' => 'Manage Feed',
41
+ 'Handle' => 'manage-feed',
42
+ 'Function' => 'smart_add_feedspage'
43
+ ),
44
+ 'TrackingCodes' => array(
45
+ 'Title' => 'Tracking Codes',
46
+ 'Handle' => 'manage-tracking-codes',
47
+ 'Function' => 'smart_add_analytics'
48
+ ),
49
+ 'WYSIWYGEditor' => array(
50
+ 'Title' => 'WYSIWYG Editor',
51
+ 'Handle' => 'manage-wysiwyg-editing',
52
+ 'Function' => 'smart_add_wysiwyg_pages'
53
+ )
54
+ );
55
+
56
+ foreach($subMenuItems as $subMenuItem) {
57
+ add_submenu_page($handle, $subMenuItem['Title'], $subMenuItem['Title'], 'manage_options', $subMenuItem['Handle'], $subMenuItem['Function']);
58
+ }
59
+
60
+ //ensure, that the needed javascripts been loaded to allow drag/drop, expand/collapse and hide/show of boxes
61
+ wp_enqueue_script('common');
62
+ wp_enqueue_script('wp-lists');
63
+ wp_enqueue_script('postbox');
64
+ //$columns[$screen] = 2;
65
+ }
66
+ ?>
includes/privacypolicy.php CHANGED
@@ -22,7 +22,7 @@ function wp_insert_privacy_policy_page() {
22
  $my_post['ID'] = $_GET["assign"];
23
  $my_post['post_content'] = '[Privacy]';
24
  wp_update_post($my_post);
25
- header("Location: ".get_bloginfo('url')."/wp-admin/admin.php?page=Manage Privacy Policy");
26
  }
27
  else if(isset($_GET["create"])) {
28
  $my_post = array();
@@ -32,7 +32,7 @@ function wp_insert_privacy_policy_page() {
32
  $my_post['post_author'] = 1;
33
  $my_post['post_type'] = 'page';
34
  wp_insert_post($my_post);
35
- header("Location: ".get_bloginfo('url')."/wp-admin/admin.php?page=Manage Privacy Policy");
36
  }
37
  else if(isset($_GET["reset"])) {
38
  $Domain = str_replace('', "www.", $_SERVER['HTTP_HOST']);
@@ -46,7 +46,7 @@ function wp_insert_privacy_policy_page() {
46
  <p>If you wish to disable cookies, you may do so through your individual browser options. More detailed information about cookie management with specific web browsers can be found at the browsers\' respective websites.</p>';
47
 
48
  update_option("wp_insert_privacy_policy_content", $PrivacyPolicyText);
49
- header("Location: ".get_bloginfo('url')."/wp-admin/admin.php?page=Manage Privacy Policy");
50
  }
51
  global $screen_layout_columns;
52
 
@@ -54,7 +54,7 @@ function wp_insert_privacy_policy_page() {
54
  add_meta_box('wp_insert_edit_assign_privacy_policy_page', 'Assign Page for Privacy Policy', 'wp_insert_edit_assign_privacy_policy_page_HTML', 'col_1');
55
 
56
  $parameters = 'wp_insert_privacy_policy_content';
57
- wp_insert_settings_page_layout($parameters, 'WP-INSERT : Manage Privacy Policy', 'privacy');
58
  }
59
 
60
  function wp_insert_edit_assign_privacy_policy_page_HTML() { ?>
@@ -67,7 +67,7 @@ $count = 0;
67
  $pages = get_pages('sort_column=menu_order');
68
  foreach($pages as $page) {
69
  if($count < 100) {
70
- echo "<option value='".get_bloginfo('url')."/wp-admin/admin.php?page=Manage Privacy Policy&assign=".$page->ID."'>".$page->post_title."</option>";
71
  }
72
  $count++;
73
  }
@@ -81,7 +81,7 @@ document.getElementById('wp_insert_assign_now_link').href = document.getElementB
81
  </script>
82
  as Privacy Policy page : <a id="wp_insert_assign_now_link" href="#" class="button-secondary">Assign Now</a></p>
83
  <p><b>OR</b></p>
84
- <p>Create Privacy Policy Page Automatically : <a href="<?php echo get_bloginfo('url')."/wp-admin/admin.php?page=Manage Privacy Policy&create=1"; ?>" class="button-secondary">Create Now</a></p>
85
  </div>
86
  <?php }
87
 
@@ -90,7 +90,7 @@ function wp_insert_edit_privacy_policy_HTML() { ?>
90
  <textarea id="wp_insert_privacy_policy_content" name="wp_insert_privacy_policy_content" style="width:100%; height: 400px;">
91
  <?php echo get_option('wp_insert_privacy_policy_content'); ?>
92
  </textarea>
93
- <p><a href="<?php echo get_bloginfo('url')."/wp-admin/admin.php?page=Manage Privacy Policy&reset=1"; ?>" class="button-secondary alignright">Reset</a></p><p><small>This is an automatically generated "Privacy Policy".</small></p>
94
  <script type="text/javascript">
95
  if(document.getElementById('wp_insert_privacy_policy_content')) {
96
  var wp_insert_fckeditor = new FCKeditor('wp_insert_privacy_policy_content') ;
22
  $my_post['ID'] = $_GET["assign"];
23
  $my_post['post_content'] = '[Privacy]';
24
  wp_update_post($my_post);
25
+ header("Location: ".get_bloginfo('url')."/wp-admin/admin.php?page=manage-privacy-policy");
26
  }
27
  else if(isset($_GET["create"])) {
28
  $my_post = array();
32
  $my_post['post_author'] = 1;
33
  $my_post['post_type'] = 'page';
34
  wp_insert_post($my_post);
35
+ header("Location: ".get_bloginfo('url')."/wp-admin/admin.php?page=manage-privacy-policy");
36
  }
37
  else if(isset($_GET["reset"])) {
38
  $Domain = str_replace('', "www.", $_SERVER['HTTP_HOST']);
46
  <p>If you wish to disable cookies, you may do so through your individual browser options. More detailed information about cookie management with specific web browsers can be found at the browsers\' respective websites.</p>';
47
 
48
  update_option("wp_insert_privacy_policy_content", $PrivacyPolicyText);
49
+ header("Location: ".get_bloginfo('url')."/wp-admin/admin.php?page=manage-privacy-policy");
50
  }
51
  global $screen_layout_columns;
52
 
54
  add_meta_box('wp_insert_edit_assign_privacy_policy_page', 'Assign Page for Privacy Policy', 'wp_insert_edit_assign_privacy_policy_page_HTML', 'col_1');
55
 
56
  $parameters = 'wp_insert_privacy_policy_content';
57
+ wp_insert_settings_page_layout($parameters, 'WP-INSERT : manage-privacy-policy', 'privacy');
58
  }
59
 
60
  function wp_insert_edit_assign_privacy_policy_page_HTML() { ?>
67
  $pages = get_pages('sort_column=menu_order');
68
  foreach($pages as $page) {
69
  if($count < 100) {
70
+ echo "<option value='".get_bloginfo('url')."/wp-admin/admin.php?page=manage-privacy-policy&assign=".$page->ID."'>".$page->post_title."</option>";
71
  }
72
  $count++;
73
  }
81
  </script>
82
  as Privacy Policy page : <a id="wp_insert_assign_now_link" href="#" class="button-secondary">Assign Now</a></p>
83
  <p><b>OR</b></p>
84
+ <p>Create Privacy Policy Page Automatically : <a href="<?php echo get_bloginfo('url')."/wp-admin/admin.php?page=manage-privacy-policy&create=1"; ?>" class="button-secondary">Create Now</a></p>
85
  </div>
86
  <?php }
87
 
90
  <textarea id="wp_insert_privacy_policy_content" name="wp_insert_privacy_policy_content" style="width:100%; height: 400px;">
91
  <?php echo get_option('wp_insert_privacy_policy_content'); ?>
92
  </textarea>
93
+ <p><a href="<?php echo get_bloginfo('url')."/wp-admin/admin.php?page=manage-privacy-policy&reset=1"; ?>" class="button-secondary alignright">Reset</a></p><p><small>This is an automatically generated "Privacy Policy".</small></p>
94
  <script type="text/javascript">
95
  if(document.getElementById('wp_insert_privacy_policy_content')) {
96
  var wp_insert_fckeditor = new FCKeditor('wp_insert_privacy_policy_content') ;
includes/syntax-highlighter.php ADDED
@@ -0,0 +1,105 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ function wp_insert_syntax_highlighter_page() {
3
+ global $screen_layout_columns;
4
+ wp_insert_update_page_order();
5
+ add_meta_box('wp_insert_syntax_highlighter_editor', 'Theme & Plugin Editor Syntax Highlighting', 'wp_insert_syntax_highlighter_editor_HTML', 'col_1');
6
+ add_meta_box('wp_insert_syntax_highlighter_posts', 'Syntax Highlighting for Code in Posts & Pages', 'wp_insert_syntax_highlighter_posts_HTML', 'col_1');
7
+
8
+ $parameters = 'wp_insert_sh_editor_enable, wp_insert_sh_posts_enable';
9
+ wp_insert_settings_page_layout($parameters, 'WP-INSERT : Syntax Highlighting', 'syntax');
10
+ }
11
+
12
+ function wp_insert_syntax_highlighter_editor_HTML() { ?>
13
+ <div>
14
+ <?php if(get_option('wp_insert_sh_editor_enable')) { ?><input type="button" id="wp_insert_sh_editor_enable_button" value="Click to Deactivate" class="button" style="font-weight:bold;color:red;" onclick="wpInsertToggleAdWidget('#wp_insert_sh_editor_enable_button', '#wp_insert_sh_enable')"/>
15
+ <?php } else { ?><input type="button" id="wp_insert_sh_editor_enable_button" value="Click to Activate" class="button" style="font-weight:bold;color:#2f9303;" onclick="wpInsertToggleAdWidget('#wp_insert_sh_editor_enable_button', '#wp_insert_sh_editor_enable')"/><?php } ?>
16
+ <input style="display:none;" id="wp_insert_sh_editor_enable" name="wp_insert_sh_editor_enable" type="checkbox" value="1"<?php if(get_option('wp_insert_sh_editor_enable')) echo ' checked="checked"'; ?> />
17
+ <p><small>Syntax Highlighting support using Editarea 0.8.2 by <a target="_blank" href="http://www.cdolivet.com/index.php?page=editArea">Christophe Dolivet</a></small></p>
18
+ </div>
19
+ <?php }
20
+
21
+ function wp_insert_syntax_highlighter_posts_HTML() { ?>
22
+ <div>
23
+ <?php if(get_option('wp_insert_sh_posts_enable')) { ?><input type="button" id="wp_insert_sh_posts_enable_button" value="Click to Deactivate" class="button" style="font-weight:bold;color:red;" onclick="wpInsertToggleAdWidget('#wp_insert_sh_posts_enable_button', '#wp_insert_sh_posts_enable')"/>
24
+ <?php } else { ?><input type="button" id="wp_insert_sh_posts_enable_button" value="Click to Activate" class="button" style="font-weight:bold;color:#2f9303;" onclick="wpInsertToggleAdWidget('#wp_insert_sh_posts_enable_button', '#wp_insert_sh_posts_enable')"/><?php } ?>
25
+ <input style="display:none;" id="wp_insert_sh_posts_enable" name="wp_insert_sh_posts_enable" type="checkbox" value="1"<?php if(get_option('wp_insert_sh_posts_enable')) echo ' checked="checked"'; ?> />
26
+ <p><small>Enclose CODE snippets between [code] and [/code].<br/>Visit <a href="http://wp-insert.smartlogix.co.in/">Wp-Insert Tutorial Site</a> for advanced options.</a></small></p>
27
+ </div>
28
+ <?php }
29
+
30
+ add_action("plugins_loaded", "wp_insert_syntaxhighlighting_init");
31
+ function wp_insert_syntaxhighlighting_init() {
32
+ if(get_option('wp_insert_sh_editor_enable')) {
33
+ add_action('admin_footer', 'wp_insert_editor_syntaxhighlighting');
34
+ }
35
+ if(get_option('wp_insert_sh_posts_enable')) {
36
+ add_action('wp_footer', 'wp_insert_posts_syntaxhighlighting');
37
+ add_shortcode('code', 'wp_insert_posts_shortcode');
38
+ }
39
+ }
40
+ function wp_insert_editor_syntaxhighlighting() {
41
+ if(basename($_SERVER['SCRIPT_NAME']) == 'plugin-editor.php' || basename($_SERVER['SCRIPT_NAME']) == 'theme-editor.php') {
42
+ global $file;
43
+ $ext=strstr(basename($file),'.');
44
+ if($ext == '.php') {
45
+ $ext = 'php';
46
+ } else if($ext == '.css') {
47
+ $ext = 'css';
48
+ } else if($ext == '.js') {
49
+ $ext = 'javascript';
50
+ } else if($ext == '.html' ||$ext == '.htm') {
51
+ $ext = 'html';
52
+ } else {
53
+ $ext = '';
54
+ } ?>
55
+ <script type="text/javascript" src="<?php echo WP_PLUGIN_URL; ?>/wp-insert/editarea/edit_area_full.js"></script>
56
+ <script type="text/javascript">
57
+ try {
58
+ editAreaLoader.init({
59
+ id: "newcontent"
60
+ ,start_highlight: true
61
+ ,allow_resize: "y"
62
+ ,allow_toggle: true
63
+ ,toolbar: "search, go_to_line, |, undo, redo, |, select_font, |, syntax_selection, |, change_smooth_selection, highlight, reset_highlight, |, word_wrap, help"
64
+ ,syntax_selection_allow: "css,html,js,php,xml"
65
+ ,word_wrap: true
66
+ ,syntax: "<?php echo $ext; ?>"
67
+ });
68
+ }
69
+ catch (e) { void(0); }
70
+ </script>
71
+ <?php
72
+ }
73
+ }
74
+
75
+ function wp_insert_posts_syntaxhighlighting() { ?>
76
+ <script type="text/javascript" src="<?php echo WP_PLUGIN_URL; ?>/wp-insert/editarea/edit_area_full.js"></script>
77
+ <script type="text/javascript">
78
+ try {
79
+ var codeBlocks = document.getElementsByName("codeSnippet");
80
+ for(var i = 0; i < codeBlocks.length; i++) {
81
+ editAreaLoader.init({
82
+ id: codeBlocks[i].id
83
+ ,start_highlight: true
84
+ ,allow_resize: "y"
85
+ ,allow_toggle: false
86
+ ,toolbar: "go_to_line, |, select_font, |, syntax_selection, |, highlight, reset_highlight, |, word_wrap"
87
+ ,is_editable: true
88
+ ,word_wrap: true
89
+ ,syntax: codeBlocks[i].title
90
+ });
91
+ }
92
+ }
93
+ catch (e) { void(0); }
94
+ </script>
95
+ <?php }
96
+ function wp_insert_posts_shortcode($atts, $content = null, $code = "" ) {
97
+ $attributes = shortcode_atts(array('language' => 'php', 'custom' => ''), $atts);
98
+ if($attributes['custom'] != '') {
99
+ global $post;
100
+ return '<textarea title="'.$attributes['language'].'" class="codeSnippet" name="codeSnippet" id="codeSnippet_'.rand(0,999999).'_'.rand(0,999999).'">'.get_post_meta($post->ID, $attributes['custom'], true).'</textarea>';
101
+ } else {
102
+ return '<textarea title="'.$attributes['language'].'" class="codeSnippet" name="codeSnippet" id="codeSnippet_'.rand(0,999999).'_'.rand(0,999999).'">'.$content.'</textarea>';
103
+ }
104
+ }
105
+ ?>
includes/tandc.php CHANGED
@@ -26,7 +26,7 @@ function wp_insert_terms_conditions_page() {
26
  $my_post['ID'] = $_GET["assign"];
27
  $my_post['post_content'] = '[Terms]';
28
  wp_update_post($my_post);
29
- header("Location: ".get_bloginfo('url')."/wp-admin/admin.php?page=Terms And Conditions");
30
  }
31
  else if(isset($_GET["create"])) {
32
  $my_post = array();
@@ -36,7 +36,7 @@ function wp_insert_terms_conditions_page() {
36
  $my_post['post_author'] = 1;
37
  $my_post['post_type'] = 'page';
38
  wp_insert_post($my_post);
39
- header("Location: ".get_bloginfo('url')."/wp-admin/admin.php?page=Terms And Conditions");
40
  }
41
  else if(isset($_GET["reset"])) {
42
  $Domain = str_replace('', "www.", $_SERVER['HTTP_HOST']);
@@ -54,15 +54,15 @@ The use of this website is subject to the following terms of use:
54
  <li>You may not create a link to this website from another website or document without '.$Domain.'\'s prior written consent.</li></ul></p>';
55
 
56
  update_option("wp_insert_terms_conditions_content", $TermsandConditionsText);
57
- header("Location: ".get_bloginfo('url')."/wp-admin/admin.php?page=Terms And Conditions");
58
  }
59
  global $screen_layout_columns;
60
 
61
  add_meta_box('wp_insert_edit_terms_conditions', 'Finetune your Terms and Conditions', 'wp_insert_edit_terms_conditions_HTML', 'col_1');
62
- add_meta_box('wp_insert_edit_assign_terms_conditions_page', 'Assign Page for Terms And Conditions', 'wp_insert_edit_assign_terms_conditions_page_HTML', 'col_1');
63
 
64
  $parameters = 'wp_insert_terms_conditions_content';
65
- wp_insert_settings_page_layout($parameters, 'WP-INSERT : Terms And Conditions', 'terms');
66
  }
67
 
68
  function wp_insert_edit_assign_terms_conditions_page_HTML() { ?>
@@ -75,7 +75,7 @@ $count = 0;
75
  $pages = get_pages('sort_column=menu_order');
76
  foreach($pages as $page) {
77
  if($count < 100) {
78
- echo "<option value='".get_bloginfo('url')."/wp-admin/admin.php?page=Terms And Conditions&assign=".$page->ID."'>".$page->post_title."</option>";
79
  }
80
  $count++;
81
  }
@@ -89,7 +89,7 @@ document.getElementById('wp_insert_assign_now_link').href = document.getElementB
89
  </script>
90
  as Terms and Conditions page : <a id="wp_insert_assign_now_link" href="#" class="button-secondary">Assign Now</a></p>
91
  <p><b>OR</b></p>
92
- <p>Create Terms and Conditions Page Automatically : <a href="<?php echo get_bloginfo('url')."/wp-admin/admin.php?page=Terms And Conditions&create=1"; ?>" class="button-secondary">Create Now</a></p>
93
  </div>
94
  <?php }
95
 
@@ -98,7 +98,7 @@ function wp_insert_edit_terms_conditions_HTML() { ?>
98
  <textarea id="wp_insert_terms_conditions_content" name="wp_insert_terms_conditions_content" style="width:100%; height: 400px;">
99
  <?php echo get_option('wp_insert_terms_conditions_content'); ?>
100
  </textarea>
101
- <p><a href="<?php echo get_bloginfo('url')."/wp-admin/admin.php?page=Terms And Conditions&reset=1"; ?>" class="button-secondary alignright">Reset</a></p><p><small>This is an automatically generated "Terms and Conditions".</small></p>
102
  <script type="text/javascript">
103
  if(document.getElementById('wp_insert_terms_conditions_content')) {
104
  var wp_insert_fckeditor = new FCKeditor('wp_insert_terms_conditions_content') ;
26
  $my_post['ID'] = $_GET["assign"];
27
  $my_post['post_content'] = '[Terms]';
28
  wp_update_post($my_post);
29
+ header("Location: ".get_bloginfo('url')."/wp-admin/admin.php?page=manage-terms-and-conditions");
30
  }
31
  else if(isset($_GET["create"])) {
32
  $my_post = array();
36
  $my_post['post_author'] = 1;
37
  $my_post['post_type'] = 'page';
38
  wp_insert_post($my_post);
39
+ header("Location: ".get_bloginfo('url')."/wp-admin/admin.php?page=manage-terms-and-conditions");
40
  }
41
  else if(isset($_GET["reset"])) {
42
  $Domain = str_replace('', "www.", $_SERVER['HTTP_HOST']);
54
  <li>You may not create a link to this website from another website or document without '.$Domain.'\'s prior written consent.</li></ul></p>';
55
 
56
  update_option("wp_insert_terms_conditions_content", $TermsandConditionsText);
57
+ header("Location: ".get_bloginfo('url')."/wp-admin/admin.php?page=manage-terms-and-conditions");
58
  }
59
  global $screen_layout_columns;
60
 
61
  add_meta_box('wp_insert_edit_terms_conditions', 'Finetune your Terms and Conditions', 'wp_insert_edit_terms_conditions_HTML', 'col_1');
62
+ add_meta_box('wp_insert_edit_assign_terms_conditions_page', 'Assign Page for manage-terms-and-conditions', 'wp_insert_edit_assign_terms_conditions_page_HTML', 'col_1');
63
 
64
  $parameters = 'wp_insert_terms_conditions_content';
65
+ wp_insert_settings_page_layout($parameters, 'WP-INSERT : manage-terms-and-conditions', 'terms');
66
  }
67
 
68
  function wp_insert_edit_assign_terms_conditions_page_HTML() { ?>
75
  $pages = get_pages('sort_column=menu_order');
76
  foreach($pages as $page) {
77
  if($count < 100) {
78
+ echo "<option value='".get_bloginfo('url')."/wp-admin/admin.php?page=manage-terms-and-conditions&assign=".$page->ID."'>".$page->post_title."</option>";
79
  }
80
  $count++;
81
  }
89
  </script>
90
  as Terms and Conditions page : <a id="wp_insert_assign_now_link" href="#" class="button-secondary">Assign Now</a></p>
91
  <p><b>OR</b></p>
92
+ <p>Create Terms and Conditions Page Automatically : <a href="<?php echo get_bloginfo('url')."/wp-admin/admin.php?page=manage-terms-and-conditions&create=1"; ?>" class="button-secondary">Create Now</a></p>
93
  </div>
94
  <?php }
95
 
98
  <textarea id="wp_insert_terms_conditions_content" name="wp_insert_terms_conditions_content" style="width:100%; height: 400px;">
99
  <?php echo get_option('wp_insert_terms_conditions_content'); ?>
100
  </textarea>
101
+ <p><a href="<?php echo get_bloginfo('url')."/wp-admin/admin.php?page=manage-terms-and-conditions&reset=1"; ?>" class="button-secondary alignright">Reset</a></p><p><small>This is an automatically generated "Terms and Conditions".</small></p>
102
  <script type="text/javascript">
103
  if(document.getElementById('wp_insert_terms_conditions_content')) {
104
  var wp_insert_fckeditor = new FCKeditor('wp_insert_terms_conditions_content') ;
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: Namith Jawahar
3
  Donate link:http://www.wp-insert.smartlogix.co.in/
4
  Tags: adsense,google,widget,post,admin,plugin,rss,feedburner,ads,subscribe,fck editor,category description editor,excerpt,WYSIWYG,WYSIWYG editor,in post ads,feed logo,smartlogix,ads in feeds,analytics,google analytics,header,footer,ad management,advertisements,content,ad,advertising,privacy policy,privacy,policy,automatic privacy policy,blog,feed,feeds,formatting,html,javascript,manage,post,posts,seo,sidebar,widget,widgets,wordpress,tracking,syntex highlighter,highlighting,theme tools,plugin tools,developer tools,highlighting,theme editor,plugin editor,middle ad,ad filtration,pagewise ad filtration,template ads,ad tags,adbrite ads,adsense ready,easy adsense,adsense optimized,terms and conditions,terms,conditions,automatic terms and conditions
5
  Requires at least: 2.7
6
- Tested up to: 2.9.2
7
- Stable tag: 1.6.2
8
 
9
  Wp-Insert is the most powerful yet easiest to use wordpress ad management plugin which does a lot more than ad management.
10
 
@@ -88,6 +88,8 @@ Manage Ads (Completely Rewritten with a New and Powerful Interface)
88
  * Syntax HighLighting for theme editor
89
  * Syntax Highlighting for plugin editor
90
  * Different highlighting for different file types
 
 
91
 
92
  All these features in an easy to use and novice user friendly interface which can still cater to the geekiest of webmasters.
93
 
3
  Donate link:http://www.wp-insert.smartlogix.co.in/
4
  Tags: adsense,google,widget,post,admin,plugin,rss,feedburner,ads,subscribe,fck editor,category description editor,excerpt,WYSIWYG,WYSIWYG editor,in post ads,feed logo,smartlogix,ads in feeds,analytics,google analytics,header,footer,ad management,advertisements,content,ad,advertising,privacy policy,privacy,policy,automatic privacy policy,blog,feed,feeds,formatting,html,javascript,manage,post,posts,seo,sidebar,widget,widgets,wordpress,tracking,syntex highlighter,highlighting,theme tools,plugin tools,developer tools,highlighting,theme editor,plugin editor,middle ad,ad filtration,pagewise ad filtration,template ads,ad tags,adbrite ads,adsense ready,easy adsense,adsense optimized,terms and conditions,terms,conditions,automatic terms and conditions
5
  Requires at least: 2.7
6
+ Tested up to: 3.0 RC
7
+ Stable tag: 1.7
8
 
9
  Wp-Insert is the most powerful yet easiest to use wordpress ad management plugin which does a lot more than ad management.
10
 
88
  * Syntax HighLighting for theme editor
89
  * Syntax Highlighting for plugin editor
90
  * Different highlighting for different file types
91
+ * Syntax Highlighting for Code snippets in posts and pages
92
+ * Syntax Highlighting for Code in post and pages using shortcodes and custom fields.
93
 
94
  All these features in an easy to use and novice user friendly interface which can still cater to the geekiest of webmasters.
95
 
screenshot-6.png CHANGED
Binary file
wp-insert.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: wp-insert
4
  Plugin URI: http://www.wp-insert.smartlogix.co.in/
5
  Description: The ultimate wordpress plugin
6
- Version: 1.6.2
7
  Author: Namith Jawahar
8
  Author URI: http://www.smartlogix.co.in/
9
  WP-INSERT by SMARTLOGIX : The ultimate wordpress plugin
@@ -31,5 +31,4 @@ require_once (dirname(__FILE__) . '/support/support.php');
31
  require_once (dirname(__FILE__) . '/feeds/insert-feeds.php');
32
  require_once (dirname(__FILE__) . '/tracking/insert-analytics.php');
33
  require_once (dirname(__FILE__) . '/wysiwyg/insert-wysiwyg.php');
34
- require_once (dirname(__FILE__) . '/highlighter/syntax.php');
35
  ?>
3
  Plugin Name: wp-insert
4
  Plugin URI: http://www.wp-insert.smartlogix.co.in/
5
  Description: The ultimate wordpress plugin
6
+ Version: 1.7
7
  Author: Namith Jawahar
8
  Author URI: http://www.smartlogix.co.in/
9
  WP-INSERT by SMARTLOGIX : The ultimate wordpress plugin
31
  require_once (dirname(__FILE__) . '/feeds/insert-feeds.php');
32
  require_once (dirname(__FILE__) . '/tracking/insert-analytics.php');
33
  require_once (dirname(__FILE__) . '/wysiwyg/insert-wysiwyg.php');
 
34
  ?>