From: Sven Schöling Date: Fri, 31 Aug 2012 10:12:11 +0000 (+0200) Subject: switchmenuframe so umgeschrieben dass es keine fehler wirft X-Git-Tag: release-3.0.0beta1~215 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=42575e7218eebbeef11c641ac4879adb2775fdd8;p=kivitendo-erp.git switchmenuframe so umgeschrieben dass es keine fehler wirft --- diff --git a/js/switchmenuframe.js b/js/switchmenuframe.js index ec2242648..055a7d91c 100644 --- a/js/switchmenuframe.js +++ b/js/switchmenuframe.js @@ -1,17 +1,15 @@ var vSwitch_Menu = 1; -var FrameSize = (parent.document.getElementById('menuframe').cols); +var Frame; +var FrameSize; -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() { + if (Frame) { + Frame.attr('cols',vSwitch_Menu ? '30,*' : FrameSize); + vSwitch_Menu=!vSwitch_Menu; + } } + +$(function(){ + Frame = $(parent.document.getElementById('menuframe')); + FrameSize = Frame.attr('cols'); +})