From 5ce21e2fae78bc3743f5e7fd89c15530514ba2cd Mon Sep 17 00:00:00 2001 From: Sam Georges Date: Mon, 30 Jun 2014 19:57:53 +1000 Subject: [PATCH] List widget now supports injecting cssClasses --- modules/backend/widgets/Lists.php | 6 ++++++ modules/backend/widgets/lists/partials/_list-container.htm | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/modules/backend/widgets/Lists.php b/modules/backend/widgets/Lists.php index 5c4c153e1..015b4fa92 100644 --- a/modules/backend/widgets/Lists.php +++ b/modules/backend/widgets/Lists.php @@ -130,6 +130,11 @@ class Lists extends WidgetBase */ public $treeExpanded = true; + /** + * @var array List of CSS classes to apply to the list container element + */ + public $cssClasses = []; + /** * Initialize the widget, called by the constructor and free from its parameters. */ @@ -176,6 +181,7 @@ class Lists extends WidgetBase */ public function prepareVars() { + $this->vars['cssClasses'] = implode(' ', $this->cssClasses); $this->vars['columns'] = $this->getVisibleListColumns(); $this->vars['columnTotal'] = $this->getTotalColumns(); $this->vars['records'] = $this->getRecords(); diff --git a/modules/backend/widgets/lists/partials/_list-container.htm b/modules/backend/widgets/lists/partials/_list-container.htm index 5614bbb03..78fc6bac1 100644 --- a/modules/backend/widgets/lists/partials/_list-container.htm +++ b/modules/backend/widgets/lists/partials/_list-container.htm @@ -1,3 +1,3 @@ -
+
makePartial('list') ?>
\ No newline at end of file