Author Topic: Additional Information section minimized by default?  (Read 1196 times)

Offline tfs

  • Quality Assurance
  • *
  • Posts: 973
    • View Profile
Additional Information section minimized by default?
« on: September 17, 2011, 01: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.
A good tree cannot bring forth evil fruit, neither can an evil tree bring forth good fruit.

Offline tfs

  • Quality Assurance
  • *
  • Posts: 973
    • View Profile
Re: Additional Information section minimized by default?
« Reply #1 on: September 21, 2011, 05:08:08 pm »
BTTT!
A good tree cannot bring forth evil fruit, neither can an evil tree bring forth good fruit.

Offline tfs

  • Quality Assurance
  • *
  • Posts: 973
    • View Profile
Re: Additional Information section minimized by default?
« Reply #2 on: September 21, 2011, 09: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
Code: [Select]
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:

Code: [Select]
<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:
Code: [Select]
<div class="title_bar grid_header" id="additionalinfoheader">
Should become:
Code: [Select]
<div class="title_bar" id="additionalinfoheader">
Lastly, fixing the box itself. This is in two parts due to SMF styling code.
Code: [Select]
<div class="roundframe" id="additional_info">
Should become
Code: [Select]
<div class="roundframe" id="additional_info" style="display:none;">
And
Code: [Select]
<span class="lowerframe" id="additional_info_footer"><span></span></span>
Should become
Code: [Select]
<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.
A good tree cannot bring forth evil fruit, neither can an evil tree bring forth good fruit.