/WebContent/js/collections/UserCollection.js
JavaScript | 53 lines | 48 code | 4 blank | 1 comment | 0 complexity | f4605c1dcc1c50c09fa1dec5dcc4bfba MD5 | raw file
- define([
- 'underscore',
- 'backbone',
- // Pull in the Model module from above
- 'models/UserModel'
- ], function(_, Backbone, UserModel){
- var UserCollection = Backbone.Collection.extend({
- model: UserModel
- });
-
- var systemUserCollection = new UserCollection();
-
- var data = [{
- firstname:'Nicholas',
- lastname:'Saayman',
- email: 'nicholas.saayman@chep.com',
- location: 'Cube Farm Unit 1'
- },
- {
- firstname:'Tania',
- lastname:'Stromnes',
- email: 'tania.stromnes@chep.com',
- location: 'Cube Farm Unit 2'
- },
- {
- firstname:'Thuthukani',
- lastname:'Nzuza',
- email: 'thuthukani.nzuza@chep.com',
- location: 'Cube Farm Unit 3'
- },
- {
- firstname:'Craig',
- lastname:'Andrew',
- email: 'craig.andrew@chep.com',
- location: 'Cube Farm Unit 4'
- },
- {
- firstname:'Dustin',
- lastname:'Perry',
- email: 'dustin.perry@chep.com',
- location: 'Cube Farm Unit 5'
- },
- {
- firstname:'Marius',
- lastname:'Conradie',
- email: 'marius.conradie@chep.com',
- location: 'Cube Farm Unit 6'
- }];
-
- systemUserCollection.add(data);
- return systemUserCollection;
- });