Bad jquery selector in viewsdisplaytabs.js
rwaesely - December 21, 2009 - 14:18
| Project: | Views Display Tabs |
| Version: | 6.x-1.0-beta4 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | rwaesely |
| Status: | closed |
Jump to:
Description
When the tab includes a view, the jquery expression line 56 (viewsdsiplaytabs.js)
var parentView = $(elem).parents().find('div.view').attr('class');
has a jquery find call, which returns all the div elements having a view class attribute, while the expected behavior is to get only the container element of the tab link element. In other words, this call is heavier, and make bugs when our tabs include other div.vew elements
so you should replace it by the following:
var parentView = $(elem).parents().filter('div.view').attr('class');
it's faster to execute obviously, and works everywhere I could test it.
Best regards

#1
Would you consider packaging this as a patch instead?
#2
Well I'm really busy these times, so it will not be before a long time. But do you think a patch is usefull for only one line ? Sorry if my question seems stupid, I'm not really used to this way to deal with issues...
#3
Have confirmed that this patch solves some problems with this (great) module... should be rolled.
#4
rwaesely: I'm insanely busy too - hence the request.
davidlerin: I'd roll if if it were an actual patch :)
#5
Fixed.
#6