Welcome to the nuBuilder Forums!

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

styles to css

Questions related to using nuBuilder Forte.
Post Reply
Timo
Posts: 217
Joined: Thu Mar 15, 2018 9:26 pm
Has thanked: 1 time

styles to css

Unread post by Timo »

Hello,
Would you mind moving the styles that reside in the php file(s) to the nubuilder4.css style sheet ? I was thinking specifically about the styles for nuDragDialog, nuDraggingBox, iframe
This allows us to tweak the styles. Thank you.
styles.png
You do not have the required permissions to view the files attached to this post.
admin
Site Admin
Posts: 2815
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 25 times

Re: styles to css

Unread post by admin »

Timo,

Sorry, but It's not something we'll be doing in the near future.


Steven
toms
Posts: 785
Joined: Sun Oct 14, 2018 11:25 am

Re: styles to css

Unread post by toms »

Hi,

Use JS to change the styles.

Default style:
default_style.png
Custom style:
new_style.png

Place this Javascript in the Header under Home ► Setup
(I modified some other styles like .nuBrowseBody .nuBrowseTitle)

Code: Select all

function nuOnLoad() {
	custColorIframe()
}

function custColorIframe() {
  
	if (window.location != window.parent.location) {
      
		var dd = $('#nuDragDialog', window.parent.document);
		dd.css({
			'height': (dd.height() + incH) + 'px',
			'width': (dd.width() + incW) + 'px',
			'background-color': 'white',
			'border-top-left-radius': '6px',
			'border-top-right-radius': '6px'
		});
      
		var dw = $('#dialogTitleWords', window.parent.document);
		dw.css({
			'background': 'rgb(255,255,255)',
			'background': '-moz-linear-gradient(top, rgba(255,255,255,1) 0%, rgba(246,246,246,1) 60%, rgba(237,237,237,1) 100%)',
			'background': '-webkit-linear-gradient(top, rgba(255,255,255,1) 0%,rgba(246,246,246,1) 60%,rgba(237,237,237,1) 100%)',
			'background': 'linear-gradient(to bottom, rgba(255,255,255,1) 0%,rgba(246,246,246,1) 60%,rgba(237,237,237,1) 100%)'
		});
      
	}
  
}
You do not have the required permissions to view the files attached to this post.
admin
Site Admin
Posts: 2815
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 25 times

Re: styles to css

Unread post by admin »

.
Timo
Posts: 217
Joined: Thu Mar 15, 2018 9:26 pm
Has thanked: 1 time

Re: styles to css

Unread post by Timo »

@Toms: Looks amazing! Thanks for that. I was just wondering how you added the trash can icon to the subform. Because many of my users do not understand what these checkboxes are for.
You do not have the required permissions to view the files attached to this post.
toms
Posts: 785
Joined: Sun Oct 14, 2018 11:25 am

Re: styles to css

Unread post by toms »

Timo, this will add a trash can icon to all subforms.
tci.png
Place the JS code under Setup > Header:

Code: Select all


function nuOnLoad() {
  custAddTrashCanIconToSubForms();
}

function custAddTrashCanIconToSubForms() {
    if (nuFormType() == 'edit') {
        $(".nuSubform").each(function() {

            subTabHolder = $(this).attr('id') + 'nuTabHolder';

            $("#" + subTabHolder).append("<img id='trash_can' title= '" + nuTranslate("Delete Checked Rows When Saved") + "' src='graphics/trash_can.png' width='16' height='16' style='position:absolute; right: 20px; top: 28px;' />");

        });
    }
}
You do not have the required permissions to view the files attached to this post.
Timo
Posts: 217
Joined: Thu Mar 15, 2018 9:26 pm
Has thanked: 1 time

Re: styles to css

Unread post by Timo »

Hey toms, thank you so much!

This should be integrated into nuBuilder.
admin
Site Admin
Posts: 2815
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 25 times

Re: styles to css

Unread post by admin »

.
Post Reply