From 7457005c3e9a15d003704792bb8c7bb596b52e84 Mon Sep 17 00:00:00 2001 From: Cyrus Hiatt Date: Mon, 17 Jun 2019 15:12:03 -0700 Subject: [PATCH] Uses update state general update state method in workflow.js re archesproject/arches#4821 --- .../plugins/communication-workflow.js | 11 ------- .../js/views/components/plugins/site-visit.js | 29 ------------------- 2 files changed, 40 deletions(-) diff --git a/consultations_prj/media/js/views/components/plugins/communication-workflow.js b/consultations_prj/media/js/views/components/plugins/communication-workflow.js index 26a5f005e..cfd118b0f 100644 --- a/consultations_prj/media/js/views/components/plugins/communication-workflow.js +++ b/consultations_prj/media/js/views/components/plugins/communication-workflow.js @@ -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); diff --git a/consultations_prj/media/js/views/components/plugins/site-visit.js b/consultations_prj/media/js/views/components/plugins/site-visit.js index f62058085..860a24666 100644 --- a/consultations_prj/media/js/views/components/plugins/site-visit.js +++ b/consultations_prj/media/js/views/components/plugins/site-visit.js @@ -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' }