Last change
on this file 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:
828 bytes
|
Rev | Line | |
---|
[487] | 1 | define([ |
---|
| 2 | "./_Class", |
---|
[492] | 3 | "dojo/_base/declare" |
---|
| 4 | ], function(_Class, declare) { |
---|
[487] | 5 | |
---|
| 6 | var Questions = declare([_Class],{ |
---|
| 7 | _collection: 'questions', |
---|
| 8 | _type: 'Question', |
---|
| 9 | create: function() { |
---|
| 10 | var obj = { |
---|
| 11 | type: this._type, |
---|
| 12 | categories: [], |
---|
| 13 | code: "", |
---|
| 14 | content: [], |
---|
| 15 | title: "" |
---|
| 16 | }; |
---|
| 17 | return obj; |
---|
[443] | 18 | }, |
---|
[487] | 19 | _deserialize: function(obj) { |
---|
| 20 | if (obj.publicationDate) { |
---|
[492] | 21 | obj.publicationDate = this._parseDate(obj.publicationDate); |
---|
[443] | 22 | } |
---|
| 23 | }, |
---|
[487] | 24 | _serialize: function(obj) { |
---|
| 25 | if (obj.publicationDate) { |
---|
[492] | 26 | obj.publicationDate = this._formatDate(obj.publicationDate); |
---|
[443] | 27 | } |
---|
| 28 | } |
---|
[487] | 29 | }); |
---|
| 30 | |
---|
| 31 | return new Questions(); |
---|
| 32 | |
---|
| 33 | }); |
---|
Note: See
TracBrowser
for help on using the repository browser.