forked from extern/egroupware
- Fix select all confirm message
- When copying and name exists, try again with user lid. If that fails, give nice error message - When done editing a definition, send to definition index instead of reload + send POST again
This commit is contained in:
parent
ed8c386a12
commit
42af223052
@ -238,7 +238,7 @@ class importexport_definitions_ui
|
|||||||
'select_all' => array(
|
'select_all' => array(
|
||||||
'caption' => 'Whole query',
|
'caption' => 'Whole query',
|
||||||
'checkbox' => true,
|
'checkbox' => true,
|
||||||
'hint' => 'Apply the action on the whole query, NOT only the shown contacts!!!',
|
'hint' => 'Apply the action on the whole query, NOT only the shown definitions!!!',
|
||||||
'group' => ++$group,
|
'group' => ++$group,
|
||||||
),
|
),
|
||||||
'copy' => array(
|
'copy' => array(
|
||||||
@ -275,7 +275,7 @@ class importexport_definitions_ui
|
|||||||
* @param boolean $use_all if true use all entries of the current selection (in the session)
|
* @param boolean $use_all if true use all entries of the current selection (in the session)
|
||||||
* @param int &$success number of succeded actions
|
* @param int &$success number of succeded actions
|
||||||
* @param int &$failed number of failed actions (not enought permissions)
|
* @param int &$failed number of failed actions (not enought permissions)
|
||||||
* @param string &$action_msg translated verb for the actions, to be used in a message like %1 contacts 'deleted'
|
* @param string &$action_msg translated verb for the actions, to be used in a message like %1 entries 'deleted'
|
||||||
* @param string/array $session_name 'index' or 'email', or array with session-data depending if we are in the main list or the popup
|
* @param string/array $session_name 'index' or 'email', or array with session-data depending if we are in the main list or the popup
|
||||||
* @return boolean true if all actions succeded, false otherwise
|
* @return boolean true if all actions succeded, false otherwise
|
||||||
*/
|
*/
|
||||||
@ -360,7 +360,18 @@ class importexport_definitions_ui
|
|||||||
if($definition['definition_id']) {
|
if($definition['definition_id']) {
|
||||||
unset($definition['definition_id']);
|
unset($definition['definition_id']);
|
||||||
$definition['name'] = $settings ? $settings : $definition['name'] . ' copy';
|
$definition['name'] = $settings ? $settings : $definition['name'] . ' copy';
|
||||||
$bodefinitions->save($definition);
|
try {
|
||||||
|
$bodefinitions->save($definition);
|
||||||
|
} catch (Exception $e) {
|
||||||
|
try {
|
||||||
|
$definition['name'] .= ' ' . $GLOBALS['egw_info']['user']['account_lid'];
|
||||||
|
$bodefinitions->save($definition);
|
||||||
|
} catch (Exception $ex) {
|
||||||
|
$failed++;
|
||||||
|
$msg .= lang('Duplicate name');
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
$success++;
|
$success++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -490,7 +501,7 @@ class importexport_definitions_ui
|
|||||||
if ($content['closewindow'])
|
if ($content['closewindow'])
|
||||||
{
|
{
|
||||||
$this->response->addScript("window.close();");
|
$this->response->addScript("window.close();");
|
||||||
$this->response->addScript("opener.location.reload();");
|
$this->response->addScript("opener.location = '" . egw::link('/index.php', array('menuaction' => 'importexport.importexport_definitions_ui.index')) . "';");
|
||||||
// If Browser can't close window we display a "close" buuton and
|
// If Browser can't close window we display a "close" buuton and
|
||||||
// need to disable normal buttons
|
// need to disable normal buttons
|
||||||
$this->response->addAssign('exec[button][previous]','style.display', 'none');
|
$this->response->addAssign('exec[button][previous]','style.display', 'none');
|
||||||
|
Loading…
Reference in New Issue
Block a user