X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/kivitendo-erp.git/blobdiff_plain/da80eb32dd2158bc959a15db82002e58628d8a32..6dd6719d91cf5a48acb6fb3731f9e143d7a7d83b:/js/switchmenuframe.js diff --git a/js/switchmenuframe.js b/js/switchmenuframe.js index d0bf2ac2d..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 side menu on/off - 2010, Sven Donath, lxo@dexo.de */ - var vSwitch_Menu = 1; -var FrameSize = (parent.document.getElementById('menuframe').cols); - -function Switch_Menu() -{ - if (vSwitch_Menu) - { - vSwitch_Menu=false; - parent.document.getElementById('menuframe').setAttribute('cols','30,*'); - } - else - { - vSwitch_Menu=true; - 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); +})