[Zope3-dev] Re: [AdaptersForMenuItems] Disabling and menu item icons

Tonico Strasser contact_tonico at yahoo.de
Tue Jan 13 06:40:01 EST 2004


Casey Duncan wrote:

> On Mon, 12 Jan 2004 08:58:58 -0500
> Jim Fulton <jim at zope.com> wrote:
> 
> 
>>Caseman wrote:
>>
>>>++added:
>>>
>>>>From Caseman Mon Jan 12 09:28:00 US/Eastern 2004 From: Caseman Date:
>>>2004/01/12 09:28 EST Subject: Disabling and menu item icons
>>>Message-ID: <20040112092846EST at dev.zope.org>
>>>
>>>I noticed that menu items lack an ability to be marked disabled
>>>(i.e., still visible but dimmed and not selectable). From the doc
>>>string it seems that 'available()' means that the item should not be
>>>displayed at all.
>>
>>Right.
>>
>>So, would you suggest another filter to control whether an item is
>>enabled?
> 
> 
> Yes, you should be able to designate a menu item as disabled. This would
> need to be dynamic like available(), since obviously it should be
> enabled in some circumstances.
> 
> I suppose then that the interface for menu items (and possibly menus
> too, since you might want to disable a whole menu) should grow an
> 'enabled()' method which returns a bool.
>  
> 
>>>I'm assuming that menus could also be used to define toolbars, which
>>>would require icons. There is also a convention in modern GUIs for
>>>many menus to include icons.
>>
>>Good point.
> 
> 
> Icons might make disabled() problematic since it should dim the icon,
> although most recent browsers support some form or alpha channel image
> filtering that could accomplish this client-side. At worst, you could
> specify two icons, one for enabled and one for disabled if needed.

Please consider using css, it's more elegant and more accessible.

<li class="disabled" id="item-xyz356">
   <a href="/">Item</a>
</li>

No <img> tag needed.

Tonico





More information about the Zope3-dev mailing list