mirror of
https://bitbucket.org/bellord13/kit.git
synced 2026-11-13 19:06:11 +03:00
fix
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user