1. #11
    Sencha - Community Support Team jsakalos's Avatar
    Join Date
    Apr 2007
    Location
    Slovakia
    Posts
    27,561
    Vote Rating
    384
    jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future

      0  

    Default


    Quote Originally Posted by Lucian View Post
    Lucian here...this is what I want, thank you very much. I also added support for mouseover/mouseout events by modifying the main file. Anybody interested?...
    I'm not sure if it is good idea to create branches. Better would be to post your change - if it doesn't break anything I would incorporate it to the main stream maybe as a configurable option.
    Jozef Sakalos, aka Saki

    Education, extensions and services for developers at new http://extjs.eu
    News: Grid Search Plugin, ExtJS 5 Complex Data Binding using MVVM


  2. #12
    Sencha Premium Member
    Join Date
    Apr 2007
    Location
    London, UK
    Posts
    50
    Vote Rating
    0
    Lucian is on a distinguished road

      0  

    Smile


    In onRenderGrid function I add this:

    Code:
    this.view.mainBody.on({scope:this, click:this.onClick, mouseover: this.onMouseOver});
    the next thing is to add the onMouseOver function

    Code:
    ,onMouseOver: function(e, target) {
    		var t = e.getTarget('div.ux-cell-action');
    		var row = e.getTarget('.x-grid3-row');
    		var col = this.view.findCellIndex(target.parentNode.parentNode);
    		var c = this.grid.getColumnModel().config[col];
    		if(t) {
    			var record = this.grid.store.getAt(row.rowIndex);
    			var dataIndex = c.dataIndex;
    			var value = record.get(dataIndex);
    			var action = t.className.replace(/ux-cell-action /, '');
    		}
    		if(false !== row && false !== col && record && dataIndex && action) {
    			 ... action here ...
    			}
    		}
    	} // eo function onMouseOver
    Same thing for onMouseOut event.
    If this is useful somehow, you can add it in the code.

    All I need is to handle the other events that might occur, not just "onClick".

    Cheers!
    No signature.

  3. #13
    Sencha - Community Support Team jsakalos's Avatar
    Join Date
    Apr 2007
    Location
    Slovakia
    Posts
    27,561
    Vote Rating
    384
    jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future

      0  

    Default


    What would be the "... action here ..."? Because the code you posted is original onClick handler with firing events and calling callbacks stripped off. Also, is getting of all those variables necessary?

    I thought that you mean something like overClass to highlight the cell or similar.
    Jozef Sakalos, aka Saki

    Education, extensions and services for developers at new http://extjs.eu
    News: Grid Search Plugin, ExtJS 5 Complex Data Binding using MVVM


  4. #14
    Sencha Premium Member
    Join Date
    Apr 2007
    Location
    London, UK
    Posts
    50
    Vote Rating
    0
    Lucian is on a distinguished road

      0  

    Default


    Yep...the code needs to be refactored...working on this right now...
    Need to handle all the events, so probably I'll try to catch the event type.
    For each one I'll check into this.cellActions for the proper function to handle the event.

    Any better ideas?...
    No signature.

  5. #15
    Sencha - Community Support Team jsakalos's Avatar
    Join Date
    Apr 2007
    Location
    Slovakia
    Posts
    27,561
    Vote Rating
    384
    jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future

      0  

    Default


    Well, I cannot think of anything that would be useful as mouseover handler.
    Jozef Sakalos, aka Saki

    Education, extensions and services for developers at new http://extjs.eu
    News: Grid Search Plugin, ExtJS 5 Complex Data Binding using MVVM


  6. #16
    Sencha Premium Member
    Join Date
    Apr 2007
    Location
    London, UK
    Posts
    50
    Vote Rating
    0
    Lucian is on a distinguished road

      0  

    Cool


    Let me give you an example: when I have the mouse over on an icon, let's say the e-mail icon from your example, that icon will act as an select box. Maybe this thumbnail is more elocvent:



    The menu below is a custom context menu, but it appears only on mouseover that icon.
    The client is asking for this behavior, so another solution for displaying that menu is not an option, for now...
    No signature.

  7. #17
    Sencha - Community Support Team jsakalos's Avatar
    Join Date
    Apr 2007
    Location
    Slovakia
    Posts
    27,561
    Vote Rating
    384
    jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future

      0  

    Default


    I understand. Anyway, I wouldn't put it to mouseover event. I wouldn't like my grids to popup some menus just because I move mouse over them.

    If you want to fire actions on mouseover anyway, you can do it w/o changing/extending the existing code:
    PHP Code:

    var cellActions = new Ext.ux.grid.cellActions({...});
    var 
    grid = new Ext.grid.GridPanel({....});
    // ...
    grid.getView().mainBody.on('mouseover'cellActions.onClickcellActions); 
    I haven't tested it though.
    Jozef Sakalos, aka Saki

    Education, extensions and services for developers at new http://extjs.eu
    News: Grid Search Plugin, ExtJS 5 Complex Data Binding using MVVM


  8. #18
    Sencha Premium Member
    Join Date
    Apr 2007
    Location
    London, UK
    Posts
    50
    Vote Rating
    0
    Lucian is on a distinguished road

      0  

    Default


    Nice. Thank you...
    No signature.

  9. #19
    Sencha - Community Support Team jsakalos's Avatar
    Join Date
    Apr 2007
    Location
    Slovakia
    Posts
    27,561
    Vote Rating
    384
    jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future

      0  

    Default


    Lucian, grab the code from demo page now. I've introduced new config variable actionEvent that defaults to 'click' but you can change it to 'mouseover'. Very briefly tested - seems to work.
    Jozef Sakalos, aka Saki

    Education, extensions and services for developers at new http://extjs.eu
    News: Grid Search Plugin, ExtJS 5 Complex Data Binding using MVVM


  10. #20
    Sencha - Community Support Team jsakalos's Avatar
    Join Date
    Apr 2007
    Location
    Slovakia
    Posts
    27,561
    Vote Rating
    384
    jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future

      0  

    Default


    Update:

    Some bugfixes leading to better performance and code is now fully documented, well commented and jslint-ed.
    Jozef Sakalos, aka Saki

    Education, extensions and services for developers at new http://extjs.eu
    News: Grid Search Plugin, ExtJS 5 Complex Data Binding using MVVM