Difference between revisions of "Board18Map7"

From BOARD18 Project WIKI
Jump to navigation Jump to search
(update for release 1.3.x)
Line 15: Line 15:
|Enter||Accept Move
|Enter||Accept Move
|-
|-
|C||Cancel Move
|C/Esc||Cancel Move
|-
|Z||Undo Move
|-
|Y||Redo Move
|-
|H||Hide/Show
|-
|S||Take Snapshot
|-
|-
|M||Goto Stock Chart
|M||Goto Stock Chart
|-
|O||Goto Main Page
|-
|X||Logout
|-
|-
|F||Flip Token
|F||Flip Token

Revision as of 16:13, 30 May 2016

This page has been updated to comply with Release 1.3.x of BOARD18. Go Back

board18Map7.js contains the function that implements the keyboard shortcut events and the functions that implement the call to the checkForUpdate.php routine. It now also contains the code for the new snapshot function.

Function setUpKeys()

The setUpKeys function performs all of the bind operations for the keyboard shortcut events.

Keyboard Shortcuts
KEY Action
Enter Accept Move
C/Esc Cancel Move
Z Undo Move
Y Redo Move
H Hide/Show
S Take Snapshot
M Goto Stock Chart
O Goto Main Page
X Logout
F Flip Token
R Rotate Tile Clockwise
E Rotate Tile Counterclockwise

Function checkForUpdateCallback(resp)

The checkForUpdateCallback function is the callback function for the checkForUpdate function. It acts on the status returned by the checkForUpdate.php AJAX call.

Function checkForUpdate()

The checkForUpdate function does an AJAX post call for checkForUpdate.php passing the gameid.

Function delayCheckForUpdate()

The delayCheckForUpdate function waits 2 minutes before calling the checkForUpdate function.

Function resetCheckForUpdate()

The resetCheckForUpdate function stops any current setTimeout for the checkForUpdate function and then calls the delayCheckForUpdate function.

Function snapshotOK(response)

Function snapshotOK is the call back function for the ajax snapShot.php call.

Function snapshot()

Function snapshot is called by the submit method of the snapname submit button. It checks the input for missing fields and does an ajax call to snapShot.php.