From ca09b77d620896e202fa5eb4da4d30eed0c92ba3 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sat, 9 Jan 2010 13:05:24 +0100 Subject: Avoid whitespace because of toolbar pickers FS#1841 --- lib/scripts/toolbar.js | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib/scripts/toolbar.js') diff --git a/lib/scripts/toolbar.js b/lib/scripts/toolbar.js index eacfc7cad..1e4a91864 100644 --- a/lib/scripts/toolbar.js +++ b/lib/scripts/toolbar.js @@ -225,8 +225,10 @@ function pickerToggle(pickerid,btn){ picker.style.left = (x+3)+'px'; picker.style.top = (y+btn.offsetHeight+3)+'px'; picker.style.marginLeft = '0px'; + picker.style.marginTop = '0px'; }else{ picker.style.marginLeft = '-10000px'; + picker.style.marginTop = '-10000px'; } } @@ -239,6 +241,7 @@ function pickerClose(){ var pobjs = getElementsByClass('picker'); for(var i=0; i Date: Wed, 25 Nov 2009 15:47:59 +0100 Subject: Support for adding IDs and classes to toolbar buttons Ignore-this: 87db996b332355addacd81b1ac13b0ab darcs-hash:20091125144759-6e07b-601ea98a48d9d3c9dd3508cdb9cde9b86c83a5a3.gz --- lib/scripts/toolbar.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib/scripts/toolbar.js') diff --git a/lib/scripts/toolbar.js b/lib/scripts/toolbar.js index 1e4a91864..99ad1bb9c 100644 --- a/lib/scripts/toolbar.js +++ b/lib/scripts/toolbar.js @@ -27,7 +27,9 @@ function initToolbar(tbid,edid,tb){ // create new button var btn = createToolButton(tb[i]['icon'], tb[i]['title'], - tb[i]['key']); + tb[i]['key'], + tb[i]['id'], + tb[i]['class']); // type is a tb function -> assign it as onclick -- cgit v1.2.3 From c4ba149a58e742fab4739e2432ee00e41f1f7184 Mon Sep 17 00:00:00 2001 From: Adrian Lang Date: Mon, 8 Mar 2010 13:04:31 +0100 Subject: Allow filtering of block buttons in initToolbar --- lib/scripts/toolbar.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'lib/scripts/toolbar.js') diff --git a/lib/scripts/toolbar.js b/lib/scripts/toolbar.js index 99ad1bb9c..37987c21a 100644 --- a/lib/scripts/toolbar.js +++ b/lib/scripts/toolbar.js @@ -5,12 +5,13 @@ var pickercounter=0; /** * 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 + * @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 + * @param bool allowblock Allow buttons creating multiline content * @author Andreas Gohr */ -function initToolbar(tbid,edid,tb){ +function initToolbar(tbid,edid,tb, allowblock){ var toolbar = $(tbid); if(!toolbar) return; var edit = $(edid); @@ -22,6 +23,9 @@ function initToolbar(tbid,edid,tb){ var cnt = tb.length; for(var i=0; i Date: Tue, 9 Mar 2010 10:07:09 +0100 Subject: Introduce toolbar buttons for headers and stuff --- lib/scripts/toolbar.js | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib/scripts/toolbar.js') diff --git a/lib/scripts/toolbar.js b/lib/scripts/toolbar.js index 37987c21a..3f967448c 100644 --- a/lib/scripts/toolbar.js +++ b/lib/scripts/toolbar.js @@ -18,6 +18,10 @@ function initToolbar(tbid,edid,tb, allowblock){ if(!edit) return; if(edit.readOnly) return; + if (typeof allowblock === 'undefined') { + allowblock = true; + } + //empty the toolbar area: toolbar.innerHTML=''; -- cgit v1.2.3