Browse Source

HUE-5853 [oozie] Move the new workflow node dropping to async

Enrico Berti 8 years ago
parent
commit
af94536

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

@@ -286,8 +286,7 @@ var Workflow = function (vm, workflow) {
             callback(widget, sourceNode);
           }
         }
-      },
-      async: false
+      }
     });
     logGA('new_node/' + widget.widgetType());
   };

+ 5 - 4
apps/oozie/src/oozie/templates/editor2/workflow_editor.mako

@@ -652,8 +652,9 @@ ${ dashboard.import_bindings() }
   function widgetDraggedAdditionalHandler(widget) {
     $("canvas").remove();
     if (viewModel.currentlyDraggedWidget() && viewModel.currentlyDraggedWidget().id() == ""){
-      viewModel.workflow.newNode(widget);
-      showAddActionDemiModal(widget);
+      viewModel.workflow.newNode(widget, function() {
+        showAddActionDemiModal(widget);
+      });
     }
     else {
       if (viewModel.currentlyDraggedOp() == "move"){
@@ -677,7 +678,7 @@ ${ dashboard.import_bindings() }
 
     _el.css("position", "absolute");
     _el.css({
-      "top": (lastSeenPosition.top) + "px",
+      "top": lastSeenPosition.top + "px",
       "left": lastSeenPosition.left + "px",
       "width": 450
     });
@@ -750,7 +751,7 @@ ${ dashboard.import_bindings() }
         _el.parent().css("height", viewModel.isEditing() ? _el.height() : (_el.height() + 17) + "px");
         _el.css("position", "absolute");
         _el.css({
-          "top": (lastSeenPosition.top) + "px",
+          "top": lastSeenPosition.top + "px",
           "left": lastSeenPosition.left + "px",
           "width": _width,
           "marginBottom": "20px"