Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
nghyd
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Admin message
A compter du 1er avril, attention à vos pipelines :
Nouvelles limitations de Docker Hub
Show more breadcrumbs
Cassiopée
nghyd
Commits
b4c1e754
Commit
b4c1e754
authored
4 years ago
by
Mathias Chouet
Browse files
Options
Downloads
Patches
Plain Diff
Verificateur: make jet type selector's disabled state persist after calculation
parent
a694a4be
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
src/app/formulaire/definition/form-verificateur.ts
+15
-3
15 additions, 3 deletions
src/app/formulaire/definition/form-verificateur.ts
with
15 additions
and
3 deletions
src/app/formulaire/definition/form-verificateur.ts
+
15
−
3
View file @
b4c1e754
...
...
@@ -30,9 +30,7 @@ export class FormulaireVerificateur extends FormulaireFixedVar {
if
(
sender
.
id
===
"
select_target_pass
"
&&
data
.
action
===
"
select
"
)
{
// update Verificateur property: Pass to check
this
.
_currentNub
.
properties
.
setPropValue
(
"
nubToVerify
"
,
data
.
value
?
data
.
value
.
value
:
undefined
);
// refresh jet type selector
const
ntv
=
(
this
.
_currentNub
as
Verificateur
).
nubToVerify
;
(
this
.
getFormulaireNodeById
(
"
select_pab_jet_type
"
)
as
SelectField
).
disabled
=
!
(
ntv
!==
undefined
&&
ntv
.
calcType
===
CalculatorType
.
Pab
);
this
.
refreshJetTypeSelector
();
}
else
if
(
sender
.
id
===
"
select_species_list
"
&&
data
.
action
===
"
select
"
)
{
// update Verificateur property: Species list (string[])
...
...
@@ -43,4 +41,18 @@ export class FormulaireVerificateur extends FormulaireFixedVar {
}
}
protected
compute
()
{
this
.
runNubCalc
(
this
.
currentNub
);
this
.
reaffectResultComponents
();
// do not refreshFieldsets() (useless here) or jet type selector's disabled state will be reset
}
/**
* Disables Jet Type selector if target pass is not a Pab
*/
protected
refreshJetTypeSelector
()
{
const
ntv
=
(
this
.
_currentNub
as
Verificateur
).
nubToVerify
;
(
this
.
getFormulaireNodeById
(
"
select_pab_jet_type
"
)
as
SelectField
).
disabled
=
!
(
ntv
!==
undefined
&&
ntv
.
calcType
===
CalculatorType
.
Pab
);
}
}
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