[rtl] fix left and right panels position for DE

This commit is contained in:
Maxim Kadushkin 2022-09-12 22:53:28 +03:00
parent 15ce921714
commit cc7248f51d
3 changed files with 61 additions and 27 deletions

View file

@ -51,6 +51,11 @@ label {
.tool-menu-btns {
border-right: @scaled-one-px-value-ie solid @border-toolbar-ie;
border-right: @scaled-one-px-value solid @border-toolbar;
.rtl & {
border-left: @scaled-one-px-value solid @border-toolbar;
border-right: 0 none;
}
}
}
@ -63,6 +68,14 @@ label {
background-color: @background-toolbar;
right: 0;
overflow: hidden;
.rtl & {
left: 0;
right: auto;
border-right: @scaled-one-px-value solid @border-toolbar;
border-left: 0 none;
}
}
}
}
@ -85,6 +98,13 @@ label {
border-right: @scaled-one-px-value-ie solid @border-toolbar-ie;
border-right: @scaled-one-px-value solid @border-toolbar;
.rtl & {
padding-right: 40px;
padding-left: 0;
border-left: @scaled-one-px-value solid @border-toolbar;
border-right: 0 none;
}
#left-panel-chat {
height: 100%;
}
@ -108,6 +128,11 @@ label {
border-left: @scaled-one-px-value-ie solid @border-toolbar-ie;
border-left: @scaled-one-px-value solid @border-toolbar;
line-height: 15px;
.rtl & {
border-right: @scaled-one-px-value solid @border-toolbar;
border-left: 0 none;
}
}
.statusbar {

View file

@ -212,7 +212,7 @@ define([
this.viewport.hlayout.doLayout();
break;
case 'history':
var panel = this.viewport.hlayout.items[1];
var panel = this.viewport.hlayout.getItem('history');
if (panel.resize.el) {
this.boxSdk.css('border-left', '');
panel.resize.el.show();
@ -220,7 +220,7 @@ define([
this.viewport.hlayout.doLayout();
break;
case 'leftmenu':
var panel = this.viewport.hlayout.items[0];
var panel = this.viewport.hlayout.getItem('left');
if (panel.resize.el) {
if (panel.el.width() > 40) {
this.boxSdk.css('border-left', '');

View file

@ -104,33 +104,42 @@ define([
$container = $('#viewport-hbox-layout', this.$el);
var items = $container.find(' > .layout-item');
let iarray = [{ // left menu chat & comment
el: items[0],
rely: true,
alias: 'left',
resize: {
hidden: true,
autohide: false,
min: 300,
max: 600
}}, { // history versions
el: items[3],
rely: true,
alias: 'history',
resize: {
hidden: true,
autohide: false,
min: 300,
max: 600
}
}, { // sdk
el: items[1],
stretch: true
}, { // right menu
el: $(items[2]).hide(),
rely: true
}
];
if ( Common.UI.isRTL() ) {
[iarray[0], iarray[3]] = [iarray[3], iarray[0]];
[iarray[1], iarray[2]] = [iarray[2], iarray[1]];
}
this.hlayout = new Common.UI.HBoxLayout({
box: $container,
items: [{ // left menu chat & comment
el: items[0],
rely: true,
resize: {
hidden: true,
autohide: false,
min: 300,
max: 600
}}, { // history versions
el: items[3],
rely: true,
resize: {
hidden: true,
autohide: false,
min: 300,
max: 600
}
}, { // sdk
el: items[1],
stretch: true
}, { // right menu
el: $(items[2]).hide(),
rely: true
}
]
items: iarray
});
return this;