From 8a8cbe505ad36414ad59448ddfb7f5528fc25a2a Mon Sep 17 00:00:00 2001 From: Michal Zielenkiewicz Date: Sat, 9 Nov 2013 23:00:31 +0100 Subject: [PATCH 1/2] fix(rating): glyphicons --- src/rating/docs/demo.html | 2 +- src/rating/docs/demo.js | 10 +++++----- src/rating/docs/readme.md | 2 +- template/rating/rating.html | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/rating/docs/demo.html b/src/rating/docs/demo.html index 1d3e79a919..dfea91f4e4 100644 --- a/src/rating/docs/demo.html +++ b/src/rating/docs/demo.html @@ -10,6 +10,6 @@

Default


Custom icons

-
(Rate: {{x}})
+
(Rate: {{x}})
(Rate: {{y}})
\ No newline at end of file diff --git a/src/rating/docs/demo.js b/src/rating/docs/demo.js index 9dbbb374e4..a58102b532 100644 --- a/src/rating/docs/demo.js +++ b/src/rating/docs/demo.js @@ -9,10 +9,10 @@ var RatingDemoCtrl = function ($scope) { }; $scope.ratingStates = [ - {stateOn: 'icon-ok-sign', stateOff: 'icon-ok-circle'}, - {stateOn: 'icon-star', stateOff: 'icon-star-empty'}, - {stateOn: 'icon-heart', stateOff: 'icon-ban-circle'}, - {stateOn: 'icon-heart'}, - {stateOff: 'icon-off'} + {stateOn: 'glyphicon-ok', stateOff: 'icon-ok-circle'}, + {stateOn: 'glyphicon-star', stateOff: 'glyphicon-ok-circle'}, + {stateOn: 'glyphicon-heart', stateOff: 'glyphicon-ban-circle'}, + {stateOn: 'glyphicon-heart'}, + {stateOff: 'glyphicon-off'} ]; }; diff --git a/src/rating/docs/readme.md b/src/rating/docs/readme.md index 123d5d219f..78a2d79e2d 100644 --- a/src/rating/docs/readme.md +++ b/src/rating/docs/readme.md @@ -4,7 +4,7 @@ Rating directive that will take care of visualising a star rating bar. #### `` #### - * `value` + * `value` : The current rate. diff --git a/template/rating/rating.html b/template/rating/rating.html index ff78f8b6d4..8cd6d71c8c 100644 --- a/template/rating/rating.html +++ b/template/rating/rating.html @@ -1,3 +1,3 @@ - + \ No newline at end of file From 94a2128acab3cf322c5341f9d722b130cb8d75d8 Mon Sep 17 00:00:00 2001 From: Michal Zielenkiewicz Date: Sat, 9 Nov 2013 23:21:54 +0100 Subject: [PATCH 2/2] fix(rating): glyphicons #2 --- src/rating/docs/demo.js | 4 ++-- src/rating/test/rating.spec.js | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/rating/docs/demo.js b/src/rating/docs/demo.js index a58102b532..573e866820 100644 --- a/src/rating/docs/demo.js +++ b/src/rating/docs/demo.js @@ -9,8 +9,8 @@ var RatingDemoCtrl = function ($scope) { }; $scope.ratingStates = [ - {stateOn: 'glyphicon-ok', stateOff: 'icon-ok-circle'}, - {stateOn: 'glyphicon-star', stateOff: 'glyphicon-ok-circle'}, + {stateOn: 'glyphicon-ok', stateOff: 'glyphicon-ok-circle'}, + {stateOn: 'glyphicon-star', stateOff: 'glyphicon-star-empty'}, {stateOn: 'glyphicon-heart', stateOff: 'glyphicon-ban-circle'}, {stateOn: 'glyphicon-heart'}, {stateOff: 'glyphicon-off'} diff --git a/src/rating/test/rating.spec.js b/src/rating/test/rating.spec.js index ecea8fccc8..a7e79ab0bd 100644 --- a/src/rating/test/rating.spec.js +++ b/src/rating/test/rating.spec.js @@ -22,7 +22,7 @@ describe('rating directive', function () { var stars = getStars(); var state = []; for (var i = 0, n = stars.length; i < n; i++) { - state.push( (stars.eq(i).hasClass(classOn || 'icon-star') && ! stars.eq(i).hasClass(classOff || 'icon-star-empty')) ); + state.push( (stars.eq(i).hasClass(classOn || 'glyphicon-star') && ! stars.eq(i).hasClass(classOff || 'glyphicon-star-empty')) ); } return state; } @@ -126,8 +126,8 @@ describe('rating directive', function () { describe('custom states', function() { beforeEach(inject(function() { - $rootScope.classOn = 'icon-ok-sign'; - $rootScope.classOff = 'icon-ok-circle'; + $rootScope.classOn = 'glyphicon-ok-sign'; + $rootScope.classOff = 'glyphicon-ok-circle'; element = $compile('')($rootScope); $rootScope.$digest(); }));