Commit Graph

158 Commits

Author SHA1 Message Date
MinRK
5823b875eb don't allow empty selection in selection widgets
raises KeyError on failed lookup (in both directions)
2014-02-04 10:38:26 -08:00
MinRK
ca0afa1d8b value_names is read-only 2014-02-03 17:15:06 -08:00
MinRK
3e1f2e22f8 Make SelectionWidget.values a dict
rename 'labels' and '_value' to 'value_names' and 'value_name'.

To specify a mapping of value names and values, use a dict.
If you specify `values=[list]`, then an OrderedDict will be used.

Assignment after construction only supports a dict.
2014-02-03 17:15:06 -08:00
Brian E. Granger
2b7310f794 Merge pull request #4933 from jdfreder/widget-model-name
Small Widget inconsistency fixes
2014-02-03 12:38:03 -08:00
Brian E. Granger
cef93c8cfb Adding initial version of readout to sliders. 2014-01-31 20:56:12 -08:00
Thomas Kluyver
c633256fc9 Fix some formatting in widget docstrings 2014-01-29 14:55:12 -08:00
Jonathan Frederic
865c7330a9 s/model_name/_model_name 2014-01-29 12:37:30 -08:00
Jonathan Frederic
75b148d40b Renamed widgets...
TextWidget, TextareaWidget, CheckboxWidget, and SelectWidget
2014-01-28 12:51:24 -08:00
MinRK
36db60eacb review pass on Python-side of widgets
- remove variable signature complexity
- use a few more traitlets as appropriate
2014-01-26 15:46:06 -08:00
Jonathan Frederic
e793d022b5 Callback dispatcher return callback value.
Also import it with the widgets namespace so it can be used elsewhere.
2014-01-23 10:52:33 -08:00
Jonathan Frederic
00b39af9cf Fixed type in container
._children was not being set...  Instead the value was being returned (useless).
2014-01-23 09:12:05 -08:00
Jonathan Frederic
91e82218a8 Changed selection widget API to use labels list
for mapping custom str reprs to items in the selection list
2014-01-22 17:15:10 -08:00
Jonathan Frederic
288b8a0ced s/view_name/_view_name 2014-01-22 16:21:00 -08:00
Jonathan Frederic
2d13d05e9c Replace O(N^2) algorithm with a faster one. 2014-01-22 16:14:20 -08:00
Jonathan Frederic
9e643f5692 Support multiple types in selection widget. 2014-01-22 15:53:58 -08:00
Jonathan Frederic
629d65da89 Fixed context errors and a couple of typos to get the tests working again 2014-01-22 11:16:50 -08:00
Jonathan Frederic
d7b86104b8 Fixed typo - else -> elif 2014-01-21 17:14:34 -08:00
Jonathan Frederic
046280b51a s/ModalView/PopupView 2014-01-21 17:09:49 -08:00
Jonathan Frederic
e323f64e6d Create base widget classes 2014-01-21 16:44:57 -08:00
Jonathan Frederic
b432b4840f Use CUnicode for width and height in ImageWidget 2014-01-21 16:33:49 -08:00
Jonathan Frederic
e823d386ab Fixed name conflict with _property_lock 2014-01-21 15:18:49 -08:00
Jonathan Frederic
077bd5c6ca Added new CallbackDispatcher class 2014-01-21 15:14:27 -08:00
Jonathan Frederic
611614b6eb Document in widget packing that vaues must be JSON-able. 2014-01-21 14:25:08 -08:00
Jonathan Frederic
cf05ef015a ict comprehension and list comprehension in pack/unpack widgets 2014-01-21 14:23:44 -08:00
Jonathan Frederic
cb6094281c s/custom_content/content 2014-01-21 14:17:57 -08:00
Jonathan Frederic
5fe860ed26 Added doc strings to properties in widget.py 2014-01-21 14:16:24 -08:00
Jonathan Frederic
1689eed2f6 Reorganized attrs in widget.py 2014-01-21 14:13:33 -08:00
Jonathan Frederic
d317532a38 Halign dict colons 2014-01-16 17:17:00 +00:00
Jonathan Frederic
7387f886c6 containers and selectioncontainers now only allow one of any single child 2014-01-16 14:48:56 +00:00
Jonathan Frederic
bfdebf9632 More PEP8 changes 2014-01-16 14:20:04 +00:00
Jonathan Frederic
ff39989b8b s/Int/CInt s/Float/CFloat 2014-01-16 11:42:38 +00:00
Jonathan Frederic
74185a68e7 Got containers and mutlicontainers working! Yay 2014-01-16 10:57:19 +00:00
Jonathan Frederic
4017c7b27a Fixed *almost* all of the test-detected bugs 2014-01-16 10:57:19 +00:00
Jonathan Frederic
c085593e2a More fixes 2014-01-16 10:57:18 +00:00
Jonathan Frederic
d694666e66 A lot of bug fixes...
Related to 1-to-1 changes
2014-01-16 10:57:18 +00:00
Jonathan Frederic
047a90538f 1-to-1 widget / view mapping 2014-01-16 10:57:18 +00:00
Jonathan Frederic
c1c7bb7563 Everyone uses one model 2014-01-16 10:57:18 +00:00
Jonathan Frederic
b16171ac76 Added sync=True to all view name attrs 2014-01-16 10:57:18 +00:00
Jonathan Frederic
cfe8a07337 Added sync= attr to DOMWidget 2014-01-16 10:57:18 +00:00
Jonathan Frederic
b4a83b6044 sync=True isntead of a keys list 2014-01-16 10:57:18 +00:00
Jonathan Frederic
00650fd64a Dev meeting Jan 2014, widget review day 2 2014-01-16 10:57:18 +00:00
Jonathan Frederic
d3ffd25107 Dev meeting widget review day 1 2014-01-16 10:57:18 +00:00
Paul Ivanov
897d51a567 fix typos 2014-01-16 10:57:17 +00:00
Paul Ivanov
95e99c0c61 remove unused imports 2014-01-16 10:57:17 +00:00
Jonathan Frederic
d103c682c5 Many checks off the todo list, test fixes 2014-01-16 10:57:17 +00:00
Jonathan Frederic
0f715170b3 Add a comment that explains the notion of the default element
to be styled in set_css's' doc string.
2014-01-16 10:57:17 +00:00
Jonathan Frederic
be268dcf98 Implement a context manager as a property locking mechanism in Widget. 2014-01-16 10:57:17 +00:00
Jonathan Frederic
70c6a295d0 Finished renaming Multicontainer to SelectionContainer 2014-01-16 10:57:17 +00:00
Jonathan Frederic
a528610e07 renamed: ../static/notebook/js/widgets/widget_multicontainer.js -> ../static/notebook/js/widgets/widget_selectioncontainer.js
renamed:    widget_multicontainer.py -> widget_selectioncontainer.py
2014-01-16 10:57:17 +00:00
Jonathan Frederic
c62b496b0e s/image_format/format 2014-01-16 10:57:17 +00:00