Topic: Mif.Menu.Item, add method and submenu
Hello,
I've tried to add an item with own submenu using add method but seems that add method doesn't handle submenu...
I need more or less the same thing as load method but with the posibility to inject data anywhere : before, after, top, bottom on an item.
var newItem = new Mif.Menu.Item({'menu':this}, {'name' : 'sort by', 'submenu':
[ {'options':
{'onAction': function(item) {
var selected = tree.selected;
if(selected){
selected.data.sort = item.property.name;
selected.refreshChildren();
}
}
}
}].concat(selected.property.sortMenu)
});
this.add(newItem, Mif.id('refresh'), 'after');Last edited by scramatte (2010-08-10 12:35:25)