Admin Drop Down Menu Code

Dazed
Dazed
@dazed
12 years ago
1,022 posts
So in multiple areas in JR5, there is the nice drop down help areas. Click the expand button and it drops down. I want to use that code on some other areas of my site in the skin. Will I need to link to any js for this to work in a skin?

Also where can I find this code? I am guessing this might all be in the php core files?

Thanks

updated by @dazed: 12/17/13 08:00:42AM
brian
@brian
12 years ago
10,148 posts
I believe it is all done with CSS - no Javascript. Check out the "header.tpl" file in jrElastic (or your skin) and you'll see the HTML structure.

Let me know if that helps.

Thanks!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
Dazed
Dazed
@dazed
12 years ago
1,022 posts
Thanks Brian. I am using the old stuff from PJ and it kind of stutters when you open it.
Dazed
Dazed
@dazed
12 years ago
1,022 posts
not seeing it in the header. I pulled this using firebug. Ring a bell to anyone?

<input type="button" value="?" class="form_button form_help_button" title="expand help" onclick="$('#h_system_name').slideToggle(250);">

updated by @dazed: 11/12/13 04:38:55PM
brian
@brian
12 years ago
10,148 posts
What skin are you looking in? It's for sure in the jrElastic header (I just looked).

Thanks!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
Dazed
Dazed
@dazed
12 years ago
1,022 posts
ProJam. Are you looking at menu drop downs?
brian
@brian
12 years ago
10,148 posts
Yep - it's called "menu.tpl" in ProJam. That powers the user drop down (i.e. account, etc.).

If you need to know more than that, Douglas could probably help out.

Thanks!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
Dazed
Dazed
@dazed
12 years ago
1,022 posts
Hey Brian - you are probably right. I was thinking it was something else but it might be as simple as li tags. I am using dhtml-goodies now which is js based. What I was wanting to see is the specific code in the acp like what is under global config for example you have the question mark that when clicked you get the drop down explanation.
Dazed
Dazed
@dazed
12 years ago
1,022 posts
ok I found it in the config.php. I do not think I can use this in a tpl. Maybe I will see if the li will work better.

    // Enabled
    $_tmp = array(
        'name'     => 'enabled',
        'type'     => 'checkbox',
        'default'  => 'off',
        'validate' => 'onoff',
        'label'    => 'enable analytics',
        'help'     => 'If this option is checked, the Google Analytics tracking javascript will be inserted into pages on your site',
        'order'    => 1
    );
    jrCore_register_setting('jrGoogleAnalytics',$_tmp);
SteveX
SteveX
@ultrajam
12 years ago
2,584 posts
Its in the onclick handler for the ? button, you can see it using inspect element in your browser's developer tools.

It uses the #id of the div which contains the help text, and there is style="display:none;" and maybe height:0; as well. The style can also be done in css.

So you'd want to make a button in your template with that onclick handler, copy the div complete with #id classes and styles from the html source - its right under the help button. Once it works you can change the content and restyle it to suit.


--
¯\_(ツ)_/¯ Education, learning resources, TEL, AR/VR/MR, CC licensed content, panoramas, interactive narrative, sectional modules (like jrDocs), lunch at Uni of Bristol. Get in touch if you share my current interests or can suggest better :)
Dazed
Dazed
@dazed
12 years ago
1,022 posts
Thanks Steve!
Dazed
Dazed
@dazed
12 years ago
1,022 posts
Just an update, not that anyone cares lol but I got this working last night. Appreciate the help you guys.