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

« back to all changes in this revision

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

  • Committer: dcoles
  • Date: 2008-03-04 11:38:02 UTC
  • Revision ID: svn-v3-trunk0:2b9c9e99-6f39-0410-b283-7f802c844ae2:trunk:642
makeuser.py: Needs to import random

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
 
     */
72
69
    tos_acceptbuttons.appendChild(dom_make_text_elem("p",
73
70
        "IVLE is now setting up your environment. Please wait..."));
74
71
    tos_acceptbuttons.appendChild(make_dots_anim());
75
72
    /* Make the Ajax request */
76
 
    var xhr = ajax_call("userservice", "activate_me", USER_DECLARATION,
77
 
        "POST")
78
 
    handle_accept_response(xhr)
 
73
    ajax_call(handle_accept_response, "userservice", "activate_me",
 
74
        USER_DECLARATION, "POST")
79
75
}
80
76
 
81
77
function handle_accept_response(xhr)
84
80
    var tos_acceptbuttons = document.getElementById("tos_acceptbuttons");
85
81
    dom_removechildren(tos_acceptbuttons);
86
82
    /* Refresh the page; as the user is now (apparently) logged in */
87
 
    window.location.reload()
 
83
    window.location.href = window.location.href;
88
84
}
89
85
 
90
86
function decline_license()