Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Trac: Users
Re: customize foldable sections in ticket view
 

Index | Next | Previous | View Flat


c.feige at osypkamed

Nov 11, 2011, 7:38 AM


Views: 423
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.

Subject User Time
customize foldable sections in ticket view c.feige at osypkamed Nov 9, 2011, 9:05 AM
    Re: customize foldable sections in ticket view remy.blank at pobox Nov 9, 2011, 11:07 AM
        Re: customize foldable sections in ticket view c.feige at osypkamed Nov 10, 2011, 11:36 AM
            Re: customize foldable sections in ticket view lkooglizmus at gmail Nov 10, 2011, 12:56 PM
    Re: customize foldable sections in ticket view c.feige at osypkamed Nov 11, 2011, 7:38 AM

  Index | Next | Previous | View Flat
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.