* Bumping version to: 3.2.0-rc1

* PLT-2863 fixing bad merge that broke this PR (#3523)

* PLT-2863 adding remove user from team

* PLT-2863 adding the client side UI

* Fixing trailing space

* Fixing reported issues

* Adding documentatino

* Switching to final javascript driver

* Fixing bad merge

* Fixing bad merge

* PLT-3538 Fix Login page doesn't show SAML option if gitlab is enabled (#3524)

* Login error messages fix (#3525)

* daily translations 20160708 (#3533)

* Fixed permissions when getting a file attachment to use the correct user id (#3535)

* PLT-3575 Fix Cannot upload certificates with .cer file extension on SAML (#3534)

* PLT-3560 blocking adding to channel once user is removed (#3537)

* Always allow system admins to see the Integrations sidebar (#3536)

* Plt 3475 - Post control improvements (#3538)

* Adding class to post when dropdown is active.

* plt-3475 - Post controls improvements

* daily translations 20160711 (#3544)
Этот коммит содержится в:
Harrison Healey
2016-07-11 14:21:51 -04:00
коммит произвёл GitHub
родитель 1283f6936d
Коммит 9481a4f0ef
27 изменённых файлов: 1885 добавлений и 893 удалений

Просмотреть файл

@@ -166,7 +166,7 @@ export default class SamlSettings extends AdminSettings {
}
uploadingText={Utils.localizeMessage('admin.saml.uploading.certificate', 'Uploading Certificate...')}
disabled={!this.state.enable}
fileType='.crt'
fileType='.crt,.cer'
onSubmit={this.uploadCertificate}
/>
);
@@ -260,7 +260,7 @@ export default class SamlSettings extends AdminSettings {
}
uploadingText={Utils.localizeMessage('admin.saml.uploading.certificate', 'Uploading Certificate...')}
disabled={!this.state.enable || !this.state.encrypt}
fileType='.crt'
fileType='.crt,.cer'
onSubmit={this.uploadCertificate}
/>
);

Просмотреть файл

@@ -45,7 +45,9 @@ export default class BackstageSidebar extends React.Component {
return null;
}
if (window.mm_config.EnableOnlyAdminIntegrations !== 'false' && !TeamStore.isTeamAdmin(this.props.user.id, this.props.team.id)) {
if (window.mm_config.EnableOnlyAdminIntegrations !== 'false' &&
!Utils.isSystemAdmin(this.props.user.roles) &&
!TeamStore.isTeamAdmin(this.props.user.id, this.props.team.id)) {
return null;
}

Просмотреть файл

@@ -484,7 +484,7 @@ export default class LoginController extends React.Component {
loginControls.push(
<a
className='btn btn-custom-login saml'
key='gitlab'
key='saml'
href={'/login/sso/saml' + this.props.location.search}
>
<span>

Просмотреть файл

@@ -18,9 +18,12 @@ export default class Post extends React.Component {
super(props);
this.handleCommentClick = this.handleCommentClick.bind(this);
this.handleDropdownOpened = this.handleDropdownOpened.bind(this);
this.forceUpdateInfo = this.forceUpdateInfo.bind(this);
this.state = {};
this.state = {
dropdownOpened: false
};
}
handleCommentClick(e) {
e.preventDefault();
@@ -35,11 +38,16 @@ export default class Post extends React.Component {
results: null
});
}
handleDropdownOpened(opened) {
this.setState({
dropdownOpened: opened
});
}
forceUpdateInfo() {
this.refs.info.forceUpdate();
this.refs.header.forceUpdate();
}
shouldComponentUpdate(nextProps) {
shouldComponentUpdate(nextProps, nextState) {
if (!Utils.areObjectsEqual(nextProps.post, this.props.post)) {
return true;
}
@@ -88,6 +96,14 @@ export default class Post extends React.Component {
return true;
}
if (nextProps.emojis !== this.props.emojis) {
return true;
}
if (nextState.dropdownOpened !== this.state.dropdownOpened) {
return true;
}
return false;
}
render() {
@@ -187,11 +203,16 @@ export default class Post extends React.Component {
profilePicContainer = '';
}
let dropdownOpenedClass = '';
if (this.state.dropdownOpened) {
dropdownOpenedClass = 'post--hovered';
}
return (
<div>
<div
id={'post_' + post.id}
className={'post ' + sameUserClass + ' ' + compactClass + ' ' + rootUser + ' ' + postType + ' ' + currentUserCss + ' ' + shouldHighlightClass + ' ' + systemMessageClass + ' ' + hideControls}
className={'post ' + sameUserClass + ' ' + compactClass + ' ' + rootUser + ' ' + postType + ' ' + currentUserCss + ' ' + shouldHighlightClass + ' ' + systemMessageClass + ' ' + hideControls + ' ' + dropdownOpenedClass}
>
<div className={'post__content ' + centerClass}>
{profilePicContainer}
@@ -202,6 +223,7 @@ export default class Post extends React.Component {
sameRoot={this.props.sameRoot}
commentCount={commentCount}
handleCommentClick={this.handleCommentClick}
handleDropdownOpened={this.handleDropdownOpened}
isLastComment={this.props.isLastComment}
sameUser={this.props.sameUser}
user={this.props.user}

Просмотреть файл

@@ -64,6 +64,7 @@ export default class PostHeader extends React.Component {
post={post}
commentCount={this.props.commentCount}
handleCommentClick={this.props.handleCommentClick}
handleDropdownOpened={this.props.handleDropdownOpened}
allowReply='true'
isLastComment={this.props.isLastComment}
sameUser={this.props.sameUser}
@@ -90,6 +91,7 @@ PostHeader.propTypes = {
commentCount: React.PropTypes.number.isRequired,
isLastComment: React.PropTypes.bool.isRequired,
handleCommentClick: React.PropTypes.func.isRequired,
handleDropdownOpened: React.PropTypes.func.isRequired,
sameUser: React.PropTypes.bool.isRequired,
compactDisplay: React.PropTypes.bool,
displayNameType: React.PropTypes.string,

Просмотреть файл

@@ -18,16 +18,20 @@ export default class PostInfo extends React.Component {
constructor(props) {
super(props);
this.dropdownPosition = this.dropdownPosition.bind(this);
this.handleDropdownClick = this.handleDropdownClick.bind(this);
this.handlePermalink = this.handlePermalink.bind(this);
}
dropdownPosition(e) {
handleDropdownClick(e) {
var position = $('#post-list').height() - $(e.target).offset().top;
var dropdown = $(e.target).closest('.col__reply').find('.dropdown-menu');
if (position < dropdown.height()) {
dropdown.addClass('bottom');
}
}
componentDidMount() {
$('#post_dropdown' + this.props.post.id).on('shown.bs.dropdown', () => this.props.handleDropdownOpened(true));
$('#post_dropdown' + this.props.post.id).on('hidden.bs.dropdown', () => this.props.handleDropdownOpened(false));
}
createDropdown() {
var post = this.props.post;
var isOwner = this.props.currentUser.id === post.user_id;
@@ -140,14 +144,16 @@ export default class PostInfo extends React.Component {
}
return (
<div>
<div
id={'post_dropdown' + this.props.post.id}
>
<a
href='#'
className='dropdown-toggle post__dropdown theme'
type='button'
data-toggle='dropdown'
aria-expanded='false'
onClick={this.dropdownPosition}
onClick={this.handleDropdownClick}
/>
<ul
className='dropdown-menu'
@@ -231,6 +237,7 @@ PostInfo.propTypes = {
isLastComment: React.PropTypes.bool.isRequired,
allowReply: React.PropTypes.string.isRequired,
handleCommentClick: React.PropTypes.func.isRequired,
handleDropdownOpened: React.PropTypes.func.isRequired,
sameUser: React.PropTypes.bool.isRequired,
currentUser: React.PropTypes.object.isRequired,
compactDisplay: React.PropTypes.bool,