hide an toolbar link

4 views
Skip to first unread message

nunocosta

unread,
Jul 23, 2010, 1:04:43 PM7/23/10
to iPhoneWebDev
I copyed this msg from iUI dev group posted by myself.

Hello all,

It's possible hide an toolbar link, when I'm already in the slide?

E.x:

<div class="toolbar">
<a class="menu" href="#menu">Menu</a>
<h1 id="pageTitle"></h1>
<a class="search" href="#form">Search</a>
</div>

<ul id="menu" title="Menu">
<li>.......
</ul>

So, if i'm already in this slide that is (id="menu") I wanted hide the
"<a class="menu" href="#menu">Menu</a>" from toolbar, because if I
click again in the link (if i'm already in slide Menu) the slide
disappears.

Many thanks
Nuno



After my research I think I found something related, I'm correct?
http://code.google.com/p/iui/issues/detail?id=186&q=milestone%3AREL-0.40

Sean Gilligan

unread,
Jul 23, 2010, 2:21:18 PM7/23/10
to iphone...@googlegroups.com, nunocosta
On 7/23/10 10:04 AM, nunocosta wrote:
> I copyed this msg from iUI dev group posted by myself.


Yeah, iPhoneWebDev is a much better place to ask this type of question.


> It's possible hide an toolbar link, when I'm already in the slide?


You might want to take a look at Vic Hudson's TbBMod (Toolbar Button
Modification) extension:
http://code.google.com/p/iui/source/browse/#hg/web-app/iui/ext-sandbox/TbBMod

Demo here:
http://www.iui-js.org/iui/ext-sandbox/TbBMod/index.html

You'll have to get the code out of Mercurial as it hasn't been released
yet. You can also check the Issue DB for other approaches (I know of at
least one) for modifying the toolbar buttons based upon which
slide/view/"page" is currently active.


> So, if i'm already in this slide that is (id="menu") I wanted hide the
> "<a class="menu" href="#menu">Menu</a>" from toolbar, because if I
> click again in the link (if i'm already in slide Menu) the slide
> disappears.


Clicking on a link to the currently active page is a bug that has been
fixed along with another bug.
See Issue #191:
http://code.google.com/p/iui/issues/detail?id=191
The code is here:
http://code.google.com/p/iui/source/detail?r=6d775eba42500dbaf70192ab32290a0111251789

But if you make the button go away (a better UI approach) you shouldn't
have to worry about a link back to the current page.

-- Sean

nunocosta

unread,
Jul 23, 2010, 3:02:38 PM7/23/10
to iPhoneWebDev
On 23 Jul, 19:21, Sean Gilligan <msgilli...@gmail.com> wrote:
>   On 7/23/10 10:04 AM, nunocosta wrote:
>
> > I copyed this msg from iUI dev group posted by myself.
>
> Yeah, iPhoneWebDev is a much better place to ask this type of question.
>
> >   It's possible hide an toolbar link, when I'm already in the slide?
>
> You might want to take a look at Vic Hudson's TbBMod (Toolbar Button
> Modification) extension:http://code.google.com/p/iui/source/browse/#hg/web-app/iui/ext-sandbo...
>
> Demo here:http://www.iui-js.org/iui/ext-sandbox/TbBMod/index.html
>
> You'll have to get the code out of Mercurial as it hasn't been released
> yet.  You can also check the Issue DB for other approaches (I know of at
> least one) for modifying the toolbar buttons based upon which
> slide/view/"page" is currently active.
>
> > So, if i'm already in this slide that is (id="menu") I wanted hide the
> > "<a class="menu" href="#menu">Menu</a>" from toolbar, because if I
> > click again in the link (if i'm already in slide Menu)  the slide
> > disappears.
>
> Clicking on a link to the currently active page is a bug that has been
> fixed along with another bug.
> See Issue #191:http://code.google.com/p/iui/issues/detail?id=191
> The code is here:http://code.google.com/p/iui/source/detail?r=6d775eba42500dbaf70192ab...
>
> But if you make the button go away (a better UI approach) you shouldn't
> have to worry about a link back to the current page.
>
> -- Sean

Sean,
actualy i haven't a back link, just have that static menu link.

Have you an example how it could'b hidden?

thanks again
Nuno

nunocosta

unread,
Jul 24, 2010, 9:51:22 AM7/24/10
to iPhoneWebDev
http://code.google.com/p/iui/issues/detail?id=7#c4
Fix the issue, why you not add this simple fix to the iui.js? :)

Because when i upgrade a new release I'll louse this fix.

Sean Gilligan

unread,
Jul 25, 2010, 9:26:43 PM7/25/10
to iphone...@googlegroups.com, nunocosta

The fix in Issue #7 Comment #4 is not the right fix for this issue. It
needs to be fixed in showPage (or equivalent) because external
JavaScript can call showPage, etc. Fixing it in the click handler won't
fix all cases.

The fix has been made here and will be in the next release:
http://code.google.com/p/iui/source/detail?r=6d775eba42500dbaf70192ab32290a0111251789


-- Sean

p.s. Please don't cross-post to both iPhoneWebDev and iui-developers.
Almost everyone (that answers questions) on iui-developers is also on
this list.

nunocosta

unread,
Jul 27, 2010, 8:07:44 AM7/27/10
to iPhoneWebDev
Sorry this version not work for me (it's a cms) in safari, works fine
in FF 3.6.8, I just changed my version to the js version that u said
and i just can tap one time no more taps.
I have the div id-content with home loaded and have another div with
the cms nav (it's all loaded via ajax) so just replace the content div
that have already the home text loaded via DOM but the home text is
always there.
Can be this situation?

On 26 Jul, 02:26, Sean Gilligan <msgilli...@gmail.com> wrote:
> > On 23 Jul, 20:02, nunocosta<criacaoweb....@gmail.com>  wrote:
> >http://code.google.com/p/iui/issues/detail?id=7#c4Fix the issue, why
> > you not add this simple fix to the iui.js? :) Because when i upgrade a
> > new release I'll louse this fix.
>
> The fix in Issue #7 Comment #4 is not the right fix for this issue.  It
> needs to be fixed in showPage (or equivalent) because external
> JavaScript can call showPage, etc.  Fixing it in the click handler won't
> fix all cases.
>
> The fix has been made here and will be in the next release:http://code.google.com/p/iui/source/detail?r=6d775eba42500dbaf70192ab...

Sean Gilligan

unread,
Jul 27, 2010, 2:37:49 PM7/27/10
to iphone...@googlegroups.com
Which version of iui.js are you using? I'm not sure I understand your
description of the problem. Do you have a link to something that
demonstrates the problem? Can you create a simple test case (without
the CMS)?

-- Sean

nunocosta

unread,
Jul 27, 2010, 4:49:03 PM7/27/10
to iPhoneWebDev
The version was 0.40-dev2 and now I've tested the lasted default tip
version.

On Jul 27, 7:37 pm, Sean Gilligan <msgilli...@gmail.com> wrote:
>   Which version of iui.js are you using?  I'm not sure I understand your
> description of the problem.  Do you have a link to something that
> demonstrates the problem?  Can you create a simple test case (without
> the CMS)?
>
> -- Sean
>
> On 7/27/10 5:07 AM, nunocosta wrote:
>
> > Sorry this version not work for me (it's a cms) in safari, works fine
> > in FF 3.6.8, I just changed my version to the js version that u said
> > and i just can tap one time no more taps.
> > I have the div id-content with home loaded and have another div with
> > the cms nav (it's all loaded via ajax) so just replace the content div
> > that have already the home text loaded via DOM but the home text is
> > always there.
> > Can be this situation?
>
> > On 26 Jul, 02:26, Sean Gilligan<msgilli...@gmail.com>  wrote:
> >>> On 23 Jul, 20:02, nunocosta<criacaoweb....@gmail.com>    wrote:
> >>>http://code.google.com/p/iui/issues/detail?id=7#c4Fixthe issue, why

Sean Gilligan

unread,
Jul 27, 2010, 5:00:57 PM7/27/10
to iphone...@googlegroups.com, nunocosta
On 7/27/10 1:49 PM, nunocosta wrote:
> The version was 0.40-dev2 and now I've tested the lasted default tip
> version.

If you can't make your URL public, I highly recommend creating a simple
(static HTML if possible) test case that you can make available
publicly. It may even help you find and fix the problem before you get
to the point of publishing it...

-- Sean

Reply all
Reply to author
Forward
Message has been deleted
0 new messages