diff options
author | Olivier Gayot <duskcoder@gmail.com> | 2015-06-14 23:21:04 +0100 |
---|---|---|
committer | Olivier Gayot <duskcoder@gmail.com> | 2015-06-14 23:24:30 +0100 |
commit | 71cd5aa94b2706a75f47d5d4c3ab2a5296cc6023 (patch) | |
tree | 224ccc2488326a0e630b066df6d59260919c0d16 /cao-desktop.js | |
parent | 7af8f5b25f140deff430bf42a6a7950952b26fc1 (diff) |
moved the webapp pages in the webapp/ dir
the procedure to install the webapp is described in the README file.
Signed-off-by: Olivier Gayot <duskcoder@gmail.com>
Diffstat (limited to 'cao-desktop.js')
-rw-r--r-- | cao-desktop.js | 88 |
1 files changed, 0 insertions, 88 deletions
diff --git a/cao-desktop.js b/cao-desktop.js deleted file mode 100644 index faa864b..0000000 --- a/cao-desktop.js +++ /dev/null @@ -1,88 +0,0 @@ -$(document).ready(function() { - $('#btn_join').click(function() { - var game_name = prompt('Name of the game'); - - cao.join_game(game_name); - }); - - $('#btn_pick_black').click(function() { - cao.pick_black_card(); - }); - - $('#btn_collect').click(function() { - cao.collect_cards(); - }); - - cao.on_socket_open = function() { - $('#btn_join').show(); - }; - - cao.on_join_game_ok = function(state) { - $('#btn_join').hide(); - $('#btn_pick_black').show(); - $('#white_cards').show(); - }; - - cao.on_show_white_card = function(idx, desc) { - identifier = 'white_card_' + idx; - content = '<li id="' + identifier + '">' + desc + '</li>'; - - $('#white_cards').append(content); - - $('#' + identifier).dblclick(this.gen_callback_white_card(idx)); - }; - - cao.on_show_played_card = function(idx, desc) { - identifier = 'played_card_' + idx; - - content = '<li id="' + identifier + '">' + desc + '</li>'; - - $('#played_cards').append(content); - - $('#' + identifier).dblclick(this.gen_callback_played_card(idx)); - }; - - - cao.on_pick_black_card_ok = function() { - $('#btn_collect').show(); - $('#btn_pick_black').hide(); - }; - - cao.on_show_black_card = function(desc) { - $('#black_card').show(); - $('#black_card').html(desc); - }; - - - cao.on_play_white_card_ok = function(idx) { - identifier = 'white_card_' + idx; - $('#' + identifier).remove(); - }; - - cao.on_designate_card_ok = function() { - $('#played_cards').empty(); - $('#played_cards').hide(); - $('#black_card').hide(); - $('#btn_collect').hide(); - $('#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.on_updated_score = function(score) { - console.log('new score: ' + score); - }; - - cao.run(); -}); |