Welcome to the nuBuilder Forums!

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

CSS not Being Applied to the Back Button?

Questions related to customising nuBuilder Forte with JavaScript or PHP.
Post Reply
pmjd
Posts: 132
Joined: Fri Mar 12, 2021 10:38 am
Has thanked: 3 times
Been thanked: 1 time

CSS not Being Applied to the Back Button?

Unread post by pmjd »

Hello,

I've added the following custom code to move just the nuActionHolder to a left vertical position for only the edit form, and change the nuActionButton format to be bigger.

Code: Select all

if (nuFormType() == 'edit') {
    nuResize()}
    


function nuResize() {
   
     var h = window.innerHeight;

     $('#nuActionHolder').css({
         'width': '100px',
         'float': 'left',
         'height': h,
         'border-right': 'solid',
         'border-right-width': 'thin'
     });
    $('.nuActionButton').css({
         'width': '90px',
         'height': '45px',
         'margin':'5px'
     });
    $('.nuBackBtnButton.nuActionButton').css({
         'width': '90px',
         'height': '45px',
         'margin':'5px'
     });
   
}
However the Back button always retains it's original css code and looks different to the rest.
nuActionHolder.png
I've tried to target the Back button using #nuBackBtnButton and #nuBackBtnButton.nuActionButton but neither have any effect. Does anyone know if there is another class I should be targetting to change the Back button?

Thanks,
Paul
You do not have the required permissions to view the files attached to this post.
kev1n
nuBuilder Team
Posts: 4305
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 445 times
Contact:

Re: CSS not Being Applied to the Back Button?

Unread post by kev1n »

Add this in the function nuResize():

Code: Select all

$(function() {
    $('#nuBackBtnButton').css({
         'width': '90px',
         'height': '45px',
         'margin':'5px'
     });
});   
pmjd
Posts: 132
Joined: Fri Mar 12, 2021 10:38 am
Has thanked: 3 times
Been thanked: 1 time

Re: CSS not Being Applied to the Back Button?

Unread post by pmjd »

Great, thank you kev1n that worked :D

Can I ask how it works? How does the function within the function force the css to be applied?
kev1n
nuBuilder Team
Posts: 4305
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 445 times
Contact:

Re: CSS not Being Applied to the Back Button?

Unread post by kev1n »

This is a jQuery construct, see here: https://api.jquery.com/ready/ The event occurs when the HTML document has been fully loaded.
pmjd
Posts: 132
Joined: Fri Mar 12, 2021 10:38 am
Has thanked: 3 times
Been thanked: 1 time

Re: CSS not Being Applied to the Back Button?

Unread post by pmjd »

Thank you
baracca
Posts: 4
Joined: Sat Jan 22, 2022 5:28 pm
Has thanked: 1 time

Re: CSS not Being Applied to the Back Button?

Unread post by baracca »

Hello! I'm absolutly a newbie.
In my nuActionHolder there isn't the back button, why? Probably I have to add it but I don't understand how...
kev1n
nuBuilder Team
Posts: 4305
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 445 times
Contact:

Re: CSS not Being Applied to the Back Button?

Unread post by kev1n »

Hi,

Edit nuconfig.php and set this option to true.

Code: Select all

nuUXOptions['nuShowBackButton']= true;
You must restart your browser after modifying nuconfig.php in order for changes to be reflected
baracca
Posts: 4
Joined: Sat Jan 22, 2022 5:28 pm
Has thanked: 1 time

Re: CSS not Being Applied to the Back Button?

Unread post by baracca »

kev1n wrote: Thu Jan 27, 2022 4:04 pm Hi,

Edit nuconfig.php and set this option to true.

Code: Select all

nuUXOptions['nuShowBackButton']= true;
You must restart your browser after modifying nuconfig.php in order for changes to be reflected
Thank you very much! 8-)
Post Reply