forked from extern/egroupware
replacing now $id in url with actual id, not longer adding it if url ends with =
This commit is contained in:
parent
dfeedf64c5
commit
752cd7249f
@ -1,11 +1,12 @@
|
||||
/**
|
||||
* eGroupWare eTemplate nextmatch row action object interface
|
||||
* EGroupware eTemplate nextmatch row action object interface
|
||||
*
|
||||
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
|
||||
* @package etemplate
|
||||
* @subpackage api
|
||||
* @link http://www.egroupware.org
|
||||
* @author Andreas Stöckel (as AT stylite.de)
|
||||
* @author Ralf Becker <RalfBecker@outdoor-training.de>
|
||||
* @version $Id$
|
||||
*/
|
||||
|
||||
@ -14,8 +15,10 @@
|
||||
* row.
|
||||
*/
|
||||
|
||||
// An action object interface for each nextmatch widget row - "inherits" from
|
||||
// egwActionObjectInterface
|
||||
/**
|
||||
* An action object interface for each nextmatch widget row - "inherits" from
|
||||
* egwActionObjectInterface
|
||||
*/
|
||||
function nextmatchRowAOI(_node)
|
||||
{
|
||||
var aoi = new egwActionObjectInterface();
|
||||
@ -81,7 +84,7 @@ function nextmatchRowAOI(_node)
|
||||
}
|
||||
|
||||
/**
|
||||
* Default action for nextmatch rows, runs action specified _action.nm_action: set nextmatch_widget::egw_actions()
|
||||
* Default action for nextmatch rows, runs action specified _action.data.nm_action: see nextmatch_widget::egw_actions()
|
||||
*
|
||||
* @param _action action object with attributes caption, id, nm_action, ...
|
||||
* @param _senders array of rows selected
|
||||
@ -109,8 +112,7 @@ function nm_action(_action, _senders)
|
||||
var url = '#';
|
||||
if (typeof _action.data.url != 'undefined')
|
||||
{
|
||||
url = _action.data.url;
|
||||
if (url.substr(-1) == '=') url += ids;
|
||||
url = _action.data.url.replace(/(\$|%24)id/,ids);
|
||||
}
|
||||
var target;
|
||||
if (typeof _action.data.target != 'undefined') target = _action.data.target;
|
||||
|
@ -773,8 +773,8 @@ class timesheet_ui extends timesheet_bo
|
||||
if (is_array($content) && isset($content['nm']['rows']['document'])) // handle insert in default document button like an action
|
||||
{
|
||||
list($id) = @each($content['nm']['rows']['document']);
|
||||
$content['action'] = 'document';
|
||||
$content['nm']['rows']['checked'] = array($id);
|
||||
$content['nm']['action'] = 'document';
|
||||
$content['nm']['selected'] = array($id);
|
||||
}
|
||||
// support old actions
|
||||
if ($content['action'])
|
||||
@ -791,16 +791,6 @@ class timesheet_ui extends timesheet_bo
|
||||
}
|
||||
else
|
||||
{
|
||||
// Action has a parameter - cat_id, percent, etc
|
||||
$multi_action = $content['nm']['action'];
|
||||
if (in_array($multi_action, array('cat')))
|
||||
{
|
||||
if(is_array($content[$multi_action]))
|
||||
{
|
||||
$content[$multi_action] = implode(',',$content[$multi_action]);
|
||||
}
|
||||
$content['nm']['action'] .= '_' . $content[$multi_action];
|
||||
}
|
||||
if ($this->action($content['nm']['action'],$content['nm']['selected'],$content['nm']['select_all'],
|
||||
$success,$failed,$action_msg,'index',$msg))
|
||||
{
|
||||
@ -883,14 +873,14 @@ class timesheet_ui extends timesheet_bo
|
||||
'caption' => 'View',
|
||||
'default' => true,
|
||||
'allowOnMultiple' => false,
|
||||
'url' => 'menuaction=timesheet.timesheet_ui.view&ts_id=',
|
||||
'url' => 'menuaction=timesheet.timesheet_ui.view&ts_id=$id',
|
||||
'popup' => egw_link::get_registry('timesheet', 'view_popup'),
|
||||
'group' => $group=1,
|
||||
),
|
||||
'edit' => array(
|
||||
'caption' => 'Edit',
|
||||
'allowOnMultiple' => false,
|
||||
'url' => 'menuaction=timesheet.timesheet_ui.edit&ts_id=',
|
||||
'url' => 'menuaction=timesheet.timesheet_ui.edit&ts_id=$id',
|
||||
'popup' => egw_link::get_registry('timesheet', 'add_popup'),
|
||||
'group' => $group,
|
||||
),
|
||||
|
Loading…
Reference in New Issue
Block a user