From 1571a9a2dfbe6dd3bb598a92f7f62e457b613241 Mon Sep 17 00:00:00 2001 From: Christopher Speller Date: Thu, 15 Oct 2015 12:07:06 -0400 Subject: [PATCH] Fixing most deprication warnings --- web/react/components/access_history_modal.jsx | 4 +- web/react/components/activity_log_modal.jsx | 4 +- .../admin_console/admin_navbar_dropdown.jsx | 4 +- .../admin_console/email_settings.jsx | 34 ++--- .../admin_console/gitlab_settings.jsx | 14 +- .../admin_console/image_settings.jsx | 58 ++++---- .../components/admin_console/log_settings.jsx | 12 +- .../admin_console/privacy_settings.jsx | 4 +- .../admin_console/rate_settings.jsx | 18 +-- .../admin_console/reset_password_modal.jsx | 4 +- .../admin_console/select_team_modal.jsx | 2 +- .../admin_console/service_settings.jsx | 26 ++-- .../components/admin_console/sql_settings.jsx | 20 +-- .../admin_console/team_settings.jsx | 14 +- web/react/components/change_url_modal.jsx | 4 +- web/react/components/channel_header.jsx | 138 ++++++++++-------- web/react/components/channel_info_modal.jsx | 2 +- web/react/components/channel_invite_modal.jsx | 4 +- web/react/components/channel_members.jsx | 4 +- .../components/channel_notifications.jsx | 6 +- web/react/components/create_comment.jsx | 4 +- web/react/components/create_post.jsx | 6 +- web/react/components/delete_channel_modal.jsx | 2 +- web/react/components/delete_post_modal.jsx | 2 +- web/react/components/edit_channel_modal.jsx | 8 +- web/react/components/edit_post_modal.jsx | 8 +- web/react/components/file_attachment.jsx | 4 +- web/react/components/file_upload.jsx | 4 +- web/react/components/find_team.jsx | 2 +- web/react/components/get_link_modal.jsx | 6 +- web/react/components/invite_member_modal.jsx | 22 +-- web/react/components/login.jsx | 4 +- web/react/components/mention_list.jsx | 2 +- web/react/components/more_channels.jsx | 8 +- web/react/components/more_direct_channels.jsx | 2 +- web/react/components/navbar.jsx | 68 ++++++--- web/react/components/navbar_dropdown.jsx | 4 +- web/react/components/new_channel_modal.jsx | 6 +- web/react/components/password_reset_form.jsx | 2 +- .../components/password_reset_send_link.jsx | 4 +- web/react/components/post_body.jsx | 2 +- web/react/components/post_deleted_modal.jsx | 2 +- web/react/components/post_list.jsx | 20 +-- web/react/components/register_app_modal.jsx | 12 +- .../components/removed_from_channel_modal.jsx | 8 +- web/react/components/rename_channel_modal.jsx | 20 +-- web/react/components/rhs_comment.jsx | 2 +- web/react/components/rhs_root_post.jsx | 2 +- web/react/components/search_bar.jsx | 2 +- web/react/components/setting_picture.jsx | 2 +- web/react/components/setting_upload.jsx | 2 +- web/react/components/sidebar.jsx | 6 +- web/react/components/signup_user_complete.jsx | 6 +- web/react/components/team_members.jsx | 4 +- .../team_signup_display_name_page.jsx | 2 +- .../components/team_signup_email_item.jsx | 4 +- .../components/team_signup_password_page.jsx | 2 +- web/react/components/team_signup_url_page.jsx | 2 +- .../components/team_signup_username_page.jsx | 2 +- .../components/team_signup_welcome_page.jsx | 2 +- .../components/team_signup_with_email.jsx | 2 +- web/react/components/team_signup_with_sso.jsx | 2 +- web/react/components/textbox.jsx | 30 ++-- .../user_settings/import_theme_modal.jsx | 2 +- .../user_settings_appearance.jsx | 4 +- .../user_settings/user_settings_general.jsx | 2 +- .../user_settings_notifications.jsx | 14 +- .../user_settings/user_settings_security.jsx | 2 +- web/react/components/view_image.jsx | 2 +- web/react/pages/admin_console.jsx | 6 +- web/react/pages/authorize.jsx | 2 +- web/react/pages/channel.jsx | 68 ++++----- web/react/pages/find_team.jsx | 2 +- web/react/pages/login.jsx | 2 +- web/react/pages/password_reset.jsx | 2 +- web/react/pages/signup_team.jsx | 2 +- web/react/pages/signup_team_complete.jsx | 2 +- web/react/pages/signup_user_complete.jsx | 2 +- web/react/pages/verify.jsx | 2 +- 79 files changed, 422 insertions(+), 376 deletions(-) diff --git a/web/react/components/access_history_modal.jsx b/web/react/components/access_history_modal.jsx index 909639859d..c8af2553d6 100644 --- a/web/react/components/access_history_modal.jsx +++ b/web/react/components/access_history_modal.jsx @@ -37,9 +37,9 @@ export default class AccessHistoryModal extends React.Component { } componentDidMount() { UserStore.addAuditsChangeListener(this.onAuditChange); - $(React.findDOMNode(this.refs.modal)).on('shown.bs.modal', this.onShow); + $(ReactDOM.findDOMNode(this.refs.modal)).on('shown.bs.modal', this.onShow); - $(React.findDOMNode(this.refs.modal)).on('hidden.bs.modal', this.onHide); + $(ReactDOM.findDOMNode(this.refs.modal)).on('hidden.bs.modal', this.onHide); } componentWillUnmount() { UserStore.removeAuditsChangeListener(this.onAuditChange); diff --git a/web/react/components/activity_log_modal.jsx b/web/react/components/activity_log_modal.jsx index 1fe2133ecc..74d6c64e3d 100644 --- a/web/react/components/activity_log_modal.jsx +++ b/web/react/components/activity_log_modal.jsx @@ -56,9 +56,9 @@ export default class ActivityLogModal extends React.Component { } componentDidMount() { UserStore.addSessionsChangeListener(this.onListenerChange); - $(React.findDOMNode(this.refs.modal)).on('shown.bs.modal', this.onShow); + $(ReactDOM.findDOMNode(this.refs.modal)).on('shown.bs.modal', this.onShow); - $(React.findDOMNode(this.refs.modal)).on('hidden.bs.modal', this.onHide); + $(ReactDOM.findDOMNode(this.refs.modal)).on('hidden.bs.modal', this.onHide); } componentWillUnmount() { UserStore.removeSessionsChangeListener(this.onListenerChange); diff --git a/web/react/components/admin_console/admin_navbar_dropdown.jsx b/web/react/components/admin_console/admin_navbar_dropdown.jsx index 21ec5c3cf8..df8da94e13 100644 --- a/web/react/components/admin_console/admin_navbar_dropdown.jsx +++ b/web/react/components/admin_console/admin_navbar_dropdown.jsx @@ -27,7 +27,7 @@ export default class AdminNavbarDropdown extends React.Component { } componentDidMount() { - $(React.findDOMNode(this.refs.dropdown)).on('hide.bs.dropdown', () => { + $(ReactDOM.findDOMNode(this.refs.dropdown)).on('hide.bs.dropdown', () => { this.blockToggle = true; setTimeout(() => { this.blockToggle = false; @@ -36,7 +36,7 @@ export default class AdminNavbarDropdown extends React.Component { } componentWillUnmount() { - $(React.findDOMNode(this.refs.dropdown)).off('hide.bs.dropdown'); + $(ReactDOM.findDOMNode(this.refs.dropdown)).off('hide.bs.dropdown'); } render() { diff --git a/web/react/components/admin_console/email_settings.jsx b/web/react/components/admin_console/email_settings.jsx index 12480e7eb6..01759b2220 100644 --- a/web/react/components/admin_console/email_settings.jsx +++ b/web/react/components/admin_console/email_settings.jsx @@ -41,28 +41,28 @@ export default class EmailSettings extends React.Component { buildConfig() { var config = this.props.config; - config.EmailSettings.EnableSignUpWithEmail = React.findDOMNode(this.refs.allowSignUpWithEmail).checked; - config.EmailSettings.SendEmailNotifications = React.findDOMNode(this.refs.sendEmailNotifications).checked; - config.EmailSettings.RequireEmailVerification = React.findDOMNode(this.refs.requireEmailVerification).checked; - config.EmailSettings.SendEmailNotifications = React.findDOMNode(this.refs.sendEmailNotifications).checked; - config.EmailSettings.FeedbackName = React.findDOMNode(this.refs.feedbackName).value.trim(); - config.EmailSettings.FeedbackEmail = React.findDOMNode(this.refs.feedbackEmail).value.trim(); - config.EmailSettings.SMTPServer = React.findDOMNode(this.refs.SMTPServer).value.trim(); - config.EmailSettings.SMTPPort = React.findDOMNode(this.refs.SMTPPort).value.trim(); - config.EmailSettings.SMTPUsername = React.findDOMNode(this.refs.SMTPUsername).value.trim(); - config.EmailSettings.SMTPPassword = React.findDOMNode(this.refs.SMTPPassword).value.trim(); - config.EmailSettings.ConnectionSecurity = React.findDOMNode(this.refs.ConnectionSecurity).value.trim(); + config.EmailSettings.EnableSignUpWithEmail = ReactDOM.findDOMNode(this.refs.allowSignUpWithEmail).checked; + config.EmailSettings.SendEmailNotifications = ReactDOM.findDOMNode(this.refs.sendEmailNotifications).checked; + config.EmailSettings.RequireEmailVerification = ReactDOM.findDOMNode(this.refs.requireEmailVerification).checked; + config.EmailSettings.SendEmailNotifications = ReactDOM.findDOMNode(this.refs.sendEmailNotifications).checked; + config.EmailSettings.FeedbackName = ReactDOM.findDOMNode(this.refs.feedbackName).value.trim(); + config.EmailSettings.FeedbackEmail = ReactDOM.findDOMNode(this.refs.feedbackEmail).value.trim(); + config.EmailSettings.SMTPServer = ReactDOM.findDOMNode(this.refs.SMTPServer).value.trim(); + config.EmailSettings.SMTPPort = ReactDOM.findDOMNode(this.refs.SMTPPort).value.trim(); + config.EmailSettings.SMTPUsername = ReactDOM.findDOMNode(this.refs.SMTPUsername).value.trim(); + config.EmailSettings.SMTPPassword = ReactDOM.findDOMNode(this.refs.SMTPPassword).value.trim(); + config.EmailSettings.ConnectionSecurity = ReactDOM.findDOMNode(this.refs.ConnectionSecurity).value.trim(); - config.EmailSettings.InviteSalt = React.findDOMNode(this.refs.InviteSalt).value.trim(); + config.EmailSettings.InviteSalt = ReactDOM.findDOMNode(this.refs.InviteSalt).value.trim(); if (config.EmailSettings.InviteSalt === '') { config.EmailSettings.InviteSalt = crypto.randomBytes(256).toString('base64').substring(0, 32); - React.findDOMNode(this.refs.InviteSalt).value = config.EmailSettings.InviteSalt; + ReactDOM.findDOMNode(this.refs.InviteSalt).value = config.EmailSettings.InviteSalt; } - config.EmailSettings.PasswordResetSalt = React.findDOMNode(this.refs.PasswordResetSalt).value.trim(); + config.EmailSettings.PasswordResetSalt = ReactDOM.findDOMNode(this.refs.PasswordResetSalt).value.trim(); if (config.EmailSettings.PasswordResetSalt === '') { config.EmailSettings.PasswordResetSalt = crypto.randomBytes(256).toString('base64').substring(0, 32); - React.findDOMNode(this.refs.PasswordResetSalt).value = config.EmailSettings.PasswordResetSalt; + ReactDOM.findDOMNode(this.refs.PasswordResetSalt).value = config.EmailSettings.PasswordResetSalt; } return config; @@ -70,14 +70,14 @@ export default class EmailSettings extends React.Component { handleGenerateInvite(e) { e.preventDefault(); - React.findDOMNode(this.refs.InviteSalt).value = crypto.randomBytes(256).toString('base64').substring(0, 32); + ReactDOM.findDOMNode(this.refs.InviteSalt).value = crypto.randomBytes(256).toString('base64').substring(0, 32); var s = {saveNeeded: true, serverError: this.state.serverError}; this.setState(s); } handleGenerateReset(e) { e.preventDefault(); - React.findDOMNode(this.refs.PasswordResetSalt).value = crypto.randomBytes(256).toString('base64').substring(0, 32); + ReactDOM.findDOMNode(this.refs.PasswordResetSalt).value = crypto.randomBytes(256).toString('base64').substring(0, 32); var s = {saveNeeded: true, serverError: this.state.serverError}; this.setState(s); } diff --git a/web/react/components/admin_console/gitlab_settings.jsx b/web/react/components/admin_console/gitlab_settings.jsx index 41c8ad2fc6..8b0f00083d 100644 --- a/web/react/components/admin_console/gitlab_settings.jsx +++ b/web/react/components/admin_console/gitlab_settings.jsx @@ -37,12 +37,12 @@ export default class GitLabSettings extends React.Component { $('#save-button').button('loading'); var config = this.props.config; - config.GitLabSettings.Enable = React.findDOMNode(this.refs.Enable).checked; - config.GitLabSettings.Secret = React.findDOMNode(this.refs.Secret).value.trim(); - config.GitLabSettings.Id = React.findDOMNode(this.refs.Id).value.trim(); - config.GitLabSettings.AuthEndpoint = React.findDOMNode(this.refs.AuthEndpoint).value.trim(); - config.GitLabSettings.TokenEndpoint = React.findDOMNode(this.refs.TokenEndpoint).value.trim(); - config.GitLabSettings.UserApiEndpoint = React.findDOMNode(this.refs.UserApiEndpoint).value.trim(); + config.GitLabSettings.Enable = ReactDOM.findDOMNode(this.refs.Enable).checked; + config.GitLabSettings.Secret = ReactDOM.findDOMNode(this.refs.Secret).value.trim(); + config.GitLabSettings.Id = ReactDOM.findDOMNode(this.refs.Id).value.trim(); + config.GitLabSettings.AuthEndpoint = ReactDOM.findDOMNode(this.refs.AuthEndpoint).value.trim(); + config.GitLabSettings.TokenEndpoint = ReactDOM.findDOMNode(this.refs.TokenEndpoint).value.trim(); + config.GitLabSettings.UserApiEndpoint = ReactDOM.findDOMNode(this.refs.UserApiEndpoint).value.trim(); Client.saveConfig( config, @@ -260,7 +260,7 @@ export default class GitLabSettings extends React.Component { } -//config.GitLabSettings.Scope = React.findDOMNode(this.refs.Scope).value.trim(); +//config.GitLabSettings.Scope = ReactDOM.findDOMNode(this.refs.Scope).value.trim(); //
//