annotate Blast output page example trimmed_files/jquery_005.js @ 16:db7e4ee3be03

fix validation, reindent
author Jan Kanis <jan.code@jankanis.nl>
date Tue, 13 May 2014 12:22:35 +0200
parents ffe82516a83c
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1
ffe82516a83c add trimmed down html example
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
1 (function(){var d=jQuery.ui.button.prototype._create;jQuery.ui.button.prototype.options.color="ui-ncbibutton-gray";jQuery.ui.button.validColors=["ui-ncbibutton-gray","ui-ncbibutton-copper","ui-ncbibutton-blue"];jQuery.ui.button.classColors=["jig-ncbibutton-gray","jig-ncbibutton-copper","jig-ncbibutton-blue"];var e=function(){d.apply(this,arguments);this._addClasses()};jQuery.widget("ui.ncbibutton",jQuery.ui.button,{_create:function(){e.apply(this,arguments)},_getColor:function(){for(var a=this.options.color,
ffe82516a83c add trimmed down html example
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
2 f=this.element[0].className,c=jQuery.ui.button.classColors,b=0;b<c.length;b++)if(f.indexOf(c[b])!==-1){a=jQuery.ui.button.validColors[b];break}if(a.indexOf("ui-ncbibutton-")!==0)a="ui-ncbibutton-"+a;if(jQuery.inArray(a,jQuery.ui.button.validColors)===-1){typeof console!=="undefined"&&console.warn&&console.warn("The color you picked: "+this.options.color+" is not a valid color choice.\n Valid colors: "+jQuery.ui.button.validColors.join(", "));a=jQuery.ui.button.validColors[0]}return a},_addClasses:function(){this.buttonElement.addClass("ui-ncbibutton").addClass(this._getColor()).removeClass("ui-button ui-widget")}})})();