-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
re consultations-prj #27, fixes typos, adds new wkflow step specifica…
…lly for ref numbers
- Loading branch information
1 parent
4f9b748
commit f494176
Showing
3 changed files
with
49 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
consultations_prj/media/js/views/components/workflows/set-reference-numbers.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
define([ | ||
'underscore', | ||
'jquery', | ||
'arches', | ||
'knockout', | ||
'views/components/workflows/add-ref-number-step' | ||
], function(_, $, arches, ko, AddRefStep) { | ||
|
||
function viewModel(params) { | ||
AddRefStep.apply(this, [params]); | ||
var self = this; | ||
var urlparams = params.parseUrlParams(); | ||
self.tile.subscribe(function(val) { | ||
if(val) { | ||
if(urlparams) { | ||
if (urlparams.applyOutputToTarget) { | ||
val.data[urlparams.targetnode](urlparams.value); | ||
} | ||
} | ||
} | ||
}); | ||
}; | ||
|
||
return ko.components.register('set-reference-numbers', { | ||
viewModel: viewModel, | ||
template: { | ||
require: 'text!templates/views/components/workflows/add-ref-number-step.htm' | ||
} | ||
}); | ||
return viewModel; | ||
}); |