Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
MetObsSite
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
MetObs
MetObsSite
Commits
35c97e47
Commit
35c97e47
authored
6 years ago
by
David Hoese
Browse files
Options
Downloads
Plain Diff
Merge branch 'feature-file-level-tooltip' into 'develop'
Add tooltips to file ordering level options Closes
#7
See merge request
!6
parents
4204a00d
57bbd9e5
Branches
Branches containing commit
No related tags found
1 merge request
!6
Add tooltips to file ordering level options
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
content/js/file_download.js
+8
-3
8 additions, 3 deletions
content/js/file_download.js
content/js/form_util.js
+6
-2
6 additions, 2 deletions
content/js/form_util.js
with
14 additions
and
5 deletions
content/js/file_download.js
+
8
−
3
View file @
35c97e47
...
...
@@ -23,7 +23,7 @@ var addProducts = function(products,prefix,opt_name){
*/
var
product_dict
=
new
Object
();
var
addLevels
=
function
(
levels
,
header
,
prefix
){
var
addLevels
=
function
(
levels
,
header
,
prefix
)
{
//keep track of all the products associated with a level's name
//keep track of all the versions available to the levels
var
versions
=
new
Set
();
...
...
@@ -36,8 +36,13 @@ var addLevels = function(levels,header,prefix){
var
level_name
=
level
.
display_name
;
if
(
level
.
display_name
==
undefined
)
level_name
=
name
.
replace
(
'
l
'
,
'
L
'
).
replace
(
'
_
'
,
'
'
);
$
(
'
#levels
'
).
append
(
makeOption
(
level_key
+
'
'
+
header
,
head_string
+
level_name
,
header
));
var
level_desc
=
level
.
description
;
if
(
level_desc
===
undefined
)
level_desc
=
level_name
;
$
(
'
#levels
'
).
append
(
makeOption
(
level_key
+
'
'
+
header
,
head_string
+
level_name
,
header
,
level_desc
));
_
.
each
(
level
.
versions
,
function
(
version
){
versions
.
add
(
version
);});
product_dict
[
level_key
]
=
level
.
products
;
});
...
...
This diff is collapsed.
Click to expand it.
content/js/form_util.js
+
6
−
2
View file @
35c97e47
...
...
@@ -9,8 +9,12 @@ const time_re = /^([01][0-9]|2[0-3])(:[0-5][0-9]){0,2}$/;
/* Creates a string for an option html element with value key and innerHTML object.display_name
* if level is specified, append level to the value string
*/
function
makeOption
(
value
,
innerHTML
,
name
)
{
return
'
<option value="
'
+
value
+
'
" name="
'
+
name
+
'
">
'
+
innerHTML
+
'
</option>
'
;
function
makeOption
(
value
,
innerHTML
,
name
,
tooltip
)
{
if
(
tooltip
===
undefined
)
{
return
'
<option value="
'
+
value
+
'
" name="
'
+
name
+
'
">
'
+
innerHTML
+
'
</option>
'
;
}
else
{
return
'
<option value="
'
+
value
+
'
" name="
'
+
name
+
'
"title="
'
+
tooltip
+
'
">
'
+
innerHTML
+
'
</option>
'
;
}
}
/**
...
...
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