File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -76,7 +76,7 @@ module.exports = React.createClass({
7676 </ div >
7777
7878 < span className = 'itemControl' >
79- < button onClick = { this . openEditModal } className = 'editButton' >
79+ < button id = 'articleEditButton' onClick = { this . openEditModal } className = 'editButton' >
8080 < i className = 'fa fa-edit fa-fw' > </ i >
8181 < div className = 'tooltip' > Edit</ div >
8282 </ button >
@@ -107,7 +107,7 @@ module.exports = React.createClass({
107107 </ div >
108108
109109 < span className = 'itemControl' >
110- < button onClick = { this . openEditModal } className = 'editButton' >
110+ < button id = 'articleEditButton' onClick = { this . openEditModal } className = 'editButton' >
111111 < i className = 'fa fa-edit fa-fw' > </ i >
112112 < div className = 'tooltip' > Edit</ div >
113113 </ button >
Original file line number Diff line number Diff line change @@ -15,9 +15,10 @@ module.exports = React.createClass({
1515 } ,
1616 handleArticleClikck : function ( article ) {
1717 if ( article . type === 'code' ) {
18- return function ( ) {
18+ return function ( e ) {
1919 var params = this . getParams ( )
2020
21+ document . getElementById ( 'articleEditButton' ) . focus ( )
2122 this . transitionTo ( 'codes' , {
2223 userName : params . userName ,
2324 planetName : params . planetName ,
@@ -27,9 +28,10 @@ module.exports = React.createClass({
2728 }
2829
2930 if ( article . type === 'note' ) {
30- return function ( ) {
31+ return function ( e ) {
3132 var params = this . getParams ( )
3233
34+ document . getElementById ( 'articleEditButton' ) . focus ( )
3335 this . transitionTo ( 'notes' , {
3436 userName : params . userName ,
3537 planetName : params . planetName ,
@@ -91,7 +93,7 @@ module.exports = React.createClass({
9193
9294 return (
9395 < div className = 'PlanetArticleList' >
94- < ul >
96+ < ul ref = 'articles' >
9597 { articles }
9698 </ ul >
9799 </ div >
Original file line number Diff line number Diff line change @@ -230,6 +230,18 @@ module.exports = React.createClass({
230230 return
231231 }
232232
233+ var listElement = this . refs . list . refs . articles . getDOMNode ( )
234+ var articleElement = listElement . querySelectorAll ( 'li' ) [ index ]
235+
236+ var overflowBelow = listElement . clientHeight + listElement . scrollTop < articleElement . offsetTop + articleElement . clientHeight
237+ if ( overflowBelow ) {
238+ listElement . scrollTop = articleElement . offsetTop + articleElement . clientHeight - listElement . clientHeight
239+ }
240+ var overflowAbove = listElement . scrollTop > articleElement . offsetTop
241+ if ( overflowAbove ) {
242+ listElement . scrollTop = articleElement . offsetTop
243+ }
244+
233245 if ( article . type === 'code' ) {
234246 params . localId = article . localId
235247 this . transitionTo ( 'codes' , params )
Original file line number Diff line number Diff line change @@ -190,7 +190,6 @@ module.exports = React.createClass({
190190 return this . renderUserHome ( currentUser )
191191 }
192192 } else if ( this . isActive ( 'planet' ) && user != null && user . userType === 'team' ) {
193- console . log ( user . Members )
194193 var members = user . Members . map ( function ( member ) {
195194 return (
196195 < li key = { 'user-' + member . id } > < Link to = 'userHome' params = { { userName : member . name } } >
Original file line number Diff line number Diff line change @@ -186,6 +186,7 @@ articleListWidth= 275px
186186 overflow-y auto
187187 li
188188 .articleItem
189+ noSelect ()
189190 border solid 2px transparent
190191 position relative
191192 height 94px
Original file line number Diff line number Diff line change 11.HomeContainer
22 .HomeNavigator
3+ noSelect ()
34 background-color planetNavBgColor
45 absolute left top bottom
56 width 55px
Original file line number Diff line number Diff line change 341341 padding 0 15px
342342 border-radius 5px
343343 margin-left 5px
344+ font-size 1em
344345 button .sendButton
345346 btnPrimary ()
346347 .confirmation
Original file line number Diff line number Diff line change 11{
22 "name" : " boost" ,
3- "version" : " 0.2.2 " ,
3+ "version" : " 0.2.3 " ,
44 "description" : " Boost App" ,
55 "main" : " main.js" ,
66 "scripts" : {
You can’t perform that action at this time.
0 commit comments