From d90f62c316e15b193366409166dd64e863d27d0d Mon Sep 17 00:00:00 2001 From: The_Grits Date: Fri, 30 Sep 2016 13:48:57 -0400 Subject: [PATCH 01/49] Create navigation.js --- src/redux/navigation.js | 1 + 1 file changed, 1 insertion(+) create mode 100644 src/redux/navigation.js diff --git a/src/redux/navigation.js b/src/redux/navigation.js new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/src/redux/navigation.js @@ -0,0 +1 @@ + From 195930bc5352c40ac2f642e911df649e7297d3a7 Mon Sep 17 00:00:00 2001 From: The_Grits Date: Fri, 30 Sep 2016 13:54:34 -0400 Subject: [PATCH 02/49] Merge! --- src/redux/navigation.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/redux/navigation.js b/src/redux/navigation.js index 8b1378917..3a9a0e3ae 100644 --- a/src/redux/navigation.js +++ b/src/redux/navigation.js @@ -1 +1,3 @@ - +module.exports.setSearchTerm = function () { + return this.props.searchTerm; +}; From f77b22b07b19e7677e8dae23f58f3fb5c7bba52e Mon Sep 17 00:00:00 2001 From: The_Grits Date: Thu, 20 Oct 2016 21:30:32 -0400 Subject: [PATCH 03/49] Update with Reducer --- src/redux/navigation.js | 7 +++++++ src/redux/reducer.js | 4 +++- src/views/search/search.jsx | 1 + 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/redux/navigation.js b/src/redux/navigation.js index 3a9a0e3ae..eac540cd0 100644 --- a/src/redux/navigation.js +++ b/src/redux/navigation.js @@ -1,3 +1,10 @@ +module.exports.navigationReducer = function (state, action) { + if(typeof state = 'undefined') { + state = ''; + } + return state; +}; + module.exports.setSearchTerm = function () { return this.props.searchTerm; }; diff --git a/src/redux/reducer.js b/src/redux/reducer.js index 8fd7231b4..82893d9ba 100644 --- a/src/redux/reducer.js +++ b/src/redux/reducer.js @@ -4,12 +4,14 @@ var scheduleReducer = require('./conference-schedule.js').scheduleReducer; var detailsReducer = require('./conference-details.js').detailsReducer; var permissionsReducer = require('./permissions.js').permissionsReducer; var sessionReducer = require('./session.js').sessionReducer; +var navigation = require('./navigation.js').navigation; var appReducer = combineReducers({ session: sessionReducer, permissions: permissionsReducer, conferenceSchedule: scheduleReducer, - conferenceDetails: detailsReducer + conferenceDetails: detailsReducer, + navigation: navigationReducer }); module.exports = appReducer; diff --git a/src/views/search/search.jsx b/src/views/search/search.jsx index 87e2b9ae0..9b8dfb1a8 100644 --- a/src/views/search/search.jsx +++ b/src/views/search/search.jsx @@ -12,6 +12,7 @@ var Input = require('../../components/forms/input.jsx'); var Button = require('../../components/forms/button.jsx'); var Tabs = require('../../components/tabs/tabs.jsx'); var Grid = require('../../components/grid/grid.jsx'); +var Navigation = require('../../redux/navigation.js'); require('./search.scss'); From 379ac7855140940aceee4a1e812251dd471549fe Mon Sep 17 00:00:00 2001 From: The_Grits Date: Wed, 26 Oct 2016 10:20:16 -0400 Subject: [PATCH 04/49] Navigation Redux --- src/redux/navigation.js | 20 +++++++++++++++++--- src/views/search/search.jsx | 6 +++++- 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/src/redux/navigation.js b/src/redux/navigation.js index eac540cd0..48e806d37 100644 --- a/src/redux/navigation.js +++ b/src/redux/navigation.js @@ -1,10 +1,24 @@ +var keyMirror = require('keymirror'); + +var Types = keyMirror({ + SET_SEARCH_TERM: null +}); + module.exports.navigationReducer = function (state, action) { if(typeof state = 'undefined') { state = ''; } - return state; + switch (action.type) { + case Types.SET_SEARCH_TERM: + return action.setSearchTerm; + default: + return state; + } }; -module.exports.setSearchTerm = function () { - return this.props.searchTerm; +module.exports.setSearchTerm = function (searchTerm) { + return { + type: Types.SET_SEARCH_TERM, + searchTerm: searchTerm + }; }; diff --git a/src/views/search/search.jsx b/src/views/search/search.jsx index 9b8dfb1a8..8550ab650 100644 --- a/src/views/search/search.jsx +++ b/src/views/search/search.jsx @@ -12,7 +12,8 @@ var Input = require('../../components/forms/input.jsx'); var Button = require('../../components/forms/button.jsx'); var Tabs = require('../../components/tabs/tabs.jsx'); var Grid = require('../../components/grid/grid.jsx'); -var Navigation = require('../../redux/navigation.js'); + +var navigationDetails = require('../../../redux/navigation.js'); require('./search.scss'); @@ -96,6 +97,9 @@ var Search = injectIntl(React.createClass({ } return allTab; }, + setSearchTerm: function (searchTerm) { + this.props.searchTerm = searchTerm; + }, render: function () { var formatMessage = this.props.intl.formatMessage; From 9f2cda0eaa455a521cb77910ee42e1b1d9411381 Mon Sep 17 00:00:00 2001 From: The_Grits Date: Mon, 31 Oct 2016 10:05:08 -0400 Subject: [PATCH 05/49] Bugs and Connections --- src/redux/navigation.js | 4 ++-- src/views/search/search.jsx | 12 ++++++++++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/src/redux/navigation.js b/src/redux/navigation.js index 48e806d37..e959b0df5 100644 --- a/src/redux/navigation.js +++ b/src/redux/navigation.js @@ -5,12 +5,12 @@ var Types = keyMirror({ }); module.exports.navigationReducer = function (state, action) { - if(typeof state = 'undefined') { + if(typeof state === 'undefined') { state = ''; } switch (action.type) { case Types.SET_SEARCH_TERM: - return action.setSearchTerm; + return searchTerm; default: return state; } diff --git a/src/views/search/search.jsx b/src/views/search/search.jsx index 8550ab650..d3549d9d0 100644 --- a/src/views/search/search.jsx +++ b/src/views/search/search.jsx @@ -98,7 +98,7 @@ var Search = injectIntl(React.createClass({ return allTab; }, setSearchTerm: function (searchTerm) { - this.props.searchTerm = searchTerm; + this.props.dispatch(navigationDetails.setSearchTerm(searchTerm)); }, render: function () { var formatMessage = this.props.intl.formatMessage; @@ -143,4 +143,12 @@ var Search = injectIntl(React.createClass({ } })); -render(, document.getElementById('app')); +var mapStateToProps = function (state) { + return { + navigationDetails: state.navigationDetails + }; +}; + +var ConnectedDetails = connect(mapStateToProps)(NavigationDetails); + +render(, document.getElementById('app')); From 8be3e1148684467d71fac94ff839ebbee5687313 Mon Sep 17 00:00:00 2001 From: The_Grits Date: Mon, 31 Oct 2016 10:19:35 -0400 Subject: [PATCH 06/49] Travis and Other Stuffs --- src/components/navigation/www/navigation.jsx | 7 +++++-- src/redux/navigation.js | 8 ++++---- src/views/search/search.jsx | 3 ++- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/src/components/navigation/www/navigation.jsx b/src/components/navigation/www/navigation.jsx index d2ffc819b..fb0aa6208 100644 --- a/src/components/navigation/www/navigation.jsx +++ b/src/components/navigation/www/navigation.jsx @@ -38,7 +38,8 @@ var Navigation = React.createClass({ }, getDefaultProps: function () { return { - session: {} + session: {}, + searchTerm: '' }; }, componentDidMount: function () { @@ -223,6 +224,7 @@ var Navigation = React.createClass({
+ +
+

+ +

+ + + +
+
+