Skip to content

Commit

Permalink
Merge 329556a into bd836f1
Browse files Browse the repository at this point in the history
  • Loading branch information
wonknu committed Nov 30, 2017
2 parents bd836f1 + 329556a commit 4c6150e
Showing 1 changed file with 20 additions and 20 deletions.
40 changes: 20 additions & 20 deletions src/server/public/abecms/scripts/modules/EditorAutocomplete.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,26 +123,6 @@ export default class EditorAutocomplete {
)
var maxLength = this._currentInput.getAttribute('data-maxlength')

if (
typeof maxLength !== 'undefined' &&
maxLength !== null &&
maxLength !== ''
) {
maxLength = parseInt(maxLength)
var countLength = [].slice.call(
this._currentInput.parentNode.querySelectorAll(
'.autocomplete-result-wrapper .autocomplete-result'
)
).length
if (countLength === maxLength) {
this._currentInput.value = ''
//this._divWrapper.parentNode.removeChild(this._divWrapper)
this._currentInput.setAttribute('disabled', 'disabled')
} else {
this._currentInput.removeAttribute('disabled')
}
}

var results = [].slice.call(
this._currentInput.parentNode.querySelectorAll(
'.autocomplete-result-wrapper .autocomplete-result'
Expand Down Expand Up @@ -194,6 +174,26 @@ export default class EditorAutocomplete {
}
}

if (
typeof maxLength !== 'undefined' &&
maxLength !== null &&
maxLength !== ''
) {
maxLength = parseInt(maxLength)
var countLength = [].slice.call(
this._currentInput.parentNode.querySelectorAll(
'.autocomplete-result-wrapper .autocomplete-result'
)
).length
if (countLength === maxLength) {
this._currentInput.value = ''
//this._divWrapper.parentNode.removeChild(this._divWrapper)
this._currentInput.setAttribute('disabled', 'disabled')
} else {
this._currentInput.removeAttribute('disabled')
}
}

this.onReload._fire()
}

Expand Down

0 comments on commit 4c6150e

Please sign in to comment.