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

« back to all changes in this revision

Viewing changes to ivle/webapp/console/__init__.py

Merged from new-dispatch branch.
This branch is now a child of new-dispatch (until that branch is merged with
    trunk).

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
from ivle.webapp.base.plugins import ViewPlugin, OverlayPlugin, MediaPlugin
 
2
from ivle.webapp.console.service import ConsoleServiceRESTView
 
3
from ivle.webapp.console.overlay import ConsoleOverlay
 
4
from ivle.webapp.base.xhtml import XHTMLView
 
5
 
 
6
 
 
7
class ConsoleView(XHTMLView):
 
8
    appname = 'console'
 
9
 
 
10
    plugin_scripts = {'ivle.webapp.console': ['console.js']}
 
11
    plugin_styles  = {'ivle.webapp.console': ['console.css']}
 
12
    plugin_scripts_init = ['console_init']
 
13
 
 
14
    # Don't load the console overlay when we already have a console.
 
15
    overlay_blacklist = [ConsoleOverlay]
 
16
 
 
17
    def populate(self, req, ctx):
 
18
        ctx['windowpane'] = False
 
19
 
 
20
 
 
21
class Plugin(ViewPlugin, OverlayPlugin, MediaPlugin):
 
22
    """
 
23
    The Plugin class for the console plugin.
 
24
    """
 
25
    urls = [
 
26
        ('console/service', ConsoleServiceRESTView),
 
27
        ('console', ConsoleView),
 
28
    ]
 
29
    overlays = [
 
30
        ConsoleOverlay,
 
31
    ]
 
32
    media = 'media'