mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-31 11:09:04 +01:00
Still accept old style favorites on the client side, as they're still handled on the server side.
Better fix than previous handling
This commit is contained in:
parent
78a1768bc4
commit
9c7c53606a
@ -916,11 +916,15 @@ var AppJS = (function(){ "use strict"; return Class.extend(
|
|||||||
favorite = egw.preference('favorite_'+this.dataset.id,self.appname);
|
favorite = egw.preference('favorite_'+this.dataset.id,self.appname);
|
||||||
}
|
}
|
||||||
if(!favorite || jQuery.isEmptyObject(favorite)) return;
|
if(!favorite || jQuery.isEmptyObject(favorite)) return;
|
||||||
|
|
||||||
|
// Handle old style by making it like new style
|
||||||
|
if(favorite.filter && !favorite.state)
|
||||||
|
{
|
||||||
|
favorite.state = favorite.filter;
|
||||||
|
}
|
||||||
|
|
||||||
var match_count = 0;
|
var match_count = 0;
|
||||||
var extra_keys = favorite.state ?
|
var extra_keys = Object.keys(favorite.state);
|
||||||
Object.keys(favorite.state) : // New
|
|
||||||
Object.keys(favorite.filter); // Old
|
|
||||||
for(var state_key in state)
|
for(var state_key in state)
|
||||||
{
|
{
|
||||||
extra_keys.splice(extra_keys.indexOf(state_key),1);
|
extra_keys.splice(extra_keys.indexOf(state_key),1);
|
||||||
|
Loading…
Reference in New Issue
Block a user