couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject [45/50] [abbrv] git commit: updated refs/heads/1867-feature-plugins to 8aad450
Date Mon, 09 Sep 2013 09:54:05 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/2cb57998
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/2cb57998
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/2cb57998

Branch: refs/heads/1867-feature-plugins
Commit: 2cb57998af6e842fb824d030d3359a5838819a76
Parents: e422d9e
Author: suelockwood <deathbearbrown@gmail.com>
Authored: Fri Sep 6 11:56:42 2013 -0400
Committer: Jan Lehnardt <jan@apache.org>
Committed: Mon Sep 9 11:16:45 2013 +0200

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


http://git-wip-us.apache.org/repos/asf/couchdb/blob/2cb57998/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