Commits

Pascal Brewing  committed 11169e9 Merge

Merged in urmaul/yii-bootstrap-3-module (pull request #30)

DataColumn caret fix

  • Participants
  • Parent commits 804dad2, 928a598

Comments (0)

Files changed (1)

File widgets/BsDataColumn.php

             $sort = $this->grid->dataProvider->getSort();
             $label = isset($this->header) ? $this->header : $sort->resolveLabel($this->name);
 
-            if ($sort->resolveAttribute($this->name) !== false) {
-                $label .= '<span class="caret"></span>';
+            if (isset($sort->directions[$this->name])) {
+                if ($sort->directions[$this->name])
+                    $label .= ' <span class="dropup"><span class="caret"></span></span>';
+                else
+                    $label .= ' <span class="caret"></span>';
             }
 
             echo $sort->link($this->name, $label, array('class' => 'sort-link'));