Edgewall Software
Modify

Opened 14 years ago

Closed 13 years ago

Last modified 12 years ago

#10165 closed enhancement (fixed)

Upgrade to jQuery 1.7.x

Reported by: Christian Boos Owned by: Jun Omae
Priority: normal Milestone: 1.0
Component: general Version: 0.13dev
Severity: normal Keywords: jquery javascript
Cc: Branch:
Release Notes:

Upgraded jQuery to 1.7.2.

API Changes:

Upgraded jQuery to 1.7.2.

Internal Changes:

Description

http://blog.jquery.com/2011/05/03/jquery-16-released/

Shouldn't be a big deal, but as usual with a new major version, careful testing is needed (and early exposure in trunk could bring that).

Also the .prop(), .removeProp(), and .attr() section there made me think of our little discussion about .checked in threaded comments(ticket:7145#comment:28). We should experiment.

Attachments (0)

Change History (9)

comment:1 by Anton, 13 years ago

Summary: Upgrade to jQuery 1.6.xUpgrade to jQuery 1.7.x

By the way:

this ticket should be upgrade to jQuery 1.7.x or whatever is actual at the release date.

I just changed the title to 1.7.x Actually the 1.7.2 beta is out: http://blog.jquery.com/2012/01/31/jquery-1-7-2-beta-1-released/

comment:2 by Christian Boos, 13 years ago

Upgraded to 1.7.2 in r11035.

I didn't notice any regression in Chrome yet, but there's one in IE (7 and 8 but not 9): for the semi-automatic bug report, the newlines are missing in the description, so the structure in the wiki text is lost.

Last edited 13 years ago by Christian Boos (previous) (diff)

in reply to:  2 ; comment:3 by Christian Boos, 13 years ago

Replying to cboos:

in IE (7 and 8 but not 9): for the semi-automatic bug report, the newlines are missing in the description, so the structure in the wiki text is lost.

The following works:

  • trac/templates/error.html

     
    4646    <script type="text/javascript">/*<![CDATA[*/
    4747      jQuery(document).ready(function($) {
    4848        $("form.newticket textarea").each(function() {
    49           $(this).text($(this).text()
     49          $(this).text($(this).html().replace(/\r/g, '')
    5050                         .replace(/#USER_AGENT#/m, navigator.userAgent)
    5151                         .replace(/#JQUERY#/m, $().jquery));
    5252        });

However, looking at the jQuery code, it seems that the code which removed the newlines is no longer present in 1.7.3pre (referring to http://bugs.jquery.com/ticket/11153 instead).

So maybe the best course of action for this little issue is to simply wait for the next upgrade, 1.7.3.

in reply to:  3 ; comment:4 by Jun Omae, 13 years ago

Replying to cboos:

Replying to cboos:

in IE (7 and 8 but not 9): for the semi-automatic bug report, the newlines are missing in the description, so the structure in the wiki text is lost.

The following works: #!diff...

I wonder we don't use .val() instead of .text()…. It works on Firefox 11, Chrome 19 and IE 8.

  • trac/templates/error.html

     
    4646    <script type="text/javascript">/*<![CDATA[*/
    4747      jQuery(document).ready(function($) {
    4848        $("form.newticket textarea").each(function() {
    49           $(this).text($(this).text()
    50                          .replace(/#USER_AGENT#/m, navigator.userAgent)
    51                          .replace(/#JQUERY#/m, $().jquery));
     49          $(this).val($(this).val()
     50                      .replace(/#USER_AGENT#/m, navigator.userAgent)
     51                      .replace(/#JQUERY#/m, $().jquery));
    5252        });
    5353      });
    5454    /*]]>*/</script>

in reply to:  4 ; comment:5 by Christian Boos, 13 years ago

Replying to jomae:

I wonder we don't use .val() instead of .text()…. It works on Firefox 11, Chrome 19 and IE 8.

… and indeed doesn't need the .replace(/\r/g, '') trick!

I overlooked .val() in the jQuery API. It seems totally appropriate to use it here. Please commit!

in reply to:  5 comment:6 by Jun Omae, 13 years ago

Replying to cboos:

… and indeed doesn't need the .replace(/\r/g, '') trick!

I overlooked .val() in the jQuery API. It seems totally appropriate to use it here. Please commit!

Ok, committed in [11037].

comment:7 by Christian Boos, 13 years ago

Owner: set to Jun Omae

I just noticed we were still running r11033 on t.e.o (i.e. with jQuery 1.5.1). Let's get a bit more exposure before closing this ticket (reassigning to jun, as he's to one having contributed the significant fix on this topic).

comment:8 by Remy Blank, 13 years ago

API Changes: modified (diff)
Resolution: fixed
Status: newclosed

We have been running [11050] (jQuery 1.7.2 as on trunk) since June 3rd, and haven't noticed any regressions.

comment:9 by Christian Boos, 12 years ago

Release Notes: modified (diff)

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Jun Omae.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Jun Omae 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.