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

« back to all changes in this revision

Viewing changes to ivle/webapp/filesystem/browser/__init__.py

  • Committer: William Grant
  • Date: 2010-07-28 04:12:08 UTC
  • mfrom: (1790.1.8 codemirror-srsly)
  • Revision ID: grantw@unimelb.edu.au-20100728041208-mciagtog1785oje4
Move from CodePress to CodeMirror. It's now an external dependency, too, so you'll need to install it yourself.

Show diffs side-by-side

added added

removed removed

Lines of Context:
30
30
from ivle.webapp.base.xhtml import XHTMLView
31
31
from ivle.webapp.errors import NotFound
32
32
from ivle.webapp.filesystem import make_path_breadcrumbs
 
33
from ivle.webapp.media import media_url
33
34
from ivle.webapp import ApplicationRoot
34
35
 
35
36
import os.path
64
65
        self.plugin_scripts[Plugin] = ['browser.js',
65
66
                                       'listing.js',
66
67
                                       'editor.js',
67
 
                                       'specialhome.js',
68
 
                                       'codepress/codepress.js']
 
68
                                       'specialhome.js']
 
69
        self.plugin_scripts['+external/codemirror'] = ['js/codemirror.js']
69
70
        self.scripts_init = ["browser_init"]
70
71
 
71
72
        # Start writing data
95
96
                                                               self.path))
96
97
        ctx['filename'] = cgi.escape(self.path)
97
98
 
 
99
        # Media URL for CodeMirror
 
100
        ctx['codemirrorpath'] = media_url(req, '+external/codemirror', '')
 
101
 
98
102
    @property
99
103
    def path(self):
100
104
        return os.path.join(*self.subpath) if self.subpath else ''