Skip to content

Commit

Permalink
Move jquery to lib, and added check on level
Browse files Browse the repository at this point in the history
  • Loading branch information
phtrivier committed Aug 6, 2010
1 parent 1ee3095 commit a73a436
Show file tree
Hide file tree
Showing 9 changed files with 20 additions and 11 deletions.
4 changes: 2 additions & 2 deletions src/html/chapter1.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@

<!-- I wish I could reduce all this to a single file, hence
reducing the chances of forgetting something ... -->
<script type="text/javascript" src="../js/jquery-1.4.2.min.js"></script>
<script type="text/javascript" src="../js/jquery.url.min.js"></script>
<script type="text/javascript" src="../js/lib/jquery-1.4.2.min.js"></script>
<script type="text/javascript" src="../js/lib/jquery.url.min.js"></script>
<script type="text/javascript" src="../js/move.js"></script>
<script type="text/javascript" src="../js/puzzles.js"></script>
<script type="text/javascript" src="../js/i18n.js"></script>
Expand Down
6 changes: 3 additions & 3 deletions src/html/in-game.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
<link rel="icon" type="image/png" sizes="32x32" href="../../data/images/png/player.png" />
</head>
<body>
<script type="text/javascript" charset="UTF-8" src="../js/jquery-1.4.2.min.js"></script>
<script type="text/javascript" charset="UTF-8" src="../js/jquery.url.min.js"></script>
<script type="text/javascript" charset="UTF-8" src="../js/jquery-ui-1.8.2.custom.min.js"></script>
<script type="text/javascript" charset="UTF-8" src="../js/lib/jquery-1.4.2.min.js"></script>
<script type="text/javascript" charset="UTF-8" src="../js/lib/jquery.url.min.js"></script>
<script type="text/javascript" charset="UTF-8" src="../js/lib/jquery-ui-1.8.2.custom.min.js"></script>
<!-- TODO : compress all files into a big one, zip it, and hope for the
best ... maybe using -->
<script type="text/javascript" charset="UTF-8" src="../js/node.js"></script>
Expand Down
4 changes: 2 additions & 2 deletions src/html/jsube.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
</head>
<body>

<script type="text/javascript" src="../js/jquery-1.4.2.min.js"></script>
<script type="text/javascript" src="../js/jquery.url.min.js"></script>
<script type="text/javascript" src="../js/lib/jquery-1.4.2.min.js"></script>
<script type="text/javascript" src="../js/lib/jquery.url.min.js"></script>
<script type="text/javascript" src="../js/i18n.js"></script>
<script type="text/javascript" src="../js/chapters.js"></script>

Expand Down
4 changes: 2 additions & 2 deletions src/html/tutorial.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@

<!-- I wish I could reduce all this to a single file, hence
reducing the chances of forgetting something ... -->
<script type="text/javascript" src="../js/jquery-1.4.2.min.js"></script>
<script type="text/javascript" src="../js/jquery.url.min.js"></script>
<script type="text/javascript" src="../js/lib/jquery-1.4.2.min.js"></script>
<script type="text/javascript" src="../js/lib/jquery.url.min.js"></script>
<script type="text/javascript" src="../js/move.js"></script>
<script type="text/javascript" src="../js/puzzles.js"></script>
<script type="text/javascript" src="../js/i18n.js"></script>
Expand Down
5 changes: 5 additions & 0 deletions src/js/jsube.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,11 @@ $(document).ready(function(){

g_puzzle = load_puzzle();

if (g_puzzle == null) {
alert("Unable to load puzzle, sorry");
window.location = "jsube.html";
}

$("a.transition").click(function (event) {
event.preventDefault();
linkLocation = this.href;
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
8 changes: 6 additions & 2 deletions src/js/puzzle.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,12 @@ Puzzle.prototype.load_puzzle_structure = function (structure) {
};

Puzzle.prototype.load_messages = function (structure) {
this.on_start_messages = structure.on_start;
this.on_end_messages = structure.on_end;
if (structure.on_start) {
this.on_start_messages = structure.on_start;
}
if (structure.on_end) {
this.on_end_messages = structure.on_end;
}
this.titles = structure.title;
};

Expand Down

0 comments on commit a73a436

Please sign in to comment.