File tree Expand file tree Collapse file tree 13 files changed +146
-41
lines changed Expand file tree Collapse file tree 13 files changed +146
-41
lines changed Original file line number Diff line number Diff line change @@ -576,6 +576,7 @@ class Modal {
576
576
var height = this . ui . modal . height ( ) ;
577
577
var modalLeft = this . ui . modal . position ( ) . left ;
578
578
var modalTop = this . ui . modal . position ( ) . top ;
579
+ var resizeDir = this . ui . resize . css ( 'direction' ) === 'rtl' ? - 1 : + 1 ;
579
580
580
581
// create event for stopping
581
582
this . ui . body . on ( this . pointerUp , function ( e ) {
@@ -588,11 +589,11 @@ class Modal {
588
589
. on ( this . pointerMove , function ( e ) {
589
590
var mvX = pointerEvent . originalEvent . pageX - e . originalEvent . pageX ;
590
591
var mvY = pointerEvent . originalEvent . pageY - e . originalEvent . pageY ;
591
- var w = width - mvX * 2 ;
592
+ var w = width - resizeDir * mvX * 2 ;
592
593
var h = height - mvY * 2 ;
593
594
var wMin = that . options . minWidth ;
594
595
var hMin = that . options . minHeight ;
595
- var left = mvX + modalLeft ;
596
+ var left = resizeDir * mvX + modalLeft ;
596
597
var top = mvY + modalTop ;
597
598
598
599
// add some limits
Original file line number Diff line number Diff line change @@ -54,9 +54,7 @@ div.cms {
54
54
@import " components/pagetree/node-state" ;
55
55
}
56
56
57
- // ##############################################################################
58
- // DJANGO DEBUG TOOLBAR FIX
59
- // removed as of: //github.com/divio/django-cms/issues/2476
60
- // #djDebug #djDebugToolbarHandle {
61
- // top:35px !important; border-right:none !important;
62
- // }
57
+ // Can be removed once suffucently many users have browsers the support `:dir()`
58
+ div .cms [dir = rtl ] {
59
+ @import " libs/rtl_patch" ;
60
+ }
Original file line number Diff line number Diff line change @@ -45,6 +45,9 @@ $wizard-input-size: 16px;
45
45
// tablet and up
46
46
@media (min-width : $screen-tablet ) {
47
47
float : left !important ;
48
+ & :dir (rtl ) {
49
+ float : right !important ;
50
+ }
48
51
width : 48% !important ;
49
52
}
50
53
Original file line number Diff line number Diff line change 193
193
194
194
.cms-modal-resize {
195
195
position : absolute ;
196
- right : 0 ;
196
+ inset-inline-end : 0 ;
197
197
bottom : 0 ;
198
198
z-index : z (modal , resize );
199
199
font-size : 10px ;
200
200
color : $gray-light ;
201
201
width : $modal-resize-size ;
202
202
height : $modal-resize-size ;
203
203
cursor : nw-resize ;
204
+ & :dir (rtl ) {
205
+ cursor : ne-resize ;
206
+ }
204
207
span {
205
208
position : absolute ;
206
209
bottom : 5px ;
207
210
right : 5px ;
208
211
font-size : $font-size-small ;
212
+ & :dir (rtl ) {
213
+ transform : scale (-1 ,1 ) translate (2px , 0 ); // flip drag triangle
214
+ }
209
215
}
210
216
}
211
217
256
262
$margin : math .div ($toolbar-height - $toolbar-button-height , 2 );
257
263
@extend .cms-toolbar-item-buttons ;
258
264
float : right ;
265
+ & :dir (rtl ) {
266
+ float : left ;
267
+ }
259
268
margin-inline-start : $margin ;
260
269
261
270
.cancel-link {
264
273
}
265
274
.cms-modal-item-buttons-left {
266
275
float : left ;
276
+ & :dir (rtl ) {
277
+ float : right ;
278
+ }
267
279
}
268
280
269
281
// alter footer when html markup is loaded
Original file line number Diff line number Diff line change 8
8
display : none ;
9
9
position : fixed ;
10
10
top : 0 ;
11
- left : 0 ;
11
+ inline-start : 0 ;
12
12
width : 0 ;
13
13
bottom : 0 ;
14
14
z-index : z (sideframe , base );
60
60
.cms-sideframe-controls {
61
61
position : absolute ;
62
62
top : $sideframe-buttons-position-top + $sideframe-buttons-offset ;
63
- right : $sideframe-buttons-position-right ;
63
+ inset-inline-end : $sideframe-buttons-position-right ;
64
64
z-index : z (sideframe , buttons );
65
65
box-shadow : $toolbar-shadow ;
66
66
background-color : $white ;
Original file line number Diff line number Diff line change 17
17
content : " " ;
18
18
position : absolute ;
19
19
top : -8px ;
20
- left : -4px ;
20
+ inset-inline-start : -4px ;
21
21
width : 0 ;
22
22
height : 0 ;
23
23
border-top : 8px solid transparent ;
24
24
border-bottom : 8px solid transparent ;
25
- border-left : 8px solid $color-primary ;
25
+ border-inline-start : 8px solid $color-primary ;
26
26
}
27
27
}
28
28
.cms-draggables > .cms-droppable :first-child {
371
371
margin-inline-start : $structure-dragarea-padding-horizontal - 10px ;
372
372
cursor : pointer ;
373
373
transform : rotate (180deg );
374
- [ dir = " rtl" ] & {
374
+ & : dir( rtl ) {
375
375
transform : rotate (0deg );
376
376
}
377
377
}
381
381
}
382
382
.cms-dragitem-expanded :before {
383
383
transform : rotate (-90deg );
384
- [ dir = " rtl" ] & {
384
+ & : dir( rtl ) {
385
385
transform : rotate (-90deg );
386
386
}
387
387
}
Original file line number Diff line number Diff line change 56
56
// items
57
57
.cms-toolbar-item {
58
58
float : left ;
59
- [ dir = rtl ] & {
59
+ & : dir( rtl ) {
60
60
float : right ;
61
61
}
62
62
}
85
85
z-index : 30 ;
86
86
87
87
@at-root .cms-structure-mode-structure & {
88
- right : $toolbar-height ;
88
+ inset-inline-end : $toolbar-height ;
89
89
}
90
90
}
91
91
.cms-toolbar .cms-btn-action {
107
107
li {
108
108
position : relative ;
109
109
float : left ;
110
- [ dir = rtl ] & {
110
+ & : dir( rtl ) {
111
111
float : right ;
112
112
}
113
113
}
114
114
li a {
115
115
float : left ;
116
- [ dir = rtl ] & {
116
+ & : dir( rtl ) {
117
117
float : right ;
118
118
}
119
119
color : $toolbar-menu-item-color ;
184
184
display : block ;
185
185
.cms-icon {
186
186
display : block ;
187
- [ dir = " rtl" ] & {
187
+ & : dir( rtl ) {
188
188
// undo arrow rotation for RTL
189
189
transform : rotate (0deg );
190
190
}
241
241
242
242
.cms-toolbar-item {
243
243
float : none ;
244
- [dir = rtl ] & {
244
+ [dir = " rtl" ] & {
245
245
// a bit weird, but if removed, it will best match
246
246
// with [dir="rtl"] div.cms .cms-toolbar .cms-toolbar-item
247
247
// and will float to the right
254
254
}
255
255
.cms-toolbar-item-cms-mode-switcher a {
256
256
float : left !important ;
257
- [ dir = rtl ] & {
257
+ & : dir( rtl ) {
258
258
float : right !important ;
259
259
}
260
260
width : 50% ;
415
415
cursor : pointer ;
416
416
display : none ;
417
417
float : right ;
418
- [ dir = rtl ] & {
418
+ & : dir( rtl ) {
419
419
float : left ;
420
420
}
421
421
position : relative ;
570
570
571
571
a {
572
572
float : left ;
573
- [ dir = rtl ] & {
573
+ & : dir( rtl ) {
574
574
float : right ;
575
575
}
576
576
line-height : $toolbar-button-height ;
Original file line number Diff line number Diff line change 390
390
color : $gray-darkest ;
391
391
background : none ;
392
392
393
- [ dir = rtl ] & {
393
+ & : dir( rtl ) {
394
394
// inline-start & inline-end are not widely supported
395
395
float : right ;
396
396
}
451
451
min-width : $pagetree-cell-inner-height ;
452
452
height : $pagetree-cell-inner-height ;
453
453
454
- [ dir = rtl ] & {
454
+ & : dir( rtl ) {
455
455
// inline-start & inline-end are not widely supported
456
456
float : left ;
457
457
}
501
501
.cms-tree-reload {
502
502
float : right ;
503
503
504
- [ dir = rtl ] & {
504
+ & : dir( rtl ) {
505
505
// inline-start & inline-end are not widely supported
506
506
float : left ;
507
507
}
652
652
float : left ;
653
653
margin-inline-end : 5px ;
654
654
655
- [ dir = rtl ] & {
655
+ & : dir( rtl ) {
656
656
// inline-start & inline-end are not widely supported
657
657
float : right ;
658
658
}
676
676
.cms-tree-filters {
677
677
float : right ;
678
678
679
- [ dir = rtl ] & {
679
+ & : dir( rtl ) {
680
680
// inline-start & inline-end are not widely supported
681
681
float : left ;
682
682
}
822
822
margin-inline-start : -1px ;
823
823
}
824
824
.jstree-ocl {
825
- float : left ;
825
+ float : left ;
826
826
position : relative ;
827
827
inset-inline-start : $pagetree-nesting-padding ;
828
828
font-size : 12px ;
832
832
padding-block-end : 10px ;
833
833
padding-inline-start : 0px ;
834
834
835
- [ dir = rtl ] & {
835
+ & : dir( rtl ) {
836
836
// inline-start & inline-end are not widely supported
837
837
float : right ;
838
838
}
892
892
color : $gray !important ;
893
893
}
894
894
895
- [ dir = rtl ] & {
895
+ & : dir( rtl ) {
896
896
// no direct logical property for background-position
897
897
background-position : calc (100% - 2px ) center ;
898
898
}
Original file line number Diff line number Diff line change
1
+ /* This patch file contains all :dir(rtl) selectors for browsers that do not support it yet */
2
+ /* Once, sufficiently many users have browsers that support `:dir()`, this file can be removed */
3
+
4
+ /* component: toolbar */
5
+
6
+ .cms-toolbar {
7
+ .cms-toolbar-item {
8
+ float : right ;
9
+ }
10
+ }
11
+
12
+ .cms-toolbar-item-navigation {
13
+ li , li a {
14
+ float : right ;
15
+ }
16
+ .cms-toolbar-item-navigation-children > a span .cms-icon {
17
+ transform : rotate (0deg );
18
+ }
19
+ }
20
+
21
+ .cms-toolbar-more .cms-toolbar-item-cms-mode-switcher a {
22
+ float : right !important ;
23
+ }
24
+
25
+ .cms-messages .cms-messages-close {
26
+ float : left ;
27
+ }
28
+
29
+ .cms-toolbar-item-buttons a {
30
+ float : right ;
31
+ }
32
+
33
+
34
+ /* component: modal */
35
+
36
+ .cms-modal-item-buttons {
37
+ float : left ;
38
+ }
39
+
40
+ .cms-modal-item-buttons-left {
41
+ float : right ;
42
+ }
43
+
44
+ .cms-modal-resize {
45
+ cursor : ne-resize ;
46
+ span {
47
+ transform : scale (-1 ,1 ) translate (2px , 0 ); // flip drag triangle
48
+ }
49
+ }
50
+
51
+
52
+ /* component: structureboard */
53
+
54
+ .cms-structure {
55
+ .cms-dragitem-collapsable :before {
56
+ transform : rotate (0deg );
57
+ }
58
+ .cms-dragitem-expanded :before {
59
+ transform : rotate (-90deg );
60
+ }
61
+ }
62
+
63
+
64
+ /* component: tree */
65
+
66
+ .cms-pagetree-section {
67
+ h2 {
68
+ float : right ;
69
+ }
70
+
71
+ }
72
+
73
+ .cms-tree-col , .cms-tree-reload , .cms-tree-filters {
74
+ float : left ;
75
+ }
76
+
77
+ .cms-tree-search {
78
+ float : right ;
79
+ }
80
+
81
+ .jstree-django-cms .jstree-ocl {
82
+ float : right ;
83
+ }
84
+
85
+ .jstree-anchor {
86
+ background-position : calc (100% - 2px ) center ;
87
+ }
Original file line number Diff line number Diff line change @@ -137,8 +137,8 @@ $z-layers: (
137
137
" messages" : 999999 ,
138
138
" toolbar" : (
139
139
" base" : 9999999 ,
140
- " left " : 10 ,
141
- " right " : 10 ,
140
+ " inset-inline-start " : 10 ,
141
+ " inset-inline-end " : 10 ,
142
142
),
143
143
" sideframe" : (
144
144
" base" : 999999 ,
You can’t perform that action at this time.
0 commit comments