Commit d7a4c3fc authored by Romain Courteaud's avatar Romain Courteaud

erp5_run_my_doc: allow viewing/editing the slide title with the comment

parent 4e97f824
......@@ -278,10 +278,11 @@
["bottom", [["your_slide_content"]]]
]
}
};
// Show chapter_title and slide_type inputs only during slide editing
if (title_html !== null && type !== null) {
},
extra_group_list = [];
// Show chapter_title and slide_type inputs only during slide editing
if (title_html !== null) {
ck_editor_json.erp5_document._embedded._view.your_chapter_title = {
"title": translation_dict["Chapter Title"],
"type": "StringField",
......@@ -290,7 +291,10 @@
"key": "title_html",
"value": title_html
};
extra_group_list.push(["your_chapter_title"]);
}
if (type !== null) {
ck_editor_json.erp5_document._embedded._view.your_slide_type = {
"title": translation_dict["Type of Slide"],
"type": "ListField",
......@@ -305,6 +309,7 @@
],
value: type
};
extra_group_list.push(["your_slide_type"]);
if (image_url !== null) {
ck_editor_json.erp5_document._embedded._view.your_image_url = {
......@@ -324,25 +329,15 @@
"key": "image_caption",
"value": image_caption
};
ck_editor_json.form_definition.group_list = [
["left", [
["your_chapter_title"],
["your_slide_type"],
["your_image_url"],
["your_image_caption"]
]]
].concat(ck_editor_json.form_definition.group_list);
} else {
ck_editor_json.form_definition.group_list = [
["left", [
["your_chapter_title"],
["your_slide_type"]
]]
].concat(ck_editor_json.form_definition.group_list);
extra_group_list.push(["your_image_url"], ["your_image_caption"]);
}
}
if (extra_group_list.length !== 0) {
ck_editor_json.form_definition.group_list = [
["left", extra_group_list]
].concat(ck_editor_json.form_definition.group_list);
}
return ck_editor_json;
}
......@@ -384,7 +379,7 @@
translation_dict,
"comment_html",
slide_dict.comment_html,
null,
slide_dict.title_html,
null,
null,
null
......
......@@ -74,7 +74,7 @@
</tr>
<tr>
<td>waitForElementPresent</td>
<td>title_html</td>
<td>type</td>
<td></td>
</tr>
<tr>
......@@ -93,7 +93,7 @@
</tr>
<tr>
<td>waitForElementNotPresent</td>
<td>title_html</td>
<td>type</td>
<td></td>
</tr>
......@@ -114,7 +114,7 @@
</tr>
<tr>
<td>waitForElementPresent</td>
<td>title_html</td>
<td>type</td>
<td></td>
</tr>
......@@ -144,7 +144,7 @@
</tr>
<tr>
<td>waitForElementNotPresent</td>
<td>title_html</td>
<td>type</td>
<td></td>
</tr>
......@@ -184,7 +184,7 @@
</tr>
<tr>
<td>waitForElementNotPresent</td>
<td>title_html</td>
<td>type</td>
<td></td>
</tr>
......@@ -198,7 +198,7 @@
</tr>
<tr>
<td>waitForElementPresent</td>
<td>title_html</td>
<td>type</td>
<td></td>
</tr>
......@@ -372,7 +372,7 @@
</tr>
<tr>
<td>waitForElementPresent</td>
<td>title_html</td>
<td>type</td>
<td></td>
</tr>
<tr>
......
......@@ -133,7 +133,7 @@
</tr>
<tr>
<td>waitForElementPresent</td>
<td>title_html</td>
<td>type</td>
<td></td>
</tr>
......
......@@ -74,7 +74,7 @@
</tr>
<tr>
<td>waitForElementPresent</td>
<td>title_html</td>
<td>type</td>
<td></td>
</tr>
<tr>
......@@ -93,7 +93,7 @@
</tr>
<tr>
<td>waitForElementNotPresent</td>
<td>title_html</td>
<td>type</td>
<td></td>
</tr>
......
Markdown is supported
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