Selaa lähdekoodia

[oozie] Fix expanded widget status

Enrico Berti 11 vuotta sitten
vanhempi
commit
be785d7ecd
1 muutettua tiedostoa jossa 20 lisäystä ja 18 poistoa
  1. 20 18
      apps/oozie/src/oozie/templates/editor/workflow_editor.mako

+ 20 - 18
apps/oozie/src/oozie/templates/editor/workflow_editor.mako

@@ -1989,24 +1989,26 @@ ${ dashboard.import_bindings() }
   var lastExpandedWidget = null;
   function setLastExpandedWidget(widget) {
     lastExpandedWidget = widget;
-    var _el = $("#wdg_" + widget.id());
-    if (_el.width() < 400){
-      _el.css("z-index", "1032");
-      lastSeenPosition = _el.position();
-      var _width = _el.width();
-
-      _el.css("position", "absolute");
-      _el.css({
-        "top": (lastSeenPosition.top) + "px",
-        "left": lastSeenPosition.left + "px",
-        "width": _width
-      });
-      _el.width(500);
-      $("#exposeOverlay").fadeIn(300);  
-      widget.oozieExpanded(true);
-    }
-    else {
-      widget.oozieExpanded(false);
+    if (!widget.oozieExpanded()){
+      var _el = $("#wdg_" + widget.id());
+      if (_el.width() < 400){
+        _el.css("z-index", "1032");
+        lastSeenPosition = _el.position();
+        var _width = _el.width();
+
+        _el.css("position", "absolute");
+        _el.css({
+          "top": (lastSeenPosition.top) + "px",
+          "left": lastSeenPosition.left + "px",
+          "width": _width
+        });
+        _el.width(500);
+        $("#exposeOverlay").fadeIn(300);  
+        widget.oozieExpanded(true);
+      }
+      else {
+        widget.oozieExpanded(false);
+      }
     }
   }