Add getCount() and getItems9)

This commit is contained in:
Bryan Ashby 2016-01-04 23:32:43 -07:00
parent 9ce2991216
commit 36c995018d
1 changed files with 10 additions and 0 deletions

View File

@ -68,6 +68,16 @@ MenuView.prototype.setItems = function(items) {
}
};
MenuView.prototype.getCount = function() {
return this.items.length;
};
MenuView.prototype.getItems = function() {
return _.map(this.items, function itemIter(i) {
return i.text;
});
};
MenuView.prototype.getItem = function(index) {
return this.items[index].text;
};