18,700
edits
(→Overview: we can put a man on the moon but we can't design a single set of web standards) |
(→Overview: still just adding notes as I have time to research) |
||
Line 327: | Line 327: | ||
:'''"I don't know if we can show a table and at same time hide the previous table on click event [...] That's some customization but how do you store/call actual java script functions"''' -- I would direct your attention to [[MediaWiki:Common.js]] (also, note that all the JS pages are linked to on my user page). Towards the top of Common.js is code that imports additional scripts, such as [[MediaWiki:Common.js/edit.js]], based on the type or name of the page. E.g., anyone performing an edit will have edit.js loaded for them, which does things like adding buttons to the toolbar (at least, it will when I fix it!). Does that help? --[[User:Iritscen|Iritscen]] ([[User talk:Iritscen|talk]]) 19:39, 12 November 2012 (CET) | :'''"I don't know if we can show a table and at same time hide the previous table on click event [...] That's some customization but how do you store/call actual java script functions"''' -- I would direct your attention to [[MediaWiki:Common.js]] (also, note that all the JS pages are linked to on my user page). Towards the top of Common.js is code that imports additional scripts, such as [[MediaWiki:Common.js/edit.js]], based on the type or name of the page. E.g., anyone performing an edit will have edit.js loaded for them, which does things like adding buttons to the toolbar (at least, it will when I fix it!). Does that help? --[[User:Iritscen|Iritscen]] ([[User talk:Iritscen|talk]]) 19:39, 12 November 2012 (CET) | ||
:Just a quick note, the repeating-linear-gradient property does not work for WebKit browsers. Chrome/Safari apparently need "-webkit-repeating-linear-gradient" instead. --[[User:Iritscen|Iritscen]] ([[User talk:Iritscen|talk]]) 03:31, 13 November 2012 (CET) | :Just a quick note, the repeating-linear-gradient property does not work for WebKit browsers. Chrome/Safari apparently need "-webkit-repeating-linear-gradient" instead. --[[User:Iritscen|Iritscen]] ([[User talk:Iritscen|talk]]) 03:31, 13 November 2012 (CET) | ||
:Another quick note, we would probably want to mimic the JS that enables the divhide template, as you already suggested and in line with [http://www.mwusers.com/forums/showthread.php?18647-onclick-in-wikitext&s=4573f23d960e24c3c6523e4a072b4ba9&p=61594&viewfull=1#post61594 this forum post], which means that we probably want to create a new table class (e.g. "click-table") that responds to 'onclick' events by modifying the text in a column in the table (e.g. "click-table-descrip"). But I can't figure out where the file type description text would come from. We don't really want all the description texts lodged inside the Javascript, but rather somewhere we can edit them freely. One possibility is to figure out how to copy/transclude text from a subpage, similar to the way [[Quotes/Consoles]] works, where each console quote is on a separate, editable page. --[[User:Iritscen|Iritscen]] ([[User talk:Iritscen|talk]]) 14:38, 13 November 2012 (CET) |