2 //JSAN.use('jqueryui');
4 function isLoggedIn() {
9 url: '/user/logged_in',
11 success: function(response) {
13 alert(response.error);
16 //alert("LOGGED IN USER: "+response.user_id);
17 user_id = response.user_id;
20 error: function(response) {
21 alert("An error occurred. "+response);
30 function getUserRoles() {
35 url: '/user/get_roles',
37 success: function(response) {
39 alert(response.error);
42 //alert("LOGGED IN USER ROLES: "+response.roles);
43 roles = response.roles;
46 error: function(response) {
47 alert("An error occurred. "+response);
67 function setUpLogin() {
69 jQuery('#working').dialog( {
78 jQuery('#login_window').dialog( {
91 jQuery('#login_window').dialog("close");