From 8f97a5358c089bd563cf2f262a0834c7302529cd Mon Sep 17 00:00:00 2001 From: Olivier Gayot Date: Fri, 5 Jun 2015 00:37:50 +0100 Subject: handle the notifications on the client Signed-off-by: Olivier Gayot --- cao-desktop.js | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'cao-desktop.js') diff --git a/cao-desktop.js b/cao-desktop.js index ee7dd3b..2f1ee50 100644 --- a/cao-desktop.js +++ b/cao-desktop.js @@ -9,7 +9,6 @@ $(document).ready(function() { $('#white_cards').show(); }; - cao.on_show_white_card = function(idx, desc) { identifier = 'white_card_' + idx; content = '
  • ' + desc + '
  • '; @@ -46,7 +45,7 @@ $(document).ready(function() { $('#' + identifier).remove(); }; - cao.on_designate_card_ok = function(idx) { + cao.on_designate_card_ok = function() { $('#played_cards').empty(); $('#played_cards').hide(); $('#black_card').hide(); @@ -54,11 +53,18 @@ $(document).ready(function() { $('#btn_pick_black').show(); }; - cao.on_collect_cards_ok = function() { $('#btn_collect').hide(); $('#played_cards').show(); }; + cao.on_judge_designed = function() { + $('#btn_pick_black').hide(); + }; + + cao.on_judge_needed = function() { + $('#btn_pick_black').show(); + }; + cao.run(); }); -- cgit v1.2.3