Difference between revisions of "Board18Market7"

From BOARD18 Project WIKI
Jump to navigation Jump to search
(rel 1.1)
(added release note)
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
__NOTOC__{{ReleaseNotice|1.1}}
{{ReleaseNoticeX|2.1|Design_Document_board18Market_Page}}
board18Market7.js contains all the functions that
board18Market7.js contains all the functions that
implement the keyboard shortcut events.
implement the keyboard shortcut events.
Line 13: Line 13:
|Enter||Accept Move
|Enter||Accept Move
|-
|-
|C||Cancel Move
|C/ESC||Cancel Move
|-
|Z||Undo Move
|-
|Y||Redo Move
|-
|S||Take Snapshot
|-
|-
|M||Goto Stock Chart
|M||Goto Stock Chart
|-
|O||Goto Main Page
|-
|X||Logout
|-
|-
|F||Flip Token
|F||Flip Token
Line 45: Line 55:
setTimeout for the checkForUpdate function and then
setTimeout for the checkForUpdate function and then
calls the delayCheckForUpdate function.
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.

Latest revision as of 13:08, 31 May 2016

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

board18Market7.js contains all the functions that implement the keyboard shortcut events.

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
S Take Snapshot
M Goto Stock Chart
O Goto Main Page
X Logout
F Flip Token
L Move Left One Box
R Move Right One Box
U Move Up One Box
D Move Down One Box

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.