Calendar: Move favorite dropdown from nextmatch header into toolbar

This commit is contained in:
nathangray 2021-03-18 14:09:53 -06:00
parent eed49ecdbf
commit c39aafb531
6 changed files with 32 additions and 5 deletions

View File

@ -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

View File

@ -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

View File

@ -4294,6 +4294,14 @@ class CalendarApp extends EgwApp
}
if(all_loaded)
{
// Move nextmatch favourite button into toolbar
let fav_button = (<etemplate2><unknown>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});

View File

@ -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;}
}
#calendar-list_nm .nextmatch_header .header_count {margin-right:-4px;}

View File

@ -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,

View File

@ -17,7 +17,6 @@
@import (less) "../default/app.css";
/*generell*/
// makes svg visible