Commit Graph

225 Commits

Author SHA1 Message Date
Jonathan Frederic
b16b2e8749 Make display also pend on set_state. 2014-11-15 08:48:34 -08:00
Jason Grout
a4331a93cc Fix some this vs. that errors, as well as returning some promises to wait for fulfillment 2014-11-15 08:48:34 -08:00
Jason Grout
8e769a012f Load the utils module 2014-11-15 08:48:34 -08:00
Jason Grout
1b9948d178 Add some error handling for creating views and models 2014-11-15 08:48:33 -08:00
Jason Grout
686e73dfdf More simplifications due to promises 2014-11-15 08:48:33 -08:00
Jason Grout
4412c12929 Simplify code by using Promises in a better way; try_load -> load 2014-11-15 08:48:33 -08:00
Jonathan Frederic
c41dcb35e9 Proxy console.error calls 2014-11-15 08:48:33 -08:00
Jonathan Frederic
5a745be138 Add Promise support to models. 2014-11-15 08:48:33 -08:00
Jonathan Frederic
78c0bbdb4d Fix view rendering order. 2014-11-15 08:48:33 -08:00
Jonathan Frederic
4beda5d0fb Initial stab at adding promises to the widget framework. 2014-11-15 08:48:33 -08:00
Jason Grout
ff680583c1 initial take on promises 2014-11-15 08:48:33 -08:00
Jonathan Frederic
ba9e7365be Fix #6385 2014-11-14 17:04:52 -08:00
Min RK
f569ccc58f Merge pull request #6920 from SylvainCorlay/serialize_date
Dates and Strings are JavaScript objects, and _pack_models behaves incorrectly in these cases.
2014-11-13 12:26:02 -08:00
Sylvain Corlay
7ac82931ca Tooltip on toggle button 2014-11-13 19:04:06 +00:00
Sylvain Corlay
54d6d18baf Correct height for checkbox widget 2014-11-13 17:46:19 +00:00
Sylvain Corlay
604d0bb666 A String is an object 2014-11-13 15:42:31 +00:00
Sylvain Corlay
4b6c753f3f Dates are JavaScript objects, and _pack_models returns an empty object 2014-11-13 15:37:56 +00:00
Jonathan Frederic
ba77877c18 Rebase fixes 2014-10-28 17:55:36 -07:00
Jonathan Frederic
db10ae8f2d s/target_name/widget_class 2014-10-28 16:49:46 -07:00
Jonathan Frederic
3cb5ac6fbb Clarified API for the create_model function,
Also added a test!
2014-10-28 16:49:46 -07:00
Jonathan Frederic
a68df8a8b1 Address @minrk 's review comments. 2014-10-28 16:49:46 -07:00
Jonathan Frederic
fbca0bfa3f Rebase fixes. 2014-10-28 16:49:45 -07:00
Jonathan Frederic
5a655b24da Fixed typo. 2014-10-28 16:49:45 -07:00
Jonathan Frederic
2b5ebb9e8f Make Python push initial state.
Also added initial state push callback.
2014-10-28 16:49:45 -07:00
Jonathan Frederic
e7ee9c12b3 Enable widget instanciation from front-end. 2014-10-28 16:44:02 -07:00
Thomas Kluyver
031530da42 Support specifying requirejs modules for widget models 2014-10-24 12:14:43 -07:00
Jonathan Frederic
79670e8afb Merge pull request #6494 from takluyver/widget-comm-require
Allow widget views to be loaded from require modules
2014-10-21 10:11:41 -07:00
Sylvain Corlay
43d08b0795 fix alignment 2014-10-10 23:19:31 -04:00
Min RK
60bfcf8c74 Merge pull request #6665 from jdfreder/travis_please_run_on_this
Separate widget model name from com target name.
2014-10-09 11:45:41 -07:00
Jonathan Frederic
4b968ece0b s/target_name/model_name 2014-10-09 10:55:46 -07:00
Matthias Bussonnier
65f41327c9 Merge pull request #6106 from chronitis/interact-slider-textedit
Allow text input on slider widgets
2014-10-09 11:09:47 +02:00
Jonathan Frederic
24096b0f45 Separate widget model name from com target name. 2014-10-08 21:31:00 -07:00
Jonathan Frederic
032300ea49 Merge pull request #6645 from jdfreder/css_order
Make sure DOMWidget _css is set after basic style traits
2014-10-07 15:22:05 -07:00
Thomas Kluyver
6163656f28 Merge pull request #6634 from minrk/select-contains
don't use contains in SelectWidget item_query
2014-10-07 15:20:25 -07:00
Jonathan Frederic
176529cce2 Make sure DOMWidget _css is set after basic style traits 2014-10-07 13:13:24 -07:00
Jonathan Frederic
60531c917f Merge pull request #6481 from jdfreder/intvalidatefix
Fix bug in bounded int/float logic.
2014-10-07 10:50:02 -07:00
MinRK
6740d0492e don't use contains in SelectWidget item_query
gives false positive matches when some values are substrings of others
2014-10-06 12:59:16 -07:00
Thomas Kluyver
825284bc6d Remove superfluous error checking 2014-10-06 11:36:59 -07:00
Thomas Kluyver
590ba19ac3 Clean up some JS code 2014-10-05 09:35:54 -07:00
Thomas Kluyver
1ff846520b Put callbacks for create_view and create_child_view in options
And add errback support
2014-10-05 09:35:54 -07:00
Thomas Kluyver
c4a9cf9020 Fix logic 2014-10-05 09:35:54 -07:00
Thomas Kluyver
09b10dcb86 Make changes suggested by @jdfreder 2014-10-05 09:35:54 -07:00
Thomas Kluyver
5953a3f874 Allow widget views to be loaded from require modules
This required refactoring things that create widget views to use
callbacks instead of return values.
2014-10-05 09:35:53 -07:00
Jason Grout
7700848737 Add semantic classes to top-level containers for single widgets
This makes it much easier to customize all widgets of a certain type using
CSS.  For example, to change just the IPython widget selects, a CSS
rule like .widget-select select {...} should work well.
2014-10-03 19:13:49 +00:00
Sylvain Corlay
8a384cd489 adding a tooltip in IPython buttons 2014-10-03 16:41:34 +00:00
Gordon Ball
48b6f53f51 Require base/js/keyboard and use keycode.enter 2014-10-01 15:37:23 +02:00
Jonathan Frederic
60bf0f5b2f s/apply_update/set_state 2014-09-30 16:02:02 -04:00
Jonathan Frederic
b5195e1b17 Merge pull request #6548 from SylvainCorlay/widget_views_by_id
Make WidgetModel.views be an object indexed by view id
2014-09-29 07:51:11 -04:00
sylvain.corlay
60925f0a1a hasOwnProperty 2014-09-28 23:40:27 -04:00
Sylvain Corlay
d8635fc1cc on_atomic_change -> on_some_change 2014-09-26 01:59:11 +00:00
Sylvain Corlay
b6a0f60d3f Make Widget.views be an object indexed by view id 2014-09-26 01:51:24 +00:00
Sylvain Corlay
a9fca81e95 Set default view to None and never display widget with no view 2014-09-24 23:10:41 -04:00
Jonathan Frederic
aec576a5f2 Fix infinite loop typo 2014-09-24 15:48:19 -07:00
Gordon Ball
3ec873b084 Change _parse_text_input to _parse_value and update float range regex 2014-09-24 15:56:01 +02:00
Gordon Ball
3011820cd3 Add support for parsing pairs of numbers for range sliders 2014-09-24 15:56:01 +02:00
Gordon Ball
67630b0886 Ignore the event object for handleTextChange 2014-09-24 15:56:01 +02:00
Gordon Ball
0f7fbc0781 Add keydown listener to commit changes on <enter> 2014-09-24 15:56:01 +02:00
Gordon Ball
0b45bacd0d Add support to the float slider 2014-09-24 15:56:01 +02:00
Gordon Ball
6a976cf2b6 Use contentEditable to allow modification via the the slider readout 2014-09-24 15:56:01 +02:00
Sylvain Corlay
fb336de4ed register bare views 2014-09-23 21:11:39 -04:00
Brian E. Granger
4ec1a3b41e Merge pull request #6235 from jdfreder/addclass
Remove add/remove_class and set/get_css.
2014-09-23 16:28:50 -07:00
Jonathan Frederic
9f3dfbc56c Fix slidercolor on widget construction 2014-09-23 16:15:13 -07:00
Jonathan Frederic
d4d554052e Address problems found in in-person review 2014-09-23 15:18:00 -07:00
Jonathan Frederic
a7e7f95ef1 Remove forgotten hreadout 2014-09-22 16:33:57 -07:00
Jonathan Frederic
02d7039a00 Cleaned up hbox and vbox widget div styles,
removed 5px margin
2014-09-22 16:23:26 -07:00
Jonathan Frederic
6637b768cc Merge pull request #6463 from SylvainCorlay/bulk_update
Bulk update of widget attributes
2014-09-22 13:49:16 -07:00
Sylvain Corlay
cd782c916d state_lock loop 2014-09-22 19:40:07 +00:00
Sylvain Corlay
769e7fa108 rename to on_atomic_change 2014-09-17 21:31:55 +00:00
Jonathan Frederic
591b2b3ad7 Tabs->Spaces 2014-09-16 10:41:44 -07:00
Jonathan Frederic
02e3a58030 s/fore_color/color
s/back_color/background_color
2014-09-16 10:17:59 -07:00
Jonathan Frederic
0acd8daf71 Merge pull request #6438 from SylvainCorlay/model_destroy_message
Destroy backbone model on comm:close
2014-09-16 09:47:49 -07:00
Sylvain Corlay
e809fcb545 stop listening 2014-09-16 14:31:26 +00:00
Sylvain Corlay
75cb63fba2 Adding a comment and renaming on_bulk_change to on_change 2014-09-15 22:38:29 +00:00
Sylvain Corlay
06747c1ada simplification of trigger destroy 2014-09-15 21:32:46 +00:00
Sylvain Corlay
222dc5fb3e Destroy backbone model on comm:close 2014-09-14 11:46:12 -04:00
sylvain.corlay
e77b21cb22 optimization of WidgetModel.apply_update 2014-09-13 20:13:08 -04:00
sylvain.corlay
6eea0c37aa Added on_bulk_change method in WidgetModel 2014-09-13 16:27:52 -04:00
weichm
06b2926a0a "event" is not defined error in Firefox
see http://stackoverflow.com/questions/20522887/referenceerror-event-is-not-defined-error-in-firefox
"WebKit follows IE's old behavior of using a global symbol for "event", but Firefox doesn't..."
2014-09-08 21:18:34 +02:00
Jonathan Frederic
cb9014e42c Fixed rebase bugs and other bugs. 2014-08-28 11:15:35 -07:00
Jonathan Frederic
fa1c6f93f1 Added bootstrap3 progress bar classes 2014-08-28 11:15:35 -07:00
Jonathan Frederic
9b4d19bad7 Added Bootstrap specific classes,
and fixed a few bugs here and there...
2014-08-28 11:15:35 -07:00
Jonathan Frederic
a0e70e350f Fix some bugs found by the widget examples,
add margin and padding base traits,
add overflow traits to box base.
2014-08-28 11:15:24 -07:00
Jonathan Frederic
42cc27e1f5 Finished style attributes. 2014-08-28 11:09:55 -07:00
Jonathan Frederic
fdcf263965 Partial implementation of styles 2014-08-28 11:09:55 -07:00
Jonathan Frederic
9af77a6374 Initial crack at using specific traits for styling. 2014-08-28 11:09:55 -07:00
Jonathan Frederic
f85a01041c Remove add/remove class methods,
Remove helper set/get css methods
2014-08-28 11:09:55 -07:00
Gordon Ball
a12b1a50a9 Change range trait to _range 2014-08-24 11:48:19 +02:00
Gordon Ball
1a8b77231e Remove errant tabs from js 2014-08-24 11:32:03 +02:00
Gordon Ball
b8c0afbb55 Merge master 2014-08-22 10:19:03 +02:00
Brian E. Granger
94f717781d Merge pull request #6125 from jdfreder/flex
Embrace the flexible box model in the widgets
2014-08-20 14:15:22 -04:00
Jonathan Frederic
62bd36bcc9 s/that/this bug 2014-08-20 09:34:25 -07:00
Gordon Ball
08895738f2 Merge master 2014-08-20 16:44:58 +02:00
Jonathan Frederic
ed593f02f1 Merge pull request #6171 from tarzzz/slider-value-validate
Validate slider value, when limits change
2014-08-18 20:03:14 -07:00
Jonathan Frederic
2790684a17 Fixed typo 2014-08-15 10:41:43 -07:00
Jonathan Frederic
afdba2fd47 Fix logic, use box where applicable 2014-08-15 10:14:04 -07:00
Jonathan Frederic
9b5ece6661 Make popup inherit from widget box 2014-08-14 16:09:50 -07:00
Jonathan Frederic
0aca365718 Address Sylvain's comments. 2014-08-14 15:51:41 -07:00
Tarun Gaba
258b888835 added 'var' 2014-08-15 02:59:28 +05:30
Tarun Gaba
dda92ff7ea Removed another stray alertO 2014-08-15 02:21:53 +05:30
Tarun Gaba
825186c868 Removed alert statement! 2014-08-15 02:19:26 +05:30