Modify

Opened 6 years ago

Closed 6 years ago

#13477 closed defect (worksforme)

Make compatible with Trac 1.2

Reported by: tim@… 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 anonymous

Trac Release: 1.2

comment:2 Changed 6 years ago by Ryan J Ollos

Summary: recommended patch to fix problems encountered running with Trac 1.2.2Make compatible with Trac 1.2

comment:3 Changed 6 years ago by Ryan J Ollos

Resolution: worksforme
Status: newclosed

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.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The ticket will remain with no owner.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.