Supported non-resizable keyboard

This commit is contained in:
Igor Zhukov 2015-07-08 13:19:30 +03:00
parent 9a94bdc980
commit 0cd91d1674
3 changed files with 18 additions and 1 deletions

View File

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

View File

@ -2086,6 +2086,19 @@ a.im_message_fwd_photo {
font-size: 13px; font-size: 13px;
margin: 0; margin: 0;
padding: 6px 6px; 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 { .reply_markup_button:hover {
color: #3a6d99; color: #3a6d99;

View File

@ -1,5 +1,5 @@
<div class="reply_markup_wrap"> <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_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"> <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> <button class="btn reply_markup_button" ng-bind-html="::button.rText" ng-click="buttonSend(button)"></button>