summaryrefslogtreecommitdiff
path: root/cao-desktop.js
diff options
context:
space:
mode:
authorOlivier Gayot <duskcoder@gmail.com>2015-06-05 00:37:50 +0100
committerOlivier Gayot <duskcoder@gmail.com>2015-06-05 00:37:50 +0100
commit8f97a5358c089bd563cf2f262a0834c7302529cd (patch)
treec2d3df7db3b8b54d71c20b06618d2c24c9e3704b /cao-desktop.js
parent100db155e1d4dffeb9d30cdeab24fa9919a8aa4e (diff)
handle the notifications on the client
Signed-off-by: Olivier Gayot <duskcoder@gmail.com>
Diffstat (limited to 'cao-desktop.js')
-rw-r--r--cao-desktop.js12
1 files changed, 9 insertions, 3 deletions
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 = '<li id="' + identifier + '">' + desc + '</li>';
@@ -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();
});