Topic solved
This topic is marked as solved and as such require no attention unless you want to bump this issue.

[Fixed] Additional Information section minimized by default?

Started by tfs, September 17, 2011, 02:58:16 AM

Previous topic - Next topic

tfs

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.

tfs

A good tree cannot bring forth evil fruit, neither can an evil tree bring forth good fruit.

tfs

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.
A good tree cannot bring forth evil fruit, neither can an evil tree bring forth good fruit.

tfs

Ping to Sleepy. Can this be made part of the 2.1 release?
A good tree cannot bring forth evil fruit, neither can an evil tree bring forth good fruit.

SleePy

Jeremy D — Spare-Developer

tfs

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.
A good tree cannot bring forth evil fruit, neither can an evil tree bring forth good fruit.