//---------------------------------------------------------------------------- // Copyright (C) 2008-2012 The IPython Development Team // // Distributed under the terms of the BSD License. The full license is in // the file COPYING, distributed as part of this software. //---------------------------------------------------------------------------- //============================================================================ // EngineInteract //============================================================================ var key = IPython.utils.keycodes; var DirectViewWidget = function (selector, kernel, targets) { // The kernel doesn't have to be set at creation time, in that case // it will be null and set_kernel has to be called later. this.selector = selector; this.element = $(selector); this.kernel = kernel || null; this.code_mirror = null; this.targets = targets; this.create_element(); }; DirectViewWidget.prototype.create_element = function () { this.element.addClass('cell border-box-sizing code_cell vbox'); this.element.attr('tabindex','2'); this.element.css('padding-right',0); var control = $('
').addClass('dv_control').height('30px'); var control_label = $('').html('Select engine(s) to run code on interactively: '); control_label.css('line-height','30px'); var select = $('