From b6c6dd197077e98b65652fce18605c56a34eb893 Mon Sep 17 00:00:00 2001 From: Javier Toledo Date: Mon, 25 May 2015 15:18:15 +0100 Subject: [PATCH] Updated minified version --- build/bootstrap-rating-input.min.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/bootstrap-rating-input.min.js b/build/bootstrap-rating-input.min.js index c7cc86e..726394e 100644 --- a/build/bootstrap-rating-input.min.js +++ b/build/bootstrap-rating-input.min.js @@ -1 +1 @@ -!function(a){var b="rating-clear",c="."+b,d="hidden",e=function(a){return"[data-value"+(a?"="+a:"")+"]"},f=function(a,b,c){var d=c["active-icon"],e=c["inactive-icon"];a.removeClass(b?e:d).addClass(b?d:e)},g=function(c,d){for(var e=d.min,f=d.max,g=d.clearable,h=a('
'),i=e;f>=i;i++)h.append('');return g&&h.append(" ").append(''+g+""),h},h=function(a){var b={};for(option in i)b[option]=a.data(option);return b},i={min:1,max:5,"icon-lib":"glyphicon","active-icon":"glyphicon-star","inactive-icon":"glyphicon-star-empty",clearable:"","clearable-icon":"glyphicon-remove"},j=function(b,c){var e=this.$input=a(b),f=this.options=a.extend({},i,h(e),c),j=this.$el=g(e,f);e.addClass(d).after(j),this.highlight(f.value)};j.VERSION="0.3.0",j.DEFAULTS=i,j.prototype={clear:function(){this.setValue(this.options.min-1)},setValue:function(a){this.highlight(a),this.updateInput(a)},highlight:function(a,b){var g=this.options,h=a-g.min+1,i=this.$el,j=i.find(e(h));h?(f(j.prevAll("i").andSelf(),!0,g),f(j.nextAll("i"),!1,g)):f(j,!1,g),b||i.find(c).toggleClass(d,!h)},updateInput:function(a){var b=a+this.options.min-1,c=this.$input;c.val()!=b&&c.val(b).change()}};var k=a.fn.rating=function(b){return this.each(function(){var d=a(this),f="rating",g=d.data(f),h="object"==typeof b&&b;g||(g=new j(d,h),g.$el.on("mouseenter",e(),function(){g.highlight(a(this).data("value"),!0)}).on("mouseleave",e(),function(){g.highlight(d.val(),!0)}).on("click",e(),function(){g.setValue(a(this).data("value"))}).on("click",c,function(){g.clear()}),d.data(f,g)),"clear"===b?g.clear():"setValue"===b&&g.setValue(arguments[1])})};k.Constructor=j,a(function(){a("input.rating[type=number]").each(function(){a(this).rating()})})}(jQuery); \ No newline at end of file +!function(a){var b="rating-clear",c="."+b,d="hidden",e=function(a){return"[data-value"+(a?"="+a:"")+"]"},f=function(a,b,c){var d=c["active-icon"],e=c["inactive-icon"];a.removeClass(b?e:d).addClass(b?d:e)},g=function(c,d){for(var e=d.min,f=d.max,g=d.clearable,h=a('
'),i=e;f>=i;i++)h.append('');return g&&h.append(" ").append(''+g+""),h},h=function(a){var b={};for(option in i)b[option]=a.data(option);return b},i={min:1,max:5,"icon-lib":"glyphicon","active-icon":"glyphicon-star","inactive-icon":"glyphicon-star-empty",clearable:"","clearable-icon":"glyphicon-remove"},j=function(b,c){var e=this.$input=a(b),f=this.options=a.extend({},i,h(e),c),j=this.$el=g(e,f);e.addClass(d).before(j),this.highlight(f.value)};j.VERSION="0.3.0",j.DEFAULTS=i,j.prototype={clear:function(){this.setValue(this.options.min-1)},setValue:function(a){this.highlight(a),this.updateInput(a)},highlight:function(a,b){var g=this.options,h=a-g.min+1,i=this.$el,j=i.find(e(h));h?(f(j.prevAll("i").andSelf(),!0,g),f(j.nextAll("i"),!1,g)):f(j,!1,g),b||i.find(c).toggleClass(d,!h)},updateInput:function(a){var b=a+this.options.min-1,c=this.$input;c.val()!=b&&c.val(b).change()}};var k=a.fn.rating=function(b){return this.each(function(){var d=a(this),f="rating",g=d.data(f),h="object"==typeof b&&b;g||(g=new j(d,h),g.$el.on("mouseenter",e(),function(){g.highlight(a(this).data("value"),!0)}).on("mouseleave",e(),function(){g.highlight(d.val(),!0)}).on("click",e(),function(){g.setValue(a(this).data("value"))}).on("click",c,function(){g.clear()}),d.data(f,g)),"clear"===b?g.clear():"setValue"===b&&g.setValue(arguments[1])})};k.Constructor=j,a(function(){a("input.rating[type=number]").each(function(){a(this).rating()})})}(jQuery); \ No newline at end of file