couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chewbra...@apache.org
Subject [24/27] git commit: Fix code editor to save deleted fields
Date Fri, 15 Mar 2013 16:53:43 GMT
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/fauxton
Commit: 53a24652061325bb4ba7944499472e9dbd116494
Parents: 0d08a75
Author: Russell Branca <chewbranca@gmail.com>
Authored: Wed Mar 13 15:15:02 2013 -0700
Committer: Russell Branca <chewbranca@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) {


Mime
View raw message