diff --git a/api/src/Etemplate.php b/api/src/Etemplate.php index b9f09f373a..fac9520b28 100644 --- a/api/src/Etemplate.php +++ b/api/src/Etemplate.php @@ -31,6 +31,10 @@ class Etemplate extends Etemplate\Widget\Template */ public $sitemgr=false; + /** + * @var array Additional attributes to set on the DOM (eg: slot) + */ + protected $dom_attributes = []; /** * Tell egw framework it's ok to call this */ @@ -264,7 +268,12 @@ class Etemplate extends Etemplate\Widget\Template } else { - $content = '
'."\n". + $content = '' . "\n" . ''; } $GLOBALS['egw']->framework->response->generic("data", array($content)); @@ -582,6 +591,11 @@ class Etemplate extends Etemplate\Widget\Template $this->dom_id = $new_id; } + public function set_dom_attributes($dom_attributes) + { + $this->dom_attributes = array_merge($this->dom_attributes, $dom_attributes); + } + /** * Make sure there's a new request, in case of multiple Etemplates in one call. * Normally this isn't a problem, but if you've got an etemplate in the sidebox, diff --git a/calendar/inc/class.calendar_ui.inc.php b/calendar/inc/class.calendar_ui.inc.php index 43b1f4aa32..de1c926fc4 100644 --- a/calendar/inc/class.calendar_ui.inc.php +++ b/calendar/inc/class.calendar_ui.inc.php @@ -536,6 +536,7 @@ class calendar_ui { Etemplate::reset_request(); $sidebox = new Etemplate('calendar.sidebox'); + $sidebox->set_dom_attributes(['slot' => 'left']); $cont = $this->cal_prefs['saved_states']; if (!is_array($cont)) $cont = array(); diff --git a/calendar/js/app.ts b/calendar/js/app.ts index dc2acad1d1..ece5510b9a 100644 --- a/calendar/js/app.ts +++ b/calendar/js/app.ts @@ -281,7 +281,10 @@ export class CalendarApp extends EgwApp case 'calendar.sidebox': this.sidebox_et2 = _et2.widgetContainer; this.sidebox_hooked_templates.push(this.sidebox_et2); - jQuery(_et2.DOMContainer).hide(); + if(!_et2.DOMContainer.slot) + { + jQuery(_et2.DOMContainer).hide(); + } this._setup_sidebox_filters();