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
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
drupal
Commits
ab61b252
Commit
ab61b252
authored
Jun 26, 2013
by
catch
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#2024681
by jenlampton: Remove theme_meter() from core.
parent
2c4e8fe6
No related branches found
No related tags found
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
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
core/includes/theme.inc
+0
-46
0 additions, 46 deletions
core/includes/theme.inc
with
0 additions
and
46 deletions
core/includes/theme.inc
+
0
−
46
View file @
ab61b252
...
...
@@ -2399,49 +2399,6 @@ function theme_progress_bar($variables) {
return
$output
;
}
/**
* Returns HTML for a meter.
*
* @param $variables
* An associative array containing:
* - display_value: The textual representation of the meter bar.
* - form: A string specifying one or more forms to which the <meter> element
* belongs separated by spaces.
* - high: A number specifying the range that is considered to be a high
* value.
* - low: A number specifying the range that is considered to be a low value.
* - max: A number specifying the maximum value of the range.
* - min: A number specifying the minimum value of the range.
* - optimum: A number specifying what value is the optimal value for the
* gauge.
* - value: A number specifying the current value of the gauge.
* - percentage: A number specifying the current percentage of the gauge.
* - attributes: Associative array of attributes to be placed in the meter
* tag.
*/
function
theme_meter
(
$variables
)
{
$attributes
=
$variables
[
'attributes'
];
foreach
(
array
(
'form'
,
'high'
,
'low'
,
'max'
,
'min'
,
'optimum'
,
'value'
)
as
$attribute
)
{
if
(
!
empty
(
$variables
[
$attribute
]))
{
// This function was initially designed for the <meter> tag, but due to
// the lack of browser and styling support for it, we're currently using
// it's attributes as HTML5 data attributes.
$attributes
[
'data-'
.
$attribute
]
=
$variables
[
$attribute
];
}
}
$output
=
'<div'
.
new
Attribute
(
$attributes
)
.
'>'
;
$output
.
=
' <div style="width: '
.
$variables
[
'percentage'
]
.
'%;" class="foreground"></div>'
;
$output
.
=
"</div>
\n
"
;
if
(
!
empty
(
$variables
[
'display_value'
]))
{
$output
.
=
'<div class="percent">'
.
$variables
[
'display_value'
]
.
'</div>'
;
}
return
$output
;
}
/**
* Returns HTML for an indentation div; used for drag and drop tables.
*
...
...
@@ -3118,9 +3075,6 @@ function drupal_common_theme() {
'table'
=>
array
(
'variables'
=>
array
(
'header'
=>
NULL
,
'rows'
=>
NULL
,
'attributes'
=>
array
(),
'caption'
=>
NULL
,
'colgroups'
=>
array
(),
'sticky'
=>
TRUE
,
'responsive'
=>
TRUE
,
'empty'
=>
''
),
),
'meter'
=>
array
(
'variables'
=>
array
(
'display_value'
=>
NULL
,
'form'
=>
NULL
,
'high'
=>
NULL
,
'low'
=>
NULL
,
'max'
=>
NULL
,
'min'
=>
NULL
,
'optimum'
=>
NULL
,
'value'
=>
NULL
,
'percentage'
=>
NULL
,
'attributes'
=>
array
()),
),
'tablesort_indicator'
=>
array
(
'variables'
=>
array
(
'style'
=>
NULL
),
'template'
=>
'tablesort-indicator'
,
...
...
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