MediaWiki talk:Common.js/Archive Sep 2007

message: I thought after the deletion of template:scrollref that it was determined that it would be too difficult to block scrollboxes from rendering in the printable layout of pages, but it seems like it would be fairly simple now: . Would someone mind implementing the change?  Any time that a div tag has the overflow flag set and obscures content, print users will not be able to see any obscured content in the present form. Doing this via templates has been disabled in Main namespace on the en wiki, but is still in use in the it wiki, as I understand it. At present, a dozen or so user and talk pages are unprintable here, but several real pages are unprintable elsewhere do to Template:scrollbox, but lord only knows how many are using subst'd equivalents or directly put in the div tag. Is there any reason not to make with the fix in the diff linked above? Thanks, MrZaiustalk 20:38, 19 July 2007 (UTC)
replies: text: That change would not be made by a sysop on this page, it'd be made by a developer on /skins-1.5/common/commonPrint.css, which is not on-wiki.  — Madman bum and angel (talk – desk) 14:23, 20 July 2007 (UTC)
replies: text: Would @media print work? GracenotesT § 22:59, 20 July 2007 (UTC)
replies: text: I'm not sure if that last comment implies a fix is possible here w/o buggin' the devs, but I believe this change should be made to MediaWiki proper, if the same problem is applicable to all other installations. Reported here: http://bugzilla.wikimedia.org/show_bug.cgi?id=10654 If I borked the description, would someone mind responding and clarifying? Thanks for all your help, MrZaiustalk 17:10, 21 July 2007 (UTC)
replies: text: The devs seem unwilling or unable to fix the problem.  Do we have a fix we can implement here? MrZaiustalk 20:51, 24 July 2007 (UTC)
replies: text:  I agree with the comments Simetrical makes at Bugzilla. If we specify a fixed height/scrollable overflow somewhere it should be done properly (e.g. use a CSS class from Common.css and specify an alterative for @media print). However, I doubt scrollboxes have any legitimate uses for the same reasons that  was deleted. Where are they still used? —Ruud 22:32, 24 July 2007 (UTC)

text: On the en wiki, primarily user pages and talk pages. On the Italian wiki, they at least were used for a handful of galleries. Furthermore, not a month goes by without editors on the en wiki popping up the raw code on articles, ignoring the  TfD. That said, I wouldn't have been surprised at all to see scrollref survive TfD if it hadn't broken printable layouts and raised accessibility concerns.  is still in use, although it too has been flagged for TfD by a nom that is solely concerned about this very issue. If it is being used correctly, great - fix it so that it can be safely used without breaking accessibility. If not, block the raw code in main and other namespaces alike. Go halfway, and this will just keep coming up over and over again. MrZaiustalk 01:00, 25 July 2007 (UTC)

text: Does that mean there's no possible rendering fix without dev involvement and no way to completely block overflow from rendering sitewide? If that's the case, seems like we're back to the bot idea and I'd better switch my keep to a delete on 's TfD. MrZaiustalk 02:22, 25 July 2007 (UTC)

text: They are used on the printable version. —Ruud 12:41, 25 July 2007 (UTC)
replies: text:  My apologies.  You are, of course, correct; I hadn't read enough of the page source.  — Madman bum and angel (talk – desk) 15:06, 30 July 2007 (UTC)
thread_title: Disable overflow in printable version of page

message: Hello, I recently tried to export the table collapse code to another wiki (wiki.xentax.com), but I can't get it to work. I have the distinct feeling that I'm missing something obvious, but I don't have the knowledge necessary to figure out what. You can see what code I exported on MediaWiki:Common.js, what CSS I've copied on MediaWiki:Common.css, and my test page. I would greatly appreciate any help, and thanks in advance! --Dinoguy1000 Talk 18:45, 4 August 2007 (UTC)
replies: text: You're using a pretty old version of MediaWiki and it doesn't use MediaWiki:Common.js. You should be able to try putting the code in MediaWiki:Monobook.js, but I'd actually recommend upgrading to the latest release of MediaWiki if possible. Mike Dillon 19:38, 4 August 2007 (UTC)

text: You are using an old version of MediaWiki which doesn't support common.js yet. Try moving the code to monobook.js. —Ruud 19:41, 4 August 2007 (UTC)
replies: text:  I was previously aware of the version of MW being used; I was not, however, aware that it doesn't support Common.js. Since it's not actually my wiki (and I don't have server-side file access), I can't update the software myself, though I have requested an upgrade of the site owner and was told that it's being worked on. In the meantime, I'll try using Monobook.js. Thanks for your help, and patience with me! --Dinoguy1000 Talk 16:42, 9 August 2007 (UTC)

text:  Hmm, it seems that it still doesn't want to work for me, despite the fact that I moved the code to MediaWiki:Monobook.js. Any suggestions? --Dinoguy1000 Talk 01:19, 12 August 2007 (UTC)
replies: text: A simple look at the JavaScript error console shows that you did not port it over entirely. It depends on other functions, such as hasClass. Make sure you have all of them in there. Use a browser that offers you access to a decent JavaScript debugger and you'll be fine. ♠ SG →Talk 01:47, 12 August 2007 (UTC)
replies: text:  All right, I copied hasClass over and it seems to be working now. If I'm still missing something, please tell me, since I really don't have much experience with debuggers (and the one I use isn't reporting any errors now). Thanks for your help! --Dinoguy1000 Talk 04:37, 17 August 2007 (UTC)
thread_title:  Exporting table collapse code 

message: For the collapsible table, it would look better and improve formatting if the square brackets were included in the show/hide link to uncollapse/collapse the table.  This is the case for the Dynamic Navigation bars, but I would like to see it extended to the collapsible table also.  One problem with not linking them is that when the text color of the header in a collapsible table is changed, the color of the square brackets changes, but not the color of the show/hide link.  Thus, whenever the text color is changed, the table looks funny.  Simply adding the brackets to the link would fix this problem and fix all of the instances where collapsible tables are used with different text colors in the title. 
Unfortunately, I'm not very familiar with this code and am not able to post the fix myself, but hopefully someone else can help modify the code to do this (it seems like a simple change).  Thanks, --CapitalR 13:26, 21 August 2007 (UTC)
replies: text: Not linking the brackets is consistent with the [edit] links and the [show]/[hide] button in the table of contents. The colour of the brackets should be the same as the textcolour of the table header, though. —Ruud 14:33, 21 August 2007 (UTC)
replies: text: Well, the unlinked brackets are ugly in the table of contents too. --David Göthberg 14:39, 21 August 2007 (UTC)

text: I could be copied over using some javascript, on the other hand I don't see any reason for people to override the default colours of navigational boxes in the first place (totally breaks when there are multiple navboxes in a single article / makes it nearly impossible to make the style skin-dependant). —Ruud 19:01, 21 August 2007 (UTC)
thread_title:  For the collapsible table, include the brackets in the show/hide link 

message: Yeah, I understand it might be a nifty little feature, but could we hold off adding it until it becomes stable and tested? The most recent edit made it unusable (pokes the error console on every page), as described here. Миша13 20:59, 21 August 2007 (UTC)
replies: text: It was the innocent looking application of a translation patch. Yep, I slipped, I try to add new translations quickly to enhance accessability for new users. Always worked before, but it is just that seemingly easy stuff that asks for trouble. Anywho, I created a staging copy now, better late than never. You are welcome to do more of the testing you asked for, but the WMA exists for 1.5 years now and it needs constant development as new features keep getting asked for. I am currently reworking the server-side part and the parts of the JS that are located on the toolserver (all on staging copies), that stuff gets a lot of testing but will eventually be put live. I need the feedback, so I have difficulties imagining a stable with, what, a release once a year? --Dschwen 21:54, 21 August 2007 (UTC)
thread_title:  Wikiminiatlas bugged? 

message: A system admin of the French wiki fr:Utilisateur:Pabix has created a template fr:Modèle:Images that allows to create slideshows on wikipedia: i.e. slideshow of  maps about the 2nd Battle of El Alamein.
The template uses some java extensions and has (so far) also been adapted for the Italian wiki it:Template:Galleria. Yesterday I tried to import it to the English Template:Scroll gallery and German wiki de:Vorlage:Scroll Gallery, but it would not work. Today I was informed by Italian wiki user it:utente:Twice25 that the follwoing java script needs to be added to either MediaWiki:Common.js or MediaWiki:Monobook.js for the template to work. Would this be possible to do? Thanks,  --noclador 00:54, 20 August 2007 (UTC)
replies: text: Strange... I tried to replace the 16th image with the 1st image and the 1st was displayed correctly... than i changed the resolution to 399px and now the 10th image does not work, but the 16th does... but all images have tge same size: 1153x1153px ???? with 404px they work now all :-) --noclador 01:12, 20 August 2007 (UTC)

text: ordinary gallery tags are totally different. The above script produces a kind of animation that allows the reader to click through the a series of images and thus to comprehend easier the dynmaics of i.e. a battle or the workings of an engine. I think that a long series of images is much more disruptive to an article than this- i.e. Second battle of El Alamein#The battle. About printing: what about animated gifs? --noclador 11:54, 20 August 2007 (UTC)
replies: text:  I would like to know if the above script will be included in the MediaWiki:Common.js or not, as without it I'm unable to include the slideshow of  maps about the 2nd Battle of El Alamein into the article Second battle of El Alamein#The battle. Any info about what the status is of the script would be appreciated. --noclador 11:45, 27 August 2007 (UTC)
thread_title:  [[template:Scroll gallery]] 

message: Nesting collapsible tables while using the autocollapse feature has been giving me some problems.  Note that in the example below (which should start out in a collapsed state), when you press the Show button, the child tables start out in uncollapsed mode, but the buttons display "show" instead of "hide".  I think that the child tables should start out in collapsed mode when the parent table is uncollapsed.  This occurs on Firefox for XP/Vista (and I think on IE also).  Can someone either show me the correct way to nest tables, or tell me if there is a problem in the collapsible code?  Thanks, --CapitalR 14:00, 22 August 2007 (UTC)
replies: text: I never designed the code with nesting in mind, and as far as I am aware it doesn't work. I'm still planning to rewrite the code to allow multiple headers in a single table which can be hidden and shown separately. Could you give any concrete examples where nesting collapsible tables would be useful? —Ruud 16:12, 22 August 2007 (UTC)
replies: text: Thanks for the reply.  I think that making multiple collapsible headers in a table would fix the problem in most cases.  I just converted about 5000 templates to use the collapsible table class, and noticed that about 30-40 of them now have nested collapsible tables, which don't quite work correctly.  One major disaster is .  This relies heavily on the nesting to collapse a giant navbox into a small bar, but when the parent navbox is uncollapsed it would be nice to just see all of the child navboxes collapsed so only one at a time can be uncollapsed manually.  --CapitalR 16:38, 22 August 2007 (UTC)
replies: text:  Oh my... that "navagation box" needs some rethinking. —Ruud 17:05, 22 August 2007 (UTC)
replies: text: Yup, I'll second that. --CapitalR 17:19, 22 August 2007 (UTC)

text: Graham87 12:11, 28 August 2007 (UTC)
thread_title:  Problem with nested collapsible tables