forked from Wavyzz/dolibarr
Fix condition of usage of ckeditor
This commit is contained in:
@@ -135,14 +135,17 @@ function ajax_autocompleter($selected, $htmlname, $url, $urloption='', $minLengt
|
||||
});
|
||||
}
|
||||
if (ui.item.textarea) {
|
||||
$.each(ui.item.textarea, function(key, value) {
|
||||
if (typeof CKEDITOR == "object") {
|
||||
CKEDITOR.instances[key].setData(value);
|
||||
CKEDITOR.instances[key].focus();
|
||||
} else {
|
||||
$("#" + key).html(value);
|
||||
$("#" + key).focus();
|
||||
}
|
||||
$.each(ui.item.textarea, function(key, value) {';
|
||||
if (! empty($conf->fckeditor->enabled) && ! empty($conf->global->FCKEDITOR_ENABLE_DETAILS)) {
|
||||
$script.= ' // We use CKEditor
|
||||
CKEDITOR.instances[key].setData(value);
|
||||
CKEDITOR.instances[key].focus();';
|
||||
} else {
|
||||
$script.= ' // We use a simple textarea
|
||||
$("#" + key).html(value);
|
||||
$("#" + key).focus();';
|
||||
}
|
||||
$script.='
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user