Click event on boostrap select actionsbox buttons(select and deseect all) - coffeescript

I am having a multi select with boostrap select, In which I have enabled actionsbox (select and deselect all buttons), I need to listen the click event on that buttons,
I have tried,
$(document).on 'click', '.deselect-all', ->
console.og('deslect clicked')
but I can't listen the button click event, Is there any other way to get the event

Related

WicketTester: How to click secondary mouse button?

I want to test a wicket component which shows a context menu on click with the secondary mouse button.
With WicketTester.click(Component) I can click obviously simulate a click on a component. But how do I simulate a click with the secondary mouse button?
WicketTester does not provide means to test JavaScript!
If the context menu is being shown with Wicket Ajax call to the server to make it visible then you can do tester.executeAjaxBehavior(...).
If the menu is shown via JavaScript in the browser then WicketTester cannot check whether it is visible or not. But in that case you should be able to test selecting a menu item, i.e. sending an Ajax call with the appropriate value for the item.

Bind event listener for mouse and keyboard events in ag-grid cells

We use ag-grid and I need to control the way context menu items are being generated based on mouse and keyboard events. In this case I need to add an optional context menu item if alt+right click are pressed (rather than just right click). Simply binding event listeners on our end does not help because the context menu items are being bound before the event listener is being fired so I can't check if the user pressed them.
Any advise will be appreciated.
As per documentation Configuring the Context Menu, you can provide context menu items using gridOptions.getContextMenuItems function. Here you can find if Shift or Ctrl is pressed or not.
if(this.event.altKey === true) {
result.push({name: 'Alt key is pressed', disabled: true});
}
if(this.event.shiftKey === true) {
result.push({name: 'Shift key is pressed', disabled: true});
}
Have a look at this plunk I've created: Context Menu Example
Based on the key you press while doing mouse right click, one item is getting added to the context menu.

Mapbox Right Mouse Click

I'm using the L.map contextmenu to listen for right clicks on the map. However, when I right click the map, in addition to the contextmenu event being fired, it also fires the mousedown event and the MouseEvent data does not indicate which mouse button was pressed, so the "left press" code is executed in addition to the "right press" code. Is there a way to get around this?
Thanks in advance.
Tony
If you want to listen to left click you must use the click event, if you want to listen for rightclick you must use the contextmenu event. The mousedown event fires on left and right click. It does exactly what it's supposed to do.

Contextmenu and DragnDrop on right click using jquery easyUI

I have integrated jQuery easyUI plugin for Treegrid (editable and drag n drop feature). All the features has been successfully implemented. There's one feature of behaving as "When a user right click it should the "Custom Context menu" that is done, but at the same time if user right click and drag the row then it should allow user to drop the same row within treegrid.
In my case it allows when I use left click, but when trying the same with right click and drag - nothing happens, it will just show me the "ContextMenu" of the row which drop into.
If anybody knows the solution then please let me know at the earliest.
jQuery EasyUI 1.4.2
treegrid.js
treegrid-dnd.js
These are the jquery which have been integrated.

Liferay Autofield with DatePicker

I have a aui form with Liferay.Autofields enabled.
The fields that I am duplicating with Autofield has a button and a textfield. The button click will trigger the datepicker and the selected value should be stored in the textfield.
And, when I click the "PLUS" button provided by Autofield, the fields are duplicated.
First, I need to know how I can bind the trigger event of all buttons to the datepicker. I know to do this for a single button. But since we are using autofield, I need to give the ID of the button with the index. Can anyone suggest how to bind the trigger event in my scenario
Second, once I click the date picker button, I should be able to get index of the Autofield row in which I have clicked, so that I can update my textfield