зеркало из https://github.com/mozilla/gecko-dev.git
enable/disable elements in the duration radiogroup
This commit is contained in:
Родитель
f8facef6b2
Коммит
0741ff04a6
|
@ -48,6 +48,8 @@ function onLoad()
|
||||||
|
|
||||||
updateDeck();
|
updateDeck();
|
||||||
|
|
||||||
|
updateDuration();
|
||||||
|
|
||||||
opener.setCursor("auto");
|
opener.setCursor("auto");
|
||||||
|
|
||||||
self.focus();
|
self.focus();
|
||||||
|
@ -203,3 +205,23 @@ function updateDeck()
|
||||||
document.getElementById("period-deck").selectedIndex = Number(getElementValue("period-list"));
|
document.getElementById("period-deck").selectedIndex = Number(getElementValue("period-list"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function updateDuration()
|
||||||
|
{
|
||||||
|
var durationSelection = document.getElementById("recurrence-duration").selectedItem.value;
|
||||||
|
if (durationSelection == "forever") {
|
||||||
|
}
|
||||||
|
|
||||||
|
if (durationSelection == "ntimes") {
|
||||||
|
setElementValue("repeat-ntimes-count", false, "disabled");
|
||||||
|
setElementValue("repeat-ntimes-units", false, "disabled");
|
||||||
|
} else {
|
||||||
|
setElementValue("repeat-ntimes-count", "true", "disabled");
|
||||||
|
setElementValue("repeat-ntimes-units", "true", "disabled");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (durationSelection == "until") {
|
||||||
|
setElementValue("repeat-until-date", false, "disabled");
|
||||||
|
} else {
|
||||||
|
setElementValue("repeat-until-date", "true", "disabled");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -135,7 +135,7 @@
|
||||||
<spacer flex="1"/>
|
<spacer flex="1"/>
|
||||||
|
|
||||||
<vbox>
|
<vbox>
|
||||||
<radiogroup id="recurrence-duration">
|
<radiogroup id="recurrence-duration" oncommand="updateDuration()">
|
||||||
<grid flex="1">
|
<grid flex="1">
|
||||||
<columns>
|
<columns>
|
||||||
<column/>
|
<column/>
|
||||||
|
@ -152,7 +152,7 @@
|
||||||
<hbox>
|
<hbox>
|
||||||
<textbox id="repeat-ntimes-count" size="3"/>
|
<textbox id="repeat-ntimes-count" size="3"/>
|
||||||
<spacer flex="0.5"/>
|
<spacer flex="0.5"/>
|
||||||
<menulist>
|
<menulist id="repeat-ntimes-units">
|
||||||
<menupopup>
|
<menupopup>
|
||||||
<menuitem label="day(s)"/>
|
<menuitem label="day(s)"/>
|
||||||
<menuitem label="week(s)"/>
|
<menuitem label="week(s)"/>
|
||||||
|
|
Загрузка…
Ссылка в новой задаче