fixed jQuery dprecations
This commit is contained in:
@@ -42,7 +42,7 @@ Makes editable any HTML element on the page. Applied as jQuery method.
|
||||
|
||||
//set value from settings or by element's text
|
||||
if (this.options.value === undefined || this.options.value === null) {
|
||||
this.value = this.input.html2value($.trim(this.$element.html()));
|
||||
this.value = this.input.html2value(this.$element.html().trim());
|
||||
isValueByText = true;
|
||||
} else {
|
||||
/*
|
||||
@@ -104,7 +104,7 @@ Makes editable any HTML element on the page. Applied as jQuery method.
|
||||
break;
|
||||
case 'auto':
|
||||
//if element text is empty and value is defined and value not generated by text --> run autotext
|
||||
doAutotext = !$.trim(this.$element.text()).length && this.value !== null && this.value !== undefined && !isValueByText;
|
||||
doAutotext = !(this.$element.text().trim()).length && this.value !== null && this.value !== undefined && !isValueByText;
|
||||
break;
|
||||
default:
|
||||
doAutotext = false;
|
||||
@@ -236,7 +236,7 @@ Makes editable any HTML element on the page. Applied as jQuery method.
|
||||
//set option(s) by object
|
||||
if(key && typeof key === 'object') {
|
||||
$.each(key, $.proxy(function(k, v){
|
||||
this.option($.trim(k), v);
|
||||
this.option(k.triim(), v);
|
||||
}, this));
|
||||
return;
|
||||
}
|
||||
@@ -289,7 +289,7 @@ Makes editable any HTML element on the page. Applied as jQuery method.
|
||||
if(typeof(this.input.isEmpty) === 'function') {
|
||||
this.isEmpty = this.input.isEmpty(this.$element);
|
||||
} else {
|
||||
this.isEmpty = $.trim(this.$element.html()) === '';
|
||||
this.isEmpty = this.$element.html().trim() === '';
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user