diff options
author | Christopher Speller <crspeller@gmail.com> | 2016-03-14 00:56:37 -0400 |
---|---|---|
committer | Christopher Speller <crspeller@gmail.com> | 2016-03-14 00:56:37 -0400 |
commit | 975159b52ac6bf0ee6b2d5b73d2391b2e0c6e165 (patch) | |
tree | a0852f9faf6de9962b5478ed3f1bbaccd71062c0 /web/react/components/suggestion | |
parent | 160e1a8bea6d8280ef3b41a4a9f80674b75f3eb0 (diff) | |
parent | d7cdcf082fab6c0cb7c2fe4bed821bd1a8000e69 (diff) | |
download | chat-975159b52ac6bf0ee6b2d5b73d2391b2e0c6e165.tar.gz chat-975159b52ac6bf0ee6b2d5b73d2391b2e0c6e165.tar.bz2 chat-975159b52ac6bf0ee6b2d5b73d2391b2e0c6e165.zip |
Merge pull request #2331 from mattermost/plt-1680
PLT-1680 Converting client to react-router. Stage 1
Diffstat (limited to 'web/react/components/suggestion')
-rw-r--r-- | web/react/components/suggestion/at_mention_provider.jsx | 2 | ||||
-rw-r--r-- | web/react/components/suggestion/suggestion_box.jsx | 12 | ||||
-rw-r--r-- | web/react/components/suggestion/suggestion_list.jsx | 4 |
3 files changed, 9 insertions, 9 deletions
diff --git a/web/react/components/suggestion/at_mention_provider.jsx b/web/react/components/suggestion/at_mention_provider.jsx index 064b75ac5..c5bd13c26 100644 --- a/web/react/components/suggestion/at_mention_provider.jsx +++ b/web/react/components/suggestion/at_mention_provider.jsx @@ -40,7 +40,7 @@ class AtMentionSuggestion extends React.Component { icon = ( <img className='mention-img' - src={'/api/v1/users/' + item.id + '/image?time=' + item.update_at + '&' + Utils.getSessionIndex()} + src={'/api/v1/users/' + item.id + '/image?time=' + item.update_at} /> ); } diff --git a/web/react/components/suggestion/suggestion_box.jsx b/web/react/components/suggestion/suggestion_box.jsx index ea9f835eb..12b098cbd 100644 --- a/web/react/components/suggestion/suggestion_box.jsx +++ b/web/react/components/suggestion/suggestion_box.jsx @@ -2,7 +2,7 @@ // See License.txt for license information. import Constants from '../../utils/constants.jsx'; -import * as EventHelpers from '../../dispatcher/event_helpers.jsx'; +import * as GlobalActions from '../../action_creators/global_actions.jsx'; import SuggestionStore from '../../stores/suggestion_store.jsx'; import * as Utils from '../../utils/utils.jsx'; @@ -48,7 +48,7 @@ export default class SuggestionBox extends React.Component { if (!(container.is(e.target) || container.has(e.target).length > 0)) { // we can't just use blur for this because it fires and hides the children before // their click handlers can be called - EventHelpers.emitClearSuggestions(this.suggestionId); + GlobalActions.emitClearSuggestions(this.suggestionId); } } @@ -57,7 +57,7 @@ export default class SuggestionBox extends React.Component { const caret = Utils.getCaretPosition(textbox); const pretext = textbox.value.substring(0, caret); - EventHelpers.emitSuggestionPretextChanged(this.suggestionId, pretext); + GlobalActions.emitSuggestionPretextChanged(this.suggestionId, pretext); if (this.props.onUserInput) { this.props.onUserInput(textbox.value); @@ -89,13 +89,13 @@ export default class SuggestionBox extends React.Component { handleKeyDown(e) { if (SuggestionStore.hasSuggestions(this.suggestionId)) { if (e.which === KeyCodes.UP) { - EventHelpers.emitSelectPreviousSuggestion(this.suggestionId); + GlobalActions.emitSelectPreviousSuggestion(this.suggestionId); e.preventDefault(); } else if (e.which === KeyCodes.DOWN) { - EventHelpers.emitSelectNextSuggestion(this.suggestionId); + GlobalActions.emitSelectNextSuggestion(this.suggestionId); e.preventDefault(); } else if (e.which === KeyCodes.ENTER || e.which === KeyCodes.TAB) { - EventHelpers.emitCompleteWordSuggestion(this.suggestionId); + GlobalActions.emitCompleteWordSuggestion(this.suggestionId); e.preventDefault(); } else if (this.props.onKeyDown) { this.props.onKeyDown(e); diff --git a/web/react/components/suggestion/suggestion_list.jsx b/web/react/components/suggestion/suggestion_list.jsx index e3ccd0f08..ccebeb990 100644 --- a/web/react/components/suggestion/suggestion_list.jsx +++ b/web/react/components/suggestion/suggestion_list.jsx @@ -1,7 +1,7 @@ // Copyright (c) 2015 Mattermost, Inc. All Rights Reserved. // See License.txt for license information. -import * as EventHelpers from '../../dispatcher/event_helpers.jsx'; +import * as GlobalActions from '../../action_creators/global_actions.jsx'; import SuggestionStore from '../../stores/suggestion_store.jsx'; export default class SuggestionList extends React.Component { @@ -36,7 +36,7 @@ export default class SuggestionList extends React.Component { } handleItemClick(term, e) { - EventHelpers.emitCompleteWordSuggestion(this.props.suggestionId, term); + GlobalActions.emitCompleteWordSuggestion(this.props.suggestionId, term); e.preventDefault(); } |