mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-01-31 18:59:33 +00:00
d618ddc172
- feature: codemirror modules now loaded by default: search.js, comment.js dialog.js, autorefresh.js, searchcursor.js, dialog.css codemirror search & replace is now activated by default. to use this feature now you must only load in fhemweb attribute 'JavaScripts' the codemirror/fhem_codemirror.js file new extraKeys for 'TAB', 'Shift+Tab', 'STRG+Q', 'STRG+UP', and 'STRG+DOWN' are added. codemirror default parameters are now: indentUnit:4, indentWithTabs:false, autoCloseBrackets:false, matchBrackets:true, autofocus:true, theme:"blackboard", lineNumbers:true, autoRefresh:true this can be overwritten with fhemweb attribute 'codemirrorParam' - updated: codemirror version to 5.8 the default codemirror javascript files are now minified git-svn-id: https://svn.fhem.de/fhem/trunk@9668 2b470e98-0d58-463d-a4d8-8e2adae1ed80
2 lines
843 B
JavaScript
2 lines
843 B
JavaScript
(function(c){"object"==typeof exports&&"object"==typeof module?c(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],c):c(CodeMirror)})(function(c){function f(b,a){function d(){b.display.wrapper.offsetHeight?(e(b,a),b.display.lastWrapHeight!=b.display.wrapper.clientHeight&&b.refresh()):a.timeout=setTimeout(d,a.delay)}a.timeout=setTimeout(d,a.delay);a.hurry=function(){clearTimeout(a.timeout);a.timeout=setTimeout(d,50)};c.on(window,"mouseup",a.hurry);
|
|
c.on(window,"keyup",a.hurry)}function e(b,a){clearTimeout(a.timeout);c.off(window,"mouseup",a.hurry);c.off(window,"keyup",a.hurry)}c.defineOption("autoRefresh",!1,function(b,a){b.state.autoRefresh&&(e(b,b.state.autoRefresh),b.state.autoRefresh=null);a&&0==b.display.wrapper.offsetHeight&&f(b,b.state.autoRefresh={delay:a.delay||250})})}); |