mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-13 01:18:20 +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',
|
||||
'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(
|
||||
'icon' => 'filesave',
|
||||
'caption' => 'Export (iCal)',
|
||||
'icon' => egw_vfs::mime_icon('text/calendar'),
|
||||
'caption' => 'Export iCal',
|
||||
'group' => ++$group,
|
||||
'hint' => 'Download this event as iCal',
|
||||
'disableClass' => 'rowNoView',
|
||||
'postSubmit' => true, // download needs post submit (not Ajax) to work
|
||||
);
|
||||
$actions['documents'] = calendar_merge::document_action(
|
||||
$this->bo->cal_prefs['document_dir'], ++$group, 'Insert in document', 'document_',
|
||||
|
@ -5,7 +5,7 @@
|
||||
* @link http://www.egroupware.org
|
||||
* @author Ralf Becker <RalfBecker-AT-outdoor-training.de>
|
||||
* @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
|
||||
* @version $Id$
|
||||
*/
|
||||
@ -367,7 +367,7 @@ abstract class bo_merge
|
||||
{
|
||||
$title = stylite_links_stream_wrapper::entry2name($app, $id, $title);
|
||||
}
|
||||
|
||||
|
||||
$link = egw_link::view($app, $id);
|
||||
if($app != egw_link::VFS_APPNAME)
|
||||
{
|
||||
@ -1668,6 +1668,7 @@ abstract class bo_merge
|
||||
'icon' => egw_vfs::mime_icon($file['mime']),
|
||||
'caption' => egw_vfs::decodePath(egw_vfs::basename($default_doc)),
|
||||
'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']),
|
||||
'caption' => egw_vfs::decodePath($name_arr[$count]),
|
||||
'group' => 2,
|
||||
'postSubmit' => true, // download needs post submit (not Ajax) to work
|
||||
);
|
||||
if ($file['mime'] == 'message/rfc822')
|
||||
{
|
||||
@ -1788,6 +1790,7 @@ abstract class bo_merge
|
||||
'icon' => egw_vfs::mime_icon($file['mime']),
|
||||
'caption' => egw_vfs::decodePath($file['name']),
|
||||
'group' => 2,
|
||||
'postSubmit' => true, // download needs post submit (not Ajax) to work
|
||||
);
|
||||
if ($file['mime'] == 'message/rfc822')
|
||||
{
|
||||
|
@ -151,15 +151,22 @@ function nm_action(_action, _senders, _target, _ids)
|
||||
{
|
||||
// Force nextmatch to re-load affected rows
|
||||
nextmatch.refresh(idsArr);
|
||||
|
||||
nextmatch.getInstanceManager().submit();
|
||||
|
||||
// Reset action in case there's another one
|
||||
nextmatch.getValue = old_value;
|
||||
}
|
||||
|
||||
// downloads need a regular submit via POST (no Ajax)
|
||||
if (_action.data.postSubmit)
|
||||
{
|
||||
nextmatch.getInstanceManager().postSubmit();
|
||||
}
|
||||
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
|
||||
|
@ -813,7 +813,7 @@ class infolog_ui
|
||||
|
||||
//apply infolog_filter2_change javascript method (show/hide details each rows) over onchange filter2
|
||||
$values['nm']['filter2_onchange'] = "app.infolog.filter2_change();";
|
||||
|
||||
|
||||
// Allow add actions even when there's no rows
|
||||
$values['nm']['placeholder_actions'] = array('new');
|
||||
|
||||
@ -1117,8 +1117,9 @@ class infolog_ui
|
||||
$this->prefs['default_document']
|
||||
);
|
||||
$actions['ical'] = array(
|
||||
'icon' => 'calendar/navbar',
|
||||
'icon' => egw_vfs::mime_icon('text/calendar'),
|
||||
'caption' => 'Export iCal',
|
||||
'postSubmit' => true, // download needs post submit to work
|
||||
'group' => $group,
|
||||
'allowOnMultiple' => true,
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user