• Welcome to the Chevereto user community!

    Here users from all over the world gather around to learn the latest about Chevereto and contribute with ideas to improve the software.

    Please keep in mind:

    • 😌 This community is user driven. Be polite with other users.
    • 👉 Is required to purchase a Chevereto license to participate in this community (doesn't apply to Pre-sales).
    • 💸 Purchase a Pro Subscription to get access to active software support and faster ticket response times.

close pref button

Simply trigger the open/close button. Something like change this:
Code:
                <div id="preferences-box">
                    <div><input type="checkbox" id="pref-shorturl" <?php if(isset($_COOKIE['doShort'])) echo 'checked="checked"'; ?> /> <label for="pref-shorturl"><?php show_lang_txt('txt_create_short_url'); ?> <?php show_tinyurl_service(); ?></label></div>
                </div>

For this:
Code:
                <div id="preferences-box">
                    <div><input type="checkbox" id="pref-shorturl" <?php if(isset($_COOKIE['doShort'])) echo 'checked="checked"'; ?> /> <label for="pref-shorturl"><?php show_lang_txt('txt_create_short_url'); ?> <?php show_tinyurl_service(); ?></label></div><span id="close-pref">Close pref.</span>
                </div>

Will add a node (<span id="close-pref">Close pref.</span>) that will used to trigger the button. You will need to tweak the CSS of that html element to suit your needs.

Now, you will need to add this javascript in the theme.js main closure:
Code:
$("span#close-pref").click(function() {
    $("a#preferences").click();
});

That function will trigger a click on the preferences switch when you click the close-pref button. Simple as that.
 
Back
Top