Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
drupal
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
drupal
Commits
0abd1bb2
Commit
0abd1bb2
authored
10 years ago
by
Alex Pott
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#2452381
by lanchez, googletorp, PieterJanPut: Use Drupal.theme for progress.js
parent
e3573a2a
Branches
Branches containing commit
Tags
Tags containing commit
2 merge requests
!7452
Issue #1797438. HTML5 validation is preventing form submit and not fully...
,
!789
Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
core/misc/progress.js
+18
-7
18 additions, 7 deletions
core/misc/progress.js
with
18 additions
and
7 deletions
core/misc/progress.js
+
18
−
7
View file @
0abd1bb2
(
function
(
$
)
{
(
function
(
$
,
Drupal
)
{
"
use strict
"
;
"
use strict
"
;
/**
* Theme function for the progress bar.
*
* @return
* The HTML for the progress bar.
*/
Drupal
.
theme
.
progressBar
=
function
(
id
)
{
return
'
<div id="
'
+
id
+
'
" class="progress" aria-live="polite">
'
+
'
<div class="progress__label"> </div>
'
+
'
<div class="progress__track"><div class="progress__bar"></div></div>
'
+
'
<div class="progress__percentage"></div>
'
+
'
<div class="progress__description"> </div>
'
+
'
</div>
'
;
};
/**
/**
* A progressbar object. Initialized with the given id. Must be inserted into
* A progressbar object. Initialized with the given id. Must be inserted into
* the DOM afterwards through progressBar.element.
* the DOM afterwards through progressBar.element.
...
@@ -20,11 +35,7 @@
...
@@ -20,11 +35,7 @@
// The WAI-ARIA setting aria-live="polite" will announce changes after users
// The WAI-ARIA setting aria-live="polite" will announce changes after users
// have completed their current activity and not interrupt the screen reader.
// have completed their current activity and not interrupt the screen reader.
this
.
element
=
$
(
'
<div class="progress" aria-live="polite"></div>
'
).
attr
(
'
id
'
,
id
);
this
.
element
=
$
(
Drupal
.
theme
(
id
));
this
.
element
.
html
(
'
<div class="progress__label"> </div>
'
+
'
<div class="progress__track"><div class="progress__bar"></div></div>
'
+
'
<div class="progress__percentage"></div>
'
+
'
<div class="progress__description"> </div>
'
);
};
};
$
.
extend
(
Drupal
.
ProgressBar
.
prototype
,
{
$
.
extend
(
Drupal
.
ProgressBar
.
prototype
,
{
...
@@ -109,4 +120,4 @@
...
@@ -109,4 +120,4 @@
}
}
});
});
})(
jQuery
);
})(
jQuery
,
Drupal
);
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment