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

Commit

Permalink
feat(rating): update rating to bootstrap3
Browse files Browse the repository at this point in the history
Closes #1242
  • Loading branch information
pkozlowski-opensource committed Dec 28, 2013
1 parent d221d51 commit 7e60284
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/rating/docs/demo.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ <h4>Default</h4>
<hr />

<h4>Custom icons</h4>
<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>
<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>
<div ng-init="y = 2"><rating value="y" rating-states="ratingStates"></rating> <b>(<i>Rate:</i> {{y}})</b></div>
</div>
10 changes: 5 additions & 5 deletions src/rating/docs/demo.js
Original file line number Diff line number Diff line change
Expand Up @@ -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-sign', stateOff: 'glyphicon-ok-circle'},
{stateOn: 'glyphicon-star', stateOff: 'glyphicon-star-empty'},
{stateOn: 'glyphicon-heart', stateOff: 'glyphicon-ban-circle'},
{stateOn: 'glyphicon-heart'},
{stateOff: 'glyphicon-off'}
];
};
2 changes: 1 addition & 1 deletion template/rating/rating.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<span ng-mouseleave="reset()">
<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>
<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>
</span>

0 comments on commit 7e60284

Please sign in to comment.