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

« back to all changes in this revision

Viewing changes to www/media/console/console.js

  • Committer: mattgiuca
  • Date: 2008-02-01 01:39:24 UTC
  • Revision ID: svn-v3-trunk0:2b9c9e99-6f39-0410-b283-7f802c844ae2:trunk:362
console: Automatically focus input box when starting console app, or when
maximizing console pane. Fixed bug where JS errors occur when there is no
console present (now ignores).

Show diffs side-by-side

added added

removed removed

Lines of Context:
68
68
{
69
69
    /* Set up the console as a floating pane */
70
70
    console_body = document.getElementById("console_body");
 
71
    /* If there is no console body, don't worry.
 
72
     * (This lets us import console.js even on pages without a console box */
 
73
    if (console_body == null) return;
71
74
    console_filler = document.getElementById("console_filler");
72
75
    if (windowpane)
73
76
    {
97
100
    if (!windowpane_mode) return;
98
101
    console_body.setAttribute("class", "windowpane maximal");
99
102
    console_filler.setAttribute("class", "windowpane maximal");
 
103
    /* Focus the input box by default */
 
104
    document.getElementById("console_inputText").focus()
100
105
}
101
106
 
102
107
/* current_text is the string currently on the command line.