2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-01-31 06:39:11 +00:00

www/codemirror/fhem_codemirror.js: Removed initialisation of CM-Editor, this is now done by fhemweb.js. Forum #52379

git-svn-id: https://svn.fhem.de/fhem/trunk@11281 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rapster 2016-04-18 19:04:58 +00:00
parent 0d46dbf45b
commit 20cffadd45

View File

@ -53,25 +53,6 @@ var cm_attr = {
}
};
$(document).ready(function(){
var els = document.getElementsByTagName("textarea");
if(els.length == 0)
return;
if($(els[0]).closest("div#edit").css("display")=="none") { // DEF special
$("table.internals a").each(function(){
var oc = $(this).attr("onclick");
if(oc) {
$(this).attr("onclick", oc+
's=document.getElementById("edit").getElementsByTagName("textarea");'+
'if(!s[0].editor) { s[0].editor=true; AddCodeMirror(s[0]);}');
}
});
} else {
AddCodeMirror(els[0]);
}
});
function AddCodeMirror(e, cb) {
if(cm_active && cm_loaded == cm_active)
return cm_wait(e, cb);