fixed jQuery dprecations
This commit is contained in:
@@ -2601,7 +2601,7 @@ List - abstract class for inputs that have source option loaded from js array or
|
||||
onSourceReady: function (success, error) {
|
||||
//run source if it function
|
||||
var source;
|
||||
if ($.isFunction(this.options.source)) {
|
||||
if (typeof(this.options.source) === 'function') {
|
||||
source = this.options.source.call(this.options.scope);
|
||||
this.sourceData = null;
|
||||
//note: if function returns the same source as URL - sourceData will be taken from cahce and no extra request performed
|
||||
@@ -2718,7 +2718,7 @@ List - abstract class for inputs that have source option loaded from js array or
|
||||
|
||||
if(!Array.isArray(this.prependData)) {
|
||||
//run prepend if it is function (once)
|
||||
if ($.isFunction(this.options.prepend)) {
|
||||
if (typeof (this.options.prepend) === 'function') {
|
||||
this.options.prepend = this.options.prepend.call(this.options.scope);
|
||||
}
|
||||
|
||||
@@ -3695,7 +3695,7 @@ $(function(){
|
||||
if(!options.select2.tags && options.source) {
|
||||
var source = options.source;
|
||||
//if source is function, call it (once!)
|
||||
if ($.isFunction(options.source)) {
|
||||
if (typeof (options.source) === 'function') {
|
||||
source = options.source.call(options.scope);
|
||||
}
|
||||
|
||||
|
File diff suppressed because one or more lines are too long
@@ -2601,7 +2601,7 @@ List - abstract class for inputs that have source option loaded from js array or
|
||||
onSourceReady: function (success, error) {
|
||||
//run source if it function
|
||||
var source;
|
||||
if ($.isFunction(this.options.source)) {
|
||||
if (typeof(this.options.source) === 'function') {
|
||||
source = this.options.source.call(this.options.scope);
|
||||
this.sourceData = null;
|
||||
//note: if function returns the same source as URL - sourceData will be taken from cahce and no extra request performed
|
||||
@@ -2718,7 +2718,7 @@ List - abstract class for inputs that have source option loaded from js array or
|
||||
|
||||
if(!Array.isArray(this.prependData)) {
|
||||
//run prepend if it is function (once)
|
||||
if ($.isFunction(this.options.prepend)) {
|
||||
if (typeof (this.options.prepend) === 'function') {
|
||||
this.options.prepend = this.options.prepend.call(this.options.scope);
|
||||
}
|
||||
|
||||
@@ -3695,7 +3695,7 @@ $(function(){
|
||||
if(!options.select2.tags && options.source) {
|
||||
var source = options.source;
|
||||
//if source is function, call it (once!)
|
||||
if ($.isFunction(options.source)) {
|
||||
if (typeof (options.source) === 'function') {
|
||||
source = options.source.call(options.scope);
|
||||
}
|
||||
|
||||
|
File diff suppressed because one or more lines are too long
@@ -2601,7 +2601,7 @@ List - abstract class for inputs that have source option loaded from js array or
|
||||
onSourceReady: function (success, error) {
|
||||
//run source if it function
|
||||
var source;
|
||||
if ($.isFunction(this.options.source)) {
|
||||
if (typeof(this.options.source) === 'function') {
|
||||
source = this.options.source.call(this.options.scope);
|
||||
this.sourceData = null;
|
||||
//note: if function returns the same source as URL - sourceData will be taken from cahce and no extra request performed
|
||||
@@ -2718,7 +2718,7 @@ List - abstract class for inputs that have source option loaded from js array or
|
||||
|
||||
if(!Array.isArray(this.prependData)) {
|
||||
//run prepend if it is function (once)
|
||||
if ($.isFunction(this.options.prepend)) {
|
||||
if (typeof (this.options.prepend) === 'function') {
|
||||
this.options.prepend = this.options.prepend.call(this.options.scope);
|
||||
}
|
||||
|
||||
@@ -3695,7 +3695,7 @@ $(function(){
|
||||
if(!options.select2.tags && options.source) {
|
||||
var source = options.source;
|
||||
//if source is function, call it (once!)
|
||||
if ($.isFunction(options.source)) {
|
||||
if (typeof (options.source) === 'function') {
|
||||
source = options.source.call(options.scope);
|
||||
}
|
||||
|
||||
|
File diff suppressed because one or more lines are too long
4
dist/inputs-ext/typeaheadjs/lib/typeahead.js
vendored
4
dist/inputs-ext/typeaheadjs/lib/typeahead.js
vendored
@@ -24,7 +24,7 @@
|
||||
return typeof obj === "number";
|
||||
},
|
||||
isArray: Array.isArray,
|
||||
isFunction: $.isFunction,
|
||||
isFunction: (object) => typeof object === "function" && typeof object.call === "function",
|
||||
isObject: $.isPlainObject,
|
||||
isUndefined: function(obj) {
|
||||
return typeof obj === "undefined";
|
||||
@@ -33,7 +33,7 @@
|
||||
bindAll: function(obj) {
|
||||
var val;
|
||||
for (var key in obj) {
|
||||
$.isFunction(val = obj[key]) && (obj[key] = $.proxy(val, obj));
|
||||
typeof(val = obj[key]) === 'function' && (obj[key] = $.proxy(val, obj));
|
||||
}
|
||||
},
|
||||
indexOf: function(haystack, needle) {
|
||||
|
@@ -2601,7 +2601,7 @@ List - abstract class for inputs that have source option loaded from js array or
|
||||
onSourceReady: function (success, error) {
|
||||
//run source if it function
|
||||
var source;
|
||||
if ($.isFunction(this.options.source)) {
|
||||
if (typeof(this.options.source) === 'function') {
|
||||
source = this.options.source.call(this.options.scope);
|
||||
this.sourceData = null;
|
||||
//note: if function returns the same source as URL - sourceData will be taken from cahce and no extra request performed
|
||||
@@ -2718,7 +2718,7 @@ List - abstract class for inputs that have source option loaded from js array or
|
||||
|
||||
if(!Array.isArray(this.prependData)) {
|
||||
//run prepend if it is function (once)
|
||||
if ($.isFunction(this.options.prepend)) {
|
||||
if (typeof (this.options.prepend) === 'function') {
|
||||
this.options.prepend = this.options.prepend.call(this.options.scope);
|
||||
}
|
||||
|
||||
@@ -3695,7 +3695,7 @@ $(function(){
|
||||
if(!options.select2.tags && options.source) {
|
||||
var source = options.source;
|
||||
//if source is function, call it (once!)
|
||||
if ($.isFunction(options.source)) {
|
||||
if (typeof (options.source) === 'function') {
|
||||
source = options.source.call(options.scope);
|
||||
}
|
||||
|
||||
|
File diff suppressed because one or more lines are too long
@@ -2601,7 +2601,7 @@ List - abstract class for inputs that have source option loaded from js array or
|
||||
onSourceReady: function (success, error) {
|
||||
//run source if it function
|
||||
var source;
|
||||
if ($.isFunction(this.options.source)) {
|
||||
if (typeof(this.options.source) === 'function') {
|
||||
source = this.options.source.call(this.options.scope);
|
||||
this.sourceData = null;
|
||||
//note: if function returns the same source as URL - sourceData will be taken from cahce and no extra request performed
|
||||
@@ -2718,7 +2718,7 @@ List - abstract class for inputs that have source option loaded from js array or
|
||||
|
||||
if(!Array.isArray(this.prependData)) {
|
||||
//run prepend if it is function (once)
|
||||
if ($.isFunction(this.options.prepend)) {
|
||||
if (typeof (this.options.prepend) === 'function') {
|
||||
this.options.prepend = this.options.prepend.call(this.options.scope);
|
||||
}
|
||||
|
||||
@@ -3695,7 +3695,7 @@ $(function(){
|
||||
if(!options.select2.tags && options.source) {
|
||||
var source = options.source;
|
||||
//if source is function, call it (once!)
|
||||
if ($.isFunction(options.source)) {
|
||||
if (typeof (options.source) === 'function') {
|
||||
source = options.source.call(options.scope);
|
||||
}
|
||||
|
||||
|
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user