menu highlight
Forum rules
Please note that response time for technical support is within 3-5 business days.
Please note that response time for technical support is within 3-5 business days.
-
- Posts: 5281
- Joined: 29 Jun 2013, 12:38
I couldn't replicate this issue. Which Ultima version are you using?
Github Profile: https://github.com/mertsincan
-
- Posts: 12
- Joined: 17 May 2016, 19:13
Hi, we use version 1.0.5 and have the same problem reported by wandyer
Any sugestions??
Any sugestions??
wandyer wrote: ↑27 Jun 2017, 05:32The line:aragorn wrote: ↑13 Jun 2017, 10:18Could you please try the following code?//menu.xhtmlCode: Select all
<script type="text/javascript"> //<![CDATA[ $(document).ready(function() { var $this = PF('me'); if($this) { var pathname = window.location.pathname; if(pathname.indexOf('.xhtml') > 0) { var activeLink = $this.menulinks.filter('[href^="' + pathname + '"]'); $this.expandedMenuitems = []; $this.clearMenuState(); var item = activeLink.parent('li'); $this.addMenuitem(item.attr('id')); addParentItems($this, item); rc(); } } }); function addParentItems($this, item) { if(item && item.length) { var parent = item.parents('li:first'); $this.addMenuitem(parent.attr('id')); if(!parent.parent('ul').hasClass('ultima-menu')) { addParentItems($this, parent); } else { return; } } return; } //]]> </script>
Code: Select all
<h:form id="menuform"> .... <p:remoteCommand name="rc" update="menuform:menu" /> <pu:menu id="menu" widgetVar="me"> ..
makes any top-bar item stop working for me, including the main menu button.Code: Select all
rc();
If I remove that line, they start working again but the menus are not highlighted anymore when I open the page from a URL.
My menu.xhtml:Code: Select all
... <p:remoteCommand name="rc" update="menuform:menu" /> <pu:menu id="menu" widgetVar="me" model="#{menuView.model}" /> ...
sistemaslume wrote: ↑20 Nov 2017, 15:31Hi, we use version 1.0.5 and have the same problem reported by wandyer
Any sugestions??
wandyer wrote: ↑27 Jun 2017, 05:32The line:aragorn wrote: ↑13 Jun 2017, 10:18Could you please try the following code?//menu.xhtmlCode: Select all
<script type="text/javascript"> //<![CDATA[ $(document).ready(function() { var $this = PF('me'); if($this) { var pathname = window.location.pathname; if(pathname.indexOf('.xhtml') > 0) { var activeLink = $this.menulinks.filter('[href^="' + pathname + '"]'); $this.expandedMenuitems = []; $this.clearMenuState(); var item = activeLink.parent('li'); $this.addMenuitem(item.attr('id')); addParentItems($this, item); rc(); } } }); function addParentItems($this, item) { if(item && item.length) { var parent = item.parents('li:first'); $this.addMenuitem(parent.attr('id')); if(!parent.parent('ul').hasClass('ultima-menu')) { addParentItems($this, parent); } else { return; } } return; } //]]> </script>
Code: Select all
<h:form id="menuform"> .... <p:remoteCommand name="rc" update="menuform:menu" /> <pu:menu id="menu" widgetVar="me"> ..
makes any top-bar item stop working for me, including the main menu button.Code: Select all
rc();
If I remove that line, they start working again but the menus are not highlighted anymore when I open the page from a URL.
My menu.xhtml:Code: Select all
... <p:remoteCommand name="rc" update="menuform:menu" /> <pu:menu id="menu" widgetVar="me" model="#{menuView.model}" /> ...
I fixed that problem, but can't remember exactly what I did. I know that I ended up making significant changes to that script provided by argon, because I wanted some custom behaviours.
But I think what fixed the issue of the topbar, I added ignoreAutoUpdate="true" to the p:remoteCommand
Like this:
Code: Select all
<p:remoteCommand name="rc" update="menu" ignoreAutoUpdate="true"/>
I just tested without ignoreAutoUpdate="true" , and it still works. Now I think I used that property to fix something else.
I reverted the changes on most of my classes and I can't reproduce this issue again on version 1.1, so I'm not so sure what caused it.
I reverted the changes on most of my classes and I can't reproduce this issue again on version 1.1, so I'm not so sure what caused it.
-
- Information
-
Who is online
Users browsing this forum: No registered users and 2 guests