MediaWiki talk:Common.js/Archive Jan 2008

message: :Discussing this diff and mediazilla:12157
I'm pretty sure that code was supposed to fix this IE6 horizontal scroll bug. The code was added on 19 January 2005 by User:Tom-, he has been asked about this on his talk page a year ago but there is no answer. The way I see it, there are 3 choices:
* propose another solution (imho inlikely)
* add browser detection (combine with 2 cases below?)
* simply remove the code 
∴ AlexSm 17:30, 30 November 2007 (UTC)
replies: text: I'm going to find out what it was supposed to fix in the first place, because I see no difference with the code disabled... yet.  — Edokter • Talk •  18:23, 30 November 2007 (UTC)
replies: text: Right, nasty bug... In any case, I've put in a more robust client check, so it should not impact non-IE clients at all.  — Edokter • Talk •  23:33, 30 November 2007 (UTC)
replies: text: It looks like the document.compatMode == "CSS1Compat" part depends on <!DOCTYPE declaration in the beginning of HTML page, and can be safely removed (as long as devs keep this declaration). Also, did you check that IE7 is affected by the bug as well? And can we please combine 3 separate checks for IE into just one? ∴ AlexSm 23:51, 30 November 2007 (UTC)
replies: text: Browsing the net indicates this is a problem affecting all IE versions. I have been tinkering with the idea of restructuring common.js, but it would invlove some heavy editing; I'd have to do full inventory of all functions first and then prepare a proposal here. All in good time.  — Edokter • Talk •  00:31, 1 December 2007 (UTC)
thread_title:  Internet Explorer bug fix 

message: (If this is wrong place to ask this question, please point me to the correct place.)
Here is a demonstration of a problem with SVG files converted to PNG by the server:
Image:Dr Greg's test image source.svg|This is a test SVG file I uploaded
Image:Dr Greg's test image rendered correctly.png|This is what the image looks like correctly rendered on the same computer I used to create the image
Image:Dr Greg's test image rendered incorrectly by server.png|This is how the server software renders the image for a client that does not support SVG 
The SVG file was orginally generated by MS Visio, but I have then edited the SVG source code to try to fix the problems. There seem to be three problems: 
*"font-size" measured in em seems to be being interpreted as being measured in points
*"letter-spacing" seems to be ignored
*if "fill" is omitted it seems to default to "black" instead of "none".
Can these problems be fixed? (And will other clients have problems rendering Visio's SVG?)--Dr Greg 18:30, 30 November 2007 (UTC)
replies: text: This doesn't seem to be related to JavaScript at all (you can always check that by disabling JavaScript in your browser), so I'd say the correct place is either Wikipedia:Village pump (technical) or :mediazilla: ∴ AlexSm 23:51, 30 November 2007 (UTC)
thread_title:  More problems with SVG image rendering  

message: Hello, I am trying to add a slide-show template already operating on the French Wikipedia so that it can be used here, too. You can see a bit of background on this here.
So far, I have copied and translated the text of the French template from :fr:Template:Images to :en:Template:Slideshow, but the template relies on two functions (toggleImage and ImageGroup) in :fr:MediaWiki:Common.js. What's the procedure for requesting that these be added to :en:MediaWiki:Common.js or is there a better alternative (either for the template, or for these functions)? Sorry, but my knowledge of JavaScript and Wikipedia templates isn't up to answering these questions myself. Rupert Clayton 00:52, 4 December 2007 (UTC)
replies: text: It's a bit shady area, and it's kind of difficult to have something added to Common.js (unless you're admin and can invert it from the start by saying "I will add this unless there's an opposition"). This particular template was already suggested at Wikipedia:Village pump (proposals)/Archive 5#Image gallery and then was also mentioned at Wikipedia:Village pump (proposals)#How about Not a picture book?. In any case, the official way is to start a new discussion at Wikipedia:Village pump (proposals), good luck with that. Personally I'm inclined to weak oppose this because I think a link to a Commons gallery should be sufficient ∴ AlexSm 20:56, 4 December 2007 (UTC)
replies: text: Thanks, Alex. I have formally requested the necessary JavaScript functions at Wikipedia:Village pump (proposals)#Add a Slideshow template, based on existing functionality in French wikipedia. Anyone with suggestions or comments on this is welcome to join the discussion there. Thanks. Rupert Clayton (talk) 18:21, 5 December 2007 (UTC)
thread_title:  Adding functions to Common.js? 

message: 1. Please replace mainPageAppendCompleteListLink() with this short version
function mainPageAppendCompleteListLink() {
 addPortletLink('p-lang', 'http://meta.wikimedia.org/wiki/List_of_Wikipedias', 
  'Complete list', 'interwiki-completelist', 'Complete list of Wikipedias')
}
this also requires a change in MediaWiki:Common.css: .interwiki-completelist → #interwiki-completelist
While at it, some obvious junk can be removed as well, like , 
replies: text: Done. The parseFloat code was removed, and some other minor changes were made throughout. I added your name as a maintainer to one of the sections; the <noinclude> issues I couldn't find.... Cheers. --MZMcBride (talk) 00:55, 5 December 2007 (UTC)
replies: text: Oh, I just understood what you meant about code cleanup (Common.css, not Common.js). I'll fix it in a bit. : - ) --MZMcBride (talk) 00:56, 5 December 2007 (UTC)
thread_title:  Change in mainPageAppendCompleteListLink and removal of ts_parseFloat

message: The «fix edit summary prompt for undo» code in MediaWiki:Common.js does eliminate unnecessary prompt when you do simple undo-save, but at the same time it adds the prompt when you do undo-alter_summary-preview-save. That's because Function showEditForm in MediaWiki recreates empty wpAutoSummary on preview. See mediazilla:8912 for more info. Until devs fix that, I think the Common.js should use any other value instead of  to solve this problem ∴ AlexSm 20:15, 6 December 2007 (UTC)
replies: text: I changed the blank string (which causes problems as you mentioned) to a '1'. Tra (Talk) 21:01, 6 December 2007 (UTC)
thread_title:  fix edit summary prompt for undo