27 lines
360 B
JavaScript
Executable File
27 lines
360 B
JavaScript
Executable File
var Backbone = require('backbone');
|
|
|
|
/*
|
|
* List item model
|
|
*
|
|
*/
|
|
|
|
module.exports = Backbone.Model.extend({
|
|
|
|
defaults: {
|
|
selected: false,
|
|
label: '',
|
|
template: function () {
|
|
return '';
|
|
}
|
|
},
|
|
|
|
getName: function () {
|
|
return this.get('label') || this.getValue();
|
|
},
|
|
|
|
getValue: function () {
|
|
return this.get('val');
|
|
}
|
|
|
|
});
|