Show More
@@ -413,7 +413,7 define(["widgets/js/manager", | |||||
413 | this.model.on('change:_css', this.update_css, this); |
|
413 | this.model.on('change:_css', this.update_css, this); | |
414 |
|
414 | |||
415 | this.model.on('change:_dom_classes', function(model, new_classes) { |
|
415 | this.model.on('change:_dom_classes', function(model, new_classes) { | |
416 |
var old_classes = model.previous(' |
|
416 | var old_classes = model.previous('_dom_classes'); | |
417 | this.update_classes(old_classes, new_classes); |
|
417 | this.update_classes(old_classes, new_classes); | |
418 | }, this); |
|
418 | }, this); | |
419 |
|
419 |
@@ -36,16 +36,16 casper.notebook_test(function () { | |||||
36 | }); |
|
36 | }); | |
37 |
|
37 | |||
38 | index = this.append_cell( |
|
38 | index = this.append_cell( | |
39 |
'container. |
|
39 | 'container.box_style = "success"\n'+ | |
40 | 'print("Success")\n'); |
|
40 | 'print("Success")\n'); | |
41 | this.execute_cell_then(index, function(index){ |
|
41 | this.execute_cell_then(index, function(index){ | |
42 |
|
42 | |||
43 | this.test.assertEquals(this.get_output_cell(index).text, 'Success\n', |
|
43 | this.test.assertEquals(this.get_output_cell(index).text, 'Success\n', | |
44 |
'Set |
|
44 | 'Set box_style cell executed with correct output.'); | |
45 |
|
45 | |||
46 |
this.test.assert(this.cell_element_ |
|
46 | this.test.assert(this.cell_element_exists(container_index, | |
47 | '.widget-area .widget-subarea .my-test-class', 'css', ['float'])=='right', |
|
47 | '.widget-box.alert-success'), | |
48 |
' |
|
48 | 'Set box_style works.'); | |
49 | }); |
|
49 | }); | |
50 |
|
50 | |||
51 | index = this.append_cell( |
|
51 | index = this.append_cell( |
@@ -7,7 +7,7 casper.notebook_test(function () { | |||||
7 | this.execute_cell_then(index); |
|
7 | this.execute_cell_then(index); | |
8 |
|
8 | |||
9 | var float_text = {}; |
|
9 | var float_text = {}; | |
10 |
float_text.query = '.widget-area .widget-subarea . |
|
10 | float_text.query = '.widget-area .widget-subarea .my-second-float-text input'; | |
11 | float_text.index = this.append_cell( |
|
11 | float_text.index = this.append_cell( | |
12 | 'float_widget = widgets.FloatText()\n' + |
|
12 | 'float_widget = widgets.FloatText()\n' + | |
13 | 'display(float_widget)\n' + |
|
13 | 'display(float_widget)\n' + | |
@@ -55,9 +55,9 casper.notebook_test(function () { | |||||
55 | 'Invald float textbox value caught and filtered.'); |
|
55 | 'Invald float textbox value caught and filtered.'); | |
56 | }); |
|
56 | }); | |
57 |
|
57 | |||
58 |
var float_text_query = '.widget-area .widget-subarea .widget- |
|
58 | var float_text_query = '.widget-area .widget-subarea .widget-numeric-text'; | |
59 | var slider = {}; |
|
59 | var slider = {}; | |
60 |
slider.query = '.widget-area .widget-subarea . |
|
60 | slider.query = '.widget-area .widget-subarea .slider'; | |
61 | slider.index = this.append_cell( |
|
61 | slider.index = this.append_cell( | |
62 | 'floatrange = [widgets.BoundedFloatText(), \n' + |
|
62 | 'floatrange = [widgets.BoundedFloatText(), \n' + | |
63 | ' widgets.FloatSlider()]\n' + |
|
63 | ' widgets.FloatSlider()]\n' + |
@@ -23,9 +23,6 casper.notebook_test(function () { | |||||
23 | 'image.value = data\n' + |
|
23 | 'image.value = data\n' + | |
24 | 'image.width = "50px"\n' + |
|
24 | 'image.width = "50px"\n' + | |
25 | 'image.height = "50px"\n' + |
|
25 | 'image.height = "50px"\n' + | |
26 | // Set css that will make the image render within the PhantomJS visible |
|
|||
27 | // window. If we don't do this, the captured image will be black. |
|
|||
28 | 'image.set_css({"background": "blue", "z-index": "9999", "position": "fixed", "top": "0px", "left": "0px"})\n' + |
|
|||
29 | 'display(image)\n' + |
|
26 | 'display(image)\n' + | |
30 | 'print("Success")\n'); |
|
27 | 'print("Success")\n'); | |
31 | this.execute_cell_then(image_index, function(index){ |
|
28 | this.execute_cell_then(image_index, function(index){ |
@@ -7,7 +7,7 casper.notebook_test(function () { | |||||
7 | this.execute_cell_then(index); |
|
7 | this.execute_cell_then(index); | |
8 |
|
8 | |||
9 | var int_text = {}; |
|
9 | var int_text = {}; | |
10 |
int_text.query = '.widget-area .widget-subarea . |
|
10 | int_text.query = '.widget-area .widget-subarea .my-second-int-text input'; | |
11 | int_text.index = this.append_cell( |
|
11 | int_text.index = this.append_cell( | |
12 | 'int_widget = widgets.IntText()\n' + |
|
12 | 'int_widget = widgets.IntText()\n' + | |
13 | 'display(int_widget)\n' + |
|
13 | 'display(int_widget)\n' + | |
@@ -62,9 +62,9 casper.notebook_test(function () { | |||||
62 | this.execute_cell_then(index); |
|
62 | this.execute_cell_then(index); | |
63 |
|
63 | |||
64 |
|
64 | |||
65 |
var slider_query = '.widget-area .widget-subarea . |
|
65 | var slider_query = '.widget-area .widget-subarea .slider'; | |
66 | var int_text2 = {}; |
|
66 | var int_text2 = {}; | |
67 |
int_text2.query = '.widget-area .widget-subarea . |
|
67 | int_text2.query = '.widget-area .widget-subarea .my-second-num-test-text input'; | |
68 | int_text2.index = this.append_cell( |
|
68 | int_text2.index = this.append_cell( | |
69 | 'intrange = [widgets.BoundedIntTextWidget(),\n' + |
|
69 | 'intrange = [widgets.BoundedIntTextWidget(),\n' + | |
70 | ' widgets.IntSliderWidget()]\n' + |
|
70 | ' widgets.IntSliderWidget()]\n' + |
@@ -165,7 +165,8 class _BoundedFloatRange(_FloatRange): | |||||
165 |
|
165 | |||
166 | class FloatRangeSlider(_BoundedFloatRange): |
|
166 | class FloatRangeSlider(_BoundedFloatRange): | |
167 | _view_name = Unicode('FloatSliderView', sync=True) |
|
167 | _view_name = Unicode('FloatSliderView', sync=True) | |
168 |
orientation = Enum([ |
|
168 | orientation = CaselessStrEnum(values=['horizontal', 'vertical'], | |
|
169 | default_value='horizontal', allow_none=False, | |||
169 | help="Vertical or horizontal.", sync=True) |
|
170 | help="Vertical or horizontal.", sync=True) | |
170 | _range = Bool(True, help="Display a range selector", sync=True) |
|
171 | _range = Bool(True, help="Display a range selector", sync=True) | |
171 | readout = Bool(True, help="Display the current value of the slider next to it.", sync=True) |
|
172 | readout = Bool(True, help="Display the current value of the slider next to it.", sync=True) |
@@ -169,7 +169,8 class _BoundedIntRange(_IntRange): | |||||
169 |
|
169 | |||
170 | class IntRangeSlider(_BoundedIntRange): |
|
170 | class IntRangeSlider(_BoundedIntRange): | |
171 | _view_name = Unicode('IntSliderView', sync=True) |
|
171 | _view_name = Unicode('IntSliderView', sync=True) | |
172 |
orientation = Enum([ |
|
172 | orientation = CaselessStrEnum(values=['horizontal', 'vertical'], | |
|
173 | default_value='horizontal', allow_none=False, | |||
173 | help="Vertical or horizontal.", sync=True) |
|
174 | help="Vertical or horizontal.", sync=True) | |
174 | _range = Bool(True, help="Display a range selector", sync=True) |
|
175 | _range = Bool(True, help="Display a range selector", sync=True) | |
175 | readout = Bool(True, help="Display the current value of the slider next to it.", sync=True) |
|
176 | readout = Bool(True, help="Display the current value of the slider next to it.", sync=True) |
General Comments 0
You need to be logged in to leave comments.
Login now