* 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 --> <!-- END filterrow -->
<!-- BEGIN vacation --> <!-- BEGIN vacation -->
<script LANGUAGE="JavaScript" TYPE="text/javascript">
<form ACTION="{vacation_action_url}" METHOD="post" NAME="editVacation"> 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> <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;"> <table WIDTH="100%" CELLPADDING="2" CELLSPACING="1" style="border: 1px solid silver;">
<tr CLASS="th"> <tr CLASS="th">

View File

@ -46,22 +46,27 @@
{ {
idSelectedValues = document.getElementById("htmlclass_selected_values"); idSelectedValues = document.getElementById("htmlclass_selected_values");
idPredefinedValues = document.getElementById("htmlclass_predefined_values"); idPredefinedValues = document.getElementById("htmlclass_predefined_values");
while(idSelectedValues.selectedIndex != -1)
if(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, NewOption = new Option(idSelectedValues.options[idSelectedValues.selectedIndex].text,
idSelectedValues.options[idSelectedValues.selectedIndex].value,false,true); idSelectedValues.options[idSelectedValues.selectedIndex].value,false,true);
idPredefinedValues.options[idPredefinedValues.length] = NewOption; idPredefinedValues.options[idPredefinedValues.length] = NewOption;
idSelectedValues.options[idSelectedValues.selectedIndex] = null; 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() function selectAllOptions()
@ -110,8 +115,8 @@
<tr> <tr>
<td width="50%" align="right" rowspan="2" valign="top"> <td width="50%" align="right" rowspan="2" valign="top">
<select name="{multiSelectBox_valueName}[]" id="htmlclass_selected_values" size=8 <select name="{multiSelectBox_valueName}[]" id="htmlclass_selected_values" size=8
style="width : 250px;" multiple="multiple" ondblclick="removeValue()" style="width : 250px;" multiple="multiple" ondblclick="removeValue()">
onblur="selectAllOptions()"> <!-- onblur="selectAllOptions()" on blur was removed here and substituded with the call of selectAllOptions on submit -->
{multiSelectBox_selected_options} {multiSelectBox_selected_options}
</select> </select>
</td> </td>