[rtl] Make ComboDataviewShape, list styles

This commit is contained in:
JuliaSvinareva 2022-10-18 22:32:35 +03:00
parent 65c89bf6d2
commit 011ac80554
7 changed files with 46 additions and 4 deletions

View file

@ -368,7 +368,10 @@ define([
if (menu.cmpEl) {
menu.menuAlignEl = this.cmpEl;
var offset = this.cmpEl.width() - this.openButton.$el.width() - this.menuWidth + 1;
menu.setOffset(Math.min(offset, 0));
if (Common.UI.isRTL()) {
offset = this.openButton.$el.width() - 1;
}
menu.setOffset(Common.UI.isRTL() ? offset : Math.min(offset, 0));
}
if (this.options.hint) {

View file

@ -15,6 +15,10 @@
background-color: @background-normal-ie;
background-color: @background-normal;
.rtl & {
float: right;
}
.dataview {
padding: 1px;
}
@ -24,6 +28,10 @@
display: inline-block;
float: right;
.rtl & {
float: left;
}
button {
border-radius:0 @border-radius-small @border-radius-small 0;
border: @scaled-one-px-value-ie solid @border-regular-control-ie;
@ -31,6 +39,10 @@
background-color: @background-normal-ie;
background-color: @background-normal;
.rtl & {
border-radius:@border-radius-small 0 0 @border-radius-small;
}
&.dropdown-toggle {
.inner-box-caret {
padding: 0 1px 0 0;
@ -93,6 +105,16 @@
.border-left-radius(0);
.rtl & {
margin-right: 0;
padding-right: 0;
margin-left: -@combo-dataview-button-width;
padding-left: @combo-dataview-button-width;
.border-radius(@border-radius-small);
.border-right-radius(0);
}
.dataview {
@minus-px: calc(-1px / @pixel-ratio-factor);
height: @combo-dataview-height;

View file

@ -26,6 +26,10 @@
.box-shadow(0 0 0 @scaled-one-px-value-ie @border-regular-control-ie);
.box-shadow(0 0 0 @scaled-one-px-value @border-regular-control);
.rtl & {
float: right;
}
&:hover,
&.selected {
.box-shadow(0 0 0 2px @border-preview-select-ie);

View file

@ -652,6 +652,10 @@
height: 46px;
.view {
padding-right: 14px;
.rtl & {
padding-right: 0;
padding-left: 14px;
}
}
.dataview.field-picker {
height: 100%;

View file

@ -1535,7 +1535,10 @@ define([
if (menuWidth>Common.Utils.innerWidth())
menuWidth = Math.max(Math.floor(Common.Utils.innerWidth()/(itemMargin + _width)), 2) * (itemMargin + _width);
var offset = cmp.cmpEl.width() - cmp.openButton.$el.width() - Math.min(menuWidth, buttonOffsetLeft) - 1;
menu.setOffset(Math.min(offset, 0));
if (Common.UI.isRTL()) {
offset = cmp.openButton.$el.width();
}
menu.setOffset(Common.UI.isRTL() ? offset : Math.min(offset, 0));
menu.cmpEl.css({
'width': menuWidth,

View file

@ -1096,7 +1096,10 @@ define([
if (menuWidth>Common.Utils.innerWidth())
menuWidth = Math.max(Math.floor(Common.Utils.innerWidth()/(itemMargin + itemWidth)), 2) * (itemMargin + itemWidth);
var offset = cmp.cmpEl.width() - cmp.openButton.$el.width() - Math.min(menuWidth, buttonOffsetLeft) - 1;
menu.setOffset(Math.min(offset, 0));
if (Common.UI.isRTL()) {
offset = cmp.openButton.$el.width();
}
menu.setOffset(Common.UI.isRTL() ? offset : Math.min(offset, 0));
menu.cmpEl.css({
'width': menuWidth,

View file

@ -1337,7 +1337,10 @@ define([
if (menuWidth>Common.Utils.innerWidth())
menuWidth = Math.max(Math.floor(Common.Utils.innerWidth()/(itemMargin + itemWidth)), 2) * (itemMargin + itemWidth);
var offset = cmp.cmpEl.width() - cmp.openButton.$el.width() - Math.min(menuWidth, buttonOffsetLeft) - 1;
menu.setOffset(Math.min(offset, 0));
if (Common.UI.isRTL()) {
offset = cmp.openButton.$el.width();
}
menu.setOffset(Common.UI.isRTL() ? offset : Math.min(offset, 0));
menu.cmpEl.css({
'width': menuWidth,