Jonathan Frederic
ba0a805404
Merge pull request #6226 from jasongrout/css-top-default
...
Remove $el_to_style from the widget javascript code; '' now defaults to this.$el
12 years ago
MinRK
09c1354ea7
avoid unregistering widget model twice
...
widgets are registered when the comm is created;
closing unregisters them. Calling `close` a second time
should be a no-op.
12 years ago
Sylvain Corlay
1bbc915ac0
setting _comm to None
12 years ago
Sylvain Corlay
ea52ef8704
del Widget.widgets[seld.model_id] in close rather than in __del__
12 years ago
Jason Grout
eccc20ce1a
Remove $el_to_style from the widget javascript code; '' now defaults to this.$el
...
This seems to make it easiest to select the top-level element. An alternative is to use special syntax for top-level elements, like in https://github.com/ipython/ipython/pull/6185
This will be followed up by other fixes that let the user set specific common properties of different elements.
This change also adds the .addBack() call, which means that nonempty selectors now apply to this.$el and its descendants, rather than just the descendants of this.$el.
12 years ago
sylvain.corlay
a9c34b679b
decoupling the comm lifetime from the widget lifetime
12 years ago
Jason Grout
8fb0ae4d36
Change serialize/deserialize to to_json/from_json
12 years ago
Jason Grout
97141c6bca
Simplify the code for picking json serialization functions to expose the logic better
12 years ago
Jason Grout
06084e996c
Change serialization terminology to serialize/deserialize
12 years ago
Jason Grout
eed0715a09
Prepend a sentinel value to model ids to distinguish them from normal UUIDs (from Sylvain Corlay).
12 years ago
Jason Grout
0c72fddaba
Update widget serializer/unserializer to allow custom serialization on a trait-by-trait basis.
...
Serializers/unserializers are given as the trait metadata keys `to_json` and `from_json`.
12 years ago
Jonathan Frederic
74483d77da
Change css dict to a list,
...
even though this introduces O(N) complexity, it fixes a bug
where path dependent css traits could be executed out of order,
making it impossible to actually set the traits from the back-end.
12 years ago
Thomas Kluyver
95dc697e3b
Remove Widget.closed attribute
...
Closes gh-5282
12 years ago
Jonathan Frederic
dedbc3b0e1
Changed children list to CTuple.
...
Also removed some unused refences in the widget code
and added support for tuples in the pack/unpack code.
12 years ago
Jonathan Frederic
0eebd9e05b
Added msg_throttle sync=True widget traitlet
12 years ago
MinRK
ddc22152ea
show traceback in widget handlers
...
rather than logging
closes #5064
12 years ago
Brian E. Granger
2b7310f794
Merge pull request #4933 from jdfreder/widget-model-name
...
Small Widget inconsistency fixes
12 years ago
Thomas Kluyver
c633256fc9
Fix some formatting in widget docstrings
12 years ago
Jonathan Frederic
865c7330a9
s/model_name/_model_name
12 years ago
MinRK
36db60eacb
review pass on Python-side of widgets
...
- remove variable signature complexity
- use a few more traitlets as appropriate
12 years ago
Jonathan Frederic
e793d022b5
Callback dispatcher return callback value.
...
Also import it with the widgets namespace so it can be used elsewhere.
12 years ago
Jonathan Frederic
288b8a0ced
s/view_name/_view_name
12 years ago
Jonathan Frederic
629d65da89
Fixed context errors and a couple of typos to get the tests working again
12 years ago
Jonathan Frederic
d7b86104b8
Fixed typo - else -> elif
12 years ago
Jonathan Frederic
e823d386ab
Fixed name conflict with _property_lock
12 years ago
Jonathan Frederic
077bd5c6ca
Added new CallbackDispatcher class
12 years ago
Jonathan Frederic
611614b6eb
Document in widget packing that vaues must be JSON-able.
12 years ago
Jonathan Frederic
cf05ef015a
ict comprehension and list comprehension in pack/unpack widgets
12 years ago
Jonathan Frederic
cb6094281c
s/custom_content/content
12 years ago
Jonathan Frederic
5fe860ed26
Added doc strings to properties in widget.py
12 years ago
Jonathan Frederic
1689eed2f6
Reorganized attrs in widget.py
12 years ago
Jonathan Frederic
d317532a38
Halign dict colons
12 years ago
Jonathan Frederic
bfdebf9632
More PEP8 changes
12 years ago
Jonathan Frederic
4017c7b27a
Fixed *almost* all of the test-detected bugs
12 years ago
Jonathan Frederic
c085593e2a
More fixes
12 years ago
Jonathan Frederic
d694666e66
A lot of bug fixes...
...
Related to 1-to-1 changes
12 years ago
Jonathan Frederic
c1c7bb7563
Everyone uses one model
12 years ago
Jonathan Frederic
cfe8a07337
Added sync= attr to DOMWidget
12 years ago
Jonathan Frederic
b4a83b6044
sync=True isntead of a keys list
12 years ago
Jonathan Frederic
00650fd64a
Dev meeting Jan 2014, widget review day 2
12 years ago
Jonathan Frederic
d3ffd25107
Dev meeting widget review day 1
12 years ago
Paul Ivanov
897d51a567
fix typos
12 years ago
Paul Ivanov
95e99c0c61
remove unused imports
12 years ago
Jonathan Frederic
d103c682c5
Many checks off the todo list, test fixes
12 years ago
Jonathan Frederic
0f715170b3
Add a comment that explains the notion of the default element
...
to be styled in set_css's' doc string.
12 years ago
Jonathan Frederic
be268dcf98
Implement a context manager as a property locking mechanism in Widget.
12 years ago
Jonathan Frederic
261e92de74
re-order handle custom msg and handle recieve state
12 years ago
Jonathan Frederic
15dabce113
send_state only once for dict signature of set_css
12 years ago
Jonathan Frederic
6c11760a89
Fixed comments for optional kwargs so they are redundant.
12 years ago
Jonathan Frederic
670f4881ec
remove 3rd callback type from on_displayed
12 years ago
Jonathan Frederic
7e6c8e4f1d
Remove view_name from display
12 years ago
Jonathan Frederic
463bcf85ee
Fixed _send so it can open a comm if needed.
...
It no longer returns anything.
12 years ago
Jonathan Frederic
85b5adff58
Remove first three lines of repr widgets
12 years ago
Jonathan Frederic
4e19dd7933
s/_handle_widget_constructed/_call_widget_constructed
12 years ago
Jonathan Frederic
39aaf7bf88
s/default_view_name/view_name
12 years ago
Jonathan Frederic
21a14e11a4
s/Widget/DOMWidget s/BaseWidget/Widget
12 years ago
Jonathan Frederic
696a6e4c28
add/remove_class now can accept a list of classes
12 years ago
Jonathan Frederic
2600913067
Removed ViewWidget
12 years ago
Jason Grout
ce98452180
Get rid of keys magic; make the keys very explicit
12 years ago
Jason Grout
f0a4b9ea30
Make the widget keys property traverse the superclasses and accumulate the _keys attributes.
...
This caches the result, overwriting the property.
12 years ago
Jonathan Frederic
7c3b21d239
Fixed typo in model_id property
12 years ago
Jonathan Frederic
57f3057ca5
Moved view widget into widget.py
12 years ago
Jonathan Frederic
46e88dc205
Fixed indent of line 450
...
... caused Travis to get mad
12 years ago
Jonathan Frederic
a2235efbea
Further indentation cleanup
12 years ago
Jonathan Frederic
35a536f3b8
Re-decoupled comm_id from widget models
12 years ago
Jonathan Frederic
1b4e2ad6fe
Added ViewWidget
12 years ago
Jason Grout
b41f77e635
Fix the python side of the add/remove class functions to send custom messages
12 years ago
Jason Grout
747b219771
Move some Widget class references to BaseWidget
12 years ago
Jason Grout
07ffef8392
Make sure containers transmit the children; take care of case where children is possibly empty.
12 years ago
Jason Grout
18beaff887
Remove unused code and debugging statements
12 years ago
Jason Grout
72f7d2fe09
Remove the automatic _children_attr and _children_lists_attr.
...
When serializing, any Widget object is encoded as its comm_id. The view should know how to deal with the attribute, and should know that the attribute is a comm_id.
12 years ago
Jason Grout
ad1e23bfc2
Intermediate changes to javascript side of backbone widgets
12 years ago
Jason Grout
518cb4c647
Separate the display from the models on the python side, creating a BaseWidget class.
...
Conflicts:
IPython/html/widgets/widget.py
12 years ago
Jonathan Frederic
2df05bc5b8
Display handler now supports full kwargs
12 years ago
Jonathan Frederic
996d133710
Remove redundent _handle_close method
12 years ago
Jonathan Frederic
857ae831fb
Decoupled Python Widget from Comm
...
Fixed conflicts:
IPython/html/widgets/widget.py
12 years ago
Jonathan Frederic
f2fefe20ff
Added event for widget construction
12 years ago
Jonathan Frederic
ea27ae599b
Added parent parameter to on_display callback
12 years ago
Jonathan Frederic
8e1c52382c
Added `method` property to messages from the front-end
12 years ago
Jonathan Frederic
0f34affc35
Dont send add and remove class calls if no comm exists
12 years ago
Jonathan Frederic
10002f5a81
Changed button to use custom messages instead of state to communicate events.
12 years ago
Jonathan Frederic
c299022cc7
Changed add_class and remove_class to use messages instead of stateful communication
12 years ago
Jonathan Frederic
9019b639d1
Fixed a bug that didn't allow callbacks to set a property
...
on the widget that triggered the callback.
12 years ago
Jonathan Frederic
c0ff518107
Added support for custom widget msgs
12 years ago
Jonathan Frederic
742ad511f6
Added check on widget close to make sure comm isn't already none.
12 years ago
Jonathan Frederic
1f39592bb1
Added missing types import
12 years ago
Jonathan Frederic
8502b2c182
Remove init_widget_js, use require.js for everything
...
Updated examples
Fixed bug with message throttling
12 years ago
Jonathan Frederic
08b1d08fb6
Fix: added inspect import to widget.py
12 years ago
Jonathan Frederic
a67f2ec472
Fixed doc string comments, removed extra space
12 years ago
Jonathan Frederic
35fc3af84f
Added on_display callback
12 years ago
Jonathan Frederic
12b02b3e49
Use baseProjectUrl for widget import path
12 years ago
Jonathan Frederic
6834224332
Updated set_css so it can handle a dictionary of keys and values.
12 years ago
Jonathan Frederic
20c97e0f87
Use relative paths for widget js jquery imports
12 years ago
Jonathan Frederic
8fba5d2f07
Added add_class and remove_class methods.
12 years ago
Jonathan Frederic
048ba656d4
Remove text repr of js includes.
12 years ago
Jonathan Frederic
810ea87e5b
Added `visible` property to all widgets
12 years ago
Jonathan Frederic
82dd891483
Allow parent to be set after construction...
...
But still must be set before display call
12 years ago
Jonathan Frederic
6dd1bce589
Added ability to title multicontainer pages before multicontainer display()
12 years ago
Jonathan Frederic
a2294581ea
Actual absolute paths...
12 years ago
Jonathan Frederic
5871471c1f
Absolute paths
12 years ago