Board18Games

From BOARD18 Project WIKI
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
This page has been updated to comply with Release 2.1.x of BOARD18. Go Back

The board18Games script contains all of the js functions for the board18Games page.

Function listReturn(response)

Function listReturn is the success callback function for the ajax gameShow.php call. It appends a list if games to the table in board18Games.php.

Function doPageList()

The doPageList function performs an AJAX call to the gameShow.php function.

Function doPageLinks()

Function doPageLinks creates page links for multi page game list output.

Function gamePlayers()

Function gamePlayers uses the BD18.game.players object to append a list of players associated with the game to the space under the game dialog in the board18Games page if the game is associated with one or more players.

Function paintGame()

Function paintGame uses the BD18.game object to create a table of information about a game, to create and display a game dialog and then calls the gamePlayers function.

Function getReturn(response)

Function getReturn is the success callback function for the ajax gameGet.php call. It initializes the BD18.game object and then it uses the paintGame() function to open the game dialog and to append a list if players to the space under the game dialog in the board18Games page.

Function gameResult(response)

Function gameResult is the success callback function for the ajax gameUpdate.php call. It processes the response from gameUpdate.php. If 'success' it calls gameGet.php else if not 'fail' it turns on the approperate error text and returns.

Function doGame(gameid)

The doGame function performs an AJAX call to the gameGet.php function.

Function findGame(gname)

The findGame function searches the BD18.games array to find the gameid of the game with a given gname. It then calls doGame with it.

Function updateGame()

Function updateGame is called by the on-click method of the update button in the thegame form. It checks the input for missing fields and then does an ajax call to gameUpdate.php.