Opened 13 years ago

Closed 13 years ago

#199 closed defect (fixed)

List Type plugin: tweak location of dropdown (with fix)

Reported by: Paul Baranowski <paul@…> Owned by: gogo
Priority: normal Milestone:
Component: Xinha Core Version:
Severity: normal Keywords:
Cc:

Description

By default, the ListType plugin puts its dropdown in front of the unordered list button. But the drop down is associated with the ordered list button, and so I think it makes more sense to put it after this button.

Here is the fix, in file plugins/ListType/list-type.js, function ListType (constructor):

Old code:

	cfg.registerDropdown(obj);
	var a, i, j, found = false;
	for (i = 0; !found && i < toolbar.length; ++i) {
		a = toolbar[i];
		for (j = 0; j < a.length; ++j) {
			if (a[j] == "insertunorderedlist") {
				found = true;
				break;
			}
		}
	}
	if (found)
		a.splice(j, 0, "space", "ListType", "space");

New code:

	cfg.registerDropdown(obj);
	var a, i, j, found = false;
	for (i = 0; !found && i < toolbar.length; ++i) {
		a = toolbar[i];
		for (j = 0; j < a.length; ++j) {
			if (a[j] == "insertorderedlist") {
				found = true;
				break;
			}
		}
	}
	if (found)
		a.splice(j+1, 0, "space", "ListType", "space");

Change History (1)

comment:1 Changed 13 years ago by niko

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

makes sense.
see changeset:101

Note: See TracTickets for help on using tickets.