Skip to content
This repository has been archived by the owner on Jun 17, 2021. It is now read-only.

Commit

Permalink
Fixed reply markup
Browse files Browse the repository at this point in the history
  • Loading branch information
zhukov committed Aug 23, 2017
1 parent d13fd80 commit 3be736e
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 12 deletions.
1 change: 1 addition & 0 deletions app/js/directives.js
Original file line number Diff line number Diff line change
Expand Up @@ -1557,6 +1557,7 @@ angular.module('myApp.directives', ['myApp.filters'])
templateUrl: templateUrl('send_form'),
scope: {
draftMessage: '=',
replyKeyboard: '=',
mentions: '=',
commands: '='
}
Expand Down
2 changes: 1 addition & 1 deletion app/partials/desktop/im.html
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ <h3 class="im_dialogs_empty_header" my-i18n="im_get_started"></h3>
</a>
<a class="pull-left im_panel_own_photo" my-peer-photolink="draftMessage.isBroadcast ? historyPeer.id : ownID" img-class="im_panel_own_photo" watch="true" ng-click="openSettings()" no-open="true"></a>

<div my-send-form draft-message="draftMessage" mentions="mentions" commands="commands"></div>
<div my-send-form draft-message="draftMessage" mentions="mentions" commands="commands" reply-keyboard="historyState.replyKeyboard"></div>

</div>

Expand Down
10 changes: 5 additions & 5 deletions app/partials/desktop/send_form.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@
<div class="im_message_reply_wrap" my-forwarded-messages="draftMessage.fwdMessages"></div>
</div>

<div class="im_send_field_wrap hasselect" ng-class="historyState.replyKeyboard._ == 'replyKeyboardMarkup' ? 'im_send_field_wrap_2ndbtn' : ''">
<div class="im_send_field_wrap hasselect" ng-class="replyKeyboard._ == 'replyKeyboardMarkup' ? 'im_send_field_wrap_2ndbtn' : ''">
<a class="composer_emoji_insert_btn"><i class="icon icon-emoji"></i></a>
<div class="composer_progress_icon_wrap">
<div class="composer_progress_icon" my-arc-progress width="22" stroke="2.5"></div>
</div>
<a class="composer_command_btn" ng-show="!historyState.replyKeyboard && commands.list.length > 0 && (!draftMessage.text.length || draftMessage.text == '/')" ng-mousedown="draftMessage.toggleSlash($event)" ng-class="draftMessage.text[0] == '/' ? 'active' : ''"><i class="icon icon-slash"></i></a>
<a class="composer_keyboard_btn" ng-show="historyState.replyKeyboard._ == 'replyKeyboardMarkup'" ng-mousedown="draftMessage.replyKeyboardToggle($event)" ng-class="!historyState.replyKeyboard.pFlags.hidden ? 'active' : ''"><i class="icon icon-keyboard"></i></a>
<a class="composer_command_btn" ng-show="!replyKeyboard && commands.list.length > 0 && (!draftMessage.text.length || draftMessage.text == '/')" ng-mousedown="draftMessage.toggleSlash($event)" ng-class="draftMessage.text[0] == '/' ? 'active' : ''"><i class="icon icon-slash"></i></a>
<a class="composer_keyboard_btn" ng-show="replyKeyboard._ == 'replyKeyboardMarkup'" ng-mousedown="draftMessage.replyKeyboardToggle($event)" ng-class="!replyKeyboard.pFlags.hidden ? 'active' : ''"><i class="icon icon-keyboard"></i></a>

<div class="im_send_dropbox_wrap" my-i18n="im_photos_drop_text"></div>
<div class="im_voice_recorder_wrap">
Expand Down Expand Up @@ -61,8 +61,8 @@
<div class="composer_emoji_panel"></div>
</div>

<div class="im_send_keyboard_wrap" ng-if="historyState.replyKeyboard._ == 'replyKeyboardMarkup'" ng-show="!historyState.replyKeyboard.pFlags.hidden">
<div my-reply-markup="historyState.replyKeyboard"></div>
<div class="im_send_keyboard_wrap" ng-if="replyKeyboard._ == 'replyKeyboardMarkup'" ng-show="!replyKeyboard.pFlags.hidden">
<div my-reply-markup="replyKeyboard"></div>
</div>

</form>
2 changes: 1 addition & 1 deletion app/partials/mobile/im.html
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ <h5 my-i18n="im_messages"></h5>
<div class="im_send_form_wrap1">

<div class="im_send_form_wrap clearfix" ng-controller="AppImSendController">
<div my-send-form draft-message="draftMessage" mentions="mentions" commands="commands"></div>
<div my-send-form draft-message="draftMessage" mentions="mentions" commands="commands" reply-keyboard="historyState.replyKeyboard"></div>
</div>

</div>
Expand Down
10 changes: 5 additions & 5 deletions app/partials/mobile/send_form.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@
</div>
</div>

<div class="im_send_field_wrap" ng-class="historyState.replyKeyboard._ == 'replyKeyboardMarkup' ? 'im_send_field_wrap_2ndbtn' : ''">
<div class="im_send_field_wrap" ng-class="replyKeyboard._ == 'replyKeyboardMarkup' ? 'im_send_field_wrap_2ndbtn' : ''">
<a class="composer_emoji_insert_btn pull-right"><i class="icon icon-emoji"></i></a>
<a class="composer_command_btn" ng-show="!historyState.replyKeyboard && commands.list.length > 0 && (!draftMessage.text.length || draftMessage.text[0] == '/')" ng-mousedown="draftMessage.toggleSlash($event)" ng-class="draftMessage.text[0] == '/' ? 'active' : ''"><i class="icon icon-slash"></i></a>
<a class="composer_keyboard_btn" ng-show="historyState.replyKeyboard._ == 'replyKeyboardMarkup'" ng-mousedown="draftMessage.replyKeyboardToggle($event)" ng-class="!historyState.replyKeyboard.pFlags.hidden ? 'active' : ''"><i class="icon icon-keyboard"></i></a>
<a class="composer_command_btn" ng-show="!replyKeyboard && commands.list.length > 0 && (!draftMessage.text.length || draftMessage.text[0] == '/')" ng-mousedown="draftMessage.toggleSlash($event)" ng-class="draftMessage.text[0] == '/' ? 'active' : ''"><i class="icon icon-slash"></i></a>
<a class="composer_keyboard_btn" ng-show="replyKeyboard._ == 'replyKeyboardMarkup'" ng-mousedown="draftMessage.replyKeyboardToggle($event)" ng-class="!replyKeyboard.pFlags.hidden ? 'active' : ''"><i class="icon icon-keyboard"></i></a>

<div class="composer_progress_icon_wrap">
<div class="composer_progress_icon" my-arc-progress width="22" stroke="2.5"></div>
Expand All @@ -52,8 +52,8 @@
</div>


<div class="im_send_keyboard_wrap" ng-if="historyState.replyKeyboard._ == 'replyKeyboardMarkup'" ng-show="!historyState.replyKeyboard.pFlags.hidden">
<div my-reply-markup="historyState.replyKeyboard"></div>
<div class="im_send_keyboard_wrap" ng-if="replyKeyboard._ == 'replyKeyboardMarkup'" ng-show="!replyKeyboard.pFlags.hidden">
<div my-reply-markup="replyKeyboard"></div>
</div>

</form>

0 comments on commit 3be736e

Please sign in to comment.