Edgewall Software
Modify

Opened 15 years ago

Closed 15 years ago

#8594 closed enhancement (fixed)

obsolete JQuery in trac.js

Reported by: B.Ogryczak@… Owned by: Christian Boos
Priority: normal Milestone: 0.11.6
Component: web frontend Version: 0.11-stable
Severity: normal Keywords: jquery
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

trac.js uses JQuery's 1.1 [@selectors], which are considered deprecated in JQuery 1.2, and fail completely in current version of JQuery (1.3).

Patch:

--- trac.js.orig        2009-08-24 15:15:45.000000000 +0200
+++ trac.js     2009-08-24 15:14:19.000000000 +0200
@@ -2,7 +2,7 @@

   $.fn.addAnchor = function(title) {
     title = title || "Link here";
-    return this.filter("*[@id]").each(function() {
+    return this.filter("*[id]").each(function() {
       $("<a class='anchor'> \u00B6</a>").attr("href", "#" + this.id)
         .attr("title", title).appendTo(this);
     });
@@ -25,7 +25,7 @@
       this.disabled = !enabled;
       var label = $(this).parents("label");
       if (!label.length && this.id) {
-        label = $("label[@for='" + this.id + "']");
+        label = $("label[for='" + this.id + "']");
       }
       if (!enabled) {
         label.addClass("disabled");

Attachments (0)

Change History (8)

comment:1 by Remy Blank, 15 years ago

Resolution: duplicate
Status: newclosed

Yep, and that was fixed in trunk (see [7982]), which has JQuery 1.3. In #7982 it was decided to leave 0.11-stable at 1.2.

comment:2 by Christian Boos, 15 years ago

Resolution: duplicate
Status: closedreopened

Yes, but…

comment:3 by Christian Boos, 15 years ago

Milestone: 0.11.6
Owner: set to Christian Boos
Status: reopenednew

I think we can find a middle ground: making Trac itself compatible with jQuery 1.3 and still bundle jQuery 1.2.6.

That way, people knowing they don't use any problematic plugin can upgrade by themselves to jQuery 1.3 simply by replacing jquery.js.

comment:4 by Christian Boos, 15 years ago

And the other ticket was #8511 ;-)

in reply to:  1 comment:5 by B.Ogryczak@…, 15 years ago

Replying to rblank:

Yep, and that was fixed in trunk (see [7982]), which has JQuery 1.3. In #7982 it was decided to leave 0.11-stable at 1.2.

Ok, but even in 1.2 it already is deprecated. This is JQuery 1.1 syntax. Correct JQuery 1.2 syntax is without @.

I believe it should be backported to 0.11.

in reply to:  3 comment:6 by anonymous, 15 years ago

Replying to cboos:

I think we can find a middle ground: making Trac itself compatible with jQuery 1.3 and still bundle jQuery 1.2.6.

That way, people knowing they don't use any problematic plugin can upgrade by themselves to jQuery 1.3 simply by replacing jquery.js.

Exaclly. JQuery 1.2 code is compatible with 1.3. What I'm complaining about is JQuery 1.1 code.

in reply to:  3 comment:7 by Remy Blank, 15 years ago

Replying to cboos:

I think we can find a middle ground: making Trac itself compatible with jQuery 1.3 and still bundle jQuery 1.2.6.

Fair enough. I just didn't see this as fitting the "only considering serious bug fixes and eventually performance tweaks" criterion.

comment:8 by Christian Boos, 15 years ago

Resolution: fixed
Status: newclosed

It passes the "eventually performance tweaks" one ;-)

So…

Relevant parts of r7982 backported in r8503, unfortunately the svn:mergeinfo property change for this already appears in r8502, as I played with several patches and forgot about the property change…

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Christian Boos.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Christian Boos to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.