mirror of
https://github.com/jupyter/notebook.git
synced 2025-01-24 12:05:22 +08:00
Fixed rebase bugs and other bugs.
This commit is contained in:
parent
13aa65facc
commit
cb9014e42c
@ -413,7 +413,7 @@ define(["widgets/js/manager",
|
||||
this.model.on('change:_css', this.update_css, this);
|
||||
|
||||
this.model.on('change:_dom_classes', function(model, new_classes) {
|
||||
var old_classes = model.previous('children');
|
||||
var old_classes = model.previous('_dom_classes');
|
||||
this.update_classes(old_classes, new_classes);
|
||||
}, this);
|
||||
|
||||
|
@ -36,16 +36,16 @@ casper.notebook_test(function () {
|
||||
});
|
||||
|
||||
index = this.append_cell(
|
||||
'container.set_css("float", "right")\n'+
|
||||
'container.box_style = "success"\n'+
|
||||
'print("Success")\n');
|
||||
this.execute_cell_then(index, function(index){
|
||||
|
||||
this.test.assertEquals(this.get_output_cell(index).text, 'Success\n',
|
||||
'Set container class CSS cell executed with correct output.');
|
||||
|
||||
this.test.assert(this.cell_element_function(container_index,
|
||||
'.widget-area .widget-subarea .my-test-class', 'css', ['float'])=='right',
|
||||
'set_css works.');
|
||||
'Set box_style cell executed with correct output.');
|
||||
|
||||
this.test.assert(this.cell_element_exists(container_index,
|
||||
'.widget-box.alert-success'),
|
||||
'Set box_style works.');
|
||||
});
|
||||
|
||||
index = this.append_cell(
|
||||
|
@ -7,7 +7,7 @@ casper.notebook_test(function () {
|
||||
this.execute_cell_then(index);
|
||||
|
||||
var float_text = {};
|
||||
float_text.query = '.widget-area .widget-subarea .widget-hbox-single .my-second-float-text input';
|
||||
float_text.query = '.widget-area .widget-subarea .my-second-float-text input';
|
||||
float_text.index = this.append_cell(
|
||||
'float_widget = widgets.FloatText()\n' +
|
||||
'display(float_widget)\n' +
|
||||
@ -55,9 +55,9 @@ casper.notebook_test(function () {
|
||||
'Invald float textbox value caught and filtered.');
|
||||
});
|
||||
|
||||
var float_text_query = '.widget-area .widget-subarea .widget-hbox-single .widget-numeric-text';
|
||||
var float_text_query = '.widget-area .widget-subarea .widget-numeric-text';
|
||||
var slider = {};
|
||||
slider.query = '.widget-area .widget-subarea .widget-hbox-single .slider';
|
||||
slider.query = '.widget-area .widget-subarea .slider';
|
||||
slider.index = this.append_cell(
|
||||
'floatrange = [widgets.BoundedFloatText(), \n' +
|
||||
' widgets.FloatSlider()]\n' +
|
||||
|
@ -23,9 +23,6 @@ casper.notebook_test(function () {
|
||||
'image.value = data\n' +
|
||||
'image.width = "50px"\n' +
|
||||
'image.height = "50px"\n' +
|
||||
// Set css that will make the image render within the PhantomJS visible
|
||||
// window. If we don't do this, the captured image will be black.
|
||||
'image.set_css({"background": "blue", "z-index": "9999", "position": "fixed", "top": "0px", "left": "0px"})\n' +
|
||||
'display(image)\n' +
|
||||
'print("Success")\n');
|
||||
this.execute_cell_then(image_index, function(index){
|
||||
|
@ -7,7 +7,7 @@ casper.notebook_test(function () {
|
||||
this.execute_cell_then(index);
|
||||
|
||||
var int_text = {};
|
||||
int_text.query = '.widget-area .widget-subarea .widget-hbox-single .my-second-int-text input';
|
||||
int_text.query = '.widget-area .widget-subarea .my-second-int-text input';
|
||||
int_text.index = this.append_cell(
|
||||
'int_widget = widgets.IntText()\n' +
|
||||
'display(int_widget)\n' +
|
||||
@ -62,9 +62,9 @@ casper.notebook_test(function () {
|
||||
this.execute_cell_then(index);
|
||||
|
||||
|
||||
var slider_query = '.widget-area .widget-subarea .widget-hbox-single .slider';
|
||||
var slider_query = '.widget-area .widget-subarea .slider';
|
||||
var int_text2 = {};
|
||||
int_text2.query = '.widget-area .widget-subarea .widget-hbox-single .my-second-num-test-text input';
|
||||
int_text2.query = '.widget-area .widget-subarea .my-second-num-test-text input';
|
||||
int_text2.index = this.append_cell(
|
||||
'intrange = [widgets.BoundedIntTextWidget(),\n' +
|
||||
' widgets.IntSliderWidget()]\n' +
|
||||
|
@ -165,7 +165,8 @@ class _BoundedFloatRange(_FloatRange):
|
||||
|
||||
class FloatRangeSlider(_BoundedFloatRange):
|
||||
_view_name = Unicode('FloatSliderView', sync=True)
|
||||
orientation = Enum([u'horizontal', u'vertical'], u'horizontal',
|
||||
orientation = CaselessStrEnum(values=['horizontal', 'vertical'],
|
||||
default_value='horizontal', allow_none=False,
|
||||
help="Vertical or horizontal.", sync=True)
|
||||
_range = Bool(True, help="Display a range selector", sync=True)
|
||||
readout = Bool(True, help="Display the current value of the slider next to it.", sync=True)
|
||||
|
@ -169,7 +169,8 @@ class _BoundedIntRange(_IntRange):
|
||||
|
||||
class IntRangeSlider(_BoundedIntRange):
|
||||
_view_name = Unicode('IntSliderView', sync=True)
|
||||
orientation = Enum([u'horizontal', u'vertical'], u'horizontal',
|
||||
orientation = CaselessStrEnum(values=['horizontal', 'vertical'],
|
||||
default_value='horizontal', allow_none=False,
|
||||
help="Vertical or horizontal.", sync=True)
|
||||
_range = Bool(True, help="Display a range selector", sync=True)
|
||||
readout = Bool(True, help="Display the current value of the slider next to it.", sync=True)
|
||||
|
Loading…
Reference in New Issue
Block a user