mirror of
https://bitbucket.org/bellord13/kit.git
synced 2026-11-13 19:06:11 +03:00
fix
This commit is contained in:
@@ -498,6 +498,8 @@ __PluginManager__.register('support', function(module, exports, require, global)
|
|||||||
isFloat,
|
isFloat,
|
||||||
isString,
|
isString,
|
||||||
isNode,
|
isNode,
|
||||||
|
isNodeList,
|
||||||
|
isDomObject,
|
||||||
isElement,
|
isElement,
|
||||||
getNode,
|
getNode,
|
||||||
extend,
|
extend,
|
||||||
|
|||||||
+22
-11
@@ -1,6 +1,7 @@
|
|||||||
kit.PluginManager.register('toolkit', function(module, exports, require, global) {
|
kit.PluginManager.register('toolkit', function(module, exports, require, global) {
|
||||||
|
|
||||||
var $ = require('jQuery');
|
var $ = require('jQuery');
|
||||||
|
var support = require('support');
|
||||||
|
|
||||||
var __Helper = function () {
|
var __Helper = function () {
|
||||||
|
|
||||||
@@ -729,7 +730,7 @@ kit.PluginManager.register('toolkit', function(module, exports, require, global)
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Inputs.prototype.checkDirty = function checkDirty(element) {
|
Inputs.prototype.setDirty = function setDirty(element) {
|
||||||
var bDirty = false;
|
var bDirty = false;
|
||||||
|
|
||||||
if(element.placeholder.length) {
|
if(element.placeholder.length) {
|
||||||
@@ -748,13 +749,12 @@ kit.PluginManager.register('toolkit', function(module, exports, require, global)
|
|||||||
return bDirty;
|
return bDirty;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
Inputs.prototype.changeFiled = function changeFiled(e) {
|
Inputs.prototype.changeFiled = function changeFiled(e) {
|
||||||
var _this2 = this;
|
var _this2 = this;
|
||||||
var target = e.target || e;
|
var target = e.target || e;
|
||||||
if (target.classList.contains('kit-field__input')) {
|
if (target.classList.contains('kit-field__input')) {
|
||||||
if (target.tagName == 'INPUT' || target.tagName == 'TEXTAREA') {
|
if (target.tagName === 'INPUT' || target.tagName === 'TEXTAREA') {
|
||||||
this.checkDirty(target);
|
this.setDirty(target);
|
||||||
|
|
||||||
var value_min = $(target).attr('value_min');
|
var value_min = $(target).attr('value_min');
|
||||||
var value_max = $(target).attr('value_max');
|
var value_max = $(target).attr('value_max');
|
||||||
@@ -785,11 +785,9 @@ kit.PluginManager.register('toolkit', function(module, exports, require, global)
|
|||||||
if (item.tagName === 'TEXTAREA') {
|
if (item.tagName === 'TEXTAREA') {
|
||||||
if (item.classList.contains('kit-autoheight')) {
|
if (item.classList.contains('kit-autoheight')) {
|
||||||
_this2.calcAutoHeight(item);
|
_this2.calcAutoHeight(item);
|
||||||
_this2.checkDirty(item);
|
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
_this2.checkDirty(item);
|
|
||||||
}
|
}
|
||||||
|
_this2.setDirty(item);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -832,10 +830,17 @@ kit.PluginManager.register('toolkit', function(module, exports, require, global)
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
Inputs.prototype.setTelMask = function () {
|
Inputs.prototype.setTelMask = function (node = false) {
|
||||||
var _this3 = this;
|
var _this3 = this;
|
||||||
|
|
||||||
$('[type=tel]').mask(global.config.defaultPhoneMask, {
|
if(support.isElement(node) || support.isNodeList(node)){
|
||||||
|
node = $(node);
|
||||||
|
} else if(node === false){
|
||||||
|
node = $('[type=tel]');
|
||||||
|
} else {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
node.mask(global.config.defaultPhoneMask, {
|
||||||
placeholder: '_', completed: function completed() {
|
placeholder: '_', completed: function completed() {
|
||||||
_this3.fieldNormalize(this);
|
_this3.fieldNormalize(this);
|
||||||
}
|
}
|
||||||
@@ -844,10 +849,16 @@ kit.PluginManager.register('toolkit', function(module, exports, require, global)
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
Inputs.prototype.setMask = function () {
|
Inputs.prototype.setMask = function (node = false) {
|
||||||
var _this3 = this;
|
var _this3 = this;
|
||||||
|
|
||||||
var node = $('[data-mask]');
|
if(support.isElement(node) || support.isNodeList(node)){
|
||||||
|
node = $(node);
|
||||||
|
} else if(node === false){
|
||||||
|
node = $('[data-mask]');
|
||||||
|
} else {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
node.each(function(index, item){
|
node.each(function(index, item){
|
||||||
item = $(item);
|
item = $(item);
|
||||||
|
|||||||
Reference in New Issue
Block a user