##// END OF EJS Templates
Reverse hscrollbar min-height hack on OS X...
Reverse hscrollbar min-height hack on OS X OS X has optional behavior to only draw scrollbars during scroll, which causes problems for CodeMirror's scrollbars. CodeMirror's solution is to set a minimum size for their scrollbars, which is always present. The trade is that the container overlays most of the last line, swallowing click events when there is scrolling to do, even when no scrollbar is visible. This reverses the trade, recovering the click events at the expense of never showing the horizontal scrollbar on OS X when this option is enabled.

File last commit:

r18831:7cf8d4d1 merge
r20298:2907e856
Show More
handlers.py
28 lines | 861 B | text/x-python | PythonLexer
Scott Sanderson
BUG: Set file encoding for IPython.html.terminal.handlers.
r18534 #encoding: utf-8
Thomas Kluyver
Basic infrastructure for terminal page
r18480 """Tornado handlers for the terminal emulator."""
# Copyright (c) IPython Development Team.
# Distributed under the terms of the Modified BSD License.
Thomas Kluyver
Compatibility fix for Tornado 3.x
r18494 import tornado
Thomas Kluyver
Basic infrastructure for terminal page
r18480 from tornado import web
Thomas Kluyver
Terminal basically working...
r18481 import terminado
Thomas Kluyver
Basic infrastructure for terminal page
r18480 from ..base.handlers import IPythonHandler
class TerminalHandler(IPythonHandler):
Thomas Kluyver
Multiple terminals and conditional initialisation
r18482 """Render the terminal interface."""
Thomas Kluyver
Basic infrastructure for terminal page
r18480 @web.authenticated
Thomas Kluyver
Multiple terminals and conditional initialisation
r18482 def get(self, term_name):
self.write(self.render_template('terminal.html',
ws_path="terminals/websocket/%s" % term_name))
Thomas Kluyver
Basic infrastructure for terminal page
r18480
Thomas Kluyver
Add authentication for terminal websockets
r18484 class TermSocket(terminado.TermSocket, IPythonHandler):
def get(self, *args, **kwargs):
if not self.get_current_user():
raise web.HTTPError(403)
Min RK
bump minimum tornado version to 4.0...
r18739 return super(TermSocket, self).get(*args, **kwargs)
Thomas Kluyver
Fix terminals with Tornado 3...
r18546
def clear_cookie(self, *args, **kwargs):
"""meaningless for websockets"""
pass
Thomas Kluyver
Compatibility fix for Tornado 3.x
r18494