mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-25 01:13:25 +01:00
Api: Fix some favorite widget bugs
- Infolog preferred favorite was not loaded - Fixed vertical alignment of widget 'Add current' icon
This commit is contained in:
parent
8d022c5908
commit
82215f292d
@ -2435,12 +2435,11 @@ var et2_nextmatch_header_bar = /** @class */ (function (_super) {
|
||||
// No favorites configured
|
||||
return;
|
||||
}
|
||||
var list = et2_csvSplit(this.options.get_rows, 2, ".");
|
||||
var widget_options = {
|
||||
default_pref: "nextmatch-" + this.nextmatch.options.settings.columnselection_pref + "-favorite",
|
||||
app: list[0],
|
||||
app: this.getInstanceManager().app,
|
||||
filters: filters,
|
||||
sidebox_target: 'favorite_sidebox_' + list[0]
|
||||
sidebox_target: 'favorite_sidebox_' + this.getInstanceManager().app
|
||||
};
|
||||
this.favorites = et2_createWidget('favorites', widget_options, this);
|
||||
// Add into header
|
||||
|
@ -3140,12 +3140,11 @@ class et2_nextmatch_header_bar extends et2_DOMWidget implements et2_INextmatchHe
|
||||
return;
|
||||
}
|
||||
|
||||
const list = et2_csvSplit(this.options.get_rows, 2, ".");
|
||||
const widget_options = {
|
||||
default_pref: "nextmatch-" + this.nextmatch.options.settings.columnselection_pref + "-favorite",
|
||||
app: list[0],
|
||||
app: this.getInstanceManager().app,
|
||||
filters: filters,
|
||||
sidebox_target: 'favorite_sidebox_' + list[0]
|
||||
sidebox_target: 'favorite_sidebox_' + this.getInstanceManager().app
|
||||
};
|
||||
this.favorites = et2_createWidget('favorites', widget_options, this);
|
||||
|
||||
|
@ -107,7 +107,7 @@ var et2_favorites = /** @class */ (function (_super) {
|
||||
self.preferred = jQuery(this).val();
|
||||
// Update sidebox, if there
|
||||
if (self.sidebox_target.length) {
|
||||
self.sidebox_target.find("div.ui-icon-heart")
|
||||
jQuery("div.ui-icon-heart", self.sidebox_target)
|
||||
.replaceWith("<div class='sideboxstar'/>");
|
||||
jQuery("li[data-id='" + self.preferred + "'] div.sideboxstar", self.sidebox_target)
|
||||
.replaceWith("<div class='ui-icon ui-icon-heart'/>");
|
||||
|
@ -151,7 +151,7 @@ class et2_favorites extends et2_dropdown_button implements et2_INextmatchHeader
|
||||
// Update sidebox, if there
|
||||
if(self.sidebox_target.length)
|
||||
{
|
||||
self.sidebox_target.find("div.ui-icon-heart")
|
||||
jQuery("div.ui-icon-heart", self.sidebox_target)
|
||||
.replaceWith("<div class='sideboxstar'/>");
|
||||
jQuery("li[data-id='"+self.preferred+"'] div.sideboxstar",self.sidebox_target)
|
||||
.replaceWith("<div class='ui-icon ui-icon-heart'/>");
|
||||
|
@ -1814,6 +1814,13 @@ div.message.floating {
|
||||
.favorites img {
|
||||
margin-right: 1ex;
|
||||
}
|
||||
.favorites li.ui-menu-item img {
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
margin-top: -3px;
|
||||
margin-left: 2px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
.favorites div.ui-icon-trash {
|
||||
position: relative;
|
||||
float: right;
|
||||
|
@ -90,7 +90,7 @@ class infolog_hooks
|
||||
if ($location == 'sidebox_menu')
|
||||
{
|
||||
// Magic etemplate2 favorites menu (from nextmatch widget)
|
||||
display_sidebox($appname, lang('Favorites'), Framework\Favorites::list_favorites($appname));
|
||||
display_sidebox($appname, lang('Favorites'), Framework\Favorites::list_favorites($appname, 'nextmatch-nextmatch-infolog.index.rows-favorite'));
|
||||
|
||||
$file = array(
|
||||
'infolog list' => Egw::link('/index.php',array(
|
||||
|
Loading…
Reference in New Issue
Block a user