Hi,
Is it possible to have a subform that will just show the browse form?
I have a system where log entries are made and I want the form that launches the new log entry form to show the [read only] log history (along with some other stuff).
I can kind of do it with an edit subform with the objects set to readonly, but the browse form is nicer because it's paged and I can call-up related fields in the forms browse SQL.
Steve
Welcome to the nuBuilder Forums!
Register and log in to access exclusive forums and content available only to registered users.
Register and log in to access exclusive forums and content available only to registered users.
Browse subform
-
- Posts: 21
- Joined: Tue Oct 16, 2018 12:21 am
Re: Browse subform
Hi,
I did it with an iframe; removing the breadcrums etc from the top with:
I also disabled clicking with a do nothing nuSelectBrowse function:
... but ...
I'm struggling to find the onmouseover event for the record highlighting which I would like to disable.
Also, if I try to remove the 'Action Holder' in nuRemoveHolders (value '0') the browse form's page navigation buttons don't work correctly, they just blank the browse records and you can't navigate back to get them back. This has nothing to do with it being in an iframe - it does it if it is the main form as well. This is either a 'bug' or at least a condition I need to protect against - but I'm not entirely sure where/how I would do that.
Steve
I did it with an iframe; removing the breadcrums etc from the top with:
Code: Select all
nuRemoveHolders(1,2);
Code: Select all
function nuSelectBrowse(e) {
}
I'm struggling to find the onmouseover event for the record highlighting which I would like to disable.
Also, if I try to remove the 'Action Holder' in nuRemoveHolders (value '0') the browse form's page navigation buttons don't work correctly, they just blank the browse records and you can't navigate back to get them back. This has nothing to do with it being in an iframe - it does it if it is the main form as well. This is either a 'bug' or at least a condition I need to protect against - but I'm not entirely sure where/how I would do that.
Steve
-
- nuBuilder Team
- Posts: 4304
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 71 times
- Been thanked: 445 times
- Contact:
Re: Browse subform
I have this code in a (iframe) form of mine to disable/modify some elements. The record navigation still works as it should (for me)
Code: Select all
if (nuFormType() == 'browse') {
// disable record highlighting
$("div[id^='nucell_']").unbind('mouseenter mouseleave');
$('.nuActionButton').hide();
$('#nuSearchField').hide();
$('#nuActionHolder').hide();
$('#nuBreadcrumbHolder').hide();
// $('body').css('height', '200px'); // modify the height if you need this
// $('#nubody').css({'background-color': '#F4F8F9' }); // modify the hex color if you need this
$("[id^='nusort']").attr('onclick','');
}
function nuSelectBrowse(e) {
// do nothing
}
Re: Browse subform
stevendb,
You can do want you are asking by using a Run Object that uses the Browse Form you want to display and set the Method to Iframe.
https://wiki.nubuilder.cloud/ ... #Tab_-_Run
Steven
You can do want you are asking by using a Run Object that uses the Browse Form you want to display and set the Method to Iframe.
https://wiki.nubuilder.cloud/ ... #Tab_-_Run
Steven
-
- Posts: 21
- Joined: Tue Oct 16, 2018 12:21 am
Re: Browse subform
Thanks kev1n, That's working perfectly!
For completeness ..
Seems that the browse form pagination problem is down to the removing of the nuActionHolder
As far as I can tell this is due to the pagination usage of nuSearchAction which uses elements in the nuActionHolder; which aren't there if you remove the nuActionHolder with nuRemoveHolders. Maybe there should be a nuHideHolders.
Steve
For completeness ..
Seems that the browse form pagination problem is down to the removing of the nuActionHolder
Code: Select all
$('#nuActionHolder').remove(); // breaks pagination
$('#nuActionHolder').hide(); // works fine
Steve