Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
minerva
core
Commits
58a360bd
Commit
58a360bd
authored
6 years ago
by
Piotr Gawron
Browse files
Options
Downloads
Patches
Plain Diff
order column contains only number
parent
db307666
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!412
changes from 12.1.0~beta.1 into master
,
!405
Resolve "Custom overlays are not sorted in numeric order"
Pipeline
#6429
passed
6 years ago
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
frontend-js/src/main/js/gui/leftPanel/OverlayPanel.js
+15
-4
15 additions, 4 deletions
frontend-js/src/main/js/gui/leftPanel/OverlayPanel.js
with
15 additions
and
4 deletions
frontend-js/src/main/js/gui/leftPanel/OverlayPanel.js
+
15
−
4
View file @
58a360bd
...
...
@@ -329,7 +329,7 @@ OverlayPanel.prototype.overlayToDataRow = function (overlay, checked, disabled)
result
[
4
]
=
""
;
}
if
(
overlay
.
getDescription
()
!==
""
)
{
for
(
var
i
=
0
;
i
<
result
.
length
;
i
++
)
{
for
(
var
i
=
1
;
i
<
result
.
length
;
i
++
)
{
result
[
i
]
=
"
<div class=
\"
minerva-tooltip
\"
>
"
+
result
[
i
]
+
"
<span class=
\"
minerva-tooltip-text
\"
>
"
+
overlay
.
getDescription
()
+
"
</span>
"
+
...
...
@@ -579,6 +579,7 @@ OverlayPanel.prototype.init = function () {
var
table
=
$
(
this
.
getControlElement
(
PanelControlElementType
.
OVERLAY_CUSTOM_OVERLAY_TABLE
)).
DataTable
({
columns
:
[{
title
:
'
No
'
,
type
:
'
num
'
,
className
:
"
no_padding
"
},
{
title
:
'
Name
'
...
...
@@ -605,8 +606,18 @@ OverlayPanel.prototype.init = function () {
for
(
var
i
=
0
,
ien
=
diff
.
length
;
i
<
ien
;
i
++
)
{
var
rowData
=
table
.
row
(
diff
[
i
].
node
).
data
();
var
overlayId
=
$
(
rowData
[
2
]).
attr
(
"
data
"
);
promises
.
push
(
self
.
updateOverlayOrder
(
overlayId
,
diff
[
i
].
newData
));
var
checkbox
=
$
(
"
[type='checkbox']
"
,
rowData
[
2
])[
0
];
if
(
checkbox
===
undefined
)
{
checkbox
=
rowData
[
2
];
}
var
overlayId
=
parseInt
(
$
(
checkbox
).
attr
(
"
data
"
));
var
order
;
if
(
Functions
.
isInt
(
diff
[
i
].
newData
))
{
order
=
diff
[
i
].
newData
;
}
else
{
order
=
parseInt
(
$
.
parseHTML
(
diff
[
i
].
newData
)[
0
].
innerHTML
);
}
promises
.
push
(
self
.
updateOverlayOrder
(
overlayId
,
order
));
}
promises
.
push
(
self
.
getMap
().
redrawSelectedDataOverlays
());
return
Promise
.
all
(
promises
);
...
...
@@ -619,7 +630,7 @@ OverlayPanel.prototype.init = function () {
*
* @param {number} overlayId
* @param {number} order
* @returns {Promise
Like
}
* @returns {Promise}
*/
OverlayPanel
.
prototype
.
updateOverlayOrder
=
function
(
overlayId
,
order
)
{
var
self
=
this
;
...
...
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