summaryrefslogtreecommitdiffstats
path: root/web
diff options
context:
space:
mode:
authorChristopher Speller <crspeller@gmail.com>2015-09-09 08:34:24 -0400
committerChristopher Speller <crspeller@gmail.com>2015-09-09 08:34:24 -0400
commit1175ce54021816f1a3693bf5643d5dd816a7b4f9 (patch)
tree5efdc54441c77b078d4746c3e678c1a60addcb85 /web
parentb15b297bb3b5ae6dc6d336b0a333e967b31092bf (diff)
parentc6b1368cc7b011ac522ada7e3c927fa1ec57c9e0 (diff)
downloadchat-1175ce54021816f1a3693bf5643d5dd816a7b4f9.tar.gz
chat-1175ce54021816f1a3693bf5643d5dd816a7b4f9.tar.bz2
chat-1175ce54021816f1a3693bf5643d5dd816a7b4f9.zip
Merge pull request #628 from mattermost/mm-2127
MM-2127 Added send icon button to create post control for mobile view.
Diffstat (limited to 'web')
-rw-r--r--web/react/components/create_post.jsx46
-rw-r--r--web/sass-files/sass/partials/_post.scss19
-rw-r--r--web/sass-files/sass/partials/_responsive.scss15
3 files changed, 60 insertions, 20 deletions
diff --git a/web/react/components/create_post.jsx b/web/react/components/create_post.jsx
index 50aa0850d..d9e67836d 100644
--- a/web/react/components/create_post.jsx
+++ b/web/react/components/create_post.jsx
@@ -315,25 +315,33 @@ export default class CreatePost extends React.Component {
>
<div className='post-create'>
<div className='post-create-body'>
- <Textbox
- onUserInput={this.handleUserInput}
- onKeyPress={this.postMsgKeyPress}
- onHeightChange={this.resizePostHolder}
- messageText={this.state.messageText}
- createMessage='Write a message...'
- channelId={this.state.channelId}
- id='post_textbox'
- ref='textbox'
- />
- <FileUpload
- ref='fileUpload'
- getFileCount={this.getFileCount}
- onUploadStart={this.handleUploadStart}
- onFileUpload={this.handleFileUploadComplete}
- onUploadError={this.handleUploadError}
- postType='post'
- channelId=''
- />
+ <div className='post-body__cell'>
+ <Textbox
+ onUserInput={this.handleUserInput}
+ onKeyPress={this.postMsgKeyPress}
+ onHeightChange={this.resizePostHolder}
+ messageText={this.state.messageText}
+ createMessage='Write a message...'
+ channelId={this.state.channelId}
+ id='post_textbox'
+ ref='textbox'
+ />
+ <FileUpload
+ ref='fileUpload'
+ getFileCount={this.getFileCount}
+ onUploadStart={this.handleUploadStart}
+ onFileUpload={this.handleFileUploadComplete}
+ onUploadError={this.handleUploadError}
+ postType='post'
+ channelId=''
+ />
+ </div>
+ <a
+ className='send-button theme'
+ onClick={this.handleSubmit}
+ >
+ <i className='fa fa-paper-plane' />
+ </a>
</div>
<div className={postFooterClassName}>
{postError}
diff --git a/web/sass-files/sass/partials/_post.scss b/web/sass-files/sass/partials/_post.scss
index a8e77f7d5..76d0cc29a 100644
--- a/web/sass-files/sass/partials/_post.scss
+++ b/web/sass-files/sass/partials/_post.scss
@@ -188,6 +188,25 @@ body.ios {
max-width: 850px;
padding: 0 0 2px;
position: relative;
+ .post-body__cell {
+ vertical-align: top;
+ position: relative;
+ }
+ .send-button {
+ display: none;
+ cursor: pointer;
+ padding-right: 4px;
+ width: 45px;
+ height: 37px;
+ font-size: 18px;
+ line-height: 37px;
+ vertical-align: top;
+ text-align: center;
+ @include single-transition(all, 0.15s);
+ &:active {
+ @include opacity(0.75);
+ }
+ }
.custom-textarea {
padding-top: 8px;
padding-right: 28px;
diff --git a/web/sass-files/sass/partials/_responsive.scss b/web/sass-files/sass/partials/_responsive.scss
index c56625b88..71e9d0f96 100644
--- a/web/sass-files/sass/partials/_responsive.scss
+++ b/web/sass-files/sass/partials/_responsive.scss
@@ -409,9 +409,22 @@
}
}
}
- #post-create {
+ .post-create__container {
+ form {
+ padding: 0;
+ }
.post-create-body {
padding-bottom: 10px;
+ display: table;
+ width: 100%;
+ table-layout: fixed;
+ .post-body__cell {
+ display: table-cell;
+ padding-left: 1em;
+ }
+ .send-button {
+ display: table-cell;
+ }
}
.post-create-footer .msg-typing {
display: none;