E.g. having a sidebar-flip on the edge of the screen, people will swipe on touch devices. On PC people will click.
Swipe down if on top of to refresh/reload, swipe right to go back, swipe left to go forward/next etc… S-E From: JumpStart [via Apache Tapestry Mailing List Archives] [mailto:ml-node+s1045711n5732960...@n5.nabble.com] Sent: 6. september 2016 05:58 To: Svein-Erik Løken <sv...@jacilla.no> Subject: Re: Swipe and touch I think that embedding a “touch” solution in T5.4 is a bad idea. This has been a fast-moving area, with lots of device-, and OS-version-, compatibility issues. Witness all of iOS’s touch-scroll issues over various releases. I think the best we could do is have a plugin if someone’s willing to support it, but who’s willing to keep lots of old and new devices of various brands around? The next best thing is to provide sample solutions in the wiki. Having said that, I think most of my iOS issues (in Safari and Cordova-based apps) disappeared with iOS 8.0. Touch usually works without any coding. Is that true for Android and other? What is an example of a “touch” issue you have? These days the only effort I have to put in for “touch” (i.e. explicitly converting taps to clicks) is sortable ( http://jqueryui.com/demos/sortable ) and Cordova calendar. BTW, swipe may be different. Currently I don’t use it. Geoff > On 6 Sep 2016, at 2:00 AM, Svein-Erik Løken <[hidden > email]</user/SendEmail.jtp?type=node&node=5732960&i=0>> wrote: > > I have no problem adding javascript libs using RequireJS. On my web site 60% > of the end-users are using touch devices. To support then I have to handle > some touch and swipe events. I think Tapestry also need to do that in > upcoming versions. > > From: Chris Poulsen [via Apache Tapestry Mailing List Archives] > [mailto:[hidden email]</user/SendEmail.jtp?type=node&node=5732960&i=1>] > Sent: mandag 5. september 2016 15.00 > To: Svein-Erik Løken <[hidden > email]</user/SendEmail.jtp?type=node&node=5732960&i=2>> > Subject: Re: Swipe and touch > > I think the way to go is not to expose them / use them directly in onClick. > Instead you bind them in a module (either using t5/core/dom or jquery). > That way you are also keeping your global (script) scope much cleaner. > > Lots of the tapestry framework client side code use this pattern. > > -- > Chris > > > On Mon, Sep 5, 2016 at 11:52 AM, Qbyte Consulting <[hidden > email]</user/SendEmail.jtp?type=node&node=5732956&i=0> >> wrote: > >> Okay, after splitting my JS up into logical pieces and deploying them using >> the module approach I can get jquery mobile to work. Perhaps the loading >> times or sequence of script run was breaking things before? >> >> Some trivial behaviours I added to a sidebar including a swipe out: >> >> (function () { >> define(["jquery"], function ($) { >> >> $("#go").click(function () { >> $("#sidebar").show("fast"); >> }); >> $("#stop").click(function () { >> $("#sidebar").hide("fast"); >> }); >> $("#sidebar").on("swipeleft", function () { >> $("#sidebar").hide("slow"); >> }); >> }); >> }).call(this); >> >> My locate module, I couldn't get to drips with the utils url extender so >> have coded manually: >> >> (function () { >> define(["t5/core/ajax"], function (ajax) { >> geoLocate = function (eventLinkURI) { >> if (navigator.geolocation) { >> navigator.geolocation >> .getCurrentPosition(function (position) >> { >> var geolink = eventLinkURI >> + "?lat=" + position.coords.latitude >> + "&long=" + position.coords.longitude; >> ajax(geolink, null); >> }, geoError); >> } >> }; >> function geoError() { >> alert('There was a problem determining your location. Some >> features may not be available.'); >> } >> return { >> geoLocate: geoLocate >> }; >> }); >> }).call(this); >> >> I still can't figure out how to access functions defined in modules >> directly using onclick= though, any ideas how to export them for direct >> client side access? >> >> On Fri, Sep 2, 2016 at 9:49 PM, Qbyte Consulting < >> [hidden email]</user/SendEmail.jtp?type=node&node=5732956&i=1>> >> wrote: >> >>> I tried to add jquery mobile to my T5.4 project for swipe but it cracks >>> up. Same for angularjs. >>> >>> Is there additional config required to add js libraries? Since I have >>> jquery set up already I figured I could just add the mobile. >>> >>> Sent from my iPhone >>> >>>> On 2 Sep 2016, at 19:40, Thiago H de Paula Figueiredo < >>> [hidden email]</user/SendEmail.jtp?type=node&node=5732956&i=2>> wrote: >>>> >>>>> On Fri, 02 Sep 2016 15:18:24 -0300, Svein-Erik Løken < >> [hidden email]</user/SendEmail.jtp?type=node&node=5732956&i=3>> >>> wrote: >>>>> >>>>> I cannot find any swipe and touch JavaScript library in Tapestry. Are >>> there any plans to include one in Tapestry in the future? >>>> >>>> No, as it's pretty easy to use almost any JS library or framework >> inside >>> Tapestry. ;) :) >>>> >>>>> If it is - I will use that library now. The Tapestry dev team use to >>> find the best library :) It seems that Hammer JS and Touch Swipe are >>> popular(?). Any recommendation? >>>> >>>> I'm sorry, but I haven't used any of them. >>>> >>>> -- >>>> Thiago H. de Paula Figueiredo >>>> Tapestry, Java and Hibernate consultant and developer >>>> http://machina.com.br >>>> >>>> --------------------------------------------------------------------- >>>> To unsubscribe, e-mail: [hidden >>>> email]</user/SendEmail.jtp?type=node&node=5732956&i=4> >>>> For additional commands, e-mail: [hidden >>>> email]</user/SendEmail.jtp?type=node&node=5732956&i=5> >>>> >>> >> > > ________________________________ > If you reply to this email, your message will be added to the discussion > below: > http://apache-tapestry-mailing-list-archives.1045711.n5.nabble.com/Swipe-and-touch-tp5732951p5732956.html > To unsubscribe from [hidden > email]</user/SendEmail.jtp?type=node&node=5732960&i=3><mailto:[hidden > email]</user/SendEmail.jtp?type=node&node=5732960&i=4>> Mailing List > Archives, click here< > NAML<http://apache-tapestry-mailing-list-archives.1045711.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml> ________________________________ If you reply to this email, your message will be added to the discussion below: http://apache-tapestry-mailing-list-archives.1045711.n5.nabble.com/Swipe-and-touch-tp5732951p5732960.html To unsubscribe from users@tapestry.apache.org<mailto:users@tapestry.apache.org> Mailing List Archives, click here<http://apache-tapestry-mailing-list-archives.1045711.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=2375125&code=c3ZlaW5AamFjaWxsYS5ub3wyMzc1MTI1fC0xNTM4NzY2ODg4>. NAML<http://apache-tapestry-mailing-list-archives.1045711.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>