Currently, there is no way to tell what version of 'jquery' drupal is running. You can not tell by looking at the jquery.js, because it is compressed javascript (or what ever the correct term is)
This is a patch to adds the jquery version number (current the SVN version and not the release version) to the status page. If any one knows how to get the release version number from jquery, Let me know.
I got the idea from this other issue http://drupal.org/node/82762
Note: This is my first orignal idea for drupal, and my first patch (that is not just someone else's fixed patch) I need your input to make the up to the drupal standards.
Comments
Comment #1
gopherspidey commentedA small upgrade.
I changed it from "info" to "warning". Then I change it back to info in javascript. Aka it is info when javascript is enable. It is warning when you have javascript disabled.
Comment #2
gopherspidey commentedSmall cleanup. I remove the Version: As it was reduntant.
Comment #3
Uwe Hermann commented+1 for the feature. I'd change Jquery to the official name jQuery, though.
Comment #4
Uwe Hermann commentedOh, and I tested the patch, works fine.
Comment #5
gopherspidey commentedOk another minor update.
I have remove the parent().parent() and replaced it with ancestors('.warning'). This will allow the theme designers to be able to change the table to anything they want provided that the warning class is still a parent to the 'system-jquery' class. I did not like the hard coded 2 parent requirement.
I have also remove the $ from the jQuery version string.
I also updated Jquery to be jQuery.
Comment #6
drummCommitted to HEAD with fixes for code style and punctuation.
Comment #7
Steven commentedDo we really need this?
The status page is intended for administrators... The jQuery version is purely developer information.
Also, jQuery versions will map 1-to-1 to a Drupal version. So, the jQuery version is best mentioned in the CHANGELOG or release announcement, and only when we include a new jQuery release. The point is that a developer should not even need to look up the jQuery version (and if they really want to, they can do a
javascript:alert($().jquery);). Plus, we don't even display the real jQuery version, but only the SVN revision number.What it comes down to is that this status report item is nothing but a very confusing client-side 'Is JavaScript on?' indicator. If I get a warning, my first thought is that I somehow disabled JavaScript features in my Drupal installation. It does not belong between a bunch of server-side indicators. And even if it were worded clearly, it has no use to an admin and it certainly should not be the second item on the list.
Finally, the JavaScript code is pretty bad.
$.ready()is no excuse for having a warning flash out of existance when the page loads (think incremental rendering). Plus, jQuery selectors should be as specific as possible (to avoid scanning the whole DOM). Finally, semi-colons should be used to terminate statements.+1 for rolling this back.
Comment #8
chx commentedthe committers will never see this unless it's RTBC.
Comment #9
webchickBased on Steven's well-reasoned response, I would also support this being rolled back.
I can see where the original patch creator was coming from, however. So this should probably be included elsewhere in the application. So here's a patch to add it to CHANGELOG.txt.
Comment #10
dries commented+1 on rollback. The added value of this is close to zero. :)
Comment #11
gopherspidey commentedThe whole reason for this patch was to get the real (not SVN rev) version visible any where within drupal. The only thing that I could find to print out the version number of jQuery was the SVN rev. I looked for a real version number in the changelog everywhere within drupal. I could not find the version number any where at all. I finallly ran across it in a post to a issue or forum by Steven.
If the jquery.js file had the version in that would be ok. I just needs to be somewhere. And I do not think we should make people hunt for it. So being only in the changelog (in my opinion) is not good enough. At least the first place I looked was within the jQuery.js file.
P.S. You have to excuse my poor javascripting skills. It was the first time I ever coded javascript within drupal. And the first time to use jQuery library.
Comment #12
drummRolled back (for the record, I was undecided on this issue, but couldn't find a good reason to deny it at the time).
Comment #13
(not verified) commentedComment #14
smptebars1 commentedwhere do we place this patch?