summaryrefslogtreecommitdiff
path: root/lib/scripts/script.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/scripts/script.js')
-rw-r--r--lib/scripts/script.js80
1 files changed, 0 insertions, 80 deletions
diff --git a/lib/scripts/script.js b/lib/scripts/script.js
index 24473c2e6..a6951c4ce 100644
--- a/lib/scripts/script.js
+++ b/lib/scripts/script.js
@@ -331,86 +331,6 @@ addInitEvent(function(){
}
});
-/**
- * Add the edit window size controls
- */
-function initSizeCtl(ctlid,edid){
- if(!document.getElementById){ return; }
-
- var ctl = $(ctlid);
- var textarea = $(edid);
- if(!ctl || !textarea) return;
-
- var hgt = DokuCookie.getValue('sizeCtl');
- if(hgt){
- textarea.style.height = hgt;
- }else{
- textarea.style.height = '300px';
- }
-
- var wrp = DokuCookie.getValue('wrapCtl');
- if(wrp){
- setWrap(textarea, wrp);
- } // else use default value
-
- var l = document.createElement('img');
- var s = document.createElement('img');
- var w = document.createElement('img');
- l.src = DOKU_BASE+'lib/images/larger.gif';
- s.src = DOKU_BASE+'lib/images/smaller.gif';
- w.src = DOKU_BASE+'lib/images/wrap.gif';
- addEvent(l,'click',function(){sizeCtl(edid,100);});
- addEvent(s,'click',function(){sizeCtl(edid,-100);});
- addEvent(w,'click',function(){toggleWrap(edid);});
- ctl.appendChild(l);
- ctl.appendChild(s);
- ctl.appendChild(w);
-}
-
-/**
- * This sets the vertical size of the editbox
- */
-function sizeCtl(edid,val){
- var textarea = $(edid);
- var height = parseInt(textarea.style.height.substr(0,textarea.style.height.length-2));
- height += val;
- textarea.style.height = height+'px';
-
- DokuCookie.setValue('sizeCtl',textarea.style.height);
-}
-
-/**
- * Toggle the wrapping mode of a textarea
- */
-function toggleWrap(edid){
- var textarea = $(edid);
- var wrap = textarea.getAttribute('wrap');
- if(wrap && wrap.toLowerCase() == 'off'){
- setWrap(textarea, 'soft');
- }else{
- setWrap(textarea, 'off');
- }
-
- DokuCookie.setValue('wrapCtl',textarea.getAttribute('wrap'));
-}
-
-/**
- * Set the wrapping mode of a textarea
- *
- * @author Fluffy Convict <fluffyconvict@hotmail.com>
- * @author <shutdown@flashmail.com>
- * @link http://news.hping.org/comp.lang.javascript.archive/12265.html
- * @link https://bugzilla.mozilla.org/show_bug.cgi?id=41464
- */
-function setWrap(textarea, wrapAttrValue){
- textarea.setAttribute('wrap', wrapAttrValue);
-
- // Fix display for mozilla
- var parNod = textarea.parentNode;
- var nxtSib = textarea.nextSibling;
- parNod.removeChild(textarea);
- parNod.insertBefore(textarea, nxtSib);
-}
/**
* Handler to close all open Popups