Add items to navbar

Version 2021/07

The new functions allow you to add custom links, texts and even custom dropdown menus (and menuitems) to your top navigation bar.

custom drodown menu

Code

var navbar = AppGiniHelper.common.getNavbar();
var dropdown = navbar.addDropdown("Help", "question-sign", NavPosition.Right);
dropdown.addDivider("This application");
dropdown.addLink("General help", "#", "_help");
dropdown.addLink("drag & drop", "#", "_help");
dropdown.addDivider();
dropdown.addLink("Required permissions", "#", "_help");
dropdown.addLink("Help on workflow", "#", "_help");
dropdown.addDivider("Related apps");
dropdown.addLink("Help on PDF-File creation", "#", "_help");
dropdown.addDivider("Need help?");
dropdown.addLink("Support", "#", "_help");

Code

var navbar = AppGiniHelper.common.getNavbar();
navbar.addText("Click there →");
navbar.addLink("Link", "index.php", "flash");

Code

var navbar = AppGiniHelper.common.getNavbar();
navbar.addSearch("attachments_view.php", "search in pdf files");

This creates a custom search input field, named SearchString, with custom placeholder and search-button.

As first parameter (URL) you can use any existing TABLENAME_view.php file, create any custom page or use any other webpage.


Add Link

Version 2021/07

AppGiniHelper.common.getNavbar().addLink("text", "href", "icon", NavPosition.left);

Add Text

Version 2021/07

AppGiniHelper.common.getNavbar().addText("text", NavPosition.left);

Add custom Dropdown menu

Version 2021/07

var dropdown = AppGiniHelper.common.getNavbar().addDropdown("text", "icon", NavPosition.left);

Add items to custom Dropdown menu

Add Link
dropdown.addLink("text", "href", "icon");
// optional 4th parameter: target (string), for example "_self", "_blank", "tab_name"
Add Button
dropdown.addButton("text", function() { /* your code here*/ }, "icon");
Add Divider line
dropdown.addDivider();
Add Divider with text
dropdown.addDivider("More");

Add custom search input field

Version 2021/07

AppGiniHelper.common.getNavbar().addSearch("url", "placeholder", "value");

Do you like it?