Cant fill editor fields with a standalone panel...
Cant fill editor fields with a standalone panel...
I try to edit some panels with editor.
my html is:
<div id="P_orga" class="SA_panel panel" data-editor-id="row_1109" data-editor-key="id_organisation" data-editor-db="orga">
<dl>
<dt> Nom : </dt>
<dd data-editor-field="nom" data-editor-value="CE CAFAT">CE CAFAT</dd>
<dt> ST : </dt>
<dd data-editor-field="statut_juridique" data-editor-value="SO">SO</dd>
<dt> ID : </dt>
<dd data-editor-field="identification" data-editor-value="CE">CE</dd>
<dt> Activite : </dt>
<dd data-editor-field="activite" data-editor-value="client">client</dd>
<dt> Date_creation : </dt>
<dd data-editor-field="date_creation" data-editor-value="2015-02-09">2015-02-09</dd>
<dt> Descriptif : </dt>
<dd data-editor-field="descriptif" data-editor-value="CE">CE</dd></dl>
</div>
the javascript is obvious also:
$(kSelect).on('click', '[data-editor-field]', function (event) {
panel = $(this).closest(".SA_panel")
db = panel.data("editor-db");
editor = window.CCCdata.GlobDT[db].editor; // editor is stored in global data
editor.edit(this);
});
The wole editors fields BUT the date, appears empty when editor opens.
modifying data-editor-id="row_1109"
to data-editor-id="1109"
doenst help at all.
Im a bit lost on the matter, if somebody could help please.
Michel from New Caledonia
Answers
Sorry
The wole editors fields appears empty when editor opens.
the date is set to a default value.
Hi Michel,
Could you give me a link to your page so I can debug it please?
Thanks,
Allan
yes alan i will build a debug page for that
Ok my mistake (partly).
editor.edit(this);
seems bad, bettereditor.edit('row_'+ panel.data('editor-id'));
For some reason,
panel.data
return id and not "row_id";leads to this code i f somebody interested: