SimpleDesk

SimpleDesk! => SimpleDesk Tracker => Topic started by: tfs on September 17, 2011, 02:58:16 AM

Title: [Fixed] Additional Information section minimized by default?
Post by: tfs on September 17, 2011, 02:58:16 AM
Question from a user of mine...

Hi - is there a way for the Additional Information section of tickets to be minimized as a default setting and only opened if needed (by hitting the +)?  Once you are working with the client, you probably don't need to scroll through this everytime.  Thanks.
Title: Re: Additional Information section minimized by default?
Post by: tfs on September 21, 2011, 06:08:08 PM
BTTT!
Title: Re: Additional Information section minimized by default?
Post by: tfs on September 21, 2011, 10:35:00 PM
How to minimize the Additional Information section by default.

Firstly, you'd need to alter the JavaScript - Themes/default/scripts/helpdesk.js
function CustomFields(oOptions)
{
    this.opt = oOptions;
    this.bCollapsed = false;
}


Change the false to true. That'll tell the JS to style it correctly after the first click. Then we just have to fix the rest of the styling, which is all in ./Themes/default/sd_template/SimpleDesk-Display.template.php

Firstly, the image:

<span class="floatright"><a href="javascript:oCustomFields.infoswap();"><img src="', $settings['images_url'], '/collapse.gif" alt="+" id="shd_custom_fields_swap" class="icon" /></a></span>

Change the collapse to expand.

Then the header:
<div class="title_bar grid_header" id="additionalinfoheader">

Should become:
<div class="title_bar" id="additionalinfoheader">

Lastly, fixing the box itself. This is in two parts due to SMF styling code.
<div class="roundframe" id="additional_info">

Should become
<div class="roundframe" id="additional_info" style="display:none;">

And
<span class="lowerframe" id="additional_info_footer"><span></span></span>

Should become
<span class="lowerframe" id="additional_info_footer" style="display:none;"><span></span></span>


Remember to clear your browser's cache (CTL-F5) to reload the Java, or else the toggle open and closed will be off by one.
Title: Re: Additional Information section minimized by default?
Post by: tfs on November 29, 2015, 10:18:46 PM
Ping to Sleepy. Can this be made part of the 2.1 release?
Title: Re: Additional Information section minimized by default?
Post by: SleePy on November 29, 2015, 11:26:36 PM
Don't see why not.
Title: Re: Additional Information section minimized by default?
Post by: tfs on November 29, 2015, 11:32:14 PM
The code edits I posted came from Arantor, though I don't remember where he posted it. Might have been via email, or even over on Wedge. But it has been working for me for years now.