[Fusionforge-commits] r10463 - in trunk/src/plugins/wiki/www: lib themes/default

Marc-Etienne VARGENAU vargenau at libremir.placard.fr.eu.org
Mon Sep 13 20:11:39 CEST 2010


Author: vargenau
Date: 2010-09-13 20:11:39 +0200 (Mon, 13 Sep 2010)
New Revision: 10463

Added:
   trunk/src/plugins/wiki/www/themes/default/ajax-min.js
   trunk/src/plugins/wiki/www/themes/default/moacdropdown-min.js
   trunk/src/plugins/wiki/www/themes/default/sortable-min.js
   trunk/src/plugins/wiki/www/themes/default/toolbar-min.css
   trunk/src/plugins/wiki/www/themes/default/toolbar-min.js
   trunk/src/plugins/wiki/www/themes/default/toolbar.css
Modified:
   trunk/src/plugins/wiki/www/lib/WikiTheme.php
   trunk/src/plugins/wiki/www/themes/default/Makefile
   trunk/src/plugins/wiki/www/themes/default/toolbar.js
   trunk/src/plugins/wiki/www/themes/default/wikicommon.js
Log:
Phpwiki: center pop-up windows

Modified: trunk/src/plugins/wiki/www/lib/WikiTheme.php
===================================================================
--- trunk/src/plugins/wiki/www/lib/WikiTheme.php	2010-09-13 12:24:03 UTC (rev 10462)
+++ trunk/src/plugins/wiki/www/lib/WikiTheme.php	2010-09-13 18:11:39 UTC (rev 10463)
@@ -1,4 +1,4 @@
-<?php // rcs_id('$Id: WikiTheme.php 7666 2010-08-31 16:02:45Z vargenau $');
+<?php // rcs_id('$Id: WikiTheme.php 7685 2010-09-13 12:27:54Z vargenau $');
 /* Copyright (C) 2002,2004,2005,2006,2008,2009,2010 $ThePhpWikiProgrammingTeam
  *
  * This file is part of PhpWiki.
@@ -1469,7 +1469,7 @@
     // define ENABLE_DOUBLECLICKEDIT
     function initDoubleClickEdit() {
         if (!$this->HTML_DUMP_SUFFIX)
-            $this->addMoreAttr('body', 'DoubleClickEdit', HTML::Raw(" OnDblClick=\"url = document.URL; url2 = url; if (url.indexOf('?') != -1) url2 = url.slice(0, url.indexOf('?')); if ((url.indexOf('action') == -1) || (url.indexOf('action=browse') != -1)) document.location = url2 + '?action=edit';\""));
+            $this->addMoreAttr('body', 'DoubleClickEdit', HTML::Raw(" ondblclick=\"url = document.URL; url2 = url; if (url.indexOf('?') != -1) url2 = url.slice(0, url.indexOf('?')); if ((url.indexOf('action') == -1) || (url.indexOf('action=browse') != -1)) document.location = url2 + '?action=edit';\""));
     }
 
     // Immediate title search results via XMLHTML(HttpRequest)

Modified: trunk/src/plugins/wiki/www/themes/default/Makefile
===================================================================
--- trunk/src/plugins/wiki/www/themes/default/Makefile	2010-09-13 12:24:03 UTC (rev 10462)
+++ trunk/src/plugins/wiki/www/themes/default/Makefile	2010-09-13 18:11:39 UTC (rev 10463)
@@ -1,4 +1,4 @@
-# $Id: Makefile 7438 2010-05-21 09:31:51Z vargenau $
+# $Id: Makefile 7688 2010-09-13 15:05:24Z vargenau $
 #
 # themes/default/Makefile
 #
@@ -7,10 +7,11 @@
 
 CSS_SRC = IEFixes.css    phpwiki-printer.css       phpwiki.css \
 	  highlight.css  phpwiki-modern.css        phpwiki-topbottombars.css  \
+	  toolbar.css \
 	  moacdropdown/css/dropdown.css
 MAIN    = wikicommon
-JS_MAIN = wikicommon.js  sortable.js ajax.js moacdropdown.js toolbar.js
-JS_REST = ASCIIsvg.js
+JS_MAIN = wikicommon.js
+JS_REST = ASCIIsvg.js sortable.js ajax.js moacdropdown.js toolbar.js
 
 CSS_FILES = $(patsubst %.css,%-min.css,$(CSS_SRC))
 

Added: trunk/src/plugins/wiki/www/themes/default/ajax-min.js
===================================================================
--- trunk/src/plugins/wiki/www/themes/default/ajax-min.js	                        (rev 0)
+++ trunk/src/plugins/wiki/www/themes/default/ajax-min.js	2010-09-13 18:11:39 UTC (rev 10463)
@@ -0,0 +1 @@
+function showHide(a){this.init(a)}showHide.prototype.onXmlHttpLoad=function(){if(this.hXMLHttp.readyState==4){var d=this.hXMLHttp.parseError;var c=document.getElementById(this.id+"-img");if(d&&d.errorCode!=0){alert(d.reason)}else{var a=document.getElementById(this.id+"-body");var b=this.hXMLHttp.responseXML;if(b!=null){if(b.firstChild&&b.firstChild.nodeName=="xml"){b=b.firstChild.nextSibling.nextSibling}if(b.firstChild&&b.firstChild.nodeName=="html"){b=b.childNodes[1]}if(b==null){alert("showHideDone "+this.id+"\nno xml children from "+this.hXMLHttp.responseText)}var e=CreateHtmlFromXml(b);e.className="wikitext";a.appendChild(e);a.style.display="block"}else{alert("showHideDone "+this.id+"\nerror no xml from "+this.hXMLHttp.responseText)}}if(c){if(!folderArrowPath){folderArrowPath=stylepath+"images/"}c.src=folderArrowPath+"/folderArrowOpen.png"}}};showHide.prototype.init=function(b){this.id=b;this.hXMLHttp=XmlHttp.create();var a=this;this.hXMLHttp.onreadystatechange=function(){a.onXmlHttpLoad()}};var cShowHide;function CreateHtmlFromXml(a){if(a==null){return document.createElement("xml")}var d=a.nodeName;var c;if(d=="#text"){c=document.createTextNode(a.nodeValue);c.nodeValue=a.nodeValue;if(a.attributes&&(a.attributes!=null)){for(var b=0;b<a.attributes.length;b++){c.setAttribute(a.attributes[b].name,a.attributes[b].value)}}}else{c=document.createElement(d);if(a.nodeValue){c.nodeValue=a.nodeValue}if(a.attributes&&(a.attributes!=null)){for(var b=0;b<a.attributes.length;b++){c.setAttribute(a.attributes[b].name,a.attributes[b].value)}}if(a.hasChildNodes()){for(var b=0;b<a.childNodes.length;b++){c.appendChild(CreateHtmlFromXml(a.childNodes[b]))}}}return c}function showHideAsync(c,d){var a=document.getElementById(d+"-body");if(!a){alert("Error: id="+d+"-body missing.");return}if(a.hasChildNodes()){showHideFolder(d)}else{if(!folderArrowPath){folderArrowPath=stylepath+"images/"}var b=document.getElementById(d+"-img");if(b){b.src=folderArrowPath+"/folderArrowLoading.gif"}cShowHide=new showHide(d);cShowHide.hXMLHttp.open("GET",c,true);cShowHide.hXMLHttp.send(null)}}function showHideDone(b){var a=document.getElementById(b+"-body");a.parentNode.replaceChild(cShowHide.hXMLHttp.responseText,a);alert("showHideDone "+b+"\ngot "+cShowHide.hXMLHttp.responseText);showHideFolder(b)}function showHideDelayed(a){window.setTimeout("doshowHide("+a+")",400)}function doshowHide(b){document.getElementById(b).style.display="none";var a=document.getElementById("LSHighlight");if(a){a.removeAttribute("id")}};
\ No newline at end of file

Added: trunk/src/plugins/wiki/www/themes/default/moacdropdown-min.js
===================================================================
--- trunk/src/plugins/wiki/www/themes/default/moacdropdown-min.js	                        (rev 0)
+++ trunk/src/plugins/wiki/www/themes/default/moacdropdown-min.js	2010-09-13 18:11:39 UTC (rev 10463)
@@ -0,0 +1 @@
+function cBrowser(){var a=navigator.userAgent.toLowerCase();this.version=parseInt(navigator.appVersion);this.subVersion=parseFloat(navigator.appVersion);this.ns=((a.indexOf("mozilla")!=-1)&&((a.indexOf("spoofer")==-1)&&(a.indexOf("compatible")==-1)));this.ns2=(this.ns&&(this.version==2));this.ns3=(this.ns&&(this.version==3));this.ns4b=(this.ns&&(this.subVersion<4.04));this.ns4=(this.ns&&(this.version==4));this.ns5=(this.ns&&(this.version==5));this.ie=(a.indexOf("msie")!=-1);this.ie3=(this.ie&&(this.version==2));this.ie4=(this.ie&&(this.version==4)&&(a.indexOf("msie 4.")!=-1));this.ie5=(this.ie&&(this.version==4)&&(a.indexOf("msie 5.0")!=-1));this.ie55=(this.ie&&(this.version==4)&&(a.indexOf("msie 5.5")!=-1));this.ie6=(this.ie&&(this.version==4)&&(a.indexOf("msie 6.0")!=-1));this.op3=(a.indexOf("opera")!=-1);this.win=(a.indexOf("win")!=-1);this.mac=(a.indexOf("mac")!=-1);this.unix=(a.indexOf("x11")!=-1);this.name=navigator.appName;this.dom=this.ns5||this.ie5||this.ie55||this.ie6}var bw=new cBrowser();cDomEvent={e:null,type:"",button:0,key:0,x:0,y:0,pagex:0,pagey:0,target:null,from:null,to:null};cDomEvent.init=function(a){if(window.event){a=window.event}this.e=a;this.type=a.type;this.button=(a.which)?a.which:a.button;this.key=(a.which)?a.which:a.keyCode;this.target=(a.srcElement)?a.srcElement:a.originalTarget;this.currentTarget=(a.currentTarget)?a.currentTarget:a.srcElement;this.from=(a.originalTarget)?a.originalTarget:(a.fromElement)?a.fromElement:null;this.to=(a.currentTarget)?a.currentTarget:(a.toElement)?a.toElement:null;this.x=(a.layerX)?a.layerX:(a.offsetX)?a.offsetX:null;this.y=(a.layerY)?a.layerY:(a.offsetY)?a.offsetY:null;this.screenX=a.screenX;this.screenY=a.screenY;this.pageX=(a.pageX)?a.pageX:a.x+document.body.scrollLeft;this.pageY=(a.pageY)?a.pageY:a.y+document.body.scrollTop};cDomEvent.getEvent=function(a){if(window.event){a=window.event}return{e:a,type:a.type,button:(a.which)?a.which:a.button,key:(a.which)?a.which:a.keyCode,target:(a.srcElement)?a.srcElement:a.originalTarget,currentTarget:(a.currentTarget)?a.currentTarget:a.srcElement,from:(a.originalTarget)?a.originalTarget:(a.fromElement)?a.fromElement:null,to:(a.currentTarget)?a.currentTarget:(a.toElement)?a.toElement:null,x:(a.layerX)?a.layerX:(a.offsetX)?a.offsetX:null,y:(a.layerY)?a.layerY:(a.offsetY)?a.offsetY:null,screenX:a.screenX,screenY:a.screenY,pageX:(a.pageX)?a.pageX:(a.clientX+(document.documentElement.scrollLeft||document.body.scrollLeft)),pageY:(a.pageY)?a.pageY:(a.clientY+(document.documentElement.scrollTop||document.body.scrollTop))}};cDomEvent.cancelEvent=function(a){if(a.preventDefault){a.preventDefault()}a.returnValue=false;a.cancelBubble=true;return false};cDomEvent.addEvent=function(hElement,sEvent,handler,bCapture){if(hElement.addEventListener){hElement.addEventListener(sEvent,handler,bCapture);return true}else{if(hElement.attachEvent){return hElement.attachEvent("on"+sEvent,handler)}else{if(document.all||hElement.captureEvents){if(hElement.captureEvents){eval("hElement.captureEvents( Event."+sEvent.toUpperCase()+" )")}eval("hElement.on"+sEvent+" = "+handler)}else{alert("Not implemented yet!")}}}};cDomEvent.encapsulateEvent=function(a){return function(b){b=cDomEvent.getEvent(b);a.call(b.target,b.e)}};cDomEvent.addEvent2=function(c,d,a,b){if(c){if(c.addEventListener){c.addEventListener(d,cDomEvent.encapsulateEvent(a),b);return true}else{if(c.attachEvent){return c.attachEvent("on"+d,cDomEvent.encapsulateEvent(a))}else{alert("Not implemented yet!")}}}else{}};cDomEvent.addCustomEvent2=function(b,c,a){if(b){b[c]=a}else{}};cDomEvent.removeEvent=function(hElement,sEvent,handler,bCapture){if(hElement.addEventListener){hElement.removeEventListener(sEvent,handler,bCapture);return true}else{if(hElement.attachEvent){return hElement.detachEvent("on"+sEvent,handler)}else{if(document.all||hElement.captureEvents){eval("hElement.on"+sEvent+" = null")}else{alert("Not implemented yet!")}}}};function MouseButton(){if(document.layers){this.left=1;this.middle=2;this.right=3}else{if(document.all){this.left=1;this.middle=4;this.right=2}else{this.left=0;this.middle=1;this.right=2}}}var MB=new MouseButton();if(document.ELEMENT_NODE==null){document.ELEMENT_NODE=1;document.TEXT_NODE=3}function getSubNodeByName(a,f){if(a!=null){var c=0;var e=0;var b=a.childNodes;var d=null;while(e<b.length){d=b.item(e++);if((d.nodeType==1)&&(d.nodeName.toLowerCase()==f)){return d}}}return null}function getPrevNodeSibling(a){if(a!=null){do{a=a.previousSibling}while(a!=null&&a.nodeType!=1);return a}}function getNextNodeSibling(a){if(a!=null){do{a=a.nextSibling}while(a!=null&&a.nodeType!=1);return a}}function getLastSubNodeByName(a,g){if(a!=null){var c=0;var f=0;var b=a.childNodes;var d=null;var e=b.length-1;while(e>=0){d=b.item(e);if((d.nodeType==1)&&(d.nodeName.toLowerCase()==g)){return d}e--}}return null}function getSubNodeByProperty(hNode,sProperty,sPropValue){if(hNode!=null){var nNc=0;var nC=0;var hNodeChildren=hNode.childNodes;var hCNode=null;var sAttribute;var hProp;sPropValue=sPropValue.toLowerCase();while(nC<hNodeChildren.length){hCNode=hNodeChildren.item(nC++);if(hCNode.nodeType==document.ELEMENT_NODE){hProp=eval("hCNode."+sProperty);if(typeof(sPropValue)!="undefined"){if(hProp.toLowerCase()==sPropValue){return hCNode}}else{return hCNode}}nNc++}}return null}function findAttribute(a,c){c=c.toLowerCase();for(var b=0;b<a.attributes.length;b++){if(a.attributes.item(b).nodeName.toLowerCase()==c){return a.attributes.item(b).nodeValue}}return null}function getSubNodeByAttribute(b,f,e){if(b!=null){var d=0;var h=0;var c=b.childNodes;var g=null;var a;e=e.toLowerCase();while(h<c.length){g=c.item(h++);if(g.nodeType==document.ELEMENT_NODE){a=g.getAttribute(f);if(a&&a.toLowerCase()==e){return g}}d++}}return null}function getLastSubNodeByAttribute(a,e,d){if(a!=null){var c=0;var h=0;var b=a.childNodes;var f=null;var g=b.length-1;while(g>=0){f=b.item(g);if(f.nodeType==document.ELEMENT_NODE){sAttribute=f.getAttribute(e);if(sAttribute&&sAttribute.toLowerCase()==d){return f}}g--}}return null}function getParentByTagName(a,b){while((a.tagName)&&!(/(body|html)/i.test(a.tagName))){if(a.tagName==b){return a}a=a.parentNode}return null}function getParentByAttribute(a,d,b){while((a.tagName)&&!(/(body|html)/i.test(a.tagName))){var c=a.getAttribute(d);if(c!=null&&c.toString().length>0){if(b!==null){if(c==b){return a}}else{return a}}a=a.parentNode}return null}function getParentByProperty(hNode,sProperty,sPropValue){while((hNode.tagName)&&!(/(body|html)/i.test(hNode.tagName))){var hProp=eval("hNode."+sProperty);if(hProp!=null&&hProp.toString().length>0){if(sPropValue!==null){if(hProp==sPropValue){return hNode}}else{return hNode}}hNode=hNode.parentNode}return null}function getNodeText(a){if(a==null){return""}var b;if(a.hasChildNodes()){b=a.childNodes.item(0).nodeValue}else{b=a.text}return b}function cDomExtension(a,b,c){this.hParent=a;this.aSelectors=b;this.hInitFunction=c}cDomExtensionManager={aExtensions:new Array()};cDomExtensionManager.register=function(a){cDomExtensionManager.aExtensions.push(a)};cDomExtensionManager.initSelector=function(f,i,d){var a;var c;var b;var h;var e;a=/([a-z0-9_]*)\[?([^\]]*)\]?/i;c=/([a-z0-9_]*)([\*\^\$]?)(=?)(([a-z0-9_=]*))/i;if(a.test(i)&&!/[@#\.]/.test(i)){b=a.exec(i);if(b[1]!=""){g=f.getElementsByTagName(b[1].toLowerCase());for(nI=0;nI<g.length;nI++){g[nI].markExt=true}for(nI=0;nI<g.length;nI++){if(!g[nI].markExt){continue}else{g[nI].markExt=false}if(b[2]==""){if(g[nI].tagName.toLowerCase()==b[1].toLowerCase()){d(g[nI])}}else{h=c.exec(b[2]);if(h[1]=="class"){e=g[nI].className}else{e=g[nI].getAttribute(h[1])}if(e!=null&&e.length>0){if(h[3]=="="){if(h[2]==""){if(e==h[4]){d(g[nI])}}else{switch(h[2]){case"^":if(e.indexOf(h[4])==0){d(g[nI])}break;case"$":if(e.lastIndexOf(h[4])==e.length-h[4].length){d(g[nI])}break;case"*":if(e.indexOf(h[4])>=0){d(g[nI])}break}}}else{d(g[nI])}}}}return}}a=/([a-z0-9_]*)([\.#@]?)([a-z0-9_=~]*)/i;c=/([a-z0-9_]*)([=~])?([a-z0-9_]*)/i;b=a.exec(i);if(b[1]!=""){var g=f.getElementsByTagName(b[1]);for(nI=0;nI<g.length;nI++){g[nI].markExt=true}for(nI=0;nI<g.length;nI++){if(!g[nI].markExt){continue}else{g[nI].markExt=false}if(b[2]!=""){switch(b[2]){case".":if(g[nI].className==b[3]){d(g[nI])}break;case"#":if(g[nI].id==b[3]){d(g[nI])}break;case"@":h=c.exec(b[3]);e=g[nI].getAttribute(h[1]);if(e!=null&&e.length>0){if(h[3]!=""){if(h[2]=="="){if(e==h[3]){d(g[nI])}}else{if(e.indexOf(h[3])>=0){d(g[nI])}}}else{d(g[nI])}}break}}}}};cDomExtensionManager.initialize=function(){var d=null;var c;for(var a in cDomExtensionManager.aExtensions){c=cDomExtensionManager.aExtensions[a].aSelectors;for(var b in c){cDomExtensionManager.initSelector(cDomExtensionManager.aExtensions[a].hParent,c[b],cDomExtensionManager.aExtensions[a].hInitFunction)}}};if(window.addEventListener){window.addEventListener("load",cDomExtensionManager.initialize,false)}else{if(window.attachEvent){window.attachEvent("onload",cDomExtensionManager.initialize)}}function cDomObject(a){if(bw.dom||bw.ie){this.hElement=document.getElementById(a);this.hStyle=this.hElement.style}}cDomObject.prototype.getWidth=function(){return cDomObject.getWidth(this.hElement)};cDomObject.getWidth=function(b){if(b.currentStyle){var a=parseInt(b.currentStyle.width);if(isNaN(a)){return parseInt(b.offsetWidth)}else{return a}}else{return parseInt(b.offsetWidth)}};cDomObject.prototype.getHeight=function(){return cDomObject.getHeight(this.hElement)};cDomObject.getHeight=function(b){if(b.currentStyle){var a=parseInt(b.currentStyle.height);if(isNaN(a)){return parseInt(b.offsetHeight)}else{return a}}else{return parseInt(b.offsetHeight)}};cDomObject.prototype.getLeft=function(){return cDomObject.getLeft(this.hElement)};cDomObject.getLeft=function(a){return parseInt(a.offsetLeft)};cDomObject.prototype.getTop=function(){return cDomObject.getTop(this.hElement)};cDomObject.getTop=function(a){return parseInt(a.offsetTop)};cDomObject.getOffsetParam=function(hElement,sParam,hLimitParent){var nRes=0;if(hLimitParent==null){hLimitParent=document.body.parentElement}while(hElement!=hLimitParent){nRes+=eval("hElement."+sParam);if(!hElement.offsetParent){break}hElement=hElement.offsetParent}return nRes};cDomObject.getScrollOffset=function(hElement,sParam,hLimitParent){nRes=0;if(hLimitParent==null){hLimitParent=document.body.parentElement}while(hElement!=hLimitParent){nRes+=eval("hElement.scroll"+sParam);if(!hElement.offsetParent){break}hElement=hElement.parentNode}return nRes};function getDomDocumentPrefix(){if(getDomDocumentPrefix.prefix){return getDomDocumentPrefix.prefix}var c=["MSXML2","Microsoft","MSXML","MSXML3"];var d;for(var b=0;b<c.length;b++){try{d=new ActiveXObject(c[b]+".DomDocument");return getDomDocumentPrefix.prefix=c[b]}catch(a){}}throw new Error("Could not find an installed XML parser")}function getXmlHttpPrefix(){if(getXmlHttpPrefix.prefix){return getXmlHttpPrefix.prefix}var c=["MSXML2","Microsoft","MSXML","MSXML3"];var d;for(var b=0;b<c.length;b++){try{d=new ActiveXObject(c[b]+".XmlHttp");return getXmlHttpPrefix.prefix=c[b]}catch(a){}}throw new Error("Could not find an installed XML parser")}function XmlHttp(){}XmlHttp.create=function(){try{if(window.XMLHttpRequest){var b=new XMLHttpRequest();if(b.readyState==null){b.readyState=1;b.addEventListener("load",function(){b.readyState=4;if(typeof b.onreadystatechange=="function"){b.onreadystatechange()}},false)}return b}if(window.ActiveXObject){return new ActiveXObject(getXmlHttpPrefix()+".XmlHttp")}}catch(a){}throw new Error("Your browser does not support XmlHttp objects")};function XmlDocument(){}XmlDocument.create=function(){try{if(document.implementation&&document.implementation.createDocument){var b=document.implementation.createDocument("","",null);if(b.readyState==null){b.readyState=1;b.addEventListener("load",function(){b.readyState=4;if(typeof b.onreadystatechange=="function"){b.onreadystatechange()}},false)}return b}if(window.ActiveXObject){return new ActiveXObject(getDomDocumentPrefix()+".DomDocument")}}catch(a){}throw new Error("Your browser does not support XmlDocument objects")};if(window.DOMParser&&window.XMLSerializer&&window.Node&&Node.prototype&&Node.prototype.__defineGetter__){Document.prototype.loadXML=function(b){var c=(new DOMParser()).parseFromString(b,"text/xml");while(this.hasChildNodes()){this.removeChild(this.lastChild)}for(var a=0;a<c.childNodes.length;a++){this.appendChild(this.importNode(c.childNodes[a],true))}};Document.prototype.__defineGetter__("xml",function(){return(new XMLSerializer()).serializeToString(this)})}function cAutocomplete(a){this.init(a)}var xmlrpc_url;cAutocomplete.CS_NAME="Autocomplete component";cAutocomplete.CS_OBJ_NAME="AC_COMPONENT";cAutocomplete.CS_LIST_PREFIX="ACL_";cAutocomplete.CS_BUTTON_PREFIX="ACB_";cAutocomplete.CS_INPUT_PREFIX="AC_";cAutocomplete.CS_HIDDEN_INPUT_PREFIX="ACH_";cAutocomplete.CS_INPUT_CLASSNAME="dropdown";cAutocomplete.CB_AUTOINIT=true;cAutocomplete.CB_AUTOCOMPLETE=false;cAutocomplete.CB_FORCECORRECT=false;cAutocomplete.CB_MATCHSUBSTRING=false;cAutocomplete.CS_SEPARATOR=",";cAutocomplete.CS_ARRAY_SEPARATOR=",";cAutocomplete.CB_MATCHSTRINGBEGIN=true;cAutocomplete.CN_OFFSET_TOP=2;cAutocomplete.CN_OFFSET_LEFT=-1;cAutocomplete.CN_LINE_HEIGHT=19;cAutocomplete.CN_NUMBER_OF_LINES=10;cAutocomplete.CN_HEIGHT_FIX=2;cAutocomplete.CN_CLEAR_TIMEOUT=300;cAutocomplete.CN_SHOW_TIMEOUT=400;cAutocomplete.CN_REMOTE_SHOW_TIMEOUT=1000;cAutocomplete.CN_MARK_TIMEOUT=400;cAutocomplete.hListDisplayed=null;cAutocomplete.nCount=0;cAutocomplete.autoInit=function(){var a=0;var f=null;var c;var g=document.getElementsByTagName("INPUT").length;for(a=0;a<g;a++){if(document.getElementsByTagName("INPUT")[a].type.toLowerCase()=="text"){c=document.getElementsByTagName("INPUT")[a].getAttribute("acdropdown");if(c!=null&&c.length>0){if(document.getElementsByTagName("INPUT")[a].id==null||document.getElementsByTagName("INPUT")[a].id.length==0){document.getElementsByTagName("INPUT")[a].id=cAutocomplete.CS_OBJ_NAME+cAutocomplete.nCount}f=new cAutocomplete(document.getElementsByTagName("INPUT")[a].id)}}}var b=document.getElementsByTagName("TEXTAREA").length;for(a=0;a<b;a++){c=document.getElementsByTagName("TEXTAREA")[a].getAttribute("acdropdown");if(c!=null&&c.length>0){if(document.getElementsByTagName("TEXTAREA")[a].id==null||document.getElementsByTagName("TEXTAREA")[a].id.length==0){document.getElementsByTagName("TEXTAREA")[a].id=cAutocomplete.CS_OBJ_NAME+cAutocomplete.nCount}f=new cAutocomplete(document.getElementsByTagName("TEXTAREA")[a].id)}}var e=document.getElementsByTagName("SELECT").length;var d=null;for(a=0;a<e;a++){d=document.getElementsByTagName("SELECT")[a];c=d.getAttribute("acdropdown");if(c!=null&&c.length>0){if(d.id==null||d.id.length==0){d.id=cAutocomplete.CS_OBJ_NAME+cAutocomplete.nCount}f=new cAutocomplete(d.id);e--;a--}}};if(cAutocomplete.CB_AUTOINIT){if(window.attachEvent){window.attachEvent("onload",cAutocomplete.autoInit)}else{if(window.addEventListener){window.addEventListener("load",cAutocomplete.autoInit,false)}}}cAutocomplete.prototype.init=function(sInputId){this.bDebug=false;this.sInputId=sInputId;this.sListId=cAutocomplete.CS_LIST_PREFIX+sInputId;this.sObjName=cAutocomplete.CS_OBJ_NAME+"_obj_"+(cAutocomplete.nCount++);this.hObj=this.sObjName;this.hActiveSelection=null;this.nSelectedItemIdx=-1;this.sLastActiveValue="";this.sActiveValue="";this.bListDisplayed=false;this.nItemsDisplayed=0;this.bAssociative=true;this.sHiddenInputId=null;this.bHasButton=false;this.aData=null;this.aSearchData=new Array();this.bSorted=false;this.nLastMatchLength=0;this.bForceCorrect=cAutocomplete.CB_FORCECORRECT;var sForceCorrect=document.getElementById(this.sInputId).getAttribute("autocomplete_forcecorrect");if(sForceCorrect!=null&&sForceCorrect.length>0){this.bForceCorrect=eval(sForceCorrect)}this.bMatchBegin=cAutocomplete.CB_MATCHSTRINGBEGIN;var sMatchBegin=document.getElementById(this.sInputId).getAttribute("autocomplete_matchbegin");if(sMatchBegin!=null&&sMatchBegin.length>0){this.bMatchBegin=eval(sMatchBegin)}this.bMatchSubstring=cAutocomplete.CB_MATCHSUBSTRING;var sMatchSubstring=document.getElementById(this.sInputId).getAttribute("autocomplete_matchsubstring");if(sMatchSubstring!=null&&sMatchSubstring.length>0){this.bMatchSubstring=eval(sMatchSubstring)}this.bAutoComplete=cAutocomplete.CB_AUTOCOMPLETE;this.bAutocompleted=false;var sAutoComplete=document.getElementById(this.sInputId).getAttribute("autocomplete_complete");if(sAutoComplete!=null&&sAutoComplete.length>0){this.bAutoComplete=eval(sAutoComplete)}this.formatOptions=null;var sFormatFunction=document.getElementById(this.sInputId).getAttribute("autocomplete_format");if(sFormatFunction!=null&&sFormatFunction.length>0){this.formatOptions=eval(sFormatFunction)}this.onSelect=null;var sOnSelectFunction=document.getElementById(this.sInputId).getAttribute("autocomplete_onselect");if(sOnSelectFunction!=null&&sOnSelectFunction.length>0){this.onSelect=eval(sOnSelectFunction)}if(this.getListArrayType()=="url"||this.getListArrayType()=="xmlrpc"){this.bAssociative=false;this.bRemoteList=true;this.sListURL=this.getListURL();this.hXMLHttp=XmlHttp.create();this.bXMLRPC=(this.getListArrayType()=="xmlrpc")}else{this.bRemoteList=false}var sAssociative=document.getElementById(this.sInputId).getAttribute("autocomplete_assoc");if(sAssociative!=null&&sAssociative.length>0){this.bAssociative=eval(sAssociative)}this.initListArray();this.initListContainer();this.initInput();eval(this.hObj+"= this")};cAutocomplete.prototype.initInput=function(){var g=document.getElementById(this.sInputId);g.hAutocomplete=this;var c=document.getElementById(this.sListId);c.hAutocomplete=this;var i=g.offsetWidth;if(!i||i==0){var f=g.cloneNode(true);f.style.position="absolute";f.style.top="-1000px";document.body.appendChild(f);var i=f.offsetWidth;document.body.removeChild(f)}var d=g.name;var e=g.form;var n=false;var h=g.value;var k=g.type.toLowerCase()=="text"?g.value:"";var b=g.getAttribute("autocomplete_button");if(b!=null&&b.length>0){n=true}if(g.type.toLowerCase()=="select-one"){n=true;if(g.selectedIndex>=0){h=g.options[g.selectedIndex].value;k=g.options[g.selectedIndex].text}}if(e){var j=document.createElement("INPUT");j.id=cAutocomplete.CS_HIDDEN_INPUT_PREFIX+this.sInputId;j.type="hidden";e.appendChild(j);if(this.bAssociative){j.name=d;g.name=cAutocomplete.CS_INPUT_PREFIX+d}else{j.name=cAutocomplete.CS_INPUT_PREFIX+d}j.value=h;this.sHiddenInputId=j.id}if(n){this.bHasButton=true;var l=document.createElement("DIV");l.className="acinputContainer";l.style.width=i;var a=document.createElement("INPUT");a.id=cAutocomplete.CS_BUTTON_PREFIX+this.sInputId;a.type="button";a.className="button";a.tabIndex=g.tabIndex+1;a.hAutocomplete=this;var m=document.createElement("INPUT");if(this.bAssociative){m.name=cAutocomplete.CS_INPUT_PREFIX+d}else{m.name=d}m.type="text";m.value=k;m.style.width=i-22;m.className=cAutocomplete.CS_INPUT_CLASSNAME;m.tabIndex=g.tabIndex;m.hAutocomplete=this;l.appendChild(m);l.appendChild(a);g.parentNode.replaceChild(l,g);m.id=this.sInputId;g=m}if(g.attachEvent){g.attachEvent("onkeyup",cAutocomplete.onInputKeyUp);g.attachEvent("onkeyup",cAutocomplete.saveCaretPosition);g.attachEvent("onkeydown",cAutocomplete.onInputKeyDown);g.attachEvent("onblur",cAutocomplete.onInputBlur);g.attachEvent("onfocus",cAutocomplete.onInputFocus);if(a){a.attachEvent("onclick",cAutocomplete.onButtonClick)}}else{if(g.addEventListener){g.addEventListener("keyup",cAutocomplete.onInputKeyUp,false);g.addEventListener("keyup",cAutocomplete.saveCaretPosition,false);g.addEventListener("keydown",cAutocomplete.onInputKeyDown,false);g.addEventListener("keypress",cAutocomplete.onInputKeyPress,false);g.addEventListener("blur",cAutocomplete.onInputBlur,false);g.addEventListener("focus",cAutocomplete.onInputFocus,false);if(a){a.addEventListener("click",cAutocomplete.onButtonClick,false)}}}g.setAttribute("autocomplete","OFF");if(e){if(e.attachEvent){e.attachEvent("onsubmit",cAutocomplete.onFormSubmit);if(this.bDebug){this.debug("attachEvent added")}}else{if(e.addEventListener){e.addEventListener("submit",cAutocomplete.onFormSubmit,false);if(this.bDebug){this.debug("addEventListener")}}}}};cAutocomplete.prototype.initListContainer=function(){var b=document.getElementById(this.sInputId);var e=document.createElement("DIV");e.className="autocomplete_holder";e.id=this.sListId;e.style.zIndex=10000+cAutocomplete.nCount;e.hAutocomplete=this;var d=document.createElement("DIV");d.className="autocomplete_firstborder";var c=document.createElement("DIV");c.className="autocomplete_secondborder";var a=document.createElement("UL");a.className="autocomplete";c.appendChild(a);d.appendChild(c);e.appendChild(d);document.body.appendChild(e);if(e.attachEvent){e.attachEvent("onblur",cAutocomplete.onListBlur);e.attachEvent("onfocus",cAutocomplete.onListFocus)}else{if(b.addEventListener){e.addEventListener("blur",cAutocomplete.onListBlur,false);e.addEventListener("focus",cAutocomplete.onListFocus,false)}}if(e.attachEvent){e.attachEvent("onclick",cAutocomplete.onItemClick)}else{if(e.addEventListener){e.addEventListener("click",cAutocomplete.onItemClick,false)}}};cAutocomplete.prototype.createList=function(){var f=document.getElementById(this.sInputId);var a=document.getElementById(this.sListId);var k=a.getElementsByTagName("UL")[0];if(k){k=k.parentNode.removeChild(k);while(k.hasChildNodes()){k.removeChild(k.childNodes[0])}}var j=null;var h=null;var e=null;var l=null;var d=this.aData;var g=0;var b;for(e in d){l=d[e];j=document.createElement("LI");h=document.createElement("A");h.setAttribute("itemvalue",e);var c=l.split(cAutocomplete.CS_ARRAY_SEPARATOR);if(c.length>1){this.aData[e]=c[0];h.setAttribute("itemdata",l.substring(l.indexOf(cAutocomplete.CS_ARRAY_SEPARATOR)+1));b=c[0]}else{b=l}h.href="#";h.appendChild(document.createTextNode(b));h.realText=b;if(g==this.nSelectedItemIdx){this.hActiveSelection=h;this.hActiveSelection.className="selected"}j.appendChild(h);k.appendChild(j);this.aSearchData[g++]=b.toLowerCase()}var i=a.firstChild.firstChild;i.appendChild(k);this.bListUpdated=false};cAutocomplete.prototype.initListArray=function(){var hInput=document.getElementById(this.sInputId);var hArr=null;if(hInput.type.toLowerCase()=="select-one"){hArr=new Object();for(var nI=0;nI<hInput.options.length;nI++){hArrKey=hInput.options.item(nI).value;sArrEl=hInput.options.item(nI).text;hArr[hArrKey]=sArrEl;if(hInput.options.item(nI).selected){this.nSelectedItemIdx=nI}}}else{var sAA=hInput.getAttribute("autocomplete_list");var sAAS=hInput.getAttribute("autocomplete_list_sort");var sArrayType=this.getListArrayType();switch(sArrayType){case"array":hArr=eval(sAA.substring(6));break;case"list":hArr=new Array();var hTmpArray=sAA.substring(5).split("|");var aValueArr;for(hKey in hTmpArray){aValueArr=hTmpArray[hKey].split(cAutocomplete.CS_ARRAY_SEPARATOR);if(aValueArr.length==1){hArr[hKey]=hTmpArray[hKey];this.bAssociative=false}else{hArr[aValueArr[0]]=aValueArr[1]}}break}if(sAAS!=null&&eval(sAAS)){this.bSorted=true;this.aData=hArr.sort();hArr=hArr.sort()}}this.setArray(hArr)};cAutocomplete.prototype.setArray=function(sArray){if(typeof sArray=="string"){this.aData=eval(sArray)}else{this.aData=sArray}this.bListUpdated=true};cAutocomplete.prototype.setListArray=function(a){this.setArray(a);this.updateAndShowList()};cAutocomplete.prototype.getListArrayType=function(){var b=document.getElementById(this.sInputId);var a=b.getAttribute("autocomplete_list");if(a!=null&&a.length>0){if(a.indexOf("array:")>=0){return"array"}else{if(a.indexOf("list:")>=0){return"list"}else{if(a.indexOf("url:")>=0){return"url"}else{if(a.indexOf("xmlrpc:")>=0){return"xmlrpc"}}}}}};cAutocomplete.prototype.getListURL=function(){var b=document.getElementById(this.sInputId);var a=b.getAttribute("autocomplete_list");if(a!=null&&a.length>0){if(a.indexOf("url:")>=0){return a.substring(4)}if(a.indexOf("xmlrpc:")>=0){return a.substring(7)}}};cAutocomplete.prototype.setListURL=function(a){this.sListURL=a};cAutocomplete.prototype.onXmlHttpLoad=function(){if(this.hXMLHttp.readyState==4){var a=this.hXMLHttp.parseError;if(a&&a.errorCode!=0){alert(a.reason)}else{this.afterRemoteLoad()}}};cAutocomplete.prototype.onXMLRPCHttpLoad=function(){if(this.hXMLHttp.readyState==4){var a=this.hXMLHttp.parseError;if(a&&a.errorCode!=0){alert(a.reason)}else{this.afterRemoteLoadXMLRPC()}}};cAutocomplete.prototype.loadXMLRPCListArray=function(){var f=this.sListURL;var i=data_path+"/RPC2.php";var h=f.split(" ");var g=h[0];var b=this.getStringForAutocompletion(this.sActiveValue,this.nInsertPoint);b=b.replace(/^\s/,"");b=b.replace(/\s$/,"");if(g.indexOf("?")>0){g=g.replace("/^.+?/","");f=f.replace("/?.+$/","")}else{f=i}if(g.length<1){var d=document.getElementById(this.sInputId);d.value=this.sActiveValue;return}var c="<?xml version='1.0' encoding=\"utf-8\" ?>\n";c+="<methodCall><methodName>"+g+"</methodName>\n";if(h.length<=1){c+="<params/>\n"}else{c+="<params>\n";for(var e=1;e<h.length;e++){var j=h[e];if(j.indexOf("[S]")>=0){j=j.replace("[S]",b)}c+="<param><value><string>";c+=j;c+="</string></value></param>\n"}c+="</params>\n"}c+="</methodCall>";if(this.bDebug){this.debug('url: "'+f+'" sRequest: "'+c.substring(20)+'"')}this.hXMLHttp.open("POST",f,true);var a=this;this.hXMLHttp.onreadystatechange=function(){a.onXMLRPCHttpLoad()};this.hXMLHttp.send(c)};cAutocomplete.prototype.loadListArray=function(){var b=this.sListURL;var a=this.getStringForAutocompletion(this.sActiveValue,this.nInsertPoint);a=a.replace(/^\s/,"");a=a.replace(/\s$/,"");if(b.indexOf("[S]")>=0){b=b.replace("[S]",a)}else{b+=this.sActiveValue}this.hXMLHttp.open("GET",b,true);var c=this;this.hXMLHttp.onreadystatechange=function(){c.onXmlHttpLoad()};this.hXMLHttp.send(null)};cAutocomplete.prototype.afterRemoteLoad=function(){var d=document.getElementById(this.sInputId);var c=new Array();var b=this.hXMLHttp.responseText.split("|");var a;for(hKey in b){a=b[hKey].split(cAutocomplete.CS_ARRAY_SEPARATOR);if(a.length==1){c[hKey]=b[hKey]}else{c[a[0]]=b[hKey].substr(b[hKey].indexOf(cAutocomplete.CS_ARRAY_SEPARATOR)+1)}}d.className="";d.readonly=false;d.value=this.sActiveValue;this.setListArray(c)};cAutocomplete.prototype.afterRemoteLoadXMLRPC=function(){var d=document.getElementById(this.sInputId);var b=new Array();sResult=this.hXMLHttp.responseText;if(this.bDebug){this.debug("response: "+sResult.substring(70,190))}sResult.replace("\n","");sResult.replace("\r","");var e=0;var c=sResult.indexOf("<string>");while(c>=0){var a;sResult=sResult.substring(c+8);a=sResult.indexOf("</string>");b[e]=sResult.substring(0,a);e+=1;sResult=sResult.substring(a+9);c=sResult.indexOf("<string>")}d.className="";d.readonly=false;d.value=this.sActiveValue;this.setListArray(b)};cAutocomplete.prototype.prepareList=function(a){var c=document.getElementById(this.sInputId);this.sActiveValue=c.value;var d=this.getStringForAutocompletion(this.sActiveValue,this.nInsertPoint);var b=this.getStringForAutocompletion(this.sLastActiveValue,this.nInsertPoint);if(b!=d||a||!this.bListDisplayed||this.bMatchSubstring){if(this.bRemoteList){c.className="search";this.bXMLRPC?this.loadXMLRPCListArray():this.loadListArray();return}this.updateAndShowList(a)}};cAutocomplete.prototype.updateAndShowList=function(a){var b=document.getElementById(this.sListId);var h=b.getElementsByTagName("UL")[0];var f=document.getElementById(this.sInputId);if(this.bListUpdated){this.createList()}var e=this.bMatchSubstring?this.getStringForAutocompletion(this.sActiveValue,this.nInsertPoint):this.sActiveValue;var i=this.bMatchSubstring?this.getStringForAutocompletion(this.sLastActiveValue,this.nInsertPoint):this.sLastActiveValue;if(e==i){if(!this.bMatchSubstring){a=true}}this.filterOptions(a);if(this.nItemsDisplayed==0){if(this.bForceCorrect){var g=this.getInsertPos(this.sActiveValue,this.nInsertPoint,"");cAutocomplete.markInputRange(f,this.nLastMatchLength,g[0])}}this.sLastActiveValue=this.sActiveValue;if(this.nItemsDisplayed>0){if(!a||this.bMatchSubstring){this.deselectOption()}if(this.bAutoComplete&&this.nItemsDisplayed==1){var c=this.getStringForAutocompletion(this.sActiveValue,this.nInsertPoint);var d=h.getElementsByTagName("LI")[this.nFirstDisplayed].getElementsByTagName("A")[0].realText;if(c.toLowerCase()==d.toLowerCase()){this.selectOption(h.getElementsByTagName("LI")[this.nFirstDisplayed].getElementsByTagName("A")[0]);this.hideOptions();return}}if(this.bAutoComplete&&!a){this.selectOption(h.getElementsByTagName("LI")[this.nFirstDisplayed].getElementsByTagName("A")[0])}this.showList()}else{this.clearList()}};cAutocomplete.prototype.showList=function(){if(cAutocomplete.hListDisplayed){cAutocomplete.hListDisplayed.clearList()}var e=document.getElementById(this.sInputId);var b=cDomObject.getOffsetParam(e,"offsetTop");var d=cDomObject.getOffsetParam(e,"offsetLeft");var f=document.getElementById(this.sListId);var a=f.getElementsByTagName("UL")[0];if(this.bHasButton){f.style.width=document.getElementById(this.sInputId).parentNode.offsetWidth}else{f.style.width=document.getElementById(this.sInputId).offsetWidth}var c=(this.nItemsDisplayed<cAutocomplete.CN_NUMBER_OF_LINES)?this.nItemsDisplayed:cAutocomplete.CN_NUMBER_OF_LINES;a.style.height=c*cAutocomplete.CN_LINE_HEIGHT+cAutocomplete.CN_HEIGHT_FIX+"px";f.style.top=b+e.offsetHeight+cAutocomplete.CN_OFFSET_TOP+"px";f.style.left=d+cAutocomplete.CN_OFFSET_LEFT+"px";f.style.display="none";f.style.visibility="visible";f.style.display="block";cAutocomplete.hListDisplayed=this;this.bListDisplayed=true};cAutocomplete.prototype.binarySearch=function(f){var a=0;var b=this.aSearchData.length-1;var c;var g,e;var h;var i=f.length;var d;while(a<=b){c=(a+b)/2;g=(c<1)?0:parseInt(c);h=this.aSearchData[g].substr(0,i);if(h<f){a=g+1;continue}if(h>f){b=g-1;continue}if(h==f){b=g-1;e=g;continue}return g}if(typeof(e)!="undefined"){return e}else{return null}};cAutocomplete.prototype.getStringForAutocompletion=function(e,c){if(e==null||e.length==0){return""}if(this.bMatchSubstring){var d=e.lastIndexOf(cAutocomplete.CS_SEPARATOR,c-1);d=d<0?0:d;var b=e.indexOf(cAutocomplete.CS_SEPARATOR,c);b=b<0?e.length:b;var a=e.substr(d,b-d);a=a.replace(/^(\,?)(\s*)(\S*)(\s*)(\,?)$/g,"$3");return a}else{return e}};cAutocomplete.prototype.insertString=function(f,d,a){if(this.bMatchSubstring){var e=f.lastIndexOf(cAutocomplete.CS_SEPARATOR,d-1);e=e<0?0:e;var c=f.indexOf(cAutocomplete.CS_SEPARATOR,d);c=c<0?f.length:c;var b=f.substr(e,c-e);b=b.replace(/^(\,?)(\s*)(\S?[\S\s]*\S?)(\s*)(\,?)$/g,"$1$2"+a+"$4$5");b=f.substr(0,e)+b+f.substr(c);return b}else{return a}};cAutocomplete.prototype.getInsertPos=function(f,d,a){d=d==null?0:d;var e=f.lastIndexOf(cAutocomplete.CS_SEPARATOR,d-1);e=e<0?0:e;var c=f.indexOf(cAutocomplete.CS_SEPARATOR,d);c=c<0?f.length:c;var b=f.substr(e,c-e);b=b.replace(/^(\,?)(\s*)(\S?[\S\s]*\S?)(\s*)(\,?)$/g,"$1$2"+a);return[d,e+b.length]};cAutocomplete.prototype.filterOptions=function(j){if(this.hActiveSelection&&!j){this.hActiveSelection.className=""}if(typeof j=="undefined"){j=false}var g=document.getElementById(this.sInputId);var c=this.getStringForAutocompletion(this.sActiveValue,this.nInsertPoint);if(j){c=""}var b=document.getElementById(this.sListId);var n=b.getElementsByTagName("UL")[0];var k=n.childNodes.length;var d=null;var a=0;var h=n.parentNode;var n=n.parentNode.removeChild(n);var l=n.childNodes;this.nItemsDisplayed=0;if(c.length==0){for(var i=0;i<k;i++){if(this.formatOptions){l[i].childNodes[0].innerHTML=this.formatOptions(l[i].childNodes[0].realText,i)}l[i].style.display="block"}a=k;if(k>0){this.nFirstDisplayed=0;this.nLastDisplayed=k-1}else{this.nFirstDisplayed=this.nLastDisplayed=-1}var f=this.getInsertPos(this.sActiveValue,this.nInsertPoint,c);this.nLastMatchLength=f[0]}else{this.nFirstDisplayed=this.nLastDisplayed=-1;c=c.toLowerCase();var m=false;if(this.bSorted&&this.bMatchBegin){var e=this.binarySearch(c);for(var i=0;i<k;i++){l[i].style.display="none";if(i>=e&&!m){if(!m&&this.aSearchData[i].indexOf(c)!=0){m=true;continue}if(this.formatOptions){l[i].childNodes[0].innerHTML=this.formatOptions(l[i].childNodes[0].realText,i)}l[i].style.display="block";a++;if(this.nFirstDisplayed<0){this.nFirstDisplayed=i}this.nLastDisplayed=i}}}else{for(var i=0;i<k;i++){l[i].style.display="none";if((this.bMatchBegin&&this.aSearchData[i].indexOf(c)==0)||(!this.bMatchBegin&&this.aSearchData[i].indexOf(c)>=0)){if(this.formatOptions){l[i].childNodes[0].innerHTML=this.formatOptions(l[i].childNodes[0].realText,i)}l[i].style.display="block";a++;if(this.nFirstDisplayed<0){this.nFirstDisplayed=i}this.nLastDisplayed=i}}}if(a>0){var f=this.getInsertPos(this.sActiveValue,this.nInsertPoint,c);this.nLastMatchLength=f[0]}}h.appendChild(n);this.nItemsDisplayed=a};cAutocomplete.prototype.hideOptions=function(){var a=document.getElementById(this.sListId);a.style.visibility="hidden";a.style.display="none";this.hListDisplayed=null};cAutocomplete.prototype.markAutocompletedValue=function(){var c=document.getElementById(this.sInputId);var e=this.hActiveSelection.realText;if(this.bMatchSubstring){var a=this.getInsertPos(this.sLastActiveValue,this.nInsertPoint,e);var d=a[0];var b=a[1]}else{var d=this.nInsertPoint;var b=e.length}this.nStartAC=d;this.nEndAC=b;if(this.hMarkRangeTimeout!=null){clearTimeout(this.hMarkRangeTimeout)}this.hMarkRangeTimeout=setTimeout(function(){cAutocomplete.markInputRange2(c.id)},cAutocomplete.CN_MARK_TIMEOUT)};cAutocomplete.prototype.selectOptionByIndex=function(b){if(this.bListUpdated){this.createList()}var d=document.getElementById(this.sListId);var a=d.getElementsByTagName("UL")[0];var c=a.childNodes.length;if(b>=0&&b<c){this.selectOption(a.childNodes[b].getElementsByTagName("A")[0])}};cAutocomplete.prototype.selectOptionByValue=function(f){if(this.bListUpdated){this.createList()}f=f.toLowerCase();var e=document.getElementById(this.sListId);var a=e.getElementsByTagName("UL")[0];var c=a.childNodes.length;var d=-1;for(var b=0;b<c;b++){if(this.aSearchData[b].indexOf(f)==0){d=b}}if(d>=0){this.selectOption(a.childNodes[d].getElementsByTagName("A")[0])}};cAutocomplete.prototype.selectOption=function(b){if(this.hActiveSelection){if(this.hActiveSelection==b){return}else{this.hActiveSelection.className=""}}this.hActiveSelection=b;var c=document.getElementById(this.sInputId);if(this.hActiveSelection!=null){if(this.sHiddenInputId!=null){if(this.bMatchSubstring){document.getElementById(this.sHiddenInputId).value=this.hActiveSelection.getAttribute("itemvalue")}else{document.getElementById(this.sHiddenInputId).value=this.hActiveSelection.getAttribute("itemvalue")}}this.hActiveSelection.className="selected";if(this.bAutoComplete){c.value=this.insertString(this.sLastActiveValue,this.nInsertPoint,this.hActiveSelection.realText);this.bAutocompleted=true;this.markAutocompletedValue()}else{var a=this.getInsertPos(this.sLastActiveValue,this.nInsertPoint,this.hActiveSelection.realText);c.value=this.insertString(this.sActiveValue,this.nInsertPoint,this.hActiveSelection.realText);cAutocomplete.setInputCaretPosition(c,a[1])}this.sActiveValue=c.value;if(this.onSelect){this.onSelect()}}else{c.value=this.sActiveValue;cAutocomplete.setInputCaretPosition(c,this.nInsertPoint)}};cAutocomplete.prototype.deselectOption=function(){if(this.hActiveSelection!=null){this.hActiveSelection.className="";this.hActiveSelection=null}};cAutocomplete.prototype.clearList=function(){this.hideOptions();this.bListDisplayed=false};cAutocomplete.prototype.getPrevDisplayedItem=function(a){if(a==null){var b=document.getElementById(this.sListId);a=b.getElementsByTagName("UL")[0].childNodes.item(b.getElementsByTagName("UL")[0].childNodes.length-1)}else{a=getPrevNodeSibling(a.parentNode)}while(a!=null){if(a.style.display=="block"){return a}a=a.previousSibling}return null};cAutocomplete.prototype.getNextDisplayedItem=function(a){if(a==null){var b=document.getElementById(this.sListId);a=b.getElementsByTagName("UL")[0].childNodes.item(0)}else{a=getNextNodeSibling(a.parentNode)}while(a!=null){if(a.style.display=="block"){return a}a=a.nextSibling}return null};cAutocomplete.prototype.debug=function(b){if(this.bDebug){var a=document.getElementById(this.sInputId);var c=document.createElement("DIV");c.className="debug";c.innerHTML=b;a.form.appendChild(c)}};cAutocomplete.onInputKeyDown=function(g){if(g==null){g=window.event}var d=(g.srcElement)?g.srcElement:g.originalTarget;var a=d.hAutocomplete;var b=document.getElementById(a.sListId);var f=document.getElementById(a.sInputId);var i=b.getElementsByTagName("UL")[0];var h=getParentByTagName(d,"A");if(b!=null&&a.bListDisplayed){var j=null;var c=null;if((g.keyCode==13)||(g.keyCode==27)){var e=g.keyCode==13?true:false;a.clearList();if(a.bDebug){a.debug("key "+g.keyCode+" new active selection")}}if(g.keyCode==38){if(a.bDebug){a.debug("key "+g.keyCode+" up")}c=a.getPrevDisplayedItem(a.hActiveSelection);if(c!=null){a.selectOption(c.childNodes.item(0));if(a.nItemsDisplayed>cAutocomplete.CN_NUMBER_OF_LINES){if(i.scrollTop<5&&c.offsetTop>i.offsetHeight){i.scrollTop=i.scrollHeight-i.offsetHeight}if(c.offsetTop-i.scrollTop<0){i.scrollTop-=c.offsetHeight}}}else{a.selectOption(null)}}else{if(g.keyCode==40){if(a.bDebug){a.debug("key "+g.keyCode+" down")}c=a.getNextDisplayedItem(a.hActiveSelection);if(c!=null){a.selectOption(c.childNodes.item(0));if(a.nItemsDisplayed>cAutocomplete.CN_NUMBER_OF_LINES){if(i.scrollTop>0&&i.scrollTop>c.offsetTop){i.scrollTop=0}if(Math.abs(c.offsetTop-i.scrollTop-i.offsetHeight)<5){i.scrollTop+=c.offsetHeight}}}else{a.selectOption(null)}}}}if(f.form){f.form.bLocked=true;if(a.bDebug){a.debug("onInputKeyDown form blocked")}}if(g.keyCode==13||g.keyCode==27||g.keyCode==38||g.keyCode==40){if(g.preventDefault){g.preventDefault()}else{if(a.bDebug){a.debug("no preventDefault return false")}}g.cancelBubble=true;g.returnValue=false;return false}};cAutocomplete.onInputKeyPress=function(a){if(a.keyCode==13||a.keyCode==38||a.keyCode==40){if(a.preventDefault){a.preventDefault()}a.cancelBubble=true;a.returnValue=false;return false}};cAutocomplete.onInputKeyUp=function(e){if(e==null){e=window.event}var b=(e.srcElement)?e.srcElement:e.originalTarget;var d=b.hAutocomplete;var a=document.getElementById(d.sInputId);switch(e.keyCode){case 8:if(d.bAutoComplete&&d.bAutocompleted){d.bAutocompleted=false;return false}break;case 38:case 40:if(d.bListDisplayed){if(e.preventDefault){e.preventDefault()}e.cancelBubble=true;e.returnValue=false;return false}break;case 32:case 46:case 35:case 36:break;default:if(e.keyCode<48){if(e.preventDefault){e.preventDefault()}if(d.bDebug){d.debug("keyUp: hEvent.returnValue = false")}e.cancelBubble=true;e.returnValue=false;return false}break}if(d.hMarkRangeTimeout!=null){clearTimeout(d.hMarkRangeTimeout)}if(d.hShowTimeout){clearTimeout(d.hShowTimeout);d.hShowTimeout=null}var c=d.bRemoteList?cAutocomplete.CN_REMOTE_SHOW_TIMEOUT:cAutocomplete.CN_SHOW_TIMEOUT;d.hShowTimeout=setTimeout(function(){d.prepareList()},c);if(d.bDebug){d.debug("setTimeout "+c)}};cAutocomplete.onInputBlur=function(c){if(c==null){c=window.event}var a=(c.srcElement)?c.srcElement:c.originalTarget;if(a.form){a.form.bLocked=false}var b=a.hAutocomplete;if(!b.hClearTimeout){b.hClearTimeout=setTimeout(function(){b.clearList()},cAutocomplete.CN_CLEAR_TIMEOUT)}};cAutocomplete.onInputFocus=function(c){if(c==null){c=window.event}var a=(c.srcElement)?c.srcElement:c.originalTarget;var b=a.hAutocomplete;if(b.hClearTimeout){clearTimeout(b.hClearTimeout);b.hClearTimeout=null}};cAutocomplete.saveCaretPosition=function(d){if(d==null){d=window.event}var b=(d.srcElement)?d.srcElement:d.originalTarget;var c=b.hAutocomplete;var a=document.getElementById(c.sInputId);if(d.keyCode!=38&&d.keyCode!=40){c.nInsertPoint=cAutocomplete.getInputCaretPosition(a)}};cAutocomplete.getInputCaretPosition=function(c){if(typeof c.selectionStart!="undefined"){if(c.selectionStart==c.selectionEnd){return c.selectionStart}else{return c.selectionStart}}else{if(c.createTextRange){var e=document.selection.createRange();if(c.tagName.toLowerCase()=="textarea"){var a=e.duplicate();var b=e.duplicate();e.moveToElementText(c);a.setEndPoint("StartToStart",e);return a.text.length}else{e.moveStart("character",-1*c.value.length);var d=e.text.length;return d}}}return null};cAutocomplete.setInputCaretPosition=function(c,a){if(c.setSelectionRange){c.setSelectionRange(a,a)}else{if(c.createTextRange){var b=c.createTextRange();b.moveStart("character",a);b.moveEnd("character",a);b.collapse(true);b.select()}}};cAutocomplete.markInputRange=function(c,d,a){if(c.setSelectionRange){c.focus();c.setSelectionRange(d,a)}else{if(c.createTextRange){var b=c.createTextRange();b.collapse(true);b.moveStart("character",d);b.moveEnd("character",a-d);b.select()}}};cAutocomplete.markInputRange2=function(a){var c=document.getElementById(a);var d=c.hAutocomplete.nStartAC;var b=c.hAutocomplete.nEndAC;cAutocomplete.markInputRange(c,d,b)};cAutocomplete.onListBlur=function(c){if(c==null){c=window.event}var a=(c.srcElement)?c.srcElement:c.originalTarget;a=getParentByProperty(a,"className","autocomplete_holder");var b=a.hAutocomplete;if(!b.hClearTimeout){b.hClearTimeout=setTimeout(function(){b.clearList()},cAutocomplete.CN_CLEAR_TIMEOUT)}};cAutocomplete.onListFocus=function(c){if(c==null){c=window.event}var a=(c.srcElement)?c.srcElement:c.originalTarget;a=getParentByProperty(a,"className","autocomplete_holder");var b=a.hAutocomplete;if(b.hClearTimeout){clearTimeout(b.hClearTimeout);b.hClearTimeout=null}};cAutocomplete.onItemClick=function(d){if(d==null){d=window.event}var a=(d.srcElement)?d.srcElement:d.originalTarget;var e=getParentByProperty(a,"className","autocomplete_holder");var c=getParentByTagName(a,"A");if(e!=null){var b=e.hAutocomplete;b.selectOption(c);document.getElementById(b.sInputId).focus();b.clearList()}if(d.preventDefault){d.preventDefault()}d.cancelBubble=true;d.returnValue=false;return false};cAutocomplete.onButtonClick=function(d){if(d==null){d=window.event}var b=(d.srcElement)?d.srcElement:d.originalTarget;var c=b.hAutocomplete;var a=document.getElementById(c.sInputId);if(a.disabled){return}if(c.bDebug){c.debug("onButtonClick")}c.prepareList(true);var a=document.getElementById(c.sInputId);a.focus()};cAutocomplete.onFormSubmit=function(c){if(c==null){c=window.event}var a=(c.srcElement)?c.srcElement:c.originalTarget;if(a.bLocked){var b=a.hAutocomplete;if(b.bDebug){b.debug("onSubmit: hElement.bLocked")}a.bLocked=false;c.returnValue=false;if(c.preventDefault){c.preventDefault()}return false}};
\ No newline at end of file

Added: trunk/src/plugins/wiki/www/themes/default/sortable-min.js
===================================================================
--- trunk/src/plugins/wiki/www/themes/default/sortable-min.js	                        (rev 0)
+++ trunk/src/plugins/wiki/www/themes/default/sortable-min.js	2010-09-13 18:11:39 UTC (rev 10463)
@@ -0,0 +1 @@
+var image_path="/images/";var image_up="sort_up.gif";var image_down="sort_down.gif";var image_none="sort_none.gif";var europeandate=true;var alternate_row_colors=true;addEvent(window,"load",sortables_init);var SORT_COLUMN_INDEX;var thead=false;function sortables_init(){if(!document.getElementsByTagName){return}tbls=document.getElementsByTagName("table");for(ti=0;ti<tbls.length;ti++){thisTbl=tbls[ti];if(((" "+thisTbl.className+" ").indexOf("sortable")!=-1)&&(thisTbl.id)){ts_makeSortable(thisTbl)}}}function ts_makeSortable(d){if(d.rows&&d.rows.length>0){if(d.tHead&&d.tHead.rows.length>0){var e=d.tHead.rows[d.tHead.rows.length-1];thead=true}else{var e=d.rows[0]}}if(!e){return}for(var c=0;c<e.cells.length;c++){var b=e.cells[c];var a=ts_getInnerText(b);if(b.className!="unsortable"&&b.className.indexOf("unsortable")==-1){b.innerHTML='<a href="#" class="sortheader" onclick="ts_resortTable(this, '+c+');return false;">'+a+'<span class="sortarrow">&nbsp;&nbsp;<img src="'+image_path+image_none+'" alt="&darr;"/></span></a>'}}if(alternate_row_colors){alternate(d)}}function ts_getInnerText(d){if(typeof d=="string"){return d}if(typeof d=="undefined"){return d}if(d.innerText){return d.innerText}var e="";var c=d.childNodes;var a=c.length;for(var b=0;b<a;b++){switch(c[b].nodeType){case 1:e+=ts_getInnerText(c[b]);break;case 3:e+=c[b].nodeValue;break}}return e}function ts_resortTable(g,l){var n;for(var p=0;p<g.childNodes.length;p++){if(g.childNodes[p].tagName&&g.childNodes[p].tagName.toLowerCase()=="span"){n=g.childNodes[p]}}var a=ts_getInnerText(n);var b=g.parentNode;var c=l||b.cellIndex;var o=getParent(b,"TABLE");if(o.rows.length<=1){return}var h="";var e=0;while(h==""&&e<o.tBodies[0].rows.length){var h=ts_getInnerText(o.tBodies[0].rows[e].cells[c]);h=trim(h);if(h.substr(0,4)=="<!--"||h.length==0){h=""}e++}if(h==""){return}sortfn=ts_sort_caseinsensitive;if(h.match(/^\d\d[\/\.-][a-zA-z][a-zA-Z][a-zA-Z][\/\.-]\d\d\d\d$/)){sortfn=ts_sort_date}if(h.match(/^\d\d[\/\.-]\d\d[\/\.-]\d\d\d{2}?$/)){sortfn=ts_sort_date}if(h.match(/^-?[�$�ۢ�]\d/)){sortfn=ts_sort_numeric}if(h.match(/^\d+ *(B|KB|MB)$/)){sortfn=ts_sort_numeric}if(h.match(/^-?(\d+[,\.]?)+(E[-+][\d]+)?%?$/)){sortfn=ts_sort_numeric}SORT_COLUMN_INDEX=c;var d=new Array();var f=new Array();for(k=0;k<o.tBodies.length;k++){for(e=0;e<o.tBodies[k].rows[0].length;e++){d[e]=o.tBodies[k].rows[0][e]}}for(k=0;k<o.tBodies.length;k++){if(!thead){for(j=1;j<o.tBodies[k].rows.length;j++){f[j-1]=o.tBodies[k].rows[j]}}else{for(j=0;j<o.tBodies[k].rows.length;j++){f[j]=o.tBodies[k].rows[j]}}}f.sort(sortfn);if(n.getAttribute("sortdir")=="down"){ARROW='&nbsp;&nbsp;<img src="'+image_path+image_down+'" alt="&darr;"/>';f.reverse();n.setAttribute("sortdir","up")}else{ARROW='&nbsp;&nbsp;<img src="'+image_path+image_up+'" alt="&uarr;"/>';n.setAttribute("sortdir","down")}for(e=0;e<f.length;e++){if(!f[e].className||(f[e].className&&(f[e].className.indexOf("sortbottom")==-1))){o.tBodies[0].appendChild(f[e])}}for(e=0;e<f.length;e++){if(f[e].className&&(f[e].className.indexOf("sortbottom")!=-1)){o.tBodies[0].appendChild(f[e])}}var m=document.getElementsByTagName("span");for(var p=0;p<m.length;p++){if(m[p].className=="sortarrow"){if(getParent(m[p],"table")==getParent(g,"table")){m[p].innerHTML='&nbsp;&nbsp;<img src="'+image_path+image_none+'" alt="&darr;"/>'}}}n.innerHTML=ARROW;alternate(o)}function getParent(b,a){if(b==null){return null}else{if(b.nodeType==1&&b.tagName.toLowerCase()==a.toLowerCase()){return b}else{return getParent(b.parentNode,a)}}}function sort_date(b){dt="00000000";if(b.length==11){mtstr=b.substr(3,3);mtstr=mtstr.toLowerCase();switch(mtstr){case"jan":var a="01";break;case"feb":var a="02";break;case"mar":var a="03";break;case"apr":var a="04";break;case"may":var a="05";break;case"jun":var a="06";break;case"jul":var a="07";break;case"aug":var a="08";break;case"sep":var a="09";break;case"oct":var a="10";break;case"nov":var a="11";break;case"dec":var a="12";break}dt=b.substr(7,4)+a+b.substr(0,2);return dt}else{if(b.length==10){if(europeandate==false){dt=b.substr(6,4)+b.substr(0,2)+b.substr(3,2);return dt}else{dt=b.substr(6,4)+b.substr(3,2)+b.substr(0,2);return dt}}else{if(b.length==8){yr=b.substr(6,2);if(parseInt(yr)<50){yr="20"+yr}else{yr="19"+yr}if(europeandate==true){dt=yr+b.substr(3,2)+b.substr(0,2);return dt}else{dt=yr+b.substr(0,2)+b.substr(3,2);return dt}}}}return dt}function ts_sort_date(d,c){dt1=sort_date(ts_getInnerText(d.cells[SORT_COLUMN_INDEX]));dt2=sort_date(ts_getInnerText(c.cells[SORT_COLUMN_INDEX]));if(dt1==dt2){return 0}if(dt1<dt2){return -1}return 1}function ts_sort_numeric(d,c){var e=ts_getInnerText(d.cells[SORT_COLUMN_INDEX]);e=clean_num(e);var f=ts_getInnerText(c.cells[SORT_COLUMN_INDEX]);f=clean_num(f);return compare_numeric(e,f)}function compare_numeric(d,c){var e=parseFloat(d);e=(isNaN(e)?0:e);var f=parseFloat(c);f=(isNaN(f)?0:f);return e-f}function ts_sort_caseinsensitive(d,c){var e=ts_getInnerText(d.cells[SORT_COLUMN_INDEX]).toLowerCase();var f=ts_getInnerText(c.cells[SORT_COLUMN_INDEX]).toLowerCase();if(e==f){return 0}if(e<f){return -1}return 1}function ts_sort_default(d,c){var e=ts_getInnerText(d.cells[SORT_COLUMN_INDEX]);var f=ts_getInnerText(c.cells[SORT_COLUMN_INDEX]);if(e==f){return 0}if(e<f){return -1}return 1}function addEvent(e,d,b,a){if(e.addEventListener){e.addEventListener(d,b,a);return true}else{if(e.attachEvent){var c=e.attachEvent("on"+d,b);return c}else{alert("Handler could not be removed");return false}}}function clean_num(a){a=a.replace(new RegExp(/[^-?0-9.]/g),"");return a}function trim(a){return a.replace(/^\s+|\s+$/g,"")}function alternate(e){var c=e.getElementsByTagName("tbody");for(var b=0;b<c.length;b++){var d=c[b].getElementsByTagName("tr");for(var a=0;a<d.length;a++){if((a%2)==0){if(!(d[a].className.indexOf("odd")==-1)){d[a].className=d[a].className.replace("odd","even")}else{if(d[a].className.indexOf("even")==-1){d[a].className+=" even"}}}else{if(!(d[a].className.indexOf("even")==-1)){d[a].className=d[a].className.replace("even","odd")}else{if(d[a].className.indexOf("odd")==-1){d[a].className+=" odd"}}}}}};
\ No newline at end of file

Added: trunk/src/plugins/wiki/www/themes/default/toolbar-min.css
===================================================================
--- trunk/src/plugins/wiki/www/themes/default/toolbar-min.css	                        (rev 0)
+++ trunk/src/plugins/wiki/www/themes/default/toolbar-min.css	2010-09-13 18:11:39 UTC (rev 10463)
@@ -0,0 +1 @@
+body{font-family:Tahoma,Arial,Helvetica,sans-serif;font-size:10pt;background-color:#ddd;}input{font-weight:bold;margin-left:2px;margin-right:2px;}option,td{font-size:9pt;}#buttons{background-color:#ddd;padding-right:10px;width:180px;}
\ No newline at end of file

Added: trunk/src/plugins/wiki/www/themes/default/toolbar-min.js
===================================================================
--- trunk/src/plugins/wiki/www/themes/default/toolbar-min.js	                        (rev 0)
+++ trunk/src/plugins/wiki/www/themes/default/toolbar-min.js	2010-09-13 18:11:39 UTC (rev 10463)
@@ -0,0 +1 @@
+var doctype='<?xml version="1.0" encoding="utf-8"?>\n<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">';var cssfile='<link rel="stylesheet" type="text/css" href="'+data_path+'/themes/default/toolbar.css" />';if(window.top!=window){window.top.location=window.location}var pullwin;function addButton(e,a,d,b){var c;a=escapeQuotes(a);document.write('<a href="javascript:'+d+"(");for(c=0;c<b.length;c++){if(c>0){document.write(",")}document.write("'"+escapeQuotes(b[c])+"'")}document.write(');"><img src="'+e+'" width="18" height="18" border="0" alt="'+a+'" title="'+a+'">');document.write("</a>");return}function addTagButton(e,a,c,b,d){addButton(e,a,"insertTags",[c,b,d]);return}function showPulldown(j,c,g,a,d){var l=new String(Math.min(315,80+(c.length*12)));var b=500;var e=(screen.height-l)/2;var k=(screen.width-b)/2;pullwin=window.open("","","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,copyhistory=no,top="+e+",left="+k+",height="+l+",width="+b);pullwin.window.document.writeln(doctype);pullwin.window.document.writeln("<html>\n<head>\n<title>"+escapeQuotes(j)+"</title>");pullwin.window.document.writeln(cssfile);pullwin.window.document.writeln("</head>\n<body>");pullwin.window.document.writeln("<p>\nYou can double-click to insert.\n</p>");pullwin.window.document.writeln('<form action=""><div id="buttons"><input type="button" value="'+g+'" onclick="if(self.opener)self.opener.do_pulldown(document.forms[0].select.value,\''+d+'\'); return false;" /><input type="button" value="'+a+'" onclick="self.close(); return false;" /></div>\n<div>\n<select style="margin-top:10px;width:190px;" name="select" size="'+((c.length>20)?"20":new String(c.length))+'" ondblclick="if(self.opener)self.opener.do_pulldown(document.forms[0].select.value,\''+d+"'); return false;\">");for(i=0;i<c.length;i++){if(typeof c[i]=="string"){pullwin.window.document.write('<option value="'+c[i]+'">'+escapeQuotes(c[i])+"</option>\n")}else{pullwin.window.document.write('<option value="'+c[i][1]+'">'+escapeQuotes(c[i][0])+"</option>\n")}}pullwin.window.document.writeln("</select>\n</div>\n</form>\n</body>\n</html>");pullwin.window.document.close();return false}function do_pulldown(b,a){if(a=="tb-categories"){var c=document.getElementById("edit-content");b=unescapeSpecial(b);c.value+="\n"+b}else{insertTags(b,"","\n")}return}function addInfobox(c){var b=navigator.userAgent.toLowerCase();var a=((b.indexOf("gecko")!=-1)&&(b.indexOf("spoofer")==-1)&&(b.indexOf("khtml")==-1));if(!document.selection&&!a){c=escapeQuotesHTML(c);document.write("<form name='infoform' id='infoform'><input size=80 id='infobox' name='infobox' value=\""+c+'" readonly="readonly"></form>')}}function escapeQuotes(b){var a=new RegExp("'","g");b=b.replace(a,"\\'");a=new RegExp('"',"g");b=b.replace(a,"&quot;");a=new RegExp("\\n","g");b=b.replace(a,"\\n");return b}function escapeQuotesHTML(b){var a=new RegExp('"',"g");b=b.replace(a,"&quot;");return b}function unescapeSpecial(b){var a=new RegExp("%0A","g");b=b.replace(a,"\n");var a=new RegExp("%22","g");b=b.replace(a,'"');var a=new RegExp("%27","g");b=b.replace(a,"'");var a=new RegExp("%09","g");b=b.replace(a,"    ");var a=new RegExp("%7C","g");b=b.replace(a,"|");var a=new RegExp("%5B","g");b=b.replace(a,"[");var a=new RegExp("%5D","g");b=b.replace(a,"]");var a=new RegExp("%5C","g");b=b.replace(a,"\\");return b}function insertTags(g,a,b){var j=document.getElementById("edit-content");g=unescapeSpecial(g);if(document.selection){var k=document.selection.createRange().text;if(!k){k=b}j.focus();if(k.charAt(k.length-1)==" "){k=k.substring(0,k.length-1);document.selection.createRange().text=g+k+a+" "}else{document.selection.createRange().text=g+k+a}}else{if(j.selectionStart||j.selectionStart=="0"){var h=j.selectionStart;var c=j.selectionEnd;var e=j.scrollTop;var d=(j.value).substring(h,c);if(!d){d=b}if(d.charAt(d.length-1)==" "){subst=g+d.substring(0,(d.length-1))+a+" "}else{subst=g+d+a}j.value=j.value.substring(0,h)+subst+j.value.substring(c,j.value.length);j.focus();var l=h+(g.length+d.length+a.length);j.selectionStart=l;j.selectionEnd=l;j.scrollTop=e}else{j.value+=g+b+a;j.focus()}}if(j.createTextRange){j.caretPos=document.selection.createRange().duplicate()}}var f,sr_undo,replacewin,undo_buffer=new Array(),undo_buffer_index=0;function define_f(){f=document.getElementById("editpage");f.editarea=document.getElementById("edit-content");sr_undo=document.getElementById("sr_undo");undo_enable(false);f.editarea.focus()}function undo_enable(a){if(a){sr_undo.src=uri_undo_btn;sr_undo.alt=msg_undo_alt;sr_undo.disabled=false}else{sr_undo.src=uri_undo_d_btn;sr_undo.alt=msg_undo_d_alt;sr_undo.disabled=true;if(sr_undo.blur){sr_undo.blur()}}}function replace(){var a=120;var d=600;var c=(screen.height-a)/2;var b=(screen.width-d)/2;replacewin=window.open("","","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,copyhistory=no,top="+c+",left="+b+",height="+a+",width="+d);replacewin.window.document.writeln(doctype);replacewin.window.document.writeln("<html>\n<head>\n<title>"+msg_repl_title+"</title>");replacewin.window.document.writeln(cssfile);replacewin.window.document.writeln("</head>");replacewin.window.document.writeln('<body onload="if(document.forms[0].searchinput.focus) document.forms[0].searchinput.focus(); return false;">\n<form action="">\n<center>\n<table>\n<tr>\n<td align="right">'+msg_repl_search+':\n</td>\n<td align="left">\n<input type="text" name="searchinput" size="45" maxlength="500" />\n</td>\n</tr>\n<tr>\n<td align="right">'+msg_repl_replace_with+':\n</td>\n<td align="left">\n<input type="text" name="replaceinput" size="45" maxlength="500" />\n</td>\n</tr>\n<tr>\n<td colspan="2" align="center">\n<input type="button" value=" '+msg_repl_ok+' " onclick="if(self.opener)self.opener.do_replace(); return false;" />&nbsp;&nbsp;&nbsp;<input type="button" value="'+msg_repl_close+'" onclick="self.close(); return false;" />\n</td>\n</tr>\n</table>\n</center>\n</form>\n</body>\n</html>');replacewin.window.document.close();return false}function do_replace(){var a=undo_buffer[undo_buffer_index]=f.editarea.value;var d=new RegExp(replacewin.document.forms[0].searchinput.value,"g");var b=replacewin.document.forms[0].replaceinput.value;if(d==""||d==null){if(replacewin){replacewin.window.document.forms[0].searchinput.focus()}return}var c=a.match(d)?a.match(d).length:0;a=a.replace(d,b);d=d.toString().substring(1,d.toString().length-2);msg_replfound=msg_replfound.replace("\1",d).replace("\2",c).replace("\3",b);msg_replnot=msg_replnot.replace("%s",d);result(c,msg_replfound,a,msg_replnot);replacewin.window.focus();replacewin.window.document.forms[0].searchinput.focus();return false}function result(c,a,d,b){if(c>0){if(window.confirm(a)==true){f.editarea.value=d;undo_save();undo_enable(true)}}else{alert(b)}}function do_undo(){if(undo_buffer_index==0){return}else{if(undo_buffer_index>0){f.editarea.value=undo_buffer[undo_buffer_index-1];undo_buffer[undo_buffer_index]=null;undo_buffer_index--;if(undo_buffer_index==0){alert(msg_do_undo);undo_enable(false)}}}}function undo_save(){undo_buffer[undo_buffer_index]=f.editarea.value;undo_buffer_index++;undo_enable(true)};
\ No newline at end of file

Added: trunk/src/plugins/wiki/www/themes/default/toolbar.css
===================================================================
--- trunk/src/plugins/wiki/www/themes/default/toolbar.css	                        (rev 0)
+++ trunk/src/plugins/wiki/www/themes/default/toolbar.css	2010-09-13 18:11:39 UTC (rev 10463)
@@ -0,0 +1,26 @@
+/*
+ * $Id: toolbar.css 7686 2010-09-13 12:41:32Z vargenau $
+ *
+ */
+
+body {
+    font-family: Tahoma,Arial,Helvetica,sans-serif;
+    font-size: 10pt;
+    background-color: #dddddd;
+}
+
+input {
+    font-weight: bold;
+    margin-left: 2px;
+    margin-right: 2px;
+}
+
+option, td {
+    font-size: 9pt
+}
+
+#buttons {
+    background-color: #dddddd;
+    padding-right: 10px;
+    width: 180px;
+}

Modified: trunk/src/plugins/wiki/www/themes/default/toolbar.js
===================================================================
--- trunk/src/plugins/wiki/www/themes/default/toolbar.js	2010-09-13 12:24:03 UTC (rev 10462)
+++ trunk/src/plugins/wiki/www/themes/default/toolbar.js	2010-09-13 18:11:39 UTC (rev 10463)
@@ -1,6 +1,10 @@
 // Toolbar JavaScript support functions. Taken from mediawiki 
-// $Id: toolbar.js 6887 2009-06-04 12:58:15Z vargenau $
+// $Id: toolbar.js 7686 2010-09-13 12:41:32Z vargenau $
 
+// Some "constants"
+var doctype = '<?xml version="1.0" encoding="utf-8"?>\n<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">';
+var cssfile = '<link rel="stylesheet" type="text/css" href="'+data_path+'/themes/default/toolbar.css" />'
+
 // Un-trap us from framesets
 if( window.top != window ) window.top.location = window.location;
 var pullwin;
@@ -36,17 +40,24 @@
 //}
 // pages is either an array of strings or an array of array(name,value)
 function showPulldown(title, pages, okbutton, closebutton, fromid) {
-  height = new String(Math.min(315, 80 + (pages.length * 12))); // 270 or smaller
-  pullwin = window.open('','','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,copyhistory=no,height='+height+',width=200');
-  pullwin.window.document.write('<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><title>'+escapeQuotes(title)+'</title><style type=\"text/css\"><'+'!'+'-- body {font-family:Tahoma,Arial,Helvetica,sans-serif;font-size:10pt;background-color:#dddddd;} input { font-weight:bold;margin-left:2px;margin-right:2px;} option {font-size:9pt} #buttons { background-color:#dddddd;padding-right:10px;width:180px;} --'+'></style></head>');
-  pullwin.window.document.write('\n<body bgcolor=\"#dddddd\"><form action=\"\"><div id=\"buttons\"><input type=\"button\" value=\"'+okbutton+'\" onclick=\"if(self.opener)self.opener.do_pulldown(document.forms[0].select.value,\''+fromid+'\'); return false;\"><input type=\"button\" value=\"'+closebutton+'\" onClick=\"self.close(); return false;\"></div>\n<select style=\"margin-top:10px;width:190px;\" name=\"select\" size=\"'+((pages.length>20)?'20':new String(pages.length))+'\" onDblClick=\"if(self.opener)self.opener.do_pulldown(document.forms[0].select.value,\''+fromid+'\'); return false;\">');
+  var height = new String(Math.min(315, 80 + (pages.length * 12))); // 270 or smaller
+  var width = 500;
+  var h = (screen.height-height)/2;
+  var w = (screen.width-width)/2;
+  pullwin = window.open('','','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,copyhistory=no,top='+h+',left='+w+',height='+height+',width='+width);
+  pullwin.window.document.writeln(doctype);
+  pullwin.window.document.writeln('<html>\n<head>\n<title>'+escapeQuotes(title)+'</title>');
+  pullwin.window.document.writeln(cssfile);
+  pullwin.window.document.writeln('</head>\n<body>');
+  pullwin.window.document.writeln('<p>\nYou can double-click to insert.\n</p>');
+  pullwin.window.document.writeln('<form action=\"\"><div id=\"buttons\"><input type=\"button\" value=\"'+okbutton+'\" onclick=\"if(self.opener)self.opener.do_pulldown(document.forms[0].select.value,\''+fromid+'\'); return false;\" /><input type=\"button\" value=\"'+closebutton+'\" onclick=\"self.close(); return false;\" /></div>\n<div>\n<select style=\"margin-top:10px;width:190px;\" name=\"select\" size=\"'+((pages.length>20)?'20':new String(pages.length))+'\" ondblclick=\"if(self.opener)self.opener.do_pulldown(document.forms[0].select.value,\''+fromid+'\'); return false;\">');
   for (i=0; i<pages.length; i++){
     if (typeof pages[i] == 'string')
       pullwin.window.document.write('<option value="'+pages[i]+'">'+escapeQuotes(pages[i])+'</option>\n');
     else  // array=object
       pullwin.window.document.write('<option value="'+pages[i][1]+'">'+escapeQuotes(pages[i][0])+'</option>\n');
   }
-  pullwin.window.document.write('</select></form></body></html>');
+  pullwin.window.document.writeln('</select>\n</div>\n</form>\n</body>\n</html>');
   pullwin.window.document.close();
   return false;
 }
@@ -183,8 +194,16 @@
    }
 }
 function replace() {
-   replacewin = window.open('','','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,copyhistory=no,height=90,width=450');
-   replacewin.window.document.write('<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><title>'+msg_repl_title+"</title><style type=\"text/css\"><'+'!'+'-- body, input {font-family:Tahoma,Arial,Helvetica,sans-serif;font-size:10pt;font-weight:bold;} td {font-size:9pt}  --'+'></style></head><body bgcolor=\"#dddddd\" onload=\"if(document.forms[0].searchinput.focus) document.forms[0].searchinput.focus(); return false;\"><form action=\"\"><center><table><tr><td align=\"right\">"+msg_repl_search+":</td><td align=\"left\"><input type=\"text\" name=\"searchinput\" size=\"45\" maxlength=\"500\"></td></tr><tr><td align=\"right\">"+msg_repl_replace_with+":</td><td align=\"left\"><input type=\"text\" name=\"replaceinput\" size=\"45\" maxlength=\"500\"></td></tr><tr><td colspan=\"2\" align=\"center\"><input type=\"button\" value=\" "+msg_repl_ok+" \" onclick=\"if(self.opener)self.opener.do_replace(); return false;\">&nbsp;&nbsp;&nbsp;<input type=\"button\" value=\""+msg_repl_close+"\" onclick=\"self.close(); return false;\"></td></tr></table></center></form></body></html>");
+   var height = 120;
+   var width = 600;
+   var h = (screen.height-height)/2;
+   var w = (screen.width-width)/2;
+   replacewin = window.open('','','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,copyhistory=no,top='+h+',left='+w+',height='+height+',width='+width);
+   replacewin.window.document.writeln(doctype);
+   replacewin.window.document.writeln('<html>\n<head>\n<title>'+msg_repl_title+'</title>');
+   replacewin.window.document.writeln(cssfile);
+   replacewin.window.document.writeln('</head>');
+   replacewin.window.document.writeln("<body onload=\"if(document.forms[0].searchinput.focus) document.forms[0].searchinput.focus(); return false;\">\n<form action=\"\">\n<center>\n<table>\n<tr>\n<td align=\"right\">"+msg_repl_search+":\n</td>\n<td align=\"left\">\n<input type=\"text\" name=\"searchinput\" size=\"45\" maxlength=\"500\" />\n</td>\n</tr>\n<tr>\n<td align=\"right\">"+msg_repl_replace_with+":\n</td>\n<td align=\"left\">\n<input type=\"text\" name=\"replaceinput\" size=\"45\" maxlength=\"500\" />\n</td>\n</tr>\n<tr>\n<td colspan=\"2\" align=\"center\">\n<input type=\"button\" value=\" "+msg_repl_ok+" \" onclick=\"if(self.opener)self.opener.do_replace(); return false;\" />&nbsp;&nbsp;&nbsp;<input type=\"button\" value=\""+msg_repl_close+"\" onclick=\"self.close(); return false;\" />\n</td>\n</tr>\n</table>\n</center>\n</form>\n</body>\n</html>");
    replacewin.window.document.close();
    return false;
 }

Modified: trunk/src/plugins/wiki/www/themes/default/wikicommon.js
===================================================================
--- trunk/src/plugins/wiki/www/themes/default/wikicommon.js	2010-09-13 12:24:03 UTC (rev 10462)
+++ trunk/src/plugins/wiki/www/themes/default/wikicommon.js	2010-09-13 18:11:39 UTC (rev 10463)
@@ -1,5 +1,5 @@
 // Common Javascript support functions.
-// $Id: wikicommon.js 7340 2010-04-15 16:27:18Z vargenau $
+// $Id: wikicommon.js 7686 2010-09-13 12:41:32Z vargenau $
 
 /* Globals:
 var data_path = '/phpwiki';




More information about the Fusionforge-commits mailing list