mirror of
https://github.com/Karaka-Management/jsOMS.git
synced 2026-01-11 01:48:40 +00:00
Adjust todos and add loggign
This commit is contained in:
parent
577af40f56
commit
20c4176c52
|
|
@ -120,7 +120,6 @@
|
|||
}
|
||||
|
||||
if (!this.hasOutstanding(group)) {
|
||||
// todo if it is route then call dispatcher?
|
||||
this.callbacks[group].lastRun = Date.now();
|
||||
this.callbacks[group].func(data);
|
||||
|
||||
|
|
|
|||
|
|
@ -30,10 +30,9 @@
|
|||
|
||||
this.requestHeader['Content-Type'] = this.setContentTypeBasedOnType(this.type);
|
||||
|
||||
// todo: create log;
|
||||
this.result[0] = function()
|
||||
{
|
||||
//console.log('invalid response');
|
||||
jsOMS.Log.Logger.instance.error('Invalid response code.');
|
||||
};
|
||||
|
||||
/** global: XMLHttpRequest */
|
||||
|
|
@ -387,7 +386,7 @@
|
|||
}
|
||||
break;
|
||||
default:
|
||||
// todo: create handler for error returns
|
||||
jsOMS.Log.Logger.instance.warning('Unhandled ready state change.');
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -158,6 +158,11 @@
|
|||
external = document.querySelectorAll('[form=' + this.id + ']'),
|
||||
inputLength = inputs.length;
|
||||
|
||||
// todo: handle trigger element. check which element triggered the submit and pass it's name+value
|
||||
// the reason for this is, there may be multiple buttons in a form which trigger a send
|
||||
// sometimes even a checkbox or drop down could trigger a send
|
||||
// Maybe it makes sense to do this however at a different place e.g. the actual data submit
|
||||
|
||||
for (let i = 0; i < inputLength; ++i) {
|
||||
if (inputs[i].type === 'checkbox' && !inputs[i].checked) {
|
||||
delete inputs[i];
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user