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
- # (void) new_login(username, current = true) Create a new login and make it current.
- # (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.
- # (void) set_logged_in() According to the information about @current, update the interface.
- # (void) update_logout(data) Callback for the Loginrequests.
- # (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.
- # (void) show_load_json_with_list(list) Display the loadjson but without retrieving the model list.
- # (void) hide_saveloadjson() Hide the saveloadjson Popup.
- # (void) show_saveloadjson()
- # (void) update_saveloadjsonwidget(data) Callback for LoginRequests.request_model_list().
- # (void) update_saveloadjsonwidget_aftersave(data) Callback for LoginRequests.request_model_list().
- # (void) model_sended(data)
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.
#
(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.
#
(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.
#
(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.
#
(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.
#
(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.
#
(void)
model_sended(data)