Opened 12 years ago
Closed 7 years ago
#10331 closed defect (fixed)
Tickets can't be moved and re-ordered within the backlog
Reported by: | Ryan J Ollos | Owned by: | Ryan J Ollos |
---|---|---|---|
Priority: | high | Component: | BacklogPlugin |
Severity: | normal | Keywords: | |
Cc: | Anna Nachesa, Bart Ogryczak | Trac Release: | 0.11 |
Description
In Trac 0.11, the tickets cannot be moved and re-ordered in the backlog. There is an error in the javascript error console:
Uncaught TypeError: Object #<Object> has no method 'outerWidth'
The plugin is using jQuery UI 1.7.2, which requires jQuery 1.3 or possibly 1.3.2 (the version available on the downloads page is 1.7.3 which requires 1.3.2). Trac 0.11 provides jQuery 1.2.3.
Attachments (0)
Change History (14)
comment:1 Changed 12 years ago by
Owner: | changed from Anna Nachesa to Ryan J Ollos |
---|
comment:2 Changed 12 years ago by
comment:3 Changed 12 years ago by
comment:5 Changed 12 years ago by
(In [12488]) Fixes #10325, Refs #10331, #10333:
- Added 3-Clause BSD license text.
- jQuery UI 1.8.23 is used in Trac 0.12 and later. jQuery UI 1.6 is used in Trac 0.11.1 through Trac 0.11.7 (Trac 0.11.1 is the minimum version supported by the plugin).
- Renamed
BACKLOGS_VIEW
permission toBACKLOG_VIEW
. - Combined code in
backlog-rw.js
andbacklog-ro.js
tobacklog.js
. - Added skeleton code for an admin panel.
- Added skeleton for unit tests.
comment:6 Changed 12 years ago by
I believe that the checking version code in [12488], if trac_version > 0.12:
, does not work.
$ ~/venv/trac/0.11.7/bin/python Python 2.4.3 (#1, Jun 18 2012, 08:55:31) [GCC 4.1.2 20080704 (Red Hat 4.1.2-52)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> from trac import __version__ >>> __version__ '0.11.7' >>> __version__ > 0.12 True >>>
We can use pkg_resouces.parse_version
for comparison the versions. See also http://packages.python.org/distribute/pkg_resources.html#parsing-utilities and trac:source:trunk/trac/mimeview/tests/pygments.py?rev=11493#L84.
-
backlog/web_ui.py
105 105 req.redirect(req.href.backlog(backlog_id)) 106 106 107 107 # TODO: use jQuery UI in Trac 1.0 108 if trac_version > 0.12: 108 from pkg_resources import parse_version 109 if parse_version(trac_version) >= parse_version('0.12'): 109 110 add_script(req, 'backlog/js/jquery-ui-1.8.23.custom.min.js') 110 111 else: 111 112 add_script(req, 'backlog/js/jquery-ui-1.6.custom.min.js')
comment:7 Changed 12 years ago by
Thanks, it never seemed quite right to me, so I'm happy to know a better way now. I'll apply this patch and also take a look at #10732 this weekend.
comment:8 Changed 12 years ago by
comment:9 Changed 12 years ago by
BTW, sortable widget works well with Trac 0.12.5, however, it doesn't work with Trac 0.11.7. I got the following on Firefox.
Timestamp: 2013-03-14 03:05:54 Error: TypeError: (intermediate value)(...) is not a function Source File: http://localhost:3000/chrome/backlog/js/jquery-ui-1.6.custom.min.js Line: 24
To replace with http://ajax.googleapis.com/ajax/libs/jqueryui/1.6/jquery-ui.min.js, it works.
comment:10 Changed 12 years ago by
Priority: | normal → high |
---|---|
Status: | new → assigned |
Ah, thanks. I guess we should pull down a new copy of jQuery 1.6. Feel free to commit any changes if you have something staged locally, and I'll try to get around to this eventually ;)
comment:11 Changed 12 years ago by
(In [12795]) refs #10331: use http://ajax.googleapis.com/ajax/libs/jqueryui/1.6/jquery-ui.min.js for Trac 0.11.x to avoid javascript errors with jquery-ui-1.6.custom.min.js
.
comment:12 Changed 12 years ago by
comment:13 Changed 12 years ago by
Status: | assigned → new |
---|
comment:14 Changed 7 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
Trac 0.11.1 provides jQuery 1.2.6, which jQuery UI 1.6 is compatible with. Version 1.2.6 is the minimum required jQuery for jQuery UI 1.5 through 1.6. Trac 0.11.0 provides jQuery 1.2.3. I can't find a version of jQuery UI older than 1.5, so I'll set a minimum required Trac version of 0.11.1 for the BacklogPlugin.