From 505ccd5c65cb379ffde9b51d98ecb18bf557648f Mon Sep 17 00:00:00 2001 From: Macide Celik Date: Tue, 29 Oct 2019 16:00:13 +0300 Subject: [PATCH] Delete HTMLCategory.mjs --- src/web/HTMLCategory.mjs | 59 ---------------------------------------- 1 file changed, 59 deletions(-) delete mode 100755 src/web/HTMLCategory.mjs diff --git a/src/web/HTMLCategory.mjs b/src/web/HTMLCategory.mjs deleted file mode 100755 index 95b8a4df..00000000 --- a/src/web/HTMLCategory.mjs +++ /dev/null @@ -1,59 +0,0 @@ -/** - * @author n1474335 [n1474335@gmail.com] - * @copyright Crown Copyright 2016 - * @license Apache-2.0 - */ - -/** - * Object to handle the creation of operation categories. - */ -class HTMLCategory { - - /** - * HTMLCategory constructor. - * - * @param {string} name - The name of the category. - * @param {boolean} selected - Whether this category is pre-selected or not. - */ - constructor(name, selected) { - this.name = name; - this.selected = selected; - this.opList = []; - } - - - /** - * Adds an operation to this category. - * - * @param {HTMLOperation} operation - The operation to add. - */ - addOperation(operation) { - this.opList.push(operation); - } - - - /** - * Renders the category and all operations within it in HTML. - * - * @returns {string} - */ - toHtml() { - const catName = "cat" + this.name.replace(/[\s/-:_]/g, ""); - let html = `
- - ${this.name} - -
-
    `; - - for (let i = 0; i < this.opList.length; i++) { - html += this.opList[i].toStubHtml(); - } - - html += "
"; - return html; - } - -} - -export default HTMLCategory;