couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From robertkowal...@apache.org
Subject [2/2] fauxton commit: updated refs/heads/master to 79d5f32
Date Mon, 30 Mar 2015 11:49:49 GMT
doc-editor: remove dead code

PR: #338
PR-URL: https://github.com/apache/couchdb-fauxton/pull/338
Reviewed-By: garren smith <garren.smith@gmail.com>


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

Branch: refs/heads/master
Commit: 79d5f320a4a708cf7c2bb5dad3480f0953e402de
Parents: 5a10f1c
Author: Robert Kowalski <robertkowalski@apache.org>
Authored: Fri Mar 27 15:54:51 2015 +0100
Committer: Robert Kowalski <robertkowalski@apache.org>
Committed: Mon Mar 30 13:50:05 2015 +0200

----------------------------------------------------------------------
 .../documents/index-editor/components.react.jsx | 26 +++-----------------
 app/addons/documents/index-editor/stores.js     |  4 ---
 app/addons/documents/tests/storesSpec.js        |  4 ---
 3 files changed, 4 insertions(+), 30 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/79d5f320/app/addons/documents/index-editor/components.react.jsx
----------------------------------------------------------------------
diff --git a/app/addons/documents/index-editor/components.react.jsx b/app/addons/documents/index-editor/components.react.jsx
index 1d3e98c..0887bac 100644
--- a/app/addons/documents/index-editor/components.react.jsx
+++ b/app/addons/documents/index-editor/components.react.jsx
@@ -17,11 +17,10 @@ define([
   'addons/documents/index-editor/stores',
   'addons/documents/index-editor/actions',
   'addons/fauxton/components',
-  'addons/components/react-components.react',
-  'plugins/beautify'
+  'addons/components/react-components.react'
 ],
 
-function (app, FauxtonAPI, React, Stores, Actions, Components, ReactComponents, beautifyHelper)
{
+function (app, FauxtonAPI, React, Stores, Actions, Components, ReactComponents) {
   var indexEditorStore = Stores.indexEditorStore;
   var getDocUrl = app.helpers.getDocUrl;
   var StyledSelect = ReactComponents.StyledSelect;
@@ -408,23 +407,7 @@ function (app, FauxtonAPI, React, Stores, Actions, Components, ReactComponents,
     }
   });
 
-  var ReactCSSTransitionGroup = React.addons.CSSTransitionGroup;
-
-  var EditorController = React.createClass({
-    getInitialState: function () {
-      return {
-        title: indexEditorStore.getTitle()
-      };
-    },
-
-    componentDidMount: function () {
-      indexEditorStore.on('change', this.onChange, this);
-    },
-
-    componentWillUnmount: function () {
-      indexEditorStore.off('change', this.onChange);
-    },
-
+  var EditorWrapper = React.createClass({
     render: function () {
       return (
         <div className="editor-wrapper span5 scrollable">
@@ -432,12 +415,11 @@ function (app, FauxtonAPI, React, Stores, Actions, Components, ReactComponents,
         </div>
       );
     }
-
   });
 
   var Views = {
     renderEditor: function (el) {
-      React.render(<EditorController/>, el);
+      React.render(<EditorWrapper/>, el);
     },
     removeEditor: function (el) {
       React.unmountComponentAtNode(el);

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/79d5f320/app/addons/documents/index-editor/stores.js
----------------------------------------------------------------------
diff --git a/app/addons/documents/index-editor/stores.js b/app/addons/documents/index-editor/stores.js
index 9ed952d..2070df3 100644
--- a/app/addons/documents/index-editor/stores.js
+++ b/app/addons/documents/index-editor/stores.js
@@ -96,10 +96,6 @@ function (FauxtonAPI, ActionTypes) {
       return this._newView;
     },
 
-    getTitle: function () {
-      return this._newView ? 'Create Index' : 'Edit Index';
-    },
-
     getViewName: function () {
       return this._viewName;
     },

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/79d5f320/app/addons/documents/tests/storesSpec.js
----------------------------------------------------------------------
diff --git a/app/addons/documents/tests/storesSpec.js b/app/addons/documents/tests/storesSpec.js
index 4a042ed..c60295c 100644
--- a/app/addons/documents/tests/storesSpec.js
+++ b/app/addons/documents/tests/storesSpec.js
@@ -50,10 +50,6 @@ define([
         it('returns default map', function () {
           assert.equal(store.getMap(), 'function (doc) {\n  emit(doc._id, 1);\n}');
         });
-
-        it('Edit Index as title', function () {
-          assert.equal(store.getTitle(), 'Create Index');
-        });
       });
 
     });


Mime
View raw message