- allow confirmation only for multiple selected

- confirm, confirm_multiple and allowOnMultiple get now inherited by children (@Andreas: allowOnMultiple does NOT work on children for some reason)
- add confirmation for more then one receipient in mail merge
- translations for etemplate part
This commit is contained in:
Ralf Becker 2011-06-30 17:35:52 +00:00
parent 95bbacf358
commit d654437a54
5 changed files with 27 additions and 2 deletions

View File

@ -804,7 +804,7 @@ abstract class bo_merge
$retString = '';
if (count($msgs['success'])>0) $retString .= count($msgs['success']).' '.lang('Message(s) send ok.');//implode('<br />',$msgs['success']);
//if (strlen($retString)>0) $retString .= '<br />';
if (count($msgs['failed'])>0) $retString .= count($msgs['failed']).' '.lang('Message(s) send failed.').'=>'.implode(', ',$msgs['failed']);
if (count($msgs['failed'])>0) $retString .= count($msgs['failed']).' '.lang('Message(s) send failed!').'=>'.implode(', ',$msgs['failed']);
return $retString;
break;
case 'application/vnd.oasis.opendocument.text':
@ -1025,6 +1025,13 @@ abstract class bo_merge
'group' => 2,
'children' => array(),
);
if ($file['mime'] == 'message/rfc822')
{
// does not work on children for some reason, now handled in felamimail_bo::importMessageToMergeAndSend
//$documents[$file['mime']]['allowOnMultiple'] = $GLOBALS['egw_info']['flags']['currentapp'] == 'addressbook';
// only need confirmation for multiple receipients for addressbook, as for others we can't do it anyway
if ($GLOBALS['egw_info']['flags']['currentapp'] == 'addressbook') $documents[$file['mime']]['confirm_multiple'] = lang('Do you want to send the message to all selected entries, WITHOUT further editing?');
}
}
$documents[$file['mime']]['children'][$prefix.$file['name']] = egw_vfs::decodePath($file['name']);
}
@ -1035,6 +1042,13 @@ abstract class bo_merge
'caption' => egw_vfs::decodePath($file['name']),
'group' => 2,
);
if ($file['mime'] == 'message/rfc822')
{
// does not work on children for some reason, now handled in felamimail_bo::importMessageToMergeAndSend
//$documents[$file['mime']]['allowOnMultiple'] = $GLOBALS['egw_info']['flags']['currentapp'] == 'addressbook';
// only need confirmation for multiple receipients for addressbook, as for others we can't do it anyway
if ($GLOBALS['egw_info']['flags']['currentapp'] == 'addressbook') $documents[$prefix.$file['name']]['confirm_multiple'] = lang('Do you want to send the message to all selected entries, WITHOUT further editing?');
}
}
}
return array(

View File

@ -704,7 +704,7 @@ class nextmatch_widget
// add sub-menues
if ($action['children'])
{
static $inherit_attrs = array('url','popup','nm_action','onExecute','type','egw_open');
static $inherit_attrs = array('url','popup','nm_action','onExecute','type','egw_open','allowOnMultiple','confirm','confirm_multiple');
$action['children'] = self::egw_actions($action['children'], $template_name, $action['prefix'], $action_links, $max_length,
array_intersect_key($action, array_flip($inherit_attrs)));

View File

@ -141,6 +141,11 @@ function nm_action(_action, _senders)
{
if (!confirm(confirm_msg)) return;
}
// in case we only need to confirm multiple selected (only _action.data.confirm_multiple)
else if (typeof _action.data.confirm_multiple != 'undefined' && (_senders.length > 1 || select_all && select_all.checked))
{
if (!confirm(_action.data.confirm_multiple)) return;
}
var url = '#';
if (typeof _action.data.url != 'undefined')

View File

@ -129,6 +129,7 @@ displayed in front of input or input is inserted for a '%s' in the label (label
displayed in statusline of browser if input-field gets focus etemplate de wird in der Statuszeile des Browsers angezeigt, wenn das Eingabefeld angesprochen wird
displayed in the top line of the groupbox (legend) etemplate de wird oben in der Umrandung der Gruppierung angezeigt (Legende)
do you want to save the changes you made in table %s? etemplate de Wollen Sie die Änderungen in der Tabelle '%s' speichern?
do you want to send the message to all selected entries, without further editing? etemplate de Wollen Sie die Nachricht an alle ausgewählten Einträge OHNE weitere Bearbeitung versenden?
document '%1' does not exist or is not readable for you! etemplate de Das Dokument '%1' steht nicht zur Verfügung, oder ist für Sie nicht lesbar!
documentation etemplate de Dokumentation
doesn't matter etemplate de spielt keine Rolle
@ -245,6 +246,8 @@ linkto etemplate de VerknüpfungZu
load this template into the editor etemplate de lädt diese Template zum Bearbeiten
maximum size for uploads filemanager de Maximale Größe beim Hochladen
message ... etemplate de Nachricht ...
message(s) send failed! etemplate de Senden der Nachricht(en) fehlgeschlagen!
message(s) send ok. etemplate de Nachricht(en) erfolgreich versandt.
middle etemplate de Mittig
minute etemplate de Minute
minutes etemplate de Minuten

View File

@ -129,6 +129,7 @@ displayed in front of input or input is inserted for a '%s' in the label (label
displayed in statusline of browser if input-field gets focus etemplate en Displayed in status line of browser if input field gets focus.
displayed in the top line of the groupbox (legend) etemplate en Displayed in the top line of the group box (legend).
do you want to save the changes you made in table %s? etemplate en Do you want to save the changes you made in table %s?
do you want to send the message to all selected entries, without further editing? etemplate en Do you want to send the message to all selected entries, WITHOUT further editing?
document '%1' does not exist or is not readable for you! etemplate en Document '%1' does not exist or is not readable for you!
documentation etemplate en Documentation
doesn't matter etemplate en Doesn't matter
@ -245,6 +246,8 @@ linkto etemplate en Link to
load this template into the editor etemplate en Load template to the editor
maximum size for uploads filemanager en Maximum upload size
message ... etemplate en Message ...
message(s) send failed! etemplate en Message(s) send failed!
message(s) send ok. etemplate en Message(s) send ok.
middle etemplate en Middle
minute etemplate en Minute
minutes etemplate en Minutes