Changeset 415 for Dev/branches/rest-dojo-ui/client/rft/store.js
- Timestamp:
- 12/04/12 16:29:49 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Dev/branches/rest-dojo-ui/client/rft/store.js
r410 r415 1 1 define([ 2 2 'dojo/date/stamp', 3 'dojox/json/schema', 4 './schema', 3 5 './store/CouchStore' 4 ],function(stamp, CouchStore){6 ],function(stamp,jsonSchema,schema,CouchStore){ 5 7 6 var store = new CouchStore({target: 'data/couch/'}); 8 var store = new CouchStore({ 9 target: 'data/couch/', 10 validate: function(object) { 11 var result = jsonSchema.validate(object,schema); 12 if ( result.valid ) { 13 return true; 14 } else { 15 console.log("Found error ",result," for invalid object ",object); 16 return false; 17 } 18 } 19 }); 7 20 store.formatDate = function(date){ 8 21 return stamp.toISOString(date,{zulu:true});
Note: See TracChangeset
for help on using the changeset viewer.