summaryrefslogtreecommitdiffstats
path: root/public
diff options
context:
space:
mode:
authorBjörn Geiger2011-10-18 11:14:41 +0200
committerBjörn Geiger2011-10-18 11:14:41 +0200
commit951bda205350b22c3d3cd930f892aa95e9885a20 (patch)
tree80c8d0cf98345906fbace32505931b29c80d3234 /public
parentminor (diff)
downloadpoolctrl-951bda205350b22c3d3cd930f892aa95e9885a20.tar.gz
poolctrl-951bda205350b22c3d3cd930f892aa95e9885a20.tar.xz
poolctrl-951bda205350b22c3d3cd930f892aa95e9885a20.zip
weiteres
Diffstat (limited to 'public')
-rwxr-xr-xpublic/media/js/script.js31
1 files changed, 21 insertions, 10 deletions
diff --git a/public/media/js/script.js b/public/media/js/script.js
index eb828af..9e00e6c 100755
--- a/public/media/js/script.js
+++ b/public/media/js/script.js
@@ -123,7 +123,7 @@ function repeatChanged(name) {
}
}
-function immediateChanged(name) {
+function immediateChanged(name, bootosIDs) {
if (getElementAttribute(name, 'checked')) {
setElementInvisible("start-label");
setElementInvisible("start-element");
@@ -159,8 +159,6 @@ function immediateChanged(name) {
} else {
setElementVisible("start-label");
setElementVisible("start-element");
- setElementVisible("end-label");
- setElementVisible("end-element");
setElementVisible("repeat-label");
setElementVisible("repeat-element");
setElementVisible("note-label");
@@ -168,15 +166,14 @@ function immediateChanged(name) {
setElementVisible("participants-label");
setElementVisible("participants-element");
enableElement('start');
- enableElement('end');
enableElement('repeat');
enableElement('note');
enableElement('participants');
- repeatChanged('repeat');
+ addeventcategoryfieldChanged('category', bootosIDs);
}
}
-function addeventcategoryfieldChanged(name, bootosIDs) {
+function addeventcategoryfieldChanged(name, bootosIDs, save) {
option = $('#' + name + ' option[value="' + getElementValue(name) + '"]');
label = option.attr('label');
startLabel = $('#start-label');
@@ -190,7 +187,9 @@ function addeventcategoryfieldChanged(name, bootosIDs) {
enableElement('immediate');
enableElement('pbs_bootosID');
disableElement('end');
- removeElementAttribute('repeat', 'checked');
+ if(!save) {
+ removeElementAttribute('repeat', 'checked');
+ }
startLabel.children().text('Date:');
bootosfieldChanged('pbs_bootosID', bootosIDs);
} else if (label == 'Shutdown') {
@@ -203,7 +202,9 @@ function addeventcategoryfieldChanged(name, bootosIDs) {
enableElement('immediate');
disableElement('end');
disableElement('pbs_bootosID');
- removeElementAttribute('repeat', 'checked');
+ if(!save) {
+ removeElementAttribute('repeat', 'checked');
+ }
startLabel.children().text('Date:');
for (i = 0; i < bootosIDs.length; i++) {
id = bootosIDs[i];
@@ -216,9 +217,14 @@ function addeventcategoryfieldChanged(name, bootosIDs) {
setElementVisible("end-element");
setElementInvisible("immediate-label");
setElementInvisible("immediate-element");
+ setElementVisible("pbs_bootosID-label");
+ setElementVisible("pbs_bootosID-element");
enableElement('end');
+ enableElement('pbs_bootosID');
disableElement('immediate');
- setElementAttribute('repeat', 'checked', 'checked');
+ if(!save) {
+ setElementAttribute('repeat', 'checked', 'checked');
+ }
startLabel.children().text('Start:');
bootosfieldChanged('pbs_bootosID', bootosIDs);
} else {
@@ -226,9 +232,14 @@ function addeventcategoryfieldChanged(name, bootosIDs) {
setElementVisible("end-element");
setElementInvisible("immediate-label");
setElementInvisible("immediate-element");
+ setElementVisible("pbs_bootosID-label");
+ setElementVisible("pbs_bootosID-element");
enableElement('end');
+ enableElement('pbs_bootosID');
disableElement('immediate');
- removeElementAttribute('repeat', 'checked');
+ if(!save) {
+ removeElementAttribute('repeat', 'checked');
+ }
startLabel.children().text('Start:');
bootosfieldChanged('pbs_bootosID', bootosIDs);
}