diff options
| author | Olivier Gayot <olivier.gayot@sigexec.com> | 2018-03-09 13:38:22 +0100 | 
|---|---|---|
| committer | Olivier Gayot <olivier.gayot@sigexec.com> | 2018-03-09 13:38:22 +0100 | 
| commit | 493b116f73ec3912ca7af3d6ece3434279cbcfb5 (patch) | |
| tree | b6955491311fb0d810e9de9a7dd9b8059d04a10c /webapp | |
| parent | 735bc5af0929392f27386aa3fa0c26d39f300672 (diff) | |
renamed the project SwiftStory
Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>
Diffstat (limited to 'webapp')
| l--------- | webapp/index.html | 2 | ||||
| -rw-r--r-- | webapp/swiftstory-common.css (renamed from webapp/cao-common.css) | 0 | ||||
| -rw-r--r-- | webapp/swiftstory-common.js (renamed from webapp/cao-common.js) | 6 | ||||
| -rw-r--r-- | webapp/swiftstory-config.js (renamed from webapp/cao-config.js) | 2 | ||||
| -rw-r--r-- | webapp/swiftstory-desktop.html (renamed from webapp/cao-desktop.html) | 8 | ||||
| -rw-r--r-- | webapp/swiftstory-desktop.js (renamed from webapp/cao-desktop.js) | 32 | ||||
| -rw-r--r-- | webapp/swiftstory-mobile.css (renamed from webapp/cao-mobile.css) | 0 | ||||
| -rw-r--r-- | webapp/swiftstory-mobile.html (renamed from webapp/cao-mobile.html) | 16 | ||||
| -rw-r--r-- | webapp/swiftstory-mobile.js (renamed from webapp/cao-mobile.js) | 38 | 
9 files changed, 52 insertions, 52 deletions
| diff --git a/webapp/index.html b/webapp/index.html index 8ffec2d..36c43de 120000 --- a/webapp/index.html +++ b/webapp/index.html @@ -1 +1 @@ -cao-mobile.html
\ No newline at end of file +swiftstory-mobile.html
\ No newline at end of file diff --git a/webapp/cao-common.css b/webapp/swiftstory-common.css index c574b6d..c574b6d 100644 --- a/webapp/cao-common.css +++ b/webapp/swiftstory-common.css diff --git a/webapp/cao-common.js b/webapp/swiftstory-common.js index 0ec516d..174b473 100644 --- a/webapp/cao-common.js +++ b/webapp/swiftstory-common.js @@ -1,4 +1,4 @@ -var CAO = function() { +var SwiftStory = function() {      this.on_socket_open = function() { /* to override */ };      this.on_socket_close = function() { /* to override */ };      this.on_socket_error = function(evt) { /* to override */}; @@ -341,8 +341,8 @@ var CAO = function() {      };  }; -var cao; +var swst;  $(document).ready(function() { -    cao = new CAO(); +    swst = new SwiftStory();  }); diff --git a/webapp/cao-config.js b/webapp/swiftstory-config.js index ddfe0fc..9a6be3c 100644 --- a/webapp/cao-config.js +++ b/webapp/swiftstory-config.js @@ -9,5 +9,5 @@ $(document).ready(function() {          lang = 'en';      } -    cao.set_lang(lang); +    swst.set_lang(lang);  }); diff --git a/webapp/cao-desktop.html b/webapp/swiftstory-desktop.html index 34f4721..10706af 100644 --- a/webapp/cao-desktop.html +++ b/webapp/swiftstory-desktop.html @@ -2,11 +2,11 @@  <html lang="en">    <head>      <meta charset="utf-8"> -    <title>CAO</title> -    <link rel="stylesheet" href="cao-common.css"> +    <title>SwiftStory</title> +    <link rel="stylesheet" href="swiftstory-common.css">      <script src="jquery.js"></script> -    <script src="cao-common.js"></script> -    <script src="cao-desktop.js"></script> +    <script src="swiftstory-common.js"></script> +    <script src="swiftstory-desktop.js"></script>    </head>    <body>        <button type="button" id="btn_join">Join a Game !</button> diff --git a/webapp/cao-desktop.js b/webapp/swiftstory-desktop.js index faa864b..af86e83 100644 --- a/webapp/cao-desktop.js +++ b/webapp/swiftstory-desktop.js @@ -2,28 +2,28 @@ $(document).ready(function() {      $('#btn_join').click(function() {          var game_name = prompt('Name of the game'); -        cao.join_game(game_name); +        swst.join_game(game_name);      });      $('#btn_pick_black').click(function() { -        cao.pick_black_card(); +        swst.pick_black_card();      });      $('#btn_collect').click(function() { -        cao.collect_cards(); +        swst.collect_cards();      }); -    cao.on_socket_open = function() { +    swst.on_socket_open = function() {          $('#btn_join').show();      }; -    cao.on_join_game_ok = function(state) { +    swst.on_join_game_ok = function(state) {          $('#btn_join').hide();          $('#btn_pick_black').show();          $('#white_cards').show();      }; -    cao.on_show_white_card = function(idx, desc) { +    swst.on_show_white_card = function(idx, desc) {          identifier = 'white_card_' + idx;          content = '<li id="' + identifier + '">' + desc + '</li>'; @@ -32,7 +32,7 @@ $(document).ready(function() {          $('#' + identifier).dblclick(this.gen_callback_white_card(idx));      }; -    cao.on_show_played_card = function(idx, desc) { +    swst.on_show_played_card = function(idx, desc) {          identifier = 'played_card_' + idx;          content = '<li id="' + identifier + '">' + desc + '</li>'; @@ -43,23 +43,23 @@ $(document).ready(function() {      }; -    cao.on_pick_black_card_ok = function() { +    swst.on_pick_black_card_ok = function() {          $('#btn_collect').show();          $('#btn_pick_black').hide();      }; -    cao.on_show_black_card = function(desc) { +    swst.on_show_black_card = function(desc) {          $('#black_card').show();          $('#black_card').html(desc);      }; -    cao.on_play_white_card_ok = function(idx) { +    swst.on_play_white_card_ok = function(idx) {          identifier = 'white_card_' + idx;          $('#' + identifier).remove();      }; -    cao.on_designate_card_ok = function() { +    swst.on_designate_card_ok = function() {          $('#played_cards').empty();          $('#played_cards').hide();          $('#black_card').hide(); @@ -67,22 +67,22 @@ $(document).ready(function() {          $('#btn_pick_black').show();      }; -    cao.on_collect_cards_ok = function() { +    swst.on_collect_cards_ok = function() {          $('#btn_collect').hide();          $('#played_cards').show();      }; -    cao.on_judge_designed = function() { +    swst.on_judge_designed = function() {          $('#btn_pick_black').hide();      }; -    cao.on_judge_needed = function() { +    swst.on_judge_needed = function() {          $('#btn_pick_black').show();      }; -    cao.on_updated_score = function(score) { +    swst.on_updated_score = function(score) {          console.log('new score: ' + score);      }; -    cao.run(); +    swst.run();  }); diff --git a/webapp/cao-mobile.css b/webapp/swiftstory-mobile.css index 796f190..796f190 100644 --- a/webapp/cao-mobile.css +++ b/webapp/swiftstory-mobile.css diff --git a/webapp/cao-mobile.html b/webapp/swiftstory-mobile.html index 7aa619d..a0407d4 100644 --- a/webapp/cao-mobile.html +++ b/webapp/swiftstory-mobile.html @@ -3,13 +3,13 @@    <head>      <meta charset="utf-8">      <meta name="viewport" content="initial-scale = 1.0,maximum-scale = 1.0" /> -    <title>CAO</title> -    <link rel="stylesheet" href="cao-common.css"> -    <link rel="stylesheet" href="cao-mobile.css"> +    <title>SwiftStory</title> +    <link rel="stylesheet" href="swiftstory-common.css"> +    <link rel="stylesheet" href="swiftstory-mobile.css">      <script src="jquery.js"></script> -    <script src="cao-common.js"></script> -    <script src="cao-config.js"></script> -    <script src="cao-mobile.js"></script> +    <script src="swiftstory-common.js"></script> +    <script src="swiftstory-config.js"></script> +    <script src="swiftstory-mobile.js"></script>    </head>    <body>    <div data-role="page"> @@ -18,8 +18,8 @@            <span id="score">Your score is <span id="score-value">0</span></span>        </header>        <div id="home" class="page current"> -          <h1>Cards Against Humanity</h1> -          <h2>A party game for horrible people.</h2> +          <h1>SwiftStory</h1> +          <h2>We're not out of the woods yet.</h2>            <button id="join-btn" class="bottom" hidden>Join game!</button>        </div>        <div id="game" class="page"> diff --git a/webapp/cao-mobile.js b/webapp/swiftstory-mobile.js index acac68e..b05193c 100644 --- a/webapp/cao-mobile.js +++ b/webapp/swiftstory-mobile.js @@ -23,29 +23,29 @@ $(document).ready(function() {      });      $become_judge_btn.click(function() { -        cao.pick_black_card(); +        swst.pick_black_card();      });      $join_btn.click(function () { -        cao.join_game(prompt('Name of the game')); +        swst.join_game(prompt('Name of the game'));      });      $judge_collect_btn.click(function() { -        cao.collect_cards(); +        swst.collect_cards();      }); -    cao.on_socket_open = function() { +    swst.on_socket_open = function() {          $join_btn.show();      }; -    cao.on_join_game_ok = function() { +    swst.on_join_game_ok = function() {          $header.show();          $home.removeClass("current");          $game.addClass("current");          $all.hide();      }; -    cao.on_change_state = function(state) { +    swst.on_change_state = function(state) {          $all.hide();          switch (state) { @@ -55,7 +55,7 @@ $(document).ready(function() {                  $white_cards.addClass('read-only');                  break;              case 'waiting_designation': -                if (cao.is_judge()) { +                if (swst.is_judge()) {                      $judge_choose.show();                      $played_cards.removeAttr('disabled');                      $played_cards.removeClass('read-only'); @@ -66,7 +66,7 @@ $(document).ready(function() {                  }                  break;              case 'waiting_collection': -                if (cao.is_judge()) { +                if (swst.is_judge()) {                      $judge_collect.show();                      $white_cards.attr('disabled', true);                      $white_cards.addClass('read-only'); @@ -82,7 +82,7 @@ $(document).ready(function() {          }      }; -    cao.on_show_white_card = function(idx, desc) { +    swst.on_show_white_card = function(idx, desc) {          var identifier = 'white-card-' + idx;          var content = '<button name="' + idx + '" class="read-only card" id="' + identifier + '">' + desc + '</button>';          $white_cards.append(content); @@ -91,7 +91,7 @@ $(document).ready(function() {              var $this = $(this);              if (!$white_cards.attr('disabled')) {                  if ($this.hasClass("active")) { -                    cao.get_white_card_event($this.prop('name'))(); +                    swst.get_white_card_event($this.prop('name'))();                  } else {                      $white_cards.find("> .card").removeClass("active");                      $this.addClass("active"); @@ -100,7 +100,7 @@ $(document).ready(function() {          });      }; -    cao.on_show_played_card = function(idx, desc) { +    swst.on_show_played_card = function(idx, desc) {          var identifier = 'played-card-' + idx;          var content = '<button name="' + idx + '" class="read-only card" id="' + identifier + '">' + desc + '</button>';          $played_cards.append(content); @@ -109,7 +109,7 @@ $(document).ready(function() {              var $this = $(this);              if (!$played_cards.attr('disabled')) {                  if ($this.hasClass("active")) { -                    cao.get_played_card_event($this.prop('name'))(); +                    swst.get_played_card_event($this.prop('name'))();                  } else {                      $played_cards.find("> .card").removeClass("active");                      $this.addClass("active"); @@ -118,11 +118,11 @@ $(document).ready(function() {          });      }; -    cao.on_show_black_card = function(desc) { +    swst.on_show_black_card = function(desc) {          $('#black-card').html(desc);      }; -    cao.on_play_white_card_ok = function(idx) { +    swst.on_play_white_card_ok = function(idx) {          $white_cards.attr('disabled', true);          $white_cards.addClass('read-only'); @@ -131,25 +131,25 @@ $(document).ready(function() {          $('#white-card-' + idx).remove();      }; -    cao.on_updated_score = function(score) { +    swst.on_updated_score = function(score) {          $score_value.text(score);      }; -    cao.on_change_nbr_played_cards = function(nbr) { +    swst.on_change_nbr_played_cards = function(nbr) {          $played_card_number.text(nbr);      }; -    cao.on_collect_cards_ok = function() { +    swst.on_collect_cards_ok = function() {          $white_cards.hide();          $played_cards.show();      }; -    cao.on_designate_card_ok = function(idx) { +    swst.on_designate_card_ok = function(idx) {          $played_cards.empty();          $played_cards.hide();          $white_cards.show();      }; -    cao.run(); +    swst.run();  }); | 
