Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Wikipedia: Mediawiki

Linebreaks in the edit toolbar?

 

 

Wikipedia mediawiki RSS feed   Index | Next | Previous | View Threaded


danb at VistaPrint

May 13, 2008, 1:43 PM

Post #1 of 2 (139 views)
Permalink
Linebreaks in the edit toolbar?

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


_______________________________________________
MediaWiki-l mailing list
MediaWiki-l[at]lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l


onekopaka at gmail

May 14, 2008, 8:50 AM

Post #2 of 2 (119 views)
Permalink
Re: Linebreaks in the edit toolbar? [In reply to]

That looks like it's an okay mod. How much have you tested it? You
could check this into Subversion, so future versions would have it.
I will create a patch for you incase you don't have the subversion
trunk version of MediaWiki.


On May 13, 2008, at 1:43 PM, Daniel Barrett wrote:

> 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
>
>
> _______________________________________________
> MediaWiki-l mailing list
> MediaWiki-l[at]lists.wikimedia.org
> https://lists.wikimedia.org/mailman/listinfo/mediawiki-l

Darren VanBuren
onekopaka[at]gmail.com
----------------------------------------------
Administrator of Onekopakaspace




_______________________________________________
MediaWiki-l mailing list
MediaWiki-l[at]lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l

Wikipedia mediawiki RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.