Skip to content

Commit

Permalink
Reformatted as per coding standards
Browse files Browse the repository at this point in the history
  • Loading branch information
kartik-v committed Apr 5, 2014
1 parent de9b70c commit 228e505
Show file tree
Hide file tree
Showing 5 changed files with 414 additions and 414 deletions.
60 changes: 30 additions & 30 deletions bower.json
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
{
"name": "bootstrap-star-rating",
"version": "1.0.0",
"homepage": "https://github.com/kartik-v/bootstrap-star-rating",
"authors": [
"Kartik Visweswaran <[email protected]>"
],
"description": "A simple yet powerful JQuery star rating plugin for Bootstrap.",
"main": [
"./css/star-rating.min.css",
"./js/star-rating.min.js"
],
"keywords": [
"bootstrap",
"star",
"rating"
],
"dependencies": {
"jquery": ">= 1.9.0",
"bootstrap": ">= 3.0.0"
},
"license": "BSD-3",
"ignore": [
"**/.*",
"node_modules",
"composer.json",
"examples",
"bower_components",
"test",
"tests"
]
"name": "bootstrap-star-rating",
"version": "1.0.0",
"homepage": "https://github.com/kartik-v/bootstrap-star-rating",
"authors": [
"Kartik Visweswaran <[email protected]>"
],
"description": "A simple yet powerful JQuery star rating plugin for Bootstrap.",
"main": [
"./css/star-rating.min.css",
"./js/star-rating.min.js"
],
"keywords": [
"bootstrap",
"star",
"rating"
],
"dependencies": {
"jquery": ">= 1.9.0",
"bootstrap": ">= 3.0.0"
},
"license": "BSD-3",
"ignore": [
"**/.*",
"node_modules",
"composer.json",
"examples",
"bower_components",
"test",
"tests"
]
}
34 changes: 17 additions & 17 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
{
"name": "kartik-v/bootstrap-star-rating",
"description": "A simple yet powerful JQuery star rating plugin for Bootstrap.",
"keywords": ["bootstrap", "jquery", "star", "rating"],
"homepage": "https://github.com/kartik-v/bootstrap-star-rating",
"license": "BSD 3-Clause",
"authors": [
{
"name": "Kartik Visweswaran",
"email": "[email protected]",
"homepage": "http://www.krajee.com/"
}
],
"autoload": {
"psr-4": {
"kartik\\": ""
}
}
"name": "kartik-v/bootstrap-star-rating",
"description": "A simple yet powerful JQuery star rating plugin for Bootstrap.",
"keywords": ["bootstrap", "jquery", "star", "rating"],
"homepage": "https://github.com/kartik-v/bootstrap-star-rating",
"license": "BSD 3-Clause",
"authors": [
{
"name": "Kartik Visweswaran",
"email": "[email protected]",
"homepage": "http://www.krajee.com/"
}
],
"autoload": {
"psr-4": {
"kartik\\": ""
}
}
}
120 changes: 60 additions & 60 deletions css/star-rating.css
Original file line number Diff line number Diff line change
Expand Up @@ -13,161 +13,161 @@
* Stars
*/
.star-rating s, .star-rating-rtl s {
padding: 2px;
padding: 2px;
}

.star-rating s,
.star-rating-rtl s {
color: #ccc;
text-decoration: none;
cursor: not-allowed;
font-family: 'Glyphicons Halflings';
font-style: normal;
font-weight: normal;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
color: #ccc;
text-decoration: none;
cursor: not-allowed;
font-family: 'Glyphicons Halflings';
font-style: normal;
font-weight: normal;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}

.star-rating-disabled {
opacity: 0.65;
opacity: 0.65;
}

.star-rating-active s, .star-rating-rtl-active s {
cursor: default;
cursor: default;
}

.star-rating-active s:hover:before, .star-rating s.rated:before {
text-shadow: 0 0 2px rgba(0, 0, 0, 0.7);
content: "\e006";
color: #fde16d;
text-shadow: 0 0 2px rgba(0, 0, 0, 0.7);
content: "\e006";
color: #fde16d;
}

.star-rating s:before {
text-shadow: 0 0 1px rgba(0, 0, 0, 0.1);
content: "\e007";
text-shadow: 0 0 1px rgba(0, 0, 0, 0.1);
content: "\e007";
}

.star-rating-rtl-active s:hover:after, .star-rating-rtl s.rated:after {
text-shadow: 0 0 2px rgba(0, 0, 0, 0.7);
content: "\e006";
color: #fde16d;
text-shadow: 0 0 2px rgba(0, 0, 0, 0.7);
content: "\e006";
color: #fde16d;
}

.star-rating-rtl s:after {
text-shadow: 0 0 1px rgba(0, 0, 0, 0.1);
content: "\e007";
text-shadow: 0 0 1px rgba(0, 0, 0, 0.1);
content: "\e007";
}

.star-rating-active s:hover:before, .star-rating-rtl-active s:hover:after {
text-shadow: 0 0 2px rgba(0, 0, 0, 0.7);
color: #8a6d3b;
text-shadow: 0 0 2px rgba(0, 0, 0, 0.7);
color: #8a6d3b;
}

/**
* Rating sizes
*/
.rating-xl {
font-size: 50px;
line-height: 32px;
font-size: 50px;
line-height: 32px;
}

.rating-lg {
font-size: 40px;
line-height: 26px;
font-size: 40px;
line-height: 26px;
}

.rating-md {
font-size: 32px;
line-height: 21px;
font-size: 32px;
line-height: 21px;
}

.rating-sm {
font-size: 26px;
line-height: 17px;
font-size: 26px;
line-height: 17px;
}

.rating-xs {
font-size: 21px;
line-height: 14px;
font-size: 21px;
line-height: 14px;
}

/**
* Clear rating button
*/
.star-rating .clear-rating, .star-rating-rtl .clear-rating {
color: #aaa;
cursor: not-allowed;
display: inline-block;
vertical-align: middle;
font-size: 70%;
color: #aaa;
cursor: not-allowed;
display: inline-block;
vertical-align: middle;
font-size: 70%;
}

.clear-rating-active {
cursor: pointer !important;
cursor: pointer !important;
}

.clear-rating-active:hover {
color: #843534;
color: #843534;
}

.star-rating .clear-rating {
padding-right: 5px;
padding-right: 5px;
}

.star-rating-rtl .clear-rating {
padding-left: 5px;
padding-left: 5px;
}

.rating-xl .clear-rating {
padding-bottom: 20px;
padding-bottom: 20px;
}

.rating-lg .clear-rating {
padding-bottom: 17px;
padding-bottom: 17px;
}

.rating-md .clear-rating {
padding-bottom: 15px;
padding-bottom: 15px;
}

.rating-sm .clear-rating {
padding-bottom: 12px;
padding-bottom: 12px;
}

.rating-xs .clear-rating {
padding-bottom: 10px;
padding-bottom: 10px;
}

/**
* Caption
*/
.star-rating .caption, .star-rating-rtl .caption {
color: #999;
display: inline-block;
vertical-align: middle;
color: #999;
display: inline-block;
vertical-align: middle;
}

.rating-xl .caption {
font-size: 24px;
padding-bottom: 25px;
font-size: 24px;
padding-bottom: 25px;
}

.rating-lg .caption {
font-size: 20px;
padding-bottom: 22px;
font-size: 20px;
padding-bottom: 22px;
}

.rating-md .caption {
font-size: 18px;
padding-bottom: 20px;
font-size: 18px;
padding-bottom: 20px;
}

.rating-sm .caption {
font-size: 16px;
padding-bottom: 17px;
font-size: 16px;
padding-bottom: 17px;
}

.rating-xs .caption {
font-size: 14px;
padding-bottom: 12px;
font-size: 14px;
padding-bottom: 12px;
}
28 changes: 14 additions & 14 deletions examples/index.html
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8"/>
<title>Krajee JQuery Plugins - &copy; Kartik</title>
<link href="http://netdna.bootstrapcdn.com/bootstrap/3.1.0/css/bootstrap.min.css" rel="stylesheet">
<link href="../css/star-rating.css" media="all" rel="stylesheet" type="text/css"/>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<script src="../js/star-rating.js" type="text/javascript"></script>
<meta charset="UTF-8"/>
<title>Krajee JQuery Plugins - &copy; Kartik</title>
<link href="http://netdna.bootstrapcdn.com/bootstrap/3.1.0/css/bootstrap.min.css" rel="stylesheet">
<link href="../css/star-rating.css" media="all" rel="stylesheet" type="text/css"/>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<script src="../js/star-rating.js" type="text/javascript"></script>
<style>
.star-rating .my-clear, .star-rating-rtl .my-clear {
color: #aaa;
Expand Down Expand Up @@ -52,21 +52,21 @@
padding-bottom: 10px;
}


</style>
</head>
<body>
<h1>Bootstrap Star Rating Example</h1>

<form>
<input id="input-21" type="number" class="rating" min="10" max="29" step="2">
<input id="input-22" type="number" class="rating" min="10" max="29" step="2">
<input id="input-23" type="number" class="rating" min="10" max="29" step="2">
<button class="btn btn-primary">Submit</button>
<button class="btn btn-default" type="reset">Reset</button>
<input id="input-21" type="number" class="rating" min="10" max="29" step="2">
<input id="input-22" type="number" class="rating" min="10" max="29" step="2">
<input id="input-23" type="number" class="rating" min="10" max="29" step="2">
<button class="btn btn-primary">Submit</button>
<button class="btn btn-default" type="reset">Reset</button>
<script>
$("#input-22").on('rating.change', function(event, value, caption) {
$('#input-22').attr('disabled', true);
$("#input-22").on('rating.change', function (event, value, caption) {
$('#input-22').attr('disabled', true);
$('#input-22').rating('refresh')
});
$("#input-23").rating({
Expand Down
Loading

0 comments on commit 228e505

Please sign in to comment.