From c7f2946faa71d25b0d3f633fb7279c03531e9a50 Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Tue, 19 Apr 2022 23:37:09 +0200 Subject: [PATCH] update php version --- .github/workflows/main.yml | 2 -- Message/Notification/App/AppNotification.js | 2 +- Message/Request/Request.js | 3 ++- UI/RemoteData.js | 11 ++++++----- UI/UIStateManager.js | 4 ++-- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 1a3edf2..014b3e0 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -49,8 +49,6 @@ jobs: runs-on: ubuntu-latest if: "!contains(github.event.head_commit.message, 'NO_CI')" steps: - - name: Js strict - run: if [[ $(grep -r -L "\"use strict\";" --include=*.js ./) -ne "" ]]; then exit 1; fi - 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 diff --git a/Message/Notification/App/AppNotification.js b/Message/Notification/App/AppNotification.js index 588b515..6bf11aa 100755 --- a/Message/Notification/App/AppNotification.js +++ b/Message/Notification/App/AppNotification.js @@ -82,4 +82,4 @@ export class AppNotification } }, 3000); }; -}; \ No newline at end of file +}; diff --git a/Message/Request/Request.js b/Message/Request/Request.js index 94ac886..3b24ff7 100755 --- a/Message/Request/Request.js +++ b/Message/Request/Request.js @@ -96,13 +96,14 @@ export class Request { /** global: InstallTrigger */ /** global: navigator */ + /** global: window */ if ((!!window.opr && !!opr.addons) || !!window.opera || navigator.userAgent.indexOf(' OPR/') >= 0) { return BrowserType.OPERA; } else if (typeof InstallTrigger !== 'undefined') { return BrowserType.FIREFOX; } else if (Object.toString.call(window.HTMLElement).indexOf('Constructor') > 0) { return BrowserType.SAFARI; - } else if ( /* @cc_on!@ */false || !!document.documentMode) { + } else if (/* @cc_on!@ */false || !!document.documentMode) { return BrowserType.IE; } else if (!!window.StyleMedia) { return BrowserType.EDGE; diff --git a/UI/RemoteData.js b/UI/RemoteData.js index 89eae1c..f14d2ae 100644 --- a/UI/RemoteData.js +++ b/UI/RemoteData.js @@ -2,6 +2,7 @@ import { Request } from '../Message/Request/Request.js'; import { RequestMethod } from '../Message/Request/RequestMethod.js'; import { RequestType } from '../Message/Request/RequestType.js'; import { Response } from '../Message/Response/Response.js'; +import { GeneralUI } from './GeneralUI.js'; /** * Remote data class. @@ -39,12 +40,12 @@ export class RemoteData const elements = document.querySelectorAll('.oms-remotecontainer'); const length = !elements ? 0 : elements.length; - setInterval(function() { + setInterval(function () { for (let i = 0; i < length; ++i) { const uri = elements[i].getAttribute('data-remote-uri'); /** @var {HTMLElement} uiContainer Container which holds all elements (e.g. div, tbody) */ - const uiContainer = elements[i]; + const uiContainer = elements[i]; const request = new Request(); @@ -55,8 +56,8 @@ export class RemoteData request.setSuccess(function (xhr) { const data = JSON.parse(xhr.response); - let responseLength = data.length; - let currentElement = null; + const responseLength = data.length; + let currentElement = null; for (let i = 0; i < responseLength; ++i) { /** @var {HTMLElement} childElements Child elements in the container which contain the data elements */ @@ -116,7 +117,7 @@ export class RemoteData if (currentElement === null) { uiContainer.appendChild(newElements[j].firstElementChild); } else { - uiContainer.insertBefore(newElements[j].firstElementChild, currentElement) + uiContainer.insertBefore(newElements[j].firstElementChild, currentElement); } } diff --git a/UI/UIStateManager.js b/UI/UIStateManager.js index 042f958..b3f5310 100644 --- a/UI/UIStateManager.js +++ b/UI/UIStateManager.js @@ -61,7 +61,7 @@ export class UIStateManager } let state = JSON.parse(window.localStorage.getItem('ui-state-' + element.id)); - state = state !== null ? state : {}; + state = state !== null ? state : {}; switch (element.tagName.toLowerCase()) { case 'input': @@ -86,7 +86,7 @@ export class UIStateManager element.scrollTop = state.y; element.addEventListener('scroll', function () { - window.localStorage.setItem('ui-state-' + this.id, JSON.stringify({x: this.scrollLeft, y: this.scrollTop})); + window.localStorage.setItem('ui-state-' + this.id, JSON.stringify({ x: this.scrollLeft, y: this.scrollTop })); }); break;