aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/lib/scripts/edit.js
diff options
context:
space:
mode:
authorAndreas Gohr <andi@splitbrain.org>2009-05-28 14:15:43 +0200
committerAndreas Gohr <andi@splitbrain.org>2009-05-28 14:15:43 +0200
commit6b6da7f587c020b3439dc14c8250766f895adb93 (patch)
tree0f1d7e467b0cc7fa50ab5521b40b5818d252c260 /lib/scripts/edit.js
parentbbca79d883e9dbd29f59556a7e12322da7e9b02a (diff)
downloaddokuwiki-6b6da7f587c020b3439dc14c8250766f895adb93.tar.gz
dokuwiki-6b6da7f587c020b3439dc14c8250766f895adb93.zip
more javascript refactoring
Ignore-this: 10badc0f97ef80fcd366ae4622c43ff1 darcs-hash:20090528121543-7ad00-df34efabe84c632df9ef0c6fd691c991d2c3ac82.gz
Diffstat (limited to 'lib/scripts/edit.js')
-rw-r--r--lib/scripts/edit.js75
1 files changed, 0 insertions, 75 deletions
diff --git a/lib/scripts/edit.js b/lib/scripts/edit.js
index 34305c53d..517daa086 100644
--- a/lib/scripts/edit.js
+++ b/lib/scripts/edit.js
@@ -126,81 +126,6 @@ function showPicker(pickerid,btn){
}
/**
- * Create a toolbar
- *
- * @param string tbid ID of the element where to insert the toolbar
- * @param string edid ID of the editor textarea
- * @param array tb Associative array defining the buttons
- * @author Andreas Gohr <andi@splitbrain.org>
- */
-function initToolbar(tbid,edid,tb){
- var toolbar = $(tbid);
- if(!toolbar) return;
-
- //empty the toolbar area:
- toolbar.innerHTML='';
-
- var cnt = tb.length;
- for(var i=0; i<cnt; i++){
- // create new button
- var btn = createToolButton(tb[i]['icon'],
- tb[i]['title'],
- tb[i]['key']);
-
- var actionFunc = 'addBtnAction'+tb[i]['type'].charAt(0).toUpperCase()+tb[i]['type'].substring(1);
- var exists = eval("typeof("+actionFunc+") == 'function'");
- if(exists)
- {
- if(eval(actionFunc+"(btn, tb[i], edid, i)"))
- toolbar.appendChild(btn);
- }else{
- alert('unknown type: '+tb[i]['type']);
- }
- } // end for
-}
-
-/**
- * Add button action for format buttons
- *
- * @param DOMElement btn Button element to add the action to
- * @param array props Associative array of button properties
- * @param string edid ID of the editor textarea
- * @return boolean If button should be appended
- * @author Gabriel Birke <birke@d-scribe.de>
- */
-function addBtnActionFormat(btn, props, edid)
-{
- var sample = props['title'];
- if(props['sample']){ sample = props['sample']; }
- eval("btn.onclick = function(){insertTags('"+
- jsEscape(edid)+"','"+
- jsEscape(props['open'])+"','"+
- jsEscape(props['close'])+"','"+
- jsEscape(sample)+
- "');return false;}");
-
- return true;
-}
-
-/**
- * Add button action for insert buttons
- *
- * @param DOMElement btn Button element to add the action to
- * @param array props Associative array of button properties
- * @param string edid ID of the editor textarea
- * @return boolean If button should be appended
- * @author Gabriel Birke <birke@d-scribe.de>
- */
-function addBtnActionInsert(btn, props, edid)
-{
- eval("btn.onclick = function(){insertAtCarret('"+
- jsEscape(edid)+"','"+
- jsEscape(props['insert'])+
- "');return false;}");
- return true;
-}
-
-/**
* Add button action for signature button
*
* @param DOMElement btn Button element to add the action to