Opened 12 years ago

Closed 11 years ago

#4485 closed Bug (duplicate)

non-applicable items enabled in context menu

Reported by: livings124 Owned by: jordan
Priority: Normal Milestone: Sometime
Component: Web Client Version: 2.33
Severity: Normal Keywords:


In the context menu displayed when right-clicking a torrent, all items are enabled. "Pause" should not be enabled for a paused transfer, for example.

Change History (5)

comment:1 Changed 12 years ago by jordan

  • Milestone changed from None Set to Sometime
  • Owner set to jordan
  • Status changed from new to assigned

The contextmenu plugin that we're using doesn't support disabled menu items. It looks like Dave or Malcolm started work on this in the early Clutch days but didn't finish -- there's an "itemDisabledStyle" set in Transmission's wrapper code, but the contextmenu plugin ignores it.

I experimented with a workaround of applying "itemDisabledStyle" from the contextmenu plugin's "onShowMenu" callback. This is slightly better because the initial popup looks correct, but there are two remaining issues:

  1. If you hover over a disabled menu item, and then off of it again, it no longer looks disabled. This done by the contextmenu plugin's internal code.
  1. Since the contextmenu plugin doesn't know about disabled buttons, it triggers an action when you click on menu item whether it's disabled or not.

My preferred solution would be to set the contextmenu plugin on fire and dump it in an unmarked grave.

When jQuery UI 1.9 comes out, we should investigate using its context menu plugin.

comment:2 Changed 12 years ago by jordan

Xref: r12882

comment:3 Changed 12 years ago by jordan

As an aside, looks promising (though unfinished)

comment:4 Changed 11 years ago by livings124

Not sure if this really is usable, but I believe they are adding support for context menus in html5, although it doesn't look to be supported by many browsers at this point.

comment:5 Changed 11 years ago by jordan

  • Resolution set to duplicate
  • Status changed from assigned to closed

Superceded by ticket #4866

Note: See TracTickets for help on using tickets.