ifad/hermes — pull request #1 by stecb (2014-12-09 23:11:46+00:00)
Title: Hermesjscore

1st PR, as I showed today to Marcello and Amedeo (Dec, 9th):

**TL;DR** Refactored 90% of the existing codebase, completed tutorials part on the backend, restyled both backend and embed, new modular JS architecture for the embed part. Some code needs more comments. They will be done on the next releases (along w/ a document that summarizes how the app works on both sides)

**backend**
* WIP new style, but everything should be working correctly, please report if there's something that isn't working at all.
* Tip/tutorial delete is working but it doesn't remove DOM elements, yet (wil do obv on the final style release). Just refresh the page after a deletion
* WIP new general broadcast (as above, will do in a separate branch after the rest is done)

**embed**
* authoring is working properly
* preview is working properly
* general messaging is working properly
* tutorials are working and you can test them (no state is stored yet), but there's some more stuff to do i.e.
* validate tutorial/general messages in case selector doesn't match element (remove elements, also check whether a tutorial tip that is on another path doesn't have selector... remove it and go to the next elem perhaps?)
* on tutorial end, handle state ala messages
* if during a tutorial user changes pages, warn w/ onbeforeunload
* show tutorial message if no selector? (welcome message to be stored on the DB)
* start/skip tutorial on welcome message + on each tip
* 24 hours later reminder for autostart tutorial
* show available tutorials that are not bound to a specific selector on a custom element (Tutorials?)