X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=skins%2Fcommon%2Fwikibits.js;h=95b2e06974cc8ebe9f5a0f5d054ecd49bc9b3aeb;hb=4f278f513d5bf24c7252732a168e3646cc5af101;hp=06bbff3aec3d6dc66c0604ae4951f80f088dacd5;hpb=dda0d206f27f1d4886cba01655153029f8fc5079;p=lhc%2Fweb%2Fwiklou.git diff --git a/skins/common/wikibits.js b/skins/common/wikibits.js index 06bbff3aec..95b2e06974 100644 --- a/skins/common/wikibits.js +++ b/skins/common/wikibits.js @@ -36,7 +36,6 @@ if (!window.onloadFuncts) { var onloadFuncts = []; } -// code that is dependent on js2 functions should use js2AddOnloadHook function addOnloadHook(hookFunct) { // Allows add-on scripts to add onload functions if(!doneOnloadHook) { @@ -350,63 +349,8 @@ function getInnerText(el) { return str; } - -/** - * Set up accesskeys/tooltips from the deprecated ta array. If doId - * is specified, only set up for that id. Note that this function is - * deprecated and will not be supported indefinitely -- use - * updateTooltipAccessKey() instead. - * - * @param mixed doId string or null - */ +/* Dummy for deprecated function */ function akeytt( doId ) { - // A lot of user scripts (and some of the code below) break if - // ta isn't defined, so we make sure it is. Explictly using - // window.ta avoids a "ta is not defined" error. - if (!window.ta) window.ta = new Array; - - // Make a local, possibly restricted, copy to avoid clobbering - // the original. - var ta; - if ( doId ) { - ta = [doId]; - } else { - ta = window.ta; - } - - // Now deal with evil deprecated ta - var watchCheckboxExists = document.getElementById( 'wpWatchthis' ) ? true : false; - for (var id in ta) { - var n = document.getElementById(id); - if (n) { - var a = null; - var ak = ''; - // Are we putting accesskey in it - if (ta[id][0].length > 0) { - // Is this object a object? If not assume it's the next child. - - if (n.nodeName.toLowerCase() == "a") { - a = n; - } else { - a = n.childNodes[0]; - } - // Don't add an accesskey for the watch tab if the watch - // checkbox is also available. - if (a && ((id != 'ca-watch' && id != 'ca-unwatch') || !watchCheckboxExists)) { - a.accessKey = ta[id][0]; - ak = ' ['+tooltipAccessKeyPrefix+ta[id][0]+']'; - } - } else { - // We don't care what type the object is when assigning tooltip - a = n; - ak = ''; - } - - if (a) { - a.title = ta[id][1]+ak; - } - } - } } var checkboxes; @@ -469,36 +413,6 @@ function checkboxClickHandler(e) { return true; } -function toggle_element_activation(ida,idb) { - if ( !document.getElementById ) { - return; - } - // Show the appropriate upload size limit message - if( idb == 'wpUploadFileURL' ) { - var e = document.getElementById( 'mw-upload-maxfilesize' ); - if( e ) e.style.display = "none"; - - var e = document.getElementById( 'mw-upload-maxfilesize-url' ); - if( e ) e.style.display = "block"; - } - if( idb == 'wpUploadFile' ) { - var e = document.getElementById( 'mw-upload-maxfilesize-url' ); - if( e ) e.style.display = "none"; - - var e = document.getElementById( 'mw-upload-maxfilesize' ); - if( e ) e.style.display = "block"; - } - document.getElementById( ida ).disabled = true; - document.getElementById( idb ).disabled = false; -} - -function toggle_element_check(ida,idb) { - if (!document.getElementById) { - return; - } - document.getElementById(ida).checked=true; - document.getElementById(idb).checked=false; -} /* Written by Jonathan Snook, http://www.snook.ca/jonathan @@ -619,8 +533,7 @@ function ts_makeSortable(table) { for (var i = 0; i < firstRow.cells.length; i++) { var cell = firstRow.cells[i]; if ((" "+cell.className+" ").indexOf(" unsortable ") == -1) { - cell.innerHTML += '  ' - + '' + '' + '