Explorar o código

[oozie] Moving to a fork doesn't create a new node

Enrico Berti %!s(int64=11) %!d(string=hai) anos
pai
achega
6e50935558
Modificáronse 1 ficheiros con 6 adicións e 1 borrados
  1. 6 1
      apps/oozie/static/js/workflow-editor.ko.js

+ 6 - 1
apps/oozie/static/js/workflow-editor.ko.js

@@ -327,7 +327,7 @@ var Workflow = function (vm, workflow) {
     }
   };
   
-  self.moveNode = function(widget) { alert(vm.currentlyCreatingFork);
+  self.moveNode = function(widget) {
     if (! vm.currentlyCreatingFork) {
       var node = self.getNodeById(widget.id());
       var oldChildId = ko.mapping.toJS(node.get_link('to'))['to'];
@@ -504,6 +504,11 @@ var WorkflowEditorViewModel = function (layout_json, workflow_json, credentials_
         vm: self
       });
 
+      if (self.currentlyDraggedWidget.id() != ""){
+        self.removeWidgetById(self.currentlyDraggedWidget.id());
+        _w = self.currentlyDraggedWidget;
+      }
+
       if (row.columns().length == 0) {
         var _col = row.addColumn(null, atBeginning);
         if (row.widgets().length > 0) {