Эх сурвалжийг харах

HUE-4088 [oozie] Make workflow action parameter dragabble

Enrico Berti 9 жил өмнө
parent
commit
15e2d39

+ 8 - 2
apps/oozie/src/oozie/templates/editor2/common_workflow.mako

@@ -494,8 +494,11 @@
       ${ _('Arguments') } <i class="fa fa-plus"></i>
     </a>
   </h6>
-  <ul class="unstyled" data-bind="visible: properties.arguments().length > 0, foreach: properties.arguments">
+  <ul class="unstyled white sortable-arguments" data-bind="visible: properties.arguments().length > 0,  sortable: { data: properties.arguments, options: { axis: 'y', containment: 'parent' }}">
     <li style="margin-bottom: 3px">
+      <span class="muted move-widget">
+        <i class="fa fa-arrows"></i>
+      </span>
       <input type="text" class="span11" data-bind="value: value, attr: { placeholder: $root.workflow_properties.arguments.help_text }" validate="nonempty"/>
       <a href="#" data-bind="click: function(){ $parent.properties.arguments.remove(this); $(document).trigger('drawArrows') }">
         <i class="fa fa-minus"></i>
@@ -840,8 +843,11 @@
             ${ _('Arguments') } <i class="fa fa-plus"></i>
           </a>
         </h6>
-        <ul class="unstyled" data-bind="visible: properties.spark_arguments().length > 0, foreach: properties.spark_arguments">
+        <ul class="unstyled white sortable-arguments" data-bind="visible: properties.spark_arguments().length > 0, sortable: { data: properties.spark_arguments, options: { axis: 'y', containment: 'parent' }}">
           <li>
+            <span class="muted move-widget">
+              <i class="fa fa-arrows"></i>
+            </span>
             <input type="text" class="input-xlarge filechooser-input seventy" data-bind="filechooser: value, filechooserOptions: globalFilechooserOptions, hdfsAutocomplete: value, attr: { placeholder:  $root.workflow_properties.spark_arguments.help_text }" validate="nonempty"/>
             <span data-bind='template: { name: "common-fs-link", data: {path: value, with_label: false}}'></span>
             <a href="#" data-bind="click: function(){ $parent.properties.spark_arguments.remove(this); $(document).trigger('drawArrows') }">

+ 13 - 0
desktop/core/src/desktop/static/desktop/css/common_dashboard.css

@@ -34,6 +34,10 @@
   min-height: 100px;
 }
 
+.ui-sortable.white {
+  background-color: #FFF!important;
+}
+
 .ui-sortable h2 {
   padding-left: 10px !important;
 }
@@ -48,6 +52,15 @@
   background-color: #FFF;
 }
 
+.sortable-arguments {
+  margin-left: -10px!important;
+  width: 99%;
+}
+
+.sortable-arguments li {
+  margin-left: 10px;
+}
+
 .card-column, .card-additional {
   border: none;
 }