Minor changes

This commit is contained in:
LE Xuan Sang 2015-10-22 13:07:52 +02:00
parent 6f44fa9b58
commit cda7b31b4a
92 changed files with 492 additions and 728 deletions

View File

@ -5,7 +5,7 @@ EXT=dylib
SERVER=plugin_manager.o ini.o http_server.o plugins/dictionary.o plugins/utils.o
SERVERLIB=-lpthread -ldl
#-lsocket
PLUGINS= dummy.$(EXT)
PLUGINS= dummy.$(EXT) fileman.$(EXT) pluginsman.$(EXT)
PLUGINSDEP = plugins/plugin.o plugins/dbhelper.o plugins/dictionary.o plugins/utils.o plugins/list.o
PLUGINLIBS = -lsqlite3

View File

@ -1,7 +1,7 @@
[SERVER]
port=9191 ; port
plugins=/Users/mrsang/Google Drive/ushare/cwp/AFP51-LittleST/build/plugins/ ; plugins dir
plugins=/Users/mrsang/Google Drive/ushare/cwp/ant-http/build/plugins/ ; plugins dir
plugins_ext=.dylib ; plugins extensions
database=/Users/mrsang/Google Drive/ushare/cwp/AFP51-LittleST/build/databases/
htdocs=/Users/mrsang/Google Drive/ushare/cwp/AFP51-LittleST/build/htdocs
tmpdir=/Users/mrsang/Google Drive/ushare/cwp/AFP51-LittleST/build/tmp/
database=/Users/mrsang/Google Drive/ushare/cwp/ant-http/build/databases/
htdocs=/Users/mrsang/Google Drive/ushare/cwp/ant-http/build/htdocs
tmpdir=/Users/mrsang/Google Drive/ushare/cwp/ant-http/build/tmp/

BIN
build/htdocs/.DS_Store vendored

Binary file not shown.

0
build/htdocs/images/.DS_Store vendored Executable file → Normal file
View File

BIN
build/htdocs/images/ex.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.8 KiB

16
build/htdocs/index.html Executable file → Normal file
View File

@ -1,20 +1,18 @@
<HTML>
<head>
<link rel="stylesheet" type="text/css" href="style/font.min.css"/>
<link rel="stylesheet" type="text/css" href="style/top_header.css"/>
<link rel="stylesheet" type="text/css" href="style/font.min.css"/>
<link rel="stylesheet" type="text/css" href="style/w2ui-1.4.2.css" />
<script src="scripts/jquery.min.js"></script>
<script src="scripts/w2ui-1.4.2.js"></script>
<script src="scripts/classesbr.js"></script>
<script src="scripts/methodsbr.js"></script>
<script src="scripts/ivbr.js"></script>
<script src="scripts/playground.js"></script>
<script src="scripts/imgbrowser.js"></script>
<script src="scripts/ace/ace.js"></script>
<script src="scripts/ace/ext-language_tools.js"></script>
<script src="scripts/pluginman.js"></script>
<script src="scripts/fileman.js"></script>
<script src="scripts/camviewer.js"></script>
<script src="scripts/sidebar.js"></script>
<script src="scripts/rcar.js"></script>
</head>
<TITLE>Index</TITLE>
<BODY>
<div id="layout" style="width: 100%; height: 100%;"></div>
</BODY>
</HTML>

0
build/htdocs/jquery.min.js vendored Executable file → Normal file
View File

BIN
build/htdocs/scripts/.DS_Store vendored Executable file → Normal file

Binary file not shown.

BIN
build/htdocs/scripts/ace/.DS_Store vendored Executable file → Normal file

Binary file not shown.

View File

@ -0,0 +1 @@
ace.define("ace/mode/ada_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e="abort|else|new|return|abs|elsif|not|reverse|abstract|end|null|accept|entry|select|access|exception|of|separate|aliased|exit|or|some|all|others|subtype|and|for|out|synchronized|array|function|overriding|at|tagged|generic|package|task|begin|goto|pragma|terminate|body|private|then|if|procedure|type|case|in|protected|constant|interface|until||is|raise|use|declare|range|delay|limited|record|when|delta|loop|rem|while|digits|renames|with|do|mod|requeue|xor",t="true|false|null",n="count|min|max|avg|sum|rank|now|coalesce|main",r=this.createKeywordMapper({"support.function":n,keyword:e,"constant.language":t},"identifier",!0);this.$rules={start:[{token:"comment",regex:"--.*$"},{token:"string",regex:'".*?"'},{token:"string",regex:"'.*?'"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:r,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"\\+|\\-|\\/|\\/\\/|%|<@>|@>|<@|&|\\^|~|<|>|<=|=>|==|!=|<>|="},{token:"paren.lparen",regex:"[\\(]"},{token:"paren.rparen",regex:"[\\)]"},{token:"text",regex:"\\s+"}]}};r.inherits(s,i),t.AdaHighlightRules=s}),ace.define("ace/mode/ada",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/ada_highlight_rules","ace/range"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./ada_highlight_rules").AdaHighlightRules,o=e("../range").Range,u=function(){this.HighlightRules=s};r.inherits(u,i),function(){this.lineCommentStart="--",this.$id="ace/mode/ada"}.call(u.prototype),t.Mode=u})

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
ace.define("ace/mode/batchfile_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:"keyword.command.dosbatch",regex:"\\b(?:append|assoc|at|attrib|break|cacls|cd|chcp|chdir|chkdsk|chkntfs|cls|cmd|color|comp|compact|convert|copy|date|del|dir|diskcomp|diskcopy|doskey|echo|endlocal|erase|fc|find|findstr|format|ftype|graftabl|help|keyb|label|md|mkdir|mode|more|move|path|pause|popd|print|prompt|pushd|rd|recover|ren|rename|replace|restore|rmdir|set|setlocal|shift|sort|start|subst|time|title|tree|type|ver|verify|vol|xcopy)\\b",caseInsensitive:!0},{token:"keyword.control.statement.dosbatch",regex:"\\b(?:goto|call|exit)\\b",caseInsensitive:!0},{token:"keyword.control.conditional.if.dosbatch",regex:"\\bif\\s+not\\s+(?:exist|defined|errorlevel|cmdextversion)\\b",caseInsensitive:!0},{token:"keyword.control.conditional.dosbatch",regex:"\\b(?:if|else)\\b",caseInsensitive:!0},{token:"keyword.control.repeat.dosbatch",regex:"\\bfor\\b",caseInsensitive:!0},{token:"keyword.operator.dosbatch",regex:"\\b(?:EQU|NEQ|LSS|LEQ|GTR|GEQ)\\b"},{token:["doc.comment","comment"],regex:"(?:^|\\b)(rem)($|\\s.*$)",caseInsensitive:!0},{token:"comment.line.colons.dosbatch",regex:"::.*$"},{include:"variable"},{token:"punctuation.definition.string.begin.shell",regex:'"',push:[{token:"punctuation.definition.string.end.shell",regex:'"',next:"pop"},{include:"variable"},{defaultToken:"string.quoted.double.dosbatch"}]},{token:"keyword.operator.pipe.dosbatch",regex:"[|]"},{token:"keyword.operator.redirect.shell",regex:"&>|\\d*>&\\d*|\\d*(?:>>|>|<)|\\d*<&|\\d*<>"}],variable:[{token:"constant.numeric",regex:"%%\\w+|%[*\\d]|%\\w+%"},{token:"constant.numeric",regex:"%~\\d+"},{token:["markup.list","constant.other","markup.list"],regex:"(%)(\\w+)(%?)"}]},this.normalizeRules()};s.metaData={name:"Batch File",scopeName:"source.dosbatch",fileTypes:["bat"]},r.inherits(s,i),t.BatchFileHighlightRules=s}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++t<a){n=e.getLine(t);var f=n.search(/\S/);if(f===-1)continue;if(r>f)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++n<s){t=e.getLine(n);var f=u.exec(t);if(!f)continue;f[1]?a--:a++;if(!a)break}var l=n;if(l>o)return new i(o,r,l,t.length)}}.call(o.prototype)}),ace.define("ace/mode/batchfile",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/batchfile_highlight_rules","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./batchfile_highlight_rules").BatchFileHighlightRules,o=e("./folding/cstyle").FoldMode,u=function(){this.HighlightRules=s,this.foldingRules=new o};r.inherits(u,i),function(){this.lineCommentStart="::",this.blockComment="",this.$id="ace/mode/batchfile"}.call(u.prototype),t.Mode=u})

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
ace.define("ace/mode/diff_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{regex:"^(?:\\*{15}|={67}|-{3}|\\+{3})$",token:"punctuation.definition.separator.diff",name:"keyword"},{regex:"^(@@)(\\s*.+?\\s*)(@@)(.*)$",token:["constant","constant.numeric","constant","comment.doc.tag"]},{regex:"^(\\d+)([,\\d]+)(a|d|c)(\\d+)([,\\d]+)(.*)$",token:["constant.numeric","punctuation.definition.range.diff","constant.function","constant.numeric","punctuation.definition.range.diff","invalid"],name:"meta."},{regex:"^(\\-{3}|\\+{3}|\\*{3})( .+)$",token:["constant.numeric","meta.tag"]},{regex:"^([!+>])(.*?)(\\s*)$",token:["support.constant","text","invalid"]},{regex:"^([<\\-])(.*?)(\\s*)$",token:["support.function","string","invalid"]},{regex:"^(diff)(\\s+--\\w+)?(.+?)( .+)?$",token:["variable","variable","keyword","variable"]},{regex:"^Index.+$",token:"variable"},{regex:"^\\s+$",token:"text"},{regex:"\\s*$",token:"invalid"},{defaultToken:"invisible",caseInsensitive:!0}]}};r.inherits(s,i),t.DiffHighlightRules=s}),ace.define("ace/mode/folding/diff",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=e("../../range").Range,o=t.FoldMode=function(e,t){this.regExpList=e,this.flag=t,this.foldingStartMarker=RegExp("^("+e.join("|")+")",this.flag)};r.inherits(o,i),function(){this.getFoldWidgetRange=function(e,t,n){var r=e.getLine(n),i={row:n,column:r.length},o=this.regExpList;for(var u=1;u<=o.length;u++){var a=RegExp("^("+o.slice(0,u).join("|")+")",this.flag);if(a.test(r))break}for(var f=e.getLength();++n<f;){r=e.getLine(n);if(a.test(r))break}if(n==i.row+1)return;return s.fromPoints(i,{row:n-1,column:r.length})}}.call(o.prototype)}),ace.define("ace/mode/diff",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/diff_highlight_rules","ace/mode/folding/diff"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./diff_highlight_rules").DiffHighlightRules,o=e("./folding/diff").FoldMode,u=function(){this.HighlightRules=s,this.foldingRules=new o(["diff","index","\\+{3}","@@|\\*{5}"],"i")};r.inherits(u,i),function(){this.$id="ace/mode/diff"}.call(u.prototype),t.Mode=u})

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
ace.define("ace/mode/ini_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s="\\\\(?:[\\\\0abtrn;#=:]|x[a-fA-F\\d]{4})",o=function(){this.$rules={start:[{token:"punctuation.definition.comment.ini",regex:"#.*",push_:[{token:"comment.line.number-sign.ini",regex:"$|^",next:"pop"},{defaultToken:"comment.line.number-sign.ini"}]},{token:"punctuation.definition.comment.ini",regex:";.*",push_:[{token:"comment.line.semicolon.ini",regex:"$|^",next:"pop"},{defaultToken:"comment.line.semicolon.ini"}]},{token:["keyword.other.definition.ini","text","punctuation.separator.key-value.ini"],regex:"\\b([a-zA-Z0-9_.-]+)\\b(\\s*)(=)"},{token:["punctuation.definition.entity.ini","constant.section.group-title.ini","punctuation.definition.entity.ini"],regex:"^(\\[)(.*?)(\\])"},{token:"punctuation.definition.string.begin.ini",regex:"'",push:[{token:"punctuation.definition.string.end.ini",regex:"'",next:"pop"},{token:"constant.language.escape",regex:s},{defaultToken:"string.quoted.single.ini"}]},{token:"punctuation.definition.string.begin.ini",regex:'"',push:[{token:"constant.language.escape",regex:s},{token:"punctuation.definition.string.end.ini",regex:'"',next:"pop"},{defaultToken:"string.quoted.double.ini"}]}]},this.normalizeRules()};o.metaData={fileTypes:["ini","conf"],keyEquivalent:"^~I",name:"Ini",scopeName:"source.ini"},r.inherits(o,i),t.IniHighlightRules=o}),ace.define("ace/mode/folding/ini",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(){};r.inherits(o,s),function(){this.foldingStartMarker=/^\s*\[([^\])]*)]\s*(?:$|[;#])/,this.getFoldWidgetRange=function(e,t,n){var r=this.foldingStartMarker,s=e.getLine(n),o=s.match(r);if(!o)return;var u=o[1]+".",a=s.length,f=e.getLength(),l=n,c=n;while(++n<f){s=e.getLine(n);if(/^\s*$/.test(s))continue;o=s.match(r);if(o&&o[1].lastIndexOf(u,0)!==0)break;c=n}if(c>l){var h=e.getLine(c).length;return new i(l,a,c,h)}}}.call(o.prototype)}),ace.define("ace/mode/ini",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/ini_highlight_rules","ace/mode/folding/ini"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./ini_highlight_rules").IniHighlightRules,o=e("./folding/ini").FoldMode,u=function(){this.HighlightRules=s,this.foldingRules=new o};r.inherits(u,i),function(){this.lineCommentStart=";",this.blockComment={start:"/*",end:"*/"},this.$id="ace/mode/ini"}.call(u.prototype),t.Mode=u})

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
ace.define("ace/mode/latex_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:"comment",regex:"%.*$"},{token:["keyword","lparen","variable.parameter","rparen","lparen","storage.type","rparen"],regex:"(\\\\(?:documentclass|usepackage|input))(?:(\\[)([^\\]]*)(\\]))?({)([^}]*)(})"},{token:["keyword","lparen","variable.parameter","rparen"],regex:"(\\\\(?:label|v?ref|cite(?:[^{]*)))(?:({)([^}]*)(}))?"},{token:["storage.type","lparen","variable.parameter","rparen"],regex:"(\\\\(?:begin|end))({)(\\w*)(})"},{token:"storage.type",regex:"\\\\[a-zA-Z]+"},{token:"lparen",regex:"[[({]"},{token:"rparen",regex:"[\\])}]"},{token:"constant.character.escape",regex:"\\\\[^a-zA-Z]?"},{token:"string",regex:"\\${1,2}",next:"equation"}],equation:[{token:"comment",regex:"%.*$"},{token:"string",regex:"\\${1,2}",next:"start"},{token:"constant.character.escape",regex:"\\\\(?:[^a-zA-Z]|[a-zA-Z]+)"},{token:"error",regex:"^\\s*$",next:"start"},{defaultToken:"string"}]}};r.inherits(s,i),t.LatexHighlightRules=s}),ace.define("ace/mode/folding/latex",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range","ace/token_iterator"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=e("../../range").Range,o=e("../../token_iterator").TokenIterator,u=t.FoldMode=function(){};r.inherits(u,i),function(){this.foldingStartMarker=/^\s*\\(begin)|(section|subsection|paragraph)\b|{\s*$/,this.foldingStopMarker=/^\s*\\(end)\b|^\s*}/,this.getFoldWidgetRange=function(e,t,n){var r=e.doc.getLine(n),i=this.foldingStartMarker.exec(r);if(i)return i[1]?this.latexBlock(e,n,i[0].length-1):i[2]?this.latexSection(e,n,i[0].length-1):this.openingBracketBlock(e,"{",n,i.index);var i=this.foldingStopMarker.exec(r);if(i)return i[1]?this.latexBlock(e,n,i[0].length-1):this.closingBracketBlock(e,"}",n,i.index+i[0].length)},this.latexBlock=function(e,t,n){var r={"\\begin":1,"\\end":-1},i=new o(e,t,n),u=i.getCurrentToken();if(!u||u.type!="storage.type"&&u.type!="constant.character.escape")return;var a=u.value,f=r[a],l=function(){var e=i.stepForward(),t=e.type=="lparen"?i.stepForward().value:"";return f===-1&&(i.stepBackward(),t&&i.stepBackward()),t},c=[l()],h=f===-1?i.getCurrentTokenColumn():e.getLine(t).length,p=t;i.step=f===-1?i.stepBackward:i.stepForward;while(u=i.step()){if(!u||u.type!="storage.type"&&u.type!="constant.character.escape")continue;var d=r[u.value];if(!d)continue;var v=l();if(d===f)c.unshift(v);else if(c.shift()!==v||!c.length)break}if(c.length)return;var t=i.getCurrentTokenRow();return f===-1?new s(t,e.getLine(t).length,p,h):(i.stepBackward(),new s(p,h,t,i.getCurrentTokenColumn()))},this.latexSection=function(e,t,n){var r=["\\subsection","\\section","\\begin","\\end","\\paragraph"],i=new o(e,t,n),u=i.getCurrentToken();if(!u||u.type!="storage.type")return;var a=r.indexOf(u.value),f=0,l=t;while(u=i.stepForward()){if(u.type!=="storage.type")continue;var c=r.indexOf(u.value);if(c>=2){f||(l=i.getCurrentTokenRow()-1),f+=c==2?1:-1;if(f<0)break}else if(c>=a)break}f||(l=i.getCurrentTokenRow()-1);while(l>t&&!/\S/.test(e.getLine(l)))l--;return new s(t,e.getLine(t).length,l,e.getLine(l).length)}}.call(u.prototype)}),ace.define("ace/mode/latex",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/latex_highlight_rules","ace/mode/folding/latex","ace/range"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./latex_highlight_rules").LatexHighlightRules,o=e("./folding/latex").FoldMode,u=e("../range").Range,a=function(){this.HighlightRules=s,this.foldingRules=new o};r.inherits(a,i),function(){this.type="text",this.lineCommentStart="%",this.$id="ace/mode/latex"}.call(a.prototype),t.Mode=a})

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
ace.define("ace/mode/mipsassembler_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:"string.start",regex:'"',next:"qstring"}],qstring:[{token:"escape",regex:/\\./},{token:"string.end",regex:'"',next:"start"}]},this.normalizeRules()};s.metaData=r.inherits(s,i),t.mipsassemblerHighlightRules=s}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++t<a){n=e.getLine(t);var f=n.search(/\S/);if(f===-1)continue;if(r>f)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/)#(end)?region\b/,a=1;while(++n<s){t=e.getLine(n);var f=u.exec(t);if(!f)continue;f[1]?a--:a++;if(!a)break}var l=n;if(l>o)return new i(o,r,l,t.length)}}.call(o.prototype)}),ace.define("ace/mode/mipsassembler",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/mipsassembler_highlight_rules","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./mipsassembler_highlight_rules").HighlightRules,o=e("./folding/cstyle").FoldMode,u=function(){this.HighlightRules=s,this.foldingRules=new o};r.inherits(u,i),function(){this.$id="ace/mode/mipsassembler"}.call(u.prototype),t.Mode=u})

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
ace.define("ace/mode/python_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e="and|as|assert|break|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|not|or|pass|print|raise|return|try|while|with|yield",t="True|False|None|NotImplemented|Ellipsis|__debug__",n="abs|divmod|input|open|staticmethod|all|enumerate|int|ord|str|any|eval|isinstance|pow|sum|basestring|execfile|issubclass|print|super|binfile|iter|property|tuple|bool|filter|len|range|type|bytearray|float|list|raw_input|unichr|callable|format|locals|reduce|unicode|chr|frozenset|long|reload|vars|classmethod|getattr|map|repr|xrange|cmp|globals|max|reversed|zip|compile|hasattr|memoryview|round|__import__|complex|hash|min|set|apply|delattr|help|next|setattr|buffer|dict|hex|object|slice|coerce|dir|id|oct|sorted|intern",r=this.createKeywordMapper({"invalid.deprecated":"debugger","support.function":n,"constant.language":t,keyword:e},"identifier"),i="(?:r|u|ur|R|U|UR|Ur|uR)?",s="(?:(?:[1-9]\\d*)|(?:0))",o="(?:0[oO]?[0-7]+)",u="(?:0[xX][\\dA-Fa-f]+)",a="(?:0[bB][01]+)",f="(?:"+s+"|"+o+"|"+u+"|"+a+")",l="(?:[eE][+-]?\\d+)",c="(?:\\.\\d+)",h="(?:\\d+)",p="(?:(?:"+h+"?"+c+")|(?:"+h+"\\.))",d="(?:(?:"+p+"|"+h+")"+l+")",v="(?:"+d+"|"+p+")",m="\\\\(x[0-9A-Fa-f]{2}|[0-7]{3}|[\\\\abfnrtv'\"]|U[0-9A-Fa-f]{8}|u[0-9A-Fa-f]{4})";this.$rules={start:[{token:"comment",regex:"#.*$"},{token:"string",regex:i+'"{3}',next:"qqstring3"},{token:"string",regex:i+'"(?=.)',next:"qqstring"},{token:"string",regex:i+"'{3}",next:"qstring3"},{token:"string",regex:i+"'(?=.)",next:"qstring"},{token:"constant.numeric",regex:"(?:"+v+"|\\d+)[jJ]\\b"},{token:"constant.numeric",regex:v},{token:"constant.numeric",regex:f+"[lL]\\b"},{token:"constant.numeric",regex:f+"\\b"},{token:r,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"\\+|\\-|\\*|\\*\\*|\\/|\\/\\/|%|<<|>>|&|\\||\\^|~|<|>|<=|=>|==|!=|<>|="},{token:"paren.lparen",regex:"[\\[\\(\\{]"},{token:"paren.rparen",regex:"[\\]\\)\\}]"},{token:"text",regex:"\\s+"}],qqstring3:[{token:"constant.language.escape",regex:m},{token:"string",regex:'"{3}',next:"start"},{defaultToken:"string"}],qstring3:[{token:"constant.language.escape",regex:m},{token:"string",regex:"'{3}",next:"start"},{defaultToken:"string"}],qqstring:[{token:"constant.language.escape",regex:m},{token:"string",regex:"\\\\$",next:"qqstring"},{token:"string",regex:'"|$',next:"start"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:m},{token:"string",regex:"\\\\$",next:"qstring"},{token:"string",regex:"'|$",next:"start"},{defaultToken:"string"}]}};r.inherits(s,i),t.PythonHighlightRules=s}),ace.define("ace/mode/folding/pythonic",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=t.FoldMode=function(e){this.foldingStartMarker=new RegExp("([\\[{])(?:\\s*)$|("+e+")(?:\\s*)(?:#.*)?$")};r.inherits(s,i),function(){this.getFoldWidgetRange=function(e,t,n){var r=e.getLine(n),i=r.match(this.foldingStartMarker);if(i)return i[1]?this.openingBracketBlock(e,i[1],n,i.index):i[2]?this.indentationBlock(e,n,i.index+i[2].length):this.indentationBlock(e,n)}}.call(s.prototype)}),ace.define("ace/mode/python",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/python_highlight_rules","ace/mode/folding/pythonic","ace/range"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./python_highlight_rules").PythonHighlightRules,o=e("./folding/pythonic").FoldMode,u=e("../range").Range,a=function(){this.HighlightRules=s,this.foldingRules=new o("\\:")};r.inherits(a,i),function(){this.lineCommentStart="#",this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"){var o=t.match(/^.*[\{\(\[\:]\s*$/);o&&(r+=n)}return r};var e={pass:1,"return":1,raise:1,"break":1,"continue":1};this.checkOutdent=function(t,n,r){if(r!=="\r\n"&&r!=="\r"&&r!=="\n")return!1;var i=this.getTokenizer().getLineTokens(n.trim(),t).tokens;if(!i)return!1;do var s=i.pop();while(s&&(s.type=="comment"||s.type=="text"&&s.value.match(/^\s+$/)));return s?s.type=="keyword"&&e[s.value]:!1},this.autoOutdent=function(e,t,n){n+=1;var r=this.$getIndent(t.getLine(n)),i=t.getTabString();r.slice(-i.length)==i&&t.remove(new u(n,r.length-i.length,n,r.length))},this.$id="ace/mode/python"}.call(a.prototype),t.Mode=a})

View File

@ -0,0 +1 @@
ace.define("ace/mode/tex_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text_highlight_rules").TextHighlightRules,o=function(e){e||(e="text"),this.$rules={start:[{token:"comment",regex:"%.*$"},{token:e,regex:"\\\\[$&%#\\{\\}]"},{token:"keyword",regex:"\\\\(?:documentclass|usepackage|newcounter|setcounter|addtocounter|value|arabic|stepcounter|newenvironment|renewenvironment|ref|vref|eqref|pageref|label|cite[a-zA-Z]*|tag|begin|end|bibitem)\\b",next:"nospell"},{token:"keyword",regex:"\\\\(?:[a-zA-z0-9]+|[^a-zA-z0-9])"},{token:"paren.keyword.operator",regex:"[[({]"},{token:"paren.keyword.operator",regex:"[\\])}]"},{token:e,regex:"\\s+"}],nospell:[{token:"comment",regex:"%.*$",next:"start"},{token:"nospell."+e,regex:"\\\\[$&%#\\{\\}]"},{token:"keyword",regex:"\\\\(?:documentclass|usepackage|newcounter|setcounter|addtocounter|value|arabic|stepcounter|newenvironment|renewenvironment|ref|vref|eqref|pageref|label|cite[a-zA-Z]*|tag|begin|end|bibitem)\\b"},{token:"keyword",regex:"\\\\(?:[a-zA-z0-9]+|[^a-zA-z0-9])",next:"start"},{token:"paren.keyword.operator",regex:"[[({]"},{token:"paren.keyword.operator",regex:"[\\])]"},{token:"paren.keyword.operator",regex:"}",next:"start"},{token:"nospell."+e,regex:"\\s+"},{token:"nospell."+e,regex:"\\w+"}]}};r.inherits(o,s),t.TexHighlightRules=o}),ace.define("ace/mode/r_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules","ace/mode/tex_highlight_rules"],function(e,t,n){var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text_highlight_rules").TextHighlightRules,o=e("./tex_highlight_rules").TexHighlightRules,u=function(){var e=i.arrayToMap("function|if|in|break|next|repeat|else|for|return|switch|while|try|tryCatch|stop|warning|require|library|attach|detach|source|setMethod|setGeneric|setGroupGeneric|setClass".split("|")),t=i.arrayToMap("NULL|NA|TRUE|FALSE|T|F|Inf|NaN|NA_integer_|NA_real_|NA_character_|NA_complex_".split("|"));this.$rules={start:[{token:"comment.sectionhead",regex:"#+(?!').*(?:----|====|####)\\s*$"},{token:"comment",regex:"#+'",next:"rd-start"},{token:"comment",regex:"#.*$"},{token:"string",regex:'["]',next:"qqstring"},{token:"string",regex:"[']",next:"qstring"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+[Li]?\\b"},{token:"constant.numeric",regex:"\\d+L\\b"},{token:"constant.numeric",regex:"\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d*)?i?\\b"},{token:"constant.numeric",regex:"\\.\\d+(?:[eE][+\\-]?\\d*)?i?\\b"},{token:"constant.language.boolean",regex:"(?:TRUE|FALSE|T|F)\\b"},{token:"identifier",regex:"`.*?`"},{onMatch:function(n){return e[n]?"keyword":t[n]?"constant.language":n=="..."||n.match(/^\.\.\d+$/)?"variable.language":"identifier"},regex:"[a-zA-Z.][a-zA-Z0-9._]*\\b"},{token:"keyword.operator",regex:"%%|>=|<=|==|!=|\\->|<\\-|\\|\\||&&|=|\\+|\\-|\\*|/|\\^|>|<|!|&|\\||~|\\$|:"},{token:"keyword.operator",regex:"%.*?%"},{token:"paren.keyword.operator",regex:"[[({]"},{token:"paren.keyword.operator",regex:"[\\])}]"},{token:"text",regex:"\\s+"}],qqstring:[{token:"string",regex:'(?:(?:\\\\.)|(?:[^"\\\\]))*?"',next:"start"},{token:"string",regex:".+"}],qstring:[{token:"string",regex:"(?:(?:\\\\.)|(?:[^'\\\\]))*?'",next:"start"},{token:"string",regex:".+"}]};var n=(new o("comment")).getRules();for(var r=0;r<n.start.length;r++)n.start[r].token+=".virtual-comment";this.addRules(n,"rd-"),this.$rules["rd-start"].unshift({token:"text",regex:"^",next:"start"}),this.$rules["rd-start"].unshift({token:"keyword",regex:"@(?!@)[^ ]*"}),this.$rules["rd-start"].unshift({token:"comment",regex:"@@"}),this.$rules["rd-start"].push({token:"comment",regex:"[^%\\\\[({\\])}]+"})};r.inherits(u,s),t.RHighlightRules=u}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),ace.define("ace/mode/r",["require","exports","module","ace/range","ace/lib/oop","ace/mode/text","ace/mode/text_highlight_rules","ace/mode/r_highlight_rules","ace/mode/matching_brace_outdent","ace/unicode"],function(e,t,n){"use strict";var r=e("../range").Range,i=e("../lib/oop"),s=e("./text").Mode,o=e("./text_highlight_rules").TextHighlightRules,u=e("./r_highlight_rules").RHighlightRules,a=e("./matching_brace_outdent").MatchingBraceOutdent,f=e("../unicode"),l=function(){this.HighlightRules=u,this.$outdent=new a};i.inherits(l,s),function(){this.lineCommentStart="#",this.$id="ace/mode/r"}.call(l.prototype),t.Mode=l})

View File

@ -0,0 +1 @@
ace.define("ace/mode/latex_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:"comment",regex:"%.*$"},{token:["keyword","lparen","variable.parameter","rparen","lparen","storage.type","rparen"],regex:"(\\\\(?:documentclass|usepackage|input))(?:(\\[)([^\\]]*)(\\]))?({)([^}]*)(})"},{token:["keyword","lparen","variable.parameter","rparen"],regex:"(\\\\(?:label|v?ref|cite(?:[^{]*)))(?:({)([^}]*)(}))?"},{token:["storage.type","lparen","variable.parameter","rparen"],regex:"(\\\\(?:begin|end))({)(\\w*)(})"},{token:"storage.type",regex:"\\\\[a-zA-Z]+"},{token:"lparen",regex:"[[({]"},{token:"rparen",regex:"[\\])}]"},{token:"constant.character.escape",regex:"\\\\[^a-zA-Z]?"},{token:"string",regex:"\\${1,2}",next:"equation"}],equation:[{token:"comment",regex:"%.*$"},{token:"string",regex:"\\${1,2}",next:"start"},{token:"constant.character.escape",regex:"\\\\(?:[^a-zA-Z]|[a-zA-Z]+)"},{token:"error",regex:"^\\s*$",next:"start"},{defaultToken:"string"}]}};r.inherits(s,i),t.LatexHighlightRules=s}),ace.define("ace/mode/rdoc_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules","ace/mode/latex_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text_highlight_rules").TextHighlightRules,o=e("./latex_highlight_rules"),u=function(){this.$rules={start:[{token:"comment",regex:"%.*$"},{token:"text",regex:"\\\\[$&%#\\{\\}]"},{token:"keyword",regex:"\\\\(?:name|alias|method|S3method|S4method|item|code|preformatted|kbd|pkg|var|env|option|command|author|email|url|source|cite|acronym|href|code|preformatted|link|eqn|deqn|keyword|usage|examples|dontrun|dontshow|figure|if|ifelse|Sexpr|RdOpts|inputencoding|usepackage)\\b",next:"nospell"},{token:"keyword",regex:"\\\\(?:[a-zA-z0-9]+|[^a-zA-z0-9])"},{token:"paren.keyword.operator",regex:"[[({]"},{token:"paren.keyword.operator",regex:"[\\])}]"},{token:"text",regex:"\\s+"}],nospell:[{token:"comment",regex:"%.*$",next:"start"},{token:"nospell.text",regex:"\\\\[$&%#\\{\\}]"},{token:"keyword",regex:"\\\\(?:name|alias|method|S3method|S4method|item|code|preformatted|kbd|pkg|var|env|option|command|author|email|url|source|cite|acronym|href|code|preformatted|link|eqn|deqn|keyword|usage|examples|dontrun|dontshow|figure|if|ifelse|Sexpr|RdOpts|inputencoding|usepackage)\\b"},{token:"keyword",regex:"\\\\(?:[a-zA-z0-9]+|[^a-zA-z0-9])",next:"start"},{token:"paren.keyword.operator",regex:"[[({]"},{token:"paren.keyword.operator",regex:"[\\])]"},{token:"paren.keyword.operator",regex:"}",next:"start"},{token:"nospell.text",regex:"\\s+"},{token:"nospell.text",regex:"\\w+"}]}};r.inherits(u,s),t.RDocHighlightRules=u}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),ace.define("ace/mode/rdoc",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/text_highlight_rules","ace/mode/rdoc_highlight_rules","ace/mode/matching_brace_outdent"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./text_highlight_rules").TextHighlightRules,o=e("./rdoc_highlight_rules").RDocHighlightRules,u=e("./matching_brace_outdent").MatchingBraceOutdent,a=function(e){this.HighlightRules=o,this.$outdent=new u};r.inherits(a,i),function(){this.getNextLineIndent=function(e,t,n){return this.$getIndent(t)},this.$id="ace/mode/rdoc"}.call(a.prototype),t.Mode=a})

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
ace.define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=e("../../range").Range,o=t.FoldMode=function(){};r.inherits(o,i),function(){this.getFoldWidgetRange=function(e,t,n){var r=this.indentationBlock(e,n);if(r)return r;var i=/\S/,o=e.getLine(n),u=o.search(i);if(u==-1||o[u]!="#")return;var a=o.length,f=e.getLength(),l=n,c=n;while(++n<f){o=e.getLine(n);var h=o.search(i);if(h==-1)continue;if(o[h]!="#")break;c=n}if(c>l){var p=e.getLine(c).length;return new s(l,a,c,p)}},this.getFoldWidget=function(e,t,n){var r=e.getLine(n),i=r.search(/\S/),s=e.getLine(n+1),o=e.getLine(n-1),u=o.search(/\S/),a=s.search(/\S/);if(i==-1)return e.foldWidgets[n-1]=u!=-1&&u<a?"start":"","";if(u==-1){if(i==a&&r[i]=="#"&&s[i]=="#")return e.foldWidgets[n-1]="",e.foldWidgets[n+1]="","start"}else if(u==i&&r[i]=="#"&&o[i]=="#"&&e.getLine(n-2).search(/\S/)==-1)return e.foldWidgets[n-1]="start",e.foldWidgets[n+1]="","";return u!=-1&&u<i?e.foldWidgets[n-1]="start":e.foldWidgets[n-1]="",i<a?"start":""}}.call(o.prototype)}),ace.define("ace/mode/snippets",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/text_highlight_rules","ace/mode/folding/coffee"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./text_highlight_rules").TextHighlightRules,o=function(){var e="SELECTION|CURRENT_WORD|SELECTED_TEXT|CURRENT_LINE|LINE_INDEX|LINE_NUMBER|SOFT_TABS|TAB_SIZE|FILENAME|FILEPATH|FULLNAME";this.$rules={start:[{token:"constant.language.escape",regex:/\\[\$}`\\]/},{token:"keyword",regex:"\\$(?:TM_)?(?:"+e+")\\b"},{token:"variable",regex:"\\$\\w+"},{onMatch:function(e,t,n){return n[1]?n[1]++:n.unshift(t,1),this.tokenName},tokenName:"markup.list",regex:"\\${",next:"varDecl"},{onMatch:function(e,t,n){return n[1]?(n[1]--,n[1]||n.splice(0,2),this.tokenName):"text"},tokenName:"markup.list",regex:"}"},{token:"doc.comment",regex:/^\${2}-{5,}$/}],varDecl:[{regex:/\d+\b/,token:"constant.numeric"},{token:"keyword",regex:"(?:TM_)?(?:"+e+")\\b"},{token:"variable",regex:"\\w+"},{regex:/:/,token:"punctuation.operator",next:"start"},{regex:/\//,token:"string.regex",next:"regexp"},{regex:"",next:"start"}],regexp:[{regex:/\\./,token:"escape"},{regex:/\[/,token:"regex.start",next:"charClass"},{regex:"/",token:"string.regex",next:"format"},{token:"string.regex",regex:"."}],charClass:[{regex:"\\.",token:"escape"},{regex:"\\]",token:"regex.end",next:"regexp"},{token:"string.regex",regex:"."}],format:[{regex:/\\[ulULE]/,token:"keyword"},{regex:/\$\d+/,token:"variable"},{regex:"/[gim]*:?",token:"string.regex",next:"start"},{token:"string",regex:"."}]}};r.inherits(o,s),t.SnippetHighlightRules=o;var u=function(){this.$rules={start:[{token:"text",regex:"^\\t",next:"sn-start"},{token:"invalid",regex:/^ \s*/},{token:"comment",regex:/^#.*/},{token:"constant.language.escape",regex:"^regex ",next:"regex"},{token:"constant.language.escape",regex:"^(trigger|endTrigger|name|snippet|guard|endGuard|tabTrigger|key)\\b"}],regex:[{token:"text",regex:"\\."},{token:"keyword",regex:"/"},{token:"empty",regex:"$",next:"start"}]},this.embedRules(o,"sn-",[{token:"text",regex:"^\\t",next:"sn-start"},{onMatch:function(e,t,n){return n.splice(n.length),this.tokenName},tokenName:"text",regex:"^(?! )",next:"start"}])};r.inherits(u,s),t.SnippetGroupHighlightRules=u;var a=e("./folding/coffee").FoldMode,f=function(){this.HighlightRules=u,this.foldingRules=new a};r.inherits(f,i),function(){this.$indentWithTabs=!0,this.lineCommentStart="#",this.$id="ace/mode/snippets"}.call(f.prototype),t.Mode=f})

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
ace.define("ace/mode/tex_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text_highlight_rules").TextHighlightRules,o=function(e){e||(e="text"),this.$rules={start:[{token:"comment",regex:"%.*$"},{token:e,regex:"\\\\[$&%#\\{\\}]"},{token:"keyword",regex:"\\\\(?:documentclass|usepackage|newcounter|setcounter|addtocounter|value|arabic|stepcounter|newenvironment|renewenvironment|ref|vref|eqref|pageref|label|cite[a-zA-Z]*|tag|begin|end|bibitem)\\b",next:"nospell"},{token:"keyword",regex:"\\\\(?:[a-zA-z0-9]+|[^a-zA-z0-9])"},{token:"paren.keyword.operator",regex:"[[({]"},{token:"paren.keyword.operator",regex:"[\\])}]"},{token:e,regex:"\\s+"}],nospell:[{token:"comment",regex:"%.*$",next:"start"},{token:"nospell."+e,regex:"\\\\[$&%#\\{\\}]"},{token:"keyword",regex:"\\\\(?:documentclass|usepackage|newcounter|setcounter|addtocounter|value|arabic|stepcounter|newenvironment|renewenvironment|ref|vref|eqref|pageref|label|cite[a-zA-Z]*|tag|begin|end|bibitem)\\b"},{token:"keyword",regex:"\\\\(?:[a-zA-z0-9]+|[^a-zA-z0-9])",next:"start"},{token:"paren.keyword.operator",regex:"[[({]"},{token:"paren.keyword.operator",regex:"[\\])]"},{token:"paren.keyword.operator",regex:"}",next:"start"},{token:"nospell."+e,regex:"\\s+"},{token:"nospell."+e,regex:"\\w+"}]}};r.inherits(o,s),t.TexHighlightRules=o}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),ace.define("ace/mode/tex",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/text_highlight_rules","ace/mode/tex_highlight_rules","ace/mode/matching_brace_outdent"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./text_highlight_rules").TextHighlightRules,o=e("./tex_highlight_rules").TexHighlightRules,u=e("./matching_brace_outdent").MatchingBraceOutdent,a=function(e){e?this.HighlightRules=s:this.HighlightRules=o,this.$outdent=new u};r.inherits(a,i),function(){this.getNextLineIndent=function(e,t,n){return this.$getIndent(t)},this.allowAutoInsert=function(){return!1},this.$id="ace/mode/tex"}.call(a.prototype),t.Mode=a})

View File

@ -0,0 +1 @@
ace.define("ace/mode/verilog_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e="always|and|assign|automatic|begin|buf|bufif0|bufif1|case|casex|casez|cell|cmos|config|deassign|default|defparam|design|disable|edge|else|end|endcase|endconfig|endfunction|endgenerate|endmodule|endprimitive|endspecify|endtable|endtask|event|for|force|forever|fork|function|generate|genvar|highz0|highz1|if|ifnone|incdir|include|initial|inout|input|instance|integer|join|large|liblist|library|localparam|macromodule|medium|module|nand|negedge|nmos|nor|noshowcancelled|not|notif0|notif1|or|output|parameter|pmos|posedge|primitive|pull0|pull1|pulldown|pullup|pulsestyle_onevent|pulsestyle_ondetect|rcmos|real|realtime|reg|release|repeat|rnmos|rpmos|rtran|rtranif0|rtranif1|scalared|showcancelled|signed|small|specify|specparam|strong0|strong1|supply0|supply1|table|task|time|tran|tranif0|tranif1|tri|tri0|tri1|triand|trior|trireg|unsigned|use|vectored|wait|wand|weak0|weak1|while|wire|wor|xnor|xorbegin|bufif0|bufif1|case|casex|casez|config|else|end|endcase|endconfig|endfunction|endgenerate|endmodule|endprimitive|endspecify|endtable|endtask|for|forever|function|generate|if|ifnone|macromodule|module|primitive|repeat|specify|table|task|while",t="true|false|null",n="count|min|max|avg|sum|rank|now|coalesce|main",r=this.createKeywordMapper({"support.function":n,keyword:e,"constant.language":t},"identifier",!0);this.$rules={start:[{token:"comment",regex:"//.*$"},{token:"string",regex:'".*?"'},{token:"string",regex:"'.*?'"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:r,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"\\+|\\-|\\/|\\/\\/|%|<@>|@>|<@|&|\\^|~|<|>|<=|=>|==|!=|<>|="},{token:"paren.lparen",regex:"[\\(]"},{token:"paren.rparen",regex:"[\\)]"},{token:"text",regex:"\\s+"}]}};r.inherits(s,i),t.VerilogHighlightRules=s}),ace.define("ace/mode/verilog",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/verilog_highlight_rules","ace/range"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./verilog_highlight_rules").VerilogHighlightRules,o=e("../range").Range,u=function(){this.HighlightRules=s};r.inherits(u,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$id="ace/mode/verilog"}.call(u.prototype),t.Mode=u})

View File

@ -0,0 +1 @@
ace.define("ace/mode/vhdl_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e="access|after|ailas|all|architecture|assert|attribute|begin|block|buffer|bus|case|component|configuration|disconnect|downto|else|elsif|end|entity|file|for|function|generate|generic|guarded|if|impure|in|inertial|inout|is|label|linkage|literal|loop|mapnew|next|of|on|open|others|out|port|process|pure|range|record|reject|report|return|select|shared|subtype|then|to|transport|type|unaffected|united|until|wait|when|while|with",t="bit|bit_vector|boolean|character|integer|line|natural|positive|real|register|severity|signal|signed|std_logic|std_logic_vector|string||text|time|unsigned|variable",n="array|constant",r="abs|and|mod|nand|nor|not|rem|rol|ror|sla|sll|srasrl|xnor|xor",i="true|false|null",s=this.createKeywordMapper({"keyword.operator":r,keyword:e,"constant.language":i,"storage.modifier":n,"storage.type":t},"identifier",!0);this.$rules={start:[{token:"comment",regex:"--.*$"},{token:"string",regex:'".*?"'},{token:"string",regex:"'.*?'"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"keyword",regex:"\\s*(?:library|package|use)\\b"},{token:s,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"&|\\*|\\+|\\-|\\/|<|=|>|\\||=>|\\*\\*|:=|\\/=|>=|<=|<>"},{token:"punctuation.operator",regex:"\\'|\\:|\\,|\\;|\\."},{token:"paren.lparen",regex:"[[(]"},{token:"paren.rparen",regex:"[\\])]"},{token:"text",regex:"\\s+"}]}};r.inherits(s,i),t.VHDLHighlightRules=s}),ace.define("ace/mode/vhdl",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/vhdl_highlight_rules","ace/range"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./vhdl_highlight_rules").VHDLHighlightRules,o=e("../range").Range,u=function(){this.HighlightRules=s};r.inherits(u,i),function(){this.lineCommentStart="--",this.$id="ace/mode/vhdl"}.call(u.prototype),t.Mode=u})

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

0
build/htdocs/scripts/ace/theme-monokai.js Executable file → Normal file
View File

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,65 @@
var picam_config = {
name: 'picam_layout',
toolbar:{
name: 'picam_toolbar',
items: [
{ type: 'check', id: 'picam_capture', caption: 'Start capture', icon: 'fa-camera-retro', checked: false },
{ type: 'break', id: 'break0' },
{ type: 'menu', id: 'picam_res', caption: 'Resolution', icon: 'fa-picture',
items: [
{ text: '360x240', icon: 'fa-th'},
{ text: '640x480', icon: 'fa-th'}
]},
{ type: 'break', id: 'break1' },
{ type: 'radio', id: 'item3', group: '1', caption: 'Radio 1', icon: 'fa-star', checked: true },
{ type: 'radio', id: 'item4', group: '1', caption: 'Radio 2', icon: 'fa-heart' },
{ type: 'break', id: 'break2' },
{ type: 'drop', id: 'item5', caption: 'Drop Down', icon: 'fa-plus', html: '<div style="padding: 10px">Drop down</div>' },
{ type: 'break', id: 'break3' },
{ type: 'spacer' },
{ type: 'button', id: 'item7', caption: 'Item 5', icon: 'fa-flag' }
],
onClick: function (event) {
switch(event.target)
{
case 'picam_capture':
//console.log('checked is'+event.item.checked);
if(event.object.checked == false)
{
console.log("Starting capture");
$("#pi_img").load(function() {
if (this.complete && typeof this.naturalWidth != "undefined" || this.naturalWidth != 0) {
$("#pi_img").attr("src", "/camviewer?fetch="+new Date().getTime());
}
});
$("#pi_img").attr("src", "/camviewer?fetch="+new Date().getTime());
}
else
{
$("#pi_img").unbind('load');
}
break;
default: //do nothing
console.log('Event: ' + event.type + ' Target: ' + event.target);
console.log(event);
}
}
},
panels: [
{
type: 'top',
size: 50,
style: 'padding: 5px;',
content: 'top'
},
{
type: 'main',
style: 'padding: 0px;',
content: '<div style="padding: 10px"><img id="pi_img" src="/camviewer"/></div>'
}
]
}
$().w2toolbar(picam_config.toolbar)
$().w2layout(picam_config);
w2ui.picam_layout.content('top',w2ui.picam_toolbar);

View File

@ -1,149 +0,0 @@
var class_tpl = "Object addSubClass: #Foo instanceVariableNames: 'x y'";
function gen_editor_for(id,default_val)
{
return '<div id="'+id+'" style="position: absolute;top:0;right: 0;bottom: 0;left: 0;"> \n'
+ default_val
+ '</div>'
+'<script>\n'
+ 'ace.require("ace/ext/language_tools");'
+'var '+id+' = ace.edit("'+id+'");\n'
+ ''+id+'.setOptions({'
+ 'enableBasicAutocompletion: true,'
//+ 'enableSnippets: true,\n'
+ 'enableLiveAutocompletion: true \n'
+ '});'
+id + '.setTheme("ace/theme/monokai");\n'
+id + '.getSession().setMode("ace/mode/text");\n'
+'</script>'
}
var sclbrr_config = {
name: 'cls_sidebar',
nodes: [ ],
onClick:function(event)
{
$.post( "/ffvm/classinfo", { class: event.target})
.done(function( data )
{
remove_all_nodes_of(w2ui.method_sidebar);
remove_all_nodes_of(w2ui.iv_sidebar);
//w2ui.method_sidebar.remove(w2ui.method_sidebar.nodes);
//console.log(data);
$.each(data[0], function(idx,val)
{
w2ui.method_sidebar.add({id:val, text:val,icon: 'fa-cog'});
});
$.each(data[1], function(idx,val)
{
w2ui.iv_sidebar.add({id:val, text:val,icon: 'fa-lock'});
});
});
// now get instance variables
},
reload: function()
{
remove_all_nodes_of(w2ui.cls_sidebar);
w2ui.cls_sidebar.add({id:'Object',
text:'Object',icon: 'fa-sitemap',expanded: true});
$.getJSON( "/ffvm", function(data) {
$.each(data.Object, function (index,value) {
insert_item_to(w2ui.cls_sidebar,"Object",value);
});
});
},
openClassEditor:function()
{
// create popup with editor
var html = gen_editor_for('cls_editor',class_tpl);
//console.log(html);
w2popup.open({
title: 'Create new class',
body:html ,
buttons: '<button class="btn" onclick="sclbrr_config.newClass()">Create</button>',
modal:true,
opacity: 0,
width:500,
height:300,
showMax: false
}).unlockScreen();
},
newClass:function() {
var cls,superClas;
var code = cls_editor.getValue();
var tmp_arr = code.split("instanceVariableNames:");
if(tmp_arr.length != 2)
{
w2alert('Wrong code syntax!!!');
return;
}
tmp_arr = tmp_arr[0].split("addSubClass:");
if(tmp_arr.length != 2)
{
w2alert('Wrong code syntax!!!');
return;
}
cls = tmp_arr[1].replace("#","").trim();
superClas = tmp_arr[0].trim();
// check if super class exist
if(w2ui.cls_sidebar.find({id:superClas}).length == 0)
{
w2alert('Superclass : ' + superClas + ' not found!!');
return;
}
if(w2ui.cls_sidebar.find({id:cls}).length != 0)
{
w2alert('Class : ' + cls + ' is already exist!!');
return;
}
// it's now safe to send the code to server
$.post( "/ffvm/new_class", { class:cls, code:code})
.done(function( data )
{
//console.log(data);
if(data.result)
{
sclbrr_config.reload();
w2ui.cls_sidebar.select(cls);
w2popup.close();
}
});
}
}
function remove_all_nodes_of(sidebar)
{
var nd = [];
for (var i in sidebar.nodes) nd.push(sidebar.nodes[i].id);
sidebar.remove.apply(sidebar, nd);
}
function insert_item_to(el, id, obj)
{
switch($.type(obj))
{
case "object":
$.each(obj, function(key,val){
el.insert(id,null,
[{id:key, text:key,icon: 'fa-sitemap'}]);
insert_item_to(el,key,val);
});
break;
case "array":
//console.log("ARRAY");
$.each(obj, function (idx,val) {
insert_item_to(el,id,val);
})
break;
default:
el.insert(id,null,
[{id:obj, text:obj,icon: 'fa-th-list'}]);
break;
}
}
$().w2sidebar(sclbrr_config);
w2ui.cls_sidebar.on('render', function (event) {
sclbrr_config.reload();
});

View File

@ -1,24 +0,0 @@
var dummy_config = {
name: 'dummygrid',
header: 'Dummy plugin',
url: '/dummy',
method: 'GET',
show: {
header : false,
toolbar : true,
footer : true,
lineNumbers : true,
toolbarAdd: true
},
columns: [
{ field: 'id', caption: '#', size: '10%' },
{ field: 'color', caption: 'Text', size: '90%'}
],
searches: [
{ type: 'text', field: 'color', caption: 'Text' }
],
//event
onAdd: function (evt) {
}
}
$().w2grid(dummy_config);

View File

@ -0,0 +1,202 @@
var fileman_gird = {
name: 'filemangrid',
header:'Files',
url: '/fileman',
method: 'GET',
show: {
header : false,
toolbar : true,
footer : true,
lineNumbers : true,
toolbarDelete: true
},
columns: [
{ field: 'type', caption: 'Type', size: '0%' ,hidden:true},
{ field: 'name', caption: 'Name', size: '30%' },
{ field: 'size', caption: 'Size (bytes)', size: '15%' },
{ field: 'mime', caption: 'Type', size: '25%' },
{ field: 'changed', caption: 'Last changed', size: '30%' }
],
searches: [
{ type: 'text', field: 'name', caption: 'Plugin name' },
{ type: 'date', field: 'changed', caption: 'Last changed' }
],
toolbar: {
items: [
{ type: 'button', id: 'bt_add_file', caption: 'Add file', icon: 'w2ui-icon-plus' },
{
type: 'html',
id: 'file_select',
html: '<form id="file_add_form" action="javascript:;" style="display:none;">'
+'<input id="file_add_file" type="file" name="pfile" />'
+'<input id="file_add_path" type="hidden" name="path" />'
+'</form>'
},
{ type: 'button', id: 'bt_create_folder', caption: 'Create folder', img: 'icon-folder' }
],
onClick: function (target, data) {
switch(target)
{
case 'bt_add_file':
w2ui.filemangrid.add_file();
break;
case 'bt_create_folder':
w2popup.open({
title : 'New folder',
body : '<div class="w2ui-centered">Folder name: <br/><input type="text" id="mkdir_dname" size="50" /></div>',
buttons : '<button class="btn" onclick="w2ui.filemangrid.mkdir();w2popup.close();">Create</button>',
width : 400,
height : 200,
overflow : 'hidden',
color : '#333',
speed : '0.3',
opacity : '0.8',
modal : true,
showClose : true
});
break;
default:
console.log(data);
}
},
},
onDelete: function (event) {
event.preventDefault();
w2confirm('Are you sure you want to delete selected file/record ?', function (btn) {
if(btn == "Yes")
{
var sel = w2ui.filemangrid.getSelection();
var row = w2ui.filemangrid.get(sel);
var path = w2ui.filemangrid.folder;
if(row)
{
$.post( "/fileman/rmfolder", { name: row.name, path: path})
.done(function( data )
{
if(data.result == 1)
w2ui.filemangrid.reload();
else
w2alert(data.msg);
});
}
}
});
},
onDblClick: function(event) {
var el = this.get(event.recid);
if(el.type == 0)
{
this.url = "/fileman?path="+ this.folder+"/"+ el.name;
this.reload();
}
else
console.log(el);
},
route_path:function(router)
{
if(router)
{
var toolb = w2ui.fileman_layout.panels[0].toolbar;
var icon;
toolb.items = [];
for(i=0;i< router.length;i++)
{
if(i==0)
icon = 'fa-folder-open';
else
icon = 'fa-angle-right';
toolb.items[i] = {
type: 'button',
id: 'folder_router_'+ i,
caption:router[i].name,
icon:icon,
path:router[i].path};
}
toolb.render();
//console.log(this);
}
},
onLoad:function(event)
{
var obj;
if(event.xhr.statusText == "OK")
{
obj = JSON.parse(event.xhr.responseText);
this.route_path(obj.router);
}
},
mkdir:function()
{
var dname = $("#mkdir_dname").val();
//open pop up
$.post( "/fileman/mkfolder", { dname: dname, path: this.folder})
.done(function( data )
{
if(data.result == 1)
w2ui.filemangrid.reload();
else
w2alert(data.msg);
});
},
//event
add_file: function () {
$('#file_add_form').unbind('submit');
$('#file_add_form').unbind("change");
$('#file_add_path').val(this.folder);
$('#file_add_form').submit(function(event){
event.preventDefault();
var formData = new FormData($(this)[0]);
$.ajax({
url: '/fileman/add',
type: 'POST',
data: formData,
async: false,
cache: false,
contentType: false,
processData: false,
success: function (returndata) {
if(returndata.result == 1)
w2ui.filemangrid.reload();
else
w2alert(returndata.msg);
}
});
return false;
});
$('#file_add_file').on("change",function(){
//console.log("change in file");
$('#file_add_form').trigger('submit');
return false;
});
$('#file_add_file').trigger('click');
}
}
var fileman_layout = {
name:"fileman_layout",
panels: [
{
type:'top',
size: 29,
style: 'padding: 0px;',
toolbar:{
items: [
] ,
onClick: function (target, data) {
w2ui.filemangrid.url = "/fileman?path="+data.object.path;
w2ui.filemangrid.reload();
//console.log(data.object.path);
},
}
},
{
type:'main',
content:''
}
]
}
$().w2grid(fileman_gird);
$().w2layout(fileman_layout);
w2ui.fileman_layout.content('main',w2ui.filemangrid);

View File

@ -1,225 +0,0 @@
var editor_html =
'<div id="editor" style="position: absolute;top:0;right: 0;bottom: 0;left: 0;"> \n'
+'</div> \n'
+'<script>\n'
+ 'ace.require("ace/ext/language_tools");'
+'var editor = ace.edit("editor");\n'
+ 'editor.setOptions({'
+ 'enableBasicAutocompletion: true,'
//+ 'enableSnippets: true,\n'
+ 'enableLiveAutocompletion: true \n'
+ '});'
+'editor.setTheme("ace/theme/monokai");\n'
+'editor.getSession().setMode("ace/mode/text");\n'
+'editor.completers.push(editor_syntax_ac);\n'
+'</script>';
var top_html =
"<div id = 'custom_top_header'>"
+ "<div id='ct_left'><span stype=''></span></div>"
+ "<div id='ct_right'>"
+ " <ul>"
+ " <li id='bt_download_image'/>"
+ " <li id='bt_save_image' />"
+ " <li id='bt_workspace'/>"
+ " </ul>"
+ "</div>"
+"</div>";
var editor_syntax_ac = {
getCompletions: function(editor, session, pos, prefix, callback) {
$.getJSON("ffvm/editor_ac",
function(list) {
callback(null,list)});
}
};
// system config
var config = {
layout:{
name: 'layout',
panels: [
{
type: 'top',
size: 45,
style: 'padding: 0px;',
content: top_html
//title: 'FireFly Smalltalk'
},
{
type: 'left',
size: 200,
style: 'padding: 0px;',
resizable: true,
content: 'left',
toolbar: {
items: [
{ type: 'html', id: 'classbr_header',
html: '<div style="padding: 3px 10px; font-weight:bold;">'+
'Classes browser'+'</div>'
},
{ type: 'spacer' },
{ type: 'menu', id: 'cls_ed', caption: '', icon: ' fa-edit', items: [
{ id:'new_cls', text: 'New class', icon: 'fa-plus' },
{ text: 'Edit class', icon: 'fa-pencil' },
{ text: 'Delete class', icon: 'fa-trash' }
]},
{ type: 'button', id: 'clsbr_ref', caption: '', icon: 'fa-refresh'}
],
onClick: function (event) {
// this.owner.content('main', event);
switch(event.target)
{
case 'cls_ed:new_cls':
sclbrr_config.openClassEditor();
break;
case 'clsbr_ref':
sclbrr_config.reload();
break;
default:
console.log(event);
}
}
}
},
{
type: 'main',
style: 'padding: 0px;',
content: 'main'
}
]
},
right_layout:{
name: 'right_layout',
panels: [
{
type: 'left',
size: 200,
//style: 'padding: 0px;',
resizable: true,
content: 'left',
toolbar: {
items: [
{ type: 'html', id: 'methodsbr_header',
html: '<div style="padding: 3px 10px; font-weight:bold;">'+
'Methods browser'+'</div>'
},
{ type: 'spacer' },
{ type: 'button', id: 'methbr_del', caption: '', icon: 'fa-trash'},
{ type: 'button', id: 'methbr_ref', caption: '', icon: 'fa-refresh'}
],
onClick: function (event) {
// this.owner.content('main', event);
if(event.target == 'methbr_ref')
methodsb_config.reload();
}
}
},
{
type: 'main',
//style: 'padding: 0px;',
content: editor_html,
toolbar: {
items: [
{ type: 'html', id: 'source_header',
html: '<div id="src_hd" style="padding: 3px 10px;font-weight:bold;">'+
' Source code'+'</div>'
} ,
{ type: 'spacer' },
{ type: 'button', id: 'ed_ac_reload', caption: '', icon: 'fa-repeat', hint: 'Reload AC keywords' },
{ type: 'button', id: 'src_save', caption: 'Save', icon: 'fa-save', hint: 'Save method' }
],
onClick: function (event) {
// this.owner.content('main', event);
switch(event.target)
{
case 'src_save':
methodsb_config.save_method();
break;
case 'ed_ac_reload':
$.post( "/ffvm/run_on_ws", {code:"imgMeta imageKeywords"});
break;
default:
}
}
}
}
]
},
class_content_layout:
{
name: 'class_content_layout',
panels: [
{
type: 'main',
style: 'padding: 0px;',
content: ''
},
{
type: 'bottom',
style: 'padding: 0px;',
content: '',
size:200,
resizable: true,
toolbar: {
items: [
{ type: 'html', id: 'ivbr_header',
html: '<div style="padding: 3px 10px; font-weight:bold;">'+
'Instance variables'+'</div>'
},
{ type: 'spacer' },
{ type: 'menu', id: 'iv_ed', caption: '', icon: ' fa-edit', items: [
{ text: 'New instance variable', icon: 'fa-plus' },
{ text: 'Edit variable', icon: 'fa-pencil' },
{ text: 'Delete variable', icon: 'fa-trash' }
]},
{ type: 'button', id: 'vrsbr_ref', caption: '', icon: 'fa-refresh'}
],
onClick: function (event) {
// this.owner.content('main', event);
if(event.target == 'vrsbr_ref')
ivb_config.reload();
}
}
}
]
},
save_image()
{
w2confirm('Do you want to save the current image', function (btn) {
if(btn == "Yes")
{
$.post( "/ffvm/save_image", {name:'backup'})
.done(function( data )
{
w2alert("The image is saved");
});
}
});
}
}
// init the main layout
$(function () {
$().w2layout(playground_config.layout);
$().w2layout(config.class_content_layout);
$().w2layout(config.right_layout);
$('#layout').w2layout(config.layout);
w2ui.class_content_layout.content('main',w2ui.method_sidebar);
w2ui.class_content_layout.content('bottom',w2ui.iv_sidebar);
w2ui.right_layout.content('left',w2ui.class_content_layout);
w2ui.layout.content('left', w2ui.cls_sidebar);
w2ui.layout.content('main', w2ui.right_layout);
$('#bt_workspace').click(function()
{
playground_config.open_pl_editor();
//console.log('open WS');
});
$('#bt_save_image').click(function()
{
config.save_image();
//console.log('open WS');
});
});

View File

@ -1,26 +0,0 @@
var ivb_config = {
name: 'iv_sidebar',
nodes: [
],
onClick:function(event)
{
},
reload:function()
{
if(w2ui.cls_sidebar.selected)
{
$.post( "/ffvm/variables_of", { class:w2ui.cls_sidebar.selected})
.done(function( data )
{
remove_all_nodes_of(w2ui.iv_sidebar);
$.each(data, function(idx,val)
{
w2ui.iv_sidebar.add({id:val, text:val,icon: 'fa-cog'});
});
});
}
}
}
$().w2sidebar(ivb_config);

0
build/htdocs/scripts/jquery.min.js vendored Executable file → Normal file
View File

View File

@ -1,115 +0,0 @@
var methodsb_config = {
name: 'method_sidebar',
nodes: [
],
onClick:function(event)
{
$.post( "/ffvm/source", { method: event.target, class:w2ui.cls_sidebar.selected})
.done(function( data )
{
editor.setValue(data);
$('#src_hd').html(
w2ui.cls_sidebar.selected+
">>"+
event.target
);
//console.log(w2ui.right_layout.get('main'));
/*$("#editor_header").html(
"<p>"+
w2ui.cls_sidebar.selected+
">>"+
event.target+
"</p>"
);*/
});
},
reload:function()
{
if(w2ui.cls_sidebar.selected)
{
$.post( "/ffvm/methods_of", { class:w2ui.cls_sidebar.selected})
.done(function( data )
{
remove_all_nodes_of(w2ui.method_sidebar);
$.each(data, function(idx,val)
{
w2ui.method_sidebar.add({id:val, text:val,icon: 'fa-cog'});
});
});
}
},
save_method:function()
{
if(!w2ui.cls_sidebar.selected) return;
//regular expression to detect method
var reg = /^[\s\t\n\r]*((((\~\=)|(\/\/)|([\,\=\>\<\+\-\*\/])|(\>\=)|(\<\=)|(\=\=))[\s\t\n\r]*[a-zA-Z][a-zA-Z0-9]*)|([a-zA-Z][a-zA-Z0-9]*(\:[\s\t\n\r]*[a-zA-Z][a-zA-Z0-9]*[\s\t\n\r]+([\s\t\n]*[a-zA-Z][a-zA-Z0-9]*\:[\s\t\n\r]*[a-zA-Z][a-zA-Z0-9]*[\s\t\n\r]+)*)?))[\s\t\n\r]*/;//has some bugs
code = editor.getValue();
result = code.match(reg);
var t,m,p;
if(!result || result.length == 0 || !result[0])
w2alert('Invalid function definition');
else
{
t = result[0].trim();
if(/:/.test(t))
{
m = "";
while((p = t.indexOf(":")) != -1)
{
m += t.substring(0,p).trim() + ":";
t = t.substring(p+1,t.length).trim();
if((p = t.indexOf(" ")) != -1)
t = t.substring(p+1,t.length).trim();
//console.log('"'+t+'"');
}
//console.log(m);
}
else
{
result = t.match(/((\~\=)|(\/\/)|([\,\=\>\<\+\-\*\/])|(\>\=)|(\<\=)|(\=\=))/);
if(result && result.length > 0 && result[0])
m = result[0];
else
m = t;
}
console.log(m);
}
//code = code.replace(/\'/g,"''");
if(w2ui.method_sidebar.find({id:m}).length == 0)
{
$.post( "/ffvm/new_method", {
class:w2ui.cls_sidebar.selected,
code:code})
.done(function( data )
{
if(data.result)
{
methodsb_config.reload();
w2ui.method_sidebar.select(m);
}
else
w2alert("Error: cannot save the method");
});
}
else
{
$.post( "/ffvm/update_method", {
class:w2ui.cls_sidebar.selected,
code:code,
method:m})
.done(function( data )
{
if(data.result)
{
methodsb_config.reload();
w2ui.method_sidebar.select(m);
}
else
w2alert("Error: cannot save the method");
});
}
}
}
$().w2sidebar(methodsb_config);

View File

@ -1,103 +0,0 @@
var playground_config = {
layout:{
name: 'pg_layout',
panels: [
{
type: 'main',
style: 'padding: 0px;',
content: 'main'
},
{
type: 'right',
size: 300,
resizable:true,
style: 'padding: 0px;',
content: '<textarea id = "pg_log" readonly></textarea>',
toolbar: {
items: [
{ type: 'button', id: 'pl_run', caption: 'Run', icon: 'fa-caret-right'},
{ type: 'spacer' },
{ type: 'button', id: 'pl_clear_log', caption: '', icon: 'fa-trash'}
//{ type: 'html', id: 'pl_header',
// html: '<b>Console</b>'
//}
],
onClick: function (event) {
if(event.target == 'pl_run')
{
playground_config.run_code();
}
else if(event.target=='pl_clear_log')
{
$("#pg_log").val("");
}
}
}
}
]
},
open_pl_editor()
{
// create popup with editor
var html = gen_editor_for('pl_editor',
'Object respondsTo keys do:[:e| e print]');
//console.log(html);
w2popup.open({
title: 'Play Ground',
body:'<div id="pl_editor_main" style="position: absolute; left: 0px; top: 0px; right: 0px; bottom: 0px;"></div>',
width:700,
height:500,
buttons: '',
modal:true,
opacity: 0,
showMax: false,
onOpen:function (event) {
event.onComplete = function () {
$('#w2ui-popup #pl_editor_main').w2render('pg_layout');
w2ui.pg_layout.html('main', html);
}
},
onToggle: function (event) {
event.onComplete = function () {
w2ui.pg_layout.resize();
}
}
}).unlockScreen();
},
run_code:function()
{
if(pl_editor)
{
var code = pl_editor.getValue().trim();
if(/[a-zA-Z0-9]+/.test(code))
{
//code = code.replace(/\'/g,"''");
if(code.charAt(code.length-1) == '.')
code = code.substring(0,code.length-1);
$.post( "/ffvm/run_on_ws", {code:code})
.done(function( data )
{
if(data.result)
{
playground_config.load_log();
}
else
w2alert("Error: cannot execute code");
});
}
else
w2alert("Please enter code to execute");
}
},
load_log:function()
{
$.get( "/ffvm/ws_log", {})
.done(function( data )
{
console.log(data);
$("#pg_log").val(data);
});
}
}

View File

@ -0,0 +1,72 @@
var pluginman_config = {
name: 'pluginsgrid',
header: 'Installed plugins',
url: '/pluginsman',
method: 'GET',
show: {
header : false,
toolbar : true,
footer : true,
lineNumbers : true,
toolbarAdd: true
},
columns: [
{ field: 'name', caption: 'Plugin name', size: '30%' },
{ field: 'size', caption: 'Size (bytes)', size: '30%' },
{ field: 'changed', caption: 'Last changed', size: '40%' }
],
searches: [
{ type: 'text', field: 'name', caption: 'Plugin name' },
{ type: 'date', field: 'changed', caption: 'Last changed' }
],
toolbar: {
items: [
//{ type: 'break' },
{
type: 'html',
id: 'file_select',
html: '<form id="pinstaller_form" action="javascript:;" style="display:none;">'
+'<input type="hidden" name="test" value="10"/><input id="pinstaller_file" type="file" name="pfile" />'
+'</form><span style="display:none;" id="pinstaller_progr">Loading</p>'
}
],
onClick: function (target, data) {
console.log(target);
}
},
//event
onAdd: function (evt) {
$('#pinstaller_form').unbind('submit');
$('#pinstaller_file').unbind("change");
$('#pinstaller_form').submit(function(event){
event.preventDefault();
$('#pinstaller_progr').css("display","inline");
var formData = new FormData($(this)[0]);
$.ajax({
url: '/pluginsman/install',
type: 'POST',
data: formData,
async: false,
cache: false,
contentType: false,
processData: false,
success: function (returndata) {
$('#pinstaller_progr').css("display","none");
if(returndata.result == 1)
w2ui.pluginsgrid.reload();
else
w2alert(returndata.msg);
}
});
return false;
});
$('#pinstaller_file').on("change",function(){
//console.log("change in file");
$('#pinstaller_form').trigger('submit');
return false;
});
$('#pinstaller_file').trigger('click');
}
}
$().w2grid(pluginman_config);

View File

@ -0,0 +1,34 @@
// system config
var config = {
layout:{
name: 'layout',
panels: [
{
type: 'top',
size: 29,
style: 'padding: 0px;',
content: '',
title: 'RCAR HTTP Server Manager'
},
{
type: 'left',
size: 160,
style: 'padding: 0px;',
content: 'left'
},
{
type: 'main',
style: 'padding: 0px;',
content: 'main'
}
]
}
}
// init the main layout
$(function () {
$('#layout').w2layout(config.layout);
w2ui.layout.content('left', w2ui.sidebar);
w2ui.layout.content('main', w2ui.pluginsgrid);
});

View File

@ -0,0 +1,57 @@
var sidebar_config = {
name: 'sidebar',
nodes: [
{
id: 'level-sys',
text: 'System',
img: 'icon-folder',
expanded: true,
group: true,
nodes:
[
{
id: 'level-plug',
text: 'Plugins',
icon: 'fa-cogs'
},
{ id: 'level-fman', text: 'File manager', icon: 'fa-folder-open' }
]
},
{
id: 'level-api',
text: 'RPI. Car',
img: 'icon-folder',
group: true,
expanded:true,
nodes:
[
{ id: 'level-picam', text: 'Camera viewer', icon: 'fa-camera' },
// { id: 'level-2-3', text: 'Level 2.3', icon: 'fa-star-empty' }
]
}
],
onClick:function(event)
{
switch(event.target)
{
case 'level-plug':
w2ui.layout.content('main', w2ui.pluginsgrid);
break;
case 'level-fman':
w2ui.layout.content('main',w2ui.fileman_layout);
//w2ui.filemangrid.url = '/fileman';
//w2ui.filemangrid.reload();
//w2ui.filemangrid.route_path();
//console.log(w2ui.fi);
break;
case 'level-picam':
w2ui.layout.content('main', w2ui.picam_layout);
break;
default: //do nothing
w2ui.layout.content('main',"Empty page");
console.log('Event: ' + event.type + ' Target: ' + event.target);
console.log(event);
}
}
}
$().w2sidebar(sidebar_config);

0
build/htdocs/scripts/w2ui-1.4.2.js Executable file → Normal file
View File

BIN
build/htdocs/style/.DS_Store vendored Executable file → Normal file

Binary file not shown.

0
build/htdocs/style/font.min.css vendored Executable file → Normal file
View File

0
build/htdocs/style/fonts/.DS_Store vendored Executable file → Normal file
View File

0
build/htdocs/style/fonts/FontAwesome.otf Executable file → Normal file
View File

0
build/htdocs/style/fonts/fontawesome-webfont.eot Executable file → Normal file
View File

0
build/htdocs/style/fonts/fontawesome-webfont.svg Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 306 KiB

After

Width:  |  Height:  |  Size: 306 KiB

0
build/htdocs/style/fonts/fontawesome-webfont.ttf Executable file → Normal file
View File

0
build/htdocs/style/fonts/fontawesome-webfont.woff Executable file → Normal file
View File

0
build/htdocs/style/fonts/fontawesome-webfont.woff2 Executable file → Normal file
View File

View File

@ -1,70 +0,0 @@
#custom_top_header{
width: 100%;
height: 45px;
margin: 0;
padding: 0;
background-color: white;
border-bottom: 1px solid #194775;
}
#ct_left{
float: left;
width:50%;
height: 100%;
background-image: url(../images/logo.jpg);
background-repeat: no-repeat;
}
#ct_right{
float: right;
}
#ct_right ul{
padding:0;
margin: 0;
}
#ct_right ul li{
float:left;
padding: 0;
padding-top: 10px;
padding-bottom: 10px;
width: 40px;
background-color: #4D4D4D;
color: #999999;
font-style: bold;
border: 1px solid #3E3E3E;
margin: 0;
font-size: 20px;
margin-left: 3px;
border-radius: 8px;
text-align: center;
vertical-align: middle;
}
#ct_right ul li:hover{
cursor:pointer;
color: white;
}
#bt_workspace:before{
font-family: FontAwesome;
display: inline-block;
content:"\f120";
}
#bt_download_image:before{
font-family: FontAwesome;
display: inline;
content: "\f0ed";
}
#bt_save_image:before{
font-family: FontAwesome;
display: inline-block;
content:"\f0c7";
/*background-image: url(../images/ex.jpg) repeat 0 0;*/
}
#pg_log{
width: 100%;
height: 100%;
background-color: #F3DCAF;
font-style: italic;
border: 0;
padding: 5px;
resize: none;
}

0
build/htdocs/style/w2ui-1.4.2.css Executable file → Normal file
View File

BIN
build/httpd Executable file

Binary file not shown.

BIN
build/plugins/dummy.dylib Executable file

Binary file not shown.

BIN
build/plugins/fileman.dylib Executable file

Binary file not shown.

BIN
build/plugins/pluginsman.dylib Executable file

Binary file not shown.

View File

@ -1 +0,0 @@
From Foo

Binary file not shown.

View File

@ -90,7 +90,7 @@ void execute(int client,const char* method,dictionary rq)
}
json(client);
__t(client,RRECORD,dlist,frec+rrec,rpath,folder_list_from(rpath));
if(path) free(path);
//if(path) free(path);
//if(rpath) free(rpath);
if(tmp) free(tmp);

Binary file not shown.

Binary file not shown.