diff options
Diffstat (limited to 'web')
-rw-r--r-- | web/react/components/delete_channel_modal.jsx | 2 | ||||
-rw-r--r-- | web/react/components/edit_channel_modal.jsx | 2 | ||||
-rw-r--r-- | web/react/components/invite_member_modal.jsx | 2 | ||||
-rw-r--r-- | web/react/components/post_list.jsx | 2 | ||||
-rw-r--r-- | web/react/components/rename_channel_modal.jsx | 4 | ||||
-rw-r--r-- | web/react/components/rename_team_modal.jsx | 2 | ||||
-rw-r--r-- | web/react/components/setting_picture.jsx | 30 | ||||
-rw-r--r-- | web/react/components/sidebar_header.jsx | 19 | ||||
-rw-r--r-- | web/react/components/signup_team_complete.jsx | 4 | ||||
-rw-r--r-- | web/react/components/user_settings.jsx | 25 | ||||
-rw-r--r-- | web/sass-files/sass/partials/_headers.scss | 5 | ||||
-rw-r--r-- | web/sass-files/sass/partials/_navbar.scss | 14 | ||||
-rw-r--r-- | web/sass-files/sass/partials/_responsive.scss | 19 | ||||
-rw-r--r-- | web/sass-files/sass/partials/_search.scss | 10 |
14 files changed, 85 insertions, 55 deletions
diff --git a/web/react/components/delete_channel_modal.jsx b/web/react/components/delete_channel_modal.jsx index e23a37740..64ceec450 100644 --- a/web/react/components/delete_channel_modal.jsx +++ b/web/react/components/delete_channel_modal.jsx @@ -47,7 +47,7 @@ module.exports = React.createClass({ </p> </div> <div className="modal-footer"> - <button type="button" className="btn btn-default" data-dismiss="modal">Close</button> + <button type="button" className="btn btn-default" data-dismiss="modal">Cancel</button> <button type="button" className="btn btn-danger" data-dismiss="modal" onClick={this.handleDelete}>Delete</button> </div> </div> diff --git a/web/react/components/edit_channel_modal.jsx b/web/react/components/edit_channel_modal.jsx index a35a531b5..1b0cc185f 100644 --- a/web/react/components/edit_channel_modal.jsx +++ b/web/react/components/edit_channel_modal.jsx @@ -63,7 +63,7 @@ module.exports = React.createClass({ { server_error } </div> <div className="modal-footer"> - <button type="button" className="btn btn-default" data-dismiss="modal">Close</button> + <button type="button" className="btn btn-default" data-dismiss="modal">Cancel</button> <button type="button" className="btn btn-primary" onClick={this.handleEdit}>Save</button> </div> </div> diff --git a/web/react/components/invite_member_modal.jsx b/web/react/components/invite_member_modal.jsx index 94be2acd6..fed96b50a 100644 --- a/web/react/components/invite_member_modal.jsx +++ b/web/react/components/invite_member_modal.jsx @@ -212,7 +212,7 @@ module.exports = React.createClass({ <span>People invited automatically join Town Square channel.</span> </div> <div className="modal-footer"> - <button type="button" className="btn btn-default" data-dismiss="modal">Close</button> + <button type="button" className="btn btn-default" data-dismiss="modal">Cancel</button> <button onClick={this.handleSubmit} type="button" className="btn btn-primary">Send Invitations</button> </div> </div> diff --git a/web/react/components/post_list.jsx b/web/react/components/post_list.jsx index f9c62bf20..46f77660d 100644 --- a/web/react/components/post_list.jsx +++ b/web/react/components/post_list.jsx @@ -377,7 +377,7 @@ module.exports = React.createClass({ <div className="channel-intro"> <h4 className="channel-intro__title">Beginning of {ui_name}</h4> <p className="channel-intro__content"> - {"This is the start of " + ui_name + ", a channel for conversations you’d prefer out of more focused channels."} + {"This is the start of " + ui_name + ", a channel for non-work-related conversations."} <br/> </p> <a className="intro-links" href="#" style={userStyle} data-toggle="modal" data-target="#edit_channel" data-desc={channel.description} data-title={ui_name} data-channelid={channel.id}><i className="fa fa-pencil"></i>Set a description</a> diff --git a/web/react/components/rename_channel_modal.jsx b/web/react/components/rename_channel_modal.jsx index 9e4a25f85..26593b7fa 100644 --- a/web/react/components/rename_channel_modal.jsx +++ b/web/react/components/rename_channel_modal.jsx @@ -96,7 +96,7 @@ module.exports = React.createClass({ var self = this; $(this.refs.modal.getDOMNode()).on('show.bs.modal', function(e) { var button = $(e.relatedTarget); - self.setState({ display_name: button.attr('data-display'), title: button.attr('data-name'), channel_id: button.attr('data-channelid') }); + self.setState({ display_name: button.attr('data-display'), channel_name: button.attr('data-name'), channel_id: button.attr('data-channelid') }); }); $(this.refs.modal.getDOMNode()).on('hidden.bs.modal', this.handleClose); }, @@ -139,7 +139,7 @@ module.exports = React.createClass({ </form> </div> <div className="modal-footer"> - <button type="button" className="btn btn-default" data-dismiss="modal">Close</button> + <button type="button" className="btn btn-default" data-dismiss="modal">Cancel</button> <button onClick={this.handleSubmit} type="button" className="btn btn-primary">Save</button> </div> </div> diff --git a/web/react/components/rename_team_modal.jsx b/web/react/components/rename_team_modal.jsx index dfd775a3b..bebdd6662 100644 --- a/web/react/components/rename_team_modal.jsx +++ b/web/react/components/rename_team_modal.jsx @@ -83,7 +83,7 @@ module.exports = React.createClass({ </form> </div> <div className="modal-footer"> - <button type="button" className="btn btn-default" data-dismiss="modal">Close</button> + <button type="button" className="btn btn-default" data-dismiss="modal">Cancel</button> <button onClick={this.handleSubmit} type="button" className="btn btn-primary">Save</button> </div> </div> diff --git a/web/react/components/setting_picture.jsx b/web/react/components/setting_picture.jsx index 6cfb74d60..fa4c8bb62 100644 --- a/web/react/components/setting_picture.jsx +++ b/web/react/components/setting_picture.jsx @@ -7,8 +7,8 @@ module.exports = React.createClass({ var reader = new FileReader(); var img = this.refs.image.getDOMNode(); - reader.onload = function (e) { - $(img).attr('src', e.target.result) + reader.onload = function(e) { + $(img).attr('src', e.target.result); }; reader.readAsDataURL(file); @@ -25,27 +25,27 @@ module.exports = React.createClass({ var img = null; if (this.props.picture) { - img = (<img ref="image" className="profile-img" src=""/>); + img = (<img ref='image' className='profile-img' src=''/>); } else { - img = (<img ref="image" className="profile-img" src={this.props.src}/>); + img = (<img ref='image' className='profile-img' src={this.props.src}/>); } var self = this; return ( - <ul className="section-max"> - <li className="col-xs-12 section-title">{this.props.title}</li> - <li className="col-xs-offset-3 col-xs-8"> - <ul className="setting-list"> - <li className="setting-list-item"> + <ul className='section-max'> + <li className='col-xs-12 section-title'>{this.props.title}</li> + <li className='col-xs-offset-3 col-xs-8'> + <ul className='setting-list'> + <li className='setting-list-item'> {img} </li> - <li className="setting-list-item"> - { server_error } - { client_error } - <span className="btn btn-sm btn-primary btn-file sel-btn">Upload<input ref="input" accept=".jpg,.png,.bmp" type="file" onChange={this.props.pictureChange}/></span> - <a className={this.props.submitActive ? "btn btn-sm btn-primary" : "btn btn-sm btn-inactive disabled"} onClick={this.props.submit}>Save</a> - <a className="btn btn-sm theme" href="#" onClick={self.props.updateSection}>Cancel</a> + <li className='setting-list-item'> + {server_error} + {client_error} + <span className='btn btn-sm btn-primary btn-file sel-btn'>Select<input ref='input' accept='.jpg,.png,.bmp' type='file' onChange={this.props.pictureChange}/></span> + <a className={this.props.submitActive ? 'btn btn-sm btn-primary' : 'btn btn-sm btn-inactive disabled'} onClick={this.props.submit}>Save</a> + <a className='btn btn-sm theme' href='#' onClick={self.props.updateSection}>Cancel</a> </li> </ul> </li> diff --git a/web/react/components/sidebar_header.jsx b/web/react/components/sidebar_header.jsx index 0156dc01a..e01ddcd05 100644 --- a/web/react/components/sidebar_header.jsx +++ b/web/react/components/sidebar_header.jsx @@ -17,11 +17,20 @@ var NavbarDropdown = React.createClass({ e.preventDefault(); client.logout(); }, + blockToggle: false, componentDidMount: function() { UserStore.addTeamsChangeListener(this._onChange); + + var self = this; + $(this.refs.dropdown.getDOMNode()).on('hide.bs.dropdown', function(e) { + self.blockToggle = true; + setTimeout(function(){self.blockToggle = false;}, 100); + }); }, componentWillUnmount: function() { UserStore.removeTeamsChangeListener(this._onChange); + + $(this.refs.dropdown.getDOMNode()).off('hide.bs.dropdown'); }, _onChange: function() { if (this.isMounted()) { @@ -75,7 +84,7 @@ var NavbarDropdown = React.createClass({ return ( <ul className="nav navbar-nav navbar-right"> - <li className="dropdown"> + <li ref="dropdown" className="dropdown"> <a href="#" className="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false"> <span className="dropdown__icon" dangerouslySetInnerHTML={{__html: Constants.MENU_ICON }} /> </a> @@ -108,7 +117,11 @@ module.exports = React.createClass({ }, toggleDropdown: function(e) { - $('.team__header').find('.dropdown-toggle').trigger('click'); + if (this.refs.dropdown.blockToggle) { + this.refs.dropdown.blockToggle = false; + return; + } + $('.team__header').find('.dropdown-toggle').dropdown('toggle'); }, render: function() { @@ -131,7 +144,7 @@ module.exports = React.createClass({ <div className="team__name">{ this.props.teamDisplayName }</div> </div> </a> - <NavbarDropdown teamType={this.props.teamType} /> + <NavbarDropdown ref="dropdown" teamType={this.props.teamType} /> </div> ); } diff --git a/web/react/components/signup_team_complete.jsx b/web/react/components/signup_team_complete.jsx index 55845fc26..83daa3b1f 100644 --- a/web/react/components/signup_team_complete.jsx +++ b/web/react/components/signup_team_complete.jsx @@ -87,7 +87,7 @@ WelcomePage = React.createClass({ <h3 className="sub-heading">Welcome to:</h3> <h1 className="margin--top-none">{config.SiteName}</h1> </p> - <p className="margin--less">Let's setup your new team</p> + <p className="margin--less">Let's set up your new team</p> <p> Please confirm your email address:<br /> <div className="inner__content"> @@ -271,7 +271,7 @@ TeamURLPage = React.createClass({ <p>{"Choose the web address of your new " + strings.Team + ":"}</p> <ul className="color--light"> <li>Short and memorable is best</li> - <li>Use lower case letters, numbers and dashes</li> + <li>Use lowercase letters, numbers and dashes</li> <li>Must start with a letter and can't end in a dash</li> </ul> <button type="submit" className="btn btn-primary margin--extra" onClick={this.submitNext}>Next<i className="glyphicon glyphicon-chevron-right"></i></button> diff --git a/web/react/components/user_settings.jsx b/web/react/components/user_settings.jsx index e1ae6da52..902989b7b 100644 --- a/web/react/components/user_settings.jsx +++ b/web/react/components/user_settings.jsx @@ -465,17 +465,17 @@ var SecurityTab = React.createClass({ var confirmPassword = this.state.confirm_password; if (currentPassword === '') { - this.setState({ password_error: "Please enter your current password" }); + this.setState({password_error: 'Please enter your current password', server_error: ''}); return; } if (newPassword.length < 5) { - this.setState({ password_error: "New passwords must be at least 5 characters" }); + this.setState({password_error: 'New passwords must be at least 5 characters', server_error: ''}); return; } - if (newPassword != confirmPassword) { - this.setState({ password_error: "The new passwords you entered do not match" }); + if (newPassword !== confirmPassword) { + this.setState({password_error: 'The new passwords you entered do not match', server_error: ''}); return; } @@ -488,11 +488,16 @@ var SecurityTab = React.createClass({ function(data) { this.props.updateSection(""); AsyncClient.getMe(); - this.setState({ current_password: '', new_password: '', confirm_password: '' }); + this.setState({current_password: '', new_password: '', confirm_password: ''}); }.bind(this), function(err) { - state = this.getInitialState(); - state.server_error = err; + var state = this.getInitialState(); + if (err.message) { + state.server_error = err.message; + } else { + state.server_error = err; + } + state.password_error = ''; this.setState(state); }.bind(this) ); @@ -709,7 +714,11 @@ var GeneralTab = React.createClass({ }.bind(this), function(err) { state = this.getInitialState(); - state.server_error = err; + if(err.message) { + state.server_error = err.message; + } else { + state.server_error = err + } this.setState(state); }.bind(this) ); diff --git a/web/sass-files/sass/partials/_headers.scss b/web/sass-files/sass/partials/_headers.scss index 2c5f845d2..fb37c43eb 100644 --- a/web/sass-files/sass/partials/_headers.scss +++ b/web/sass-files/sass/partials/_headers.scss @@ -85,6 +85,7 @@ .sidebar--left, .sidebar--menu { .team__header { position: relative; + padding: 10px; @include legacy-pie-clearfix; &:before { @include single-transition(all, 0.05s, linear); @@ -98,7 +99,7 @@ } &:hover { &:before { - background: rgba(black, 0.05); + background: rgba(black, 0.1); } .user__name { color: #fff; @@ -145,7 +146,7 @@ } .header__info { color: #fff; - padding: 10px 10px 10px 14px; + padding-left: 4px; z-index: 1; position: relative; } diff --git a/web/sass-files/sass/partials/_navbar.scss b/web/sass-files/sass/partials/_navbar.scss index e5e67a9e0..905907d84 100644 --- a/web/sass-files/sass/partials/_navbar.scss +++ b/web/sass-files/sass/partials/_navbar.scss @@ -5,15 +5,15 @@ .navbar-default { position: absolute; border: none; - min-height: 50px; + min-height: 45px; background: $primary-color; .navbar-nav { > li { > a { - height: 50px; + height: 45px; padding: 0 1.3em; i { - line-height: 50px; + line-height: 45px; } } } @@ -24,8 +24,8 @@ border-radius: 0; margin: 0; padding: 0 10px; - line-height: 53px; - height: 50px; + line-height: 48px; + height: 44px; z-index: 5; fill: #fff; .icon-bar { @@ -38,8 +38,8 @@ } .navbar-brand { padding: 0 0.5em; - height: 50px; - line-height: 50px; + height: 45px; + line-height: 45px; float: none; font-size: 16px; .heading { diff --git a/web/sass-files/sass/partials/_responsive.scss b/web/sass-files/sass/partials/_responsive.scss index f3f9cd477..e3f140413 100644 --- a/web/sass-files/sass/partials/_responsive.scss +++ b/web/sass-files/sass/partials/_responsive.scss @@ -427,9 +427,9 @@ body { &.white { .inner__wrap { - >.row.content { - margin-bottom: -185px; - } + >.row.content { + margin-bottom: -185px; + } } } } @@ -447,6 +447,9 @@ } } } + .search__clear { + display: block; + } .search-bar__container { padding: 0; height: 45px; @@ -457,16 +460,18 @@ @include translateX(-45px); } .search__form { - padding-left: 10px; - padding-right: 67px; + @include translateX(-45px); + padding-left: 55px; + padding-right: 24px; } .search__clear { - display: block; + @include translateX(0px); } } .search__form { border: none; - padding: 7px 20px 0 45px; + @include translateX(0px); + padding: 7px 20px 0 49px; height: 45px; position: relative; @include single-transition(all, 0.2s, linear); diff --git a/web/sass-files/sass/partials/_search.scss b/web/sass-files/sass/partials/_search.scss index 0d005bfe2..9ae41ebb0 100644 --- a/web/sass-files/sass/partials/_search.scss +++ b/web/sass-files/sass/partials/_search.scss @@ -7,6 +7,8 @@ right: 0; line-height: 45px; margin-right: 13px; + @include single-transition(all, 0.2s, linear); + @include translateX(60px); z-index: 5; cursor: pointer; } @@ -16,13 +18,13 @@ fill: #FFF; position: absolute; left: 0; - font-size: 33px; - width: 45px; + font-size: 35px; + width: 49px; @include single-transition(all, 0.2s, linear); @include translateX(0px); text-align: center; - padding-right: 2px; - line-height: 42px; + padding-left: 1px; + line-height: 40px; display: none; } .sidebar__search-icon { |