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

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T16121, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 14121 - Ability to make breaks in the edit toolbar
Ability to make breaks in the edit toolbar
Status: RESOLVED WONTFIX
Product: MediaWiki
Classification: Unclassified
Page editing (Other open bugs)
1.13.x
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: ---


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

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

From mediawiki-l@lists.wikimedia.org:
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>') {
               parent.appendChild(document.createElement("br"));
               return true;
       }

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

Thanks,
DanB

This patch seems good, and an svn patch is attached
Comment 1 Siebrand Mazeland 2008-08-17 20:43:10 UTC
+need-review
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?
Thanks.
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
Solution:

var orig_mwInsertEditButton = window.mwInsertEditButton;
window.mwInsertEditButton = function(parent, item) {
   if (item.imageFile == '<br>') {
      parent.appendChild(document.createElement("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.


Navigation
Links