CMS Menu touch enabled

Issues related to the CMS tools of WYSIWYG Web Builder.
Forum rules
PLEASE READ THE FORUM RULES BEFORE YOU POST:
viewtopic.php?f=12&t=1901

MUST READ:
http://www.wysiwygwebbuilder.com/cms_tools.html
A lot of information about the Content Manager System can be found in the help/manual. Please read this first before posting any questions! Also check out the demo template that is include with the software.

CMS trouble shooting / FAQ:
viewtopic.php?f=10&t=43245
User avatar
madebyibloo
 
 
Posts: 452
Joined: Fri Mar 27, 2009 3:58 pm
Location: East Yorkshire, United Kingdom
Contact:

Re: CMS Menu touch enabled

Post by madebyibloo » Mon Apr 06, 2015 9:08 pm

It's still outputting as <a href="index.php?page=products" id="3">Products</a>



Cheers,
Scott :)
Cheers,
Scott


creating the new, together.

User avatar
Pablo
 
Posts: 16748
Joined: Tue Mar 28, 2006 12:00 pm
Location: Europe
Contact:

Re: CMS Menu touch enabled

Post by Pablo » Tue Apr 07, 2015 5:44 am

I think you should also change this:

Code: Select all

$count = count($dataset);
for ($i=0; $i<$count; $i++)
{
   if ($dataset[$i]['parent_id'] === NULL)
   {
      echo "<li>\n";
      echo "<a href=\"" . basename(__FILE__) . "?page=" . $dataset[$i]['id'] . "\" id=\"" . $dataset[$i]['id'] . "\">" . $dataset[$i]['name'] . "</a>\n";
      CreateSubMenu($dataset[$i]['id'], $dataset);
      echo "</li>\n";
   }
}
to
$count = count($dataset);
for ($i=0; $i<$count; $i++)
{
if ($dataset[$i]['parent_id'] === NULL)
{
echo "<li>\n";
if ($dataset[$i]['url'] == '#')
{
echo "<a href=\"#\">" . $dataset[$i]['name'] . "</a>\n";
}
else
{
echo "<a href=\"" . basename(__FILE__) . "?page=" . $dataset[$i]['id'] . "\" id=\"" . $dataset[$i]['id'] . "\">" . $dataset[$i]['name'] . "</a>\n";
}
CreateSubMenu($dataset[$i]['id'], $dataset);
echo "</li>\n";
}
}

User avatar
madebyibloo
 
 
Posts: 452
Joined: Fri Mar 27, 2009 3:58 pm
Location: East Yorkshire, United Kingdom
Contact:

Re: CMS Menu touch enabled

Post by madebyibloo » Tue Apr 07, 2015 6:20 am

Hi Pablo,

I updated the code but still not functioning correct.

In IE 11 - doesn't seem to work. It refreshes to the '#' but does not keep the submenus open to be clicked/touched.
In Chrome - when the parent button is clicked/touched, it opens up the index.php within the cms view frame.
In Firefox - seems to work a little better. It refreshes to the '#' and keeps the submenu open ready to be clicked/touched.



Cheers,
Scott :)
Cheers,
Scott


creating the new, together.

User avatar
Pablo
 
Posts: 16748
Joined: Tue Mar 28, 2006 12:00 pm
Location: Europe
Contact:

Re: CMS Menu touch enabled

Post by Pablo » Wed Apr 08, 2015 2:08 pm

Here's is another thing you can try :D

Add the following code between the head tags:

Code: Select all

<script>
$(document).ready(function()
{
    var isTouch = (!!('ontouchstart' in window) || !!('onmsgesturechange' in window));
    if (isTouch)
    {
       $('#wb_CmsMenu1 ul ul').css('visibility', 'visible');
       $('#wb_CmsMenu1 ul ul').css('display', 'none');
       $('#wb_CmsMenu1 ul ul').css('opacity', '1');
       $('#wb_CmsMenu1 ul li a').click( function(event)
       {
           if ($(this).attr('href') == '#')
           {
              event.stopPropagation();
              $(this).parent().children("ul").toggle();
           }
       });

       $('#wb_CmsMenu1').hover( function(event)
       {
           event.stopPropagation();
       });

       $(document).click( function()
       {
          $('#wb_CmsMenu1 ul ul').hide();
       });
   }
});
</script>

User avatar
madebyibloo
 
 
Posts: 452
Joined: Fri Mar 27, 2009 3:58 pm
Location: East Yorkshire, United Kingdom
Contact:

Re: CMS Menu touch enabled

Post by madebyibloo » Wed Apr 08, 2015 3:24 pm

Hi Pablo,

I've tried the code but it stops the actual submenu from showing/displaying - see here http://www.ibloo.co.uk/cms/

That is defiantly the right way forward tho from what I've been reading for touch devices (the hide/show function)

*Would it make a difference if the css is in another folder (css dir)?



Cheers,
Scott :)
Cheers,
Scott


creating the new, together.

User avatar
Pablo
 
Posts: 16748
Joined: Tue Mar 28, 2006 12:00 pm
Location: Europe
Contact:

Re: CMS Menu touch enabled

Post by Pablo » Wed Apr 08, 2015 3:38 pm

This script should be used in combination with my previous 'patch'
The main items have links, in that case the script will not be active.

User avatar
madebyibloo
 
 
Posts: 452
Joined: Fri Mar 27, 2009 3:58 pm
Location: East Yorkshire, United Kingdom
Contact:

Re: CMS Menu touch enabled

Post by madebyibloo » Wed Apr 08, 2015 3:59 pm

support wrote:This script should be used in combination with my previous 'patch'
The main items have links, in that case the script will not be active.
Got ya! Thanks Pablo, I'll try it now :)


Cheers,
Scott :)
Cheers,
Scott


creating the new, together.

User avatar
madebyibloo
 
 
Posts: 452
Joined: Fri Mar 27, 2009 3:58 pm
Location: East Yorkshire, United Kingdom
Contact:

Re: CMS Menu touch enabled

Post by madebyibloo » Tue Apr 21, 2015 3:02 pm

Hi Pablo,

Two big words - THANK YOU!

touch works amazing on the cms menu with the new update!

Thank you so much Pablo, I really appreciate all your hard work and effort!



Cheers,
Scott :)
Cheers,
Scott


creating the new, together.

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests