From: <cl...@hy...> - 2008-03-06 23:34:01
|
Author: clee Date: 2008-03-06 15:33:57 -0800 (Thu, 06 Mar 2008) New Revision: 8107 URL: http://svn.hyperic.org/?view=rev&root=Hyperic+HQ&revision=8107 Modified: branches/HQ_3_2/web/js/alertConfigFunctions.js Log: [HQ-1208] Disable the count conditions when recovery alert is selected [merge from HEAD] Modified: branches/HQ_3_2/web/js/alertConfigFunctions.js =================================================================== --- branches/HQ_3_2/web/js/alertConfigFunctions.js 2008-03-06 23:27:36 UTC (rev 8106) +++ branches/HQ_3_2/web/js/alertConfigFunctions.js 2008-03-06 23:33:57 UTC (rev 8107) @@ -115,7 +115,7 @@ } function checkRecover() { - if (document.forms[0].disableForRecovery.checked == true) { + if (document.forms[0].disableForRecovery.checked) { document.forms[0].recoverId.disabled = true; } else { @@ -124,9 +124,22 @@ if (document.forms[0].recoverId.value == '') { document.forms[0].disableForRecovery.disabled = false; + document.forms[0].whenEnabled[2].disabled = false; + document.forms[0].numTimesNT.disabled = false; + document.forms[0].howLongNT.disabled = false; + document.forms[0].howLongUnitsNT.disabled = false; } else { document.forms[0].disableForRecovery.disabled = true; + + if (document.forms[0].whenEnabled[2].checked) { + document.forms[0].whenEnabled[0].checked = true; + } + + document.forms[0].whenEnabled[2].disabled = true; + document.forms[0].numTimesNT.disabled = true; + document.forms[0].howLongNT.disabled = true; + document.forms[0].howLongUnitsNT.disabled = true; } } |