Skip to content

Commit

Permalink
MDL-75669 theme_boost: Refactor BS5 data attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
roland04 committed Dec 3, 2024
1 parent bceb68b commit 0e79a14
Show file tree
Hide file tree
Showing 159 changed files with 300 additions and 300 deletions.
2 changes: 1 addition & 1 deletion admin/amd/build/expand_hash.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion admin/amd/build/expand_hash.min.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion admin/amd/src/expand_hash.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
*/

const SELECTORS = {
COLLAPSE_ELEMENTS: '[data-toggle="collapse"]',
COLLAPSE_ELEMENTS: '[data-bs-toggle="collapse"]',
FOCUSTHENEXPAND_ELEMENTS: '.focus-expand',
};

Expand Down
2 changes: 1 addition & 1 deletion admin/classes/table/hook_list_table.php
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ protected function get_tag(
}

if ($tooltip) {
$attributes['data-toggle'] = 'tooltip';
$attributes['data-bs-toggle'] = 'tooltip';
$attributes['title'] = $tooltip;
}
return html_writer::span($tag, "badge badge-{$type}", $attributes);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
{{#skippedchanges.show}}
{{#skippedchanges.heading}}
<h3>
<a data-toggle="collapse" href="#collapseSkippedChanges" role="button" aria-expanded="false" aria-controls="collapseSkippedChanges">
<a data-bs-toggle="collapse" href="#collapseSkippedChanges" role="button" aria-expanded="false" aria-controls="collapseSkippedChanges">
{{{.}}}
</a>
</h3>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
</div>
</form>
</div>
<button class="btn bd-search-docs-toggle d-md-none p-0 ms-3" type="button" data-toggle="collapse"
<button class="btn bd-search-docs-toggle d-md-none p-0 ms-3" type="button" data-bs-toggle="collapse"
data-target="#docssidebar" aria-controls="docssidebar" aria-expanded="false" aria-label="Toggle docs navigation">
<svg xmlns="http://www.w3.org/2000/svg" width="30" height="30" viewBox="0 0 30 30" role="img" focusable="false">
<title>Menu</title>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
{{- else -}}
{{- safeHTML .Params.head -}}
{{- $numberOfPages := (add (len .Pages) (len .Sections)) -}}
<li class="{{ if .IsAncestor $currentNode }}parent{{ end }}{{ if and .File $currentNode.File }}{{ if eq .File.UniqueID $currentNode.File.UniqueID }} active{{ end }}{{ end }}{{ if .Params.alwaysopen }} parent{{ end }}"><a href="{{ if .IsPage }}{{ .Permalink }}{{ else}}#{{ end }}" data-toggle="collapse" data-target="#collapse{{ .File.UniqueID }}" aria-expanded="true" aria-controls="collapse{{ .File.UniqueID }}" class="dropdown-toggle"><div class="text-truncate">{{ safeHTML .Params.Pre }}{{ .Title }}{{ safeHTML .Params.Post }}</div></a>
<li class="{{ if .IsAncestor $currentNode }}parent{{ end }}{{ if and .File $currentNode.File }}{{ if eq .File.UniqueID $currentNode.File.UniqueID }} active{{ end }}{{ end }}{{ if .Params.alwaysopen }} parent{{ end }}"><a href="{{ if .IsPage }}{{ .Permalink }}{{ else}}#{{ end }}" data-bs-toggle="collapse" data-target="#collapse{{ .File.UniqueID }}" aria-expanded="true" aria-controls="collapse{{ .File.UniqueID }}" class="dropdown-toggle"><div class="text-truncate">{{ safeHTML .Params.Pre }}{{ .Title }}{{ safeHTML .Params.Post }}</div></a>
{{ if ne $numberOfPages 0 }}
<ul id="collapse{{ .File.UniqueID }}" class="sub-menu collapse {{ if .IsAncestor $currentNode }}show{{ end }}">
{{- .Scratch.Set "pages" .Pages -}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<div class="d-sm-flex flex-wrap">
{{ range $.Site.Data.fontawesomeicons }}
<div class="card mb-2 mx-1 p-1 d-flex flex-column justify-content-around text-center" style="flex: 0 0 20%; height: 150px">
<div class="small text-truncate" data-toggle="tooltip" data-placement="bottom" title="{{ .name }}">{{ .name }}</div>
<div class="small text-truncate" data-bs-toggle="tooltip" data-bs-placement="bottom" title="{{ .name }}">{{ .name }}</div>
<div class="row g-0">
<div class="col-sm-6 d-flex align-items-center justify-content-center">
<i class="{{ .icon }} fa-2x"></i>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,22 @@ <h6 data-action="refresh" class="mb-3">{{- .Get "template" -}}</h6>
<div class="nav nav-tabs" id="nav-tab" role="tablist">
<a class="nav-item nav-link active"
id="nav-rendered{{- .Position.LineNumber -}}-tab"
data-toggle="tab"
data-bs-toggle="tab"
href="#nav-rendered{{- .Position.LineNumber -}}"
role="tab" aria-controls="nav-rendered{{- .Position.LineNumber -}}" aria-selected="true"
>
Rendered
</a>
<a class="nav-item nav-link"
id="nav-template{{- .Position.LineNumber -}}-tab"
data-toggle="tab"
data-bs-toggle="tab"
href="#nav-template{{- .Position.LineNumber -}}" role="tab" aria-controls="nav-template{{- .Position.LineNumber -}}" aria-selected="false"
>
Template
</a>
<a class="nav-item nav-link"
id="nav-variables{{- .Position.LineNumber -}}-tab"
data-toggle="tab"
data-bs-toggle="tab"
href="#nav-variables{{- .Position.LineNumber -}}" role="tab" aria-controls="nav-variables{{- .Position.LineNumber -}}" aria-selected="false"
>
Variables
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
}
}}
<div class="bd-clipboard">
<button type="button" class="btn-clipboard" data-toggle="tooltip" data-placement="top" title="{{#str}}copytoclipboard, tool_componentlibrary{{/str}}"
<button type="button" class="btn-clipboard" data-bs-toggle="tooltip" data-bs-placement="top" title="{{#str}}copytoclipboard, tool_componentlibrary{{/str}}"
data-action="copytoclipboard" data-clipboard-target="{{clipboardtarget}}">
{{#str}}copy, tool_componentlibrary{{/str}}
</button>
Expand Down
4 changes: 2 additions & 2 deletions admin/tool/mfa/factor/totp/classes/factor.php
Original file line number Diff line number Diff line change
Expand Up @@ -205,8 +205,8 @@ public function setup_factor_form_definition_after_data(MoodleQuickForm $mform):
$html = \html_writer::div($html, 'collapse', ['id' => 'collapseManualAttributes']);

$togglelink = \html_writer::tag('a', get_string('setupfactor:link', 'factor_totp'), [
'data-toggle' => 'collapse',
'data-target' => '#collapseManualAttributes',
'data-bs-toggle' => 'collapse',
'data-bs-target' => '#collapseManualAttributes',
'aria-expanded' => 'false',
'aria-controls' => 'collapseManualAttributes',
'href' => '#',
Expand Down
2 changes: 1 addition & 1 deletion admin/tool/mobile/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ function tool_mobile_myprofile_navigation(\core_user\output\myprofile\tree $tree
$mobileqr = html_writer::tag('p', get_string('qrcodeformobileapploginabout', 'tool_mobile',
format_time($qrkeyttl)));
$mobileqr .= html_writer::link('#qrcode', get_string('viewqrcode', 'tool_mobile'),
['class' => 'btn btn-primary mt-2', 'data-toggle' => 'collapse',
['class' => 'btn btn-primary mt-2', 'data-bs-toggle' => 'collapse',
'role' => 'button', 'aria-expanded' => 'false']);
$mobileqr .= html_writer::div(html_writer::img($qrcodeimg, $qrcodeforappstr), 'collapse mt-4', ['id' => 'qrcode']);
}
Expand Down
4 changes: 2 additions & 2 deletions ai/placement/courseassist/templates/summarise_button.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
aria-controls="ai-drawer"
type="button"
data-action="course-summarise"
data-toggle="tooltip"
data-html="true"
data-bs-toggle="tooltip"
data-bs-html="true"
title="{{#str}} summarise_tooltips, aiplacement_courseassist {{/str}}"
>
<span class="ai-course-summarise-sparkles-icon">
Expand Down
2 changes: 1 addition & 1 deletion backup/util/ui/templates/formselectall.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
(<a
class="collapsed showmore-container"
id="mod_select_links_toggler"
data-toggle="collapse"
data-bs-toggle="collapse"
href="#mod_select_links"
aria-expanded="false"
aria-controls="mod_select_links"
Expand Down
2 changes: 1 addition & 1 deletion badges/templates/issued_badge.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@

{{#hasotherfields}}
<div id="badge-other-fields">
<a data-toggle="collapse" href="#collapseOtherDetails" role="button" aria-expanded="false" aria-controls="collapseOtherDetails">
<a data-bs-toggle="collapse" href="#collapseOtherDetails" role="button" aria-expanded="false" aria-controls="collapseOtherDetails">
{{#str}}moredetails, core_badges{{/str}}
</a>
<div class="collapse" id="collapseOtherDetails">
Expand Down
2 changes: 1 addition & 1 deletion blocks/myoverview/templates/course-action-menu.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<div class="ms-auto dropdown">
<button class="btn btn-link btn-icon icon-size-3 coursemenubtn"
type="button"
data-toggle="dropdown"
data-bs-toggle="dropdown"
aria-haspopup="true"
aria-expanded="false">
<i class="icon fa fa-ellipsis-v fa-fw m-0" title="{{#str}} aria:courseactions, block_myoverview {{/str}} {{{fullname}}}" aria-hidden="true"></i>
Expand Down
2 changes: 1 addition & 1 deletion blocks/myoverview/templates/nav-display-selector.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
}
}}
<div class="dropdown mb-1">
<button id="displaydropdown" type="button" class="btn btn-outline-secondary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"
<button id="displaydropdown" type="button" class="btn btn-outline-secondary dropdown-toggle" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false"
aria-label="{{#str}} aria:displaydropdown, block_myoverview {{/str}}">
<span data-active-item-text>
{{#card}}{{#str}} card, block_myoverview {{/str}}{{/card}}
Expand Down
2 changes: 1 addition & 1 deletion blocks/myoverview/templates/nav-grouping-selector.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
}}
{{#displaygroupingselector}}
<div class="dropdown mb-1 me-1">
<button id="groupingdropdown" type="button" class="btn btn-outline-secondary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" aria-label="{{#str}} aria:groupingdropdown, block_myoverview {{/str}}">
<button id="groupingdropdown" type="button" class="btn btn-outline-secondary dropdown-toggle" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false" aria-label="{{#str}} aria:groupingdropdown, block_myoverview {{/str}}">
<span data-active-item-text>
{{#allincludinghidden}}{{#str}} allincludinghidden, block_myoverview {{/str}}{{/allincludinghidden}}
{{#all}}{{#str}} all, block_myoverview {{/str}}{{/all}}
Expand Down
Loading

0 comments on commit 0e79a14

Please sign in to comment.