Last change
on this file since 492 was
492,
checked in by hendrikvanantwerpen, 11 years ago
|
- Enable/disable buttons on content change.
- One place to do date formatting, because it was going wrong again.
- Serialize questions in survey properly.
- _ComplexValueMixin consumes submit events, but does trigger outer
forms if present.
- Trigger dialog show/hide for login only after previous effect is
finished.
- Check that documents are actually valid, not just that validator
returned a result.
- Validate email and timestamp formats.
- Prepared for live runs.
|
File size:
858 bytes
|
Line | |
---|
1 | define([ |
---|
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],{ |
---|
8 | templateString: template, |
---|
9 | postCreate: function() { |
---|
10 | var endDateBox = this.endDateBox; |
---|
11 | this.startDateBox.on('change', function(value){ |
---|
12 | endDateBox.constraints.min = value; |
---|
13 | }); |
---|
14 | }, |
---|
15 | _getValueAttr: function() { |
---|
16 | var value = this.inherited(arguments); |
---|
17 | if ( !value.startDate ) { delete value.startDate; } |
---|
18 | if ( !value.endDate ) { delete value.endDate; } |
---|
19 | value.respondentCanDeleteOwnResponse = value.respondentCanDeleteOwnResponse[0] === true; |
---|
20 | return value; |
---|
21 | } |
---|
22 | }); |
---|
23 | }); |
---|
Note: See
TracBrowser
for help on using the repository browser.