couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gar...@apache.org
Subject fauxton commit: updated refs/heads/master to 258ec71
Date Mon, 12 Dec 2016 13:46:36 GMT
Repository: couchdb-fauxton
Updated Branches:
  refs/heads/master a231a4e4a -> 258ec71fb


some improvements to the new reactify setup


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

Branch: refs/heads/master
Commit: 258ec71fb23ce9fbabd2612d139f65540eb0b960
Parents: a231a4e
Author: Garren Smith <garren.smith@gmail.com>
Authored: Mon Dec 12 12:56:40 2016 +0200
Committer: Garren Smith <garren.smith@gmail.com>
Committed: Mon Dec 12 12:56:40 2016 +0200

----------------------------------------------------------------------
 app/addons/activetasks/routes.js                                | 1 +
 .../documents/index-results/index-results.components.react.jsx  | 2 +-
 app/addons/fauxton/appwrapper.js                                | 5 +++++
 app/core/api.js                                                 | 3 +++
 4 files changed, 10 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/258ec71f/app/addons/activetasks/routes.js
----------------------------------------------------------------------
diff --git a/app/addons/activetasks/routes.js b/app/addons/activetasks/routes.js
index 90796cd..2e427cf 100644
--- a/app/addons/activetasks/routes.js
+++ b/app/addons/activetasks/routes.js
@@ -10,6 +10,7 @@
 // License for the specific language governing permissions and limitations under
 // the License.
 
+import React from 'react';
 import app from "../../app";
 import FauxtonAPI from "../../core/api";
 import ActiveTasksResources from "./resources";

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/258ec71f/app/addons/documents/index-results/index-results.components.react.jsx
----------------------------------------------------------------------
diff --git a/app/addons/documents/index-results/index-results.components.react.jsx b/app/addons/documents/index-results/index-results.components.react.jsx
index b9e5feb..b78ca1d 100644
--- a/app/addons/documents/index-results/index-results.components.react.jsx
+++ b/app/addons/documents/index-results/index-results.components.react.jsx
@@ -445,7 +445,7 @@ var ResultsScreen = React.createClass({
 
 var ViewResultListController = React.createClass({
   propTypes: {
-    designDocs: React.PropTypes.object.isRequired
+    designDocs: React.PropTypes.object
   },
 
   getStoreState: function () {

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/258ec71f/app/addons/fauxton/appwrapper.js
----------------------------------------------------------------------
diff --git a/app/addons/fauxton/appwrapper.js b/app/addons/fauxton/appwrapper.js
index 48961ef..b2cd9fc 100644
--- a/app/addons/fauxton/appwrapper.js
+++ b/app/addons/fauxton/appwrapper.js
@@ -34,6 +34,10 @@ class ContentWrapper extends React.Component {
       this.setState({routerOptions});
       NavbarActions.setNavbarActiveLink(this.state.routerOptions.selectedHeader);
     });
+
+    this.props.router.on('trigger-update', () => {
+      this.forceUpdate();
+    });
   }
 
   render () {
@@ -42,6 +46,7 @@ class ContentWrapper extends React.Component {
     }
 
     const {component} = this.state.routerOptions;
+    if (!component) {return null;}
     return component;
   }
 }

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/258ec71f/app/core/api.js
----------------------------------------------------------------------
diff --git a/app/core/api.js b/app/core/api.js
index ad59d80..efcb7f9 100644
--- a/app/core/api.js
+++ b/app/core/api.js
@@ -43,6 +43,9 @@ FauxtonAPI.dispatch = _.bind(FauxtonAPI.dispatcher.dispatch, FauxtonAPI.dispatch
 FauxtonAPI.navigate = function (url, _opts) {
   var options = _.extend({trigger: true}, _opts);
   FauxtonAPI.router.navigate(url, options);
+  if (options.trigger) {
+    FauxtonAPI.router.trigger('trigger-update');
+  }
 };
 
 FauxtonAPI.beforeUnload = function () {


Mime
View raw message