##// END OF EJS Templates
Added ability to specify the element that gets style in a view...
Jonathan Frederic -
Show More
@@ -316,10 +316,16 define(["components/underscore/underscore-min",
316 if (this.model.css.hasOwnProperty(selector)) {
316 if (this.model.css.hasOwnProperty(selector)) {
317
317
318 // Get the elements via the css selector. If the selector is
318 // Get the elements via the css selector. If the selector is
319 // blank, assume the current element is the target.
319 // blank, apply the style to the $el_to_style element. If
320 // the $el_to_style element is not defined, use apply the
321 // style to the view's element.
320 var elements = this.$el.find(selector);
322 var elements = this.$el.find(selector);
321 if (selector=='') {
323 if (selector=='') {
324 if (this.$el_to_style == undefined) {
322 elements = this.$el;
325 elements = this.$el;
326 } else {
327 elements = this.$el_to_style;
328 }
323 }
329 }
324
330
325 // Apply the css traits to all elements that match the selector.
331 // Apply the css traits to all elements that match the selector.
General Comments 0
You need to be logged in to leave comments. Login now