Hello All,
I am experiencing an issue with branch-list.js that is a bit difficult to
pin down. On my measurement form (see attached measurement.js), and only on
that one as far as I can see, it would appear that, after creating 4
branches of THREAT_STATE.E3, branch-list.js begins to duplicate some of
them. If I attempt to delete one of the duplicated branches, another one
gets duplicated. I should add that this problem does not affect the other
main mergenode, DISTURBANCE_STATE.E3, which contains many more child nodes
than THREAT_STATE.E3.
I am not too familiar with Knockout JS and find it a bit hard to debug
those classes. Can you help?
Thanks,
Andrea
define(['jquery', 'underscore', 'knockout-mapping', 'views/forms/base',
'views/forms/sections/branch-list'], function ($, _, koMapping, BaseForm,
BranchList) {
return BaseForm.extend({
initialize: function() {
BaseForm.prototype.initialize.apply(this);
var date_picker =
$('.datetimepicker').datetimepicker({pickTime: false});
date_picker.on('dp.change', function(evt){
$(this).find('input').trigger('change');
});
this.addBranchList(new BranchList({
el: this.$el.find('#threat-state-section')[0],
data: this.data,
dataKey: 'THREAT_STATE.E3',
validateBranch: function (nodes) {
return true;
return this.validateHasValues(nodes);
}
}));
this.addBranchList(new BranchList({
el: this.$el.find('#disturbance-state-section')[0],
data: this.data,
dataKey: 'DISTURBANCE_STATE.E3',
validateBranch: function (nodes) {
return true;
return this.validateHasValues(nodes);
}
}));
this.addBranchList(new BranchList({
el: this.$el.find('#condition-type-section')[0],
data: this.data,
dataKey: 'CONDITION_TYPE.E55',
validateBranch: function (nodes) {
return true;
return this.validateHasValues(nodes);
}
}));
this.addBranchList(new BranchList({
el: this.$el.find('#disturbance-extent-section')[0],
data: this.data,
dataKey: 'DISTURBANCE_EXTENT_TYPE.E55',
validateBranch: function (nodes) {
return true;
return this.validateHasValues(nodes);
}
}));
}
});
});
--
-- To post, send email to [email protected]. To unsubscribe, send
email to [email protected]. For more information,
visit https://groups.google.com/d/forum/archesproject?hl=en
---
You received this message because you are subscribed to the Google Groups
"Arches Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.