Skip to content
Snippets Groups Projects
Commit 901a85b9 authored by llaffont's avatar llaffont
Browse files

Correction sauvegarde des données CKEditor en ajax

parent dedc3713
Branches
Tags
No related merge requests found
......@@ -5,6 +5,7 @@ $currentYear--;
Class_ScriptLoader::getInstance()
->addJQueryReady('
CKEDITOR.on("instanceReady", function(){$("#description_editor").hide()});
$("#description_editor_switch")
.click(function(){
$("#description_editor").toggle("fast");
......@@ -169,7 +170,7 @@ echo $this->article->getRefusMessage(); ?></textarea>
<div id="description_editor_switch" class="subfieldset">
<?php echo $this->traduire("Cliquez ici pour modifier"); ?>
</div>
<div id="description_editor" style="display:none">
<div id="description_editor">
<?php echo $this->ckEditor($this->article->getDescription(), 'ckeditor_description') ?>
</div>
</fieldset>
......
......@@ -15,6 +15,9 @@
window.initializeAjaxFormSubmit = function(form) {
form.submit(function(event) {
for ( instance in CKEDITOR.instances )
CKEDITOR.instances[instance].updateElement();
event.preventDefault();
$.ajax({
type: "POST",
......@@ -123,7 +126,9 @@
window.addLoadingClass = function () {
current_anchor.parent().first().addClass(loading);
if (current_anchor == undefined)
return;
current_anchor.parent().first().addClass(loading);
}
})()
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment