Skip to content
Snippets Groups Projects
Commit 9ae2d2d0 authored by Henrik tom Wörden's avatar Henrik tom Wörden
Browse files

update

parent 10849c66
No related branches found
No related tags found
1 merge request!32Reload Edit Mode toolbox after creating RTs and Properties
Pipeline #8305 failed
......@@ -1163,6 +1163,8 @@ async function retrieve_dragged_property(id) {
* a web page using a specialized XSLT named entity palette.
* @return An array of entities.
*/
//TODO the name is inaccurate; actually the existing RT/Property panel is
//created; Suggestion: Split it or rename
async function retrieve_data_model() {
// TODO possibly allow single query
let props = await connection.get("Entity/?query=FIND Property");
......
......@@ -600,7 +600,7 @@ var edit_mode = new function() {
* Reload the toolbox, e.g. when new Properties or RecordTypes have been added.
*/
this.reload_edit_mode_toolbox = async function() {
var model = await edit_mode.retrieve_data_model();
const model = await edit_mode.retrieve_data_model();
edit_mode.load_tool_box(model);
}
......@@ -634,7 +634,9 @@ var edit_mode = new function() {
edit_mode.add_draggable_property_to_model(model);
var editPanel = edit_mode.get_edit_panel();
removeAllWaitingNotifications(editPanel);
editPanel.innerHTML = xml2str(model);
// remove previously added model
$(".caosdb-f-edit-mode-existing").remove()
$(editPanel).children()[0].appendChild(model);
}
......
......@@ -3,11 +3,6 @@
<xsl:output method="html"/>
<xsl:template match="/Response">
<div class="list-group list-group-flush">
<div class="list-group-item btn-group-vertical caosdb-v-editmode-btngroup caosdb-f-edit-mode-create-buttons">
<button type="button" class="btn btn-secondary caosdb-f-edit-panel-new-button new-property">Create Property</button>
<button type="button" class="btn btn-secondary caosdb-f-edit-panel-new-button new-recordtype">Create RecordType</button>
</div>
<div title="Drag and drop Properties from this panel to the Entities on the left." class="caosdb-v-editmode-existing caosdb-f-edit-mode-existing d-none">
<div class="card-header">
<h6>Existing Properties</h6>
......@@ -35,7 +30,6 @@
<xsl:apply-templates select="./RecordType"/>
</ul>
</div>
</div>
</div>
</xsl:template>
......
......@@ -120,7 +120,14 @@
<div class="card-header">
<span class="card-title">Edit Mode Toolbox</span>
</div>
<div class="caosdb-f-edit-panel-body"></div>
<div class="caosdb-f-edit-panel-body">
<div class="list-group list-group-flush">
<div class="list-group-item btn-group-vertical caosdb-v-editmode-btngroup caosdb-f-edit-mode-create-buttons">
<button type="button" class="btn btn-secondary caosdb-f-edit-panel-new-button new-property">Create Property</button>
<button type="button" class="btn btn-secondary caosdb-f-edit-panel-new-button new-recordtype">Create RecordType</button>
</div>
</div>
</div>
</div>
</div>
</div>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment