From 20febccd573074ab3384fa69da40504abadb172b Mon Sep 17 00:00:00 2001 From: Björn Geiger Date: Tue, 18 Oct 2011 11:37:02 +0200 Subject: weitere Korrektur --- public/media/js/script.js | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'public') diff --git a/public/media/js/script.js b/public/media/js/script.js index 9e00e6c..6e75665 100755 --- a/public/media/js/script.js +++ b/public/media/js/script.js @@ -123,7 +123,7 @@ function repeatChanged(name) { } } -function immediateChanged(name, bootosIDs) { +function immediateChanged(name, bootosIDs, add) { if (getElementAttribute(name, 'checked')) { setElementInvisible("start-label"); setElementInvisible("start-element"); @@ -169,11 +169,15 @@ function immediateChanged(name, bootosIDs) { enableElement('repeat'); enableElement('note'); enableElement('participants'); - addeventcategoryfieldChanged('category', bootosIDs); + if(!add) { + addeventcategoryfieldChanged('category', bootosIDs); + } else { + addeventcategoryfieldChanged('category', bootosIDs, add); + } } } -function addeventcategoryfieldChanged(name, bootosIDs, save) { +function addeventcategoryfieldChanged(name, bootosIDs, add) { option = $('#' + name + ' option[value="' + getElementValue(name) + '"]'); label = option.attr('label'); startLabel = $('#start-label'); @@ -187,7 +191,7 @@ function addeventcategoryfieldChanged(name, bootosIDs, save) { enableElement('immediate'); enableElement('pbs_bootosID'); disableElement('end'); - if(!save) { + if(!add) { removeElementAttribute('repeat', 'checked'); } startLabel.children().text('Date:'); @@ -202,7 +206,7 @@ function addeventcategoryfieldChanged(name, bootosIDs, save) { enableElement('immediate'); disableElement('end'); disableElement('pbs_bootosID'); - if(!save) { + if(!add) { removeElementAttribute('repeat', 'checked'); } startLabel.children().text('Date:'); @@ -222,7 +226,7 @@ function addeventcategoryfieldChanged(name, bootosIDs, save) { enableElement('end'); enableElement('pbs_bootosID'); disableElement('immediate'); - if(!save) { + if(!add) { setElementAttribute('repeat', 'checked', 'checked'); } startLabel.children().text('Start:'); @@ -237,7 +241,7 @@ function addeventcategoryfieldChanged(name, bootosIDs, save) { enableElement('end'); enableElement('pbs_bootosID'); disableElement('immediate'); - if(!save) { + if(!add) { removeElementAttribute('repeat', 'checked'); } startLabel.children().text('Start:'); -- cgit v1.2.3-55-g7522