mirror of
https://github.com/hanzoai/jube-fork.git
synced 2026-11-03 01:01:41 +00:00
27 lines
8.4 KiB
JavaScript
Executable File
27 lines
8.4 KiB
JavaScript
Executable File
/**
|
|
* Kendo UI v2021.1.224 (http://www.telerik.com/kendo-ui)
|
|
* Copyright 2021 Progress Software Corporation and/or one of its subsidiaries or affiliates. All rights reserved.
|
|
*
|
|
* Kendo UI commercial licenses may be obtained at
|
|
* http://www.telerik.com/purchase/license-agreement/kendo-ui-complete
|
|
* If you do not own a commercial license, this file shall be governed by the trial license terms.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
*/
|
|
!function(t,define){define("kendo.inputgroupbase.min",["kendo.core.min"],t)}(function(){return function(t,e){var i=window.kendo,n=i.ui,s=n.Widget,a=t.extend,r=t.proxy,l="change",o="focus",d="click",u="select",h=".",p="disabled",f="role",c="vertical",g="after",m=s.extend({init:function(t,e){var i=this;s.fn.init.call(i,t,e),i.options=a({},i.options,e),i._iterateMarkupItems(),i._parseItems(i.options.items),i._wrapper(),i.value(i.options.value),i._attachEvents()},options:{name:"InputGroupBase"},events:[l,o,u],ITEM_TEMPLATE:"",NS:".kendoInputGroupBase",GROUP_ROLE:"",groupStyles:{},destroy:function(){var t=this;t.element.off(t.NS),s.fn.destroy.call(t)},item:function(e){if(this._indexIsPresent(e))return t(this.items().get(e))},items:function(){return this.wrapper.find(h+this.groupStyles.input)},enable:function(t){var e;t!==!1&&t!==!0||(e=this.element.find(h+this.groupStyles.item),this._disabledOnElements(e,!t))},enableItem:function(e,i){if(e===!1||e===!0){if(this._indexIsPresent(i))i=t(this.element.find(h+this.groupStyles.item).get(i));else{if(!(i instanceof jQuery))return;if(i.is("input"))i=i.closest(h+this.groupStyles.item);else if(!i.is("li"))return}this._disabledOnElements(i,!e)}},value:function(){return!1},_attachEvents:function(){var t=this;t.element.on(o+t.NS,h+t.groupStyles.input,r(t._focusHandler,t)).on(l+t.NS,h+t.groupStyles.input,r(t._changeHandler,t)).on(d+t.NS,h+t.groupStyles.input,r(t._clickHandler,t))},_clickHandler:function(e){var i=t(e.target);this.trigger(u,{target:i})&&(e.preventDefault(),e.stopPropagation(),this._targetForPreventedChange=e.target)},_changeHandler:function(){return!1},_dataValRequired:function(){return!1},_disabledOnElements:function(t,e){var i=t.find("input");e?(i.attr(p,""),t.addClass(this.groupStyles.disabled)):(i.removeAttr(p),t.removeClass(this.groupStyles.disabled))},_focusHandler:function(e){var i=t(e.target);this.trigger(o,{target:i})},_indexIsPresent:function(t){return!isNaN(t)&&null!==t&&t!==!0&&t!==!1&&this.wrapper.find(h+this.groupStyles.input).length>t},_initializeItem:function(e,i){var n=t(this.wrapper.find(h+this.groupStyles.item).get(i)||this.ITEM_TEMPLATE),s=n.find(h+this.groupStyles.label),a=n.find(h+this.groupStyles.input);e.value&&a.val(e.value),e.name&&a.attr("name",e.name),e.id&&(a.attr("id",e.id),s.attr("for",e.id)),e.label&&(e.encoded?s.text(e.label):s.html(e.label)),e.labelAfter||s.after(a),e.attributes&&n.attr(e.attributes),e.cssClass&&n.addClass(e.cssClass),e.enabled||this._disabledOnElements(n,!0),e.validation&&a.attr(e.validation),0===n.closest(h+this.groupStyles.list).length&&this.element.append(n)},_iterateMarkupItems:function(){var t=this.element;t.children("li").length>0&&t.find("li").each(r(this._markupItem,this))},_markupItem:function(e,i){var n=i.querySelector("input");n.hasAttribute("disabled")&&t(i).addClass(this.groupStyles.disabled)},_parseItem:function(t,n){var s=this.options,r=this._items;"string"==typeof t&&(t={value:t,label:t}),t.encoded!==!1&&(t.encoded=!0),s.labelPosition===g&&(t.labelAfter=!0),t.enabled===e&&(t.enabled=s.enabled),t.id||(t.id=i.guid()),t.name=s.inputName||this.element.attr("id"),r.length>n?r[n]=a({},r[n],t):r.push(t)},_parseItems:function(t){this._items||(this._items=[]),t&&t.forEach(r(this._parseItem,this))},_validationSettings:function(){var t=this.wrapper,e=this._items,i={},n=function(t){t.validation=i},s=function(){e.push({})};t.is("[required]")&&(i.required="required",t.removeAttr("required")),t.is("[data-val=true]")&&(i["data-val"]="true",t.removeAttr("data-val")),t.is("[data-val-required]")&&(this._dataValRequired(i),t.removeAttr("data-val-required")),t.is("[data-val-server]")&&(i["data-val-server"]=t.attr("data-val-server")),Object.keys(i).length>0&&(!e||0===e.length)&&t.find("li").each(s),e.forEach(n)},_wrapper:function(){var t=this.wrapper=this.element,e=this._items,i=t.find("li"),n=t.find("input");t.attr(f,this.GROUP_ROLE).addClass(this.groupStyles.list),t.addClass(this.options.layout===c?this.groupStyles.vertical:this.groupStyles.horizontal),i.length>0&&n.length>0&&(i.addClass(this.groupStyles.item),n.addClass(this.groupStyles.input),t.find("label").addClass(this.groupStyles.label)),this._validationSettings(),e.forEach(r(this._initializeItem,this))}});n.plugin(m)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(t,e,i){(i||e)()});
|
|
//# sourceMappingURL=kendo.inputgroupbase.min.js.map
|