From 78c500334bf4aef45aafa62cf040921a8d124165 Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Tue, 31 Dec 2019 19:54:45 +0100 Subject: [PATCH] add todos from github --- Controller.js | 6 ------ Controller/ApiController.php | 8 ++++++++ Models/Editor.js | 13 ++++++++++++- 3 files changed, 20 insertions(+), 7 deletions(-) diff --git a/Controller.js b/Controller.js index 0a7ea12..e2abf97 100644 --- a/Controller.js +++ b/Controller.js @@ -23,12 +23,6 @@ jsOMS.Modules.Editor = class { bindElement (id) { - if (typeof id === 'undefined' || !id) { - // todo: do logging - - return; - } - this.editors[id] = new Editor(id); this.editors[id].bind(); }; diff --git a/Controller/ApiController.php b/Controller/ApiController.php index 79a3c66..2a18157 100644 --- a/Controller/ApiController.php +++ b/Controller/ApiController.php @@ -30,6 +30,14 @@ use phpOMS\Utils\Parser\Markdown\Markdown; * @license OMS License 1.0 * @link https://orange-management.org * @since 1.0.0 + * + * @todo Orange-Management/Moduels#14 + * The editor should support (maybe as extension) versioning. + * This doesn't have to be git or svn but at least multiple version should be able to get stored into the database. + * The versioning should be very straight forward and only contain a version number, date and optionally a version name. + * The basic save button should be just "save new version" or something similar. + * Based on this it should also be possible to compare different versions against each other. + * It should be possible to see who wrote which word, when and what it got changed to (e.g. git or microsoft track change mode). */ final class ApiController extends Controller { diff --git a/Models/Editor.js b/Models/Editor.js index b918790..df69e09 100644 --- a/Models/Editor.js +++ b/Models/Editor.js @@ -1,5 +1,17 @@ import { Markdown } from '../../../jsOMS/Utils/Parser/Markdown.js'; +/** + * Editor + * + * @copyright Dennis Eichhorn + * @license OMS License 1.0 + * @version 1.0.0 + * @since 1.0.0 + * + * @todo Orange-Management/Modules#45 + * Implement tools + * The tools should be able to insert the markdown text into a textarea. + */ export class Editor { constructor (id) { @@ -20,7 +32,6 @@ export class Editor { for (let i = 0; i < length; ++i) { editorButtons[i].addEventListener('click', function(event) { - // todo: identify button by class and then call function for this class. self.toolsButton(this, event); jsOMS.triggerEvent(self.editorContent, 'input'); });