From 076d6a72adb6461b6b6457f4a1937a2d8fd8ed1d Mon Sep 17 00:00:00 2001 From: Dominik Csapak Date: Tue, 4 Apr 2017 13:48:43 +0200 Subject: [PATCH] improving oclass formatter this adds from/to to the oclass text object adds a new oclass_icon object and a new format_oclass function, which combines the icon with the text this will be used in the new ruleinfo sidebar Signed-off-by: Dominik Csapak --- js/Utils.js | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/js/Utils.js b/js/Utils.js index 8054249..d9d6b8e 100644 --- a/js/Utils.js +++ b/js/Utils.js @@ -15,7 +15,24 @@ Ext.define('PMG.Utils', { who: gettext('Who Objects'), what: gettext('What Objects'), when: gettext('When Objects'), - action: gettext('Action Objects') + action: gettext('Action Objects'), + from: gettext('From'), + to: gettext('To') + }, + + oclass_icon: { + who: ' ', + what: ' ', + when: ' ', + action: ' ', + from: ' ', + to: ' ', + }, + + format_oclass: function(oclass) { + var icon = PMG.Utils.oclass_icon[oclass] || ''; + var text = PMG.Utils.oclass_text[oclass] || oclass; + return icon + text; }, rule_direction_text: {