Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Update jquery + jquery plugins to the last versions #5663

Closed
mattab opened this Issue Jun 4, 2008 · 33 comments

Comments

Projects
None yet
4 participants
Owner

mattab commented Jun 4, 2008

Task
Update javascript librairies to their latest/fastest releases: jquery, jquery plugins, swfobject.

jquery

http://feeds.feedburner.com/~r/ajaxian/~3/303858275/jquery-release-126-performance-improvements-and-dimensions-plugin-added-to-core

We are using fast changing libraries in Piwik. We should try to upgrade the libraries as often as possible, every few months, so we stay in line with the APIs and latest features.

A new release of jQuery is out 1.2.6. The headlines on improvements:
\* Event handling: 103%
\* CSS selectors: 13%
\* .offset: 21%
\* .css: 25%

Lots of other fixes, but the most important, IMHO, is the inclusion of Brandon Aarons Dimensions plugin cross browser support for find element dimensions, offsets and positioning in the jQuery core. Check out the release notes here.

As we are using dimensions and jquery, we definitely should upgrade to this new version.

testing
- http://dev.piwik.org/trac/wiki/HowToTestUI Go through the UI checklist after the upgrade to make sure it hasn’t broken the ui on ie/ff at least

jquery is really sure to make an automatic update without tests from piwik time ? And it’s a little useless, because the new features (without some improvements) aren’t used yet (piwik can’t be based on a future-release of jquery)

Contributor

pebosi commented Nov 8, 2008

i tested (http://dev.piwik.org/trac/wiki/HowToTestUI) with firefox and used jquery-1.2.6-min, following results:

  1. Test Include/Exclude low population
    - Does not work, but maby there are to less entries, tried on action→pages and providers
  1. Actions pages table failed on “Different styles for Odd/Even lines”
  1. Actions Tables are not sortable

maybe the weren’t before…

  1. Make sure that already added widgets cannot be added again

Its not klickable but if i click there is a new box wich says “Loading widget please weight” and im still waiting :)

last thing i saw is that the menus of language- and site selection are visible and without arrows…

Contributor

pebosi commented Nov 8, 2008

next test was with updated swfobject, no problems.

Contributor

pebosi commented Nov 8, 2008

sorry, the new swfobject hides all graphs.

Contributor

pebosi commented Nov 8, 2008

what other jquery plugins are to be tested?

Contributor

robocoder commented Dec 9, 2008

jQuery (current: 1.2.2; latest: 1.2.6)

SWFObject (current: 1.5; latest 2.1)
swfobject plugin (not used; latest: 1.0.3) http://jquery.thewikies.com/swfobject/

fdd2div (current: 1.0; latest: 1.0.1) Don’t know if it fixes ticket #451.
superfish (current: 1.4.1; latest: 1.4.8)
thickbox (current/latest: 3.1)
tooltip (current: 1.1; latest: 1.3)

truncate (version ???) Could look into using http://www.reindel.com/truncate/ (v2.3)

Contributor

robocoder commented Dec 29, 2008

re: pebosi’s observations re: the latest swfobject; the API changed, i.e., the object interface is gone

matt added in email: “Also we have patched some libs (UI sortable, fdd2div, superfish) so let’s not update these ones.”

Contributor

robocoder commented Dec 31, 2008

Attachment: swfobject 2.1 update: replace 3 files, add libs/swfobject/expressInstall.swf (though not currently used), and remove libs/swfobject/README.txt
[243_swfobject.zip](http://issues.piwik.org/attachments/5663/243_swfobject.zip)

Contributor

robocoder commented Jan 1, 2009

Attachment: Sync with sparkline cvs repository (minor bug fixes & dual license change)
[243_sparkline.zip](http://issues.piwik.org/attachments/5663/243_sparkline.zip)

Contributor

robocoder commented Jan 1, 2009

fdd2div (original and modified) are broken by jquery 1.2.6

Contributor

robocoder commented Jan 1, 2009

Notes: ui.mouse was moved into the jquery ui.core in 1.5.3; similarly, calendar was adopted as ui.datepicker

Contributor

robocoder commented Jan 2, 2009

Attachment: Fix for jquery 1.2.6.
[fdd2div-modified.js](http://issues.piwik.org/attachments/5663/fdd2div-modified.js)

Contributor

robocoder commented Jan 2, 2009

Attachment: Update to jquery-tooltip from 1.1 to 1.3; minor changes as a result of $.fn.Toolkit() being deprecated & removed in favor of $.fn.toolkit()
[243_tooltip.zip](http://issues.piwik.org/attachments/5663/243_tooltip.zip)

Contributor

robocoder commented Jan 2, 2009

TODO: “Loading data” for swfobject isn’t centred (appears in the top left corner) in the widget.

Contributor

robocoder commented Jan 2, 2009

Suggest update of swfobject should coincide with resolution of ticket #322 (update to Open Flash Chart v2).

Contributor

robocoder commented Jan 2, 2009

Attachment: Forward port changes to jquery-superfish 1.4.8 and use superfish arrows
[243_superfish.zip](http://issues.piwik.org/attachments/5663/243_superfish.zip)

Contributor

robocoder commented Jan 5, 2009

Updated blockUI (from 1.33 to 2.11), dimensions (from 1.1.2 to 1.2), and scrollTo (from 1.3 to 1.4) unchanged, with no apparent ill effect. I left ui.mouse, ui.sortable, and calendar alone (as there are big differences going to jquery.ui 1.5.3).

I’ll put together a patch and/or zip that rolls up all the above. If there’s no objection, I’ll probably use the YUI compressor to minify the locally modified versions of fdd2div and superfish.

Contributor

robocoder commented Jan 8, 2009

Here’s the roll-up of changes:

Summary of changes:
- jQuery updated from 1.2.2 to 1.2.6
- swfobject updated from 1.5 to 2.1
- sparkline updated from upstream cvs
- fdd2div fixed to work with jQuery 1.2.6, and yuicompress’d
- tooltip updated from 1.1 to 1.3
- superfish updated from 1.4.1 to 1.4.8, and yuicompress’d
- blockUI updated from 1.33 to 2.11
- dimensions updated from 1.1.2 to 1.2
- scrollTo updated from 1.3 to 1.4

Files added:
- libs/jquery/original\ lib/fdd2div-modified.js
- libs/jquery/original\ lib/superfish_modified.js
- libs/sparkline/LICENSE-BSD.txt
- libs/sparkline/LICENSE-GPL.txt
- libs/swfobject/expressInstall.swf

Files removed:
- libs/sparkline/LICENSE
- libs/swfobject/README.txt

No change to: ui.mouse, ui.sortable, and calendar

(Attachment to follow.)

Contributor

robocoder commented Jan 10, 2009

Attachment: Replaces patch for core/ViewDataTable/GenerateGraphHTML.php.
[GenerateGraphHTML.diff](http://issues.piwik.org/attachments/5663/GenerateGraphHTML.diff)

Owner

mattab commented Jan 14, 2009

vipsoft, thank for the patches.

Can you please confirm, that after applying all your patches, you have tested your updated Piwik following the procedure described in http://dev.piwik.org/trac/wiki/HowToTestUI (I’ve just slightly updated it); I would recommend testing with Firefox, Internet explorer, and Safari (or Chrome): the three major web engines.

This is really important to make sure there are no regression in the UI.

Contributor

robocoder commented Jan 14, 2009

I’ll let you know when I’m done testing.

Contributor

robocoder commented Jan 16, 2009

Matt: I’ve had to halt testing as there’s a major regression where Dashboard changes (e.g., adding/removing/re-adding widgets) manipulates the DOM and leaves it in a bad state. I’ll continue to investigate…

To anyone else monitoring this ticket: there were some other regressions which I’ve since fixed but are not reflected in the previously attached files.

Contributor

robocoder commented Jan 17, 2009

Ok, patches are on their way. I’ll also include a fix to ticket #506.

Contributor

robocoder commented Jan 18, 2009

Attachment: Roll-up – contains diffs and new files
[243.zip](http://issues.piwik.org/attachments/5663/243.zip)

Contributor

pebosi commented Jan 23, 2009

tried to apply the diff to my piwik installation, but patching of some files failed:

#############

patching file plugins/Dashboard/templates/Dashboard.js
patching file plugins/Dashboard/templates/widgetMenu.js
patching file plugins/UsersManager/templates/UsersManager.js
patching file plugins/CoreHome/templates/datatable.js
patching file plugins/CoreHome/templates/menu.tpl
patching file plugins/Goals/templates/single_goal.tpl
patching file core/Visualization/OpenFlashChart.php
patching file core/ViewDataTable/GenerateGraphHTML.php
Hunk #2 FAILED at 100.
1 out of 2 hunks FAILED — saving rejects to file core/ViewDataTable/GenerateGraphHTML.php.rej
patching file libs/jquery/jquery.blockUI.js
Hunk #1 FAILED at 1.
1 out of 1 hunk FAILED — saving rejects to file libs/jquery/jquery.blockUI.js.rej
patching file libs/jquery/superfish_modified.js
Hunk #2 FAILED at 10.
1 out of 2 hunks FAILED — saving rejects to file libs/jquery/superfish_modified.js.rej
patching file libs/jquery/tooltip/___jquery.tooltip.js
patching file libs/jquery/tooltip/jquery.tooltip.js
Hunk #1 FAILED at 1.
1 out of 1 hunk FAILED — saving rejects to file libs/jquery/tooltip/jquery.tooltip.js.rej
patching file libs/jquery/tooltip/changelog.txt
Hunk #1 FAILED at 1.
Hunk #2 FAILED at 35.
2 out of 2 hunks FAILED — saving rejects to file libs/jquery/tooltip/changelog.txt.rej
patching file libs/jquery/jquery.scrollTo.js
Hunk #1 FAILED at 1.
1 out of 1 hunk FAILED — saving rejects to file libs/jquery/jquery.scrollTo.js.rej
patching file libs/jquery/jquery.js
Hunk #1 FAILED at 1.
1 out of 1 hunk FAILED — saving rejects to file libs/jquery/jquery.js.rej
patching file ‘libs/jquery/original lib/jquery.blockUI.js’
patching file ‘libs/jquery/original lib/jquery.dimensions.js’
Hunk #1 FAILED at 2.
1 out of 1 hunk FAILED — saving rejects to file ‘libs/jquery/original lib/jquery.dimensions.js.rej’
patching file ‘libs/jquery/original lib/jquery.js’
Hunk #1 FAILED at 1.
1 out of 1 hunk FAILED — saving rejects to file ‘libs/jquery/original lib/jquery.js.rej’
patching file ‘libs/jquery/original lib/jquery.scrollTo.js’
Hunk #2 FAILED at 21.
1 out of 2 hunks FAILED — saving rejects to file ‘libs/jquery/original lib/jquery.scrollTo.js.rej’
patching file libs/jquery/jquery.dimensions.js
Hunk #1 FAILED at 1.
1 out of 1 hunk FAILED — saving rejects to file libs/jquery/jquery.dimensions.js.rej
patching file libs/jquery/jquery.scrollTo-min.js
Hunk #1 FAILED at 1.
1 out of 1 hunk FAILED — saving rejects to file libs/jquery/jquery.scrollTo-min.js.rej
patching file libs/jquery/fdd2div-modified.js
Hunk #1 FAILED at 41.
Hunk #2 FAILED at 70.
2 out of 2 hunks FAILED — saving rejects to file libs/jquery/fdd2div-modified.js.rej
patching file libs/swfobject/swfobject.js
Hunk #1 FAILED at 1.
1 out of 1 hunk FAILED — saving rejects to file libs/swfobject/swfobject.js.rej
patching file libs/swfobject/README.txt
Hunk #1 FAILED at 5.
1 out of 1 hunk FAILED — saving rejects to file libs/swfobject/README.txt.rej
patching file libs/sparkline/lib/Sparkline_Bar.php
patching file libs/sparkline/lib/Sparkline_Line.php
patching file libs/sparkline/lib/Object.php
patching file libs/sparkline/lib/Sparkline.php
patching file libs/sparkline/CHANGES
patching file libs/sparkline/DESIGN
patching file libs/sparkline/README

#############

and these days jquery 1.3.1 is released.

Contributor

pebosi commented Jan 23, 2009

```
patching file plugins/Dashboard/templates/Dashboard.js
patching file plugins/Dashboard/templates/widgetMenu.js
patching file plugins/UsersManager/templates/UsersManager.js
patching file plugins/CoreHome/templates/datatable.js
patching file plugins/CoreHome/templates/menu.tpl
patching file plugins/Goals/templates/single_goal.tpl
patching file core/Visualization/OpenFlashChart.php
patching file core/ViewDataTable/GenerateGraphHTML.php
Hunk #2 FAILED at 100.
1 out of 2 hunks FAILED — saving rejects to file core/ViewDataTable/GenerateGraphHTML.php.rej
patching file libs/jquery/jquery.blockUI.js
Hunk #1 FAILED at 1.
1 out of 1 hunk FAILED — saving rejects to file libs/jquery/jquery.blockUI.js.rej
patching file libs/jquery/superfish_modified.js
Hunk #2 FAILED at 10.
1 out of 2 hunks FAILED — saving rejects to file libs/jquery/superfish_modified.js.rej
patching file libs/jquery/tooltip/___jquery.tooltip.js
patching file libs/jquery/tooltip/jquery.tooltip.js
Hunk #1 FAILED at 1.
1 out of 1 hunk FAILED — saving rejects to file libs/jquery/tooltip/jquery.tooltip.js.rej
patching file libs/jquery/tooltip/changelog.txt
Hunk #1 FAILED at 1.
Hunk #2 FAILED at 35.
2 out of 2 hunks FAILED — saving rejects to file libs/jquery/tooltip/changelog.txt.rej
patching file libs/jquery/jquery.scrollTo.js
Hunk #1 FAILED at 1.
1 out of 1 hunk FAILED — saving rejects to file libs/jquery/jquery.scrollTo.js.rej
patching file libs/jquery/jquery.js
Hunk #1 FAILED at 1.
1 out of 1 hunk FAILED — saving rejects to file libs/jquery/jquery.js.rej
patching file ‘libs/jquery/original lib/jquery.blockUI.js’
patching file ‘libs/jquery/original lib/jquery.dimensions.js’
Hunk #1 FAILED at 2.
1 out of 1 hunk FAILED — saving rejects to file ‘libs/jquery/original lib/jquery.dimensions.js.rej’
patching file ‘libs/jquery/original lib/jquery.js’
Hunk #1 FAILED at 1.
1 out of 1 hunk FAILED — saving rejects to file ‘libs/jquery/original lib/jquery.js.rej’
patching file ‘libs/jquery/original lib/jquery.scrollTo.js’
Hunk #2 FAILED at 21.
1 out of 2 hunks FAILED — saving rejects to file ‘libs/jquery/original lib/jquery.scrollTo.js.rej’
patching file libs/jquery/jquery.dimensions.js
Hunk #1 FAILED at 1.
1 out of 1 hunk FAILED — saving rejects to file libs/jquery/jquery.dimensions.js.rej
patching file libs/jquery/jquery.scrollTo-min.js
Hunk #1 FAILED at 1.
1 out of 1 hunk FAILED — saving rejects to file libs/jquery/jquery.scrollTo-min.js.rej
patching file libs/jquery/fdd2div-modified.js
Hunk #1 FAILED at 41.
Hunk #2 FAILED at 70.
2 out of 2 hunks FAILED — saving rejects to file libs/jquery/fdd2div-modified.js.rej
patching file libs/swfobject/swfobject.js
Hunk #1 FAILED at 1.
1 out of 1 hunk FAILED — saving rejects to file libs/swfobject/swfobject.js.rej
patching file libs/swfobject/README.txt
Hunk #1 FAILED at 5.
1 out of 1 hunk FAILED — saving rejects to file libs/swfobject/README.txt.rej
patching file libs/sparkline/lib/Sparkline_Bar.php
patching file libs/sparkline/lib/Sparkline_Line.php
patching file libs/sparkline/lib/Object.php
patching file libs/sparkline/lib/Sparkline.php
patching file libs/sparkline/CHANGES
patching file libs/sparkline/DESIGN
patching file libs/sparkline/README
```

Contributor

robocoder commented Jan 23, 2009

pebosi: did you “svn up” first? the diffs are against the repository (as of 882), and there was a widespread change to fix newlines per ticket #452.

Owner

mattab commented Feb 3, 2009

vipsoft, is it safe now to patch Piwik? are you done with the testing? i’d like to commit asap :) thanks.

Contributor

robocoder commented Feb 3, 2009

Do you want to wait for pebosi’s feedback?

I finished testing a couple of weeks ago. I already noted the issue of the swfobject “Loading data” message occasionally not being centered; I firmly expect this will self-correct itself when we move to OFC2 in ticket #322.

Contributor

pebosi commented Feb 3, 2009

dont need to wait, first time i tried to patch 0.2.28, patching svn version works ;)

Contributor

robocoder commented Feb 3, 2009

Matt: Having heard no complaints, it looks like this patch can be committed. Thanks.

Owner

mattab commented Feb 11, 2009

guys, this is a great work! thank you for your help testing pebosi, and kudos to vipsoft for your patience and testing.

in 886

Contributor

robocoder commented Oct 29, 2009

In [1548], refs #5663 - remove obsolete jquery.dimensions.js; now part of jquery.js 1.2.6

@mattab mattab added this to the RobotRock milestone Jul 8, 2014

This issue was closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment