Modify ↓
Opened 12 years ago
Closed 12 years ago
#10055 closed defect (fixed)
Class name for ticket number's <span> is wrong
Reported by: | Owned by: | Ryan J Ollos | |
---|---|---|---|
Priority: | normal | Component: | DuplicateTicketSearchPlugin |
Severity: | normal | Keywords: | |
Cc: | Trac Release: | 0.12 |
Description
A ticket number in the search results which has status "closed" and resolution "duplicate" is displayed with the following HTML:
<span class="closed: duplicate">#12704</span>
The correct way to name the class, which corresponds with the display style of ticket numbers in Trac's native wiki formatting output, would be the following:
<span class="closed duplicate">#12704</span>
The current behavior causes custom CSS styles to fail to apply to this ticket, as colons are not allowed in class names.
Attachments (0)
Change History (4)
comment:1 Changed 12 years ago by
Status: | new → assigned |
---|
comment:2 Changed 12 years ago by
comment:3 Changed 12 years ago by
Somehow that got split into two commits so you can't see the changes (also [11763]). The fix was on line 102 of tracDupeSearch.js
:
var summaryRegex = /#(\d+)<\/span>:\s*(.*):\s*(.*)\s*\((.*)(?:\: (.*))?\)$/i;
-->
var summaryRegex = /#(\d+)<\/span>:\s*(.*):\s*(.*)\s*\(([^:.]*)(?:\: (.*))?\)$/i;
comment:4 Changed 12 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Please reopen if this isn't working correctly for you, or if you have more feedback.
Note: See
TracTickets for help on using
tickets.
Finally got around to attempting to fix this. There was an error in the
summaryRegex
.I have a question though. If I add the wiki markup
#2
, with ticket#2
being closed, inspecting the element displaysa.closed.ticket
. Inspecting the#2
displayed by DuplicateTicketSearchPlugin displaysspan.closed
, and you had proposedspan.closed.<resolution>
. Do we want to add the resolution to the class, or rather trying to emulate the WikiMarkup - that is, drop the span and append ticket to the class for thea
element?CSS is not my strong suite, so I'd appreciate any guidance you can provide. I've bumped the plugin revision to 1.0.2, but added the
dev
tag until we have resolution on this issue.