Added bzip support for dump files

This commit is contained in:
Loïc Chapeaux
2001-07-15 00:31:36 +00:00
parent 997cae5159
commit 81d95fa3af
29 changed files with 127 additions and 40 deletions

View File

@@ -46,7 +46,8 @@ function checkFormElementInRange(theForm, theFieldName, min, max)
/**
* Ensures the choice between 'transmit' and 'gzipped' checkboxes is consistant
* Ensures the choice between 'transmit', 'gzipped' and 'bzipped' checkboxes is
* consistant
*
* @param object the form
* @param string a code for the action that causes this function to be run
@@ -57,19 +58,33 @@ function checkTransmitDump(theForm, theAction)
{
var formElts = theForm.elements;
// 'gzipped' option has been checked/unchecked
if (theAction == 'gzip') {
if (formElts['gzip'].checked && !formElts['asfile'].checked) {
// 'gzipped' option has been checked
if (theAction == 'gzip' && formElts['gzip'].checked) {
if (!formElts['asfile'].checked) {
theForm.elements['asfile'].checked = true;
}
if (typeof(formElts['bzip']) != 'undefined' && formElts['bzip'].checked) {
theForm.elements['bzip'].checked = false;
}
}
// 'transmit' option has been checked/unchecked
else if (theAction == 'transmit') {
if (!formElts['asfile'].checked
&& (typeof(formElts['gzip']) != 'undefined' && formElts['gzip'].checked)) {
// 'bzipped' option has been checked
else if (theAction == 'bzip' && formElts['bzip'].checked) {
if (!formElts['asfile'].checked) {
theForm.elements['asfile'].checked = true;
}
if (typeof(formElts['gzip']) != 'undefined' && formElts['gzip'].checked) {
theForm.elements['gzip'].checked = false;
}
}
// 'transmit' option has been unchecked
else if (theAction == 'transmit' && !formElts['asfile'].checked) {
if ((typeof(formElts['gzip']) != 'undefined' && formElts['gzip'].checked)) {
theForm.elements['gzip'].checked = false;
}
if ((typeof(formElts['bzip']) != 'undefined' && formElts['bzip'].checked)) {
theForm.elements['bzip'].checked = false;
}
}
return true;
} // end of the 'checkTransmitDump()' function