mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-02-02 19:39:26 +01:00
fixed broken emailadmin editProfile add/edit/delete mailAlternate/mailForward
This commit is contained in:
parent
239624ad56
commit
5070027e00
@ -42,7 +42,7 @@ class uiuserdata
|
||||
|
||||
function display_app_header()
|
||||
{
|
||||
$GLOBALS['egw']->js->validate_file('jscode','editUserdata','emailadmin');
|
||||
$GLOBALS['egw']->js->validate_file('.','app','emailadmin');
|
||||
$GLOBALS['egw_info']['flags']['include_xajax'] = True;
|
||||
|
||||
$GLOBALS['egw']->common->egw_header();
|
||||
|
@ -21,3 +21,63 @@ function disableGroupSelector()
|
||||
document.getElementById('exec[ea_group]').disabled = false;
|
||||
}
|
||||
}
|
||||
|
||||
function addRow(_selectBoxName, _prompt) {
|
||||
result = prompt(_prompt, '');
|
||||
|
||||
if((result == '') || (result == null)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
var newOption = new Option(result, result);
|
||||
|
||||
selectBox = document.getElementById(_selectBoxName);
|
||||
var length = selectBox.length;
|
||||
|
||||
selectBox.options[length] = newOption;
|
||||
selectBox.selectedIndex = length;
|
||||
}
|
||||
|
||||
function editRow(_selectBoxName, _prompt) {
|
||||
selectBox = document.getElementById(_selectBoxName);
|
||||
|
||||
selectedItem = selectBox.selectedIndex;
|
||||
|
||||
if(selectedItem != null && selectedItem != -1) {
|
||||
value = selectBox.options[selectedItem].text;
|
||||
result = prompt(_prompt, value);
|
||||
|
||||
if((result == '') || (result == null)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
var newOption = new Option(result, result);
|
||||
|
||||
selectBox.options[selectedItem] = newOption;
|
||||
selectBox.selectedIndex = selectedItem;
|
||||
}
|
||||
}
|
||||
|
||||
function removeRow(_selectBoxName) {
|
||||
selectBox = document.getElementById(_selectBoxName);
|
||||
|
||||
selectedItem = selectBox.selectedIndex;
|
||||
if(selectedItem != null) {
|
||||
selectBox.options[selectedItem] = null;
|
||||
}
|
||||
selectedItem--;
|
||||
if(selectedItem >= 0) {
|
||||
selectBox.selectedIndex = selectedItem;
|
||||
} else if (selectBox.length > 0) {
|
||||
selectBox.selectedIndex = 0;
|
||||
}
|
||||
}
|
||||
|
||||
function selectAllOptions(_selectBoxName) {
|
||||
selectBox = document.getElementById(_selectBoxName);
|
||||
|
||||
for(var i=0;i<selectBox.length;i++) {
|
||||
selectBox[i].selected=true;
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user