diff --git a/phpgwapi/js/dragDropFunctions.js b/phpgwapi/js/dragDropFunctions.js new file mode 100644 index 0000000000..5be181b2ff --- /dev/null +++ b/phpgwapi/js/dragDropFunctions.js @@ -0,0 +1,12 @@ +function dragSidebar() +{ + if(!dd.obj.sideresizeStart) { dd.obj.sideresizeStart = dd.obj.x; } + var mainbox = dd.elements.thesideboxcolumn; + mainbox.resizeTo(dd.obj.x-dd.obj.sideresizeStart+parseInt(dd.obj.my_sideboxwidth), mainbox.h); +} + +function dropSidebar() +{ + var mainbox = dd.elements.thesideboxcolumn; + xajax_doXMLHTTP("preferences.ajaxpreferences.storeEGWPref","common","idotssideboxwidth",mainbox.w); +} \ No newline at end of file diff --git a/phpgwapi/templates/idots/sidebox_dhtml.tpl.php b/phpgwapi/templates/idots/sidebox_dhtml.tpl.php index 36bce9d05f..3498f3c58a 100644 --- a/phpgwapi/templates/idots/sidebox_dhtml.tpl.php +++ b/phpgwapi/templates/idots/sidebox_dhtml.tpl.php @@ -1,26 +1,25 @@ - - - - \ No newline at end of file + $dragdrop->addCustom( + 'thesideboxcolumn', + array('NO_DRAG'), + false, + false, + false + ); + + $dragdrop->addCustom( + 'sideresize', + array('CURSOR_W_RESIZE','MAXOFFBOTTOM+0','MAXOFFTOP+0','MAXOFFLEFT+1000','MAXOFFRIGHT+1000'), + array('sideboxwidth'=>$this->sideboxwidth), + 'phpgwapi.dragDropFunctions.dragSidebar', + 'phpgwapi.dragDropFunctions.dropSidebar' + ); + + $dragdrop->setJSCode(); +} \ No newline at end of file