Class: LoginManager

Defined in: web-src/coffee/login.coffee

Overview

Class to manage the login and widgets.

Main class for the login and save-load features and its widgets.

Variables Summary

current =
null
loginconn =
null

Instance Method Summary

Constructor Details

# (void) constructor(loginwidget_id = "#loginwidget_placer", saveloadwidget_id = "#saveloadjson_placer")

Create a LoginWidget

@param widget_id The login widget id. Example: "#loginwidget_placer"

Instance Method Details

# (void) new_login(username, current = true)

Create a new login and make it current.

Parameters:

  • current ( boolean ) Optional. Make it current? By default is true.
  • username ( string ) The username of the login.

# (void) show_login()

Show the login popup.

# (void) hide_login()

Hide the login popup.

# (void) change_to_user_page()

# (void) change_to_diagram_page()

# (void) update_login(data)

Callback for the LoginRequests

Update the interface according to a succesful login.

Parameters:

  • data ( String ) The information about the login answer in JSON format.

# (void) set_logged_in()

According to the information about @current, update the interface.

# (void) update_logout(data)

Callback for the Loginrequests.

Update the interface and JS as if the user has recently logged out.

Parameters:

  • data ( String ) The information returned from the server.

# (void) show_save_json()

Display the saveloadjson Popup in the save state.

# (void) show_save_json_aftersave()

Update model list after saving a new model.

# (void) show_load_json()

Display the saveloadjson Popup in the load state.

But first, we must retrieve the model list.

# (void) show_load_json_with_list(list)

Display the loadjson but without retrieving the model list.

Parameters:

  • list ( Array ) A list of Strings with the names of the models.

# (void) hide_saveloadjson()

Hide the saveloadjson Popup.

Maybe the user canceled?

# (void) show_saveloadjson()

# (void) update_saveloadjsonwidget(data)

Callback for LoginRequests.request_model_list().

Retrive the JSON string data and update the load model list. This function is to be executed after Login.

Parameters:

  • data ( string ) The JSON string.

# (void) update_saveloadjsonwidget_aftersave(data)

Callback for LoginRequests.request_model_list().

Retrive the JSON string data and update the load model list. This function hides Save dialog.

Parameters:

  • data ( string ) The JSON string.

# (void) model_sended(data)

    Quickly fuzzy find classes, mixins, methods, file:

    Control the navigation frame:

    You can focus and blur the search input: