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
e1e3945f
Commit
e1e3945f
authored
11 years ago
by
juanf
Browse files
Options
Downloads
Patches
Plain Diff
SP-909 / BIS-524 : ELN UI - Bug Fixes.
SVN: 29862
parent
51eaea66
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
plasmid/source/core-plugins/newbrowser/1/as/webapps/newbrowser/html/js/UI/Freezer.js
+13
-9
13 additions, 9 deletions
.../newbrowser/1/as/webapps/newbrowser/html/js/UI/Freezer.js
with
13 additions
and
9 deletions
plasmid/source/core-plugins/newbrowser/1/as/webapps/newbrowser/html/js/UI/Freezer.js
+
13
−
9
View file @
e1e3945f
...
...
@@ -73,7 +73,7 @@ function Freezer(mainController, containerId, profile, sampleTypeCode, sample, i
return
$component
;
}
this
.
_getInputField
=
function
(
type
,
step
,
id
,
alt
,
isRequired
,
isHidden
)
{
this
.
_getInputField
=
function
(
type
,
step
,
id
,
alt
,
isRequired
,
isHidden
,
pattern
)
{
var
$component
=
$
(
"
<input>
"
);
$component
.
attr
(
'
type
'
,
type
);
$component
.
attr
(
'
id
'
,
id
);
...
...
@@ -87,6 +87,10 @@ function Freezer(mainController, containerId, profile, sampleTypeCode, sample, i
$component
.
attr
(
'
required
'
,
''
);
}
if
(
pattern
)
{
$component
.
attr
(
'
pattern
'
,
pattern
);
}
if
(
isHidden
)
{
$component
.
attr
(
'
class
'
,
'
hiddenInput
'
);
}
...
...
@@ -94,13 +98,13 @@ function Freezer(mainController, containerId, profile, sampleTypeCode, sample, i
return
$component
;
}
this
.
_getComponent
=
function
(
propertyType
,
isHidden
)
{
this
.
_getComponent
=
function
(
propertyType
,
isHidden
,
pattern
)
{
var
$propertyTypeComponent
=
null
;
if
(
propertyType
.
dataType
===
"
INTEGER
"
)
{
$propertyTypeComponent
=
this
.
_getInputField
(
"
number
"
,
"
1
"
,
propertyType
.
code
,
propertyType
.
description
,
propertyType
.
mandatory
,
isHidden
);
$propertyTypeComponent
=
this
.
_getInputField
(
"
number
"
,
"
1
"
,
propertyType
.
code
,
propertyType
.
description
,
propertyType
.
mandatory
,
isHidden
,
pattern
);
}
else
if
(
propertyType
.
dataType
===
"
VARCHAR
"
)
{
$propertyTypeComponent
=
this
.
_getInputField
(
"
text
"
,
null
,
propertyType
.
code
,
propertyType
.
description
,
propertyType
.
mandatory
,
isHidden
);
$propertyTypeComponent
=
this
.
_getInputField
(
"
text
"
,
null
,
propertyType
.
code
,
propertyType
.
description
,
propertyType
.
mandatory
,
isHidden
,
pattern
);
}
else
if
(
propertyType
.
dataType
===
"
CONTROLLEDVOCABULARY
"
)
{
var
vocabulary
=
null
;
if
(
isNaN
(
propertyType
.
vocabulary
))
{
...
...
@@ -289,7 +293,7 @@ function Freezer(mainController, containerId, profile, sampleTypeCode, sample, i
//Drop Down
//Create and set the field
var
$freezerNameDropDown
=
this
.
_getComponent
(
this
.
_getPropertyFromType
(
freezerNamePropertyCode
),
false
);
var
$freezerNameDropDown
=
this
.
_getComponent
(
this
.
_getPropertyFromType
(
freezerNamePropertyCode
),
false
,
null
);
$freezerNameDropDown
.
val
(
selectedFreezer
);
$freezerNameDropDown
.
change
(
...
...
@@ -314,8 +318,8 @@ function Freezer(mainController, containerId, profile, sampleTypeCode, sample, i
//
//Attach row and column hidden fields
var
$propertyTypeRowComponent
=
this
.
_getComponent
(
this
.
_getPropertyFromType
(
freezerRowPropertyCode
),
true
);
var
$propertyTypeColComponent
=
this
.
_getComponent
(
this
.
_getPropertyFromType
(
freezerColPropertyCode
),
true
);
var
$propertyTypeRowComponent
=
this
.
_getComponent
(
this
.
_getPropertyFromType
(
freezerRowPropertyCode
),
true
,
null
);
var
$propertyTypeColComponent
=
this
.
_getComponent
(
this
.
_getPropertyFromType
(
freezerColPropertyCode
),
true
,
null
);
$container
.
append
(
$propertyTypeRowComponent
)
.
append
(
$propertyTypeColComponent
);
...
...
@@ -461,7 +465,7 @@ function Freezer(mainController, containerId, profile, sampleTypeCode, sample, i
//
if
(
$virtualFreezer
&&
selectedRow
&&
selectedCol
)
{
//Create and set the field
var
$propertyTypeBoxComponent
=
this
.
_getComponent
(
this
.
_getPropertyFromType
(
freezerBoxPropertyCode
),
false
);
var
$propertyTypeBoxComponent
=
this
.
_getComponent
(
this
.
_getPropertyFromType
(
freezerBoxPropertyCode
),
false
,
'
[A-Z0-9_]+
'
);
$propertyTypeBoxComponent
.
change
(
function
()
{
$
(
this
).
val
(
$
(
this
).
val
().
toUpperCase
());
//Box Names can only be upper case
...
...
@@ -478,7 +482,7 @@ function Freezer(mainController, containerId, profile, sampleTypeCode, sample, i
.
append
(
$propertyTypeBoxComponent
)
);
}
else
{
var
$propertyTypeBoxComponent
=
this
.
_getComponent
(
this
.
_getPropertyFromType
(
freezerBoxPropertyCode
),
true
);
var
$propertyTypeBoxComponent
=
this
.
_getComponent
(
this
.
_getPropertyFromType
(
freezerBoxPropertyCode
),
true
,
null
);
$container
.
append
(
$propertyTypeBoxComponent
);
}
...
...
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