* email: improve the handling of addresses in edit of vacationnotice (SIEVE)

This commit is contained in:
Klaus Leithoff 2012-07-06 13:35:29 +00:00
parent 9b5bb433f6
commit 5a08e4d8a1
2 changed files with 25 additions and 13 deletions

View File

@ -190,8 +190,15 @@ function createScript()
<!-- END filterrow -->
<!-- BEGIN vacation -->
<form ACTION="{vacation_action_url}" METHOD="post" NAME="editVacation">
<script LANGUAGE="JavaScript" TYPE="text/javascript">
function submitIt()
{
selectAllOptions();
//document.editVacation.submit();
return true;
}
</script>
<form ACTION="{vacation_action_url}" METHOD="post" NAME="editVacation" onsubmit="return submitIt()">
<p style="color: red; font-style: italic; text-align: center;">{validation_errors}</p>
<table WIDTH="100%" CELLPADDING="2" CELLSPACING="1" style="border: 1px solid silver;">
<tr CLASS="th">

View File

@ -46,24 +46,29 @@
{
idSelectedValues = document.getElementById("htmlclass_selected_values");
idPredefinedValues = document.getElementById("htmlclass_predefined_values");
if(idSelectedValues.selectedIndex != -1)
while(idSelectedValues.selectedIndex != -1)
{
// if we want to allow removing only one by one, we need this and section idselectioncontrol
// AND need to disable the selectAllOptions at the end of the function
//for(i=0;i<idSelectedValues.length;++i)
//{
// if (idSelectedValues[i].selected) break;
//}
NewOption = new Option(idSelectedValues.options[idSelectedValues.selectedIndex].text,
idSelectedValues.options[idSelectedValues.selectedIndex].value,false,true);
idPredefinedValues.options[idPredefinedValues.length] = NewOption;
idSelectedValues.options[idSelectedValues.selectedIndex] = null;
// section idselectioncontrol
//if (i>idSelectedValues.length-1) i=idSelectedValues.length-1;
//if (idSelectedValues.length!=0)idSelectedValues.options[i].selected = true;
for(i=0;i<idSelectedValues.length;++i)
{
idSelectedValues.options[i].selected = true;
}
sortSelect(idPredefinedValues);
}
sortSelect(idPredefinedValues);
selectAllOptions();
}
function selectAllOptions()
{
idSelectedValues = document.getElementById("htmlclass_selected_values");
@ -110,8 +115,8 @@
<tr>
<td width="50%" align="right" rowspan="2" valign="top">
<select name="{multiSelectBox_valueName}[]" id="htmlclass_selected_values" size=8
style="width : 250px;" multiple="multiple" ondblclick="removeValue()"
onblur="selectAllOptions()">
style="width : 250px;" multiple="multiple" ondblclick="removeValue()">
<!-- onblur="selectAllOptions()" on blur was removed here and substituded with the call of selectAllOptions on submit -->
{multiSelectBox_selected_options}
</select>
</td>