aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/LocalFilesEditor/editarea/reg_syntax/js.js
diff options
context:
space:
mode:
authorpatdenice <patdenice@piwigo.org>2008-03-25 23:30:23 +0000
committerpatdenice <patdenice@piwigo.org>2008-03-25 23:30:23 +0000
commit6aa72e141a0b651f35e6d4dc08777d715aed2e71 (patch)
tree87d7ac32a669d0708a7ed8108d939474df3df5e2 /plugins/LocalFilesEditor/editarea/reg_syntax/js.js
parentee70a108bea04c718b7a6edb97aec56f2dae2679 (diff)
Add editarea to LocalFiles Editor.
git-svn-id: http://piwigo.org/svn/trunk@2291 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'plugins/LocalFilesEditor/editarea/reg_syntax/js.js')
-rw-r--r--plugins/LocalFilesEditor/editarea/reg_syntax/js.js60
1 files changed, 60 insertions, 0 deletions
diff --git a/plugins/LocalFilesEditor/editarea/reg_syntax/js.js b/plugins/LocalFilesEditor/editarea/reg_syntax/js.js
new file mode 100644
index 000000000..8c7beb624
--- /dev/null
+++ b/plugins/LocalFilesEditor/editarea/reg_syntax/js.js
@@ -0,0 +1,60 @@
+editAreaLoader.load_syntax["js"] = {
+ 'COMMENT_SINGLE' : {1 : '//'}
+ ,'COMMENT_MULTI' : {'/*' : '*/'}
+ ,'QUOTEMARKS' : {1: "'", 2: '"'}
+ ,'KEYWORD_CASE_SENSITIVE' : false
+ ,'KEYWORDS' : {
+ 'statements' : [
+ 'as', 'break', 'case', 'catch', 'continue', 'decodeURI', 'delete', 'do',
+ 'else', 'encodeURI', 'eval', 'finally', 'for', 'if', 'in', 'is', 'item',
+ 'instanceof', 'return', 'switch', 'this', 'throw', 'try', 'typeof', 'void',
+ 'while', 'write', 'with'
+ ]
+ ,'keywords' : [
+ 'class', 'const', 'default', 'debugger', 'export', 'extends', 'false',
+ 'function', 'import', 'namespace', 'new', 'null', 'package', 'private',
+ 'protected', 'public', 'super', 'true', 'use', 'var', 'window', 'document',
+ // the list below must be sorted and checked (if it is a keywords or a function and if it is not present twice
+ 'Link ', 'outerHeight ', 'Anchor', 'FileUpload',
+ 'location', 'outerWidth', 'Select', 'Area', 'find', 'Location', 'Packages', 'self',
+ 'arguments', 'locationbar', 'pageXoffset', 'Form',
+ 'Math', 'pageYoffset', 'setTimeout', 'assign', 'Frame', 'menubar', 'parent', 'status',
+ 'blur', 'frames', 'MimeType', 'parseFloat', 'statusbar', 'Boolean', 'Function', 'moveBy',
+ 'parseInt', 'stop', 'Button', 'getClass', 'moveTo', 'Password', 'String', 'callee', 'Hidden',
+ 'name', 'personalbar', 'Submit', 'caller', 'history', 'NaN', 'Plugin', 'sun', 'captureEvents',
+ 'History', 'navigate', 'print', 'taint', 'Checkbox', 'home', 'navigator', 'prompt', 'Text',
+ 'Image', 'Navigator', 'prototype', 'Textarea', 'clearTimeout', 'Infinity',
+ 'netscape', 'Radio', 'toolbar', 'close', 'innerHeight', 'Number', 'ref', 'top', 'closed',
+ 'innerWidth', 'Object', 'RegExp', 'toString', 'confirm', 'isFinite', 'onBlur', 'releaseEvents',
+ 'unescape', 'constructor', 'isNan', 'onError', 'Reset', 'untaint', 'Date', 'java', 'onFocus',
+ 'resizeBy', 'unwatch', 'defaultStatus', 'JavaArray', 'onLoad', 'resizeTo', 'valueOf', 'document',
+ 'JavaClass', 'onUnload', 'routeEvent', 'watch', 'Document', 'JavaObject', 'open', 'scroll', 'window',
+ 'Element', 'JavaPackage', 'opener', 'scrollbars', 'Window', 'escape', 'length', 'Option', 'scrollBy'
+ ]
+ ,'functions' : [
+ // common functions for Window object
+ 'alert', 'Array', 'back', 'blur', 'clearInterval', 'close', 'confirm', 'eval ', 'focus', 'forward', 'home',
+ 'name', 'navigate', 'onblur', 'onerror', 'onfocus', 'onload', 'onmove',
+ 'onresize', 'onunload', 'open', 'print', 'prompt', 'scroll', 'scrollTo', 'setInterval', 'status',
+ 'stop'
+ ]
+ }
+ ,'OPERATORS' :[
+ '+', '-', '/', '*', '=', '<', '>', '%', '!'
+ ]
+ ,'DELIMITERS' :[
+ '(', ')', '[', ']', '{', '}'
+ ]
+ ,'STYLES' : {
+ 'COMMENTS': 'color: #AAAAAA;'
+ ,'QUOTESMARKS': 'color: #6381F8;'
+ ,'KEYWORDS' : {
+ 'statements' : 'color: #60CA00;'
+ ,'keywords' : 'color: #48BDDF;'
+ ,'functions' : 'color: #2B60FF;'
+ }
+ ,'OPERATORS' : 'color: #FF00FF;'
+ ,'DELIMITERS' : 'color: #0038E1;'
+
+ }
+};