Fix addressbook CRM next/previous buttons don't update nextmatch

This commit is contained in:
Nathan Gray 2014-08-06 14:12:20 +00:00
parent 9d8b45588b
commit 98da1ade79
2 changed files with 4 additions and 8 deletions

View File

@ -2366,7 +2366,7 @@ window.egw_LAB.wait(function() {
case 'infolog': case 'infolog':
case 'tracker': case 'tracker':
default: default:
egw_json_response::get()->apply('app.addressbook.view_set_list',Array('linked',$contact_id)); egw_json_response::get()->apply('app.addressbook.view_set_list',Array(Array('action'=>'addressbook', 'action_id' => $contact_id)));
break; break;
} }
@ -2387,7 +2387,6 @@ window.egw_LAB.wait(function() {
'ajax' => 'true' 'ajax' => 'true'
)); ));
} }
$content['jpegphoto'] = !empty($content['jpegphoto']); // unused and messes up json encoding (not utf-8)
if (isset($_GET['index'])) if (isset($_GET['index']))
{ {
$content['index'] = (int)$_GET['index']; $content['index'] = (int)$_GET['index'];
@ -2399,6 +2398,7 @@ window.egw_LAB.wait(function() {
$num_rows = $this->get_rows($query, $rows, $readonlys, true); $num_rows = $this->get_rows($query, $rows, $readonlys, true);
} }
} }
$content['jpegphoto'] = !empty($content['jpegphoto']); // unused and messes up json encoding (not utf-8)
// make everything not explicit mentioned readonly // make everything not explicit mentioned readonly
$readonlys['__ALL__'] = true; $readonlys['__ALL__'] = true;

View File

@ -104,10 +104,9 @@ app.classes.addressbook = AppJS.extend(
/** /**
* Set link filter for the already open & rendered list * Set link filter for the already open & rendered list
* *
* @param {string} col_filter_name Name of the column filter to set * @param {Object} filter Object with key / value pairs of filters to set
* @param {string} contact_id New contact ID
*/ */
view_set_list: function(col_filter_name, contact_id) view_set_list: function(filter)
{ {
// Find the infolog list // Find the infolog list
var list = etemplate2.getById( var list = etemplate2.getById(
@ -116,9 +115,6 @@ app.classes.addressbook = AppJS.extend(
var nm = list ? list.widgetContainer.getWidgetById('nm') : null; var nm = list ? list.widgetContainer.getWidgetById('nm') : null;
if(nm) if(nm)
{ {
// Update the link filter to new contact
var filter = {col_filter:{}};
filter.col_filter[col_filter_name] = 'addressbook:'+contact_id;
nm.applyFilters(filter); nm.applyFilters(filter);
} }
}, },