summaryrefslogtreecommitdiff
path: root/src/client/model/types.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/model/types.js')
-rw-r--r--src/client/model/types.js12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/client/model/types.js b/src/client/model/types.js
index fac37cbe..990c3b02 100644
--- a/src/client/model/types.js
+++ b/src/client/model/types.js
@@ -2,14 +2,19 @@ define(['underscore', 'util'],
function(_, util)
{
-var type_attributes = {
- 'third-internship-proposal': ['status', 'startdate', 'enddate', 'description', 'url'],
+var nodetypes,
+ type_attributes = {
+ 'internship': ['status', 'startdate', 'enddate', 'description', 'url'],
'skill': ['description', 'url'],
'interest': ['description', 'url'],
- '_defaults': ['description', 'url'],
+ 'person': ['description', 'url'],
},
all_attributes;
+nodetypes = _.keys(type_attributes);
+
+type_attributes['_defaults'] = ['description', 'url'];
+
_.values(type_attributes).map(function (attributes) {
attributes.push('name');
attributes.push('type');
@@ -20,6 +25,7 @@ all_attributes = _.union(_.flatten(_.map(type_attributes, _.values))).sort();
return (
{
+ nodetypes: nodetypes,
type_attributes: function (type) {
util.assert(type[0] !== '_', 'invalid type name');
return type_attributes[type_attributes.hasOwnProperty(type) ? type : '_defaults'];