compose: Move control buttons into a file of their own.

These buttons are common with message_edit_form.hbs, we will
be sharing this file among compose and message_edit_form.
This commit is contained in:
Aman Agrawal 2021-04-14 19:31:56 +00:00 committed by Tim Abbott
parent 11b09bba83
commit 57c657962e
2 changed files with 16 additions and 15 deletions

View File

@ -92,21 +92,7 @@
<div class="drag"></div>
<div id="below-compose-content">
<button type="submit" id="compose-send-button" class="button small send_message" title="{{t 'Send' }} (Ctrl + Enter)">{{t 'Send' }}</button>
<input type="file" id="file_input" class="notvisible pull-left" multiple />
{{#if file_upload_enabled }}
<a role="button" class="compose_control_button fa fa-paperclip notdisplayed" aria-label="{{t 'Attach files' }}" id="attach_files" tabindex=0 title="{{t 'Attach files' }}"></a>
{{/if}}
<a role="button" id="markdown_preview" class="compose_control_button fa fa-eye" aria-label="{{t 'Preview' }}" tabindex=0 title="{{t 'Preview' }}"></a>
<a role="button" id="undo_markdown_preview" class="compose_control_button fa fa-edit" aria-label="{{t 'Write' }}" tabindex=0 style="display:none;" title="{{t 'Write' }}"></a>
<a role="button" class="compose_control_button fa fa-video-camera video_link" aria-label="{{t 'Add video call' }}" tabindex=0 title="{{t 'Add video call' }}"></a>
<a role="button" class="compose_control_button fa fa-smile-o" aria-label="{{t 'Add emoji' }}" id="emoji_map" tabindex=0 title="{{t 'Add emoji' }}"></a>
{{#if giphy_api_available }}
<a role="button" class="compose_control_button" aria-label="{{t 'Add GIF' }}" id="compose_box_giphy_grid" title="{{t 'Add GIF' }}">
<img class="compose_giphy_logo" tabindex=0 src="/static/images/GIPHY_logo.png">
</a>
{{/if}}
<a class="message-control-link drafts-link" href="#drafts" title="{{t 'Drafts' }} (d)">{{t 'Drafts' }}</a>
<a role="button" class="message-control-link" tabindex=0 data-overlay-trigger="message-formatting">{{t 'Help' }}</a>
{{> compose_control_buttons }}
<span id="sending-indicator"></span>
<div id="send_controls" class="new-style">
<label id="enter-sends-label" class="compose_checkbox_label checkbox">

View File

@ -0,0 +1,15 @@
<input type="file" id="file_input" class="notvisible pull-left" multiple />
{{#if file_upload_enabled }}
<a role="button" class="compose_control_button fa fa-paperclip notdisplayed" aria-label="{{t 'Attach files' }}" id="attach_files" tabindex=0 title="{{t 'Attach files' }}"></a>
{{/if}}
<a role="button" id="markdown_preview" class="compose_control_button fa fa-eye" aria-label="{{t 'Preview' }}" tabindex=0 title="{{t 'Preview' }}"></a>
<a role="button" id="undo_markdown_preview" class="compose_control_button fa fa-edit" aria-label="{{t 'Write' }}" tabindex=0 style="display:none;" title="{{t 'Write' }}"></a>
<a role="button" class="compose_control_button fa fa-video-camera video_link" aria-label="{{t 'Add video call' }}" tabindex=0 title="{{t 'Add video call' }}"></a>
<a role="button" class="compose_control_button fa fa-smile-o" aria-label="{{t 'Add emoji' }}" id="emoji_map" tabindex=0 title="{{t 'Add emoji' }}"></a>
{{#if giphy_api_available }}
<a role="button" class="compose_control_button" aria-label="{{t 'Add GIF' }}" id="compose_box_giphy_grid" title="{{t 'Add GIF' }}">
<img class="compose_giphy_logo" tabindex=0 src="/static/images/GIPHY_logo.png">
</a>
{{/if}}
<a class="message-control-link drafts-link" href="#drafts" title="{{t 'Drafts' }} (d)">{{t 'Drafts' }}</a>
<a role="button" class="message-control-link" tabindex=0 data-overlay-trigger="message-formatting">{{t 'Help' }}</a>