- 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/questions.js
r486 r487 1 define(function(){ 2 return { 3 create: function(){ 4 return { type:'Question' }; 1 define([ 2 "./_Class", 3 "dojo/_base/declare", 4 "dojo/date/stamp" 5 ], function(_Class, declare, stamp) { 6 7 var Questions = declare([_Class],{ 8 _collection: 'questions', 9 _type: 'Question', 10 create: function() { 11 var obj = { 12 type: this._type, 13 categories: [], 14 code: "", 15 content: [], 16 title: "" 17 }; 18 return obj; 5 19 }, 6 DisplayTitle:{7 get: function(q) {8 return q.title || '';20 _deserialize: function(obj) { 21 if (obj.publicationDate) { 22 obj.publicationDate = stamp.fromISOString(obj.publicationDate); 9 23 } 10 24 }, 11 Content: { 12 get: function(q) { 13 return q.content || []; 14 }, 15 set: function(q,content) { 16 q.content = content; 25 _serialize: function(obj) { 26 if (obj.publicationDate) { 27 obj.publicationDate = stamp.toISOString(obj.publicationDate); 17 28 } 18 29 } 19 }; 30 }); 31 32 return new Questions(); 33 20 34 });
Note: See TracChangeset
for help on using the changeset viewer.