From c5b70d12f90c94d28fff77032c03fb3f915925ea Mon Sep 17 00:00:00 2001 From: Jake Dallimore Date: Thu, 8 Dec 2016 08:36:42 +0800 Subject: [PATCH] MDL-57074 Filepicker: Fix alias and link icons in RTL mode Fixed alignment of the images in RTL mode. Also fixed a z-index problem in which the icons were displayed above the open drawer on narrow screens. --- theme/boost/scss/moodle/filemanager.scss | 16 ++++++++++++++-- theme/bootstrapbase/less/moodle/filemanager.less | 14 ++++++++++++++ theme/bootstrapbase/style/moodle.css | 14 ++++++++++++++ 3 files changed, 42 insertions(+), 2 deletions(-) diff --git a/theme/boost/scss/moodle/filemanager.scss b/theme/boost/scss/moodle/filemanager.scss index 0b830b20d1a..6c6b75f0574 100644 --- a/theme/boost/scss/moodle/filemanager.scss +++ b/theme/boost/scss/moodle/filemanager.scss @@ -636,11 +636,19 @@ a.ygtvspacer:hover { .fp-iconview .fp-file.fp-hasreferences .fp-reficons1 { background: url('[[pix:theme|fp/link]]') no-repeat; + /*rtl:raw: + transform: scaleX(-1); + */ + /*rtl:ignore*/ background-position: bottom right; } .fp-iconview .fp-file.fp-isreference .fp-reficons2 { background: url('[[pix:theme|fp/alias]]') no-repeat; + /*rtl:raw: + transform: scaleX(-1); + */ + /*rtl:ignore*/ background-position: bottom left; } @@ -685,20 +693,24 @@ a.ygtvspacer:hover { background: url('[[pix:theme|fp/link_sm]]') no-repeat 0 0; height: 100%; width: 100%; + /*rtl:raw: + transform: scaleX(-1); + */ position: absolute; top: 8px; left: 17px; - z-index: 1000; } .filemanager .fp-filename-icon.fp-isreference .fp-reficons2 { background: url('[[pix:theme|fp/alias_sm]]') no-repeat 0 0; height: 100%; width: 100%; + /*rtl:raw: + transform: scaleX(-1); + */ position: absolute; top: 9px; left: -6px; - z-index: 1001; } // Folder Context Menu (File Manager only) .filemanager .fp-contextmenu { diff --git a/theme/bootstrapbase/less/moodle/filemanager.less b/theme/bootstrapbase/less/moodle/filemanager.less index e0936696f4c..4591b25f83d 100644 --- a/theme/bootstrapbase/less/moodle/filemanager.less +++ b/theme/bootstrapbase/less/moodle/filemanager.less @@ -823,10 +823,18 @@ a.ygtvspacer:hover { } .fp-iconview .fp-file.fp-hasreferences .fp-reficons1 { background: url('[[pix:theme|fp/link]]') no-repeat; + /*rtl:raw: + transform: scaleX(-1); + */ + /*rtl:ignore*/ background-position: bottom right; } .fp-iconview .fp-file.fp-isreference .fp-reficons2 { background: url('[[pix:theme|fp/alias]]') no-repeat; + /*rtl:raw: + transform: scaleX(-1); + */ + /*rtl:ignore*/ background-position: bottom left; } .filemanager .fp-iconview .fp-file.fp-originalmissing .fp-thumbnail img { @@ -859,6 +867,9 @@ a.ygtvspacer:hover { background: url('[[pix:theme|fp/link_sm]]') no-repeat 0 0; height: 100%; width: 100%; + /*rtl:raw: + transform: scaleX(-1); + */ position: absolute; top: 8px; left: 17px; @@ -868,6 +879,9 @@ a.ygtvspacer:hover { background: url('[[pix:theme|fp/alias_sm]]') no-repeat 0 0; height: 100%; width: 100%; + /*rtl:raw: + transform: scaleX(-1); + */ position: absolute; top: 9px; left: -6px; diff --git a/theme/bootstrapbase/style/moodle.css b/theme/bootstrapbase/style/moodle.css index 0e16b438c4c..d5f608be74b 100644 --- a/theme/bootstrapbase/style/moodle.css +++ b/theme/bootstrapbase/style/moodle.css @@ -5515,10 +5515,18 @@ a.ygtvspacer:hover { } .fp-iconview .fp-file.fp-hasreferences .fp-reficons1 { background: url('[[pix:theme|fp/link]]') no-repeat; + /*rtl:raw: + transform: scaleX(-1); + */ + /*rtl:ignore*/ background-position: bottom right; } .fp-iconview .fp-file.fp-isreference .fp-reficons2 { background: url('[[pix:theme|fp/alias]]') no-repeat; + /*rtl:raw: + transform: scaleX(-1); + */ + /*rtl:ignore*/ background-position: bottom left; } .filemanager .fp-iconview .fp-file.fp-originalmissing .fp-thumbnail img { @@ -5550,6 +5558,9 @@ a.ygtvspacer:hover { background: url('[[pix:theme|fp/link_sm]]') no-repeat 0 0; height: 100%; width: 100%; + /*rtl:raw: + transform: scaleX(-1); + */ position: absolute; top: 8px; left: 17px; @@ -5559,6 +5570,9 @@ a.ygtvspacer:hover { background: url('[[pix:theme|fp/alias_sm]]') no-repeat 0 0; height: 100%; width: 100%; + /*rtl:raw: + transform: scaleX(-1); + */ position: absolute; top: 9px; left: -6px;