Help SubAction

Hello,
i’m trying to add a sub item in my custom module like this(see attached file).

I think a good starting point could be this view.list.php:

<?php
require_once 'include/MVC/View/views/view.list.php';
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');

class sugo_ComputersViewList extends ViewList{

    public function preDisplay(){
        parent::preDisplay();
        $this->lv->actionsMenuExtraItems[] = $this->getNewActionMenuItem();
    }

    private function getNewActionMenuItem(){
        global $mod_strings;
        return <<<EOF
        <ul id="menu">
            <li><a href="">MY CUSTOM MENU</a>
            <ul>
                <li><a href="">My Custom Action</a></li>
            </ul>
            </li>
        </ul>
        <a class='parent-dropdown-action.handler' style='margin: 0px; width: 150px;' href='javascript:void(0)'
        onclick="sugarListView.get_checks();

	if(sugarListView.get_checks_count() &lt; 1) {
            alert('{$app_strings['LBL_LISTVIEW_NO_SELECTED']}');
            return false;
        }
        document.MassUpdate.action.value='displaypassedids';
        document.MassUpdate.submit();">
{$mod_strings['LBL_CUSTOM_ACTION']}
        </a>
EOF;
    }
}

Of course, a styling should be added or even maybe any ready to go class to achieve this.

Does anyone can point me in the right direction?

Regards

What exactly is your question? Is it working?

What do you have in the other file, the “displaypassedids” entrypoint?

Hi,
the displaypassedids() simply make a post call to remote site but this is not the problem.

What i need to achieve is simply add in my view.list.php a way to add a sub action menu(please see this new attached file)

So i want to add html / css code in order to do what you see in the picture.

Thank for any further help.

regards

Oh, sorry, I wasn’t understanding what you wanted.

Have you tried simply adding more HTML, with an extra UL block with several LI blocks inside it?

Yes without any luck.

An alternative could be jquery but i would like to use pure html/css code.

Seems that traditional css directives like display: inline; or float: left; doesn’t take any effect.

So that’s why i’m asking some help here.

Regards

Hi

I had a go at it but I couldn’t get anything decent in the 10 minutes I devoted to this… and I’m afraid I don’t have time for more. :frowning:

It would be interesting if someone could get this operational and document it here, it’s something that eventually other people will ask for…

Thank you
Available anyway for any comments from others.

I will try to do it by myself and in case i will post the result.

Thanks

1 Like