[SSE] Refactoring formula buttons

This commit is contained in:
Julia Radzhabova 2019-06-21 11:43:17 +03:00
parent c71c83b4a6
commit d432f2781c

View file

@ -218,19 +218,8 @@ define([
}); });
} else { } else {
btn.setMenu(new Common.UI.Menu({ btn.setMenu(new Common.UI.Menu({
maxHeight: 400, restoreHeight: 415,
items: arr items: arr
}).on('show:before', function (mnu) {
if (!this.scroller) {
this.scroller = new Common.UI.Scroller({
el: $(this.el).find('.dropdown-menu '),
useKeyboard: this.enableKeyEvents && !this.handleSelect,
minScrollbarLength: 30,
alwaysVisibleY: true
});
}
}).on('show:after', function (mnu) {
this.scroller && this.scroller.update({alwaysVisibleY: true});
})); }));
btn.menu.on('item:click', function (menu, item, e) { btn.menu.on('item:click', function (menu, item, e) {
me.fireEvent('function:apply', [{name: item.caption, origin: item.value}]); me.fireEvent('function:apply', [{name: item.caption, origin: item.value}]);