Commit 234a56f9 by TTouka

[#1] replaced glyphicons in TbButtonColumn

parent 56a2bff5
......@@ -23,7 +23,7 @@
}
.grid-view .button-column {
text-align:center;
width:50px;
width:67px;
}
.grid-view .checkbox-column { width:15px; }
.grid-view .summary {
......
......@@ -68,8 +68,8 @@ class TbButtonColumn extends CButtonColumn
if (isset($button['icon']))
{
if (strpos($button['icon'], 'icon') === false)
$button['icon'] = 'icon-'.implode(' icon-', explode(' ', $button['icon']));
if (strpos($button['icon'], 'glyphicon') === false)
$button['icon'] = 'glyphicon glyphicon-'.implode(' glyphicon-', explode(' ', $button['icon']));
echo CHtml::link('<i class="'.$button['icon'].'"></i>', $url, $options);
}
......
......@@ -53,4 +53,19 @@ class TbDataColumn extends CDataColumn
$this->renderFilterCellContent();
echo '</div></td>';
}
protected function renderFilterCellContent()
{
if(is_string($this->filter))
echo $this->filter;
elseif($this->filter!==false && $this->grid->filter!==null && $this->name!==null && strpos($this->name,'.')===false)
{
if(is_array($this->filter))
echo CHtml::activeDropDownList($this->grid->filter, $this->name, $this->filter, array('id'=>false,'prompt'=>''));
elseif($this->filter===null)
echo CHtml::activeTextField($this->grid->filter, $this->name, array('id'=>false));
}
else
parent::renderFilterCellContent();
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment