Verified Commit 11ef6358 authored by Timm Fitschen's avatar Timm Fitschen
Browse files

BUG: init dragable

parent aa7aa783
......@@ -373,6 +373,7 @@ var edit_mode = new function() {
removeAllWaitingNotifications(editPanel);
editPanel.innerHTML = xml2str(model);
$(".caosdb-f-btn-toggle-edit-mode").text("Leave Edit Mode");
edit_mode.init_dragable();
if (typeof editApp == "undefined") {
$(".caosdb-entity-actions-panel > .btn").hide();
var editApp = this.init_edit_app();
......@@ -561,13 +562,17 @@ var edit_mode = new function() {
}
this.init_edit_app = function() {
this.init_dragable = function(){
var props = document.getElementsByClassName("caosdb-f-edit-drag");
for (var pel of props) {
pel.addEventListener("dragstart", edit_mode.prop_dragstart);
pel.setAttribute("draggable", true);
}
}
this.init_edit_app = function() {
var new_buttons = $('.caosdb-f-edit-panel-new-button');
var app = new StateMachine({
transitions: [{
......@@ -714,7 +719,7 @@ var edit_mode = new function() {
app.onLeaveInitial = function(e) {
console.log(e);
app.errorHandler(() => {
// remove event listeners which add the save button an so on
// remove event listeners, add the save button an so on
$('.caosdb-entity-panel').each(function(index) {
edit_mode.unset_entity_dropable(this, edit_mode.prop_dragover, edit_mode.prop_dragleave, parent_drop_listener, property_drop_listener);
edit_mode.remove_start_edit_button(this);
......
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