This commit is contained in:
2024-03-15 20:37:29 +03:00
parent 667cf886d5
commit 5ba5732059
63 changed files with 17584 additions and 35 deletions
+14 -7
View File
@@ -696,9 +696,13 @@ kit.PluginManager.register('toolkit', function(module, exports, require, global)
var __Inputs = function () {
function Inputs() {
}
Inputs.prototype.init = function() {
var _this = this;
this.init();
this.initFields();
window.addEventListener('resize', function () {
return _this.refresh();
@@ -727,8 +731,7 @@ kit.PluginManager.register('toolkit', function(module, exports, require, global)
document.addEventListener('change', function (e) {
return _this.switchField(e);
}, false);
}
};
Inputs.prototype.setDirty = function setDirty(element) {
var bDirty = false;
@@ -843,10 +846,11 @@ kit.PluginManager.register('toolkit', function(module, exports, require, global)
if(support.isElement(node) || support.isNodeList(node)){
node = $(node);
} else if(node === false){
node = $('[type=tel]');
node = $('[type=tel]:not([data-kit-mask-skip])');
} else {
return;
}
node.mask(global.config.defaultPhoneMask, {
placeholder: '_', completed: function completed() {
_this3.fieldNormalize(this);
@@ -883,10 +887,10 @@ kit.PluginManager.register('toolkit', function(module, exports, require, global)
};
Inputs.prototype.unsetTelMask = function() {
$('input[type=tel]').unmask();
$('input[type=tel]:not([data-kit-mask-skip])').unmask();
};
Inputs.prototype.init = function init() {
Inputs.prototype.initFields = function() {
this.checkAllInputs();
this.setMask();
this.setTelMask();
@@ -894,7 +898,7 @@ kit.PluginManager.register('toolkit', function(module, exports, require, global)
Inputs.prototype.refresh = function refresh() {
this.unsetTelMask();
this.init();
this.initFields();
};
@@ -945,6 +949,9 @@ kit.PluginManager.register('toolkit', function(module, exports, require, global)
}();
var inputs = new __Inputs();
kit.ready([], function(){
inputs.init();
});
/**
* @class kitToolkit