maglub/piLogger

add drag & drop functionality

Opened this issue · 2 comments

add drag & drop functionality so one could move a chart from one place to another.

Commit fb70bab deals with this in https://github.com/maglub/piLogger/blob/master/include/templates/index.html and https://github.com/maglub/piLogger/blob/master/include/templates/macros.html

  • I had to simplify the div structure in the macro.html, so that the graph box now has one div-level less.
  • Dragging a graph, dropping it on another graph, will put the source graph before the destination graph.

Even if this is now pushed into master, there is a bit of cleanup to do:

"class: column" should be renamed to something more descriptive, and corresponding names in the javascript code should be updated
"class: arne-dase" must for sure be renamed to something better

To further make this persistent in the database, we will need to:

  1. Give the div id's unique names, so that we can reference exactly which graph was put where in which order
  2. Add a rest call to reflect this, and update the database