X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/kivitendo-erp.git/blobdiff_plain/f28c12f11051077c53455e3801ba89dc860768be..6dd6719d91cf5a48acb6fb3731f9e143d7a7d83b:/js/switchmenuframe.js diff --git a/js/switchmenuframe.js b/js/switchmenuframe.js index 0399a2ebe..ed7c48f29 100644 --- a/js/switchmenuframe.js +++ b/js/switchmenuframe.js @@ -1,20 +1,17 @@ -/* This is used in bin/mozilla/kopf.pl to switch the HTML sidemenu on/off - 2010, Sven Donath, lxo@dexo.de */ - var vSwitch_Menu = 1; - -function Switch_Menu(framesize) -{ - if (vSwitch_Menu) - { - vSwitch_Menu=false; - parent.document.getElementById('menuframe').setAttribute('cols','30,*') - } - else - { - vSwitch_Menu=true; - framesize = framesize + ',*'; - parent.document.getElementById('menuframe').setAttribute('cols',framesize); - } - return; +function Switch_Menu() { + vSwitch_Menu=!vSwitch_Menu; + SetMenuFolded(vSwitch_Menu); } +function SetMenuFolded(on) { + if (on) { + $('#html-menu').removeClass('folded'); + $('#content').removeClass('folded'); + } else { + $('#html-menu').addClass('folded'); + $('#content').addClass('folded'); + } +} +$(function(){ + SetMenuFolded(vSwitch_Menu); +})