From cd67e1aca711ee93c0cc0cd479bbee006fae2ebd Mon Sep 17 00:00:00 2001 From: Bussonnier Matthias Date: Fri, 12 Dec 2014 16:19:39 +0100 Subject: [PATCH] return elements instead of append them directly + jshint fixes --- IPython/html/static/notebook/js/maintoolbar.js | 15 +++++++++------ IPython/html/static/notebook/js/toolbar.js | 2 +- 2 files changed, 10 insertions(+), 7 deletions(-) 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($('