mirror of
https://bitbucket.org/grumdrig/pq-web.git
synced 2026-09-29 08:44:00 -06:00
Collect char info ready to be submitted
This commit is contained in:
+1
-1
@@ -62,7 +62,7 @@ input, button { display: inline; }
|
||||
</div>
|
||||
|
||||
<div class=hbox style="text-align:right">
|
||||
<button id=Sold type=default>Sold!</button>
|
||||
<button id=Sold>Sold!</button>
|
||||
<button id=Cancel>Cancel</button>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -75,6 +75,7 @@ $(document).ready(function () {
|
||||
$("#Name")[0].focus();
|
||||
$("#Name")[0].select();
|
||||
}
|
||||
$('#Sold').click(sold);
|
||||
});
|
||||
|
||||
|
||||
@@ -133,6 +134,18 @@ function TNewGuyForm_SoldClick() {
|
||||
}
|
||||
*/
|
||||
|
||||
function sold() {
|
||||
var newguy = {
|
||||
name: $("#Name").val(),
|
||||
race: $("input:radio[name=Race]:checked").val(),
|
||||
'class': $("input:radio[name=Class]:checked").val(),
|
||||
seed: stats.seed,
|
||||
};
|
||||
$.each('STR,CON,DEX,INT,WIS,CHA'.split(','), function (index,value) {
|
||||
newguy[value] = stats[value];
|
||||
});
|
||||
alert(JSON.stringify(newguy));
|
||||
}
|
||||
|
||||
function GenClick() {
|
||||
$("#Name").attr("value", GenerateName());
|
||||
|
||||
Reference in New Issue
Block a user