improve docblocks

This commit is contained in:
Dennis Eichhorn 2019-12-30 00:43:52 +01:00
parent 8da3803651
commit df9217250c
7 changed files with 63 additions and 28 deletions

View File

@ -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)
{

View File

@ -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
*/

View File

@ -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
*/

View File

@ -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;

View File

@ -14,6 +14,8 @@ export class InputManager {
/**
* @constructor
*
* @param {Object} app Application
*
* @since 1.0.0
*/
constructor(app)

View File

@ -12,6 +12,8 @@ export class Http {
/**
* @constructor
*
* @param {string} uri Http uri
*
* @since 1.0.0
*/
constructor(uri)

View File

@ -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
*/