//---------------------------------------------------------------------------- // Copyright (C) 2013 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. //---------------------------------------------------------------------------- //============================================================================ // SelectionWidget //============================================================================ /** * @module IPython * @namespace IPython **/ define(["notebook/js/widgets/base"], function(widget_manager){ var SelectionWidgetModel = IPython.WidgetModel.extend({}); widget_manager.register_widget_model('SelectionWidgetModel', SelectionWidgetModel); var DropdownView = IPython.WidgetView.extend({ // Called when view is rendered. render : function(){ this.$el .addClass('widget-hbox-single') .html(''); this.$label = $('
') .appendTo(this.$el) .addClass('widget-hlabel') .hide(); this.$buttongroup = $('
') .addClass('widget_item') .addClass('btn-group') .appendTo(this.$el); this.$el_to_style = this.$buttongroup; // Set default element to style this.$droplabel = $('