Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Popup Menus should have a generic function #1980

Open
netniV opened this issue Sep 25, 2018 · 1 comment
Open

Popup Menus should have a generic function #1980

netniV opened this issue Sep 25, 2018 · 1 comment
Labels
api API related issues enhancement General tag for an enhancement gui UI related issue
Milestone

Comments

@netniV
Copy link
Member

netniV commented Sep 25, 2018

Popup menus should use a generic function in lib/html.php to create the proper layout. The functions should utilise a structure similar to that of the draw_edit_fields() function were we define the name, icon, callback or id and this would create the proper layout alleviating the work of keeping each menu code up to date.

$menu = array(
    array('display' => blah, 'icon' => 'fa fa-circle', 'callback' => 'blah.php?stuff'),
    array('display' => blah2, 'icon' => 'fa fa-minus', 'callback' => 'blah.php?stuff2'),
    array('display' => other thngs, 'icon' => 'fa fa-cog', 'items' => array(
        array('display' => subitem1, 'icon' => 'fa fa-check', id => 'js-id1'),
        array('display' => subitem2, 'icon' => 'fa fa-warning', 'id' => 'js-id2'),
    ),
),
@netniV netniV added this to the Cacti 1.3 milestone Sep 25, 2018
@netniV netniV added documentation Documentation issue enhancement General tag for an enhancement and removed documentation Documentation issue labels Sep 27, 2018
@TheWitness
Copy link
Member

This is an interesting point. The jQueryUI menu plugin is a bit quirky. It'll be nice to see this.

@TheWitness TheWitness added gui UI related issue api API related issues labels Mar 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api API related issues enhancement General tag for an enhancement gui UI related issue
Projects
None yet
Development

No branches or pull requests

2 participants