Files
2022-11-04 13:24:24 +02:00

27 lines
7.0 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(e,define){define("kendo.textbox.min",["kendo.core.min","kendo.floatinglabel.min"],e)}(function(){return function(e,a){var l=window.kendo,t=l.ui.Widget,n=l.ui,o=e.isPlainObject,i=".kendoTextBox",r="change",s="disabled",d="readonly",u="k-input",f="k-state-focused",p="k-label k-input-label",b="k-state-disabled",c="k-no-click",v="aria-disabled",g=e.proxy,m=t.extend({init:function(n,o){var i=this;t.fn.init.call(i,n,o),o=e.extend(!0,{},o),i.options.value=o.value||i.element.val(),i.options.readonly=o.readonly!==a?o.readonly:!!i.element.attr("readonly"),i.options.enable=o.enable!==a?o.enable:!!!i.element.attr("disabled"),i.options.placeholder=o.placeholder||i.element.attr("placeholder"),i.value(i.options.value),i._wrapper(),i._label(),i._editable({readonly:i.options.readonly,disable:!i.options.enable}),i.element.addClass(u).attr("placeholder",i.options.placeholder).attr("autocomplete","off"),l.notify(i)},events:[r],options:{name:"TextBox",value:"",readonly:!1,enable:!0,placeholder:"",label:null},value:function(e){var l=this;return e===a?l._value:(l._value=e,l.element.val(e),a)},readonly:function(e){var l=this;this._editable({readonly:e===a||e,disable:!1}),l.floatingLabel&&l.floatingLabel.readonly(e===a||e)},enable:function(e){var l=this;this._editable({readonly:!1,disable:!(e=e===a||e)}),l.floatingLabel&&l.floatingLabel.enable(e=e===a||e)},focus:function(){var e=this;e.element[0].focus()},destroy:function(){var e=this;e.floatingLabel&&e.floatingLabel.destroy(),e.element.off(i),t.fn.destroy.call(e)},_editable:function(e){var a=this,l=a.element,t=a.wrapper,n=e.disable,o=e.readonly;l.off(i),o||n?(l.attr(s,n).attr(d,o).attr(v,n),t.toggleClass(b,n).toggleClass(c,o)):(l.removeAttr(s).removeAttr(d).attr(v,!1),t.removeClass(b).removeClass(c),l.on("focusin"+i,g(a._focusin,a)),l.on("focusout"+i,g(a._focusout,a)))},_label:function(){var a,t,n=this,i=n.element,r=n.options,s=i.attr("id");null!==r.label&&(a=!!o(r.label)&&r.label.floating,t=o(r.label)?r.label.content:r.label,a&&(n._floatingLabelContainer=n.wrapper.wrap("<span></span>").parent(),n.floatingLabel=new l.ui.FloatingLabel(n._floatingLabelContainer,{widget:n})),l.isFunction(t)&&(t=t.call(n)),t||(t=""),s||(s=r.name+"_"+l.guid(),i.attr("id",s)),n._inputLabel=e("<label class='"+p+"' for='"+s+"'>"+t+"</label>'").insertBefore(n.wrapper))},_focusin:function(){var e=this;e.wrapper.addClass(f)},_focusout:function(){var e=this,a=e._value,l=e.element.val();e.wrapper.removeClass(f),a!==l&&(e._value=l,e.trigger(r))},_wrapper:function(){var e=this,a=e.element,l=a[0],t=a.wrap("<span class='k-widget k-textbox'></span>").parent();t[0].style.cssText=l.style.cssText,l.style.width="100%",e._inputWrapper=e.wrapper=t.addClass(l.className).removeClass("input-validation-error")}});n.plugin(m)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,a,l){(l||a)()});
//# sourceMappingURL=kendo.textbox.min.js.map