diff --git a/apps/common/main/lib/component/Button.js b/apps/common/main/lib/component/Button.js
index ba3621a29..2f0356539 100644
--- a/apps/common/main/lib/component/Button.js
+++ b/apps/common/main/lib/component/Button.js
@@ -351,22 +351,37 @@ define([
getCaptionWithBreaks: function (caption) {
var words = caption.split(' '),
newCaption = null,
- maxWidth = 85 - 4;
+ maxWidth = 160 - 4, //85 - 4
+ containAnd = words.indexOf('&');
+ if (containAnd > -1) { // add & to previous word
+ words[containAnd - 1] += ' &';
+ words.splice(containAnd, 1);
+ }
if (words.length > 1) {
maxWidth = !!this.menu || this.split === true ? maxWidth - 10 : maxWidth;
if (words.length < 3) {
+ words[0] = getShortText(words[0], !!this.menu ? maxWidth + 10 : maxWidth);
words[1] = getShortText(words[1], maxWidth);
newCaption = words[0] + '
' + words[1];
} else {
+ var otherWords = '';
if (getWidthOfCaption(words[0] + ' ' + words[1]) < maxWidth) { // first and second words in first line
- words[2] = getShortText(words[2], maxWidth);
- newCaption = words[0] + ' ' + words[1] + '
' + words[2];
- } else if (getWidthOfCaption(words[1] + ' ' + words[2]) < maxWidth) { // second and third words in second line
- words[2] = getShortText(words[2], maxWidth);
- newCaption = words[0] + '
' + words[1] + ' ' + words[2];
- } else {
- words[1] = getShortText(words[1] + ' ' + words[2], maxWidth);
- newCaption = words[0] + '
' + words[1];
+ for (var i = 2; i < words.length; i++) {
+ otherWords += words[i] + ' ';
+ }
+ if (getWidthOfCaption(otherWords + (!!this.menu ? 10 : 0))*2 < getWidthOfCaption(words[0] + ' ' + words[1])) {
+ otherWords = getShortText((words[1] + ' ' + otherWords).trim(), maxWidth);
+ newCaption = words[0] + '
' + otherWords;
+ } else {
+ otherWords = getShortText(otherWords.trim(), maxWidth);
+ newCaption = words[0] + ' ' + words[1] + '
' + otherWords;
+ }
+ } else { // only first word is in first line
+ for (var j = 1; j < words.length; j++) {
+ otherWords += words[j] + ' ';
+ }
+ otherWords = getShortText(otherWords.trim(), maxWidth);
+ newCaption = words[0] + '
' + otherWords;
}
}
} else {
diff --git a/apps/common/main/resources/less/buttons.less b/apps/common/main/resources/less/buttons.less
index de26223cb..8825c37be 100644
--- a/apps/common/main/resources/less/buttons.less
+++ b/apps/common/main/resources/less/buttons.less
@@ -246,7 +246,7 @@
height: 24px;
.caption {
- max-width: 85px;
+ max-width: 160px;//85px;
max-height: 24px;
text-overflow: ellipsis;
diff --git a/apps/common/main/resources/less/plugins.less b/apps/common/main/resources/less/plugins.less
index 1bba907aa..607d738d8 100644
--- a/apps/common/main/resources/less/plugins.less
+++ b/apps/common/main/resources/less/plugins.less
@@ -132,7 +132,7 @@
.x-huge.icon-top {
.caption {
text-overflow: ellipsis;
- max-width: 85px;
+ max-width: 160px;
}
}
diff --git a/apps/documenteditor/main/locale/hy.json b/apps/documenteditor/main/locale/hy.json
index add0ca15a..85f189cf5 100644
--- a/apps/documenteditor/main/locale/hy.json
+++ b/apps/documenteditor/main/locale/hy.json
@@ -415,7 +415,7 @@
"Common.Views.ReviewChanges.txtCommentResolveCurrent": "Լուծել ընթացիկ մեկնաբանությունները",
"Common.Views.ReviewChanges.txtCommentResolveMy": "Լուծել իմ մեկնաբանությունները",
"Common.Views.ReviewChanges.txtCommentResolveMyCurrent": "Լուծել իմ ընթացիկ մեկնաբանությունները",
- "Common.Views.ReviewChanges.txtCompare": " Համեմատել",
+ "Common.Views.ReviewChanges.txtCompare": "Համեմատել",
"Common.Views.ReviewChanges.txtDocLang": "Լեզու",
"Common.Views.ReviewChanges.txtEditing": "Խմբագրում ",
"Common.Views.ReviewChanges.txtFinal": "Բոլոր փոփոխումներն ընդունված են {0}",