mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-01-31 06:39:11 +00:00
fhem_codemirror.js: remove the jquery loading (Forum #33226)
git-svn-id: https://svn.fhem.de/fhem/trunk@7853 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
2c43b4187f
commit
04ce019252
@ -1,24 +1,22 @@
|
||||
var cm_loaded = 0, cm_editor;
|
||||
|
||||
loadScript("pgm2/jquery.min.js", function(){
|
||||
$(document).ready(function(){
|
||||
var els = document.getElementsByTagName("textarea");
|
||||
if(els.length == 0)
|
||||
return;
|
||||
$(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=AddCodeMirror(s[0]);');
|
||||
}
|
||||
});
|
||||
} else {
|
||||
AddCodeMirror(els[0]);
|
||||
}
|
||||
});
|
||||
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=AddCodeMirror(s[0]);');
|
||||
}
|
||||
});
|
||||
} else {
|
||||
AddCodeMirror(els[0]);
|
||||
}
|
||||
});
|
||||
|
||||
function
|
||||
|
Loading…
Reference in New Issue
Block a user