mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-28 19:03:14 +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 {
|
et2-image {
|
||||||
position: absolute;
|
display: block;
|
||||||
left: var(--et2-favorites-left);
|
position: relative;
|
||||||
width: ${egwIsMobile() ? css`4ex` : css`20px`};
|
|
||||||
font-size: ${egwIsMobile() ? css`4ex` : css`20px`};
|
font-size: ${egwIsMobile() ? css`4ex` : css`20px`};
|
||||||
top: -2px;
|
top: -2px;
|
||||||
}
|
}
|
||||||
|
@ -18,7 +18,7 @@ export class Favorite
|
|||||||
// Default blank filter
|
// Default blank filter
|
||||||
let favorites : { [name : string] : Favorite } = {
|
let favorites : { [name : string] : Favorite } = {
|
||||||
'blank': {
|
'blank': {
|
||||||
name: egw.lang("No filters"),
|
name: window.egw.lang("No filters"),
|
||||||
state: {},
|
state: {},
|
||||||
group: false
|
group: false
|
||||||
}
|
}
|
||||||
@ -26,7 +26,7 @@ export class Favorite
|
|||||||
|
|
||||||
// Load saved favorites
|
// Load saved favorites
|
||||||
let sortedList = [];
|
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)
|
for(let pref_name in preferences)
|
||||||
{
|
{
|
||||||
if(pref_name.indexOf(Favorite.PREFIX) == 0 && typeof preferences[pref_name] == 'object')
|
if(pref_name.indexOf(Favorite.PREFIX) == 0 && typeof preferences[pref_name] == 'object')
|
||||||
@ -58,7 +58,7 @@ export class Favorite
|
|||||||
sortedList.push(name);
|
sortedList.push(name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
egw.set_preference(app, 'fav_sort_pref', sortedList);
|
window.egw.set_preference(app, 'fav_sort_pref', sortedList);
|
||||||
if(sortedList.length > 0)
|
if(sortedList.length > 0)
|
||||||
{
|
{
|
||||||
let sortedListObj = {};
|
let sortedListObj = {};
|
||||||
@ -72,7 +72,7 @@ export class Favorite
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
sortedList.splice(i, 1);
|
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);
|
favorites = Object.assign(sortedListObj, favorites);
|
||||||
|
Loading…
Reference in New Issue
Block a user