[wiki-lenny] nettoyage
oui maman, d'accord, je range ma chambre :) darcs-hash:20090204132117-bd074-cd83a1158528d3d12311ef48740199429c0cadf2.gz
This commit is contained in:
parent
ea0c04a871
commit
d06cc6ff81
10 changed files with 0 additions and 458 deletions
|
@ -1,308 +0,0 @@
|
||||||
//
|
|
||||||
// MoinMoin commonly used JavaScript functions
|
|
||||||
//
|
|
||||||
|
|
||||||
// We keep here the state of the search box
|
|
||||||
searchIsDisabled = false;
|
|
||||||
|
|
||||||
function searchChange(e) {
|
|
||||||
// Update search buttons status according to search box content.
|
|
||||||
// Ignore empty or whitespace search term.
|
|
||||||
var value = e.value.replace(/\s+/, '');
|
|
||||||
if (value == '' || searchIsDisabled) {
|
|
||||||
searchSetDisabled(true);
|
|
||||||
} else {
|
|
||||||
searchSetDisabled(false);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function searchSetDisabled(flag) {
|
|
||||||
// Enable or disable search
|
|
||||||
document.getElementById('fullsearch').disabled = flag;
|
|
||||||
document.getElementById('titlesearch').disabled = flag;
|
|
||||||
}
|
|
||||||
|
|
||||||
function searchFocus(e) {
|
|
||||||
// Update search input content on focus
|
|
||||||
if (e.value == search_hint) {
|
|
||||||
e.value = '';
|
|
||||||
e.className = '';
|
|
||||||
searchIsDisabled = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function searchBlur(e) {
|
|
||||||
// Update search input content on blur
|
|
||||||
if (e.value == '') {
|
|
||||||
e.value = search_hint;
|
|
||||||
e.className = 'disabled';
|
|
||||||
searchIsDisabled = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function actionsMenuInit(title) {
|
|
||||||
// Initialize action menu
|
|
||||||
for (i = 0; i < document.forms.length; i++) {
|
|
||||||
var form = document.forms[i];
|
|
||||||
if (form.className == 'actionsmenu') {
|
|
||||||
// Check if this form needs update
|
|
||||||
var div = form.getElementsByTagName('div')[0];
|
|
||||||
var label = div.getElementsByTagName('label')[0];
|
|
||||||
if (label) {
|
|
||||||
// This is the first time: remove label and do buton.
|
|
||||||
div.removeChild(label);
|
|
||||||
var dobutton = div.getElementsByTagName('input')[0];
|
|
||||||
div.removeChild(dobutton);
|
|
||||||
// and add menu title
|
|
||||||
var select = div.getElementsByTagName('select')[0];
|
|
||||||
var item = document.createElement('option');
|
|
||||||
item.appendChild(document.createTextNode(title));
|
|
||||||
item.value = 'show';
|
|
||||||
select.insertBefore(item, select.options[0]);
|
|
||||||
select.selectedIndex = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// use this instead of assigning to window.onload directly:
|
|
||||||
function addLoadEvent(func) {
|
|
||||||
// alert("addLoadEvent " + func)
|
|
||||||
var oldonload = window.onload;
|
|
||||||
if (typeof window.onload != 'function') {
|
|
||||||
window.onload = func;
|
|
||||||
} else {
|
|
||||||
window.onload = function() {
|
|
||||||
oldonload();
|
|
||||||
func();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function can_use_gui_editor() {
|
|
||||||
var sAgent = navigator.userAgent.toLowerCase() ;
|
|
||||||
|
|
||||||
// Internet Explorer
|
|
||||||
if ( sAgent.indexOf("msie") != -1 && sAgent.indexOf("mac") == -1 && sAgent.indexOf("opera") == -1 )
|
|
||||||
{
|
|
||||||
var sBrowserVersion = navigator.appVersion.match(/MSIE (.\..)/)[1] ;
|
|
||||||
return ( sBrowserVersion >= 5.5 ) ;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Gecko
|
|
||||||
if ( navigator.product == "Gecko" && navigator.productSub >= 20030210 )
|
|
||||||
return true ;
|
|
||||||
|
|
||||||
// Opera
|
|
||||||
if ( this.EnableOpera )
|
|
||||||
{
|
|
||||||
var aMatch = sAgent.match( /^opera\/(\d+\.\d+)/ ) ;
|
|
||||||
if ( aMatch && aMatch[1] >= 9.0 )
|
|
||||||
return true ;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Safari
|
|
||||||
if ( this.EnableSafari && sAgent.indexOf( 'safari' ) != -1 )
|
|
||||||
return ( sAgent.match( /safari\/(\d+)/ )[1] >= 312 ) ; // Build must be at least 312 (1.3)
|
|
||||||
|
|
||||||
return false ;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
function update_edit_links() {
|
|
||||||
// Update editlink according if if the browser is compatible
|
|
||||||
if (can_use_gui_editor() == false){
|
|
||||||
//alert("update_edit_links: can't use gui editor");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
var editlinks = document.getElementsByName("editlink");
|
|
||||||
for (i = 0; i < editlinks.length; i++) {
|
|
||||||
var link = editlinks[i];
|
|
||||||
href = link.href.replace('editor=textonly','editor=guipossible');
|
|
||||||
link.href = href;
|
|
||||||
//alert("update_edit_links: modified to guipossible");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
function add_gui_editor_links() {
|
|
||||||
// Add gui editor link after the text editor link
|
|
||||||
|
|
||||||
// If the variable is not set or browser is not compatible, exit
|
|
||||||
try {gui_editor_link_href}
|
|
||||||
catch (e) {
|
|
||||||
//alert("add_gui_editor_links: gui_editor_link_href not here");
|
|
||||||
return
|
|
||||||
}
|
|
||||||
if (can_use_gui_editor() == false){
|
|
||||||
//alert("add_gui_editor_links: can't use gui_editor");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
var all = document.getElementsByName('texteditlink');
|
|
||||||
for (i = 0; i < all.length; i++) {
|
|
||||||
var textEditorLink = all[i];
|
|
||||||
// Create a list item with a link
|
|
||||||
var guiEditorLink = document.createElement('a');
|
|
||||||
guiEditorLink.href = gui_editor_link_href;
|
|
||||||
var text = document.createTextNode(gui_editor_link_text);
|
|
||||||
guiEditorLink.appendChild(text);
|
|
||||||
var listItem = document.createElement('li')
|
|
||||||
listItem.appendChild(guiEditorLink);
|
|
||||||
// Insert in the editbar
|
|
||||||
var editbar = textEditorLink.parentNode.parentNode
|
|
||||||
var nextListItem = textEditorLink.parentNode.nextSibling;
|
|
||||||
editbar.insertBefore(listItem, nextListItem);
|
|
||||||
//alert("add_gui_editor_links: added gui editor link");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
function show_switch2gui() {
|
|
||||||
// Show switch to gui editor link if the browser is compatible
|
|
||||||
if (can_use_gui_editor() == false) return;
|
|
||||||
|
|
||||||
var switch2gui = document.getElementById('switch2gui')
|
|
||||||
if (switch2gui) {
|
|
||||||
switch2gui.style.display = 'inline';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function toggleComments() {
|
|
||||||
// Toggle visibility of every tag with class == *comment*
|
|
||||||
var all = document.getElementsByTagName('*');
|
|
||||||
for (i = 0; i < all.length; i++){
|
|
||||||
el = all[i];
|
|
||||||
if ( el.className.indexOf('comment') >= 0 ){
|
|
||||||
if ( el.style.display != 'none' ) {
|
|
||||||
el.style.display = 'none';
|
|
||||||
} else {
|
|
||||||
el.style.display = '';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function show_toggleComments() {
|
|
||||||
// Show edit bar item "ToggleComments" if inline comments exist on this page
|
|
||||||
var all = document.getElementsByTagName('*');
|
|
||||||
var count = 0;
|
|
||||||
for (i = 0; i < all.length; i++){
|
|
||||||
el = all[i];
|
|
||||||
if ( el.className.indexOf('comment') >= 0 ){
|
|
||||||
count++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (count > 0) {
|
|
||||||
for (i = 0; i < all.length; i++){
|
|
||||||
el = all[i];
|
|
||||||
if ( el.className == 'toggleCommentsButton' ){
|
|
||||||
el.style.display = 'inline';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
function load() {
|
|
||||||
// Do not name this "onload", it does not work with IE :-)
|
|
||||||
// TODO: create separate onload for each type of view and set the
|
|
||||||
// correct function name in the html.
|
|
||||||
// e.g <body onlod='editor_onload()'>
|
|
||||||
|
|
||||||
// login focus
|
|
||||||
if (document.forms['loginform']) {
|
|
||||||
document.forms['loginform'].elements['name'].focus();
|
|
||||||
}
|
|
||||||
|
|
||||||
// Page view stuff
|
|
||||||
update_edit_links();
|
|
||||||
add_gui_editor_links();
|
|
||||||
|
|
||||||
// Editor stuff
|
|
||||||
show_switch2gui();
|
|
||||||
|
|
||||||
// Enable menu item "ToggleComments" if inline comments exist
|
|
||||||
show_toggleComments();
|
|
||||||
|
|
||||||
// data browser widget
|
|
||||||
dbw_hide_buttons();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
function before_unload(evt) {
|
|
||||||
// TODO: Better to set this in the editor html, as it does not make
|
|
||||||
// sense elsehwere.
|
|
||||||
// confirmleaving is available when editing
|
|
||||||
try {return confirmleaving();}
|
|
||||||
catch (e) {}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Initialize after loading the page
|
|
||||||
addLoadEvent(load)
|
|
||||||
|
|
||||||
// Catch before unloading the page
|
|
||||||
window.onbeforeunload = before_unload
|
|
||||||
|
|
||||||
function dbw_update_search(dbw_id)
|
|
||||||
{
|
|
||||||
var table = document.getElementById(dbw_id+'table');
|
|
||||||
var cell;
|
|
||||||
var shown;
|
|
||||||
var i
|
|
||||||
var cols = table.rows[0].cells.length;
|
|
||||||
var filter = new Array();
|
|
||||||
var dofilter = new Array();
|
|
||||||
var form = document.forms[dbw_id+'form'];
|
|
||||||
|
|
||||||
for (i = 0; i < cols; i++) {
|
|
||||||
dofilter[i] = false;
|
|
||||||
if (form[dbw_id+'filter'+i]) {
|
|
||||||
dofilter[i] = true;
|
|
||||||
filter[i] = form[dbw_id+'filter'+i].value;
|
|
||||||
if (filter[i] == '[all]')
|
|
||||||
dofilter[i] = false;
|
|
||||||
if (filter[i] == '[empty]')
|
|
||||||
filter[i] = '';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
for (i = 1; i < table.rows.length; i++) {
|
|
||||||
var show = true;
|
|
||||||
for (col = 0; col < cols; col++) {
|
|
||||||
if (!dofilter[col])
|
|
||||||
continue;
|
|
||||||
|
|
||||||
cell = table.rows[i].cells[col];
|
|
||||||
|
|
||||||
if (filter[col] == '[notempty]') {
|
|
||||||
if (cell.abbr == '') {
|
|
||||||
show = false;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
} else if (filter[col] != cell.abbr) {
|
|
||||||
show = false;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (show)
|
|
||||||
table.rows[i].style.display = '';
|
|
||||||
else
|
|
||||||
table.rows[i].style.display = 'none';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function dbw_hide_buttons() {
|
|
||||||
var form;
|
|
||||||
var elem;
|
|
||||||
|
|
||||||
for (var fidx = 0; fidx < document.forms.length; fidx++) {
|
|
||||||
form = document.forms[fidx];
|
|
||||||
for (var eidx = 0; eidx < form.elements.length; eidx++) {
|
|
||||||
elem = form.elements[eidx];
|
|
||||||
name = elem.name;
|
|
||||||
if (name.substr(0,4) == 'dbw.' && name.substr(-7) == '.submit')
|
|
||||||
elem.style.display = 'none';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,45 +0,0 @@
|
||||||
var state = 0; // 0: start; 1: long count; 2: short count; 3: timeout; 4/5: blink
|
|
||||||
var counter = 0, step = 1, delay = 1;
|
|
||||||
|
|
||||||
function countdown() {
|
|
||||||
// change state if counter is down
|
|
||||||
if (counter <= 1) {
|
|
||||||
state += 1
|
|
||||||
if (state == 1) {
|
|
||||||
counter = countdown_timeout_min
|
|
||||||
step = 1
|
|
||||||
delay = 60000
|
|
||||||
}
|
|
||||||
if (state == 2) {
|
|
||||||
counter = 60
|
|
||||||
step = 5
|
|
||||||
delay = step * 1000
|
|
||||||
}
|
|
||||||
if (state == 3 || state == 5) {
|
|
||||||
window.status = countdown_lock_expire
|
|
||||||
state = 3
|
|
||||||
counter = 1
|
|
||||||
step = 1
|
|
||||||
delay = 500
|
|
||||||
}
|
|
||||||
if (state == 4) {
|
|
||||||
// blink the above text
|
|
||||||
window.status = " "
|
|
||||||
counter = 1
|
|
||||||
delay = 250
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// display changes
|
|
||||||
if (state < 3) {
|
|
||||||
var msg
|
|
||||||
if (state == 1) msg = countdown_lock_mins
|
|
||||||
if (state == 2) msg = countdown_lock_secs
|
|
||||||
window.status = msg.replace(/#/, counter)
|
|
||||||
}
|
|
||||||
counter -= step
|
|
||||||
|
|
||||||
// Set timer for next update
|
|
||||||
setTimeout("countdown()", delay);
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,80 +0,0 @@
|
||||||
//
|
|
||||||
// Bubblehelp infoboxes, (C) 2002 Klaus Knopper <infobox@knopper.net>
|
|
||||||
// You can copy/modify and distribute this code under the conditions
|
|
||||||
// of the GNU GENERAL PUBLIC LICENSE Version 2.
|
|
||||||
//
|
|
||||||
var IWIDTH=350 // Tip box width
|
|
||||||
var ie4 // Are we using Internet Explorer Version 4?
|
|
||||||
var ie5 // Are we using Internet Explorer Version 5 and up?
|
|
||||||
var kon // Are we using KDE Konqueror?
|
|
||||||
var x,y,winW,winH // Current help position and main window size
|
|
||||||
var idiv=null // Pointer to infodiv container
|
|
||||||
|
|
||||||
function nsfix(){setTimeout("window.onresize = rebrowse", 2000);}
|
|
||||||
|
|
||||||
function rebrowse(){window.location.reload();}
|
|
||||||
|
|
||||||
function hascss(){ return gettip('infodiv')?true:false }
|
|
||||||
|
|
||||||
function infoinit(){
|
|
||||||
ie4=(document.all)?true:false;
|
|
||||||
ie5=((ie4)&&((navigator.userAgent.indexOf('MSIE 5')>0)||(navigator.userAgent.indexOf('MSIE 6')>0)))?true:false;
|
|
||||||
kon=(navigator.userAgent.indexOf('konqueror')>0)?true:false;
|
|
||||||
x=0;y=0;winW=800;winH=600;
|
|
||||||
idiv=null;
|
|
||||||
document.onmousemove = mousemove;
|
|
||||||
// Workaround for just another netscape bug: Fix browser confusion on resize
|
|
||||||
// obviously conqueror has a similar problem :-(
|
|
||||||
if(kon){ nsfix() }
|
|
||||||
}
|
|
||||||
|
|
||||||
function untip(){
|
|
||||||
if(idiv) idiv.visibility="hidden";
|
|
||||||
idiv=null;
|
|
||||||
}
|
|
||||||
|
|
||||||
function gettip(name){return (document.layers&&document.layers[name])?document.layers[name]:(document.all&&document.all[name]&&document.all[name].style)?document.all[name].style:document[name]?document[name]:(document.getElementById(name)?document.getElementById(name).style:0);}
|
|
||||||
|
|
||||||
// Prepare tip boxes, but don't show them yet
|
|
||||||
function maketip(name,title,text){
|
|
||||||
if(hascss()) document.write('<div id="'+name+'" name="'+name+'" style="position:absolute; visibility:hidden; z-index:20; top:-999em; left:0px;"><table width='+IWIDTH+' class="tip"><tr><th class="tip">'+title+'</th></tr><tr><td class="tip">'+text+'</td></tr></table></div>\n');
|
|
||||||
}
|
|
||||||
|
|
||||||
function tip(name){
|
|
||||||
if(hascss()){
|
|
||||||
if(idiv) untip();
|
|
||||||
idiv=gettip(name);
|
|
||||||
if(idiv){
|
|
||||||
winW=(window.innerWidth)? window.innerWidth+window.pageXOffset-16:document.body.offsetWidth-20;
|
|
||||||
winH=(window.innerHeight)?window.innerHeight+window.pageYOffset :document.body.offsetHeight;
|
|
||||||
if(x<=0||y<=0){ // konqueror can't get mouse position
|
|
||||||
x=(winW-IWIDTH)/2+(window.pageXOffset?window.pageXOffset:0); y=(winH-50)/2+(window.pageYOffset?window.pageYOffset:0); // middle of window
|
|
||||||
}
|
|
||||||
showtip();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function showtip(){
|
|
||||||
idiv.left=(((x+IWIDTH+10)<winW)?x+12:x-IWIDTH-5)+"px"; idiv.top=(((y+90)<winH)?y+12:y-90)+"px";
|
|
||||||
idiv.visibility="visible";
|
|
||||||
// window.status="idiv="+idiv+"X:"+(idiv.left?idiv.left:"NAN")+", Y:"+(idiv.top?idiv.top:"NAN")+", x:"+x+", y:"+y;
|
|
||||||
}
|
|
||||||
|
|
||||||
function mousemove(e){
|
|
||||||
if(e) {x=e.pageX?e.pageX:e.clientX?e.clientX:0; y=e.pageY?e.pageY:e.clientY?e.clientY:0;}
|
|
||||||
else if(event) {x=event.clientX; y=event.clientY;}
|
|
||||||
else {x=0; y=0;}
|
|
||||||
if((ie4||ie5) && document.documentElement) // Workaround for scroll offset of IE
|
|
||||||
{
|
|
||||||
x+=document.documentElement.scrollLeft;
|
|
||||||
y+=document.documentElement.scrollTop;
|
|
||||||
}
|
|
||||||
if(idiv) showtip();
|
|
||||||
}
|
|
||||||
|
|
||||||
// Initialize after loading the page
|
|
||||||
addLoadEvent(infoinit)
|
|
||||||
|
|
||||||
// EOF infobox.js
|
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 565 B |
Binary file not shown.
Before Width: | Height: | Size: 6 KiB |
Binary file not shown.
Before Width: | Height: | Size: 3.8 KiB |
Binary file not shown.
Before Width: | Height: | Size: 313 B |
Binary file not shown.
Before Width: | Height: | Size: 1.7 KiB |
|
@ -1,12 +0,0 @@
|
||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<meta http-equiv="refresh" content="0;URL=moin.cgi/">
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body bgcolor="#FFFFFF" text="#000000">
|
|
||||||
Click <a href="moin.cgi">here</a> to get to the FrontPage.
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
|
|
||||||
|
|
|
@ -1,13 +0,0 @@
|
||||||
# if you want to add own robot rules, do it BEFORE the final rule matching *
|
|
||||||
|
|
||||||
User-agent: *
|
|
||||||
Crawl-delay: 20
|
|
||||||
# This has to match script url + cfg.url_prefix_action - it
|
|
||||||
# saves lots of search engine load and traffic by disallowing crawlers
|
|
||||||
# to request action related URLs.
|
|
||||||
#
|
|
||||||
# NOTE - in order to make this have any effect, you have to set
|
|
||||||
# url_prefix_action to "action", cf. HelpOnConfiguration
|
|
||||||
|
|
||||||
Disallow: /action/
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue