5 ui.SelectMenuPanel = ui.MenuPanel.extend({
7 items: [], // (required) an array of menu items
10 _baseCls: "uiSelectMenuPanel uiMenuPanel",
12 this.value = this.config.value;
15 _getItems: function() {
16 return this.config.items.map( function( item ) {
19 selected: this.value === item.value,
20 onclick: function( jEv ) {
21 var el = $( jEv.target ).closest("LI");
22 el.parent().children().removeClass("selected");
23 el.addClass("selected");
24 this.fire( "select", this, { value: item.value } );
25 this.value = item.value;