justanotherguy
Total posts: 88
06 Окт 2016 21:39

I would like to set the edit gear icon to stay on the screen and not have it appear on hover. I would alos love it to look like this. Help on either would be great., a

Последние изменения: 24 Окт 2016


pepperstreet VIP
Total posts: 3,837
08 Окт 2016 02:52

Hello justanotherguy,
1. which view are you referring to? List and Full view?
2. Which cobalt templates do you use?
3. What type of icon? An image replacement or webfont?


justanotherguy
Total posts: 88
08 Окт 2016 03:00

1) Simple list and full view 2) Simple List and Default 3) an image replacement

Sorry for not providing the details you needed to begin with. Thank you for the help.


pepperstreet VIP
Total posts: 3,837
08 Окт 2016 03:26

justanotherguy Sorry for not providing the details you needed to begin with.

No problem. Just asking because there are different ways to accomplish your task ;)

Do you want a single button with a "gear", and the dropdown?
No need for the usual button-group style, which appears like one bar?


justanotherguy
Total posts: 88
08 Окт 2016 18:59

I would like it to look just like the forum gear icon here. Where you click it for it to pop up and it stay up even if you are not mouse over.


justanotherguy
Total posts: 88
11 Окт 2016 20:24

thanks


pepperstreet VIP
Total posts: 3,837
11 Окт 2016 22:50

Headsup: Don't edit original template files. Either use the override feature from Joomla, or create a copy inside Cobalt's template manager!

Simple List template (excerpt!)

These are modified and new parts only. Search and replace repective lines/blocks in the template. Comments can be removed later on.

See Styles section at the beginning of the template:

/*  pepperstreet - needed for dropdown menu placement */
    .btn-group-relative {
        position: relative;
    }

/*  pepperstreet - reset appearance for new button  */
    .btn-custom {
        filter:progid:DXImageTransform.Microsoft.Gradient(enabled='false');
        -webkit-box-shadow: none;
        -moz-box-shadow: none;
        box-shadow: none;
        background-image: none;

        background-color: white;
        border: 2px solid #dfe2e8;
    }

See around line 55. Make sure to replace the entire DIV of class "controls":

<div class="pull-right controls">

<!-- pepperstreet - button group - removed initial display:none  -->
<!-- pepperstreet - button group - changed class name to disable hover script     -->
<!-- pepperstreet - button group - new class name needs position relative     -->
    <div class="btn-group-relative">
        <?php echo HTMLFormatHelper::bookmark($item, $this->submission_types[$item->type_id], $params);?>
        <?php echo HTMLFormatHelper::follow($item, $this->section);?>
        <?php echo HTMLFormatHelper::repost($item, $this->section);?>
        <?php echo HTMLFormatHelper::compare($item, $this->submission_types[$item->type_id], $this->section);?>

        <?php if($item->controls):?>                      
<!-- pepperstreet - added class btn-custom to toggle link -->
            <a href="#" data-toggle="dropdown" class="dropdown-toggle btn btn-mini btn-custom">

<!-- pepperstreet - add new image icon in folder media/mint/icons/16/.. -->
            <?php echo HTMLFormatHelper::icon('YourNewIcon.png');  ?>

<!-- pepperstreet - Alternative! - add IMG tag and path to your custom folder and icon -->                                
            <img src="/images/Yourfolder/YourIcon.png" align="absmiddle">
            </a>
                <ul class="dropdown-menu">
                <?php echo list_controls($item->controls);?>
                </ul>
        <?php endif;?>

        </div>
</div>

pepperstreet VIP
Total posts: 3,837
11 Окт 2016 23:27

Default record template

Only image replacement is needed.
Actually you can use the same technique from the list template.
Just see around line 100 and change the image name and location!


The new button style can be achieved in 2 ways:
Either add the class and style like mentioned in the previous comment...

Or just use the the template's parameter for custom CSS:
You can even use the existing bootstrap class .btn-mini
(that would change all buttons in one go):

.btn-mini {
    filter:progid:DXImageTransform.Microsoft.Gradient(enabled='false');
    -webkit-box-shadow: none;
    -moz-box-shadow: none;
    box-shadow: none;
    background-image: none;

    background-color: white;
    border: 2px solid #dfe2e8;
}

Hope this helps!


Sergey
Total posts: 13,748
12 Окт 2016 12:51

Find class has-content in the template and delete it. And also delete JHtml::_('dropdown.init');.


justanotherguy
Total posts: 88
14 Окт 2016 00:04

Hi Sergey in addition to what pepperstreet advised or in place of.

Pepperstreet thank you for the work. I am behind and havnt yet been able to try this out, but I will and I will post back. Thank you again.


justanotherguy
Total posts: 88
23 Окт 2016 19:55

@pepperstreet is there a way to PM you?


justanotherguy
Total posts: 88
24 Окт 2016 14:35

I sent skype request

Работает на Cobalt