diff --git a/calendar/inc/class.calendar_uilist.inc.php b/calendar/inc/class.calendar_uilist.inc.php index 7ec7e5b5f3..2abed7ddd7 100644 --- a/calendar/inc/class.calendar_uilist.inc.php +++ b/calendar/inc/class.calendar_uilist.inc.php @@ -144,10 +144,10 @@ class calendar_uilist extends calendar_ui 'filter_onchange' => "app.calendar.filter_change", 'row_id' => 'row_id', // set in get rows "$event[id]:$event[recur_date]" 'row_modified' => 'modified', - 'favorites' => true, 'placeholder_actions' => array('add') ); } + $content['nm']['favorites'] = true; $content['nm']['actions'] = $this->get_actions(); // Skip first load if view is not listview diff --git a/calendar/js/app.js b/calendar/js/app.js index eed9ecdce4..b79838a245 100644 --- a/calendar/js/app.js +++ b/calendar/js/app.js @@ -3453,6 +3453,12 @@ var CalendarApp = /** @class */ (function (_super) { } } if (all_loaded) { + // Move nextmatch favourite button into toolbar + var fav_button = CalendarApp.views.listview.etemplates[0].widgetContainer.getDOMWidgetById("favorite"); + var toolbar_1 = jQuery("#toolbar-actionbox", "#calendar-toolbar_toolbar"); + if (fav_button && toolbar_1) { + toolbar_1.after(fav_button.getDOMNode(fav_button)); + } jQuery(window).trigger('resize'); this.setState({ state: this.state }); // Hide loader after 1 second as a fallback, it will also be hidden diff --git a/calendar/js/app.ts b/calendar/js/app.ts index 320532e8ee..f2f80213a6 100644 --- a/calendar/js/app.ts +++ b/calendar/js/app.ts @@ -4294,6 +4294,14 @@ class CalendarApp extends EgwApp } if(all_loaded) { + // Move nextmatch favourite button into toolbar + let fav_button = (CalendarApp.views.listview.etemplates[0]).widgetContainer.getDOMWidgetById("favorite"); + let toolbar = jQuery("#toolbar-actionbox","#calendar-toolbar_toolbar"); + if(fav_button && toolbar) + { + toolbar.after(fav_button.getDOMNode(fav_button)); + } + jQuery(window).trigger('resize'); this.setState({state:this.state}); diff --git a/calendar/templates/default/app.css b/calendar/templates/default/app.css index 3b70b04bf7..cf4c5326d5 100644 --- a/calendar/templates/default/app.css +++ b/calendar/templates/default/app.css @@ -182,6 +182,14 @@ div.calendar_conflicts { align-items: center; min-height: 26px; } +#calendar-toolbar #calendar-list_favorite_wrapper { + float: right; + margin-right: 5px; +} +#calendar-toolbar #calendar-list_favorite_wrapper #calendar-list_favorite_menu { + z-index: 40; + font-weight: normal; +} /* Space for toolbar */ #calendar-view, #calendar-todo, #calendar-planner, #calendar-list { @@ -1599,6 +1607,4 @@ img.calendar_print_button, img.calendar_print_appicon { #toolbar-weekend {background-image: none !important; filter:none;} -#calendar-list_nm { - .nextmatch_header .header_count {margin-right:-4px;} -} \ No newline at end of file +#calendar-list_nm .nextmatch_header .header_count {margin-right:-4px;} diff --git a/calendar/templates/pixelegg/app.css b/calendar/templates/pixelegg/app.css index 7855053348..7363dc06bf 100755 --- a/calendar/templates/pixelegg/app.css +++ b/calendar/templates/pixelegg/app.css @@ -189,6 +189,14 @@ div.calendar_conflicts { align-items: center; min-height: 26px; } +#calendar-toolbar #calendar-list_favorite_wrapper { + float: right; + margin-right: 5px; +} +#calendar-toolbar #calendar-list_favorite_wrapper #calendar-list_favorite_menu { + z-index: 40; + font-weight: normal; +} /* Space for toolbar */ #calendar-view, #calendar-todo, diff --git a/calendar/templates/pixelegg/app.less b/calendar/templates/pixelegg/app.less index 2861e088a8..e78cd1ef90 100755 --- a/calendar/templates/pixelegg/app.less +++ b/calendar/templates/pixelegg/app.less @@ -17,7 +17,6 @@ @import (less) "../default/app.css"; - /*generell*/ // makes svg visible