Modify ↓
Opened 6 years ago
Closed 6 years ago
#13477 closed defect (worksforme)
Make compatible with Trac 1.2
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | normal | Component: | SectionEditPlugin |
Severity: | normal | Keywords: | |
Cc: | Trac Release: | 1.2 |
Description
I found I had to make a javascript tweak in order to get this plugin to work in my Trac 1.2.2 installation:
--- tracsectionedit/htdocs/js/tracsectionedit.js (revision 2737) +++ tracsectionedit/htdocs/js/tracsectionedit.js (revision 2738) @@ -10,6 +10,6 @@ } $(document).ready(function() { - $("#wikipage >:header").addEditlink("Edit this section"); + $("#wikipage > h1,h2,h3,h4").addEditlink("Edit this section"); }); })(jQuery);
Without this patch, not only wouldn't the plugin work, but other javascript-related stuff on the page didn't work properly, like the "Link to this section" tags on the section headings.
Disclaimer: I know almost NOTHING about javascript. The tweak I made above is just something I deduced could work based on perusing around https://api.jquery.com/child-selector and http://jqfundamentals.com/chapter/jquery-basics. It seems to work fine, although I'm sure someone more familiar with javascript could come up with something more general.
Attachments (0)
Change History (3)
comment:1 Changed 6 years ago by
Trac Release: | → 1.2 |
---|
comment:2 Changed 6 years ago by
Summary: | recommended patch to fix problems encountered running with Trac 1.2.2 → Make compatible with Trac 1.2 |
---|
comment:3 Changed 6 years ago by
Resolution: | → worksforme |
---|---|
Status: | new → closed |
Note: See
TracTickets for help on using
tickets.
The use of header selector should not be a problem.
If you'd like to debug further, please revert your changes, install the latest version from the 1.2 branch (I just pushed some changes), check the browser console, and post your findings to the trac:MailingList.