mirror of
https://github.com/jupyter/notebook.git
synced 2024-12-27 04:20:22 +08:00
Added ability to specify the element that gets style in a view
when no jquery selector is provided (default).
This commit is contained in:
parent
c95fbfad28
commit
19f0372f54
@ -316,10 +316,16 @@ define(["components/underscore/underscore-min",
|
|||||||
if (this.model.css.hasOwnProperty(selector)) {
|
if (this.model.css.hasOwnProperty(selector)) {
|
||||||
|
|
||||||
// Get the elements via the css selector. If the selector is
|
// Get the elements via the css selector. If the selector is
|
||||||
// blank, assume the current element is the target.
|
// blank, apply the style to the $el_to_style element. If
|
||||||
|
// the $el_to_style element is not defined, use apply the
|
||||||
|
// style to the view's element.
|
||||||
var elements = this.$el.find(selector);
|
var elements = this.$el.find(selector);
|
||||||
if (selector=='') {
|
if (selector=='') {
|
||||||
elements = this.$el;
|
if (this.$el_to_style == undefined) {
|
||||||
|
elements = this.$el;
|
||||||
|
} else {
|
||||||
|
elements = this.$el_to_style;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Apply the css traits to all elements that match the selector.
|
// Apply the css traits to all elements that match the selector.
|
||||||
|
Loading…
Reference in New Issue
Block a user