From 8963661c138dea40447ce5177a9d03a6dca497e4 Mon Sep 17 00:00:00 2001 From: bethrezen Date: Tue, 17 Feb 2015 17:27:11 +0300 Subject: [PATCH] Dynamically calculated min-width for action column in backend - affects #159 --- application/backend/components/ActionColumn.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/application/backend/components/ActionColumn.php b/application/backend/components/ActionColumn.php index d736aeea0..e67d60ade 100644 --- a/application/backend/components/ActionColumn.php +++ b/application/backend/components/ActionColumn.php @@ -95,8 +95,8 @@ protected function renderDataCellContent($model, $key, $index) $this->buttons = $_btns; } } - - $data = Html::beginTag('div', ['class' => 'btn-group']); + $min_width = count($this->buttons) * 34; //34 is button-width + $data = Html::beginTag('div', ['class' => 'btn-group', 'style'=>'min-width: '.$min_width.'px']); foreach ($this->buttons as $button) { Html::addCssClass($button, 'btn'); Html::addCssClass($button, 'btn-sm');