display the total duration of the current play timer. will make it count later
This commit is contained in:
parent
a8e7273e13
commit
c6659b3abb
|
@ -91,6 +91,7 @@ HttpSession hSession = request.getSession(true);
|
||||||
<input type="button" id="start_game" class="hide" value="Start Game" />
|
<input type="button" id="start_game" class="hide" value="Start Game" />
|
||||||
</div>
|
</div>
|
||||||
<div id="menubar_right">
|
<div id="menubar_right">
|
||||||
|
Current timer duration: <span id="current_timer">0</span> seconds
|
||||||
<input type="button" id="logout" value="Log out" />
|
<input type="button" id="logout" value="Log out" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -113,6 +113,10 @@ cah.longpoll.done = function(data_list) {
|
||||||
cah.log.error(cah.$.ErrorCode_msg[errorCode]);
|
cah.log.error(cah.$.ErrorCode_msg[errorCode]);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
// FIXME giant hack
|
||||||
|
if (data[cah.$.LongPollResponse.PLAY_TIMER]) {
|
||||||
|
$("#current_timer").text(data[cah.$.LongPollResponse.PLAY_TIMER] / 1000);
|
||||||
|
}
|
||||||
var event = data[cah.$.LongPollResponse.EVENT];
|
var event = data[cah.$.LongPollResponse.EVENT];
|
||||||
if (cah.longpoll.EventHandlers[event]) {
|
if (cah.longpoll.EventHandlers[event]) {
|
||||||
cah.longpoll.EventHandlers[event](data);
|
cah.longpoll.EventHandlers[event](data);
|
||||||
|
|
Loading…
Reference in New Issue