mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-08-18 12:30:02 +02:00
Basic egw.link_title(_app,_id,_callback,_context) method.
Plan is to run a clientside cache and own queue for link_titles, as server can query titles for N id's for a given app more effiently then N separeate queries.
This commit is contained in:
@@ -750,6 +750,24 @@ else
|
||||
|
||||
delete this.jsonq_queue[uid];
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Query a title of _app/_id
|
||||
*
|
||||
* @param string _app
|
||||
* @param string|int _id
|
||||
* @param function _callback optinal callback, required if for responses from the server
|
||||
* @param object _context context for the callback
|
||||
* @return string|boolean|null string with title if it exist in local cache or null if not
|
||||
*/
|
||||
link_title: function(_app, _id, _callback, _context)
|
||||
{
|
||||
if (typeof _callback == 'function')
|
||||
{
|
||||
this.jsonq(_app+'.etemplate_widget_link.ajax_link_title', [_app, _id], _callback, _context);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
Reference in New Issue
Block a user