~azzar1/unity/add-show-desktop-key

« back to all changes in this revision

Viewing changes to www/media/common/tos.js

  • Committer: mattgiuca
  • Date: 2008-02-19 06:10:53 UTC
  • Revision ID: svn-v3-trunk0:2b9c9e99-6f39-0410-b283-7f802c844ae2:trunk:503
user.py: Added acct_expired and pass_expired methods.
login.py: Removed has_expired function (now we put it inside the class)
    and called those methods instead.

Show diffs side-by-side

added added

removed removed

Lines of Context:
66
66
    var tos_acceptbuttons = document.getElementById("tos_acceptbuttons");
67
67
    dom_removechildren(tos_acceptbuttons);
68
68
    /* Print a "please wait" message */
 
69
    /* XXX: The current implementation of Ajax is SYNCHRONOUS.
 
70
     * That means we return right away; the animation won't work properly.
 
71
     */
69
72
    tos_acceptbuttons.appendChild(dom_make_text_elem("p",
70
73
        "IVLE is now setting up your environment. Please wait..."));
71
74
    tos_acceptbuttons.appendChild(make_dots_anim());
72
75
    /* Make the Ajax request */
73
 
    ajax_call(handle_accept_response, "userservice", "activate_me",
74
 
        USER_DECLARATION, "POST")
 
76
    var xhr = ajax_call("userservice", "activate_me", USER_DECLARATION,
 
77
        "POST")
 
78
    handle_accept_response(xhr)
75
79
}
76
80
 
77
81
function handle_accept_response(xhr)
80
84
    var tos_acceptbuttons = document.getElementById("tos_acceptbuttons");
81
85
    dom_removechildren(tos_acceptbuttons);
82
86
    /* Refresh the page; as the user is now (apparently) logged in */
83
 
    window.location.href = window.location.href;
 
87
    window.location.reload()
84
88
}
85
89
 
86
90
function decline_license()