diff options
| author | Alon Levy <alon@pobox.com> | 2015-05-10 12:44:26 +0300 |
|---|---|---|
| committer | Alon Levy <alon@pobox.com> | 2015-05-12 12:30:04 +0300 |
| commit | e4652f764bf284d95a5233f5578fc67d2e17eaa0 (patch) | |
| tree | 7da3bead6c05f21da4d60d43a6fef66d92fa8242 /src/client/view | |
| parent | 69412c1e55f13e06cd772c1d98db50548a846d1f (diff) | |
client: add initial activity stream
activity widget that will show:
- history for document loaded, gotten via clone REST api
- activity as it happens, identical to diffs received but with the
context - which user, when if a topo diff what sentence created it.
Diffstat (limited to 'src/client/view')
| -rw-r--r-- | src/client/view/activity.js | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/src/client/view/activity.js b/src/client/view/activity.js new file mode 100644 index 00000000..44d3632a --- /dev/null +++ b/src/client/view/activity.js @@ -0,0 +1,31 @@ +define(['jquery', 'Bacon'], +function($, Bacon) { + +var incomingActivityBus = new Bacon.Bus(), + activity_element; + +function init(graph_view) +{ + activity_element = $('<div class="activity-root-div"></div>'); + graph_view.append(activity_element); +} + +function appendActivity(topo_diff_spec) +{ + var new_div = $('<div></div>'); + + new_div.text('' + topo_diff_spec); + activity_element.append(new_div); + // TODO - x button + // TODO - format of text per activity (topo/attr) + // TODO - user data (requires protocol update?) +} + +incomingActivityBus.onValue(appendActivity); + +return { + init: init, + incomingActivityBus: incomingActivityBus, +}; + +}); // close define |
