Author: nathangray
New Revision: 55150
URL: http://svn.stylite.de/viewvc/egroupware?rev=55150&view=rev
Log:
Use accounts from accounts cache, if available, before we check the link_title store.
Fixes account name not shown on first load.
Modified:
trunk/etemplate/js/et2_widget_taglist.js
— trunk/etemplate/js/et2_widget_taglist.js (original)
+++ trunk/etemplate/js/et2_widget_taglist.js Thu Feb 25 19:13:14 2016
@@ -530,13 +530,7 @@
}
this.options.autocomplete_params.account_type = this.options.account_type = value;
-
this.options.select_options = this._get_accounts();
-
-
if(this.taglist != null)
-
{
-
// Update taglist too, since it already copied the params
-
this.taglist.setDataUrlParams(this.options.autocomplete_params);
-
}
-
this.set_select_options(this._get_accounts());
},
/**
@@ -599,8 +593,31 @@
for(var i=0; i < values.length; ++i)
{
var v = values[i];
-
var result = [];
if (typeof v == 'object' && v.id === v.label) v = v.id;
-
if (this.options.select_options &&
-
// Check options
-
(result = $j.grep(this.options.select_options, function(e) {
-
return e.id == v;
-
})) ||
-
// Check current selection to avoid going back to server
-
(result = $j.grep(this.taglist.getSelection(), function(e) {
-
return e.id == v;
-
}))
-
)
-
{
-
// Options should have been provided, but they weren't
-
// This can happen for ajax source with an existing value
-
if(this.options.select_options == null)
-
{
-
this.options.select_options = [];
-
}
-
values[i] = result[0] ? result[0] : {
-
id: v,
-
label: v
-
};
-
}
-
else if (typeof v != 'object' && !isNaN(v) && (typeof v != 'string' || v.match(this.int_reg_exp)))
{
v = parseInt(v);
var label = this.egw().link_title('home-accounts', v);
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
eGroupWare-cvs mailing list
eGroupWare-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/egroupware-cvs