This Help forum is for issues relates to the latest release (1.2.x). For issues related to beta or svn version please use their own Help forum.
When requesting help please provide as much information as possible. Explain what version of webtrees, PHP and MYSQL you are using. If possible provide a URL to your site so we can see the problem first-hand.
Tip: Think about putting these details in your signature, so it appears in the footer of ALL your messages
  • Page:
  • 1

TOPIC:

iPad2 gesture(s) in Interactive Tree 9 years 4 months ago #1

  • eskinner
  • eskinner's Avatar Topic Author
  • Visitor
  • Visitor
From my iPad2 (iOS 5), I can't seem to shove around the contents in the Interactive Tree. Is that just me or will this be a problem with other mouse-less (finger-driven) pads?
Everything else seems to be usable from the iPad2.

(FYI: The family website is coming along VERY nicely, by the way. Lots of images, data being added. etc.. A couple of family members are starting to poke around. Everyone is VERY pleased with webtrees. Thank you for a really nice piece of work!)

Please Log in or Create an account to join the conversation.

Re: iPad2 gesture(s) in Interactive Tree 9 years 4 months ago #2

  • fisharebest
  • fisharebest's Avatar
  • Away
  • Administrator
  • Administrator
  • Posts: 14491
I tried webtrees on an android tablet recently, and had exactly the same problem.
Greg Roach - This email address is being protected from spambots. You need JavaScript enabled to view it. - fisharebest.webtrees.net

Please Log in or Create an account to join the conversation.

Re: iPad2 gesture(s) in Interactive Tree 8 years 11 months ago #3

  • AntonLargiader
  • AntonLargiader's Avatar
  • Visitor
  • Visitor
I tried webtrees on my iPad recently, and had exactly the same problem.

So I fixed it. :)

There's a lot of stuff on stackoverflow.com about this. Since WT uses jquery-ui, I used an afterhack that apparently turns the touches into taps, and swipes into drags. Or something like that. I'm sure you all can suggest tweaks to this, but here's what I did:

In session.php I added a definition for the new file (third line):
define('WT_JQUERY_URL',        WT_STATIC_URL.'js/jquery/jquery.min.js');
define('WT_JQUERYUI_URL',      WT_STATIC_URL.'js/jquery/jquery-ui.min.js');
define('WT_JQUERYUI2_URL',     WT_STATIC_URL.'js/jquery/jquery.ui.touch-punch.min.js');
define('WT_PROTOTYPE_URL',     WT_STATIC_URL.'js/prototype/prototype.js');

In Base.php I called it along with the others:
'<script type="text/javascript" src="'.WT_JQUERY_URL.'"></script>'.
'<script type="text/javascript" src="'.WT_JQUERYUI_URL.'"></script>'.
'<script type="text/javascript" src="'.WT_JQUERYUI2_URL.'"></script>'.
'<script type="text/javascript" src="'.WT_STATIC_URL.'js/jquery/jquery.jeditable.min.js"></script>'.

And I did the same in module.php:
$content .= '<script type="text/javascript" src="'.WT_JQUERY_URL.'"></script><script type="text/javascript" src="'.WT_JQUERYUI_URL.'"></script><script type="text/javascript" src="'.WT_JQUERYUI2_URL.'"></script>';

Voila. I can drag the interactive tree. I can't tell any difference when using a PC.

All I did was shamelessly insert the hack file along with other jquery scripts whenever they were used, in the worst kind of script-kiddy way. The thread I started with on stackoverflow is here, with a link to the script:
stackoverflow.com/questions/3279477/ipad-drag-and-drop

Please Log in or Create an account to join the conversation.

Re: iPad2 gesture(s) in Interactive Tree 8 years 11 months ago #4

  • kiwi
  • kiwi's Avatar
  • Offline
  • Platinum Member
  • Platinum Member
  • Posts: 4986
Anton

I don't understand this bit of your post:

All I did was shamelessly insert the hack file along with other jquery scripts whenever they were used

Are you saying you added script in other places? Such as?
Nigel

www.our-families.info

Hosted at:
Follow me at:

Please Log in or Create an account to join the conversation.

Re: iPad2 gesture(s) in Interactive Tree 8 years 11 months ago #5

  • AntonLargiader
  • AntonLargiader's Avatar
  • Visitor
  • Visitor
Nope. I'm just saying that I didn't use any kind of actual cleverness; I just looked for places where the regular jquery scripts were used and slipped this one in along with them. I listed the three edits I made.

Please Log in or Create an account to join the conversation.

Re: iPad2 gesture(s) in Interactive Tree 8 years 11 months ago #6

  • kiwi
  • kiwi's Avatar
  • Offline
  • Platinum Member
  • Platinum Member
  • Posts: 4986
OK, thanks for that. We'll need to run some tests, to ensure it doesn't cause any other issues (page load efficiency, conflicts elsewhere etc. so this might not make it into the next release, but we'll see what can be done.
Nigel

www.our-families.info

Hosted at:
Follow me at:

Please Log in or Create an account to join the conversation.

Re: iPad2 gesture(s) in Interactive Tree 8 years 11 months ago #7

  • AntonLargiader
  • AntonLargiader's Avatar
  • Visitor
  • Visitor
Sure. The JS is all gibberish to me, but it's a tiny bit of code. Not my creation!

Home page: touchpunch.furf.com/

Please Log in or Create an account to join the conversation.

Re: iPad2 gesture(s) in Interactive Tree 8 years 11 months ago #8

  • kiwi
  • kiwi's Avatar
  • Offline
  • Platinum Member
  • Platinum Member
  • Posts: 4986
Anton, just so you know. We have discussed your suggestion, and whilst we appreciate the work, we have decided not to adopt it for webtrees. There are three reasons:
  1. As a general policy we try to avoid 3rd party plug-ins where possible as they can cause problems when lone developers fail to maintain them.
  2. More plugins means more HTTP requests, which is directly opposite to what we are trying to achieve. We have been reducing HTTP requests aggressively since forking from PGV. This is one of the ways we have been able to achieve better response times, which has from the beginning been one of our main goals.
  3. We also understand that jQuery are working towards a "native" solution, hopefully in their version 2.x release. Not sure when that will be available, but we will certainly incorporate that when it is ready. We currently use version 1.8.
So the problem will be resolved, but not yet. In the meantime of course, anyone who wants to can utilise your suggestion for themselves.
Nigel

www.our-families.info

Hosted at:
Follow me at:

Please Log in or Create an account to join the conversation.

Do you need a web hosting solution for your webtrees site?
If you prefer a host that specialises in webtrees, the following page lists some suppliers able to provide one for you: 

Re: iPad2 gesture(s) in Interactive Tree 8 years 11 months ago #9

  • AntonLargiader
  • AntonLargiader's Avatar
  • Visitor
  • Visitor
That's cool. Mostly I just wanted to show that a simple solution is available. As for concerns 1 & 2, well, it's tiny and simple. Could probably be loaded inside some other file, and I don't see it going out of date.

Native jQuery support would be simpler, I'm sure. But my site supports the iPad now; that's what matters to me. :)

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
Powered by Kunena Forum