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

« back to all changes in this revision

Viewing changes to www/plugins/console/__init__.py

  • Committer: mattgiuca
  • Date: 2008-01-30 05:09:03 UTC
  • Revision ID: svn-v3-trunk0:2b9c9e99-6f39-0410-b283-7f802c844ae2:trunk:331
Console: Configured console to display properly as a "floating" window in the
tutorial page.
The console now has two "modes" (normal mode and "windowpane" mode). This is
switched by the JavaScript, and enables different CSS styling (and will
further enable different behaviour).

Styled the console (black). In windowpane mode, there is an additional div at
the bottom which fills up the space, and the console is floated on top of it.
(With position:fixed). This lets it appear at the bottom of the screen no
matter where the user scrolls.

Added console_app.css and console_app.js, which are necessary for things
specific to the "Console" application but not all instances of the console.

Changed the styling and layout of tutorial HTML/CSS to accomodate the console
(it needed to go outside the padded box).

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
# It exposes two functions: "present" and "insert_scripts_styles".
24
24
# These should both be called at the appropriate time by the implementing
25
25
# application. See docs on these functions for details.
 
26
# Applications also need to call console_init in JavaScript from their own
 
27
# onload events.
26
28
 
27
29
from common import util
28
30
 
45
47
    """Writes the HTML for this plugin into a request stream.
46
48
    May utilise other properties of the Request object in generating the HTML.
47
49
    """
48
 
    req.write("""<div id="console_body">
 
50
    req.write("""<div id="console_body"><div id="console_body2">
49
51
  <div id="console_output">
50
52
  </div>
51
53
  <div id="console_input">
55
57
   <input id="console_inputText"
56
58
     type="text" size="80" onkeypress="catch_input(event.keyCode)" />
57
59
  </div>
58
 
</div>
 
60
</div></div>
 
61
<!-- Console filler, provides extra vertical space to stop the console
 
62
     covering over the bottom content -->
 
63
<div id="console_filler"></div>
59
64
""")
60
65
 
61
66
def _append_if_absent(list, *values):