1.1 --- a/minesweeper/src/main/webapp/pages/index.html Sat Feb 08 08:47:23 2014 +0100
1.2 +++ b/minesweeper/src/main/webapp/pages/index.html Sat Feb 08 10:07:55 2014 +0100
1.3 @@ -49,27 +49,30 @@
1.4 <body>
1.5 <div class="navbar">
1.6 <div class="navbar-inner">
1.7 - <a id="apptitle" class="brand" href="http://html.java.net">Minesweeper</a>
1.8 + <a id="apptitle" class="brand" href="#" data-bind="click: showHelp">Minesweeper</a>
1.9 <button class="btn btn-default navbar-btn" disabled="true" data-bind="disable: false, click: normalGame">New Game!</button>
1.10 - <button class="btn btn-default navbar-btn" disabled="true" data-bind="disable: false, click: giveUp ">Show Mines!</button>
1.11 + <button class="btn btn-default navbar-btn" disabled="true" data-bind="disable: !fieldShowing(), click: giveUp ">Show Mines!</button>
1.12 </div>
1.13 </div>
1.14 +
1.15
1.16 - <table class="field">
1.17 - <tbody>
1.18 - <!-- ko foreach: rows -->
1.19 - <tr>
1.20 - <!-- ko foreach: columns -->
1.21 - <td data-bind="css: style, click: $parents[1].click" >
1.22 - <div data-bind='html: html'></div>
1.23 - </td>
1.24 + <script type="text/html" id="field">
1.25 + <table class="field">
1.26 + <tbody>
1.27 + <!-- ko foreach: rows -->
1.28 + <tr>
1.29 + <!-- ko foreach: columns -->
1.30 + <td data-bind="css: style, click: $parents[1].click" >
1.31 + <div data-bind='html: html'></div>
1.32 + </td>
1.33 + <!-- /ko -->
1.34 + </tr>
1.35 <!-- /ko -->
1.36 - </tr>
1.37 - <!-- /ko -->
1.38 - </tbody>
1.39 - </table>
1.40 + </tbody>
1.41 + </table>
1.42 + </script>
1.43
1.44 -
1.45 + <div data-bind="template: { name : 'field', if: fieldShowing }"/>
1.46
1.47 <script type="text/javascript" src="bck2brwsr.js"></script>
1.48 <script>