Browse Source

Fixed composer progress on small height

Closes #1064
master
Igor Zhukov 9 years ago
parent
commit
3cc4193146
  1. 2
      app/js/directives.js
  2. 3
      app/js/message_composer.js
  3. 11
      app/less/app.less
  4. 6
      app/less/desktop.less
  5. 4
      app/partials/desktop/im.html

2
app/js/directives.js

@ -1533,7 +1533,7 @@ angular.module('myApp.directives', ['myApp.filters']) @@ -1533,7 +1533,7 @@ angular.module('myApp.directives', ['myApp.filters'])
}
});
var richTextarea = composer.richTextareaEl[0];
var richTextarea = composer.richTextareaEl && composer.richTextareaEl[0];
if (richTextarea) {
$(richTextarea).on('keydown keyup', updateHeight);
}

3
app/js/message_composer.js

@ -1116,6 +1116,9 @@ MessageComposer.prototype.onRichPaste = function (e) { @@ -1116,6 +1116,9 @@ MessageComposer.prototype.onRichPaste = function (e) {
}
MessageComposer.prototype.cleanRichTextarea = function (value, focused) {
if (!this.richTextareaEl[0]) {
return;
}
if (value === undefined) {
value = getRichValue(this.richTextareaEl[0]);
}

11
app/less/app.less

@ -2572,21 +2572,18 @@ img.img_fullsize { @@ -2572,21 +2572,18 @@ img.img_fullsize {
}
/* Message composer */
.composer_progress_icon {
display: block;
.composer_progress_icon_wrap {
opacity: 0;
position: absolute;
right: 3px;
top: 2px;
cursor: pointer;
padding: 0;
width: 22px;
height: 22px;
overflow: hidden;
margin-top: 1px;
transition: opacity cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.2s;
pointer-events: none;
padding: 0;
transition: opacity cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.2s;
.composer_progress_enabled & {
opacity: 1;
}

6
app/less/desktop.less

@ -1249,6 +1249,12 @@ a.im_panel_peer_photo .peer_initials { @@ -1249,6 +1249,12 @@ a.im_panel_peer_photo .peer_initials {
padding-right: 25px;
}
&_progress_icon_wrap {
top: 0;
right: 0;
margin-top: 0;
}
&_emoji_insert_btn {
top: 0;
right: 0px;

4
app/partials/desktop/im.html

@ -198,7 +198,9 @@ @@ -198,7 +198,9 @@
<div class="im_send_field_wrap hasselect" ng-class="historyState.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" my-arc-progress width="22" stroke="2.5"></div>
<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[0] == '/')" ng-mousedown="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="replyKeyboardToggle($event)" ng-class="!historyState.replyKeyboard.pFlags.hidden ? 'active' : ''"><i class="icon icon-keyboard"></i></a>

Loading…
Cancel
Save