From e4652f764bf284d95a5233f5578fc67d2e17eaa0 Mon Sep 17 00:00:00 2001 From: Alon Levy Date: Sun, 10 May 2015 12:44:26 +0300 Subject: 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. --- src/client/view/activity.js | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 src/client/view/activity.js (limited to 'src/client/view') 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 = $('
'); + graph_view.append(activity_element); +} + +function appendActivity(topo_diff_spec) +{ + var new_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 -- cgit v1.3.1