Add default action on face for Panel button (menu button)
|Reported by:||mjk||Owned by:|
|Component:||UI : Toolbar||Version:||3.0|
It's common for toolbar buttons in other applications to do a default action if you click on the button face, and only drop a panel (as FCKToolbarPanelButton does) when you click the arrow -- if there is one. At present, FCKToolbarPanelButton doesn't maintain the distinction between dropping down the panel and making a default action.
Enclosed is a patch to enable ToolbarPanelButton to pass to the toolbar command object whether or not the user clicked the dropdown arrow or the face, so that the command object can behave accordingly. This also adds the ability for ToolbarPanelButton to be context-sensitive -- necessary if you're implementing things like UL and OL.
Also enclosed is a plugin that uses the patched functionality. The plugin overloads FCKTextColorCommand so that the last color you used is the default action on the button face. It also adds DropOL, DropUL, and DropFontSize to use the same functionality to provide dropdowns for setting your OL/UL styles and font sizes.
In local testing, the patches to ToolbarPanelButton are sufficiently encapsulated so as not to break existing ToolbarPanelButtons.
Change History (5)
Changed 10 years ago by mjk
comment:4 Changed 4 years ago by j.swiderski
- Keywords HasPatch removed
- Status changed from new to confirmed
- Summary changed from Add default action on face for FCKToolbarPanelButton + plugin for alternate OL/UL/color/size buttons to Add default action on face for Panel button (menu button)
- Version changed from FCKeditor 2.5 to 3.0