Browse Source

Supported non-resizable keyboard

master
Igor Zhukov 9 years ago
parent
commit
0cd91d1674
  1. 4
      app/js/services.js
  2. 13
      app/less/app.less
  3. 2
      app/partials/desktop/reply_markup.html

4
app/js/services.js

@ -2424,6 +2424,10 @@ angular.module('myApp.services', ['myApp.i18n', 'izhukov.utils']) @@ -2424,6 +2424,10 @@ angular.module('myApp.services', ['myApp.i18n', 'izhukov.utils'])
if (replyMarkup.wrapped) {
return replyMarkup;
}
var count = replyMarkup.rows && replyMarkup.rows.length || 0;
if (count > 0 && count <= 4 && !replyMarkup.pFlags.resize) {
replyMarkup.splitCount = count;
}
replyMarkup.wrapped = true;
angular.forEach(replyMarkup.rows, function (markupRow) {
angular.forEach(markupRow.buttons, function (markupButton) {

13
app/less/app.less

@ -2086,6 +2086,19 @@ a.im_message_fwd_photo { @@ -2086,6 +2086,19 @@ a.im_message_fwd_photo {
font-size: 13px;
margin: 0;
padding: 6px 6px;
.reply_markup_h1 & {
height: 170px;
}
.reply_markup_h2 & {
height: 81px;
}
.reply_markup_h3 & {
height: 51px;
}
.reply_markup_h4 & {
height: 36px;
}
}
.reply_markup_button:hover {
color: #3a6d99;

2
app/partials/desktop/reply_markup.html

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
<div class="reply_markup_wrap">
<div class="reply_markup">
<div class="reply_markup" ng-class="replyMarkup.splitCount ? 'reply_markup_h' + replyMarkup.splitCount : ''">
<div class="reply_markup_row" ng-repeat="row in replyMarkup.rows">
<div class="reply_markup_button_wrap" ng-class="'reply_markup_button_w' + row.buttons.length" ng-repeat="button in row.buttons">
<button class="btn reply_markup_button" ng-bind-html="::button.rText" ng-click="buttonSend(button)"></button>

Loading…
Cancel
Save