Show More
@@ -115,6 +115,7 define(["notebook/js/widget"], function(widget_manager) { | |||||
115 | that.$body.outerHeight(that.$window.innerHeight() - that.$title_bar.outerHeight()); |
|
115 | that.$body.outerHeight(that.$window.innerHeight() - that.$title_bar.outerHeight()); | |
116 | }) |
|
116 | }) | |
117 |
|
117 | |||
|
118 | this.$el_to_style = this.$body; | |||
118 | this._shown_once = false; |
|
119 | this._shown_once = false; | |
119 | }, |
|
120 | }, | |
120 |
|
121 | |||
@@ -165,6 +166,25 define(["notebook/js/widget"], function(widget_manager) { | |||||
165 | this.$body.append(view.$el); |
|
166 | this.$body.append(view.$el); | |
166 | }, |
|
167 | }, | |
167 |
|
168 | |||
|
169 | _get_selector_element: function(selector) { | |||
|
170 | ||||
|
171 | // Since the modal actually isn't within the $el in the DOM, we need to extend | |||
|
172 | // the selector logic to allow the user to set css on the modal if need be. | |||
|
173 | // The convention used is: | |||
|
174 | // "modal" - select the modal div | |||
|
175 | // "modal [selector]" - select element(s) within the modal div. | |||
|
176 | // "[selector]" - select elements within $el | |||
|
177 | // "" - select the $el_to_style | |||
|
178 | if (selector.substring(0, 5) == 'modal') { | |||
|
179 | if (selector == 'modal') { | |||
|
180 | return this.$window; | |||
|
181 | } else { | |||
|
182 | return this.$window.find(selector.substring(6)); | |||
|
183 | } | |||
|
184 | } else { | |||
|
185 | return IPython.WidgetView.prototype._get_selector_element.call(this, selector); | |||
|
186 | } | |||
|
187 | }, | |||
168 |
|
188 | |||
169 | }); |
|
189 | }); | |
170 |
|
190 |
General Comments 0
You need to be logged in to leave comments.
Login now