Merge branch 'MDL-85281-main' of https://github.com/roland04/moodle
This commit is contained in:
@@ -48,7 +48,10 @@ class behat_blocks extends behat_base {
|
||||
*/
|
||||
public function i_add_the_block($blockname) {
|
||||
$addblock = get_string('addblock');
|
||||
$this->execute('behat_general::i_click_on_in_the', [$addblock, 'link_exact', '.add_block_button', 'css_element']);
|
||||
$this->execute(
|
||||
'behat_general::i_click_on_in_the',
|
||||
[$addblock, 'link_exact', '[data-region="add-block-button"]', 'css_element']
|
||||
);
|
||||
|
||||
if (!$this->running_javascript()) {
|
||||
$this->execute('behat_general::i_click_on_in_the', [$blockname, 'link_exact', '#region-main', 'css_element']);
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
{{/decrease}}
|
||||
{{#addsections}}
|
||||
<a href="{{{url}}}"
|
||||
class="w-100 btn add-section justify-content-center align-items-center p-3"
|
||||
class="w-100 btn btn-add-content rounded-4 p-3"
|
||||
data-add-sections="{{title}}"
|
||||
data-new-sections="{{newsection}}"
|
||||
data-action="addSection"
|
||||
|
||||
@@ -28,10 +28,10 @@
|
||||
}
|
||||
|
||||
}}
|
||||
<div class="add_block_button">
|
||||
<a href="{{link}}" id="addblock-{{uniqid}}" class="btn btn-link block-add text-start mb-3" data-key="addblock"
|
||||
<div class="d-grid" data-region="add-block-button">
|
||||
<a href="{{link}}" id="addblock-{{uniqid}}" class="btn btn-add-content mb-3" data-key="addblock"
|
||||
data-url="{{escapedlink}}" data-blockregion="{{blockregion}}">
|
||||
<i class="fa fa-plus py-2 me-3" aria-hidden="true"></i>{{#str}}addblock{{/str}}
|
||||
<i class="fa fa-plus py-2 me-2" aria-hidden="true"></i>{{#str}}addblock{{/str}}
|
||||
</a>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -143,3 +143,23 @@ p.arrow_button {
|
||||
--#{$prefix}btn-focus-shadow-rgb: #{to-rgb($gray-600)};
|
||||
@include button-focus($gray-600, $white);
|
||||
}
|
||||
|
||||
/*
|
||||
* Add content buttons.
|
||||
*/
|
||||
|
||||
.btn-add-content {
|
||||
@include border-radius();
|
||||
border: map-get($border-widths, 2) dashed $border-color;
|
||||
color: $primary;
|
||||
background-color: $body-bg;
|
||||
font-size: $font-size-sm;
|
||||
font-weight: bold;
|
||||
&:hover,
|
||||
&:focus {
|
||||
background-color: $primary-light-background;
|
||||
border-style: solid;
|
||||
border-color: $primary;
|
||||
color: $primary;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -53,21 +53,6 @@ $divider-hover-color: $primary !default;
|
||||
}
|
||||
}
|
||||
|
||||
// Course 'add section' button.
|
||||
.btn.add-section {
|
||||
@include border-radius($activity-border-radius);
|
||||
border: $divider-width dashed $border-color;
|
||||
color: $primary;
|
||||
font-size: $font-size-sm;
|
||||
font-weight: bold;
|
||||
&:hover,
|
||||
&:focus {
|
||||
background-color: $primary-light-background;
|
||||
border: $divider-width solid $primary;
|
||||
color: $primary;
|
||||
}
|
||||
}
|
||||
|
||||
// Max sections reached alert.
|
||||
.max-section-alert {
|
||||
border-top: $divider-width dashed $border-color;
|
||||
|
||||
@@ -30629,19 +30629,6 @@ table.calendartable caption {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.btn.add-section {
|
||||
border-radius: 1rem;
|
||||
border: 2px dashed #dee2e6;
|
||||
color: #0f6cbf;
|
||||
font-size: 0.8203125rem;
|
||||
font-weight: bold;
|
||||
}
|
||||
.btn.add-section:hover, .btn.add-section:focus {
|
||||
background-color: #e7f0f9;
|
||||
border: 2px solid #0f6cbf;
|
||||
color: #0f6cbf;
|
||||
}
|
||||
|
||||
.max-section-alert {
|
||||
border-top: 2px dashed #dee2e6;
|
||||
font-size: 0.8203125rem;
|
||||
@@ -37499,6 +37486,24 @@ p.arrow_button {
|
||||
box-shadow: inset 0 0 0 2px #fff;
|
||||
}
|
||||
|
||||
/*
|
||||
* Add content buttons.
|
||||
*/
|
||||
.btn-add-content {
|
||||
border-radius: 0.5rem;
|
||||
border: 2px dashed #dee2e6;
|
||||
color: #0f6cbf;
|
||||
background-color: #fff;
|
||||
font-size: 0.8203125rem;
|
||||
font-weight: bold;
|
||||
}
|
||||
.btn-add-content:hover, .btn-add-content:focus {
|
||||
background-color: #e7f0f9;
|
||||
border-style: solid;
|
||||
border-color: #0f6cbf;
|
||||
color: #0f6cbf;
|
||||
}
|
||||
|
||||
.gradetreebox {
|
||||
margin: 20px 0 30px 0;
|
||||
}
|
||||
|
||||
@@ -30629,19 +30629,6 @@ table.calendartable caption {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.btn.add-section {
|
||||
border-radius: 1rem;
|
||||
border: 2px dashed #dee2e6;
|
||||
color: #0f6cbf;
|
||||
font-size: 0.8203125rem;
|
||||
font-weight: bold;
|
||||
}
|
||||
.btn.add-section:hover, .btn.add-section:focus {
|
||||
background-color: #e7f0f9;
|
||||
border: 2px solid #0f6cbf;
|
||||
color: #0f6cbf;
|
||||
}
|
||||
|
||||
.max-section-alert {
|
||||
border-top: 2px dashed #dee2e6;
|
||||
font-size: 0.8203125rem;
|
||||
@@ -37499,6 +37486,24 @@ p.arrow_button {
|
||||
box-shadow: inset 0 0 0 2px #fff;
|
||||
}
|
||||
|
||||
/*
|
||||
* Add content buttons.
|
||||
*/
|
||||
.btn-add-content {
|
||||
border-radius: 0.375rem;
|
||||
border: 2px dashed #dee2e6;
|
||||
color: #0f6cbf;
|
||||
background-color: #fff;
|
||||
font-size: 0.8203125rem;
|
||||
font-weight: bold;
|
||||
}
|
||||
.btn-add-content:hover, .btn-add-content:focus {
|
||||
background-color: #e7f0f9;
|
||||
border-style: solid;
|
||||
border-color: #0f6cbf;
|
||||
color: #0f6cbf;
|
||||
}
|
||||
|
||||
.gradetreebox {
|
||||
margin: 20px 0 30px 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user