Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
lessons
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Statistics
lessons
Commits
1284585a
Commit
1284585a
authored
Apr 23, 2019
by
ROBERT PATRICK CAREY III
🗿
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleanup - Inspector
parent
c5510bca
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
14 deletions
+18
-14
modules/user_preferences/js/dist/user-preferences.js
modules/user_preferences/js/dist/user-preferences.js
+1
-1
modules/user_preferences/js/src/user-preferences.js
modules/user_preferences/js/src/user-preferences.js
+5
-1
modules/user_preferences/user_preferences.module
modules/user_preferences/user_preferences.module
+12
-12
No files found.
modules/user_preferences/js/dist/user-preferences.js
View file @
1284585a
This diff is collapsed.
Click to expand it.
modules/user_preferences/js/src/user-preferences.js
View file @
1284585a
...
...
@@ -325,6 +325,7 @@ document.addEventListener("DOMContentLoaded", function(event) {
window
.
paragraphInspector
=
!
window
.
paragraphInspector
;
let
elements
=
document
.
querySelectorAll
(
'
.paragraph
'
);
if
(
window
.
paragraphInspector
){
document
.
querySelector
(
'
.toggle-inspector
'
).
_tippy
.
setContent
(
'
Paragraph Inspector (enabled)
'
);
elements
.
forEach
(
element
=>
{
tippy
(
'
#
'
+
element
.
id
,
{
content
:
'
Paragraph:
'
+
element
.
id
.
replace
(
'
paragraph--
'
,
''
),
...
...
@@ -339,8 +340,11 @@ document.addEventListener("DOMContentLoaded", function(event) {
})
});
}
else
{
document
.
querySelector
(
'
.toggle-inspector
'
).
_tippy
.
setContent
(
'
Paragraph Inspector (disabled)
'
);
elements
.
forEach
(
element
=>
{
element
.
_tippy
.
destroy
();
if
(
element
.
_tippy
){
element
.
_tippy
.
destroy
();
}
});
}
}
...
...
modules/user_preferences/user_preferences.module
View file @
1284585a
...
...
@@ -70,24 +70,24 @@ function user_preferences_node_links_alter(array &$links, NodeInterface $node, a
'title'
=>
t
(
'<i class="fal fa-universal-access"> </i>'
),
'url'
=>
Url
::
fromUri
(
'internal:#toggleA11y'
),
'attributes'
=>
[
'title'
=>
t
(
'Accessibility Tools'
),
'data-tippy-content'
=>
t
(
'Accessibility Tools'
),
'id'
=>
'toggle_a11y_tools'
,
'onclick'
=>
'jQuery("#accessibilityPanel").modal("toggle")'
,
'data-toggle'
=>
'tooltip'
,
'aria-label'
=>
'Accessibility tools'
,
'title'
=>
t
(
'Accessibility Tools'
),
'data-tippy-content'
=>
t
(
'Accessibility Tools'
),
'id'
=>
'toggle_a11y_tools'
,
'onclick'
=>
'jQuery("#accessibilityPanel").modal("toggle")'
,
'data-toggle'
=>
'tooltip'
,
'aria-label'
=>
'Accessibility tools'
,
]
];
$link
[
'paragraphInspector'
]
=
[
'title'
=>
t
(
'<i class="fal fa-bullseye-pointer"> </i>'
),
'url'
=>
Url
::
fromUri
(
'internal:#toggleInspector'
),
'attributes'
=>
[
'title'
=>
t
(
'Identify Target
'
),
'data-tippy-content'
=>
t
(
'Identify Target
'
),
'id'
=>
'toggle_inspector'
,
'class'
=>
'toggle-inspector'
,
'data-toggle'
=>
'tooltip'
,
'aria-label'
=>
'Identify Target
'
,
'title'
=>
t
(
'Paragraph Inspector
'
),
'data-tippy-content'
=>
t
(
'Paragraph Inspector (disabled)
'
),
'id'
=>
'toggle_inspector'
,
'class'
=>
'toggle-inspector'
,
'data-toggle'
=>
'tooltip'
,
'aria-label'
=>
'Paragraph Inspector
'
,
]
];
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment