Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
openbis
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
sispub
openbis
Commits
439980b0
Commit
439980b0
authored
9 years ago
by
parkera
Browse files
Options
Downloads
Patches
Plain Diff
SSDM-3024 : Search call for samples (ongoing work)
SVN: 35884
parent
9b787649
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
plasmid/source/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/AdvancedSearch/AdvancedSearchView.js
+12
-3
12 additions, 3 deletions
...n-lims/html/js/views/AdvancedSearch/AdvancedSearchView.js
with
12 additions
and
3 deletions
plasmid/source/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/AdvancedSearch/AdvancedSearchView.js
+
12
−
3
View file @
439980b0
...
@@ -342,8 +342,9 @@ function AdvancedSearchView(advancedSearchController, advancedSearchModel) {
...
@@ -342,8 +342,9 @@ function AdvancedSearchView(advancedSearchController, advancedSearchModel) {
}];
}];
//Add properties as columns dynamically depending on the results
//Add properties as columns dynamically depending on the results
var
foundPropertyCodes
=
{};
//1. Get properties with actual data
var
foundPropertyCodes
=
{};
for
(
var
rIdx
=
0
;
rIdx
<
results
.
objects
.
length
;
rIdx
++
)
{
for
(
var
rIdx
=
0
;
rIdx
<
results
.
objects
.
length
;
rIdx
++
)
{
var
entity
=
results
.
objects
[
rIdx
];
var
entity
=
results
.
objects
[
rIdx
];
for
(
var
propertyCode
in
entity
.
properties
)
{
for
(
var
propertyCode
in
entity
.
properties
)
{
...
@@ -353,14 +354,22 @@ function AdvancedSearchView(advancedSearchController, advancedSearchModel) {
...
@@ -353,14 +354,22 @@ function AdvancedSearchView(advancedSearchController, advancedSearchModel) {
}
}
}
}
//2. Get columns
var
propertyColumnsToSort
=
[];
for
(
var
propertyCode
in
foundPropertyCodes
)
{
for
(
var
propertyCode
in
foundPropertyCodes
)
{
columns
.
push
({
propertyColumnsToSort
.
push
({
label
:
profile
.
getPropertyType
(
propertyCode
).
label
,
label
:
profile
.
getPropertyType
(
propertyCode
).
label
,
property
:
propertyCode
,
property
:
propertyCode
,
sortable
:
true
sortable
:
true
});
});
}
}
//
//3. Sort column properties by label
propertyColumnsToSort
.
sort
(
function
(
propertyA
,
propertyB
)
{
return
propertyA
.
label
.
localeCompare
(
propertyB
.
label
);
});
columns
=
columns
.
concat
(
propertyColumnsToSort
);
var
getDataRows
=
function
(
callback
)
{
var
getDataRows
=
function
(
callback
)
{
var
rows
=
[];
var
rows
=
[];
...
...
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