Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
component_library
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
component_library
Merge requests
!17
Issue
#3315055
: Don't create an override button for the #override-mode-tray element in JS
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Issue
#3315055
: Don't create an override button for the #override-mode-tray element in JS
issue/component_library-3315055:3315055-exclude-override-tray
into
1.0.x
Overview
0
Commits
1
Pipelines
0
Changes
1
Merged
s_leu
requested to merge
issue/component_library-3315055:3315055-exclude-override-tray
into
1.0.x
2 years ago
Overview
0
Commits
1
Pipelines
0
Changes
1
Expand
Closes
#3315055
0
0
Merge request reports
Compare
1.0.x
1.0.x (base)
and
latest version
latest version
17dccabc
1 commit,
2 years ago
1 file
+
3
−
2
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
js/override_mode.js
+
3
−
2
Options
@@ -40,7 +40,7 @@
// Flag that Override Mode is enabled.
Drupal
.
behaviors
.
OverrideUiBehaviour
.
overrideMode
=
true
;
const
overridableTemplates
=
document
.
querySelectorAll
(
'
[data-override-mode]
'
);
const
overridableTemplates
=
document
.
querySelectorAll
(
'
[data-override-mode]
:not(#override-mode-tray)
'
);
const
list
=
document
.
createElement
(
'
ul
'
);
overridableTemplates
.
forEach
(
function
(
overridableTemplate
)
{
@@ -148,6 +148,7 @@
return
;
}
let
element
=
e
.
target
;
let
pairedButton
=
document
.
querySelector
(
'
[data-override-mode="
'
+
this
.
dataset
.
overrideMode
+
'
"].override-button
'
);
if
(
e
.
type
===
'
mouseover
'
)
{
@@ -179,7 +180,7 @@
},
};
let
variables
=
document
.
querySelector
(
'
script[data-uuid="
'
+
settings
.
uuid
+
'
"]
'
);
if
(
typeof
variables
.
textContent
!==
'
undefined
'
)
{
if
(
variables
!==
null
&&
typeof
variables
.
textContent
!==
'
undefined
'
)
{
ajaxConfig
.
submit
=
{
variables
:
variables
.
textContent
};
}
let
ajax
=
Drupal
.
ajax
(
ajaxConfig
);
Loading