From d8bd57901e33a7057e26e782e295099ffcc0da89 Mon Sep 17 00:00:00 2001 From: Christopher Speller Date: Wed, 6 Sep 2017 23:04:13 -0700 Subject: Removing webapp --- webapp/components/setting_item_max.jsx | 175 --------------------------------- 1 file changed, 175 deletions(-) delete mode 100644 webapp/components/setting_item_max.jsx (limited to 'webapp/components/setting_item_max.jsx') diff --git a/webapp/components/setting_item_max.jsx b/webapp/components/setting_item_max.jsx deleted file mode 100644 index 1f0af181e..000000000 --- a/webapp/components/setting_item_max.jsx +++ /dev/null @@ -1,175 +0,0 @@ -// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved. -// See License.txt for license information. - -import {FormattedMessage} from 'react-intl'; -import * as Utils from 'utils/utils.jsx'; -import Constants from 'utils/constants.jsx'; - -import PropTypes from 'prop-types'; - -import React from 'react'; - -export default class SettingItemMax extends React.Component { - constructor(props) { - super(props); - - this.onKeyDown = this.onKeyDown.bind(this); - } - - onKeyDown(e) { - if (e.keyCode === Constants.KeyCodes.ENTER && this.props.submit) { - this.props.submit(e); - } - } - - componentDidMount() { - document.addEventListener('keydown', this.onKeyDown); - } - - componentWillUnmount() { - document.removeEventListener('keydown', this.onKeyDown); - } - - render() { - var clientError = null; - if (this.props.client_error) { - clientError = ( -
- -
- ); - } - - var serverError = null; - if (this.props.server_error) { - serverError = ( -
- -
- ); - } - - var extraInfo = null; - let hintClass = 'setting-list__hint'; - if (this.props.infoPosition === 'top') { - hintClass = 'padding-bottom x2'; - } - - if (this.props.extraInfo) { - extraInfo = (
{this.props.extraInfo}
); - } - - var submit = ''; - if (this.props.submit) { - submit = ( - - ); - } - - var inputs = this.props.inputs; - var widthClass; - if (this.props.width === 'full') { - widthClass = 'col-sm-12'; - } else if (this.props.width === 'medium') { - widthClass = 'col-sm-10 col-sm-offset-2'; - } else { - widthClass = 'col-sm-9 col-sm-offset-3'; - } - - let title; - let titleProp = 'unknownTitle'; - if (this.props.title) { - title =
  • {this.props.title}
  • ; - titleProp = this.props.title; - } - - let listContent = ( -
  • - {inputs} - {extraInfo} -
  • - ); - - if (this.props.infoPosition === 'top') { - listContent = ( -
  • - {extraInfo} - {inputs} -
  • - ); - } - - let cancelButtonText; - if (this.props.cancelButtonText) { - cancelButtonText = this.props.cancelButtonText; - } else { - cancelButtonText = ( - - ); - } - - return ( - - ); - } -} - -SettingItemMax.propTypes = { - inputs: PropTypes.array, - client_error: PropTypes.string, - server_error: PropTypes.string, - extraInfo: PropTypes.element, - infoPosition: PropTypes.string, - updateSection: PropTypes.func, - submit: PropTypes.func, - title: PropTypes.node, - width: PropTypes.string, - submitExtra: PropTypes.node, - cancelButtonText: PropTypes.node -}; - -SettingItemMax.defaultProps = { - infoPosition: 'bottom' -}; -- cgit v1.2.3-1-g7c22