Skip to content

Commit 9159272

Browse files
author
erundle
committed
Fixing legend style for ie
1 parent d9ee731 commit 9159272

File tree

6 files changed

+5
-11
lines changed

6 files changed

+5
-11
lines changed

dist/angular-patternfly.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1084,7 +1084,6 @@ angular.module('patternfly.charts').directive('pfDonutPctChart', ["c3ChartDefaul
10841084
legend: '=',
10851085
legendColors: '='
10861086
},
1087-
replace: true,
10881087
templateUrl: 'charts/heatmap/heatmap-legend.html',
10891088
link: function ($scope) {
10901089
var items = [];
@@ -1215,7 +1214,6 @@ angular.module('patternfly.charts').directive('pfHeatmap', ["$compile", function
12151214
heatmapColorPattern: '=?',
12161215
clickAction: '=?'
12171216
},
1218-
replace: true,
12191217
templateUrl: 'charts/heatmap/heatmap.html',
12201218
link: function (scope, element, attrs) {
12211219
var thisComponent = element[0].querySelector('.pf-heatmap-svg');
@@ -5185,7 +5183,7 @@ angular.module('patternfly.views').directive('pfDataToolbar', function () {
51855183

51865184

51875185
$templateCache.put('charts/heatmap/heatmap-legend.html',
5188-
"<ul class=pf-heatmap-legend-container><li ng-repeat=\"item in legendItems\" class=pf-heatmap-legend-items><span class=pf-legend-color-box style=\"background: {{item.color}}\"></span> <span class=pf-legend-text>{{item.text}}</span></li></ul>"
5186+
"<ul class=pf-heatmap-legend-container><li ng-repeat=\"item in legendItems\" class=pf-heatmap-legend-items><span class=pf-legend-color-box ng-style=\"{background: item.color}\"></span> <span class=pf-legend-text>{{item.text}}</span></li></ul>"
51895187
);
51905188

51915189

dist/angular-patternfly.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/charts/heatmap/heatmap-legend.directive.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ angular.module('patternfly.charts').directive('pfHeatmapLegend',
77
legend: '=',
88
legendColors: '='
99
},
10-
replace: true,
1110
templateUrl: 'charts/heatmap/heatmap-legend.html',
1211
link: function ($scope) {
1312
var items = [];
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<ul class="pf-heatmap-legend-container">
22
<li ng-repeat="item in legendItems" class="pf-heatmap-legend-items">
3-
<span class="pf-legend-color-box" style="background: {{item.color}}"></span>
3+
<span class="pf-legend-color-box" ng-style="{background: item.color}"></span>
44
<span class="pf-legend-text">{{item.text}}</span>
55
</li>
66
</ul>

src/charts/heatmap/heatmap.directive.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,6 @@ angular.module('patternfly.charts').directive('pfHeatmap', function ($compile) {
113113
heatmapColorPattern: '=?',
114114
clickAction: '=?'
115115
},
116-
replace: true,
117116
templateUrl: 'charts/heatmap/heatmap.html',
118117
link: function (scope, element, attrs) {
119118
var thisComponent = element[0].querySelector('.pf-heatmap-svg');

test/charts/heatmap/heatmap-legend.spec.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
describe('Directive: pfHeatmapLegend', function() {
2-
var $scope, $compile, element, legendItem, legendText, legendColor;
2+
var $scope, $compile, element, legendItem, legendText;
33

44
beforeEach(module(
55
'patternfly.charts',
@@ -29,11 +29,9 @@ describe('Directive: pfHeatmapLegend', function() {
2929
expect(angular.element(element).find('li').size()).toBe(4);
3030

3131
legendItem = angular.element(element).find('li')[0];
32-
legendColor = legendItem.querySelector('.pf-legend-color-box');
3332
legendText = legendItem.querySelector('.pf-legend-text');
3433

3534
expect(legendText.innerHTML).toBe("&gt; 90%");
36-
expect(legendColor.getAttribute('style')).toBe("background: #CE0000");
3735
});
3836

3937
});

0 commit comments

Comments
 (0)