Skip to content

Commit

Permalink
Uses update state general update state method in workflow.js re arche…
Browse files Browse the repository at this point in the history
  • Loading branch information
chiatt committed Jun 17, 2019
1 parent 8c387c7 commit 7457005
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 40 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,17 +75,6 @@ define([

Workflow.apply(this, [params]);

this.updateState = function(activeStep) {
var previousStep = self.previousStep();
if (previousStep) {
self.state.steps[ko.unwrap(previousStep.name)] = previousStep.stateProperties();
self.state.activestep = activeStep._index;
self.state.previousstep = previousStep._index;
self.updateUrl();
}
self.previousStep(activeStep);
};

self.activeStep.subscribe(this.updateState);

self.ready(true);
Expand Down
29 changes: 0 additions & 29 deletions consultations_prj/media/js/views/components/plugins/site-visit.js
Original file line number Diff line number Diff line change
Expand Up @@ -195,37 +195,8 @@ define([

Workflow.apply(this, [params]);

this.updateState = function(val) {
var activeStep = val;
var previousStep = self.previousStep();
if (previousStep) {
self.state.steps[ko.unwrap(previousStep.name)] = previousStep.stateProperties();
self.state.activestep = val._index;
self.state.previousstep = previousStep._index;
self.updateUrl();
}
// if (ko.unwrap(activeStep.name) === 'assignaddress') {
// activeStep.requirements = self.state.steps.assignaddress;
// }
// if (ko.unwrap(activeStep.name) === 'setname') {
// if (self.state.steps['assignaddress']) {
// var tiledata = self.state.steps['assignaddress'].tile
// var tilevals = _.map(tiledata, function(v, k) {return v})
// var nodeval = tilevals[0] + "," + tilevals[1] + " " + tilevals[2];
// activeStep.requirements = self.state.steps.setname || {};
// // activeStep.requirements.applyOutputToTarget = self.state.steps['assignaddress'].applyOutputToTarget;
// // activeStep.requirements.targetnode = '1b95fb70-53ef-11e9-9001-dca90488358a';
// activeStep.requirements.targetnodegroup = ko.unwrap(activeStep.nodegroupid);
// activeStep.requirements.value = nodeval;
// }
// }
self.previousStep(val);
}

self.activeStep.subscribe(this.updateState);



self.ready(true);
},
template: { require: 'text!templates/views/components/plugins/site-visit.htm' }
Expand Down

0 comments on commit 7457005

Please sign in to comment.