mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-21 15:33:23 +01:00
Fix favorite icon horizontal alignment, some js errors about undefined egw
This commit is contained in:
parent
4333429602
commit
385d89b8c3
@ -57,9 +57,8 @@ export class Et2Favorites extends Et2DropdownButton implements et2_INextmatchHea
|
||||
}
|
||||
|
||||
et2-image {
|
||||
position: absolute;
|
||||
left: var(--et2-favorites-left);
|
||||
width: ${egwIsMobile() ? css`4ex` : css`20px`};
|
||||
display: block;
|
||||
position: relative;
|
||||
font-size: ${egwIsMobile() ? css`4ex` : css`20px`};
|
||||
top: -2px;
|
||||
}
|
||||
|
@ -18,7 +18,7 @@ export class Favorite
|
||||
// Default blank filter
|
||||
let favorites : { [name : string] : Favorite } = {
|
||||
'blank': {
|
||||
name: egw.lang("No filters"),
|
||||
name: window.egw.lang("No filters"),
|
||||
state: {},
|
||||
group: false
|
||||
}
|
||||
@ -26,7 +26,7 @@ export class Favorite
|
||||
|
||||
// Load saved favorites
|
||||
let sortedList = [];
|
||||
let preferences : any = await egw.preference("*", app, true);
|
||||
let preferences : any = await window.egw.preference("*", app, true);
|
||||
for(let pref_name in preferences)
|
||||
{
|
||||
if(pref_name.indexOf(Favorite.PREFIX) == 0 && typeof preferences[pref_name] == 'object')
|
||||
@ -58,7 +58,7 @@ export class Favorite
|
||||
sortedList.push(name);
|
||||
}
|
||||
}
|
||||
egw.set_preference(app, 'fav_sort_pref', sortedList);
|
||||
window.egw.set_preference(app, 'fav_sort_pref', sortedList);
|
||||
if(sortedList.length > 0)
|
||||
{
|
||||
let sortedListObj = {};
|
||||
@ -72,7 +72,7 @@ export class Favorite
|
||||
else
|
||||
{
|
||||
sortedList.splice(i, 1);
|
||||
egw.set_preference(app, 'fav_sort_pref', sortedList);
|
||||
window.egw.set_preference(app, 'fav_sort_pref', sortedList);
|
||||
}
|
||||
}
|
||||
favorites = Object.assign(sortedListObj, favorites);
|
||||
|
Loading…
Reference in New Issue
Block a user