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
55ad2ebd
Commit
55ad2ebd
authored
8 years ago
by
juanf
Browse files
Options
Downloads
Patches
Plain Diff
SSDM-3888: Advance search supporting selecting sample types
SVN: 36893
parent
1615d54c
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
openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/AdvancedSearch/AdvancedSearchView.js
+26
-28
26 additions, 28 deletions
...n-lims/html/js/views/AdvancedSearch/AdvancedSearchView.js
with
26 additions
and
28 deletions
openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/AdvancedSearch/AdvancedSearchView.js
+
26
−
28
View file @
55ad2ebd
...
@@ -340,7 +340,7 @@ function AdvancedSearchView(advancedSearchController, advancedSearchModel) {
...
@@ -340,7 +340,7 @@ function AdvancedSearchView(advancedSearchController, advancedSearchModel) {
model
.
push
({
value
:
'
EXPERIMENT
'
,
label
:
ELNDictionary
.
ExperimentELN
+
"
/
"
+
ELNDictionary
.
ExperimentInventory
});
model
.
push
({
value
:
'
EXPERIMENT
'
,
label
:
ELNDictionary
.
ExperimentELN
+
"
/
"
+
ELNDictionary
.
ExperimentInventory
});
model
.
push
({
value
:
'
SAMPLE
'
,
label
:
""
+
ELNDictionary
.
Sample
+
""
});
model
.
push
({
value
:
'
SAMPLE
'
,
label
:
""
+
ELNDictionary
.
Sample
+
""
});
model
.
push
({
value
:
'
DATASET
'
,
label
:
"
Dataset
"
});
model
.
push
({
value
:
'
DATASET
'
,
label
:
"
Dataset
"
});
model
.
push
({
value
:
''
,
label
:
"
-----------
"
});
model
.
push
({
value
:
''
,
label
:
"
-----------
---
"
,
disabled
:
true
});
var
sampleTypes
=
profile
.
getAllSampleTypes
();
var
sampleTypes
=
profile
.
getAllSampleTypes
();
for
(
var
tIdx
=
0
;
tIdx
<
sampleTypes
.
length
;
tIdx
++
)
{
for
(
var
tIdx
=
0
;
tIdx
<
sampleTypes
.
length
;
tIdx
++
)
{
var
sampleType
=
sampleTypes
[
tIdx
];
var
sampleType
=
sampleTypes
[
tIdx
];
...
@@ -351,33 +351,31 @@ function AdvancedSearchView(advancedSearchController, advancedSearchModel) {
...
@@ -351,33 +351,31 @@ function AdvancedSearchView(advancedSearchController, advancedSearchModel) {
var
$dropdown
=
FormUtil
.
getDropdown
(
model
,
'
Select Entity Type to search for
'
);
var
$dropdown
=
FormUtil
.
getDropdown
(
model
,
'
Select Entity Type to search for
'
);
$dropdown
.
change
(
function
()
{
$dropdown
.
change
(
function
()
{
if
(
$
(
this
).
val
()
!==
''
)
{
var
kindAndType
=
$
(
this
).
val
().
split
(
"
$
"
);
var
kindAndType
=
$
(
this
).
val
().
split
(
"
$
"
);
if
(
_this
.
_advancedSearchModel
.
isAllRules
())
{
if
(
_this
.
_advancedSearchModel
.
isAllRules
())
{
//1. update the entity type only in the model
//1. update the entity type only in the model
_this
.
_advancedSearchModel
.
setEntityKind
(
kindAndType
[
0
]);
_this
.
_advancedSearchModel
.
setEntityKind
(
kindAndType
[
0
]);
//2. change the field type dropdowns in the view
//2. change the field type dropdowns in the view
var
rows
=
_this
.
_$tbody
.
children
();
var
rows
=
_this
.
_$tbody
.
children
();
for
(
var
rIdx
=
0
;
rIdx
<
rows
.
length
;
rIdx
++
)
{
for
(
var
rIdx
=
0
;
rIdx
<
rows
.
length
;
rIdx
++
)
{
var
$row
=
$
(
rows
[
rIdx
]);
var
$row
=
$
(
rows
[
rIdx
]);
var
tds
=
$row
.
children
();
var
tds
=
$row
.
children
();
var
$newFieldTypeComponent
=
_this
.
_getNewFieldTypeDropdownComponent
(
$
(
tds
[
1
]),
_this
.
_advancedSearchModel
.
criteria
.
entityKind
,
$row
.
attr
(
"
id
"
));
var
$newFieldTypeComponent
=
_this
.
_getNewFieldTypeDropdownComponent
(
$
(
tds
[
1
]),
_this
.
_advancedSearchModel
.
criteria
.
entityKind
,
$row
.
attr
(
"
id
"
));
$
(
tds
[
0
]).
empty
();
$
(
tds
[
0
]).
empty
();
$
(
tds
[
0
]).
append
(
$newFieldTypeComponent
);
$
(
tds
[
0
]).
append
(
$newFieldTypeComponent
);
}
}
}
else
{
}
else
{
_this
.
_advancedSearchModel
.
resetModel
(
kindAndType
[
0
]);
//Restart model
_this
.
_advancedSearchModel
.
resetModel
(
kindAndType
[
0
]);
//Restart model
_this
.
_paintCriteriaPanel
(
_this
.
_$searchCriteriaPanelContainer
);
//Restart view
_this
.
_paintCriteriaPanel
(
_this
.
_$searchCriteriaPanelContainer
);
//Restart view
}
}
if
(
kindAndType
.
length
===
2
)
{
if
(
kindAndType
.
length
===
2
)
{
var
uuidValue
=
Util
.
guid
();
var
uuidValue
=
Util
.
guid
();
_this
.
_advancedSearchModel
.
criteria
.
rules
[
uuidValue
]
=
{
};
_this
.
_advancedSearchModel
.
criteria
.
rules
[
uuidValue
]
=
{
};
_this
.
_advancedSearchModel
.
criteria
.
rules
[
uuidValue
].
type
=
'
Attribute
'
;
_this
.
_advancedSearchModel
.
criteria
.
rules
[
uuidValue
].
type
=
'
Attribute
'
;
_this
.
_advancedSearchModel
.
criteria
.
rules
[
uuidValue
].
name
=
'
ATTR.SAMPLE_TYPE
'
;
_this
.
_advancedSearchModel
.
criteria
.
rules
[
uuidValue
].
name
=
'
ATTR.SAMPLE_TYPE
'
;
_this
.
_advancedSearchModel
.
criteria
.
rules
[
uuidValue
].
value
=
kindAndType
[
1
];
_this
.
_advancedSearchModel
.
criteria
.
rules
[
uuidValue
].
value
=
kindAndType
[
1
];
}
}
}
});
});
...
...
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