Changeset 487 for Dev/trunk/src/client/qed-client/model/classes/surveys.js
- Timestamp:
- 03/05/14 22:44:48 (11 years ago)
- Location:
- Dev/trunk/src/client/qed-client/model/classes
- Files:
-
- 1 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
Dev/trunk/src/client/qed-client/model/classes
-
Property
svn:ignore
set to
### begin grunt-svn-ignore managed ignores
### edits will be overwritten when grunt svn-ignore is run
Question.js
Response.js
Survey.js
SurveyRun.js
### end grunt-svn-ignore managed ignores
-
Property
svn:ignore
set to
-
Dev/trunk/src/client/qed-client/model/classes/surveys.js
r486 r487 1 define(function(){ 2 return { 3 create: function(){ 4 return { type:'Survey' }; 1 define([ 2 "./_Class", 3 "dojo/_base/declare", 4 "dojo/date/stamp", 5 "dojo/store/JsonRest" 6 ], function(_Class, declare, stamp, JsonRest) { 7 8 var Surveys = declare([_Class],{ 9 _collection: 'surveys', 10 _type: 'Survey', 11 create: function() { 12 var obj = { 13 type: this._type, 14 questions: [], 15 title: "" 16 }; 17 return obj; 5 18 }, 6 DisplayTitle:{7 get: function(s) {8 return s.title || '';19 _deserialize: function(obj) { 20 if (obj.publicationDate) { 21 obj.publicationDate = stamp.fromISOString(obj.publicationDate); 9 22 } 10 23 }, 11 Questions: { 12 get: function(s) { 13 return s.questions || []; 14 }, 15 set: function(s,questions) { 16 s.questions = questions; 24 _serialize: function(obj) { 25 if (obj.publicationDate) { 26 obj.publicationDate = stamp.toISOString(obj.publicationDate); 17 27 } 18 28 } 19 }; 29 }); 30 31 return new Surveys(); 32 20 33 });
Note: See TracChangeset
for help on using the changeset viewer.