summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/consts.js14
-rw-r--r--src/textanalysis.js2
-rw-r--r--src/textanalysis.ui.js9
3 files changed, 22 insertions, 3 deletions
diff --git a/src/consts.js b/src/consts.js
index cfcdd1c2..4b21dc70 100644
--- a/src/consts.js
+++ b/src/consts.js
@@ -1,11 +1,25 @@
"use strict"
define(function() {
+
+ var nodetypes = ["person", "club", "skill", "interest", "third-internship-proposal", "internship"];
+
+ var description = {
+ person: 'Depict a person, real or fictional',
+ club: undefined,
+ skill: 'Depicts a specific ability of expertise a person can have',
+ interest: undefined,
+ 'third-internship-proposal': undefined,
+ internship: undefined,
+ };
+
// TODO: enums, sometime
return {
KEYSTROKE_WHERE_EDIT_NODE: 'keystroke_where_edit_node',
KEYSTROKE_WHERE_DOCUMENT: 'keystroke_where_document',
KEYSTROKE_WHERE_TEXTANALYSIS: 'keystroke_where_textanalysis',
INPUT_WHERE_TEXTANALYSIS: 'input_where_textanalysis',
+ nodetypes: nodetypes,
+ description: description,
};
});
diff --git a/src/textanalysis.js b/src/textanalysis.js
index 44765916..98ca8aea 100644
--- a/src/textanalysis.js
+++ b/src/textanalysis.js
@@ -4,7 +4,7 @@ define(['rz_core', 'model/core', 'model/util', 'model/diff', 'rz_bus', 'consts']
function(rz_core, model_core, model_util, model_diff, rz_bus, consts) {
var typeindex = 0;
-var nodetypes = ["person", "club", "skill", "interest", "third-internship-proposal", "internship"];
+var nodetypes = consts.nodetypes;
var typeStack = [];
var lastnode;
diff --git a/src/textanalysis.ui.js b/src/textanalysis.ui.js
index 5756fce0..b7863271 100644
--- a/src/textanalysis.ui.js
+++ b/src/textanalysis.ui.js
@@ -7,7 +7,8 @@ var text = "", // Last text of sentence
element_name = '#textanalyser',
element = $(element_name),
suggestionChange,
- plus_button = $('.add-button');
+ plus_button = $('.add-button'),
+ description = consts.description;
var typeselection = function TypeSelectionDialog() {
var e = $('.typeselection'),
@@ -27,7 +28,11 @@ var typeselection = function TypeSelectionDialog() {
e.css('left', 0);
}
typeselection.showChosenType = function(nodetype) {
- e.html('<table><tr><td style="height:28px"></td></tr><tr><td>' + "Chosen Type: " + nodetype + '</td></tr></table>');
+ var desc = description[nodetype];
+ e.html('<table><tr><td style="height:28px"></td></tr><tr><td>' +
+ "Chosen Type: " + nodetype + '</td></tr>' +
+ (desc ? '<tr><td>' + desc + '</td></tr>' : '') +
+ '</table>');
}
return typeselection;
}();