Browse Source

[oozie] Reset dirtiness on bundle save

Enrico Berti 10 years ago
parent
commit
629b8ff

+ 2 - 0
apps/oozie/src/oozie/templates/editor2/bundle_editor.mako

@@ -225,6 +225,8 @@ ${ dashboard.import_bindings() }
   var viewModel = new BundleEditorViewModel(${ bundle_json | n,unicode }, ${ coordinators_json | n,unicode }, ${ can_edit_json | n,unicode });
   ko.applyBindings(viewModel, $("#editor")[0]);
 
+  viewModel.bundle.tracker().markCurrentStateAsClean();
+
   var shareViewModel = initSharing("#documentShareModal");
   shareViewModel.setDocId(${ doc1_id });
 

+ 1 - 0
apps/oozie/static/js/bundle-editor.ko.js

@@ -118,6 +118,7 @@ var BundleEditorViewModel = function (bundle_json, coordinators_json, can_edit_j
     }, function (data) {
       if (data.status == 0) {
         self.bundle.id(data.id);
+        self.bundle.tracker().markCurrentStateAsClean();
         $(document).trigger("info", data.message);
         if (window.location.search.indexOf("bundle") == -1) {
           window.location.hash = '#bundle=' + data.id;