Browse Source

[frontend] fixed calendar button alignment in Oozie WF Submit form (#3740)

* [frontend] fixed calendar button alignment in Oozie WF Submit form

* [frontend] fixed changes as per the suggestions

* inserted an enter

* made changes as per the suggestions

* removing the event handler after hide

---------

Co-authored-by: tarunjangid <tj@cloudera.com>
Co-authored-by: Johan Åhlén <johan@johanahlen.com>
Tarun Jangid 1 year ago
parent
commit
9a85afab12
1 changed files with 11 additions and 0 deletions
  1. 11 0
      desktop/core/src/desktop/templates/scheduler/submit_job_popup.mako

+ 11 - 0
desktop/core/src/desktop/templates/scheduler/submit_job_popup.mako

@@ -128,6 +128,7 @@ else:
   }
   #param-container .btn-group {
     margin-left: 10px;
+    position: absolute;
   }
 </style>
 
@@ -163,7 +164,17 @@ else:
       else if (_el.val().indexOf("T") == "-1") {
         _el.val(_el.val() + "T" + _val.split("T")[1]);
       }
+
+      $(document).off("click.hideDatepicker");
+    }).on("show", function() {
+      $(document).on("click.hideDatepicker", function (event) {
+        if (!$(event.target).closest(".datepicker, .calendar-link, input[type='text']").length) {
+          _el.datepicker('hide');
+          $(document).off("click.hideDatepicker");
+        }
+      });
     });
+    
     _el.datepicker('show');
     huePubSub.subscribeOnce('hide.datepicker', function () {
       _el.datepicker('hide');