PageRenderTime 51ms CodeModel.GetById 25ms RepoModel.GetById 0ms app.codeStats 0ms

/WebContent/js/collections/UserCollection.js

https://bitbucket.org/chepdev/better-portfolio-new-skills-workshop
JavaScript | 53 lines | 48 code | 4 blank | 1 comment | 0 complexity | f4605c1dcc1c50c09fa1dec5dcc4bfba MD5 | raw file
  1. define([
  2. 'underscore',
  3. 'backbone',
  4. // Pull in the Model module from above
  5. 'models/UserModel'
  6. ], function(_, Backbone, UserModel){
  7. var UserCollection = Backbone.Collection.extend({
  8. model: UserModel
  9. });
  10. var systemUserCollection = new UserCollection();
  11. var data = [{
  12. firstname:'Nicholas',
  13. lastname:'Saayman',
  14. email: 'nicholas.saayman@chep.com',
  15. location: 'Cube Farm Unit 1'
  16. },
  17. {
  18. firstname:'Tania',
  19. lastname:'Stromnes',
  20. email: 'tania.stromnes@chep.com',
  21. location: 'Cube Farm Unit 2'
  22. },
  23. {
  24. firstname:'Thuthukani',
  25. lastname:'Nzuza',
  26. email: 'thuthukani.nzuza@chep.com',
  27. location: 'Cube Farm Unit 3'
  28. },
  29. {
  30. firstname:'Craig',
  31. lastname:'Andrew',
  32. email: 'craig.andrew@chep.com',
  33. location: 'Cube Farm Unit 4'
  34. },
  35. {
  36. firstname:'Dustin',
  37. lastname:'Perry',
  38. email: 'dustin.perry@chep.com',
  39. location: 'Cube Farm Unit 5'
  40. },
  41. {
  42. firstname:'Marius',
  43. lastname:'Conradie',
  44. email: 'marius.conradie@chep.com',
  45. location: 'Cube Farm Unit 6'
  46. }];
  47. systemUserCollection.add(data);
  48. return systemUserCollection;
  49. });