|
@@ -211,8 +211,12 @@
|
|
$modal.appendTo($body);
|
|
$modal.appendTo($body);
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+ // https://stackoverflow.com/a/6000016
|
|
|
|
+ isFunction: function (v) {
|
|
|
|
+ return !!(v && v.constructor && v.call && v.apply);
|
|
|
|
+ },
|
|
isEmpty: function (value, trim) {
|
|
isEmpty: function (value, trim) {
|
|
- return value === undefined || value === null || value.length === 0 || (trim && $.trim(value) === '');
|
|
|
|
|
|
+ return value === undefined || value === null || (!$h.isFunction(value) && ( value.length === 0 || (trim && $.trim(value) === '')));
|
|
},
|
|
},
|
|
isArray: function (a) {
|
|
isArray: function (a) {
|
|
return Array.isArray(a) || Object.prototype.toString.call(a) === '[object Array]';
|
|
return Array.isArray(a) || Object.prototype.toString.call(a) === '[object Array]';
|
|
@@ -5658,4 +5662,4 @@
|
|
$input.fileinput();
|
|
$input.fileinput();
|
|
}
|
|
}
|
|
});
|
|
});
|
|
-}));
|
|
|
|
|
|
+}));
|