couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gar...@apache.org
Subject [03/14] git commit: updated refs/heads/index-pagination to db85b98
Date Tue, 10 Sep 2013 14:03:49 GMT
Check if codemirror has already been added and remove


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/8c8e5a46
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/8c8e5a46
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/8c8e5a46

Branch: refs/heads/index-pagination
Commit: 8c8e5a4671377563be6dcc942c976f9ae602c76a
Parents: 4eb2a38
Author: suelockwood <deathbearbrown@gmail.com>
Authored: Fri Sep 6 11:56:42 2013 -0400
Committer: suelockwood <deathbearbrown@gmail.com>
Committed: Fri Sep 6 11:56:42 2013 -0400

----------------------------------------------------------------------
 src/fauxton/app/modules/documents/views.js | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/8c8e5a46/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 6b63c15..805116e 100644
--- a/src/fauxton/app/modules/documents/views.js
+++ b/src/fauxton/app/modules/documents/views.js
@@ -707,6 +707,9 @@ function(app, FauxtonAPI, Documents, pouchdb, Codemirror, JSHint, resizeColumns)
     afterRender: function() {
       this.model.on("sync", this.updateValues, this);
       var that = this;
+      if ($('.CodeMirror').length > 0){
+        $('.CodeMirror').remove();
+      }
       this.editor = Codemirror.fromTextArea(this.$el.find("textarea.doc-code").get()[0],
{
         mode: "application/json",
         json: false,


Mime
View raw message