mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-14 09:58:16 +01:00
fixed not working download via action system: needed submit via POST request instead of Ajax, add new boolean action attribute postSubmit
This commit is contained in:
parent
b4accbbcb5
commit
6e30816758
@ -599,7 +599,11 @@ class addressbook_ui extends addressbook_bo
|
|||||||
'url' => 'menuaction=importexport.importexport_export_ui.export_dialog&appname=addressbook&plugin=addressbook_export_contacts_csv&selection=$id',
|
'url' => 'menuaction=importexport.importexport_export_ui.export_dialog&appname=addressbook&plugin=addressbook_export_contacts_csv&selection=$id',
|
||||||
'popup' => '850x440'
|
'popup' => '850x440'
|
||||||
),
|
),
|
||||||
'vcard' => 'Export as VCard',
|
'vcard' => array(
|
||||||
|
'caption' => 'Export as VCard',
|
||||||
|
'postSubmit' => true, // download needs post submit (not Ajax) to work
|
||||||
|
'icon' => egw_vfs::mime_icon('text/vcard'),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -879,11 +879,12 @@ class calendar_uilist extends calendar_ui
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
$actions['ical'] = array(
|
$actions['ical'] = array(
|
||||||
'icon' => 'filesave',
|
'icon' => egw_vfs::mime_icon('text/calendar'),
|
||||||
'caption' => 'Export (iCal)',
|
'caption' => 'Export iCal',
|
||||||
'group' => ++$group,
|
'group' => ++$group,
|
||||||
'hint' => 'Download this event as iCal',
|
'hint' => 'Download this event as iCal',
|
||||||
'disableClass' => 'rowNoView',
|
'disableClass' => 'rowNoView',
|
||||||
|
'postSubmit' => true, // download needs post submit (not Ajax) to work
|
||||||
);
|
);
|
||||||
$actions['documents'] = calendar_merge::document_action(
|
$actions['documents'] = calendar_merge::document_action(
|
||||||
$this->bo->cal_prefs['document_dir'], ++$group, 'Insert in document', 'document_',
|
$this->bo->cal_prefs['document_dir'], ++$group, 'Insert in document', 'document_',
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
* @link http://www.egroupware.org
|
* @link http://www.egroupware.org
|
||||||
* @author Ralf Becker <RalfBecker-AT-outdoor-training.de>
|
* @author Ralf Becker <RalfBecker-AT-outdoor-training.de>
|
||||||
* @package addressbook
|
* @package addressbook
|
||||||
* @copyright (c) 2007-11 by Ralf Becker <RalfBecker-AT-outdoor-training.de>
|
* @copyright (c) 2007-13 by Ralf Becker <RalfBecker-AT-outdoor-training.de>
|
||||||
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
|
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
|
||||||
* @version $Id$
|
* @version $Id$
|
||||||
*/
|
*/
|
||||||
@ -1668,6 +1668,7 @@ abstract class bo_merge
|
|||||||
'icon' => egw_vfs::mime_icon($file['mime']),
|
'icon' => egw_vfs::mime_icon($file['mime']),
|
||||||
'caption' => egw_vfs::decodePath(egw_vfs::basename($default_doc)),
|
'caption' => egw_vfs::decodePath(egw_vfs::basename($default_doc)),
|
||||||
'group' => 1,
|
'group' => 1,
|
||||||
|
'postSubmit' => true, // download needs post submit (not Ajax) to work
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1737,6 +1738,7 @@ abstract class bo_merge
|
|||||||
'icon' => egw_vfs::mime_icon($file['mime']),
|
'icon' => egw_vfs::mime_icon($file['mime']),
|
||||||
'caption' => egw_vfs::decodePath($name_arr[$count]),
|
'caption' => egw_vfs::decodePath($name_arr[$count]),
|
||||||
'group' => 2,
|
'group' => 2,
|
||||||
|
'postSubmit' => true, // download needs post submit (not Ajax) to work
|
||||||
);
|
);
|
||||||
if ($file['mime'] == 'message/rfc822')
|
if ($file['mime'] == 'message/rfc822')
|
||||||
{
|
{
|
||||||
@ -1788,6 +1790,7 @@ abstract class bo_merge
|
|||||||
'icon' => egw_vfs::mime_icon($file['mime']),
|
'icon' => egw_vfs::mime_icon($file['mime']),
|
||||||
'caption' => egw_vfs::decodePath($file['name']),
|
'caption' => egw_vfs::decodePath($file['name']),
|
||||||
'group' => 2,
|
'group' => 2,
|
||||||
|
'postSubmit' => true, // download needs post submit (not Ajax) to work
|
||||||
);
|
);
|
||||||
if ($file['mime'] == 'message/rfc822')
|
if ($file['mime'] == 'message/rfc822')
|
||||||
{
|
{
|
||||||
|
@ -151,16 +151,23 @@ function nm_action(_action, _senders, _target, _ids)
|
|||||||
{
|
{
|
||||||
// Force nextmatch to re-load affected rows
|
// Force nextmatch to re-load affected rows
|
||||||
nextmatch.refresh(idsArr);
|
nextmatch.refresh(idsArr);
|
||||||
|
}
|
||||||
|
|
||||||
nextmatch.getInstanceManager().submit();
|
// downloads need a regular submit via POST (no Ajax)
|
||||||
|
if (_action.data.postSubmit)
|
||||||
// Reset action in case there's another one
|
{
|
||||||
nextmatch.getValue = old_value;
|
nextmatch.getInstanceManager().postSubmit();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
nextmatch.getInstanceManager().submit();
|
nextmatch.getInstanceManager().submit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(_action.data.nm_action == 'open_popup')
|
||||||
|
{
|
||||||
|
// Reset action in case there's another one
|
||||||
|
nextmatch.getValue = old_value;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -1117,8 +1117,9 @@ class infolog_ui
|
|||||||
$this->prefs['default_document']
|
$this->prefs['default_document']
|
||||||
);
|
);
|
||||||
$actions['ical'] = array(
|
$actions['ical'] = array(
|
||||||
'icon' => 'calendar/navbar',
|
'icon' => egw_vfs::mime_icon('text/calendar'),
|
||||||
'caption' => 'Export iCal',
|
'caption' => 'Export iCal',
|
||||||
|
'postSubmit' => true, // download needs post submit to work
|
||||||
'group' => $group,
|
'group' => $group,
|
||||||
'allowOnMultiple' => true,
|
'allowOnMultiple' => true,
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user