Welcome to the nuBuilder Forums!

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

Resize Editor?

Questions related to using nuBuilder Forte.
bkay
Posts: 9
Joined: Mon May 28, 2018 2:02 pm

Resize Editor?

Unread post by bkay »

Hi,

Is there a trick to getting the entire editor to appear? Seems I can't resize it, and it's always too small (having to use scroll-bars continuously is a real PITA).

Is there a setting somewhere that stores the size of all the (various) editors windows?

Thanks!
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: Resize Editor?

Unread post by toms »

bkay wrote: Is there a setting somewhere that stores the size of all the (various) editors windows?
Not that I'm aware of.

Double clicking the title bar of the window (iframe), will maximize it.

This is how I enlarge the script text areas because they're way too small for me, too:
https://www.youtube.com/watch?v=Bj8HzwIxJsQ
bkay
Posts: 9
Joined: Mon May 28, 2018 2:02 pm

Re: Resize Editor?

Unread post by bkay »

Thanks, I guess I'll be double-clicking then! ;)

However, I can't help but ask, isn't there a place in the nuBuilder source-code where the iframe size is declared for each editor form?
(I've done a search, to no avail)
toms
Posts: 785
Joined: Sun Oct 14, 2018 11:25 am

Re: Resize Editor?

Unread post by toms »

bkay wrote: However, I can't help but ask, isn't there a place in the nuBuilder source-code where the iframe size is declared for each editor form?
No there isn't. The size is calculated by a PHP function and JS.

But you can try my resizeIframe() function that resizes all iframes by a specified value.

The JS is to be placed in Home ► Setup ► Header:

Code: Select all

function resizeIframe(incH, incW) {

    if (window.location != window.parent.location) {

        $('body').css('height', $('body').height() + incH);
		
        var dd = $('#nuDragDialog', window.parent.document);
        dd.css({
            'height': (dd.height() + incH) + 'px',
            'width': (dd.width() + incW) + 'px',
        });

        nw = $('#nuWindow', window.parent.document);
        nw.css({
            'height': (nw.height() + incH) + 'px',
            'width': (nw.width() + incW) + 'px'
        });

    }
}

function nuOnLoad() {
    resizeIframe(30, 30);
}
Please tell me if it works for you.
admin
Site Admin
Posts: 2814
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 25 times

Re: Resize Editor?

Unread post by admin »

.
bkay
Posts: 9
Joined: Mon May 28, 2018 2:02 pm

Re: Resize Editor?

Unread post by bkay »

Thank you!

I've finally had a chance to implement this...

I set it like below, and it seems to have done the trick.

function nuOnLoad() {
resizeIframe(300, 300);
}

Much appreciated...!

I can't help but ask... why not just set the iframe for these editor forms to MAXimum, and be done with it?
toms
Posts: 785
Joined: Sun Oct 14, 2018 11:25 am

Re: Resize Editor?

Unread post by toms »

bkay wrote: I can't help but ask... why not just set the iframe for these editor forms to MAXimum, and be done with it?
I usually open the iframes in a new window anyway so I don't really care about the size.
To do so, I implemented my own menu, which is only visible to the administrator.

https://www.youtube.com/watch?v=XPM-6SgPExA
bkay
Posts: 9
Joined: Mon May 28, 2018 2:02 pm

Re: Resize Editor?

Unread post by bkay »

Oh wow. That's a much better solution!
...and I was just starting to get frustrated with having to go to the far right of the screen for the options menu, then far left to close and save. (Lots of mouse-miles, lol).

I've done a quick search for "Quick Menu" or "add menu" in the forums, and can't find anything about how you may have added that menu to the "Home" area.
Is that a technique you can share with us newbies?
(PS - After 6hrs of trial and error editing a browse and edit form, I just got my first LEFT OUTER JOIN to HALF work (it displays in main page), so I'm stoked! :D )

Thanks again!
Bill
toms
Posts: 785
Joined: Sun Oct 14, 2018 11:25 am

Re: Resize Editor?

Unread post by toms »

bkay wrote: ...and I was just starting to get frustrated with having to go to the far right of the screen for the options menu, then far left to close and save. (Lots of mouse-miles, lol).
Yes, that's also true for me with a 23.6" monitor..
bkay wrote:I've done a quick search for "Quick Menu" or "add menu" in the forums, and can't find anything about how you may have added that menu to the "Home" area.
Is that a technique you can share with us newbies?
You'll find the full source code in my Github repository (just updated):
https://github.com/tomsx/nuBuilderForte ... ickMenu.js
bkay
Posts: 9
Joined: Mon May 28, 2018 2:02 pm

Re: Resize Editor?

Unread post by bkay »

Awesome. Thanks... works like a charm!

I really appreciate your help!! :D
Locked