From 83cba7b9b01ad2921dc3155b78e74f9ffe2fde47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luca=20B=C3=B6sch?= Date: Sat, 15 Feb 2020 17:46:30 +0100 Subject: [PATCH 1/7] MDL-65448 gradebook: Restyle moving. --- grade/edit/tree/lib.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/grade/edit/tree/lib.php b/grade/edit/tree/lib.php index 42161297754..f34b69a1710 100644 --- a/grade/edit/tree/lib.php +++ b/grade/edit/tree/lib.php @@ -233,7 +233,6 @@ class grade_edit_tree { if ($this->moving && $this->moving != $child_eid) { $strmove = get_string('move'); - $strmovehere = get_string('movehere'); $actions = $moveaction = ''; // no action icons when moving $aurl = new moodle_url('index.php', array('id' => $COURSE->id, 'action' => 'move', 'eid' => $this->moving, 'moveafter' => $child_eid, 'sesskey' => sesskey())); @@ -245,8 +244,7 @@ class grade_edit_tree { $cell->colspan = 12; $cell->attributes['class'] = 'movehere level' . ($level + 1) . ' level' . ($level % 2 ? 'even' : 'odd'); - $icon = new pix_icon('movehere', $strmovehere, null, array('class'=>'movetarget')); - $cell->text = $OUTPUT->action_icon($aurl, $icon); + $cell->text = html_writer::link($aurl, '', array('title' => get_string('movehere'), 'class' => 'movehere')); $moveto = new html_table_row(array($cell)); } From 7c0923a3e4918c92cc3ad1a18ac6fa1060d6553f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luca=20B=C3=B6sch?= Date: Wed, 1 May 2019 11:54:09 +0200 Subject: [PATCH 2/7] MDL-65448 block_social_activities: Restyle moving. --- .../social_activities/block_social_activities.php | 13 +++++++------ theme/boost/scss/moodle/grade.scss | 11 +++++++++++ theme/boost/style/moodle.css | 9 +++++++++ theme/classic/style/moodle.css | 9 +++++++++ 4 files changed, 36 insertions(+), 6 deletions(-) diff --git a/blocks/social_activities/block_social_activities.php b/blocks/social_activities/block_social_activities.php index 2e5ec902fd9..35c651b94fe 100644 --- a/blocks/social_activities/block_social_activities.php +++ b/blocks/social_activities/block_social_activities.php @@ -83,7 +83,6 @@ class block_social_activities extends block_list { $section = $modinfo->get_section_info(0); if ($ismoving) { - $strmovehere = get_string('movehere'); $strmovefull = strip_tags(get_string('movefull', '', "'$USER->activitycopyname'")); $strcancel= get_string('cancel'); } else { @@ -92,7 +91,8 @@ class block_social_activities extends block_list { if ($ismoving) { $this->content->icons[] = ' ' . $OUTPUT->pix_icon('t/move', get_string('move')); - $this->content->items[] = $USER->activitycopyname.' ('.$strcancel.')'; + $cancelurl = new moodle_url('/course/mod.php', array('cancelcopy' => 'true', 'sesskey' => sesskey())); + $this->content->items[] = $USER->activitycopyname . ' (' . $strcancel . ')'; } if (!empty($modinfo->sections[0])) { @@ -123,8 +123,9 @@ class block_social_activities extends block_list { if ($mod->id == $USER->activitycopy) { continue; } - $this->content->items[] = ''. - ''.$strmovehere.''; + $movingurl = new moodle_url('/course/mod.php', array('moveto' => $mod->id, 'sesskey' => sesskey())); + $this->content->items[] = html_writer::link($movingurl, '', array('title' => $strmovefull, + 'class' => 'movehere')); $this->content->icons[] = ''; } if (!$mod->url) { @@ -140,8 +141,8 @@ class block_social_activities extends block_list { } if ($ismoving) { - $this->content->items[] = ''. - ''.$strmovehere.''; + $movingurl = new moodle_url('/course/mod.php', array('movetosection' => $section->id, 'sesskey' => sesskey())); + $this->content->items[] = html_writer::link($movingurl, '', array('title' => $strmovefull, 'class' => 'movehere')); $this->content->icons[] = ''; } diff --git a/theme/boost/scss/moodle/grade.scss b/theme/boost/scss/moodle/grade.scss index a97af4d458a..4d09195e602 100644 --- a/theme/boost/scss/moodle/grade.scss +++ b/theme/boost/scss/moodle/grade.scss @@ -276,6 +276,17 @@ padding-left: 24px; } + td.movehere { + padding: 0; + } + + td.movehere a.movehere { + display: block; + width: 100%; + height: 2rem; + border: 2px dashed $brand-primary; + } + .category input[type="text"], .category .column-range, .categoryitem, diff --git a/theme/boost/style/moodle.css b/theme/boost/style/moodle.css index 82cbcd9dc07..10b9a7dd869 100644 --- a/theme/boost/style/moodle.css +++ b/theme/boost/style/moodle.css @@ -18351,6 +18351,15 @@ p.arrow_button { .path-grade-edit-tree .setup-grades td.column-name { padding-left: 24px; } +.path-grade-edit-tree .setup-grades td.movehere { + padding: 0; } + +.path-grade-edit-tree .setup-grades td.movehere a.movehere { + display: block; + width: 100%; + height: 2rem; + border: 2px dashed #1177d1; } + .path-grade-edit-tree .setup-grades .category input[type="text"], .path-grade-edit-tree .setup-grades .category .column-range, .path-grade-edit-tree .setup-grades .categoryitem, diff --git a/theme/classic/style/moodle.css b/theme/classic/style/moodle.css index 95385c80b28..9fac82b7a62 100644 --- a/theme/classic/style/moodle.css +++ b/theme/classic/style/moodle.css @@ -18583,6 +18583,15 @@ p.arrow_button { .path-grade-edit-tree .setup-grades td.column-name { padding-left: 24px; } +.path-grade-edit-tree .setup-grades td.movehere { + padding: 0; } + +.path-grade-edit-tree .setup-grades td.movehere a.movehere { + display: block; + width: 100%; + height: 2rem; + border: 2px dashed #1177d1; } + .path-grade-edit-tree .setup-grades .category input[type="text"], .path-grade-edit-tree .setup-grades .category .column-range, .path-grade-edit-tree .setup-grades .categoryitem, From 91c9ca0f49ce67c75a395189e1ea94bd3fa1867d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luca=20B=C3=B6sch?= Date: Wed, 1 May 2019 11:27:38 +0200 Subject: [PATCH 3/7] MDL-65448 block_site_main_menu: Restyle moving. --- blocks/site_main_menu/block_site_main_menu.php | 10 +++++----- theme/boost/scss/moodle/core.scss | 13 +++++++++++++ theme/boost/scss/moodle/grade.scss | 2 +- theme/boost/scss/moodle/icons.scss | 4 ---- theme/boost/style/moodle.css | 15 ++++++++++++--- theme/classic/style/moodle.css | 15 ++++++++++++--- 6 files changed, 43 insertions(+), 16 deletions(-) diff --git a/blocks/site_main_menu/block_site_main_menu.php b/blocks/site_main_menu/block_site_main_menu.php index c5a692fa468..a0de2d1a755 100644 --- a/blocks/site_main_menu/block_site_main_menu.php +++ b/blocks/site_main_menu/block_site_main_menu.php @@ -88,7 +88,6 @@ class block_site_main_menu extends block_list { $section = $modinfo->get_section_info(0); if ($ismoving) { - $strmovehere = get_string('movehere'); $strmovefull = strip_tags(get_string('movefull', '', "'$USER->activitycopyname'")); $strcancel= get_string('cancel'); } else { @@ -128,8 +127,9 @@ class block_site_main_menu extends block_list { if ($mod->id == $USER->activitycopy) { continue; } - $this->content->items[] = ''. - ''.$strmovehere.''; + $movingurl = new moodle_url('/course/mod.php', array('moveto' => $mod->id, 'sesskey' => sesskey())); + $this->content->items[] = html_writer::link($movingurl, '', array('title' => $strmovefull, + 'class' => 'movehere')); $this->content->icons[] = ''; } if ($mod->indent > 0) { @@ -148,8 +148,8 @@ class block_site_main_menu extends block_list { } if ($ismoving) { - $this->content->items[] = ''. - ''.$strmovehere.''; + $movingurl = new moodle_url('/course/mod.php', array('movetosection' => $section->id, 'sesskey' => sesskey())); + $this->content->items[] = html_writer::link($movingurl, '', array('title' => $strmovefull, 'class' => 'movehere')); $this->content->icons[] = ''; } diff --git a/theme/boost/scss/moodle/core.scss b/theme/boost/scss/moodle/core.scss index e49aaae7c64..90eb0e57842 100644 --- a/theme/boost/scss/moodle/core.scss +++ b/theme/boost/scss/moodle/core.scss @@ -219,6 +219,19 @@ div.dropdown-item { padding: 0; } +.movehere { + display: block; + width: 100%; + height: 2rem; + border: 2px dashed $gray-800; + margin: 4px 0; +} + +.editing .course-content .hidden.sectionname { + visibility: hidden; + display: initial; +} + .inline, .inline-list li { display: inline; diff --git a/theme/boost/scss/moodle/grade.scss b/theme/boost/scss/moodle/grade.scss index 4d09195e602..a543b7450ba 100644 --- a/theme/boost/scss/moodle/grade.scss +++ b/theme/boost/scss/moodle/grade.scss @@ -284,7 +284,7 @@ display: block; width: 100%; height: 2rem; - border: 2px dashed $brand-primary; + border: 2px dashed $gray-800; } .category input[type="text"], diff --git a/theme/boost/scss/moodle/icons.scss b/theme/boost/scss/moodle/icons.scss index da5d30a72a9..b78839abf09 100644 --- a/theme/boost/scss/moodle/icons.scss +++ b/theme/boost/scss/moodle/icons.scss @@ -41,10 +41,6 @@ $iconsizes: map-merge(( height: $icon-big-height; font-size: $icon-big-height; } - - &.movetarget { - width: 80px; - } } .navbar-dark a .icon { diff --git a/theme/boost/style/moodle.css b/theme/boost/style/moodle.css index 10b9a7dd869..30b15c1f13e 100644 --- a/theme/boost/style/moodle.css +++ b/theme/boost/style/moodle.css @@ -9840,6 +9840,17 @@ div.dropdown-item:focus-within { margin: 0; padding: 0; } +.movehere { + display: block; + width: 100%; + height: 2rem; + border: 2px dashed #343a40; + margin: 4px 0; } + +.editing .course-content .hidden.sectionname { + visibility: hidden; + display: initial; } + .inline, .inline-list li { display: inline; } @@ -11874,8 +11885,6 @@ input[disabled] { width: 64px; height: 64px; font-size: 64px; } - .icon.movetarget { - width: 80px; } .navbar-dark a .icon { color: rgba(255, 255, 255, 0.5) !important; @@ -18358,7 +18367,7 @@ p.arrow_button { display: block; width: 100%; height: 2rem; - border: 2px dashed #1177d1; } + border: 2px dashed #343a40; } .path-grade-edit-tree .setup-grades .category input[type="text"], .path-grade-edit-tree .setup-grades .category .column-range, diff --git a/theme/classic/style/moodle.css b/theme/classic/style/moodle.css index 9fac82b7a62..6e741f0a191 100644 --- a/theme/classic/style/moodle.css +++ b/theme/classic/style/moodle.css @@ -10044,6 +10044,17 @@ div.dropdown-item:focus-within { margin: 0; padding: 0; } +.movehere { + display: block; + width: 100%; + height: 2rem; + border: 2px dashed #343a40; + margin: 4px 0; } + +.editing .course-content .hidden.sectionname { + visibility: hidden; + display: initial; } + .inline, .inline-list li { display: inline; } @@ -12087,8 +12098,6 @@ input[disabled] { width: 64px; height: 64px; font-size: 64px; } - .icon.movetarget { - width: 80px; } .navbar-dark a .icon { color: rgba(255, 255, 255, 0.5) !important; @@ -18590,7 +18599,7 @@ p.arrow_button { display: block; width: 100%; height: 2rem; - border: 2px dashed #1177d1; } + border: 2px dashed #343a40; } .path-grade-edit-tree .setup-grades .category input[type="text"], .path-grade-edit-tree .setup-grades .category .column-range, From 7789be40305c92333140a07af12e73bff6e4dcd4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luca=20B=C3=B6sch?= Date: Sat, 15 Feb 2020 17:43:55 +0100 Subject: [PATCH 4/7] MDL-65448 core_course: Restyle non-JS activity moving. --- course/renderer.php | 5 ++--- 1 file changed, 2 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')); } } From be019636d13da47cad4d3aa947af3f927a114029 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luca=20B=C3=B6sch?= Date: Mon, 19 Oct 2020 09:14:26 +0200 Subject: [PATCH 5/7] MDL-65448 gradebook: Remove erraneous dev .movehere class left over. --- theme/boost/scss/moodle/core.scss | 8 -------- theme/boost/style/moodle.css | 7 ------- theme/classic/style/moodle.css | 7 ------- 3 files changed, 22 deletions(-) diff --git a/theme/boost/scss/moodle/core.scss b/theme/boost/scss/moodle/core.scss index 90eb0e57842..420d18bccda 100644 --- a/theme/boost/scss/moodle/core.scss +++ b/theme/boost/scss/moodle/core.scss @@ -219,14 +219,6 @@ div.dropdown-item { padding: 0; } -.movehere { - display: block; - width: 100%; - height: 2rem; - border: 2px dashed $gray-800; - margin: 4px 0; -} - .editing .course-content .hidden.sectionname { visibility: hidden; display: initial; diff --git a/theme/boost/style/moodle.css b/theme/boost/style/moodle.css index 30b15c1f13e..1147316b5a8 100644 --- a/theme/boost/style/moodle.css +++ b/theme/boost/style/moodle.css @@ -9840,13 +9840,6 @@ div.dropdown-item:focus-within { margin: 0; padding: 0; } -.movehere { - display: block; - width: 100%; - height: 2rem; - border: 2px dashed #343a40; - margin: 4px 0; } - .editing .course-content .hidden.sectionname { visibility: hidden; display: initial; } diff --git a/theme/classic/style/moodle.css b/theme/classic/style/moodle.css index 6e741f0a191..9160379e01e 100644 --- a/theme/classic/style/moodle.css +++ b/theme/classic/style/moodle.css @@ -10044,13 +10044,6 @@ div.dropdown-item:focus-within { margin: 0; padding: 0; } -.movehere { - display: block; - width: 100%; - height: 2rem; - border: 2px dashed #343a40; - margin: 4px 0; } - .editing .course-content .hidden.sectionname { visibility: hidden; display: initial; } From 09e02634d4448e91b7be929e93be91a9e1ff726e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luca=20B=C3=B6sch?= Date: Mon, 19 Oct 2020 09:33:19 +0200 Subject: [PATCH 6/7] MDL-65448 core_course: Restyle non-JS activity moving. --- theme/boost/scss/moodle/core.scss | 7 +++++++ theme/boost/style/moodle.css | 6 ++++++ theme/classic/style/moodle.css | 6 ++++++ 3 files changed, 19 insertions(+) diff --git a/theme/boost/scss/moodle/core.scss b/theme/boost/scss/moodle/core.scss index 420d18bccda..4ed9701d77f 100644 --- a/theme/boost/scss/moodle/core.scss +++ b/theme/boost/scss/moodle/core.scss @@ -219,6 +219,13 @@ div.dropdown-item { padding: 0; } +.section li.movehere a { + display: block; + width: 100%; + height: 2rem; + border: 2px dashed $gray-800; +} + .editing .course-content .hidden.sectionname { visibility: hidden; display: initial; diff --git a/theme/boost/style/moodle.css b/theme/boost/style/moodle.css index 1147316b5a8..6fb453c4c80 100644 --- a/theme/boost/style/moodle.css +++ b/theme/boost/style/moodle.css @@ -9840,6 +9840,12 @@ div.dropdown-item:focus-within { margin: 0; padding: 0; } +.section li.movehere a { + display: block; + width: 100%; + height: 2rem; + border: 2px dashed #343a40; } + .editing .course-content .hidden.sectionname { visibility: hidden; display: initial; } diff --git a/theme/classic/style/moodle.css b/theme/classic/style/moodle.css index 9160379e01e..e5c2501eb8e 100644 --- a/theme/classic/style/moodle.css +++ b/theme/classic/style/moodle.css @@ -10044,6 +10044,12 @@ div.dropdown-item:focus-within { margin: 0; padding: 0; } +.section li.movehere a { + display: block; + width: 100%; + height: 2rem; + border: 2px dashed #343a40; } + .editing .course-content .hidden.sectionname { visibility: hidden; display: initial; } From a7e12a77b113524a2b631aec260720f331f0de19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luca=20B=C3=B6sch?= Date: Mon, 19 Oct 2020 09:43:42 +0200 Subject: [PATCH 7/7] MDL-65448 block_social_activities: Restyle moving. --- theme/boost/scss/moodle/blocks.scss | 8 ++++++++ theme/boost/style/moodle.css | 7 +++++++ theme/classic/style/moodle.css | 7 +++++++ 3 files changed, 22 insertions(+) diff --git a/theme/boost/scss/moodle/blocks.scss b/theme/boost/scss/moodle/blocks.scss index 235b190842d..e3299b177a0 100644 --- a/theme/boost/scss/moodle/blocks.scss +++ b/theme/boost/scss/moodle/blocks.scss @@ -364,4 +364,12 @@ body.drawer-open-left #region-main.has-blocks { border-left: 0; border-right: 0; } +} + +.block_social_activities li a.movehere { + display: block; + width: 100%; + height: 2rem; + border: 2px dashed $gray-800; + margin: 4px 0; } \ No newline at end of file diff --git a/theme/boost/style/moodle.css b/theme/boost/style/moodle.css index 6fb453c4c80..2ff9e7f7b12 100644 --- a/theme/boost/style/moodle.css +++ b/theme/boost/style/moodle.css @@ -12745,6 +12745,13 @@ input[disabled] { border-left: 0; border-right: 0; } } +.block_social_activities li a.movehere { + display: block; + width: 100%; + height: 2rem; + border: 2px dashed #343a40; + margin: 4px 0; } + .navbar { max-height: 50px; } diff --git a/theme/classic/style/moodle.css b/theme/classic/style/moodle.css index e5c2501eb8e..6c269ffd67f 100644 --- a/theme/classic/style/moodle.css +++ b/theme/classic/style/moodle.css @@ -12959,6 +12959,13 @@ input[disabled] { border-left: 0; border-right: 0; } } +.block_social_activities li a.movehere { + display: block; + width: 100%; + height: 2rem; + border: 2px dashed #343a40; + margin: 4px 0; } + .navbar { max-height: 50px; }