From: Jordan Augé Date: Tue, 8 Jul 2014 12:48:37 +0000 (+0200) Subject: recount after update X-Git-Tag: myslice-1.1~33 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=8c9e4069cfe615ef11a62860c121c1cd00a812b8;p=unfold.git recount after update --- diff --git a/manifoldapi/static/js/manifold.js b/manifoldapi/static/js/manifold.js index 3aba9c15..dbf8e44a 100644 --- a/manifoldapi/static/js/manifold.js +++ b/manifoldapi/static/js/manifold.js @@ -1296,6 +1296,9 @@ var manifold = { // Update record state for children queries manifold.query_store.set_record_state(cur_query_uuid, key, STATE_SET, new_state); + // XXX This could be optimized + manifold.query_store.recount(cur_query_uuid); + data = { state: STATE_SET, key : field, op : new_state, value: key } manifold.raise_record_event(query_uuid, FIELD_STATE_CHANGED, data); }); @@ -1305,16 +1308,13 @@ var manifold = { // Update record state for children queries manifold.query_store.set_record_state(cur_query_uuid, key, STATE_SET, new_state); + // XXX This could be optimized + manifold.query_store.recount(cur_query_uuid); + data = { state: STATE_SET, key : field, op : new_state, value: key } manifold.raise_record_event(query_uuid, FIELD_STATE_CHANGED, data); }); - - - // Send events related to children queries - // XXX - - break; } }