Skip to content
This repository was archived by the owner on May 29, 2019. It is now read-only.

Commit 7e60284

Browse files
feat(rating): update rating to bootstrap3
Closes #1242
1 parent d221d51 commit 7e60284

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

src/rating/docs/demo.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@ <h4>Default</h4>
1010
<hr />
1111

1212
<h4>Custom icons</h4>
13-
<div ng-init="x = 5"><rating value="x" max="15" state-on="'icon-ok-sign'" state-off="'icon-ok-circle'"></rating> <b>(<i>Rate:</i> {{x}})</b></div>
13+
<div ng-init="x = 5"><rating value="x" max="15" state-on="'glyphicon-ok-sign'" state-off="'glyphicon-ok-circle'"></rating> <b>(<i>Rate:</i> {{x}})</b></div>
1414
<div ng-init="y = 2"><rating value="y" rating-states="ratingStates"></rating> <b>(<i>Rate:</i> {{y}})</b></div>
1515
</div>

src/rating/docs/demo.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ var RatingDemoCtrl = function ($scope) {
99
};
1010

1111
$scope.ratingStates = [
12-
{stateOn: 'icon-ok-sign', stateOff: 'icon-ok-circle'},
13-
{stateOn: 'icon-star', stateOff: 'icon-star-empty'},
14-
{stateOn: 'icon-heart', stateOff: 'icon-ban-circle'},
15-
{stateOn: 'icon-heart'},
16-
{stateOff: 'icon-off'}
12+
{stateOn: 'glyphicon-ok-sign', stateOff: 'glyphicon-ok-circle'},
13+
{stateOn: 'glyphicon-star', stateOff: 'glyphicon-star-empty'},
14+
{stateOn: 'glyphicon-heart', stateOff: 'glyphicon-ban-circle'},
15+
{stateOn: 'glyphicon-heart'},
16+
{stateOff: 'glyphicon-off'}
1717
];
1818
};

template/rating/rating.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
<span ng-mouseleave="reset()">
2-
<i ng-repeat="r in range" ng-mouseenter="enter($index + 1)" ng-click="rate($index + 1)" ng-class="$index < val && (r.stateOn || 'glyphicon glyphicon-star') || (r.stateOff || 'glyphicon glyphicon-star-empty')"></i>
2+
<i ng-repeat="r in range" ng-mouseenter="enter($index + 1)" ng-click="rate($index + 1)" class="glyphicon" ng-class="$index < val && (r.stateOn || 'glyphicon-star') || (r.stateOff || 'glyphicon-star-empty')"></i>
33
</span>

0 commit comments

Comments
 (0)