From 91557080d7de2a806b6c09e29702d48241c3922b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Luca=20B=C3=B6sch?= Date: Sat, 15 Feb 2020 17:43:55 +0100 Subject: [PATCH] MDL-65448 core_course: Restyle non-JS activity moving. --- course/renderer.php | 5 ++--- theme/boost/scss/moodle/core.scss | 11 +++++++++++ theme/boost/style/moodle.css | 9 +++++++++ theme/classic/style/moodle.css | 9 +++++++++ 4 files changed, 31 insertions(+), 3 deletions(-) diff --git a/course/renderer.php b/course/renderer.php index 89b7e0c7566..8d25c221dd0 100644 --- a/course/renderer.php +++ b/course/renderer.php @@ -1004,7 +1004,6 @@ class core_course_renderer extends plugin_renderer_base { // check if we are currently in the process of moving a module with JavaScript disabled $ismoving = $this->page->user_is_editing() && ismoving($course->id); if ($ismoving) { - $movingpix = new pix_icon('movehere', get_string('movehere'), 'moodle', array('class' => 'movetarget')); $strmovefull = strip_tags(get_string("movefull", "", "'$USER->activitycopyname'")); } @@ -1032,7 +1031,7 @@ class core_course_renderer extends plugin_renderer_base { if ($ismoving) { $movingurl = new moodle_url('/course/mod.php', array('moveto' => $modnumber, 'sesskey' => sesskey())); $sectionoutput .= html_writer::tag('li', - html_writer::link($movingurl, $this->output->render($movingpix), array('title' => $strmovefull)), + html_writer::link($movingurl, '', array('title' => $strmovefull, 'class' => 'movehere')), array('class' => 'movehere')); } @@ -1042,7 +1041,7 @@ class core_course_renderer extends plugin_renderer_base { if ($ismoving) { $movingurl = new moodle_url('/course/mod.php', array('movetosection' => $section->id, 'sesskey' => sesskey())); $sectionoutput .= html_writer::tag('li', - html_writer::link($movingurl, $this->output->render($movingpix), array('title' => $strmovefull)), + html_writer::link($movingurl, '', array('title' => $strmovefull, 'class' => 'movehere')), array('class' => 'movehere')); } } diff --git a/theme/boost/scss/moodle/core.scss b/theme/boost/scss/moodle/core.scss index e49aaae7c64..4653e2d5777 100644 --- a/theme/boost/scss/moodle/core.scss +++ b/theme/boost/scss/moodle/core.scss @@ -219,6 +219,17 @@ div.dropdown-item { padding: 0; } +section a.movehere, +.section li.movehere a.movehere { + outline: 0; + box-shadow: $input-btn-focus-box-shadow; +} + +.editing .course-content .hidden.sectionname { + visibility: hidden; + display: initial; +} + .inline, .inline-list li { display: inline; diff --git a/theme/boost/style/moodle.css b/theme/boost/style/moodle.css index 82cbcd9dc07..6576a026e56 100644 --- a/theme/boost/style/moodle.css +++ b/theme/boost/style/moodle.css @@ -9840,6 +9840,15 @@ div.dropdown-item:focus-within { margin: 0; padding: 0; } +section a.movehere, +.section li.movehere a.movehere { + outline: 0; + box-shadow: 0 0 0 0.2rem rgba(17, 119, 209, 0.75); } + +.editing .course-content .hidden.sectionname { + visibility: hidden; + display: initial; } + .inline, .inline-list li { display: inline; } diff --git a/theme/classic/style/moodle.css b/theme/classic/style/moodle.css index 95385c80b28..cfb53dc13fb 100644 --- a/theme/classic/style/moodle.css +++ b/theme/classic/style/moodle.css @@ -10044,6 +10044,15 @@ div.dropdown-item:focus-within { margin: 0; padding: 0; } +section a.movehere, +.section li.movehere a.movehere { + outline: 0; + box-shadow: 0 0 0 0.2rem rgba(17, 119, 209, 0.75); } + +.editing .course-content .hidden.sectionname { + visibility: hidden; + display: initial; } + .inline, .inline-list li { display: inline; } -- 2.43.0