From ee53bbce573ce4aa2450baf3077223bf73172724 Mon Sep 17 00:00:00 2001 From: jquense Date: Tue, 3 Nov 2015 06:32:41 -0500 Subject: [PATCH] [changed] default "show more" behavior navigates to day view --- examples/App.js | 45 --------------------------------------------- examples/index.html | 11 +---------- src/Month.jsx | 5 ++++- 3 files changed, 5 insertions(+), 56 deletions(-) diff --git a/examples/App.js b/examples/App.js index 5564e2741..d57496da9 100644 --- a/examples/App.js +++ b/examples/App.js @@ -31,39 +31,6 @@ function EventAgenda(props) { } -let rand = ()=> (Math.floor(Math.random() * 20) - 10); - -const modalStyle = { - position: 'fixed', - zIndex: 1040, - top: 0, bottom: 0, left: 0, right: 0 -}; - -const backdropStyle = { - ...modalStyle, - zIndex: 'auto', - backgroundColor: '#000', - opacity: 0.5 -}; - -const dialogStyle = function() { - // we use some psuedo random coords so modals - // don't sit right on top of each other. - let top = 50 + rand(); - let left = 50 + rand(); - - return { - position: 'absolute', - width: 400, - top: top + '%', left: left + '%', - transform: `translate(-${top}%, -${left}%)`, - border: '1px solid #e5e5e5', - backgroundColor: 'white', - boxShadow: '0 5px 15px rgba(0,0,0,.5)', - padding: 20 - }; -}; - const Example = React.createClass({ getInitialState(){ return { showModal: false }; @@ -88,18 +55,6 @@ const Example = React.createClass({ }} /> - -
- -

Duis mollis, est non commodo luctus, nisi erat porttitor ligula.

-
-
); }, diff --git a/examples/index.html b/examples/index.html index a4cb5de30..02a51f63a 100644 --- a/examples/index.html +++ b/examples/index.html @@ -8,13 +8,6 @@ -
@@ -22,7 +15,5 @@ - - - \ No newline at end of file + diff --git a/src/Month.jsx b/src/Month.jsx index d721ebff5..5e72f7f68 100644 --- a/src/Month.jsx +++ b/src/Month.jsx @@ -105,7 +105,7 @@ let MonthView = React.createClass({ window.removeEventListener('resize', this._resizeListener, false) }, - render(){ + render() { var { date, culture, weekdayFormat } = this.props , month = dates.visibleDays(date, culture) , weeks = chunk(month, 7); @@ -367,6 +367,9 @@ let MonthView = React.createClass({ overlay: { date, events, position } }) } + else { + notify(this.props.onNavigate, [navigate.DATE, date]) + } notify(this.props.onShowMore, [events, date, slot]) },