Skip to content

Commit

Permalink
Dynamically calculated min-width for action column in backend - affects
Browse files Browse the repository at this point in the history
  • Loading branch information
bethrezen committed Feb 17, 2015
1 parent 4c48a32 commit 8963661
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions application/backend/components/ActionColumn.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down

0 comments on commit 8963661

Please sign in to comment.