thesentinelproject / threatwiki_node

Threatwiki - genocide risk tracking and visualization platform to help monitor communities at risk of genocide around the world
Other
63 stars 25 forks source link

A comment field (distinct from description field) #74

Closed sarahf closed 11 years ago

sarahf commented 11 years ago

A comment text field which is non-public and exclusively for commenting by analysts.

sarahf commented 11 years ago

Couldn't figure out how to save what is entered into that field. Help?

jeromegv commented 11 years ago

This is something that needs to be done in the backend, I can take care of it, that is more complex, thanks for doing the frontend =)

On Sun, Feb 10, 2013 at 7:00 PM, sarahf notifications@github.com wrote:

Couldn't figure out how to save what is entered into that field. Help?

— Reply to this email directly or view it on GitHubhttps://github.com/thesentinelproject/threatwiki_node/issues/74#issuecomment-13364434..

Jérôme Gagnon-Voyer | Technology Analyst jerome@thesentinelproject.org | Skype: jeromegagnonvoyer

sarahf commented 11 years ago

Gotcha, np!

jeromegv commented 11 years ago

Take a look at my commit if you want to see how it's done :)

In summary

the file model.js is what creates the "structure" of the database. So for a datapoint type, I added the comment type of field to the database, and the string is not required.

And then I updated the javascript for the page so that if we create a new datapoint or update an existing datapoint, the comment field will be send to the REST API when doing an update or create API call (which will save to the database after)