Welcome to the nuBuilder Forums!

Register and log in to access exclusive forums and content available only to registered users.

Add button to Globeadmin Home

Questions related to using nuBuilder Forte.
Post Reply
marcus
Posts: 20
Joined: Mon Nov 29, 2021 10:16 am

Add button to Globeadmin Home

Unread post by marcus »

Hello, I want to add additional buttons on the Globeadmin Home. I have multiple accesslevels with different homescreens and I want to be able to access all of them by the klick of a button. My current workaround are some procedures that open the appropriate lauch form.
Best Regards
marcus
kev1n
nuBuilder Team
Posts: 4297
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 445 times
Contact:

Re: Add button to Globeadmin Home

Unread post by kev1n »

To add buttons on nuhome (globeadmin launch form), you can to add this JS under Setup -> Header.
Replace 5ac14228beed98e with the launch form ids. (Press CTRL+SHIFT+I on a launch form to retrieve the Form Id)

Code: Select all

function addAccessLevelButton(obj, number, y, label, id) {

    $('#' + obj).clone()
        .prop("id", "access_level" + number)
        .insertAfter('#object_button')
		.attr('onclick', "nuStopClick(event);nuForm('" + id + "','','','','0')")
        .css({
            position: 'absolute',
            top: y,
            left: 53
        }).
		html(label);
		
		
}

function nuOnLoad() {
 
 if(nuFormType() == 'edit'){

		if (nuCurrentProperties().form_id == 'nuhome') {
			addAccessLevelButton('object_button', 1, 230, 'Access Level 1','5ac14228beed98e');
			addAccessLevelButton('object_button', 2, 286, 'Access Level 2','5ac14228beed98e');
			addAccessLevelButton('object_button', 3, 342, 'Access Level 3','5ac14228beed98e');
			addAccessLevelButton('object_button', 4, 398, 'Access Level 4','5ac14228beed98e');
		}
     
 } else
 if(nuFormType() == 'browse'){
     // Browse Form loaded
 }
 
} 
You do not have the required permissions to view the files attached to this post.
marcus
Posts: 20
Joined: Mon Nov 29, 2021 10:16 am

Re: Add button to Globeadmin Home

Unread post by marcus »

Thank you kev1n! It works perfectly
Post Reply