From 9b40364e5e85f3a1a348c358bead8a256e9a2acd Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Thu, 27 Jul 2017 17:19:07 +0200 Subject: [PATCH] Fixing docblocks and minor test adjustments --- 3D/Loader/ObjLoader.js | 3 +- Account/AccountManager.js | 3 +- Account/AccountType.enum.js | 3 +- Animation/Animation.js | 3 +- Animation/Canvas/Particle.js | 3 +- Animation/Canvas/ParticleAnimation.js | 3 +- Asset/AssetManager.js | 23 ++-- Auth/Auth.js | 3 +- Autoloader.js | 8 +- Config/Options.js | 10 +- Controllers/Form.js | 0 DataStorage/CookieJar.js | 3 +- DataStorage/LocalStorage.js | 3 +- Event/EventManager.js | 1 - Log/LogLevel.enum.js | 3 +- Log/Logger.js | 3 +- Math/Stochastic/Average.js | 3 +- Math/Stochastic/Forecast/LinearRegression.js | 3 +- .../Browser/BrowserNotification.js | 3 +- Message/Request/BrowserType.enum.js | 3 +- Message/Request/OSType.enum.js | 3 +- Message/Request/Request.js | 3 +- Message/Request/RequestData.enum.js | 3 +- Message/Request/RequestMethod.enum.js | 3 +- Message/Request/RequestType.enum.js | 3 +- Message/Response/Response.js | 3 +- Message/Response/ResponseManager.js | 3 +- Message/Response/ResponseResultType.enum.js | 3 +- Message/Response/ResponseType.enum.js | 3 +- Module/ModuleFactory.js | 3 +- Module/ModuleManager.js | 3 +- Spreadsheet/Cell.js | 3 +- Spreadsheet/Spreadsheet.js | 3 +- UI/ActionManager.js | 31 ++++- UI/Component/Autocomplete.js | 3 +- UI/Component/Form.js | 3 +- UI/Component/Input.js | 3 +- UI/Component/Tab.js | 3 +- UI/Component/Table.js | 3 +- UI/Component/TagInput.js | 3 +- UI/Component/TagList.js | 3 +- UI/DragNDrop.js | 3 +- UI/GeneralUI.js | 3 +- UI/Input/InputManager.js | 3 +- UI/Input/Keyboard/KeyboardManager.js | 3 +- UI/Input/Mouse/ClickType.enum.js | 3 +- UI/Input/Mouse/EventType.enum.js | 3 +- UI/Input/Mouse/MouseManager.js | 3 +- UI/Input/Touch/TouchManager.js | 3 +- UI/UIManager.js | 3 +- UnhandledException.js | 7 +- Uri/Http.js | 117 +++++++++++++++++- Uri/UriFactory.js | 23 +++- Utils/oLib.js | 7 +- Views/FormView.js | 8 +- 55 files changed, 245 insertions(+), 122 deletions(-) delete mode 100644 Controllers/Form.js diff --git a/3D/Loader/ObjLoader.js b/3D/Loader/ObjLoader.js index 6c991be..07270e1 100644 --- a/3D/Loader/ObjLoader.js +++ b/3D/Loader/ObjLoader.js @@ -1,8 +1,7 @@ /** * Form manager class. * - * @author OMS Development Team - * @copyright 2013 Dennis Eichhorn + * @copyright Dennis Eichhorn * @license OMS License 1.0 * @version 1.0.0 * @since 1.0.0 diff --git a/Account/AccountManager.js b/Account/AccountManager.js index 233bf4f..9c025ef 100644 --- a/Account/AccountManager.js +++ b/Account/AccountManager.js @@ -1,8 +1,7 @@ /** * Account Manager. * - * @author OMS Development Team - * @copyright 2013 Dennis Eichhorn + * @copyright Dennis Eichhorn * @license OMS License 1.0 * @version 1.0.0 * @since 1.0.0 diff --git a/Account/AccountType.enum.js b/Account/AccountType.enum.js index a444e62..5a86570 100644 --- a/Account/AccountType.enum.js +++ b/Account/AccountType.enum.js @@ -1,8 +1,7 @@ /** * Account type. * - * @author OMS Development Team - * @copyright 2013 Dennis Eichhorn + * @copyright Dennis Eichhorn * @license OMS License 1.0 * @version 1.0.0 * @since 1.0.0 diff --git a/Animation/Animation.js b/Animation/Animation.js index 7ba68ed..29dd434 100644 --- a/Animation/Animation.js +++ b/Animation/Animation.js @@ -1,8 +1,7 @@ /** * Particle class. * - * @author OMS Development Team - * @copyright 2013 Dennis Eichhorn + * @copyright Dennis Eichhorn * @license OMS License 1.0 * @version 1.0.0 * @since 1.0.0 diff --git a/Animation/Canvas/Particle.js b/Animation/Canvas/Particle.js index fb5e9d7..4be35de 100644 --- a/Animation/Canvas/Particle.js +++ b/Animation/Canvas/Particle.js @@ -1,8 +1,7 @@ /** * Particle class. * - * @author OMS Development Team - * @copyright 2013 Dennis Eichhorn + * @copyright Dennis Eichhorn * @license OMS License 1.0 * @version 1.0.0 * @since 1.0.0 diff --git a/Animation/Canvas/ParticleAnimation.js b/Animation/Canvas/ParticleAnimation.js index ca65e59..661d10a 100644 --- a/Animation/Canvas/ParticleAnimation.js +++ b/Animation/Canvas/ParticleAnimation.js @@ -1,8 +1,7 @@ /** * Particle animation class. * - * @author OMS Development Team - * @copyright 2013 Dennis Eichhorn + * @copyright Dennis Eichhorn * @license OMS License 1.0 * @version 1.0.0 * @since 1.0.0 diff --git a/Asset/AssetManager.js b/Asset/AssetManager.js index c234c37..cdda7df 100644 --- a/Asset/AssetManager.js +++ b/Asset/AssetManager.js @@ -1,8 +1,7 @@ /** * Asset manager. * - * @author OMS Development Team - * @copyright 2013 Dennis Eichhorn + * @copyright Dennis Eichhorn * @license OMS License 1.0 * @version 1.0.0 * @since 1.0.0 @@ -38,6 +37,8 @@ const scripts = document.getElementsByTagName('script'), length = !scripts ? 0 : scripts.length; + this.assets = {}; + for (let i = 0; i < length; i++) { this.assets[jsOMS.hash(scripts[i].src)] = scripts[i].src; } @@ -121,7 +122,7 @@ /** * Get asset. * - * @param {string} id Id of the asset (hash) + * @param {string} key Key of the asset * * @return * @@ -129,19 +130,21 @@ * * @since 1.0.0 */ - jsOMS.Asset.AssetManager.prototype.get = function (id) + jsOMS.Asset.AssetManager.prototype.get = function (key) { - if (this.assets[id]) { - return this.assets[id]; + key = jsOMS.hash(key); + + if (this.assets[key]) { + return this.assets[key]; } - return undefined; + return null; }; /** * Remove asset. * - * @param {string} key Key of the asset (hash) + * @param {string} key Key of the asset * * @return {boolean} * @@ -149,8 +152,10 @@ * * @since 1.0.0 */ - jsOMS.Asset.AssetManager.prototype.remove = function (key) + jsOMS.Asset.AssetManager.prototype.remove = function (key, isHashed) { + key = jsOMS.hash(key); + if (typeof this.assets[key] !== 'undefined') { delete this.assets[key]; diff --git a/Auth/Auth.js b/Auth/Auth.js index 0e65200..dedd4ed 100644 --- a/Auth/Auth.js +++ b/Auth/Auth.js @@ -1,8 +1,7 @@ /** * Auth class. * - * @author OMS Development Team - * @copyright 2013 Dennis Eichhorn + * @copyright Dennis Eichhorn * @license OMS License 1.0 * @version 1.0.0 * @since 1.0.0 diff --git a/Autoloader.js b/Autoloader.js index 17f4b1d..4a0deee 100644 --- a/Autoloader.js +++ b/Autoloader.js @@ -1,8 +1,12 @@ /** * Autoloader. * - * @author OMS Development Team - * @copyright 2013 Dennis Eichhorn + * The autoloader is responsible for defining namespaces and dynamically loading javascript + * files that are not yet included. The intention is to provide a similar functionality as + * include, import etc. Contrary to it's name the autoloader is not able to truely autoload + * referenced classes. + * + * @copyright Dennis Eichhorn * @license OMS License 1.0 * @version 1.0.0 * @since 1.0.0 diff --git a/Config/Options.js b/Config/Options.js index ed919c8..bdecfd0 100644 --- a/Config/Options.js +++ b/Config/Options.js @@ -1,8 +1,10 @@ /** * Options class. * - * @author OMS Development Team - * @copyright 2013 Dennis Eichhorn + * This is a generic options class for storing options. This is usefull for handling options in other modules + * without redefining the same behaviour multiple times. + * + * @copyright Dennis Eichhorn * @license OMS License 1.0 * @version 1.0.0 * @since 1.0.0 @@ -39,7 +41,7 @@ */ jsOMS.Config.Options.prototype.set = function (key, value, overwrite) { - overwrite = typeof overwrite === bool ? overwrite : true; + overwrite = typeof overwrite === 'bool' ? overwrite : false; if (overwrite || typeof this.options[key] === 'undefined') { this.options[key] = value; @@ -67,7 +69,7 @@ return this.options[key]; } - return undefined; + return null; }; /** diff --git a/Controllers/Form.js b/Controllers/Form.js deleted file mode 100644 index e69de29..0000000 diff --git a/DataStorage/CookieJar.js b/DataStorage/CookieJar.js index 4b7ebe4..58b6e27 100644 --- a/DataStorage/CookieJar.js +++ b/DataStorage/CookieJar.js @@ -1,8 +1,7 @@ /** * CookieJar class. * - * @author OMS Development Team - * @copyright 2013 Dennis Eichhorn + * @copyright Dennis Eichhorn * @license OMS License 1.0 * @version 1.0.0 * @since 1.0.0 diff --git a/DataStorage/LocalStorage.js b/DataStorage/LocalStorage.js index 06fcc99..0ff5373 100644 --- a/DataStorage/LocalStorage.js +++ b/DataStorage/LocalStorage.js @@ -1,8 +1,7 @@ /** * LocalStorage class. * - * @author OMS Development Team - * @copyright 2013 Dennis Eichhorn + * @copyright Dennis Eichhorn * @license OMS License 1.0 * @version 1.0.0 * @since 1.0.0 diff --git a/Event/EventManager.js b/Event/EventManager.js index 3c099b7..23b3df6 100644 --- a/Event/EventManager.js +++ b/Event/EventManager.js @@ -3,7 +3,6 @@ * * Used for pooling requests. * - * @author OMS Development Team * @copyright Dennis Eichhorn * @license OMS License 1.0 * @version 1.0.0 diff --git a/Log/LogLevel.enum.js b/Log/LogLevel.enum.js index 8541f4c..ca9b32d 100644 --- a/Log/LogLevel.enum.js +++ b/Log/LogLevel.enum.js @@ -1,8 +1,7 @@ /** * Log Level enum. * - * @author OMS Development Team - * @copyright 2013 Dennis Eichhorn + * @copyright Dennis Eichhorn * @license OMS License 1.0 * @version 1.0.0 * @since 1.0.0 diff --git a/Log/Logger.js b/Log/Logger.js index 624b21b..1a8a90c 100644 --- a/Log/Logger.js +++ b/Log/Logger.js @@ -1,8 +1,7 @@ /** * Logger class. * - * @author OMS Development Team - * @copyright 2013 Dennis Eichhorn + * @copyright Dennis Eichhorn * @license OMS License 1.0 * @version 1.0.0 * @since 1.0.0 diff --git a/Math/Stochastic/Average.js b/Math/Stochastic/Average.js index 14ea851..1a22a6d 100644 --- a/Math/Stochastic/Average.js +++ b/Math/Stochastic/Average.js @@ -1,8 +1,7 @@ /** * Average class. * - * @author OMS Development Team - * @copyright 2013 Dennis Eichhorn + * @copyright Dennis Eichhorn * @license OMS License 1.0 * @version 1.0.0 * @since 1.0.0 diff --git a/Math/Stochastic/Forecast/LinearRegression.js b/Math/Stochastic/Forecast/LinearRegression.js index b6eadf3..fd58495 100644 --- a/Math/Stochastic/Forecast/LinearRegression.js +++ b/Math/Stochastic/Forecast/LinearRegression.js @@ -1,8 +1,7 @@ /** * Linear regression class. * - * @author OMS Development Team - * @copyright 2013 Dennis Eichhorn + * @copyright Dennis Eichhorn * @license OMS License 1.0 * @version 1.0.0 * @since 1.0.0 diff --git a/Message/Notification/Browser/BrowserNotification.js b/Message/Notification/Browser/BrowserNotification.js index ed7da16..b5a83b8 100644 --- a/Message/Notification/Browser/BrowserNotification.js +++ b/Message/Notification/Browser/BrowserNotification.js @@ -1,8 +1,7 @@ /** * Browser notification. * - * @author OMS Development Team - * @copyright 2013 Dennis Eichhorn + * @copyright Dennis Eichhorn * @license OMS License 1.0 * @version 1.0.0 * @since 1.0.0 diff --git a/Message/Request/BrowserType.enum.js b/Message/Request/BrowserType.enum.js index 9698873..7db8c19 100644 --- a/Message/Request/BrowserType.enum.js +++ b/Message/Request/BrowserType.enum.js @@ -1,8 +1,7 @@ /** * Request data enum. * - * @author OMS Development Team - * @copyright 2013 Dennis Eichhorn + * @copyright Dennis Eichhorn * @license OMS License 1.0 * @version 1.0.0 * @since 1.0.0 diff --git a/Message/Request/OSType.enum.js b/Message/Request/OSType.enum.js index 56607aa..c9bee05 100644 --- a/Message/Request/OSType.enum.js +++ b/Message/Request/OSType.enum.js @@ -1,8 +1,7 @@ /** * Request data enum. * - * @author OMS Development Team - * @copyright 2013 Dennis Eichhorn + * @copyright Dennis Eichhorn * @license OMS License 1.0 * @version 1.0.0 * @since 1.0.0 diff --git a/Message/Request/Request.js b/Message/Request/Request.js index 71746c2..083307d 100644 --- a/Message/Request/Request.js +++ b/Message/Request/Request.js @@ -1,8 +1,7 @@ /** * Request class. * - * @author OMS Development Team - * @copyright 2013 Dennis Eichhorn + * @copyright Dennis Eichhorn * @license OMS License 1.0 * @version 1.0.0 * @since 1.0.0 diff --git a/Message/Request/RequestData.enum.js b/Message/Request/RequestData.enum.js index c1ffdd9..2bcef56 100644 --- a/Message/Request/RequestData.enum.js +++ b/Message/Request/RequestData.enum.js @@ -1,8 +1,7 @@ /** * Request data enum. * - * @author OMS Development Team - * @copyright 2013 Dennis Eichhorn + * @copyright Dennis Eichhorn * @license OMS License 1.0 * @version 1.0.0 * @since 1.0.0 diff --git a/Message/Request/RequestMethod.enum.js b/Message/Request/RequestMethod.enum.js index ffdb07d..ccaab8f 100644 --- a/Message/Request/RequestMethod.enum.js +++ b/Message/Request/RequestMethod.enum.js @@ -1,8 +1,7 @@ /** * Http request method. * - * @author OMS Development Team - * @copyright 2013 Dennis Eichhorn + * @copyright Dennis Eichhorn * @license OMS License 1.0 * @version 1.0.0 * @since 1.0.0 diff --git a/Message/Request/RequestType.enum.js b/Message/Request/RequestType.enum.js index 8fc5899..6d41b55 100644 --- a/Message/Request/RequestType.enum.js +++ b/Message/Request/RequestType.enum.js @@ -1,8 +1,7 @@ /** * Request type enum. * - * @author OMS Development Team - * @copyright 2013 Dennis Eichhorn + * @copyright Dennis Eichhorn * @license OMS License 1.0 * @version 1.0.0 * @since 1.0.0 diff --git a/Message/Response/Response.js b/Message/Response/Response.js index 8b473eb..c67f617 100644 --- a/Message/Response/Response.js +++ b/Message/Response/Response.js @@ -3,8 +3,7 @@ * * Used for auto handling different responses. * - * @author OMS Development Team - * @copyright 2013 Dennis Eichhorn + * @copyright Dennis Eichhorn * @license OMS License 1.0 * @version 1.0.0 * @since 1.0.0 diff --git a/Message/Response/ResponseManager.js b/Message/Response/ResponseManager.js index 2bd68a7..f8b1464 100644 --- a/Message/Response/ResponseManager.js +++ b/Message/Response/ResponseManager.js @@ -3,8 +3,7 @@ * * Used for auto handling different responses. * - * @author OMS Development Team - * @copyright 2013 Dennis Eichhorn + * @copyright Dennis Eichhorn * @license OMS License 1.0 * @version 1.0.0 * @since 1.0.0 diff --git a/Message/Response/ResponseResultType.enum.js b/Message/Response/ResponseResultType.enum.js index ed89900..acb36db 100644 --- a/Message/Response/ResponseResultType.enum.js +++ b/Message/Response/ResponseResultType.enum.js @@ -1,8 +1,7 @@ /** * Response result type enum. * - * @author OMS Development Team - * @copyright 2013 Dennis Eichhorn + * @copyright Dennis Eichhorn * @license OMS License 1.0 * @version 1.0.0 * @since 1.0.0 diff --git a/Message/Response/ResponseType.enum.js b/Message/Response/ResponseType.enum.js index 88714b5..187d54d 100644 --- a/Message/Response/ResponseType.enum.js +++ b/Message/Response/ResponseType.enum.js @@ -1,8 +1,7 @@ /** * Response type enum. * - * @author OMS Development Team - * @copyright 2013 Dennis Eichhorn + * @copyright Dennis Eichhorn * @license OMS License 1.0 * @version 1.0.0 * @since 1.0.0 diff --git a/Module/ModuleFactory.js b/Module/ModuleFactory.js index c3b52e2..55a2541 100644 --- a/Module/ModuleFactory.js +++ b/Module/ModuleFactory.js @@ -1,8 +1,7 @@ /** * Module factory. * - * @author OMS Development Team - * @copyright 2013 Dennis Eichhorn + * @copyright Dennis Eichhorn * @license OMS License 1.0 * @version 1.0.0 * @since 1.0.0 diff --git a/Module/ModuleManager.js b/Module/ModuleManager.js index 4914fdd..a41cc55 100644 --- a/Module/ModuleManager.js +++ b/Module/ModuleManager.js @@ -1,8 +1,7 @@ /** * Module factory. * - * @author OMS Development Team - * @copyright 2013 Dennis Eichhorn + * @copyright Dennis Eichhorn * @license OMS License 1.0 * @version 1.0.0 * @since 1.0.0 diff --git a/Spreadsheet/Cell.js b/Spreadsheet/Cell.js index 4b3d4da..ef3be92 100644 --- a/Spreadsheet/Cell.js +++ b/Spreadsheet/Cell.js @@ -1,8 +1,7 @@ /** * Cell. * - * @author OMS Development Team - * @copyright 2013 Dennis Eichhorn + * @copyright Dennis Eichhorn * @license OMS License 1.0 * @version 1.0.0 * @since 1.0.0 diff --git a/Spreadsheet/Spreadsheet.js b/Spreadsheet/Spreadsheet.js index 9f25f19..09e932a 100644 --- a/Spreadsheet/Spreadsheet.js +++ b/Spreadsheet/Spreadsheet.js @@ -1,8 +1,7 @@ /** * Spreadsheet view. * - * @author OMS Development Team - * @copyright 2013 Dennis Eichhorn + * @copyright Dennis Eichhorn * @license OMS License 1.0 * @version 1.0.0 * @since 1.0.0 diff --git a/UI/ActionManager.js b/UI/ActionManager.js index b139b71..c8a5dba 100644 --- a/UI/ActionManager.js +++ b/UI/ActionManager.js @@ -1,8 +1,7 @@ /** * Form manager class. * - * @author OMS Development Team - * @copyright 2013 Dennis Eichhorn + * @copyright Dennis Eichhorn * @license OMS License 1.0 * @version 1.0.0 * @since 1.0.0 @@ -30,9 +29,11 @@ }; /** - * Bind button. + * Bind element. * - * @param {string} [id] Button id (optional) + * @param {string} [id] Element id (optional) + * + * @return {void} * * @method * @@ -51,9 +52,11 @@ }; /** - * Bind button. + * Bind element. * - * @param {Element} e Button element + * @param {Element} e Element to bind + * + * @return {void} * * @method * @@ -95,6 +98,18 @@ } }; + /** + * Bind listener for object + * + * @param {Element} e Element to bind + * @param {object} listener Listener object + * + * @return {void} + * + * @method + * + * @since 1.0.0 + */ jsOMS.UI.ActionManager.prototype.bindListener = function(e, listener) { const self = this, @@ -122,6 +137,8 @@ * @param {Element} e Button * @param {Object} action Action * + * @return {void} + * * @method * * @since 1.0.0 @@ -151,6 +168,8 @@ * @param {string} name Action identifier * @param {function} callback Action callback * + * @return {void} + * * @method * * @since 1.0.0 diff --git a/UI/Component/Autocomplete.js b/UI/Component/Autocomplete.js index 525c3a7..2e01ff8 100644 --- a/UI/Component/Autocomplete.js +++ b/UI/Component/Autocomplete.js @@ -1,8 +1,7 @@ /** * Form manager class. * - * @author OMS Development Team - * @copyright 2013 Dennis Eichhorn + * @copyright Dennis Eichhorn * @license OMS License 1.0 * @version 1.0.0 * @since 1.0.0 diff --git a/UI/Component/Form.js b/UI/Component/Form.js index 70cb610..e8c82c1 100644 --- a/UI/Component/Form.js +++ b/UI/Component/Form.js @@ -1,8 +1,7 @@ /** * Form manager class. * - * @author OMS Development Team - * @copyright 2013 Dennis Eichhorn + * @copyright Dennis Eichhorn * @license OMS License 1.0 * @version 1.0.0 * @since 1.0.0 diff --git a/UI/Component/Input.js b/UI/Component/Input.js index a07d8f1..50c8d63 100644 --- a/UI/Component/Input.js +++ b/UI/Component/Input.js @@ -1,8 +1,7 @@ /** * Form manager class. * - * @author OMS Development Team - * @copyright 2013 Dennis Eichhorn + * @copyright Dennis Eichhorn * @license OMS License 1.0 * @version 1.0.0 * @since 1.0.0 diff --git a/UI/Component/Tab.js b/UI/Component/Tab.js index 367dccb..5df85d0 100644 --- a/UI/Component/Tab.js +++ b/UI/Component/Tab.js @@ -1,8 +1,7 @@ /** * Tab manager class. * - * @author OMS Development Team - * @copyright 2013 Dennis Eichhorn + * @copyright Dennis Eichhorn * @license OMS License 1.0 * @version 1.0.0 * @since 1.0.0 diff --git a/UI/Component/Table.js b/UI/Component/Table.js index 351871d..f1269b8 100644 --- a/UI/Component/Table.js +++ b/UI/Component/Table.js @@ -1,8 +1,7 @@ /** * Table manager class. * - * @author OMS Development Team - * @copyright 2013 Dennis Eichhorn + * @copyright Dennis Eichhorn * @license OMS License 1.0 * @version 1.0.0 * @since 1.0.0 diff --git a/UI/Component/TagInput.js b/UI/Component/TagInput.js index 525c3a7..2e01ff8 100644 --- a/UI/Component/TagInput.js +++ b/UI/Component/TagInput.js @@ -1,8 +1,7 @@ /** * Form manager class. * - * @author OMS Development Team - * @copyright 2013 Dennis Eichhorn + * @copyright Dennis Eichhorn * @license OMS License 1.0 * @version 1.0.0 * @since 1.0.0 diff --git a/UI/Component/TagList.js b/UI/Component/TagList.js index 525c3a7..2e01ff8 100644 --- a/UI/Component/TagList.js +++ b/UI/Component/TagList.js @@ -1,8 +1,7 @@ /** * Form manager class. * - * @author OMS Development Team - * @copyright 2013 Dennis Eichhorn + * @copyright Dennis Eichhorn * @license OMS License 1.0 * @version 1.0.0 * @since 1.0.0 diff --git a/UI/DragNDrop.js b/UI/DragNDrop.js index cb82618..8d0e0a4 100644 --- a/UI/DragNDrop.js +++ b/UI/DragNDrop.js @@ -1,8 +1,7 @@ /** * Drag and drop class. * - * @author OMS Development Team - * @copyright 2013 Dennis Eichhorn + * @copyright Dennis Eichhorn * @license OMS License 1.0 * @version 1.0.0 * @since 1.0.0 diff --git a/UI/GeneralUI.js b/UI/GeneralUI.js index 213e10b..44381c4 100644 --- a/UI/GeneralUI.js +++ b/UI/GeneralUI.js @@ -1,8 +1,7 @@ /** * UI manager for handling basic ui elements. * - * @author OMS Development Team - * @copyright 2013 Dennis Eichhorn + * @copyright Dennis Eichhorn * @license OMS License 1.0 * @version 1.0.0 * @since 1.0.0 diff --git a/UI/Input/InputManager.js b/UI/Input/InputManager.js index 98880d6..6126e24 100644 --- a/UI/Input/InputManager.js +++ b/UI/Input/InputManager.js @@ -1,8 +1,7 @@ /** * UI manager class. * - * @author OMS Development Team - * @copyright 2013 Dennis Eichhorn + * @copyright Dennis Eichhorn * @license OMS License 1.0 * @version 1.0.0 * @since 1.0.0 diff --git a/UI/Input/Keyboard/KeyboardManager.js b/UI/Input/Keyboard/KeyboardManager.js index 5719c0e..ecfe022 100644 --- a/UI/Input/Keyboard/KeyboardManager.js +++ b/UI/Input/Keyboard/KeyboardManager.js @@ -1,8 +1,7 @@ /** * Keyboard manager class. * - * @author OMS Development Team - * @copyright 2013 Dennis Eichhorn + * @copyright Dennis Eichhorn * @license OMS License 1.0 * @version 1.0.0 * @since 1.0.0 diff --git a/UI/Input/Mouse/ClickType.enum.js b/UI/Input/Mouse/ClickType.enum.js index e2bd60e..679d086 100644 --- a/UI/Input/Mouse/ClickType.enum.js +++ b/UI/Input/Mouse/ClickType.enum.js @@ -1,8 +1,7 @@ /** * Click type. * - * @author OMS Development Team - * @copyright 2013 Dennis Eichhorn + * @copyright Dennis Eichhorn * @license OMS License 1.0 * @version 1.0.0 * @since 1.0.0 diff --git a/UI/Input/Mouse/EventType.enum.js b/UI/Input/Mouse/EventType.enum.js index c65e73c..837cbc2 100644 --- a/UI/Input/Mouse/EventType.enum.js +++ b/UI/Input/Mouse/EventType.enum.js @@ -1,8 +1,7 @@ /** * Event type. * - * @author OMS Development Team - * @copyright 2013 Dennis Eichhorn + * @copyright Dennis Eichhorn * @license OMS License 1.0 * @version 1.0.0 * @since 1.0.0 diff --git a/UI/Input/Mouse/MouseManager.js b/UI/Input/Mouse/MouseManager.js index 9b26aed..db9dc4b 100644 --- a/UI/Input/Mouse/MouseManager.js +++ b/UI/Input/Mouse/MouseManager.js @@ -1,8 +1,7 @@ /** * Mouse manager class. * - * @author OMS Development Team - * @copyright 2013 Dennis Eichhorn + * @copyright Dennis Eichhorn * @license OMS License 1.0 * @version 1.0.0 * @since 1.0.0 diff --git a/UI/Input/Touch/TouchManager.js b/UI/Input/Touch/TouchManager.js index 2b3b874..e7f7f39 100644 --- a/UI/Input/Touch/TouchManager.js +++ b/UI/Input/Touch/TouchManager.js @@ -1,8 +1,7 @@ /** * Touch manager class. * - * @author OMS Development Team - * @copyright 2013 Dennis Eichhorn + * @copyright Dennis Eichhorn * @license OMS License 1.0 * @version 1.0.0 * @since 1.0.0 diff --git a/UI/UIManager.js b/UI/UIManager.js index f773299..da8a508 100644 --- a/UI/UIManager.js +++ b/UI/UIManager.js @@ -1,8 +1,7 @@ /** * UI manager for handling basic ui elements. * - * @author OMS Development Team - * @copyright 2013 Dennis Eichhorn + * @copyright Dennis Eichhorn * @license OMS License 1.0 * @version 1.0.0 * @since 1.0.0 diff --git a/UnhandledException.js b/UnhandledException.js index f2ef9e8..4cc567c 100644 --- a/UnhandledException.js +++ b/UnhandledException.js @@ -1,8 +1,9 @@ /** - * Form manager class. + * Unhandled Exception class. * - * @author OMS Development Team - * @copyright 2013 Dennis Eichhorn + * This class handles all unhandled exceptions depending on the configuration. + * + * @copyright Dennis Eichhorn * @license OMS License 1.0 * @version 1.0.0 * @since 1.0.0 diff --git a/Uri/Http.js b/Uri/Http.js index 764f894..e0a04de 100644 --- a/Uri/Http.js +++ b/Uri/Http.js @@ -1,8 +1,9 @@ /** - * Uri factory. + * Http Uri. * - * @author OMS Development Team - * @copyright 2013 Dennis Eichhorn + * This class is for creating, modifying and analysing http uris. + * + * @copyright Dennis Eichhorn * @license OMS License 1.0 * @version 1.0.0 * @since 1.0.0 @@ -180,62 +181,172 @@ this.base = this.scheme + '://' + this.host + this.root; }; + /** + * Set root path. + * + * @param {string} rootPath Uri root path + * + * @return {void} + * + * @method + * + * @since 1.0.0 + */ jsOMS.Uri.Http.prototype.setRootPath = function(rootPath) { this.root = rootPath; this.set(this.uri); }; + /** + * Get Uri base + * + * @return {string} + * + * @method + * + * @since 1.0.0 + */ jsOMS.Uri.Http.prototype.getBase = function() { return this.base; }; + /** + * Get Uri scheme + * + * @return {string} + * + * @method + * + * @since 1.0.0 + */ jsOMS.Uri.Http.prototype.getScheme = function() { return this.scheme; }; + /** + * Get Uri host + * + * @return {string} + * + * @method + * + * @since 1.0.0 + */ jsOMS.Uri.Http.prototype.getHost = function() { return this.host; }; + /** + * Get Uri port + * + * @return {string} + * + * @method + * + * @since 1.0.0 + */ jsOMS.Uri.Http.prototype.getPort = function() { return this.port; }; + /** + * Get Uri user + * + * @return {string} + * + * @method + * + * @since 1.0.0 + */ jsOMS.Uri.Http.prototype.getUser = function() { return this.user; }; + /** + * Get Uri pass + * + * @return {string} + * + * @method + * + * @since 1.0.0 + */ jsOMS.Uri.Http.prototype.getPass = function() { return this.pass; }; + /** + * Get Uri query + * + * @return {string} + * + * @method + * + * @since 1.0.0 + */ jsOMS.Uri.Http.prototype.getQuery = function() { return this.queryString; }; + /** + * Get Uri + * + * @return {string} + * + * @method + * + * @since 1.0.0 + */ jsOMS.Uri.Http.prototype.getUri = function() { return this.uri; }; + /** + * Get Uri fragment + * + * @return {string} + * + * @method + * + * @since 1.0.0 + */ jsOMS.Uri.Http.prototype.getFragment = function() { return this.fragment; }; + /** + * Get Uri path + * + * @return {string} + * + * @method + * + * @since 1.0.0 + */ jsOMS.Uri.Http.prototype.getPath = function() { return this.path; }; + /** + * Get Uri path offset + * + * @return {string} + * + * @method + * + * @since 1.0.0 + */ jsOMS.Uri.Http.prototype.getPathOffset = function() { return jsOMS.substr_count(this.root, '/') - 1; diff --git a/Uri/UriFactory.js b/Uri/UriFactory.js index 6ada891..5076093 100644 --- a/Uri/UriFactory.js +++ b/Uri/UriFactory.js @@ -1,8 +1,7 @@ /** * Uri factory. * - * @author OMS Development Team - * @copyright 2013 Dennis Eichhorn + * @copyright Dennis Eichhorn * @license OMS License 1.0 * @version 1.0.0 * @since 1.0.0 @@ -48,6 +47,26 @@ return false; }; + /** + * Get query + * + * @param {string} key + * + * @return {string}|null + * + * @method + * + * @since 1.0.0 + */ + jsOMS.Uri.UriFactory.getQuery = function (key) + { + if (!jsOMS.Uri.UriFactory.uri.hasOwnProperty(key)) { + return null; + } + + return jsOMS.Uri.UriFactory.uri[key]; + }; + /** * Clear all uri components * diff --git a/Utils/oLib.js b/Utils/oLib.js index 57d93a8..dc7974e 100644 --- a/Utils/oLib.js +++ b/Utils/oLib.js @@ -1,8 +1,11 @@ /** - * Core JS functionality + * Standard library * - * This logic is supposed to minimize coding and support core javascript functionality. + * This library provides useful functionalities for the DOM and other manipulations. * + * @copyright Dennis Eichhorn + * @license OMS License 1.0 + * @version 1.0.0 * @since 1.0.0 */ (function (jsOMS) diff --git a/Views/FormView.js b/Views/FormView.js index 9653150..c2bf57a 100644 --- a/Views/FormView.js +++ b/Views/FormView.js @@ -1,8 +1,11 @@ /** * Form view. * - * @author OMS Development Team - * @copyright 2013 Dennis Eichhorn + * The form view contains a single form and it's data elements. Form actions are no longer handled by + * the browser but through this view. The view also provides additional functionality for non-default + * form elements such as canvas etc. + * + * @copyright Dennis Eichhorn * @license OMS License 1.0 * @version 1.0.0 * @since 1.0.0 @@ -139,6 +142,7 @@ const selects = form.getElementsByTagName('select'), textareas = form.getElementsByTagName('textarea'), inputs = form.getElementsByTagName('input'), + canvas = form.getElementsByTagName('canvas'), external = document.querySelectorAll('[form=' + this.id + ']'); return Array.prototype.slice.call(inputs).concat(Array.prototype.slice.call(selects), Array.prototype.slice.call(textareas), Array.prototype.slice.call(external));