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

« back to all changes in this revision

Viewing changes to ivle/webapp/tutorial/media/tutorial.js

tutorial/media/tutorial.js: Now sets the shown/hidden properties of the
    "previous attempts" elements after the request returns, not before.

Show diffs side-by-side

added added

removed removed

Lines of Context:
485
485
    var dropdown = attempthistory.getElementsByTagName("select")[0];
486
486
    var textarea = attempthistory.getElementsByTagName("textarea")[0];
487
487
 
488
 
    /* Activate the "open" state, and clear the dropdown box */
489
 
    openbutton.setAttribute("style", "display: none");
490
 
    openarea.setAttribute("style", "display: auto");
491
 
    textarea.setAttribute("style", "display: none");
 
488
    /* Clear the dropdown box */
492
489
    dom_removechildren(dropdown);
493
490
    var pleasewait = document.createElement("option");
494
491
    pleasewait.appendChild(document.createTextNode("Retrieving past attempts..."));
535
532
                }
536
533
                dropdown.appendChild(opt);
537
534
            }
 
535
 
 
536
            /* Display the page elements */
 
537
            openbutton.setAttribute("style", "display: none");
 
538
            openarea.setAttribute("style", "display: auto");
 
539
            textarea.setAttribute("style", "display: none");
538
540
        }
539
541
    attempts_path = "api/subjects/" + subject + "/+worksheets/" + worksheet 
540
542
        + "/" + filename + '/+attempts/' + username;