##// END OF EJS Templates
Update minified YUI to version 2.9 built from Source....
Update minified YUI to version 2.9 built from Source. yui.2.9.js used to be a minified version of YUI 2.9 until 5143b8df576c updated it to something else and applied more aggresive minification. We stick to a clean but minified version 2.9. The license of YUI is BSD 3-clause, as described on http://yuilibrary.com/license/ . Since the minified version combines with GPLv3'd Javascript, it is only GPLv3'd compliant to distribute this Object Code version with the Corresponding Source (or offer therefor). This yui.2.9.js is built from Source this way: git clone https://github.com/yui/builder git clone https://github.com/yui/yui2 cd yui2/ git checkout hudson-yui2-2800 ln -sf JumpToPageDropDown.js src/paginator/js/JumpToPageDropdown.js # work around inconsistent casing rm -f tmp.js for m in yahoo event dom connection animation dragdrop element datasource autocomplete container event-delegate json datatable paginator; do rm -f build/$m/$m.js; ( cd src/$m && ant build deploybuild ) && sed -e 's,@VERSION@,2.9.0,g' -e 's,@BUILD@,2800,g' build/$m/$m.js >> tmp.js done java -jar ../builder/componentbuild/lib/yuicompressor/yuicompressor-2.4.4.jar tmp.js -o yui.2.9.js The source is mirrored and available on https://kallithea-scm.org/repos/mirror .

File last commit:

r4029:c9bcfe2d default
r4131:31f510a8 rhodecode-2.2.5-gpl
Show More
index.html
88 lines | 2.9 KiB | text/html | HtmlLexer
added codemirror edit mode with autodetection
r4026 <html>
<head>
<meta charset="utf-8">
<title>CodeMirror: VB.NET mode</title>
<link rel="stylesheet" href="../../lib/codemirror.css">
<script src="../../lib/codemirror.js"></script>
<script src="vb.js"></script>
<link rel="stylesheet" href="../../doc/docs.css">
<link href="http://fonts.googleapis.com/css?family=Inconsolata" rel="stylesheet" type="text/css">
<style>
.CodeMirror {border: 1px solid #aaa; height:210px; height: auto;}
.CodeMirror-scroll { overflow-x: auto; overflow-y: hidden;}
.CodeMirror pre { font-family: Inconsolata; font-size: 14px}
codecleaner
r4029 </style>
added codemirror edit mode with autodetection
r4026 <script type="text/javascript" src="../../addon/runmode/runmode.js"></script>
</head>
<body onload="init()">
<h1>CodeMirror: VB.NET mode</h1>
<script type="text/javascript">
function test(golden, text) {
var ok = true;
var i = 0;
function callback(token, style, lineNo, pos){
codecleaner
r4029 //console.log(String(token) + " " + String(style) + " " + String(lineNo) + " " + String(pos));
added codemirror edit mode with autodetection
r4026 var result = [String(token), String(style)];
if (golden[i][0] != result[0] || golden[i][1] != result[1]){
return "Error, expected: " + String(golden[i]) + ", got: " + String(result);
ok = false;
}
i++;
}
codecleaner
r4029 CodeMirror.runMode(text, "text/x-vb",callback);
added codemirror edit mode with autodetection
r4026
if (ok) return "Tests OK";
}
function testTypes() {
var golden = [['Integer','keyword'],[' ','null'],['Float','keyword']]
var text = "Integer Float";
return test(golden,text);
}
function testIf(){
var golden = [['If','keyword'],[' ','null'],['True','keyword'],[' ','null'],['End','keyword'],[' ','null'],['If','keyword']];
var text = 'If True End If';
return test(golden, text);
}
function testDecl(){
var golden = [['Dim','keyword'],[' ','null'],['x','variable'],[' ','null'],['as','keyword'],[' ','null'],['Integer','keyword']];
var text = 'Dim x as Integer';
return test(golden, text);
}
function testAll(){
var result = "";
result += testTypes() + "\n";
result += testIf() + "\n";
result += testDecl() + "\n";
return result;
}
function initText(editor) {
var content = 'Class rocket\nPrivate quality as Double\nPublic Sub launch() as String\nif quality > 0.8\nlaunch = "Successful"\nElse\nlaunch = "Failed"\nEnd If\nEnd sub\nEnd class\n';
editor.setValue(content);
for (var i =0; i< editor.lineCount(); i++) editor.indentLine(i);
}
function init() {
editor = CodeMirror.fromTextArea(document.getElementById("solution"), {
lineNumbers: true,
mode: "text/x-vb",
readOnly: false,
tabMode: "shift"
});
runTest();
}
function runTest() {
codecleaner
r4029 document.getElementById('testresult').innerHTML = testAll();
added codemirror edit mode with autodetection
r4026 initText(editor);
codecleaner
r4029
added codemirror edit mode with autodetection
r4026 }
</script>
<div id="edit">
<textarea style="width:95%;height:200px;padding:5px;" name="solution" id="solution" ></textarea>
</div>
<pre id="testresult"></pre>
<p>MIME type defined: <code>text/x-vb</code>.</p>
</body></html>