[Toss-devel-svn] SF.net SVN: toss:[1445] trunk/Toss/WebClient
Status: Beta
Brought to you by:
lukaszkaiser
From: <luk...@us...> - 2011-05-17 01:34:54
|
Revision: 1445 http://toss.svn.sourceforge.net/toss/?rev=1445&view=rev Author: lukaszkaiser Date: 2011-05-17 01:34:48 +0000 (Tue, 17 May 2011) Log Message: ----------- Further UI improvements. Modified Paths: -------------- trunk/Toss/WebClient/Login.js trunk/Toss/WebClient/Main.js trunk/Toss/WebClient/Style.css trunk/Toss/WebClient/index.html Modified: trunk/Toss/WebClient/Login.js =================================================================== --- trunk/Toss/WebClient/Login.js 2011-05-16 20:09:29 UTC (rev 1444) +++ trunk/Toss/WebClient/Login.js 2011-05-17 01:34:48 UTC (rev 1445) @@ -55,8 +55,21 @@ if (udata != "") { setup_user (udata.split("$")) }; } if (window.location.href.indexOf("?simple=true") > 0) { + SIMPLE_SET = true; + document.getElementById("pdescChess").style.display = "block"; + document.getElementById("pdescConnect4").style.display = "block"; + document.getElementById("pdescPawn-Whopping").style.display = "block"; + document.getElementById("pdescBreakthrough").style.display = "block"; + document.getElementById("pdescCheckers").style.display = "block"; + document.getElementById("pdescGomoku").style.display = "block"; document.getElementById("loginform").style.display = "none"; document.getElementById("topright-register").style.display = "none"; + document.getElementById("toss-link").style.display = "none"; + document.getElementById("welcome-top").style.display = "none"; + document.getElementById("welcome-list-main").style.display = "none"; + document.getElementById("topuser").innerHTML = "Choose Your Next Game"; + document.getElementById("leftupperlogo-link").href = + "index.html?simple=true"; }; cur_game = ""; if (game) { var cur_game = game; } Modified: trunk/Toss/WebClient/Main.js =================================================================== --- trunk/Toss/WebClient/Main.js 2011-05-16 20:09:29 UTC (rev 1444) +++ trunk/Toss/WebClient/Main.js 2011-05-17 01:34:48 UTC (rev 1445) @@ -17,6 +17,7 @@ var LAST_CLICKED_ELEM = ""; var SIMPLE_MOVES = true; +var SIMPLE_SET = false; // Get model information from server. function get_model_info () { @@ -94,6 +95,7 @@ document.getElementById("board").style.paddingTop = "0em"; } document.getElementById("move-info-par").style.display = "none"; + document.getElementById("game-info-par").style.paddingBottom = "0em"; document.getElementById('payoffs').innerHTML = "Result: " + subst_pl(PAYOFF_STR); document.getElementById('payoffs').style.display = "inline"; @@ -266,6 +268,7 @@ document.getElementById("cur-player").innerHTML = disp_name(PLAYS[CUR_PLAY_I][PLAYS[CUR_PLAY_I][3]]); toss_open_db (play_py_id(pi)); + document.getElementById("suggestions-toggle").style.display = "inline"; full_redraw (); } @@ -400,7 +403,17 @@ function new_play_guest (game) { GAME_NAME = game; UNAME = "guest"; - document.getElementById("topuser").innerHTML = "Welcome!"; + wgame = game; + if (game == "Breakthrough") { wgame = "Breakthrough_(board_game)" }; + if (game == "Pawn-Whopping") { wgame = "Pawn_(chess)" }; + if (game == "Entanglement") { wgame = "Entanglement_(graph_measure)" }; + wiki = "http://en.wikipedia.org/wiki/" + wgame; + document.getElementById("topuser").innerHTML = + game + ' (<a href="' + wiki + '">Move Rules</a>)'; + if (SIMPLE_SET) { document.getElementById("topuser").innerHTML = game }; + document.getElementById("pdescBack").style.display = "block"; + document.getElementById("game-title").style.display = "none"; + document.getElementById("game-info-par").style.paddingBottom = "1em"; document.getElementById("loginform").style.display = "none"; document.getElementById("topright-register").style.display = "none"; document.getElementById("topright").style.display = "inline"; @@ -423,6 +436,7 @@ info_nbr = srv ("NEW_PLAY", "c, '" + GAME_NAME + "', '" + UNAME + "', '" + opp_uid + "'"); document.getElementById("working").style.display = "none"; + document.getElementById("suggestions-toggle").style.display = "inline"; info_idx = info_nbr.indexOf('$'); FREE_PLAY_NO = parseInt(info_nbr.substring(0, info_idx)); document.getElementById("play-number").innerHTML = "" + FREE_PLAY_NO; @@ -449,6 +463,9 @@ document.getElementById('payoffs').innerHTML = "Not Finished Yet"; document.getElementById('payoffs').style.display = "none"; document.getElementById('new-play-par').style.display = "none"; + if (UNAME == "guest") { + document.getElementById("game-info-par").style.paddingBottom = "1em"; + }; toggle_suggestions (); toggle_suggestions (); clear_svg (); Modified: trunk/Toss/WebClient/Style.css =================================================================== --- trunk/Toss/WebClient/Style.css 2011-05-16 20:09:29 UTC (rev 1444) +++ trunk/Toss/WebClient/Style.css 2011-05-17 01:34:48 UTC (rev 1445) @@ -93,6 +93,58 @@ margin-top: 0.3em; } +.game-picbt { + position: relative; + top:0px; + left:0px; + text-align: center; + width:32%; + text-align: center; + border-width: 0px; + color: #260314; + background-color: #fff1d4; + font-family: Verdana, 'TeXGyreHerosRegular', sans; +} + +.game-picspan { + display: none; + position: absolute; + top: 50%; + left: 0px; + width: 100%; + text-align: center; + font-size: 2.2em; +} + +.game-pictxt { + position: relative; + top: -1em; + background-color: rgba(255, 241, 228, 0.8); + border-radius: 4px; + -moz-border-radius: 4px; + opacity: 1; +} + +.logo-picspan { + display: none; + position: absolute; + top: 0px; + left: 0px; + width: 100%; + text-align: center; + font-size: 1.1em; + font-weight: bold; + background-color: rgba(64, 8, 39, 0.7); +} + +.logo-pictxt { + position: relative; + top: 0em; + border-radius: 4px; + -moz-border-radius: 4px; + opacity: 1; +} + .loginsmall { position: relative; top: 1px; @@ -214,6 +266,9 @@ } #logo { + position: relative; + left: 0px; + top: 0px; font-size: 2em; float: left; font-family: arial, 'OFLSortsMillGoudyRegular', serif; Modified: trunk/Toss/WebClient/index.html =================================================================== --- trunk/Toss/WebClient/index.html 2011-05-16 20:09:29 UTC (rev 1444) +++ trunk/Toss/WebClient/index.html 2011-05-17 01:34:48 UTC (rev 1445) @@ -21,7 +21,14 @@ <div id="main"> <div id="top"> -<div id="logo"><a href="index.html"><img src="toss.png" alt="tPlay" /></a></div> +<div id="logo"> + <a id="leftupperlogo-link" href="index.html"> + <img src="toss.png" alt="tPlay" /> + <span id="pdescBack" class="logo-picspan"> + <span class="logo-pictxt">←</span> + </span> + </a> +</div> <div id="topbar"> <span id="topuser"></span> <form id="loginform" style="display: inline;" action=""> @@ -88,39 +95,57 @@ with our best interface on <span class="logo-in">tPlay</span>! </p> -<p style="width:100%; text-align: justify"> -<button onclick="new_play_guest('Chess')" style="width:32%" - class="boldobt" title="Play Chess"> +<p style="width:100%; text-align: justify;"> +<button onclick="new_play_guest('Chess')" class="game-picbt" + title="Play Chess"> <img style="max-width:95%" src="pics/Chess.png" alt="Chess Board" /> + <span id="pdescChess" class="game-picspan"> + <span class="game-pictxt">Chess</span> + </span> </button> -<button onclick="new_play_guest('Connect4')" style="width:32%" +<button onclick="new_play_guest('Connect4')" class="game-picbt" class="boldobt" title="Play Connect4"> <img style="max-width:95%" src="pics/Connect4.png" alt="Connect4 Board" /> + <span id="pdescConnect4" class="game-picspan"> + <span class="game-pictxt">Connect4</span> + </span> </button> -<button onclick="new_play_guest('Pawn-Whopping')" style="width:32%" +<button onclick="new_play_guest('Pawn-Whopping')" class="game-picbt" class="boldobt" title="Play Pawn-Whopping"> <img style="max-width:95%" src="pics/Pawn-Whopping.png" alt="Pawn-Whopping Board" /> + <span id="pdescPawn-Whopping" class="game-picspan"> + <span class="game-pictxt">Pawn-Whopping</span> + </span> </button> </p> <p style="width:100%; text-align: justify"> -<button onclick="new_play_guest('Breakthrough')" style="width:32%" +<button onclick="new_play_guest('Breakthrough')" class="game-picbt" class="boldobt" title="Play Breakthrough"> <img style="max-width:95%" src="pics/Breakthrough.png" alt="Breakthrough Board" /> + <span id="pdescBreakthrough" class="game-picspan"> + <span class="game-pictxt">Breakthrough</span> + </span> </button> -<button onclick="new_play_guest('Checkers')" style="width:32%" +<button onclick="new_play_guest('Checkers')" class="game-picbt" class="boldobt" title="Play Checkers"> <img style="max-width:95%" src="pics/Checkers.png" alt="Checkers Board" /> + <span id="pdescCheckers" class="game-picspan"> + <span class="game-pictxt">Checkers</span> + </span> </button> -<button onclick="new_play_guest('Gomoku')" style="width:32%" +<button onclick="new_play_guest('Gomoku')" class="game-picbt" class="boldobt" title="Play Gomoku"> <img style="max-width:95%" src="pics/Gomoku.png" alt="Gomoku Board" /> + <span id="pdescGomoku" class="game-picspan"> + <span class="game-pictxt">Gomoku</span> + </span> </button> </p> -<ul class="welcome-list"> +<ul id="welcome-list-main" class="welcome-list"> <li>Play <a href="http://en.wikipedia.org/wiki/Breakthrough_(board_game)" >Breakthrough,</a> @@ -262,9 +287,8 @@ <div id="bottom"> -<button id="suggestions-toggle" onclick="toggle_suggestions()"> - Ask Before Move -</button> +<button id="suggestions-toggle" style="display: none;" + onclick="toggle_suggestions()">Ask Before Move</button> <a href="http://toss.sourceforge.net" id="toss-link">Powered by Toss</a> <script type="text/javascript">begin_mailto( "tossplay", "gmail.com", "Contact Us");</script> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |