From c93e36c859393d73660c0a6d63c85ab65a5c7c10 Mon Sep 17 00:00:00 2001 From: roguisharcanetrickster Date: Tue, 17 Feb 2026 15:33:43 +0700 Subject: [PATCH 1/2] remove label --- ABViewManagerCore.js | 1 - views/ABViewLabelCore.js | 114 --------------------------------------- 2 files changed, 115 deletions(-) delete mode 100644 views/ABViewLabelCore.js diff --git a/ABViewManagerCore.js b/ABViewManagerCore.js index 7c5bab0d..b9d59229 100644 --- a/ABViewManagerCore.js +++ b/ABViewManagerCore.js @@ -25,7 +25,6 @@ var AllViews = [ require("../platform/views/ABViewDocxBuilder"), require("../platform/views/ABViewGrid"), require("../platform/views/ABViewImage"), - require("../platform/views/ABViewLabel"), require("../platform/views/ABViewLayout"), // require("../platform/views/ABViewList"), require("../platform/views/ABViewMenu"), diff --git a/views/ABViewLabelCore.js b/views/ABViewLabelCore.js deleted file mode 100644 index e718bce4..00000000 --- a/views/ABViewLabelCore.js +++ /dev/null @@ -1,114 +0,0 @@ -const ABViewWidget = require("../../platform/views/ABViewWidget"); - -const ABViewLabelPropertyComponentDefaults = { - text: "", - format: 0, // 0 - normal, 1 - title, 2 - description - alignment: "left", -}; - -const ABViewDefaults = { - key: "label", // {string} unique key for this view - icon: "font", // {string} fa-[icon] reference for this view - labelKey: "Label", // {string} the multilingual label key for the class label -}; - -module.exports = class ABViewLabelCore extends ABViewWidget { - /** - * @param {obj} values key=>value hash of ABView values - * @param {ABApplication} application the application object this view is under - * @param {ABViewWidget} parent the ABViewWidget this view is a child of. (can be null) - */ - constructor(values, application, parent, defaultValues) { - super(values, application, parent, defaultValues || ABViewDefaults); - } - - static common() { - return ABViewDefaults; - } - - static defaultValues() { - return ABViewLabelPropertyComponentDefaults; - } - - /// - /// Instance Methods - /// - - /** - * @method toObj() - * - * properly compile the current state of this ABViewLabel instance - * into the values needed for saving. - * - * @return {json} - */ - toObj() { - this.unTranslate(this, this, ["label", "text"]); - - var obj = super.toObj(); - obj.viewIDs = []; - return obj; - } - - /** - * @method fromValues() - * - * initialze this object with the given set of values. - * @param {obj} values - */ - fromValues(values) { - super.fromValues(values); // <-- this performs the translations - - // if this is being instantiated on a read from the Property UI, - // .text is coming in under .settings.label - this.text = values.text || values.settings.text || "*text"; - - this.settings.format = - this.settings.format || ABViewLabelPropertyComponentDefaults.format; - this.settings.alignment = - this.settings.alignment || - ABViewLabelPropertyComponentDefaults.alignment; - - // we are not allowed to have sub views: - this._views = []; - - // convert from "0" => 0 - this.settings.format = parseInt(this.settings.format); - - this.translate(this, this, ["label", "text"]); - } - - /** - * @method componentList - * return the list of components available on this view to display in the editor. - */ - componentList() { - return []; - } - - //// Allow external interface to manipulate our settings: - - /** - * @method formatNormal - * display text in the normal format. - */ - formatNormal() { - this.settings.format = 0; - } - - /** - * @method formatTitle - * display text as a Title. - */ - formatTitle() { - this.settings.format = 1; - } - - /** - * @method formatDescription - * display text as a description. - */ - formatDescription() { - this.settings.format = 2; - } -}; From 24cab35009a9f79ab20fe6e9f8cddfac1664f68e Mon Sep 17 00:00:00 2001 From: roguisharcanetrickster Date: Thu, 19 Feb 2026 15:48:20 +0700 Subject: [PATCH 2/2] remove label again --- ABViewManagerCore.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ABViewManagerCore.js b/ABViewManagerCore.js index 9d0fdd08..9daededa 100644 --- a/ABViewManagerCore.js +++ b/ABViewManagerCore.js @@ -25,7 +25,7 @@ var AllViews = [ require("../platform/views/ABViewDocxBuilder"), require("../platform/views/ABViewGrid"), // require("../platform/views/ABViewImage"), - require("../platform/views/ABViewLabel"), + // require("../platform/views/ABViewLabel"), require("../platform/views/ABViewLayout"), // require("../platform/views/ABViewList"), require("../platform/views/ABViewMenu"),