fixed changes in get_rows method were not send back to client, if PHP mcrypt is available / eTemplate request stored on client

This commit is contained in:
Ralf Becker 2013-10-11 11:20:21 +00:00
parent 3c80defe8b
commit c6a97da311
3 changed files with 30 additions and 6 deletions

View File

@ -7,7 +7,7 @@
* @subpackage api
* @link http://www.egroupware.org
* @author Ralf Becker <RalfBecker@outdoor-training.de>
* @copyright (c) 2007-9 by Ralf Becker <RalfBecker@outdoor-training.de>
* @copyright (c) 2007-13 by Ralf Becker <RalfBecker@outdoor-training.de>
* @version $Id$
*/
@ -44,9 +44,23 @@
* Ajax requests can use this object to open the original request by using the id, they have to transmitt back,
* and register further variables, modify the registered ones or delete them AND then update the id, if it changed:
*
* if (($new_id = $request->id()) != $id)
* eTemplate2:
*
* if (($new_id = $request->id()) != $exec_id)
* {
* $response->addAssign('etemplate_exec_id','value',$new_id);
* egw_json_response::get()->generic('assign', array(
* 'etemplate_exec_id' => $id,
* 'id' => '',
* 'key' => 'etemplate_exec_id',
* 'value' => $new_id,
* ));
* }
*
* old eTemplate:
*
* if (($new_id = $request->id()) != $exec_id)
* {
* egw_json_response::get()->assign('etemplate_exec_id','value',$new_id);
* }
*
* For an example look in link_widget::ajax_search()

View File

@ -344,7 +344,7 @@ class etemplate_widget_nextmatch extends etemplate_widget
$request_value[$key] = $value[$key];
egw_json_response::get()->generic('assign', array(
'etemplate_exec_id' => self::$request->id(),
'etemplate_exec_id' => $exec_id,
'id' => $form_name,
'key' => $key,
'value' => $value[$key],
@ -437,9 +437,14 @@ class etemplate_widget_nextmatch extends etemplate_widget
egw_json_response::get()->data($result);
// If etemplate_exec_id has changed, update the client side
if (($new_id = self::$request->id()) != $id)
if (($new_id = self::$request->id()) != $exec_id)
{
egw_json_response::get()->assign('etemplate_exec_id','value',$new_id);
egw_json_response::get()->generic('assign', array(
'etemplate_exec_id' => $exec_id,
'id' => '',
'key' => 'etemplate_exec_id',
'value' => $new_id,
));
}
}

View File

@ -724,6 +724,11 @@ function etemplate2_handle_assign(type, res, req)
// Not for this etemplate, but not an error
return false;
}
if (res.data.key == 'etemplate_exec_id')
{
this.etemplate_exec_id = res.data.value;
return true;
}
var widget = this.widgetContainer.getWidgetById(res.data.id);
if (widget)
{