Skip to content
Snippets Groups Projects
Commit cd7a728f authored by Maximilian Giller's avatar Maximilian Giller
Browse files

Implemented simple save button

parent c5d8872f
No related branches found
No related tags found
No related merge requests found
......@@ -14,6 +14,7 @@
<ul id="selected-targets"></ul>
</section>
</section>
<button id="save" type="submit" class="primary">Save and publish</button>
<section>
<h3>Collected items</h3>
<ul id="selected-items"></ul>
......
import jQuery from "jquery";
import { state } from "./editor";
import { state, graph } from "./editor";
import { saveGraphJson } from "../../datasets/datasets";
/**
* Initiates all the handlers for button presses and input changes.
......@@ -8,4 +9,7 @@ export function initInteractions() {
jQuery("button#clear-collection").on("click", () => {
state.clearSelectedItems();
});
jQuery("button#save").on("click", () => {
saveGraphJson(space_id, graph.getCleanData()); // space_id defined globaly through knowledge-space.php
});
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment