mirror of
https://github.com/jupyter/notebook.git
synced 2024-12-27 04:20:22 +08:00
990303f3eb
this model does not work with the comm/widget communication model. We need to be able to load the dependencies before we send the show() message to the widget manager. Otherwise a race condition will exist where the widget manager may recieve the show message before the dependencies have been loaded (happened almost every time).
15 lines
473 B
Python
15 lines
473 B
Python
import os
|
|
|
|
from base import Widget
|
|
from IPython.utils.traitlets import Unicode, Bool, List
|
|
from IPython.utils.javascript import display_all_js
|
|
|
|
class StringWidget(Widget):
|
|
target_name = Unicode('StringWidgetModel')
|
|
default_view_name = Unicode('TextboxView')
|
|
js_requirements = List(["static/notebook/js/widgets/string.js"])
|
|
_keys = ['value', 'row_count', 'disabled']
|
|
|
|
value = Unicode()
|
|
disabled = Bool(False) # Enable or disable user changes
|
|
|