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:
Ralf Becker
2011-09-13 18:23:43 +00:00
parent cf53019c13
commit 5cadd29d58
2 changed files with 39 additions and 7 deletions

View File

@@ -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;
}
};
}