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
b8c555a3
Commit
b8c555a3
authored
5 years ago
by
Aaron Ponti
Browse files
Options
Downloads
Patches
Plain Diff
Display series name instead of dataset codes in the ImageViewerWidget pull-down menu.
parent
de5dda47
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/plugins/MicroscopyTechnology.js
+44
-0
44 additions, 0 deletions
.../webapps/eln-lims/html/js/plugins/MicroscopyTechnology.js
with
44 additions
and
0 deletions
openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/plugins/MicroscopyTechnology.js
+
44
−
0
View file @
b8c555a3
...
@@ -71,6 +71,29 @@ $.extend(MicroscopyTechnology.prototype, ELNLIMSPlugin.prototype, {
...
@@ -71,6 +71,29 @@ $.extend(MicroscopyTechnology.prototype, ELNLIMSPlugin.prototype, {
// Create the image viewer component for the specific data sets
// Create the image viewer component for the specific data sets
var
widget
=
new
ImageViewerWidget
(
screningFacade
,
imageViewerDataSets
);
var
widget
=
new
ImageViewerWidget
(
screningFacade
,
imageViewerDataSets
);
// Customize the widget
widget
.
addLoadListener
(
function
()
{
widget
.
getDataSetChooserWidget
().
then
(
function
(
chooser
)
{
var
view
=
chooser
.
getView
();
// Show the series name instead of the dataset code
view
.
getDataSetText
=
function
(
dataSetCode
)
{
// Return the series name
for
(
var
i
=
0
;
i
<
model
.
datasets
.
length
;
i
++
)
{
if
(
model
.
datasets
[
i
].
code
===
dataSetCode
)
{
return
model
.
datasets
[
i
].
properties
.
MICROSCOPY_IMG_CONTAINER_NAME
;
}
}
// If not found, return the dataset code
return
dataSetCode
;
};
});
});
// Render the component and add it to the page
// Render the component and add it to the page
$container
.
append
(
$
(
'
<legend>
'
).
text
(
'
Microscopy Viewer
'
));
$container
.
append
(
$
(
'
<legend>
'
).
text
(
'
Microscopy Viewer
'
));
var
$imageWidgetContainer
=
new
$
(
'
<div>
'
);
var
$imageWidgetContainer
=
new
$
(
'
<div>
'
);
...
@@ -93,6 +116,27 @@ $.extend(MicroscopyTechnology.prototype, ELNLIMSPlugin.prototype, {
...
@@ -93,6 +116,27 @@ $.extend(MicroscopyTechnology.prototype, ELNLIMSPlugin.prototype, {
// Create the image viewer component for the specific data sets
// Create the image viewer component for the specific data sets
var
widget
=
new
ImageViewerWidget
(
screningFacade
,
[
model
.
dataSetV3
.
permId
.
permId
]);
var
widget
=
new
ImageViewerWidget
(
screningFacade
,
[
model
.
dataSetV3
.
permId
.
permId
]);
// Customize the widget
widget
.
addLoadListener
(
function
()
{
widget
.
getDataSetChooserWidget
().
then
(
function
(
chooser
)
{
var
view
=
chooser
.
getView
();
// Show the series name instead of the dataset code
view
.
getDataSetText
=
function
(
dataSetCode
)
{
// Return the series name
if
(
model
.
dataSet
.
code
===
dataSetCode
)
{
return
model
.
dataSet
.
properties
.
MICROSCOPY_IMG_CONTAINER_NAME
;
}
else
{
// Fall-back (that should not happen)
return
dataSetCode
;
}
};
});
});
// Render the component and add it to the page
// Render the component and add it to the page
$container
.
append
(
$
(
'
<legend>
'
).
text
(
'
Microscopy Viewer
'
));
$container
.
append
(
$
(
'
<legend>
'
).
text
(
'
Microscopy Viewer
'
));
var
$imageWidgetContainer
=
new
$
(
'
<div>
'
);
var
$imageWidgetContainer
=
new
$
(
'
<div>
'
);
...
...
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