[jboss-cvs] jboss-seam/examples/remoting/poker/view ...
Shane Bryzak
Shane_Bryzak at symantec.com
Wed Oct 11 00:43:22 EDT 2006
User: sbryzak2
Date: 06/10/11 00:43:22
Added: examples/remoting/poker/view index.html poker.css
poker.js poker.xhtml
Log:
New remoting example, under construction.
Revision Changes Path
1.1 date: 2006/10/11 04:43:22; author: sbryzak2; state: Exp;jboss-seam/examples/remoting/poker/view/index.html
Index: index.html
===================================================================
<html>
<head>
<meta http-equiv="Refresh" content="0; URL=poker.seam">
</head>
</html>
1.1 date: 2006/10/11 04:43:22; author: sbryzak2; state: Exp;jboss-seam/examples/remoting/poker/view/poker.css
Index: poker.css
===================================================================
* {
padding: 0;
margin: 0;
}
body {
background: url(images/background.png) left top repeat;
font-family: arial, helvetica;
}
button {
width: 80px;
}
#welcome {
margin-top: 10px;
margin-left: auto;
margin-right: auto;
width: 455px;
height: 139px;
background: url(images/welcome.png) left top;
}
#messages {
float: left;
width: 440px;
height: 144px;
margin-left: 20px;
}
#messageBox {
width: 440px;
height: 120px;
overflow: auto;
background: #ffffff;
border: 1px solid black;
}
#messageInput {
border: 1px solid black;
width: 440px;
}
#control {
float: right;
border: 1px solid white;
width: 400px;
height: 80px;
margin-right: 20px;
}
#playarea {
width: 1024px;
height: 460px;
margin-left: auto;
margin-right: auto;
background: url(images/table.png) no-repeat;
background-position: center;
}
#cardfan {
position: absolute;
background: url(images/card_fan.png) left top;
width: 319px;
height: 315px;
margin-left: 220px;
margin-top: 60px;
}
#dealer {
position: absolute;
background: url(images/dealer.png) left top no-repeat;
width: 40px;
height: 36px;
margin-left: 520px;
margin-top: 180px;
}
#login {
position: absolute;
margin-left: 580px;
margin-top: 140px;
background-color: #dddd00;
border: 1px solid #555555;
text-align: center;
height: 150px;
width: 200px;
}
#player1box {
position: absolute;
margin-left: 280px;
margin-top: 400px;
width: 200px;
height: 40px;
background-color: white;
-moz-opacity: 0.4;
}
#player2box {
position: absolute;
margin-left: 40px;
margin-top: 310px;
width: 200px;
height: 40px;
background-color: white;
-moz-opacity: 0.4;
}
#player3box {
position: absolute;
margin-left: 0px;
margin-top: 200px;
width: 200px;
height: 40px;
background-color: white;
-moz-opacity: 0.4;
}
#player4box {
position: absolute;
margin-left: 40px;
margin-top: 90px;
width: 200px;
height: 40px;
background-color: white;
-moz-opacity: 0.4;
}
#player5box {
position: absolute;
margin-left: 280px;
margin-top: 0px;
width: 200px;
height: 40px;
background-color: white;
-moz-opacity: 0.4;
}
#player6box {
position: absolute;
margin-left: 520px;
margin-top: 0px;
width: 200px;
height: 40px;
background-color: white;
-moz-opacity: 0.4;
}
#player7box {
position: absolute;
margin-left: 780px;
margin-top: 90px;
width: 200px;
height: 40px;
background-color: white;
-moz-opacity: 0.4;
}
#player8box {
position: absolute;
margin-left: 824px;
margin-top: 200px;
width: 200px;
height: 40px;
background-color: white;
-moz-opacity: 0.4;
}
#player9box {
position: absolute;
margin-left: 780px;
margin-top: 310px;
width: 200px;
height: 40px;
background-color: white;
-moz-opacity: 0.4;
}
#player10box {
position: absolute;
margin-left: 520px;
margin-top: 400px;
width: 200px;
height: 40px;
background-color: white;
-moz-opacity: 0.4;
}
button.loginButton {
width: 80px;
}
1.1 date: 2006/10/11 04:43:22; author: sbryzak2; state: Exp;jboss-seam/examples/remoting/poker/view/poker.js
Index: poker.js
===================================================================
var Poker = new Object();
Poker.login = function()
{
var playerName = document.getElementById("playerName").value;
Seam.Component.getInstance("playerAction").login(playerName, Poker.loginCallback);
}
Poker.loginCallback = function(success)
{
if (success)
{
alert("login successful");
}
}
1.1 date: 2006/10/11 04:43:22; author: sbryzak2; state: Exp;jboss-seam/examples/remoting/poker/view/poker.xhtml
Index: poker.xhtml
===================================================================
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Seam Poker</title>
<link href="poker.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<script type="text/javascript" src="seam/remoting/resource/remote.js"></script>
<script type="text/javascript" src="seam/remoting/interface.js?playerAction"></script>
<script type="text/javascript" src="poker.js"></script>
<div id="welcome">
</div>
<div id="playarea">
<div id="cardfan"></div>
<div id="dealer"></div>
<div id="player1box"></div>
<div id="player2box"></div>
<div id="player3box"></div>
<div id="player4box"></div>
<div id="player5box"></div>
<div id="player6box"></div>
<div id="player7box"></div>
<div id="player8box"></div>
<div id="player9box"></div>
<div id="player10box"></div>
<div id="login">
<p><b>Let's get started!</b></p>
<br/>
<p>Please enter your name:</p>
<br/>
<p><input id="playerName" type="text"></input></p>
<br/>
<button onclick="Poker.login();return false;" class="loginButton">Login</button>
</div>
</div>
<div id="messages">
<div id="messageBox"></div>
<input id="messageInput"></input>
</div>
<div id="control">
<input type="checkbox"></input><button>Call</button>
<input type="checkbox"></input><button>Fold</button>
<input type="checkbox"></input><button>Raise</button>
<input type="checkbox"></input><button>Check</button>
</div>
</body>
</html>
More information about the jboss-cvs-commits
mailing list