Skip to content

Commit

Permalink
fix bug with color plugin, closes #426
Browse files Browse the repository at this point in the history
  • Loading branch information
nadar committed Dec 19, 2019
1 parent 2dab30c commit 231646d
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,14 @@ In order to read more about upgrading and BC breaks have a look at the [UPGRADE

## 3.0

### Changed

+ [#428](https://github.com/luyadev/luya-module-admin/issues/428) Update to latest echarts version (from 3.5 to 4.5) for backwards compatbility problems take a look at https://www.echartsjs.com/en/changelog.html#v4-0-0.

### Fixed

+ [#426](https://github.com/luyadev/luya-module-admin/issues/426) Fixed a bug where color plugin does not work when model is empty.

## 2.4.1 (16. December 2019)

+ [#424](https://github.com/luyadev/luya-module-admin/pull/424) Fixed bug of wrong variable in active buttons.
Expand Down
2 changes: 1 addition & 1 deletion src/ngrest/plugins/Color.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class Color extends Plugin
public function renderList($id, $ngModel)
{
return [
$this->createTag('span', null, ['style' => 'background-color: {{' . $ngModel .' }}; margin-right:5px; border-radius: 60%; padding:0px 8px;']),
$this->createTag('span', null, ['style' => 'background-color: {{' . $ngModel .' }}; width:12px; height:12px; border-radius:50%; display:inline-block', 'ng-if' => $ngModel]),
$this->createListTag($ngModel),
];
}
Expand Down
2 changes: 1 addition & 1 deletion src/resources/dist/main.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/resources/js/directives.js
Original file line number Diff line number Diff line change
Expand Up @@ -1126,7 +1126,7 @@ zaa.directive("zaaColor", function () {
},
controller: ['$scope', function ($scope) {
function getTextColor() {
if (typeof $scope.model === 'undefined') {
if (typeof $scope.model === 'undefined' || !$scope.model) {
return '#000';
}

Expand Down

0 comments on commit 231646d

Please sign in to comment.