Commit 5b1e83a
authored
provide simple support for dynamic subitems
Then dynamic subitems (children) can be provided like so:
` menuItems.push({ // added on both grids, subitems are dynamic
text: '<span class="glyphicon glyphicon-share-alt" aria-hidden="true"></span> Show in ...',
enabled: function() {
return $scope.jumpOptions.length > 0;
},
click: function ($itemScope) {
console.log ('context menu item - show details');
},
// submenus are only supported with array model, hence '1' property
children:
$q(function (resolve) {
resolve(function ($itemScope) { // HACK: bz - dynamic subitems support
return service.prepareSubItems($itemScope, jumpOptions);
});
})
});`1 parent 6f8d787 commit 5b1e83a
1 file changed
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
169 | 169 | | |
170 | 170 | | |
171 | 171 | | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
172 | 176 | | |
173 | 177 | | |
174 | 178 | | |
| |||
0 commit comments