diff options
Diffstat (limited to 'lib/scripts/edit.js')
-rw-r--r-- | lib/scripts/edit.js | 75 |
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 |