Last modified: 2008-11-21 18:14:27 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 T15837, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 13837 - wikibits.js fix Formating of buttons
wikibits.js fix Formating of buttons
Status: RESOLVED INVALID
Product: MediaWiki
Classification: Unclassified
General/Unknown (Other open bugs)
1.12.x
All All
: Normal enhancement (vote)
: ---
Assigned To: Brion Vibber
: patch, patch-need-review
Depends on:
Blocks: javascript
  Show dependency treegraph
 
Reported: 2008-04-24 22:46 UTC by DaSch
Modified: 2008-11-21 18:14 UTC (History)
2 users (show)

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


Attachments

Description DaSch 2008-04-24 22:46:47 UTC
I think the element formating for editbuttons in the wikibits.js is not very usefull for costumizing. It would be better when the format would be defined in CSS and not in the JavaScript directly in the Element. I've changed it this way

Index: wikibits.js
===================================================================
--- wikibits.js	(revision 33871)
+++ wikibits.js	(working copy)
@@ -347,12 +347,9 @@
 // we use it to avoid creating the toolbar where javascript is not enabled
 function mwInsertEditButton(parent, item) {
 	var image = document.createElement("img");
-	image.width = 23;
-	image.height = 22;
 	image.className = "mw-toolbar-editbutton";
 	if (item.imageId) image.id = item.imageId;
 	image.src = item.imageFile;
-	image.border = 0;
 	image.alt = item.speedTip;
 	image.title = item.speedTip;
 	image.style.cursor = "pointer";
Comment 1 Brion Vibber 2008-04-29 20:00:53 UTC
Hmm, well the problem here is that the actual images *do* have a fixed size. Removing the width and height markers may cause the page to load and lay out more slowly, as the browser must load the images or CSS to lay out the images at the proper size.

Under what circumstances would this change have visible benefits?
Comment 2 DaSch 2008-04-30 13:26:52 UTC
In my Wiki I have created a alternative Buttonset that can be used through gadget extension. The Icons in the new Buttonset are smaller then the original Buttons, so I had to remove the fixed width to make the Icons beeing shown with the right dimensions.
Comment 3 Siebrand Mazeland 2008-08-18 16:45:46 UTC
Assigned: Brion. What's the verdict: FIX or WONTFIX?
Comment 4 Brion Vibber 2008-11-21 18:14:27 UTC
Since the image URL is specified with the setup, not with the CSS, it doesn't make sense to me to split the size out to the CSS.

JS which changes the URLs (to load different images) can change the sizes as well.

Iff the images were specified via CSS, then specifying the size there as well would make sense.

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


Navigation
Links