mercredi 9 mai 2018

customize menu on right click for entire row

presently I'm working to make the right click as my customize menu to display using the mouse. Here are my code

click: function (event) {
                var eventResult = this.get('tableView').clickRow(event, this.get('object'));
                if (eventResult !== false) {
                    this.get('element').focus();
                    $('.content-row').bind('contextmenu', function(e) {
                        e.preventDefault();
                        var parentId = $(this).closest('tr').prop('id');
                        alert(parentId);
                        $('.managed-object-action-menu').click();
                    });
                }
                return eventResult;
            },

If I'm using the .managed-object-action-menu, it will affect for entire rows in the table. But I need only to display customize menu for the active row.

I'm new to the ember and jquery. Please provide me suggestion on this. Your help will be appreciate. Thanks in advance.




Aucun commentaire:

Enregistrer un commentaire