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
|
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
|
||||||
* @package etemplate
|
* @package etemplate
|
||||||
* @subpackage api
|
* @subpackage api
|
||||||
* @link http://www.egroupware.org
|
* @link http://www.egroupware.org
|
||||||
* @author Andreas Stöckel (as AT stylite.de)
|
* @author Andreas Stöckel (as AT stylite.de)
|
||||||
|
* @author Ralf Becker <RalfBecker@outdoor-training.de>
|
||||||
* @version $Id$
|
* @version $Id$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -14,8 +15,10 @@
|
|||||||
* row.
|
* 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)
|
function nextmatchRowAOI(_node)
|
||||||
{
|
{
|
||||||
var aoi = new egwActionObjectInterface();
|
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 _action action object with attributes caption, id, nm_action, ...
|
||||||
* @param _senders array of rows selected
|
* @param _senders array of rows selected
|
||||||
@ -109,8 +112,7 @@ function nm_action(_action, _senders)
|
|||||||
var url = '#';
|
var url = '#';
|
||||||
if (typeof _action.data.url != 'undefined')
|
if (typeof _action.data.url != 'undefined')
|
||||||
{
|
{
|
||||||
url = _action.data.url;
|
url = _action.data.url.replace(/(\$|%24)id/,ids);
|
||||||
if (url.substr(-1) == '=') url += ids;
|
|
||||||
}
|
}
|
||||||
var target;
|
var target;
|
||||||
if (typeof _action.data.target != 'undefined') target = _action.data.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
|
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']);
|
list($id) = @each($content['nm']['rows']['document']);
|
||||||
$content['action'] = 'document';
|
$content['nm']['action'] = 'document';
|
||||||
$content['nm']['rows']['checked'] = array($id);
|
$content['nm']['selected'] = array($id);
|
||||||
}
|
}
|
||||||
// support old actions
|
// support old actions
|
||||||
if ($content['action'])
|
if ($content['action'])
|
||||||
@ -791,16 +791,6 @@ class timesheet_ui extends timesheet_bo
|
|||||||
}
|
}
|
||||||
else
|
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'],
|
if ($this->action($content['nm']['action'],$content['nm']['selected'],$content['nm']['select_all'],
|
||||||
$success,$failed,$action_msg,'index',$msg))
|
$success,$failed,$action_msg,'index',$msg))
|
||||||
{
|
{
|
||||||
@ -883,14 +873,14 @@ class timesheet_ui extends timesheet_bo
|
|||||||
'caption' => 'View',
|
'caption' => 'View',
|
||||||
'default' => true,
|
'default' => true,
|
||||||
'allowOnMultiple' => false,
|
'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'),
|
'popup' => egw_link::get_registry('timesheet', 'view_popup'),
|
||||||
'group' => $group=1,
|
'group' => $group=1,
|
||||||
),
|
),
|
||||||
'edit' => array(
|
'edit' => array(
|
||||||
'caption' => 'Edit',
|
'caption' => 'Edit',
|
||||||
'allowOnMultiple' => false,
|
'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'),
|
'popup' => egw_link::get_registry('timesheet', 'add_popup'),
|
||||||
'group' => $group,
|
'group' => $group,
|
||||||
),
|
),
|
||||||
|
Loading…
Reference in New Issue
Block a user