You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ch...@apache.org on 2013/03/15 22:50:08 UTC
[39/50] git commit: Fix code editor to save deleted fields
Fix code editor to save deleted fields
Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/a7196691
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/a7196691
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/a7196691
Branch: refs/heads/fauxton-rebase
Commit: a719669108fee604b55cfdf01e0d278a5ad63ca9
Parents: a471629
Author: Russell Branca <ch...@gmail.com>
Authored: Wed Mar 13 15:15:02 2013 -0700
Committer: Russell Branca <ch...@gmail.com>
Committed: Fri Mar 15 14:37:34 2013 -0700
----------------------------------------------------------------------
src/fauxton/app/modules/documents/views.js | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/couchdb/blob/a7196691/src/fauxton/app/modules/documents/views.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/modules/documents/views.js b/src/fauxton/app/modules/documents/views.js
index 9b4bb71..6f370cc 100644
--- a/src/fauxton/app/modules/documents/views.js
+++ b/src/fauxton/app/modules/documents/views.js
@@ -537,6 +537,7 @@ function(app, FauxtonAPI, Codemirror, JSHint) {
var json, notification;
if (this.hasValidCode()) {
json = JSON.parse(this.editor.getValue());
+ this.model.clear({silent:true});
this.model.set(json);
notification = FauxtonAPI.addNotification({msg: "Saving document."});
this.model.save().error(function(xhr) {