Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#1561 closed enhancement (fixed)

DefinitionList: register toolbar buttons next to standard list buttons

Reported by: ejucovy Owned by:
Priority: normal Milestone: 0.97
Component: Plugins Version: trunk
Severity: normal Keywords: toolbar


Currently DefinitionList? registers its toolbar buttons at the end of the toolbar.

Instead, it would be logical for it to register its buttons next to the standard list buttons ("insertorderedlist" and "insertunorderedlist") using the addToolbarElement method:

In it's simplest form it takes as three parameters
 1. the button id (previously registered with registerButton)
 2. the id of the button you want to insert this button relative to
 3. one of, -1 for "insert before", 0 for "replace" and 1 for "insert after"

This enhancement was discussed here:

Change History (2)

comment:1 Changed 10 years ago by ejucovy

  • Resolution set to fixed
  • Status changed from new to closed

Done in r1278 and r1279. (r1278 was incorrect -- it put the buttons on the toolbar in the reverse order. In r1279 I simplified the plugin's toolbar logic and made the ordering correct.)

If neither the OL or UL button exists, the DL buttons end up at the beginning of the toolbar (that's how addToolbarElement works).

The way I did this assumes the standard ordering, which has the OL button first, and the UL button right after it. In other words, my commit will try to put the DL buttons after the UL buttons for a sequence of OL - UL - DL - DT - DD. If the user configured the UL button to be before the OL button, and includes this plugin, the sequence will end up being UL - DL - DT - DD - OL. That's not perfect, but I think it's as good as we'll get without adding much more complicated logic, or somehow coming up with a new approach for the toolbar.

comment:2 Changed 10 years ago by ejucovy

  • Keywords toolbar added
Note: See TracTickets for help on using tickets.