Welcome to the nuBuilder Forums!

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

highlight records

Questions related to customising nuBuilder Forte with JavaScript or PHP.
Locked
Audioko
Posts: 14
Joined: Tue Feb 06, 2018 10:20 am
Location: Amsterdam, The Netherlands

highlight records

Unread post by Audioko »

Hi,

In version pro3 I could highlight records with the use of nuLoadBrowse function.
E.g. to distinct records of a product browse form that are no longer in stock.
How can I do this in Forte?

thanks,
Ko

Can I roughly use the same code and replace specific elements like 'row' with 'nucell' etc?
You do not have the required permissions to view the files attached to this post.
admin
Site Admin
Posts: 2814
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 25 times

Re: highlight records

Unread post by admin »

audioko,

There is no nuLoadBrowse() or nuLoadEdit().

All the Javascript on a Form gets run each time a Form loads.

This should help...

https://forums.nubuilder.cloud/viewtopic. ... ype#p16144


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

Re: highlight records

Unread post by toms »

Ko,

This works for me:

Code: Select all

if (nuFormType() == 'browse') {
    $('[data-nu-column="4"]').each(function (index) {

        var cellId = $(this).attr('id');
        var cellValue = $('#' + cellId).html();
        var rowNum = String(cellId).split('_')[1];

        if (cellValue == '0') {
            $("div[id^='nucell_" + rowNum).css("color", "red");
        }
    });
}
Audioko
Posts: 14
Joined: Tue Feb 06, 2018 10:20 am
Location: Amsterdam, The Netherlands

Re: highlight records

Unread post by Audioko »

Hi Steven, Tom,

Thanks a lot both of you.
It works for me now too.

I need to learn better Javascript / JQuery and sure I will....

Ko
admin
Site Admin
Posts: 2814
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 25 times

Re: highlight records

Unread post by admin »

.
Locked