Przeglądaj źródła

[oozie] Move Save button to Properties tab

As the cancel action in Workflow Editor is moved to Hue 2.2,
moving the Save button to not be confusing.
Fix js bug
Romain Rigaux 13 lat temu
rodzic
commit
59cf1c9

+ 25 - 22
apps/oozie/src/oozie/templates/editor/edit_workflow.mako

@@ -121,6 +121,9 @@ ${ layout.menubar(section='workflows') }
             ${ graph }
             ${ graph }
           </div>
           </div>
         </div>
         </div>
+        <div class="form-actions center">
+          <a href="${ url('oozie:list_workflows') }" class="btn">${ _('Back') }</a>
+        </div>
       </div>
       </div>
 
 
       <div class="tab-pane" id="properties">
       <div class="tab-pane" id="properties">
@@ -138,6 +141,12 @@ ${ layout.menubar(section='workflows') }
              </fieldset>
              </fieldset>
            </div>
            </div>
         </div>
         </div>
+        <div class="form-actions center">
+          <a href="${ url('oozie:list_workflows') }" class="btn">${ _('Back') }</a>
+          % if user_can_edit_job:
+            <button data-bind="click: submit" class="btn btn-primary">${ _('Save') }</button>
+          % endif
+        </div>
       </div>
       </div>
 
 
       <div class="tab-pane" id="history">
       <div class="tab-pane" id="history">
@@ -163,13 +172,6 @@ ${ layout.menubar(section='workflows') }
         % endif
         % endif
       </div>
       </div>
     </div>
     </div>
-
-    <div class="form-actions center">
-      <a href="${ url('oozie:list_workflows') }" class="btn">${ _('Back') }</a>
-      % if user_can_edit_job:
-        <button data-bind="click: submit" class="btn btn-primary">${ _('Save') }</button>
-      % endif
-    </div>
   </form>
   </form>
 </div>
 </div>
 
 
@@ -192,23 +194,24 @@ ${ layout.menubar(section='workflows') }
       window.location = $(this).attr('data-edit');
       window.location = $(this).attr('data-edit');
     });
     });
 
 
-  $(".modalWindow").click(function(){
-    var _this = $(this);
-    $.ajax({
-      url: _this.attr("data-modal-url"),
-      beforeSend: function(xhr){
-        xhr.setRequestHeader("X-Requested-With", "Hue");
-      },
-      dataType: "html",
-      success: function(data){
-        var id = _this.attr("data-modal-id");
-        $(id).html(data);
-        $(id).modal("show");
-      }
+    $(".modalWindow").click(function(){
+      var _this = $(this);
+      $.ajax({
+        url: _this.attr("data-modal-url"),
+        beforeSend: function(xhr){
+          xhr.setRequestHeader("X-Requested-With", "Hue");
+        },
+        dataType: "html",
+        success: function(data){
+          var id = _this.attr("data-modal-id");
+          $(id).html(data);
+          $(id).modal("show");
+        }
+      });
     });
     });
-  });
 
 
-  $("a[data-row-selector='true']").jHueRowSelector();
+    $("a[data-row-selector='true']").jHueRowSelector();
+  });
 </script>
 </script>
 
 
 ${ utils.path_chooser_libs(True) }
 ${ utils.path_chooser_libs(True) }