diff --git a/Auth/Auth.js b/Auth/Auth.js index 5daf197..43d1462 100644 --- a/Auth/Auth.js +++ b/Auth/Auth.js @@ -1,3 +1,7 @@ +import { Request } from '../../Message/Request/Request.js'; +import { RequestMethod } from '../../Message/Request/RequestMethod.js'; +import { RequestType } from '../../Message/Request/RequestType.js'; + /** * Auth class. * @@ -53,11 +57,11 @@ export class Auth { */ login () { - const authRequest = new jsOMS.Message.Request.Request(); + const authRequest = new Request(); authRequest.setUri(this.uri); - authRequest.setMethod(jsOMS.Message.Request.RequestMethod.POST); - authRequest.setResponseType(jsOMS.Message.Request.RequestType.JSON); + authRequest.setMethod(RequestMethod.POST); + authRequest.setResponseType(RequestType.JSON); authRequest.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); authRequest.setSuccess(function (xhr) { diff --git a/UI/Component/AdvancedInput.js b/UI/Component/AdvancedInput.js index 0e0f06f..26ab7c1 100644 --- a/UI/Component/AdvancedInput.js +++ b/UI/Component/AdvancedInput.js @@ -14,7 +14,7 @@ export class AdvancedInput { /** * @constructor * - * @param {object} e Element to bind + * @param {Object} e Element to bind * * @since 1.0.0 */ @@ -114,8 +114,10 @@ export class AdvancedInput { * * This method adds remote results to the dropdown list for selecting * - * @param {object} self This reference - * @param {object} data Response data + * @param {Object} self This reference + * @param {Object} data Response data + * + * @return {void} * * @since 1.0.0 */ @@ -179,7 +181,9 @@ export class AdvancedInput { /** * Callback for input field content change * - * @param {object} self This reference + * @param {Object} self This reference + * + * @return {void} * * @since 1.0.0 */ @@ -196,7 +200,9 @@ export class AdvancedInput { /** * Select element in dropdown (only mark it as selected) * - * @param {object} e Element to select in dropdown + * @param {Object} e Element to select in dropdown + * + * @return {void} * * @since 1.0.0 */ @@ -211,7 +217,9 @@ export class AdvancedInput { /** * Clear all selected/marked options in dropdown * - * @param {object} self This reference + * @param {Object} self This reference + * + * @return {void} * * @since 1.0.0 */ @@ -232,7 +240,9 @@ export class AdvancedInput { * * This can add the selected dropdown elements to a table, badge list etc. depending on the template structure. * - * @param {object} self This reference + * @param {Object} self This reference + * + * @return {void} * * @since 1.0.0 */ @@ -300,10 +310,12 @@ export class AdvancedInput { * * After waiting for a delay a callback can be triggered. * - * @param {object} action Action type + * @param {Object} action Action type * @param {function} callback Callback to be triggered - * @param {object} self This reference (passed to callback) - * @param {object} data Data (passed to callback) + * @param {Object} self This reference (passed to callback) + * @param {Object} data Data (passed to callback) + * + * @return {void} * * @since 1.0.0 */ diff --git a/UI/Component/AdvancedSelect.js b/UI/Component/AdvancedSelect.js index 7ac782e..7988ef7 100644 --- a/UI/Component/AdvancedSelect.js +++ b/UI/Component/AdvancedSelect.js @@ -22,7 +22,7 @@ export class AdvancedSelect { /** * @constructor * - * @param {object} e Element to bind + * @param {Object} e Element to bind * * @since 1.0.0 */ @@ -121,8 +121,10 @@ export class AdvancedSelect { * * This method adds remote results to the dropdown list for selecting * - * @param {object} self This reference - * @param {object} data Response data + * @param {Object} self This reference + * @param {Object} data Response data + * + * @return {void} * * @since 1.0.0 */ @@ -185,7 +187,9 @@ export class AdvancedSelect { /** * Callback for input field content change * - * @param {object} self This reference + * @param {Object} self This reference + * + * @return {void} * * @since 1.0.0 */ @@ -201,7 +205,9 @@ export class AdvancedSelect { /** * Select element in dropdown (only mark it as selected) * - * @param {object} e Element to select in dropdown + * @param {Object} e Element to select in dropdown + * + * @return {void} * * @since 1.0.0 */ @@ -215,7 +221,9 @@ export class AdvancedSelect { /** * Clear all selected/marked options in dropdown * - * @param {object} self This reference + * @param {Object} self This reference + * + * @return {void} * * @since 1.0.0 */ @@ -235,7 +243,9 @@ export class AdvancedSelect { * * This can add the selected dropdown elements to a table, badge list etc. depending on the template structure. * - * @param {object} self This reference + * @param {Object} self This reference + * + * @return {void} * * @since 1.0.0 */ @@ -303,10 +313,12 @@ export class AdvancedSelect { * * After waiting for a delay a callback can be triggered. * - * @param {object} action Action type + * @param {Object} action Action type * @param {function} callback Callback to be triggered - * @param {object} self This reference (passed to callback) - * @param {object} data Data (passed to callback) + * @param {Object} self This reference (passed to callback) + * @param {Object} data Data (passed to callback) + * + * @return {void} * * @since 1.0.0 */ diff --git a/UI/Component/Form.js b/UI/Component/Form.js index 5993247..386c7ec 100644 --- a/UI/Component/Form.js +++ b/UI/Component/Form.js @@ -236,13 +236,13 @@ export class Form { * Calls injections first before executing the actual form submit * * @param {Object} form Form object - * @param {string} action Action different from the form action (e.g. formaction=*) + * @param {string} [action] Action different from the form action (e.g. formaction=*) * * @return {void} * * @since 1.0.0 */ - submit (form, action) + submit (form, action = null) { action = typeof action !== 'undefined' ? action : null; @@ -284,12 +284,13 @@ export class Form { * Submits the main form data * * @param {Object} form Form object - * @param {string} action Action different from the form action (e.g. formaction=*) + * @param {string} [action] Action different from the form action (e.g. formaction=*) + * * @return {void} * * @since 1.0.0 */ - submitForm (form, action) + submitForm (form, action = null) { action = typeof action !== 'undefined' ? action : null; diff --git a/UI/Input/InputManager.js b/UI/Input/InputManager.js index 9e4ade9..b6b0c10 100644 --- a/UI/Input/InputManager.js +++ b/UI/Input/InputManager.js @@ -14,6 +14,8 @@ export class InputManager { /** * @constructor * + * @param {Object} app Application + * * @since 1.0.0 */ constructor(app) diff --git a/Uri/Http.js b/Uri/Http.js index e00148c..94264e1 100644 --- a/Uri/Http.js +++ b/Uri/Http.js @@ -12,6 +12,8 @@ export class Http { /** * @constructor * + * @param {string} uri Http uri + * * @since 1.0.0 */ constructor(uri) diff --git a/Views/TableView.js b/Views/TableView.js index 65c2fa0..836fadf 100644 --- a/Views/TableView.js +++ b/Views/TableView.js @@ -10,6 +10,8 @@ export class TableView { /** * @constructor * + * @param {string} id Table id + * * @since 1.0.0 */ constructor (id) { @@ -33,7 +35,7 @@ export class TableView { /** * Serialize table data * - * @return {object} + * @return {Object} * * @since 1.0.0 */