X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=js%2Fswitchmenuframe.js;h=ed7c48f29f33887c72466903b853a4de4edf2d5f;hb=c13a2652c90aa3b2282a8ee4dd24df88838ab43e;hp=d0bf2ac2d4ff6ac2428c085d2833b25c8c4c7f43;hpb=da80eb32dd2158bc959a15db82002e58628d8a32;p=kivitendo-erp.git 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); +})