X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=js%2Fswitchmenuframe.js;h=055a7d91ccf6865d8e5ffb1fd72793b8118528b2;hb=d6d92d88c7bbfd0de64eb650d6ed97c9daffe1d7;hp=0399a2ebe3a0b2c289c878bc34d4078b7ac5d86c;hpb=f28c12f11051077c53455e3801ba89dc860768be;p=kivitendo-erp.git diff --git a/js/switchmenuframe.js b/js/switchmenuframe.js index 0399a2ebe..055a7d91c 100644 --- a/js/switchmenuframe.js +++ b/js/switchmenuframe.js @@ -1,20 +1,15 @@ -/* 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; +var Frame; +var FrameSize; -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() { + if (Frame) { + Frame.attr('cols',vSwitch_Menu ? '30,*' : FrameSize); + vSwitch_Menu=!vSwitch_Menu; + } } + +$(function(){ + Frame = $(parent.document.getElementById('menuframe')); + FrameSize = Frame.attr('cols'); +})