/WebContent/js/collections/EquipmentCollection.js
JavaScript | 79 lines | 71 code | 6 blank | 2 comment | 0 complexity | 898d766eefce468b02e0af6aac33007d MD5 | raw file
- //console.log('UserCollection.js: loaded');
- define([
- 'underscore',
- 'backbone',
- // Pull in the Model module from above
- 'models/EquipmentModel'
- ], function(_, Backbone, EquipmentModel){
- var EquipmentCollection = Backbone.Collection.extend({
- model: EquipmentModel
- });
-
- var systemEquipmentCollection = new EquipmentCollection();
-
- var data = [{
- name:'Pallet',
- material:'Timber',
- dimensions: {
- width: '1200',
- length: '1200',
- height: '150',
- units: 'mm'
- },
- mass: {
- weight: '45',
- units: 'kg'
- },
- colour:'Blue'
- },
- {
- name:'<i><strong>Autobox</strong></i>',
- material:'Steel/Plastic',
- dimensions: {
- width: '1200',
- length: '1200',
- height: '150',
- units: 'mm'
- },
- mass: {
- weight: '75',
- units: 'kg'
- },
- colour:'Steel/Blue'
- },
- {
- name:'RPC',
- material:'Plastic',
- dimensions: {
- width: '1200',
- length: '1200',
- height: '150',
- units: 'mm'
- },
- mass: {
- weight: '3',
- units: 'kg'
- },
- colour:'Green'
- },
- {
- name:'Bulk Bin',
- material:'Steel/Timber',
- dimensions: {
- width: '1200',
- length: '1200',
- height: '150',
- units: 'mm'
- },
- mass: {
- weight: '100',
- units: 'kg'
- }
- }];
-
- systemEquipmentCollection.add(data);
- return systemEquipmentCollection;
-
- });