Add double tap support to dgrid

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Add double tap support to dgrid

Harry Devine
I have a site that is still using 0.3.17 of dGrid.  I am using the
editor plug in to allow editing of a cell by double-clicking on a cell.  
What I need to do is allow the grid to respond to a double tap from a
mobile device and allow the same edit.  Also, when I make the change and
hit Enter, the dgrid-datachange event is triggered.  I need to handle
that as well.

Here's what my editor column in my dgrid looks like for reference:

             oppscore: editor({label: "Opponent Score", field:
"opponent_score"},"text","dblclick"),

Any help would be appreciated.  I need to have this working in the next
few days.

Thanks,

Harry

--
Dojo Toolkit: http://dojotoolkit.org/
Tutorials: http://dojotoolkit.org/documentation/

[hidden email]
To unsubscribe, visit: http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
Reply | Threaded
Open this post in threaded view
|

Re: Add double tap support to dgrid

Harry Devine

I was able to implement the dbltap handler, but I don't know how to tie it to the dGrid dblclick handler when I double click on a column, and seen below.  Here's what I'm doing now for the dbltap as a test (which works but its only a place holder):


/* Handler for double-taps on a mobile device */
mod.gamesGrid.on(touchUtil.selector('.dgrid-content .dgrid-row', touchUtil.dbltap), function(event) {
  alert("Row clicked: " + mod.gamesGrid.row(event));
});


Any ideas?  I'd really like to have this working before tomorrow night.


Thanks,

Harry

On June 4, 2017 at 10:14 PM Harry Devine <[hidden email]> wrote:

I have a site that is still using 0.3.17 of dGrid. I am using the
editor plug in to allow editing of a cell by double-clicking on a cell.
What I need to do is allow the grid to respond to a double tap from a
mobile device and allow the same edit. Also, when I make the change and
hit Enter, the dgrid-datachange event is triggered. I need to handle
that as well.

Here's what my editor column in my dgrid looks like for reference:

oppscore: editor({label: "Opponent Score", field:
"opponent_score"},"text","dblclick"),

Any help would be appreciated. I need to have this working in the next
few days.

Thanks,

Harry

--
Dojo Toolkit: http://dojotoolkit.org/
Tutorials: http://dojotoolkit.org/documentation/

[hidden email]
To unsubscribe, visit: http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest


--
Dojo Toolkit: http://dojotoolkit.org/
Tutorials: http://dojotoolkit.org/documentation/

[hidden email]
To unsubscribe, visit: http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
Reply | Threaded
Open this post in threaded view
|

Re: Add double tap support to dgrid

Harry Devine

In case anyone come across this post, I was able to get it working with the help from the following documentation:  https://github.com/SitePen/dgrid/blob/master/doc/components/mixins/Editor.md.


I ended up putting the following into my dgrid editor handler and it works on both my desktop and mobile:


oppscore: editor({label: "Opponent Score", field: "opponent_score"},"text", has('touch') ? "click" : "dblclick"),


Thanks,
Harry

On June 5, 2017 at 3:15 PM Harry Devine <[hidden email]> wrote:

I was able to implement the dbltap handler, but I don't know how to tie it to the dGrid dblclick handler when I double click on a column, and seen below.  Here's what I'm doing now for the dbltap as a test (which works but its only a place holder):


/* Handler for double-taps on a mobile device */
mod.gamesGrid.on(touchUtil.selector('.dgrid-content .dgrid-row', touchUtil.dbltap), function(event) {
  alert("Row clicked: " + mod.gamesGrid.row(event));
});


Any ideas?  I'd really like to have this working before tomorrow night.


Thanks,

Harry

On June 4, 2017 at 10:14 PM Harry Devine <[hidden email]> wrote:

I have a site that is still using 0.3.17 of dGrid. I am using the
editor plug in to allow editing of a cell by double-clicking on a cell.
What I need to do is allow the grid to respond to a double tap from a
mobile device and allow the same edit. Also, when I make the change and
hit Enter, the dgrid-datachange event is triggered. I need to handle
that as well.

Here's what my editor column in my dgrid looks like for reference:

oppscore: editor({label: "Opponent Score", field:
"opponent_score"},"text","dblclick"),

Any help would be appreciated. I need to have this working in the next
few days.

Thanks,

Harry

--
Dojo Toolkit: http://dojotoolkit.org/
Tutorials: http://dojotoolkit.org/documentation/

[hidden email]
To unsubscribe, visit: http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest


 

--
Dojo Toolkit: http://dojotoolkit.org/
Tutorials: http://dojotoolkit.org/documentation/

[hidden email]
To unsubscribe, visit: http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest

--
Dojo Toolkit: http://dojotoolkit.org/
Tutorials: http://dojotoolkit.org/documentation/

[hidden email]
To unsubscribe, visit: http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest