Last change
on this file was
531,
checked in by hendrikvanantwerpen, 11 years ago
|
- Return to using truly ISO formatted dates, including milliseconds.
- Also set constraint on surveyrun dates when value is initially set.
- Separate runs & results from surveys and questions.
- Moved date & email format to schema itself.
|
File size:
1.1 KB
|
Rev | Line | |
---|
[443] | 1 | define([ |
---|
[457] | 2 | "../../widgets/_ComplexValueWidget", |
---|
| 3 | "dojo/_base/declare", |
---|
| 4 | "dojo/date", |
---|
| 5 | "dojo/text!./templates/SurveyRunWidget.html" |
---|
| 6 | ], function(_ComplexValueWidget, declare, date, template) { |
---|
| 7 | return declare([_ComplexValueWidget],{ |
---|
[443] | 8 | templateString: template, |
---|
[457] | 9 | postCreate: function() { |
---|
[512] | 10 | this.inherited(arguments); |
---|
[457] | 11 | var endDateBox = this.endDateBox; |
---|
[494] | 12 | this.own(this.startDateBox.on('change', function(value){ |
---|
[531] | 13 | endDateBox.constraints.min = value; |
---|
[494] | 14 | })); |
---|
[492] | 15 | }, |
---|
| 16 | _getValueAttr: function() { |
---|
| 17 | var value = this.inherited(arguments); |
---|
[493] | 18 | value.respondentCanDeleteOwnResponse = |
---|
| 19 | value.respondentCanDeleteOwnResponse.length > 0; |
---|
[492] | 20 | return value; |
---|
[493] | 21 | }, |
---|
| 22 | _setValueAttr: function(value) { |
---|
| 23 | value.respondentCanDeleteOwnResponse = |
---|
| 24 | value.respondentCanDeleteOwnResponse ? ["on"] : []; |
---|
| 25 | this.inherited(arguments); |
---|
[531] | 26 | this.endDateBox.constraints.min = |
---|
| 27 | this.startDateBox.get('value'); |
---|
[457] | 28 | } |
---|
[443] | 29 | }); |
---|
[457] | 30 | }); |
---|
Note: See
TracBrowser
for help on using the repository browser.