/usr/lib/python2.7/dist-packages/sagenb/notebook/jquery.py is in python-sagenb 1.0.1+ds1-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | # -*- coding: utf-8 -*
from . import interact
def javascript(s):
print('<html><script>%s</script></html>' % s)
def cell_id():
return interact.SAGE_CELL_ID
def draggable(option=''):
"""
INPUT:
option -- string
"" (default) -- Creates new draggables on the current cell.
"enable" -- Enable the draggable functionality.
"disable" -- Temporarily disable the draggable functionality.
"""
s = '$("#cell_outer_%s").draggable("%s")' % (cell_id(), option)
javascript(s)
def resizable():
s = '$("#cell_outer_%s").resizable()' % cell_id()
javascript(s)
|