Jump to content
Graham Quince

Navigation widget - menu in a page

Recommended Posts

Great widget @Simon Law but I don't think it works on iOS - at least I can't get it to work (desktop browsers all fine).

 

It is this bit that fails on iOS.....

'.nav-navigation-container li a {click}': function(el, ev) { 
	$menu = this.element.closest('.sites_core').find('.sites_menu');
	$menu.find('a[data-uuid='+el.attr('data-uuid')+']').click();
},

 

Safari on iOS inspector and Chrome inspector report slightly different objects if you console out $menu and $menu.find('a[data-uuid='+el.attr('data-uuid')+']'), so perhaps this is why?

I found that this fixed the issue...

'.nav-navigation-container li a {click}': function(el, ev) {
	$menu = this.element.closest('.sites_core').find('.sites_menu');
	$menu.trigger('sites.changeLocation', {
		uuid: el.attr('data-uuid')
	});
},

Is this 'safe' to use?

Paul

Edited by pconkie
Link to comment
Share on other sites

21 hours ago, pconkie said:

Great widget @Simon Law but I don't think it works on iOS - at least I can't get it to work (desktop browsers all fine).

 

It is this bit that fails on iOS.....


'.nav-navigation-container li a {click}': function(el, ev) { 
	$menu = this.element.closest('.sites_core').find('.sites_menu');
	$menu.find('a[data-uuid='+el.attr('data-uuid')+']').click();
},

 

Safari on iOS inspector and Chrome inspector report slightly different objects if you console out $menu and $menu.find('a[data-uuid='+el.attr('data-uuid')+']'), so perhaps this is why?

I found that this fixed the issue...


'.nav-navigation-container li a {click}': function(el, ev) {
	$menu = this.element.closest('.sites_core').find('.sites_menu');
	$menu.trigger('sites.changeLocation', {
		uuid: el.attr('data-uuid')
	});
},

Is this 'safe' to use?

Paul

 

22 hours ago, pconkie said:

$menu.trigger('sites.changeLocation', { uuid: el.attr('data-uuid') });

Hi Paul,

yes, that could be the way forward. the menu click event calls the 'sites.changeLocation' trigger, so we are just circumventing calling the menu tab..

  • Thanks 1
Link to comment
Share on other sites

16 minutes ago, pconkie said:

That didn't take 10 minutes! Sorry - the widget works fine for me.  Maybe you are on a different version of frog from me?

Hmmmmm..... it works....  just cant drill down to a sublist??

Link to comment
Share on other sites

6 hours ago, pconkie said:

That didn't take 10 minutes! Sorry - the widget works fine for me.  Maybe you are on a different version of frog from me?

So it works...  untill you add the bit to only show the subject areas.....  even @Graham Quince had half a look and agreed it didn't work!!

image.png

Link to comment
Share on other sites

6 hours ago, pconkie said:

That didn't take 10 minutes! Sorry - the widget works fine for me.  Maybe you are on a different version of frog from me?

Now i'm really confused.  Went to check both your version numbers and I can't see a navigation widget on Backwell's Frog.  You do have a menu widget up to version 27.  Is that your own @pconkie ?

Link to comment
Share on other sites

25 minutes ago, Graham Quince said:

Now i'm really confused.  Went to check both your version numbers and I can't see a navigation widget on Backwell's Frog.  You do have a menu widget up to version 27.  Is that your own @pconkie ?

I bet @pconkie will have just made his own....  in fact i think hes working on Toad v1!!! ?

Link to comment
Share on other sites

1 hour ago, Graham Quince said:

Now i'm really confused.  Went to check both your version numbers and I can't see a navigation widget on Backwell's Frog.  You do have a menu widget up to version 27.  Is that your own @pconkie ?

No, that’s Simons widget (with a few modifications). Why does mine do what @ADT wants?!

Link to comment
Share on other sites

3 hours ago, ADT said:

So it works...  untill you add the bit to only show the subject areas.....  even @Graham Quince had half a look and agreed it didn't work!!

image.png

Yes, I see the same error now. Assume you have added "Subject Areas" to the START NAVIGATION PATH preference?

Looks like a library the widget uses has been removed. If so might be a quick fix by loading the library on your dashboard before any pages with the widget load.  Then at least it works until a proper fix is pushed out.

Link to comment
Share on other sites

2 minutes ago, pconkie said:

Yes, I see the same error now. Assume you have added "Subject Areas" to the START NAVIGATION PATH preference?

Looks like a library the widget uses has been removed. If so might be a quick fix by loading the library on your dashboard before any pages with the widget load.  Then at least it works until a proper fix is pushed out.

And in layman's terms?

Link to comment
Share on other sites

1 minute ago, pconkie said:

I will give you some code to put in a html widget on your dashboards

It will make it work again

Pester frog for a proper fix though...

See thats what i hope you would say...  Hey you know me...  when do i ever stop pestering Frog!! ?

You coming to this years virtual conference??

Link to comment
Share on other sites

I've found and loaded the missing library, but there are some other issues which I can't figure out, sorry.

Maybe it's never worked or more likely the library has changed the way it works.  For Simon: searching the json for the navigation start doesn't return any nodes.  Looks like the xpath is wrong, I've tried changing it but i'm getting an invalid XPath error.

Link to comment
Share on other sites

1 hour ago, pconkie said:

I've found and loaded the missing library, but there are some other issues which I can't figure out, sorry.

Maybe it's never worked or more likely the library has changed the way it works.  For Simon: searching the json for the navigation start doesn't return any nodes.  Looks like the xpath is wrong, I've tried changing it but i'm getting an invalid XPath error.

Thanks for trying...  I guess its back to making a manual navigation list!!

Link to comment
Share on other sites

13 hours ago, pconkie said:

I've found and loaded the missing library, but there are some other issues which I can't figure out, sorry.

Maybe it's never worked or more likely the library has changed the way it works.  For Simon: searching the json for the navigation start doesn't return any nodes.  Looks like the xpath is wrong, I've tried changing it but i'm getting an invalid XPath error.

@Simon Law @Graham Quince @adamw

Any help??? ?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...