Author: nathangray
New Revision: 55710
URL: http://svn.stylite.de/viewvc/egroupware?rev=55710&view=rev
Log:
Update sidebox contact if it gets changed
Modified:
trunk/addressbook/inc/class.addressbook_ui.inc.php
trunk/addressbook/js/app.js
— trunk/addressbook/inc/class.addressbook_ui.inc.php (original)
+++ trunk/addressbook/inc/class.addressbook_ui.inc.php Mon Apr 11 22:38:12 2016
@@ -1979,6 +1979,9 @@
{
egw_link::link(‘addressbook’,$content[‘id’],$links);
}
-
// Update client side global datastore
-
$response = egw_json_response::get();
-
$response->generic('data', array('uid' => 'addressbook::'.$content['id'], 'data' => $content));
egw_framework::refresh_opener($content['msg'], 'addressbook', $content['id'], $content['id'] ? 'edit' : 'add',
null, null, null, $this->error ? 'error' : 'success');
— trunk/addressbook/js/app.js (original)
+++ trunk/addressbook/js/app.js Mon Apr 11 22:38:12 2016
@@ -88,6 +88,49 @@
jQuery(‘select[id*=“adr_two_countrycode”]’).each(function() {
app.addressbook.show_custom_country(this);
});
+/**
-
- Observer method receives update notifications from all applications
-
-
- App is responsible for only reacting to “messages” it is interested in!
-
-
- Addressbook checks for CRM view to update the displayed data if you edit
-
-
-
-
@param {string} _msg message (already translated) to show, eg. ‘Entry deleted’
-
-
@param {string} _app application name
-
-
@param {(string|number)} _id id of entry to refresh or null
-
-
@param {string} _type either ‘update’, ‘edit’, ‘delete’, ‘add’ or null
-
-
- update: request just modified data from given rows. Sorting is not considered,
-
-
-
- edit: rows changed, but sorting may be affected. Requires full reload.
-
-
- delete: just delete the given rows clientside (no server interaction neccessary)
-
-
- add: requires full reload for proper sorting
-
-
@param {string} _msg_type ‘error’, ‘warning’ or ‘success’ (default)
-
-
@param {object|null} _links app => array of ids of linked entries
-
- or null, if not triggered on server-side, which adds that info
-
-
@return {false|*} false to stop regular refresh, thought all observers are run
-
*/
-
observer: function(_msg, _app, _id, _type, _msg_type, _links)
-
{
-
// Edit to the current entry
-
var state = this.getState();
-
if(_app === 'addressbook' && state && state.type && state.type === 'view' && state.id === _id)
-
{
-
var content = egw.dataGetUIDdata('addressbook::'+_id);
-
if (content.data)
-
{
-
var view = etemplate2.getById('addressbook-view');
-
if(view)
-
{
-
view.widgetContainer._children[0].set_value({content:content.data});
-
}
-
}
-
return false;
-
}
-
-
return true;
},
/**
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
eGroupWare-cvs mailing list
eGroupWare-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/egroupware-cvs