Class: LoginRequests
Defined in: | web-src/coffee/login.coffee |
Overview
AJAX requet for implementing the login and save-load feature.
Error Callback
The default error callback just print in the console the login error.
Instance Method Summary
- # (void) set_error_callback(fnc) Change the error callback.
- # (void) send_model(modelname, json, callback_function) Send to the server the JSON representatino of the model.
- # (void) request_model(modelname, callback_function) Send to the server e request for retrieving the model list.
- # (void) request_login(username, pass, callback_function) Send to the server a login request.
- # (void) request_logout(callback_function) Send to the server a logout request.
- # (void) request_model_list(callback_function) Send to the server e request for retrieving the model list.
Constructor Details
#
(void)
constructor()
Instance Method Details
#
(void)
set_error_callback(fnc)
Change the error callback.
If the function provided is null, then use the default one.
#
(void)
send_model(modelname, json, callback_function)
Send to the server the JSON representatino of the model.
#
(void)
request_model(modelname, callback_function)
Send to the server e request for retrieving the model list.
#
(void)
request_login(username, pass, callback_function)
Send to the server a login request.
#
(void)
request_logout(callback_function)
Send to the server a logout request.
#
(void)
request_model_list(callback_function)
Send to the server e request for retrieving the model list.