##// END OF EJS Templates
Add javascript for Object Code excanvas (flot) version herein included and use that instead of minified version....
Add javascript for Object Code excanvas (flot) version herein included and use that instead of minified version. I had a bit of trouble finding the upstream on excanvas, as the version from Google, which appears to be the original source, seems unmaintained. However, it appears the version we're carrying in Kallithea is indeed from the excanvas era of flot. $ (cd /tmp; \ svn -r 135 checkout http://flot.googlecode.com/svn/trunk/ flot ) $ cp /tmp/flot/excanvas.js rhodecode/public/js/excanvas.js I also verified the sha256sum of the min file matched ours: $ sha256sum /tmp/flot/excanvas.min.js rhodecode/public/js/excanvas.min.js 5f94b032a110504b7b261eaf71392fa3e8d82cdc6455c0cba5c9f03cd34ed122 /tmp/flot/excanvas.min.js 5f94b032a110504b7b261eaf71392fa3e8d82cdc6455c0cba5c9f03cd34ed122 rhodecode/public/js/excanvas.min.js

File last commit:

r4026:a60a0e90 default
r4132:531ab818 rhodecode-2.2.5-gpl
Show More
htmlembedded.js
73 lines | 2.6 KiB | application/javascript | JavascriptLexer
CodeMirror.defineMode("htmlembedded", function(config, parserConfig) {
//config settings
var scriptStartRegex = parserConfig.scriptStartRegex || /^<%/i,
scriptEndRegex = parserConfig.scriptEndRegex || /^%>/i;
//inner modes
var scriptingMode, htmlMixedMode;
//tokenizer when in html mode
function htmlDispatch(stream, state) {
if (stream.match(scriptStartRegex, false)) {
state.token=scriptingDispatch;
return scriptingMode.token(stream, state.scriptState);
}
else
return htmlMixedMode.token(stream, state.htmlState);
}
//tokenizer when in scripting mode
function scriptingDispatch(stream, state) {
if (stream.match(scriptEndRegex, false)) {
state.token=htmlDispatch;
return htmlMixedMode.token(stream, state.htmlState);
}
else
return scriptingMode.token(stream, state.scriptState);
}
return {
startState: function() {
scriptingMode = scriptingMode || CodeMirror.getMode(config, parserConfig.scriptingModeSpec);
htmlMixedMode = htmlMixedMode || CodeMirror.getMode(config, "htmlmixed");
return {
token : parserConfig.startOpen ? scriptingDispatch : htmlDispatch,
htmlState : CodeMirror.startState(htmlMixedMode),
scriptState : CodeMirror.startState(scriptingMode)
};
},
token: function(stream, state) {
return state.token(stream, state);
},
indent: function(state, textAfter) {
if (state.token == htmlDispatch)
return htmlMixedMode.indent(state.htmlState, textAfter);
else if (scriptingMode.indent)
return scriptingMode.indent(state.scriptState, textAfter);
},
copyState: function(state) {
return {
token : state.token,
htmlState : CodeMirror.copyState(htmlMixedMode, state.htmlState),
scriptState : CodeMirror.copyState(scriptingMode, state.scriptState)
};
},
electricChars: "/{}:",
innerMode: function(state) {
if (state.token == scriptingDispatch) return {state: state.scriptState, mode: scriptingMode};
else return {state: state.htmlState, mode: htmlMixedMode};
}
};
}, "htmlmixed");
CodeMirror.defineMIME("application/x-ejs", { name: "htmlembedded", scriptingModeSpec:"javascript"});
CodeMirror.defineMIME("application/x-aspx", { name: "htmlembedded", scriptingModeSpec:"text/x-csharp"});
CodeMirror.defineMIME("application/x-jsp", { name: "htmlembedded", scriptingModeSpec:"text/x-java"});
CodeMirror.defineMIME("application/x-erb", { name: "htmlembedded", scriptingModeSpec:"ruby"});