diff --git a/IPython/html/static/notebook/js/maintoolbar.js b/IPython/html/static/notebook/js/maintoolbar.js
index e166a6bec..d4d500a70 100644
--- a/IPython/html/static/notebook/js/maintoolbar.js
+++ b/IPython/html/static/notebook/js/maintoolbar.js
@@ -6,7 +6,7 @@ define([
'base/js/namespace',
'jquery',
'./toolbar',
- './celltoolbar',
+ './celltoolbar'
], function(require, IPython, $, toolbar, celltoolbar) {
"use strict";
@@ -52,11 +52,11 @@ define([
'move_up_down'],
[ ['ipython.run-select-next',
'ipython.interrupt-kernel',
- 'ipython.restart-kernel',
+ 'ipython.restart-kernel'
],
'run_int'],
[''],
- [''],
+ ['']
];
this.construct(grps);
};
@@ -95,13 +95,13 @@ define([
case 'heading':
that.notebook._warn_heading();
that.notebook.to_heading();
- sel.val('markdown')
+ sel.val('markdown');
break;
default:
console.log("unrecognized cell type:", cell_type);
}
});
- this.element.append(sel);
+ return sel;
};
@@ -111,7 +111,6 @@ define([
.attr('id', 'ctb_select')
.addClass('form-control select-xs')
.append($('').attr('value', '').text('None'));
- this.element.append(label).append(select);
var that = this;
select.change(function() {
var val = $(this).val();
@@ -140,6 +139,10 @@ define([
if (select.val() !== data.name)
select.val(data.name);
});
+
+ var wrapper = $('').addClass('btn-group');
+ wrapper.append(label).append(select);
+ return wrapper;
};
// Backwards compatibility.
diff --git a/IPython/html/static/notebook/js/toolbar.js b/IPython/html/static/notebook/js/toolbar.js
index 17c03aef6..eba6e110d 100644
--- a/IPython/html/static/notebook/js/toolbar.js
+++ b/IPython/html/static/notebook/js/toolbar.js
@@ -95,7 +95,7 @@ define([
var _pseudo_action;
try{
_pseudo_action = list.slice(1,-1);
- this._pseudo_actions[_pseudo_action].call(this);
+ this.element.append(this._pseudo_actions[_pseudo_action].call(this));
} catch (e) {
console.warn('ouch, calling ', _pseudo_action, 'does not seem to work...:', e);
}