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/20 00:24:40 UTC
[20/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/53a24652
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/53a24652
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/53a24652
Branch: refs/heads/master
Commit: 53a24652061325bb4ba7944499472e9dbd116494
Parents: 0d08a75
Author: Russell Branca <ch...@gmail.com>
Authored: Wed Mar 13 15:15:02 2013 -0700
Committer: Russell Branca <ch...@gmail.com>
Committed: Wed Mar 13 15:15:20 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/53a24652/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) {