mirror of
https://github.com/Karaka-Management/jsOMS.git
synced 2026-01-11 17:58:41 +00:00
typeof fix.
This commit is contained in:
parent
990ee6d7dd
commit
5350531511
|
|
@ -30,19 +30,19 @@
|
||||||
input.addEventListener('change', function changeBind(event) {
|
input.addEventListener('change', function changeBind(event) {
|
||||||
/* Handle remote datalist/autocomplete input element */
|
/* Handle remote datalist/autocomplete input element */
|
||||||
let listId, list;
|
let listId, list;
|
||||||
if((listId = this.getAttribute('list')) !== 'undefined' && (list = document.getElementById(listId)).getAttribute('data-list-src') !== 'undefined') {
|
if(typeof (listId = this.getAttribute('list')) !== 'undefined' && (list = document.getElementById(listId)).getAttribute('data-list-src') !== 'undefined') {
|
||||||
self.addRemoteDatalistOptions(this, list);
|
self.addRemoteDatalistOptions(this, list);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Handle html defined functions */
|
/* Handle html defined functions */
|
||||||
let change;
|
let change;
|
||||||
if((change = this.getAttribute('data-change-func')) !== 'undefined') {
|
if(typeof (change = this.getAttribute('data-change-func')) !== 'undefined') {
|
||||||
change(this);
|
change(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Handle pre-defined dynamic change events */
|
/* Handle pre-defined dynamic change events */
|
||||||
let ref;
|
let ref;
|
||||||
if(ref = this.getAttribute('data-ref') !== 'undefined') {
|
if(typeof (ref = this.getAttribute('data-ref')) !== 'undefined') {
|
||||||
let e = document.getElementById(ref);
|
let e = document.getElementById(ref);
|
||||||
|
|
||||||
switch(e.tagName) {
|
switch(e.tagName) {
|
||||||
|
|
@ -55,7 +55,7 @@
|
||||||
});
|
});
|
||||||
|
|
||||||
let dataButton;
|
let dataButton;
|
||||||
if((dataButton = input.getAttribute('data-button')) !== 'undefined') {
|
if(typeof (dataButton = input.getAttribute('data-button')) !== 'undefined') {
|
||||||
this.app.inputManager.getKeyboardManager().bind(input, 13, function() {
|
this.app.inputManager.getKeyboardManager().bind(input, 13, function() {
|
||||||
document.getElementById(dataButton).click();
|
document.getElementById(dataButton).click();
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@
|
||||||
current = jsOMS;
|
current = jsOMS;
|
||||||
|
|
||||||
for(let i = 0; i < length; i++) {
|
for(let i = 0; i < length; i++) {
|
||||||
if(current[paths[i]] === 'undefined') {
|
if(typeof current[paths[i]] === 'undefined') {
|
||||||
current[paths[i]] = {};
|
current[paths[i]] = {};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user