This commit is contained in:
Dennis Eichhorn 2022-04-23 16:30:55 +02:00
parent b2212ac182
commit b890a5e8f9
9 changed files with 14 additions and 25 deletions

View File

@ -44,11 +44,4 @@ jobs:
env:
VALIDATE_ALL_CODEBASE: false
DEFAULT_BRANCH: develop
GITHUB_TOKEN: ${{ secrets.GH_PAT }}
custom:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, 'NO_CI')"
steps:
- name: Js inspection
run: |
if [[ $(grep -rlni "onafterprint=\|onbeforeprint=\|onbeforeunload=\|onerror=\|onhaschange=\|onload=\|onmessage=\|onoffline=\|ononline=\|onpagehide=\|onpageshow=\|onpopstate=\|onredo=\|onresize=\|onstorage=\|onund=o\|onunload=\|onblur=\|onchage=\|oncontextmenu=\|onfocus=\|onformchange=\|onforminput=\|oninput=\|oninvalid=\|onreset=\|onselect=\|onsubmit=\|onkeydown=\|onkeypress=\|onkeyup=\|onclick=\|ondblclic=k\|ondrag=\|ondragend=\|ondragenter=\|ondragleave=\|ondragover=\|ondragstart=\|ondrop=\|onmousedown=\|onmousemove=\|onmouseout=\|onmouseover=\|onmouseup=\|onmousewheel=\|onscroll=\|onabor=t\|oncanplay=\|oncanplaythrough=\|ondurationchange=\|onemptied=\|onended=\|onerror=\|onloadeddata=\|onloadedmetadata=\|onloadstart=\|onpause=\|onplay=\|onplaying=\|onprogress=\|onratechange=\|onreadystatechange=\|onseeked=\|onseeking=\|onstalled=\|onsuspend=\|ontimeupdate=\|onvolumechange=" --include=*.js ./) -ne "" ]]; then exit 1; fi
GITHUB_TOKEN: ${{ secrets.GH_PAT }}

View File

@ -31,7 +31,7 @@ In rare cases errors, failures or warnings during the automatic inspection are
Automated checks which are run during the review process:
```sh
php ./vendor/bin/phpcs ./ --standard="Build/Config/phpcs.xml"
php ./vendor/bin/phpcs --severity=1 ./ --standard="Build/Config/phpcs.xml"
npx eslint ./ -c ./Build/Config/.eslintrc.json
```

View File

@ -383,8 +383,8 @@ export class Request
}
}
console.log(UriFactory.build(this.uri));
console.log(this.xhr);
window.omsApp.logger.log(UriFactory.build(this.uri));
window.omsApp.logger.log(this.xhr);
this.xhr.onreadystatechange = function ()
{

View File

@ -11,7 +11,7 @@ export function preventEvent (action, callback, id)
{
'use strict';
console.log('prevented');
window.omsApp.logger.log('prevented');
jsOMS.preventAll(action.data);

View File

@ -16,7 +16,7 @@ export function requestAction (action, callback)
const request = new Request(action.uri, action.method, action.request_type);
request.setSuccess(function (xhr) {
console.log(xhr.responseText);
window.omsApp.logger.log(xhr.responseText);
callback(JSON.parse(xhr.responseText));
});

View File

@ -154,12 +154,10 @@ export class AdvancedInput
*/
remoteCallback (self, data)
{
console.log(data);
window.omsApp.logger.log(data);
data = JSON.parse(data.response)[0];
const dataLength = data.length;
console.table(data);
// if dropdown == true
if (self.dropdownElement.getAttribute('data-active') === 'true') {
while (self.dataListBody.firstChild) {

View File

@ -133,12 +133,10 @@ export class AdvancedSelect
* @since 1.0.0
*/
remoteCallback (self, data) {
console.log(data);
window.omsApp.logger.log(data);
data = JSON.parse(data.response)[0];
const dataLength = data.length;
console.table(data);
// if dropdown == true
if (self.dropdownElement.getAttribute('data-active') === 'true') {
while (self.dataListBody.firstChild) {

View File

@ -140,7 +140,7 @@ export class Form
* (e.g. table row (tr), div, ...)
*/
const elementContainer = remove.closest(document.getElementById(id).getAttribute('data-ui-element'));
console.log(document.getElementById(id).getAttribute('data-ui-element'));
window.omsApp.logger.log(document.getElementById(id).getAttribute('data-ui-element'));
elementContainer.parentNode.removeChild(elementContainer);
};
@ -293,7 +293,7 @@ export class Form
);
}
console.log(remoteUrls);
window.omsApp.logger.log(remoteUrls);
UriFactory.setQuery('$id', response.get('response').id);
@ -610,7 +610,7 @@ export class Form
);
}
console.log(remoteUrls);
window.omsApp.logger.log(remoteUrls);
UriFactory.setQuery('$id', response.get('response').id);
@ -790,7 +790,7 @@ export class Form
request.setMethod(form.getMethod());
request.setSuccess(function (xhr)
{
console.log(xhr.response);
window.omsApp.logger.log(xhr.response);
if (xhr.getResponseHeader('content-type') === 'application/octet-stream') {
const blob = new Blob([xhr.response], { type: 'application/octet-stream' });
@ -832,7 +832,7 @@ export class Form
);
}
} catch (e) {
console.log(e);
window.omsApp.logger.log(e);
Logger.instance.error('Invalid form response. \n'
+ 'URL: ' + form.getAction() + '\n'

View File

@ -160,7 +160,7 @@ export class Table
button.addEventListener('click', function (event)
{
console.log(exports.serialize());
window.omsApp.logger.log(exports.serialize());
/**
* @todo Karaka/jsOMS#90
* Implement export