diff options
Diffstat (limited to 'internal/admin/static/objecteditor.js')
| -rw-r--r-- | internal/admin/static/objecteditor.js | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/internal/admin/static/objecteditor.js b/internal/admin/static/objecteditor.js index c2374a7..4d02295 100644 --- a/internal/admin/static/objecteditor.js +++ b/internal/admin/static/objecteditor.js @@ -775,9 +775,14 @@ function saveObject() { out.id = objectID; - API.put('/api/objects/' + encodeURIComponent(objectID), out).then(function() { + API.put('/api/objects/' + encodeURIComponent(objectID), out).then(function(resp) { notify('Object ' + objectID + ' saved', 'success'); updateUndoBar(); + if (resp && resp._raw) { + objectData._raw = resp._raw; + var pre = document.querySelector('#tabYaml pre'); + if (pre) pre.textContent = objectData._raw; + } }).catch(function(e) { notify('Save failed: ' + e.message, 'error'); }); } |
