[rtl] Fix menu position in statusbar for DE, PE, SSE
This commit is contained in:
parent
f56ab702c8
commit
49e96c73e3
|
@ -180,6 +180,8 @@ define([
|
||||||
this.menuAlign = 'tr-br';
|
this.menuAlign = 'tr-br';
|
||||||
} else if (this.menuAlign === 'tr-br') {
|
} else if (this.menuAlign === 'tr-br') {
|
||||||
this.menuAlign = 'tl-bl';
|
this.menuAlign = 'tl-bl';
|
||||||
|
} else if (this.menuAlign === 'bl-tl') {
|
||||||
|
this.menuAlign = 'br-tr';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -789,6 +791,18 @@ define([
|
||||||
this.scrollAlwaysVisible = this.options.scrollAlwaysVisible;
|
this.scrollAlwaysVisible = this.options.scrollAlwaysVisible;
|
||||||
this.search = this.options.search;
|
this.search = this.options.search;
|
||||||
|
|
||||||
|
if (Common.UI.isRTL()) {
|
||||||
|
if (this.menuAlign === 'tl-tr') {
|
||||||
|
this.menuAlign = 'tr-tl';
|
||||||
|
} else if (this.menuAlign === 'tl-bl') {
|
||||||
|
this.menuAlign = 'tr-br';
|
||||||
|
} else if (this.menuAlign === 'tr-br') {
|
||||||
|
this.menuAlign = 'tl-bl';
|
||||||
|
} else if (this.menuAlign === 'bl-tl') {
|
||||||
|
this.menuAlign = 'br-tr';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (this.options.restoreHeight) {
|
if (this.options.restoreHeight) {
|
||||||
this.options.restoreHeight = (typeof (this.options.restoreHeight) == "number") ? this.options.restoreHeight : (this.options.maxHeight ? this.options.maxHeight : 100000);
|
this.options.restoreHeight = (typeof (this.options.restoreHeight) == "number") ? this.options.restoreHeight : (this.options.maxHeight ? this.options.maxHeight : 100000);
|
||||||
!this.options.maxHeight && (this.options.maxHeight = this.options.restoreHeight);
|
!this.options.maxHeight && (this.options.maxHeight = this.options.restoreHeight);
|
||||||
|
|
|
@ -569,8 +569,8 @@ define([
|
||||||
|
|
||||||
checkInvisible: function(suppress) {
|
checkInvisible: function(suppress) {
|
||||||
var result = {
|
var result = {
|
||||||
first: !this.isTabVisible(0),
|
first: !this.isTabVisible(Common.UI.isRTL() ? this.tabs.length-1 : 0),
|
||||||
last: !this.isTabVisible(this.tabs.length-1)
|
last: !this.isTabVisible(Common.UI.isRTL() ? 0 : this.tabs.length-1)
|
||||||
};
|
};
|
||||||
|
|
||||||
!suppress && this.fireEvent('tab:invisible', this, result);
|
!suppress && this.fireEvent('tab:invisible', this, result);
|
||||||
|
|
|
@ -247,7 +247,7 @@ define([
|
||||||
style: 'margin-top:-5px;',
|
style: 'margin-top:-5px;',
|
||||||
restoreHeight: 285,
|
restoreHeight: 285,
|
||||||
itemTemplate: _.template([
|
itemTemplate: _.template([
|
||||||
'<a id="<%= id %>" tabindex="-1" type="menuitem" style="padding-left: 28px !important;" langval="<%= value.value %>" class="<% if (checked) { %> checked <% } %>">',
|
'<a id="<%= id %>" tabindex="-1" type="menuitem" langval="<%= value.value %>" class="<% if (checked) { %> checked <% } %>">',
|
||||||
'<i class="icon <% if (spellcheck) { %> toolbar__icon btn-ic-docspell spellcheck-lang <% } %>"></i>',
|
'<i class="icon <% if (spellcheck) { %> toolbar__icon btn-ic-docspell spellcheck-lang <% } %>"></i>',
|
||||||
'<%= caption %>',
|
'<%= caption %>',
|
||||||
'</a>'
|
'</a>'
|
||||||
|
|
|
@ -232,4 +232,14 @@
|
||||||
margin-left: 8px;
|
margin-left: 8px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.lang-menu {
|
||||||
|
li a {
|
||||||
|
padding-left: 28px !important;
|
||||||
|
.rtl & {
|
||||||
|
padding-left: 20px !important;
|
||||||
|
padding-right: 28px !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -257,7 +257,7 @@ define([
|
||||||
style: 'margin-top:-5px;',
|
style: 'margin-top:-5px;',
|
||||||
restoreHeight: 285,
|
restoreHeight: 285,
|
||||||
itemTemplate: _.template([
|
itemTemplate: _.template([
|
||||||
'<a id="<%= id %>" tabindex="-1" type="menuitem" style="padding-left: 28px !important;" langval="<%= value.value %>" class="<% if (checked) { %> checked <% } %>">',
|
'<a id="<%= id %>" tabindex="-1" type="menuitem" langval="<%= value.value %>" class="<% if (checked) { %> checked <% } %>">',
|
||||||
'<i class="icon <% if (spellcheck) { %> toolbar__icon btn-ic-docspell spellcheck-lang <% } %>"></i>',
|
'<i class="icon <% if (spellcheck) { %> toolbar__icon btn-ic-docspell spellcheck-lang <% } %>"></i>',
|
||||||
'<%= caption %>',
|
'<%= caption %>',
|
||||||
'</a>'
|
'</a>'
|
||||||
|
|
|
@ -248,4 +248,14 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.lang-menu {
|
||||||
|
li a {
|
||||||
|
padding-left: 28px !important;
|
||||||
|
.rtl & {
|
||||||
|
padding-left: 20px !important;
|
||||||
|
padding-right: 28px !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -763,7 +763,8 @@ define([
|
||||||
this.tabMenu.atposition = (function () {
|
this.tabMenu.atposition = (function () {
|
||||||
return {
|
return {
|
||||||
top : rect.top,
|
top : rect.top,
|
||||||
left: rect.left - parentPos.left - 2
|
left: rect.left - parentPos.left - 2,
|
||||||
|
right: rect.right - parentPos.left + 2
|
||||||
};
|
};
|
||||||
})();
|
})();
|
||||||
|
|
||||||
|
@ -779,7 +780,7 @@ define([
|
||||||
|
|
||||||
onTabMenuAfterShow: function (obj) {
|
onTabMenuAfterShow: function (obj) {
|
||||||
if (obj.atposition) {
|
if (obj.atposition) {
|
||||||
obj.setOffset(obj.atposition.left);
|
obj.setOffset(Common.UI.isRTL() ? (obj.atposition.right - $(obj.el).width()) : obj.atposition.left);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.enableKeyEvents = true;
|
this.enableKeyEvents = true;
|
||||||
|
@ -952,7 +953,7 @@ define([
|
||||||
if (obj.atposition) {
|
if (obj.atposition) {
|
||||||
var statusHeight = $(this.el).height(),
|
var statusHeight = $(this.el).height(),
|
||||||
offsetTop = !this.isCompact && (obj.atposition.top - $(this.el).offset().top > statusHeight/2) ? statusHeight/2 : 0;
|
offsetTop = !this.isCompact && (obj.atposition.top - $(this.el).offset().top > statusHeight/2) ? statusHeight/2 : 0;
|
||||||
obj.setOffset(obj.atposition.left, offsetTop);
|
obj.setOffset(Common.UI.isRTL() ? (obj.atposition.left - $(this.el).width() + 2) : obj.atposition.left, offsetTop);
|
||||||
}
|
}
|
||||||
this.enableKeyEvents = true;
|
this.enableKeyEvents = true;
|
||||||
},
|
},
|
||||||
|
|
|
@ -657,7 +657,7 @@
|
||||||
> a {
|
> a {
|
||||||
padding: 5px 12px 5px 26px;
|
padding: 5px 12px 5px 26px;
|
||||||
.rtl & {
|
.rtl & {
|
||||||
padding: 5px 56px 5px 12px;
|
padding: 5px 26px 5px 12px;
|
||||||
}
|
}
|
||||||
&::before {
|
&::before {
|
||||||
margin-left: -22px;
|
margin-left: -22px;
|
||||||
|
|
Loading…
Reference in a new issue