Last modified: 2011-03-13 18:04:48 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 14121 - Ability to make breaks in the edit toolbar
Ability to make breaks in the edit toolbar
Product: MediaWiki
Classification: Unclassified
Page editing (Other open bugs)
All All
: Lowest enhancement (vote)
: ---
Assigned To: Dan Barrett
: patch, patch-need-review
Depends on:
Blocks: edit-toolbar
  Show dependency treegraph
Reported: 2008-05-14 16:04 UTC by Darren VanBuren
Modified: 2011-03-13 18:04 UTC (History)
3 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---

Patch by DanB created on his behalf (638 bytes, patch)
2008-05-14 16:04 UTC, Darren VanBuren
Diff against -r39564 (549 bytes, patch)
2008-08-18 00:45 UTC, Dan Barrett
Unified diff against trunk rev 47722 (531 bytes, patch)
2009-02-23 21:02 UTC, Dan Barrett

Description Darren VanBuren 2008-05-14 16:04:00 UTC
Created attachment 4901 [details]
Patch by DanB created on his behalf

In our wiki, we have many toolbar buttons on the edit page, so we want to split them into multiple lines at designated spots. My hacked solution is below -- is there a better way?

To implement this, I hacked function mwInsertEditButton in skins/common/wikibits.js, so an imageFile value of "<br>" causes a real <br> to be inserted into the toolbar.  I added this code as the first lines of mwInsertEditButton :

       if (item.imageFile == '<br>') {
               return true;

Is there a better way to accomplish this task without modifying core code?


This patch seems good, and an svn patch is attached
Comment 1 Siebrand Mazeland 2008-08-17 20:43:10 UTC
Comment 2 Dan Barrett 2008-08-17 21:12:27 UTC
Note that this code is now in skins/common/edit.js (formerly wikibits.js).
Comment 3 Siebrand Mazeland 2008-08-17 21:13:53 UTC
Please provide an updated unified diff.
Comment 4 Dan Barrett 2008-08-18 00:45:29 UTC
Created attachment 5187 [details]
Diff against -r39564

Uploaded new diff
Comment 5 Dan Barrett 2009-02-23 20:59:32 UTC
Would someone please commit this patch?  It is so small and useful, and it's been ready (and tested locally) for 9 months.

I will upload a new unified diff.
Comment 6 Dan Barrett 2009-02-23 21:02:17 UTC
Created attachment 5853 [details]
Unified diff against trunk rev 47722
Comment 7 Dan Barrett 2010-04-21 21:10:19 UTC
Any chance this simple patch could see the light of day?
Comment 8 Dan Barrett 2010-08-10 16:34:07 UTC
You may close this ticket. The "br" functionality can be implemented without a core code change, by overriding mwInsertEditButton in MediaWiki:common.js.
Comment 9 Dan Barrett 2010-08-10 16:34:55 UTC

var orig_mwInsertEditButton = window.mwInsertEditButton;
window.mwInsertEditButton = function(parent, item) {
   if (item.imageFile == '<br>') {
      return true;
   return orig_mwInsertEditButton(parent, item);

Note You need to log in before you can comment on or make changes to this bug.