diff --git a/suite/common/pref/pref-download.xul b/suite/common/pref/pref-download.xul index e31bb3c2b69..608d201525b 100644 --- a/suite/common/pref/pref-download.xul +++ b/suite/common/pref/pref-download.xul @@ -21,30 +21,121 @@ Contributor(s): --> - - + - + - + browser.downloadmanager.behavior - - - - - - - - + // startup function called by the prefs architecture. + function Startup() + { + DoEnabling(); + } - + function DoEnabling() + { + var increments = document.getElementById("offlineNewsDownloadIncrements"); + var textbox = document.getElementById("offlineNewsDownloadDays"); + var radio0 = document.getElementById("offlineNewsDownloadUseDays0"); + var radio1 = document.getElementById("offlineNewsDownloadUseDays1"); + var downloadByDate = document.getElementById("offlineNewsDownloadByDate"); + if( !downloadByDate.checked ) { + increments.setAttribute( "disabled", "true" ); + textbox.setAttribute( "disabled", "true" ); + radio0.setAttribute( "disabled", "true" ); + radio1.setAttribute( "disabled", "true" ); + } + else { + radio0.removeAttribute("disabled"); + radio1.removeAttribute("disabled"); + if( radio0.checked ) { + increments.removeAttribute( "disabled" ); + textbox.setAttribute( "disabled", "true" ); + } + else if( radio1.checked ) { + textbox.removeAttribute( "disabled" ); + increments.setAttribute( "disabled", "true" ); + } + } + } + + + + &newmes; + + + + &downOnlyCheck; + + + + + + &downDateCheck; + + + + + + + + + &fromRadio.label; + + + + + &yesterday.select; + &oneW.select; + &twoW.select; + &oneM.select; + &sixM.select; + &oneY.select; + + + + + + + + &sinceRadio.label; + + + + + &daysAgo; + + + + + + + + &Allmsg; + + &offlineMsgs; + +