Show More
@@ -300,7 +300,7 b' class APITest(NotebookTestBase):' | |||||
300 | saved = resp.json() |
|
300 | saved = resp.json() | |
301 | self.assertEqual(saved['name'], 'a2.ipynb') |
|
301 | self.assertEqual(saved['name'], 'a2.ipynb') | |
302 | self.assertEqual(saved['path'], 'foo/bar') |
|
302 | self.assertEqual(saved['path'], 'foo/bar') | |
303 | assert os.path.isfile(pjoin(self.notebook_dir.name,'foo','bar','a2.ipynb')) |
|
303 | assert os.path.isfile(pjoin(self.notebook_dir.name,'foo','progress-bar','a2.ipynb')) | |
304 | assert not os.path.isfile(pjoin(self.notebook_dir.name, 'foo', 'a.ipynb')) |
|
304 | assert not os.path.isfile(pjoin(self.notebook_dir.name, 'foo', 'a.ipynb')) | |
305 | with assert_http_error(404): |
|
305 | with assert_http_error(404): | |
306 | self.nb_api.read('a.ipynb', 'foo') |
|
306 | self.nb_api.read('a.ipynb', 'foo') |
@@ -13,7 +13,7 b'' | |||||
13 | $(document).ready(function () { |
|
13 | $(document).ready(function () { | |
14 |
|
14 | |||
15 | IPython.page = new IPython.Page(); |
|
15 | IPython.page = new IPython.Page(); | |
16 | $('button#login_submit').addClass("btn"); |
|
16 | $('button#login_submit').addClass("btn btn-default"); | |
17 | IPython.page.show(); |
|
17 | IPython.page.show(); | |
18 | $('input#password_input').focus(); |
|
18 | $('input#password_input').focus(); | |
19 |
|
19 |
@@ -24,7 +24,7 b' var IPython = (function (IPython) {' | |||||
24 | }; |
|
24 | }; | |
25 |
|
25 | |||
26 | LoginWidget.prototype.style = function () { |
|
26 | LoginWidget.prototype.style = function () { | |
27 |
this.element.find("button").addClass("btn btn-sm |
|
27 | this.element.find("button").addClass("btn btn-default btn-sm"); | |
28 | }; |
|
28 | }; | |
29 |
|
29 | |||
30 |
|
30 |
@@ -37,7 +37,7 b' IPython.dialog = (function (IPython) {' | |||||
37 | for (var label in options.buttons) { |
|
37 | for (var label in options.buttons) { | |
38 | var btn_opts = options.buttons[label]; |
|
38 | var btn_opts = options.buttons[label]; | |
39 | var button = $("<button/>") |
|
39 | var button = $("<button/>") | |
40 | .addClass("btn") |
|
40 | .addClass("btn btn-default") | |
41 | .attr("data-dismiss", "modal") |
|
41 | .attr("data-dismiss", "modal") | |
42 | .text(label); |
|
42 | .text(label); | |
43 | if (btn_opts.click) { |
|
43 | if (btn_opts.click) { |
@@ -20,7 +20,7 b'' | |||||
20 | * $([IPython.events]).on('app_initialized.NotebookApp', function(){ |
|
20 | * $([IPython.events]).on('app_initialized.NotebookApp', function(){ | |
21 | * IPython.toolbar.add_buttons_group([ |
|
21 | * IPython.toolbar.add_buttons_group([ | |
22 | * { |
|
22 | * { | |
23 | * 'label' : 'run qtconsole', |
|
23 | * 'label label-default' : 'run qtconsole', | |
24 | * 'icon' : 'icon-terminal', // select your icon from http://fortawesome.github.io/Font-Awesome/icons |
|
24 | * 'icon' : 'icon-terminal', // select your icon from http://fortawesome.github.io/Font-Awesome/icons | |
25 | * 'callback': function () { |
|
25 | * 'callback': function () { | |
26 | * IPython.notebook.kernel.execute('%qtconsole') |
|
26 | * IPython.notebook.kernel.execute('%qtconsole') |
@@ -144,7 +144,7 b' var IPython = (function (IPython) {' | |||||
144 | * button.click(function(){ |
|
144 | * button.click(function(){ | |
145 | * var v = cell.metadata.foo; |
|
145 | * var v = cell.metadata.foo; | |
146 | * cell.metadata.foo = !v; |
|
146 | * cell.metadata.foo = !v; | |
147 | * button.button("option", "label", String(!v)); |
|
147 | * button.button("option", "label label-default", String(!v)); | |
148 | * }) |
|
148 | * }) | |
149 | * |
|
149 | * | |
150 | * // add the button to the DOM div. |
|
150 | * // add the button to the DOM div. |
@@ -27,7 +27,7 b'' | |||||
27 | var add_raw_edit_button = function(div, cell) { |
|
27 | var add_raw_edit_button = function(div, cell) { | |
28 | var button_container = div; |
|
28 | var button_container = div; | |
29 | var button = $('<button/>') |
|
29 | var button = $('<button/>') | |
30 |
.addClass("btn btn- |
|
30 | .addClass("btn btn-default btn-xs") | |
31 | .text("Edit Metadata") |
|
31 | .text("Edit Metadata") | |
32 | .click( function () { |
|
32 | .click( function () { | |
33 | raw_edit(cell); |
|
33 | raw_edit(cell); |
@@ -64,7 +64,7 b'' | |||||
64 | button.click(function(){ |
|
64 | button.click(function(){ | |
65 | var v = cell.metadata.foo; |
|
65 | var v = cell.metadata.foo; | |
66 | cell.metadata.foo = !v; |
|
66 | cell.metadata.foo = !v; | |
67 | button.button("option","label",String(!v)); |
|
67 | button.button("option","label label-default",String(!v)); | |
68 | }) |
|
68 | }) | |
69 | button_container.append(button); |
|
69 | button_container.append(button); | |
70 | } |
|
70 | } |
@@ -61,7 +61,7 b' var IPython = (function (IPython) {' | |||||
61 | this.wrapper.addClass('output_wrapper'); |
|
61 | this.wrapper.addClass('output_wrapper'); | |
62 | this.element.addClass('output'); |
|
62 | this.element.addClass('output'); | |
63 |
|
63 | |||
64 | this.collapse_button.addClass("btn output_collapsed"); |
|
64 | this.collapse_button.addClass("btn btn-default output_collapsed"); | |
65 | this.collapse_button.attr('title', 'click to expand output'); |
|
65 | this.collapse_button.attr('title', 'click to expand output'); | |
66 | this.collapse_button.text('. . .'); |
|
66 | this.collapse_button.text('. . .'); | |
67 |
|
67 |
@@ -72,7 +72,7 b' var IPython = (function (IPython) {' | |||||
72 | for(var i=0; i < list.length; i++) { |
|
72 | for(var i=0; i < list.length; i++) { | |
73 | el = list[i]; |
|
73 | el = list[i]; | |
74 | var button = $('<button/>') |
|
74 | var button = $('<button/>') | |
75 | .addClass('btn') |
|
75 | .addClass('btn btn-default') | |
76 | .attr("title", el.label) |
|
76 | .attr("title", el.label) | |
77 | .append( |
|
77 | .append( | |
78 | $("<i/>").addClass(el.icon) |
|
78 | $("<i/>").addClass(el.icon) |
@@ -112,13 +112,13 b' var tour_steps = [' | |||||
112 | var tour_style = "<div class='popover tour' style='position:relative'>\ |
|
112 | var tour_style = "<div class='popover tour' style='position:relative'>\ | |
113 | <div class='arrow'></div>\ |
|
113 | <div class='arrow'></div>\ | |
114 | <div style='position:absolute; top:7px; right:7px'>\ |
|
114 | <div style='position:absolute; top:7px; right:7px'>\ | |
115 | <button class='btn btn-sm icon-remove' data-role='end'></button></div>\ |
|
115 | <button class='btn btn-default btn-sm icon-remove' data-role='end'></button></div>\ | |
116 | <h3 class='popover-title'></h3>\ |
|
116 | <h3 class='popover-title'></h3>\ | |
117 | <div class='popover-content'></div>\ |
|
117 | <div class='popover-content'></div>\ | |
118 | <div class='popover-navigation'>\ |
|
118 | <div class='popover-navigation'>\ | |
119 | <button class='btn btn-default icon-step-backward' data-role='prev'></button>\ |
|
119 | <button class='btn btn-default btn-default icon-step-backward' data-role='prev'></button>\ | |
120 | <button class='btn btn-default icon-step-forward pull-right' data-role='next'></button>\ |
|
120 | <button class='btn btn-default btn-default icon-step-forward pull-right' data-role='next'></button>\ | |
121 | <button id='tour-pause' class='btn btn-sm btn-default icon-pause' data-resume-text='' data-pause-text='' data-role='pause-resume'></button>\ |
|
121 | <button id='tour-pause' class='btn btn-default btn-sm btn-default icon-pause' data-resume-text='' data-pause-text='' data-role='pause-resume'></button>\ | |
122 | </div>\ |
|
122 | </div>\ | |
123 | </div>"; |
|
123 | </div>"; | |
124 |
|
124 |
@@ -15,7 +15,7 b'' | |||||
15 | padding: 0px; |
|
15 | padding: 0px; | |
16 | padding-top: 3px; |
|
16 | padding-top: 3px; | |
17 | } |
|
17 | } | |
18 | .btn { |
|
18 | .btn.btn-default { | |
19 | padding: 2px 8px; |
|
19 | padding: 2px 8px; | |
20 | } |
|
20 | } | |
21 | } |
|
21 | } |
@@ -83,7 +83,7 b' var IPython = (function (IPython) {' | |||||
83 | }; |
|
83 | }; | |
84 |
|
84 | |||
85 | ClusterItem.prototype.style = function () { |
|
85 | ClusterItem.prototype.style = function () { | |
86 |
this.element.addClass('list_item').addClass("row |
|
86 | this.element.addClass('list_item').addClass("row"); | |
87 | }; |
|
87 | }; | |
88 |
|
88 | |||
89 | ClusterItem.prototype.update_state = function (data) { |
|
89 | ClusterItem.prototype.update_state = function (data) { | |
@@ -106,7 +106,7 b' var IPython = (function (IPython) {' | |||||
106 | .attr('size',3) |
|
106 | .attr('size',3) | |
107 | .addClass('engine_num_input'); |
|
107 | .addClass('engine_num_input'); | |
108 | engines_col.append(input); |
|
108 | engines_col.append(input); | |
109 |
var start_button = $('<button/>').addClass("btn btn- |
|
109 | var start_button = $('<button/>').addClass("btn btn-default btn-xs").text("Start"); | |
110 | var action_col = $('<div/>').addClass('action_col span2').append( |
|
110 | var action_col = $('<div/>').addClass('action_col span2').append( | |
111 | $("<span/>").addClass("item_buttons btn-group").append( |
|
111 | $("<span/>").addClass("item_buttons btn-group").append( | |
112 | start_button |
|
112 | start_button | |
@@ -153,7 +153,7 b' var IPython = (function (IPython) {' | |||||
153 | var profile_col = $('<div/>').addClass('profile_col span4').text(this.data.profile); |
|
153 | var profile_col = $('<div/>').addClass('profile_col span4').text(this.data.profile); | |
154 | var status_col = $('<div/>').addClass('status_col span3').text('running'); |
|
154 | var status_col = $('<div/>').addClass('status_col span3').text('running'); | |
155 | var engines_col = $('<div/>').addClass('engines_col span3').text(this.data.n); |
|
155 | var engines_col = $('<div/>').addClass('engines_col span3').text(this.data.n); | |
156 |
var stop_button = $('<button/>').addClass("btn btn- |
|
156 | var stop_button = $('<button/>').addClass("btn btn-default btn-xs").text("Stop"); | |
157 | var action_col = $('<div/>').addClass('action_col span2').append( |
|
157 | var action_col = $('<div/>').addClass('action_col span2').append( | |
158 | $("<span/>").addClass("item_buttons btn-group").append( |
|
158 | $("<span/>").addClass("item_buttons btn-group").append( | |
159 | stop_button |
|
159 | stop_button |
@@ -189,7 +189,7 b' var IPython = (function (IPython) {' | |||||
189 |
|
189 | |||
190 |
|
190 | |||
191 | NotebookList.prototype.new_notebook_item = function (index) { |
|
191 | NotebookList.prototype.new_notebook_item = function (index) { | |
192 |
var item = $('<div/>').addClass("list_item").addClass("row |
|
192 | var item = $('<div/>').addClass("list_item").addClass("row"); | |
193 | // item.addClass('list_item ui-widget ui-widget-content ui-helper-clearfix'); |
|
193 | // item.addClass('list_item ui-widget ui-widget-content ui-helper-clearfix'); | |
194 | // item.css('border-top-style','none'); |
|
194 | // item.css('border-top-style','none'); | |
195 | item.append($("<div/>").addClass("span12").append( |
|
195 | item.append($("<div/>").addClass("span12").append( | |
@@ -265,7 +265,7 b' var IPython = (function (IPython) {' | |||||
265 |
|
265 | |||
266 | NotebookList.prototype.add_shutdown_button = function (item, session) { |
|
266 | NotebookList.prototype.add_shutdown_button = function (item, session) { | |
267 | var that = this; |
|
267 | var that = this; | |
268 |
var shutdown_button = $("<button/>").text("Shutdown").addClass("btn btn- |
|
268 | var shutdown_button = $("<button/>").text("Shutdown").addClass("btn btn-default btn-xs btn-danger"). | |
269 | click(function (e) { |
|
269 | click(function (e) { | |
270 | var settings = { |
|
270 | var settings = { | |
271 | processData : false, |
|
271 | processData : false, | |
@@ -292,7 +292,7 b' var IPython = (function (IPython) {' | |||||
292 | NotebookList.prototype.add_delete_button = function (item) { |
|
292 | NotebookList.prototype.add_delete_button = function (item) { | |
293 | var new_buttons = $('<span/>').addClass("btn-group pull-right"); |
|
293 | var new_buttons = $('<span/>').addClass("btn-group pull-right"); | |
294 | var notebooklist = this; |
|
294 | var notebooklist = this; | |
295 |
var delete_button = $("<button/>").text("Delete").addClass("btn btn- |
|
295 | var delete_button = $("<button/>").text("Delete").addClass("btn btn-default btn-xs"). | |
296 | click(function (e) { |
|
296 | click(function (e) { | |
297 | // $(this) is the button that was clicked. |
|
297 | // $(this) is the button that was clicked. | |
298 | var that = $(this); |
|
298 | var that = $(this); | |
@@ -339,7 +339,7 b' var IPython = (function (IPython) {' | |||||
339 | NotebookList.prototype.add_upload_button = function (item) { |
|
339 | NotebookList.prototype.add_upload_button = function (item) { | |
340 | var that = this; |
|
340 | var that = this; | |
341 | var upload_button = $('<button/>').text("Upload") |
|
341 | var upload_button = $('<button/>').text("Upload") | |
342 |
.addClass('btn btn-primary btn- |
|
342 | .addClass('btn btn-default btn-primary btn-xs upload_button') | |
343 | .click(function (e) { |
|
343 | .click(function (e) { | |
344 | var nbname = item.find('.item_name > input').val(); |
|
344 | var nbname = item.find('.item_name > input').val(); | |
345 | if (nbname.slice(nbname.length-6, nbname.length) != ".ipynb") { |
|
345 | if (nbname.slice(nbname.length-6, nbname.length) != ".ipynb") { | |
@@ -375,7 +375,7 b' var IPython = (function (IPython) {' | |||||
375 | return false; |
|
375 | return false; | |
376 | }); |
|
376 | }); | |
377 | var cancel_button = $('<button/>').text("Cancel") |
|
377 | var cancel_button = $('<button/>').text("Cancel") | |
378 |
.addClass("btn btn- |
|
378 | .addClass("btn btn-default btn-xs") | |
379 | .click(function (e) { |
|
379 | .click(function (e) { | |
380 | console.log('cancel click'); |
|
380 | console.log('cancel click'); | |
381 | item.remove(); |
|
381 | item.remove(); |
@@ -76,7 +76,7 b' define(["widgets/js/widget"], function(WidgetManager){' | |||||
76 | // Called when view is rendered. |
|
76 | // Called when view is rendered. | |
77 | var that = this; |
|
77 | var that = this; | |
78 | this.setElement($('<button />') |
|
78 | this.setElement($('<button />') | |
79 | .addClass('btn') |
|
79 | .addClass('btn btn-default') | |
80 | .attr('type', 'button') |
|
80 | .attr('type', 'button') | |
81 | .on('click', function (e) { |
|
81 | .on('click', function (e) { | |
82 | e.preventDefault(); |
|
82 | e.preventDefault(); |
@@ -20,7 +20,7 b' define(["widgets/js/widget"], function(WidgetManager){' | |||||
20 | render : function(){ |
|
20 | render : function(){ | |
21 | // Called when view is rendered. |
|
21 | // Called when view is rendered. | |
22 | this.setElement($("<button />") |
|
22 | this.setElement($("<button />") | |
23 | .addClass('btn')); |
|
23 | .addClass('btn btn-default')); | |
24 |
|
24 | |||
25 | this.update(); // Set defaults. |
|
25 | this.update(); // Set defaults. | |
26 | }, |
|
26 | }, |
@@ -165,7 +165,7 b' define(["widgets/js/widget"], function(WidgetManager) {' | |||||
165 |
|
165 | |||
166 | this.$show_button = $('<button />') |
|
166 | this.$show_button = $('<button />') | |
167 | .html(" ") |
|
167 | .html(" ") | |
168 | .addClass('btn btn-info widget-modal-show') |
|
168 | .addClass('btn btn-default btn-info widget-modal-show') | |
169 | .appendTo(this.$el) |
|
169 | .appendTo(this.$el) | |
170 | .click(function(){ |
|
170 | .click(function(){ | |
171 | that.show(); |
|
171 | that.show(); |
@@ -274,7 +274,7 b' define(["widgets/js/widget"], function(WidgetManager){' | |||||
274 | .appendTo(this.$el); |
|
274 | .appendTo(this.$el); | |
275 | this.$el_to_style = this.$progress; // Set default element to style |
|
275 | this.$el_to_style = this.$progress; // Set default element to style | |
276 | this.$bar = $('<div />') |
|
276 | this.$bar = $('<div />') | |
277 | .addClass('bar') |
|
277 | .addClass('progress-bar') | |
278 | .css('width', '50%') |
|
278 | .css('width', '50%') | |
279 | .appendTo(this.$progress); |
|
279 | .appendTo(this.$progress); | |
280 | this.update(); // Set defaults. |
|
280 | this.update(); // Set defaults. |
@@ -31,12 +31,12 b' define(["widgets/js/widget"], function(WidgetManager){' | |||||
31 | .appendTo(this.$el); |
|
31 | .appendTo(this.$el); | |
32 | this.$el_to_style = this.$buttongroup; // Set default element to style |
|
32 | this.$el_to_style = this.$buttongroup; // Set default element to style | |
33 | this.$droplabel = $('<button />') |
|
33 | this.$droplabel = $('<button />') | |
34 | .addClass('btn') |
|
34 | .addClass('btn btn-default') | |
35 | .addClass('widget-combo-btn') |
|
35 | .addClass('widget-combo-btn') | |
36 | .html(" ") |
|
36 | .html(" ") | |
37 | .appendTo(this.$buttongroup); |
|
37 | .appendTo(this.$buttongroup); | |
38 | this.$dropbutton = $('<button />') |
|
38 | this.$dropbutton = $('<button />') | |
39 | .addClass('btn') |
|
39 | .addClass('btn btn-default') | |
40 | .addClass('dropdown-toggle') |
|
40 | .addClass('dropdown-toggle') | |
41 | .addClass('widget-combo-carrot-btn') |
|
41 | .addClass('widget-combo-carrot-btn') | |
42 | .attr('data-toggle', 'dropdown') |
|
42 | .attr('data-toggle', 'dropdown') | |
@@ -246,7 +246,7 b' define(["widgets/js/widget"], function(WidgetManager){' | |||||
246 | if (!$item_element.length) { |
|
246 | if (!$item_element.length) { | |
247 | $item_element = $('<button/>') |
|
247 | $item_element = $('<button/>') | |
248 | .attr('type', 'button') |
|
248 | .attr('type', 'button') | |
249 | .addClass('btn') |
|
249 | .addClass('btn btn-default') | |
250 | .html(item_html) |
|
250 | .html(item_html) | |
251 | .appendTo(that.$buttongroup) |
|
251 | .appendTo(that.$buttongroup) | |
252 | .attr('data-value', item) |
|
252 | .attr('data-value', item) |
@@ -19,10 +19,10 b' define(["widgets/js/widget"], function(WidgetManager){' | |||||
19 | var AccordionView = IPython.DOMWidgetView.extend({ |
|
19 | var AccordionView = IPython.DOMWidgetView.extend({ | |
20 | render: function(){ |
|
20 | render: function(){ | |
21 | // Called when view is rendered. |
|
21 | // Called when view is rendered. | |
22 |
var guid = ' |
|
22 | var guid = 'panel-group' + IPython.utils.uuid(); | |
23 | this.$el |
|
23 | this.$el | |
24 | .attr('id', guid) |
|
24 | .attr('id', guid) | |
25 |
.addClass(' |
|
25 | .addClass('panel-group'); | |
26 | this.containers = []; |
|
26 | this.containers = []; | |
27 | this.model_containers = {}; |
|
27 | this.model_containers = {}; | |
28 | this.update_children([], this.model.get('_children')); |
|
28 | this.update_children([], this.model.get('_children')); | |
@@ -60,7 +60,7 b' define(["widgets/js/widget"], function(WidgetManager){' | |||||
60 | var accordian = that.containers[page_index]; |
|
60 | var accordian = that.containers[page_index]; | |
61 | if (accordian !== undefined) { |
|
61 | if (accordian !== undefined) { | |
62 | accordian |
|
62 | accordian | |
63 |
.find('.a |
|
63 | .find('.panel-heading') | |
64 | .find('.accordion-toggle') |
|
64 | .find('.accordion-toggle') | |
65 | .text(title); |
|
65 | .text(title); | |
66 | } |
|
66 | } | |
@@ -71,9 +71,9 b' define(["widgets/js/widget"], function(WidgetManager){' | |||||
71 | // Only update the selection if the selection wasn't triggered |
|
71 | // Only update the selection if the selection wasn't triggered | |
72 | // by the front-end. It must be triggered by the back-end. |
|
72 | // by the front-end. It must be triggered by the back-end. | |
73 | if (options === undefined || options.updated_view != this) { |
|
73 | if (options === undefined || options.updated_view != this) { | |
74 |
this.containers[old_index].find('. |
|
74 | this.containers[old_index].find('.panel-collapse').collapse('hide'); | |
75 | if (0 <= new_index && new_index < this.containers.length) { |
|
75 | if (0 <= new_index && new_index < this.containers.length) { | |
76 |
this.containers[new_index].find('. |
|
76 | this.containers[new_index].find('.panel-collapse').collapse('show'); | |
77 | } |
|
77 | } | |
78 | } |
|
78 | } | |
79 | }, |
|
79 | }, | |
@@ -101,10 +101,10 b' define(["widgets/js/widget"], function(WidgetManager){' | |||||
101 | var index = this.containers.length; |
|
101 | var index = this.containers.length; | |
102 | var uuid = IPython.utils.uuid(); |
|
102 | var uuid = IPython.utils.uuid(); | |
103 | var accordion_group = $('<div />') |
|
103 | var accordion_group = $('<div />') | |
104 |
.addClass(' |
|
104 | .addClass('panel panel-default') | |
105 | .appendTo(this.$el); |
|
105 | .appendTo(this.$el); | |
106 | var accordion_heading = $('<div />') |
|
106 | var accordion_heading = $('<div />') | |
107 |
.addClass('a |
|
107 | .addClass('panel-heading') | |
108 | .appendTo(accordion_group); |
|
108 | .appendTo(accordion_group); | |
109 | var that = this; |
|
109 | var that = this; | |
110 | var accordion_toggle = $('<a />') |
|
110 | var accordion_toggle = $('<a />') | |
@@ -122,10 +122,10 b' define(["widgets/js/widget"], function(WidgetManager){' | |||||
122 | .text('Page ' + index) |
|
122 | .text('Page ' + index) | |
123 | .appendTo(accordion_heading); |
|
123 | .appendTo(accordion_heading); | |
124 | var accordion_body = $('<div />', {id: uuid}) |
|
124 | var accordion_body = $('<div />', {id: uuid}) | |
125 |
.addClass(' |
|
125 | .addClass('panel-collapse collapse') | |
126 | .appendTo(accordion_group); |
|
126 | .appendTo(accordion_group); | |
127 | var accordion_inner = $('<div />') |
|
127 | var accordion_inner = $('<div />') | |
128 |
.addClass(' |
|
128 | .addClass('panel-body') | |
129 | .appendTo(accordion_body); |
|
129 | .appendTo(accordion_body); | |
130 | var container_index = this.containers.push(accordion_group) - 1; |
|
130 | var container_index = this.containers.push(accordion_group) - 1; | |
131 | accordion_group.container_index = container_index; |
|
131 | accordion_group.container_index = container_index; |
@@ -185,7 +185,7 b'' | |||||
185 | /* Progress Bar */ |
|
185 | /* Progress Bar */ | |
186 | width : 363px; |
|
186 | width : 363px; | |
187 |
|
187 | |||
188 | .bar { |
|
188 | .progress-bar { | |
189 | /* Disable progress bar animation */ |
|
189 | /* Disable progress bar animation */ | |
190 | -webkit-transition : none; |
|
190 | -webkit-transition : none; | |
191 | -moz-transition : none; |
|
191 | -moz-transition : none; |
@@ -52,7 +52,7 b'' | |||||
52 | <div id="header" class="navbar navbar-static-top"> |
|
52 | <div id="header" class="navbar navbar-static-top"> | |
53 | <div class="navbar-inner navbar-nobg"> |
|
53 | <div class="navbar-inner navbar-nobg"> | |
54 | <div class="container"> |
|
54 | <div class="container"> | |
55 | <div id="ipython_notebook" class="nav brand pull-left"><a href="{{base_url}}tree/{{notebook_path}}" alt='dashboard'><img src='{{static_url("base/images/ipynblogo.png") }}' alt='IPython Notebook'/></a></div> |
|
55 | <div id="ipython_notebook" class="nav navbar-brand pull-left"><a href="{{base_url}}tree/{{notebook_path}}" alt='dashboard'><img src='{{static_url("base/images/ipynblogo.png") }}' alt='IPython Notebook'/></a></div> | |
56 |
|
56 | |||
57 | {% block login_widget %} |
|
57 | {% block login_widget %} | |
58 |
|
58 |
@@ -30,7 +30,7 b' data-notebook-path="{{notebook_path}}"' | |||||
30 |
|
30 | |||
31 | <div class="tab-content"> |
|
31 | <div class="tab-content"> | |
32 | <div id="notebooks" class="tab-pane active"> |
|
32 | <div id="notebooks" class="tab-pane active"> | |
33 |
<div id="notebook_toolbar" class="row |
|
33 | <div id="notebook_toolbar" class="row"> | |
34 | <div class="span8"> |
|
34 | <div class="span8"> | |
35 | <form id='alternate_upload' class='alternate_upload' > |
|
35 | <form id='alternate_upload' class='alternate_upload' > | |
36 | <span id="notebook_list_info" style="position:absolute" > |
|
36 | <span id="notebook_list_info" style="position:absolute" > | |
@@ -41,14 +41,14 b' data-notebook-path="{{notebook_path}}"' | |||||
41 | </div> |
|
41 | </div> | |
42 | <div class="span4 clearfix"> |
|
42 | <div class="span4 clearfix"> | |
43 | <span id="notebook_buttons" class="pull-right"> |
|
43 | <span id="notebook_buttons" class="pull-right"> | |
44 |
<button id="new_notebook" title="Create new notebook" class="btn btn-sm |
|
44 | <button id="new_notebook" title="Create new notebook" class="btn btn-default btn-sm">New Notebook</button> | |
45 |
<button id="refresh_notebook_list" title="Refresh notebook list" class="btn btn-sm |
|
45 | <button id="refresh_notebook_list" title="Refresh notebook list" class="btn btn-default btn-sm"><i class="icon-refresh"></i></button> | |
46 | </span> |
|
46 | </span> | |
47 | </div> |
|
47 | </div> | |
48 | </div> |
|
48 | </div> | |
49 |
|
49 | |||
50 | <div id="notebook_list"> |
|
50 | <div id="notebook_list"> | |
51 |
<div id="notebook_list_header" class="row |
|
51 | <div id="notebook_list_header" class="row list_header"> | |
52 | <div id="project_name"> |
|
52 | <div id="project_name"> | |
53 | <ul class="breadcrumb"> |
|
53 | <ul class="breadcrumb"> | |
54 | <li><a href="{{breadcrumbs[0][0]}}"><i class="icon-home"></i></a><span>/</span></li> |
|
54 | <li><a href="{{breadcrumbs[0][0]}}"><i class="icon-home"></i></a><span>/</span></li> | |
@@ -63,19 +63,19 b' data-notebook-path="{{notebook_path}}"' | |||||
63 |
|
63 | |||
64 | <div id="running" class="tab-pane"> |
|
64 | <div id="running" class="tab-pane"> | |
65 |
|
65 | |||
66 |
<div id="running_toolbar" class="row |
|
66 | <div id="running_toolbar" class="row"> | |
67 | <div class="span8"> |
|
67 | <div class="span8"> | |
68 | <span id="running_list_info">Currently running IPython notebooks</span> |
|
68 | <span id="running_list_info">Currently running IPython notebooks</span> | |
69 | </div> |
|
69 | </div> | |
70 | <div class="span4" class="clearfix"> |
|
70 | <div class="span4" class="clearfix"> | |
71 | <span id="running_buttons" class="pull-right"> |
|
71 | <span id="running_buttons" class="pull-right"> | |
72 |
<button id="refresh_running_list" title="Refresh running list" class="btn btn-sm |
|
72 | <button id="refresh_running_list" title="Refresh running list" class="btn btn-default btn-sm"><i class="icon-refresh"></i></button> | |
73 | </span> |
|
73 | </span> | |
74 | </div> |
|
74 | </div> | |
75 | </div> |
|
75 | </div> | |
76 |
|
76 | |||
77 | <div id="running_list"> |
|
77 | <div id="running_list"> | |
78 |
<div id="running_list_header" class="row |
|
78 | <div id="running_list_header" class="row list_header"> | |
79 | <div> There are no notebooks running. </div> |
|
79 | <div> There are no notebooks running. </div> | |
80 | </div> |
|
80 | </div> | |
81 | </div> |
|
81 | </div> | |
@@ -83,19 +83,19 b' data-notebook-path="{{notebook_path}}"' | |||||
83 |
|
83 | |||
84 | <div id="clusters" class="tab-pane"> |
|
84 | <div id="clusters" class="tab-pane"> | |
85 |
|
85 | |||
86 |
<div id="cluster_toolbar" class="row |
|
86 | <div id="cluster_toolbar" class="row"> | |
87 | <div class="span8"> |
|
87 | <div class="span8"> | |
88 | <span id="cluster_list_info">IPython parallel computing clusters</span> |
|
88 | <span id="cluster_list_info">IPython parallel computing clusters</span> | |
89 | </div> |
|
89 | </div> | |
90 | <div class="span4" class="clearfix"> |
|
90 | <div class="span4" class="clearfix"> | |
91 | <span id="cluster_buttons" class="pull-right"> |
|
91 | <span id="cluster_buttons" class="pull-right"> | |
92 |
<button id="refresh_cluster_list" title="Refresh cluster list" class="btn btn-sm |
|
92 | <button id="refresh_cluster_list" title="Refresh cluster list" class="btn btn-default btn-sm"><i class="icon-refresh"></i></button> | |
93 | </span> |
|
93 | </span> | |
94 | </div> |
|
94 | </div> | |
95 | </div> |
|
95 | </div> | |
96 |
|
96 | |||
97 | <div id="cluster_list"> |
|
97 | <div id="cluster_list"> | |
98 |
<div id="cluster_list_header" class="row |
|
98 | <div id="cluster_list_header" class="row list_header"> | |
99 | <div class="profile_col span4">profile</div> |
|
99 | <div class="profile_col span4">profile</div> | |
100 | <div class="status_col span3">status</div> |
|
100 | <div class="status_col span3">status</div> | |
101 | <div class="engines_col span3" title="Enter the number of engines to start or empty for default"># of engines</div> |
|
101 | <div class="engines_col span3" title="Enter the number of engines to start or empty for default"># of engines</div> |
@@ -31,7 +31,7 b' casper.notebook_test(function () {' | |||||
31 |
|
31 | |||
32 | this.test.assert(this.cell_element_exists(index, |
|
32 | this.test.assert(this.cell_element_exists(index, | |
33 | '.widget-area .widget-subarea .widget-hbox-single .widget-hlabel'), |
|
33 | '.widget-area .widget-subarea .widget-hbox-single .widget-hlabel'), | |
34 | 'Checkbox label exists.'); |
|
34 | 'Checkbox label label-default exists.'); | |
35 |
|
35 | |||
36 | this.test.assert(this.cell_element_function(index, |
|
36 | this.test.assert(this.cell_element_function(index, | |
37 | '.widget-area .widget-subarea .widget-hbox-single .widget-hlabel', 'html')=="Title", |
|
37 | '.widget-area .widget-subarea .widget-hbox-single .widget-hlabel', 'html')=="Title", |
@@ -15,7 +15,7 b' casper.notebook_test(function () {' | |||||
15 | var selection_values = 'abcd'; |
|
15 | var selection_values = 'abcd'; | |
16 | var check_state = function(context, index, state){ |
|
16 | var check_state = function(context, index, state){ | |
17 | if (0 <= index && index < selection_values.length) { |
|
17 | if (0 <= index && index < selection_values.length) { | |
18 | var multibtn_state = context.cell_element_function(selection_index, multibtn_selector + ' .btn:nth-child(' + (index + 1) + ')', 'hasClass', ['active']); |
|
18 | var multibtn_state = context.cell_element_function(selection_index, multibtn_selector + ' .btn.btn-default:nth-child(' + (index + 1) + ')', 'hasClass', ['active']); | |
19 | var radio_state = context.cell_element_function(selection_index, radio_selector + ' .radio:nth-child(' + (index + 1) + ') input', 'prop', ['checked']); |
|
19 | var radio_state = context.cell_element_function(selection_index, radio_selector + ' .radio:nth-child(' + (index + 1) + ') input', 'prop', ['checked']); | |
20 | var list_val = context.cell_element_function(selection_index, list_selector, 'val'); |
|
20 | var list_val = context.cell_element_function(selection_index, list_selector, 'val'); | |
21 | var combo_val = context.cell_element_function(selection_index, combo_selector, 'html'); |
|
21 | var combo_val = context.cell_element_function(selection_index, combo_selector, 'html'); | |
@@ -105,7 +105,7 b' casper.notebook_test(function () {' | |||||
105 | this.test.assert(verify_selection(this, 2), 'List selection updated view states correctly.'); |
|
105 | this.test.assert(verify_selection(this, 2), 'List selection updated view states correctly.'); | |
106 |
|
106 | |||
107 | // Verify that selecting a multibutton option updates all of the others. |
|
107 | // Verify that selecting a multibutton option updates all of the others. | |
108 | this.cell_element_function(selection_index, multibtn_selector + ' .btn:nth-child(4)', 'click'); |
|
108 | this.cell_element_function(selection_index, multibtn_selector + ' .btn.btn-default:nth-child(4)', 'click'); | |
109 | }); |
|
109 | }); | |
110 | this.wait_for_idle(); |
|
110 | this.wait_for_idle(); | |
111 | this.then(function () { |
|
111 | this.then(function () { |
@@ -62,7 +62,7 b' casper.notebook_test(function () {' | |||||
62 | }); |
|
62 | }); | |
63 |
|
63 | |||
64 | // Test accordion view |
|
64 | // Test accordion view | |
65 |
var multicontainer2_query = '.widget-area .widget-subarea . |
|
65 | var multicontainer2_query = '.widget-area .widget-subarea .panel-group'; | |
66 | var multicontainer2_index = this.append_cell( |
|
66 | var multicontainer2_index = this.append_cell( | |
67 | 'multicontainer = widgets.AccordionWidget()\n' + |
|
67 | 'multicontainer = widgets.AccordionWidget()\n' + | |
68 | 'page1 = widgets.TextWidget()\n' + |
|
68 | 'page1 = widgets.TextWidget()\n' + | |
@@ -83,19 +83,19 b' casper.notebook_test(function () {' | |||||
83 | 'Widget subarea exists.'); |
|
83 | 'Widget subarea exists.'); | |
84 |
|
84 | |||
85 | this.test.assert(this.cell_element_exists(index, multicontainer2_query), |
|
85 | this.test.assert(this.cell_element_exists(index, multicontainer2_query), | |
86 |
'Widget |
|
86 | 'Widget panel-group exists.'); | |
87 |
|
87 | |||
88 | this.test.assert(this.cell_element_exists(index, multicontainer2_query + |
|
88 | this.test.assert(this.cell_element_exists(index, multicontainer2_query + | |
89 |
' . |
|
89 | ' .panel.panel-default:nth-child(1) .panel-collapse'), | |
90 |
'First |
|
90 | 'First panel-group page exists.'); | |
91 |
|
91 | |||
92 | // JQuery selector is 1 based |
|
92 | // JQuery selector is 1 based | |
93 | this.test.assert(this.cell_element_function(index, multicontainer2_query + |
|
93 | this.test.assert(this.cell_element_function(index, multicontainer2_query + | |
94 |
' . |
|
94 | ' .panel.panel-default:nth-child(3) .panel-heading .accordion-toggle', | |
95 | 'html')=='good', 'Accordion page title set (before display).'); |
|
95 | 'html')=='good', 'Accordion page title set (before display).'); | |
96 |
|
96 | |||
97 | // JQuery selector is 1 based |
|
97 | // JQuery selector is 1 based | |
98 |
this.click(multicontainer2_query + ' . |
|
98 | this.click(multicontainer2_query + ' .panel.panel-default:nth-child(2) .panel-heading .accordion-toggle'); | |
99 | }); |
|
99 | }); | |
100 |
|
100 | |||
101 | this.wait_for_idle(); |
|
101 | this.wait_for_idle(); | |
@@ -106,7 +106,7 b' casper.notebook_test(function () {' | |||||
106 | 'selected_index property updated with tab change.'); |
|
106 | 'selected_index property updated with tab change.'); | |
107 |
|
107 | |||
108 | var is_collapsed = this.evaluate(function(s){ |
|
108 | var is_collapsed = this.evaluate(function(s){ | |
109 |
return $(s + ' div. |
|
109 | return $(s + ' div.panel.panel-default:nth-child(2) a').hasClass('collapsed'); // 1 based | |
110 | }, {s: multicontainer2_query}); |
|
110 | }, {s: multicontainer2_query}); | |
111 | this.test.assertEquals(is_collapsed, false, 'Was tab actually opened?'); |
|
111 | this.test.assertEquals(is_collapsed, false, 'Was tab actually opened?'); | |
112 | }); |
|
112 | }); |
General Comments 0
You need to be logged in to leave comments.
Login now