Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
atlas
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
dataplatform
atlas
Commits
37e441c1
Commit
37e441c1
authored
Jun 20, 2019
by
kevalbhatt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ATLAS-3291 : UI: Don't allow user to sort on multiple value columns
parent
ea0f6d27
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
40 additions
and
5 deletions
+40
-5
table.scss
dashboardv2/public/css/scss/table.scss
+7
-1
SearchResultLayoutView.js
dashboardv2/public/js/views/search/SearchResultLayoutView.js
+32
-3
TagDetailTableLayoutView.js
dashboardv2/public/js/views/tag/TagDetailTableLayoutView.js
+1
-1
No files found.
dashboardv2/public/css/scss/table.scss
View file @
37e441c1
...
...
@@ -76,7 +76,7 @@ tr.empty {
th
.renderable.html-cell
,
td
.renderable.html-cell
{
m
ax
-width
:
250px
;
m
in
-width
:
250px
;
}
.select-all-header-cell
,
...
...
@@ -164,4 +164,9 @@ tr.empty {
background
:
$color_jungle_green_light
!
important
;
}
}
}
.toggleList.semi-collapsed
div
:nth-child
(
n
+
2
)
{
display
:
none
;
}
\ No newline at end of file
dashboardv2/public/js/views/search/SearchResultLayoutView.js
View file @
37e441c1
...
...
@@ -185,6 +185,7 @@ define(['require',
},
bindEvents
:
function
()
{
var
that
=
this
;
this
.
onClickLoadMore
();
this
.
listenTo
(
this
.
searchCollection
,
'backgrid:selected'
,
function
(
model
,
checked
)
{
this
.
arr
=
[];
if
(
checked
===
true
)
{
...
...
@@ -263,7 +264,7 @@ define(['require',
saveState
:
false
},
visibilityControlOpts
:
{
buttonTemplate
:
_
.
template
(
"<button class='btn btn-action btn-sm pull-right'>
Column
s <i class='fa fa-caret-down'></i></button>"
)
buttonTemplate
:
_
.
template
(
"<button class='btn btn-action btn-sm pull-right'>
Attribute
s <i class='fa fa-caret-down'></i></button>"
)
},
el
:
this
.
ui
.
colManager
},
...
...
@@ -761,7 +762,8 @@ define(['require',
var
attrObj
=
Utils
.
getNestedSuperTypeObj
({
data
:
def
.
toJSON
(),
collection
:
this
.
entityDefCollection
,
attrMerge
:
true
});
_
.
each
(
attrObj
,
function
(
obj
,
key
)
{
var
key
=
obj
.
name
,
isRenderable
=
_
.
contains
(
columnToShow
,
key
)
isRenderable
=
_
.
contains
(
columnToShow
,
key
),
isSortable
=
obj
.
typeName
.
search
(
/
(
array|map
)
/i
)
==
-
1
;
if
(
key
==
"name"
||
key
==
"description"
||
key
==
"owner"
)
{
if
(
columnToShow
)
{
col
[
key
].
renderable
=
isRenderable
;
...
...
@@ -774,6 +776,7 @@ define(['require',
editable
:
false
,
resizeable
:
true
,
orderable
:
true
,
sortable
:
isSortable
,
renderable
:
isRenderable
,
formatter
:
_
.
extend
({},
Backgrid
.
CellFormatter
.
prototype
,
{
fromRaw
:
function
(
rawValue
,
model
)
{
...
...
@@ -786,7 +789,15 @@ define(['require',
'isTable'
:
false
};
tempObj
.
valueObject
[
key
]
=
modelObj
.
attributes
[
key
];
return
CommonViewFunction
.
propertyTable
(
tempObj
);
var
tablecolumn
=
CommonViewFunction
.
propertyTable
(
tempObj
);
if
(
_
.
isArray
(
modelObj
.
attributes
[
key
]))
{
var
column
=
$
(
"<div>"
+
tablecolumn
+
"</div>"
)
if
(
tempObj
.
valueObject
[
key
].
length
>
2
)
{
column
.
addClass
(
"toggleList semi-collapsed"
).
append
(
"<span><a data-id='load-more-columns'>Show More</a></span>"
);
}
return
column
;
}
return
tablecolumn
;
}
}
})
...
...
@@ -797,6 +808,24 @@ define(['require',
}
return
this
.
searchCollection
.
constructor
.
getTableCols
(
col
,
this
.
searchCollection
);
},
onClickLoadMore
:
function
()
{
var
that
=
this
;
this
.
$el
.
on
(
'click'
,
"[data-id='load-more-columns']"
,
function
(
event
)
{
event
.
stopPropagation
();
event
.
stopImmediatePropagation
();
var
$this
=
$
(
this
),
$toggleList
=
$
(
this
).
parents
(
'.toggleList'
);
if
(
$toggleList
.
length
)
{
if
(
$toggleList
.
hasClass
(
'semi-collapsed'
))
{
$toggleList
.
removeClass
(
'semi-collapsed'
);
$this
.
text
(
"Show Less"
);
}
else
{
$toggleList
.
addClass
(
'semi-collapsed'
);
$this
.
text
(
"Show More"
);
}
}
});
},
hideIrreleventElements
:
function
()
{
this
.
ui
.
rowData
.
siblings
(
'.well'
).
hide
();
this
.
ui
.
rowData
.
siblings
(
'.no-data'
).
show
();
...
...
dashboardv2/public/js/views/tag/TagDetailTableLayoutView.js
View file @
37e441c1
...
...
@@ -87,6 +87,7 @@ define(['require',
includeFooterRecords
:
true
,
includePageSize
:
true
,
includeGotoPage
:
true
,
includeAtlasTableSorting
:
true
,
gridOpts
:
{
className
:
"table table-hover backgrid table-quickMenu"
,
emptyText
:
'No records found!'
...
...
@@ -119,7 +120,6 @@ define(['require',
label
:
"Classification"
,
cell
:
"html"
,
editable
:
false
,
sortable
:
false
,
formatter
:
_
.
extend
({},
Backgrid
.
CellFormatter
.
prototype
,
{
fromRaw
:
function
(
rawValue
,
model
)
{
if
(
that
.
guid
!==
model
.
get
(
'entityGuid'
))
{
...
...
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