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

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.

Parameters:

  • fnc ( function ) a function with three parameters: jqXHR object, text status and the error thrown.

# (void) send_model(modelname, json, callback_function)

Send to the server the JSON representatino of the model.

Parameters:

  • modelname ( string ) The model to load
  • json ( string ) The JSON representation.
  • callback_function ( function ) A function to execute when the server answer successfully

# (void) request_model(modelname, callback_function)

Send to the server e request for retrieving the model list.

Parameters:

  • modelname ( string ) The model to load
  • callback_function ( function ) A function to execute when the server answer successfully

# (void) request_login(username, pass, callback_function)

Send to the server a login request.

Parameters:

  • username ( String ) The username.
  • pass ( String ) The password.
  • callback_function ( function ) A function to execute when the POST is successful.

# (void) request_logout(callback_function)

Send to the server a logout request.

Parameters:

  • callback_function ( function ) A function to execute when the POST is successful.

# (void) request_model_list(callback_function)

Send to the server e request for retrieving the model list.

Parameters:

  • callback_function ( function ) A function to execute when the server answer successfully

    Quickly fuzzy find classes, mixins, methods, file:

    Control the navigation frame:

    You can focus and blur the search input: