
c.feige at osypkamed
Nov 11, 2011, 7:38 AM
Views: 283
Permalink
|
|
Re: customize foldable sections in ticket view
[In reply to]
|
|
Clemens, 09.11.2011 18:05: > Hello. > > I like very much the TRAC 0.12 feature of foldable sections in the > ticket view. I mean those little triangles which for example can expand > or close the "Ticket history" or "Attachment" section of a ticket. > > Now I would like to change the default status of these foldable section. > I would like the "Ticket history", and "Attachment" to be closed by > default while the "Change Ticket" section shall be opened. Thanks to Remy and Leho and some own trial-and-error work I now solved my above issue. Here is what you need to put into the site.html template: <!-- Expand "Modify Ticket" by default. inspired by http://trac.edgewall.org/ticket/9807#comment:18 --> <div py:match="div[@id='content' and @class='ticket']//div[@id='modify']" py:attrs="select('@*')"> ${select('*|comment()|text()')} <script type="text/javascript"> jQuery(document).ready(function($) { $("#modify").parent().removeClass("collapsed"); }); </script> </div> <!-- Collapse "Ticket History" by default inspired by http://trac.edgewall.org/ticket/9807#comment:18 --> <div py:match="div[@id='content' and @class='ticket']//div[@id='changelog']" py:attrs="select('@*')"> ${select('*|comment()|text()')} <script type="text/javascript"> jQuery(document).ready(function($) { $("#changelog").parent().toggleClass("collapsed"); }); </script> </div> best regards Clemens -- You received this message because you are subscribed to the Google Groups "Trac Users" group. To post to this group, send email to trac-users [at] googlegroups To unsubscribe from this group, send email to trac-users+unsubscribe [at] googlegroups For more options, visit this group at http://groups.google.com/group/trac-users?hl=en.
|