UNPKG

@progress/kendo-ui

Version:

This package is part of the [Kendo UI for jQuery](http://www.telerik.com/kendo-ui) suite.

3 lines (2 loc) 1.64 kB
!function(e){"function"==typeof define&&define.amd?define(["kendo.core.min","kendo.inputgroupbase.min","kendo.radiobutton.min"],e):e()}((function(){var e,t,i,a,n,r;e=window.kendo.jQuery,t=window.kendo.ui,i=t.InputGroupBase,a="checked",n="role",r=i.extend({options:{name:"RadioGroup",inputName:"",inputSize:"medium",enabled:!0,labelPosition:"after",layout:"vertical",items:[]},ITEM_TEMPLATE:'<li class="k-radio-item"><input type="radio" class="k-radio" ><label class="k-radio-label" ></label></li>',NS:".kendoRadioGroup",COMPONENT:"kendoRadioButton",groupStyles:{item:"k-radio-item",input:"k-radio",label:"k-radio-label",list:"k-radio-list",vertical:"k-list-vertical",horizontal:"k-list-horizontal",disabled:"k-disabled"},item:function(t){var i=this.wrapper.find("input:checked");return this._indexIsPresent(t)?e(this.items().get(t)):i.length?i:void 0},value:function(e){var t=this,i=t.element.find("[value='"+e+"']");if(void 0===e)return t._value;null===e&&(t._value=null,t.element.find("."+t.groupStyles.input).prop(a,!1)),i.length>0&&(t._value=e,t.element.find("."+t.groupStyles.input).prop(a,!1),i.prop(a,!0))},_changeHandler:function(t){var i=e(t.target),a=this._value;this._targetForPreventedChange!==t.target?(this._value=i.val(),this.trigger("change",{oldValue:a,newValue:this._value,target:i})):this._targetForPreventedChange=null},_dataValRequired:function(e){e["data-val-required"]=this.wrapper.attr("data-val-required")},_wrapper:function(){i.fn._wrapper.call(this),this.wrapper.find("."+this.groupStyles.item).attr(n,"none"),this.wrapper.attr(n,"radiogroup")}}),t.plugin(r)})); //# sourceMappingURL=kendo.radiogroup.min.js.map