Would be nice to have an eventHandler to catch when the menu closes.
This helps with some cleanups and more global post-action procedures.
Currently the only option would be to put repetitive code under each action.
Something like so...
onClose: function($elem) {
alertify.notify("Done with : " + $elem.text());
},
By adding:
/* user-defined function to execute parting methods against opened element...*/
onClose: _.noop,
And further down
// close the context menu
BootstrapMenu.prototype.close = function() {
// hide the menu
if (this.$openTarget) { this.options.onClose(this.$openTarget) };
this.$menu.hide();
clearCloseEventListeners(this);
};
This is rough, but I've added it for my own purposes.
Would be nice to have an eventHandler to catch when the menu closes.
This helps with some cleanups and more global post-action procedures.
Currently the only option would be to put repetitive code under each action.
Something like so...
By adding:
And further down
// close the context menu
This is rough, but I've added it for my own purposes.