Преглед изворни кода

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

Enrico Berti пре 11 година
родитељ
комит
6e50935558
1 измењених фајлова са 6 додато и 1 уклоњено
  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) {