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

« back to all changes in this revision

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

  • Committer: stevenbird
  • Date: 2008-02-16 01:18:46 UTC
  • Revision ID: svn-v3-trunk0:2b9c9e99-6f39-0410-b283-7f802c844ae2:trunk:481
reverted change that added a command-line flag to specify that an account should be enabled as this bypasses creating the jail

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
 * activate their account).
25
25
 */
26
26
 
 
27
/* The user must send this declaration message to ensure they acknowledge the
 
28
 * TOS.
 
29
 * (This is the exact same string as in userservice).
 
30
 */
 
31
USER_DECLARATION = {"declaration":
 
32
                        "I accept the IVLE Terms of Service"};
 
33
 
27
34
/** Creates a "dot dot dot" animation to indicate the client is waiting for a
28
35
 * response from the server.
29
36
 * This will keep animating forever.
56
63
     * We need to wait on this page for the server's response.
57
64
     */
58
65
    /* Start by clearing away these buttons. */
59
 
    tos_acceptbuttons = document.getElementById("tos_acceptbuttons");
 
66
    var tos_acceptbuttons = document.getElementById("tos_acceptbuttons");
60
67
    dom_removechildren(tos_acceptbuttons);
61
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
     */
62
72
    tos_acceptbuttons.appendChild(dom_make_text_elem("p",
63
73
        "IVLE is now setting up your environment. Please wait..."));
64
74
    tos_acceptbuttons.appendChild(make_dots_anim());
 
75
    /* Make the Ajax request */
 
76
    var xhr = ajax_call("userservice", "activate_me", USER_DECLARATION,
 
77
        "POST")
 
78
    handle_accept_response(xhr)
 
79
}
 
80
 
 
81
function handle_accept_response(xhr)
 
82
{
 
83
    /* TEMP */
 
84
    var tos_acceptbuttons = document.getElementById("tos_acceptbuttons");
 
85
    dom_removechildren(tos_acceptbuttons);
 
86
    /* Refresh the page; as the user is now (apparently) logged in */
65
87
}
66
88
 
67
89
function decline_license()