Add getCount() and getItems9)
This commit is contained in:
parent
9ce2991216
commit
36c995018d
|
@ -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;
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue