Page 1 of 1
nuSetTitle() limited to Edit Forms?
Posted: Wed Feb 07, 2018 3:52 am
by toms
HI,
Is there a reason nuSetTitle() is limited to Edit Forms only? I tried removing the row that is checking the Form Type and run the function while having a Browse Form open.
Result: The title/breadcrumb has been set.
Code: Select all
function nuSetTitle(t){
if(nuFormType() == 'browse'){return;}
nuFORM.setProperty('title', t);
var b = $('.nuBreadcrumb').length;
$('#nuBreadcrumb' + b).html(t);
}
Re: nuSetTitle() limited to Edit Forms?
Posted: Wed Feb 07, 2018 4:53 am
by admin
toms,
nuSetTitle() is to allow a unique title on an Edit Form.
A Browse Form doesn't need a unique title.
Having said that, if you have a reason to change the title on a Browse, just do it with Javascript eg.
Code: Select all
$('#nuBreadcrumb1').html('unique title');
Steven
Re: nuSetTitle() limited to Edit Forms?
Posted: Wed Feb 07, 2018 7:55 am
by toms
Steven,
Apart from changing a breadcrumb title, what's the purpose of this nuSetTitle() function?
I mean what is the purpose of setting a form's title?
At least I don't see any visual change when running just this piece of code.
Re: nuSetTitle() limited to Edit Forms?
Posted: Wed Feb 07, 2018 11:20 am
by admin
toms,
It sets a Hash Cookie that can be used back on the Server.
I guess its a sort of undocumented feature.
I'm not sure if anyone would ever use it.
Steven
Re: nuSetTitle() limited to Edit Forms?
Posted: Wed Feb 07, 2018 11:27 am
by toms
Steven,
In this case I think nuSetTitle() can be slightly amended so It can be used for both an Edit and Browse Form.
Code: Select all
function nuSetTitle(t){
if(nuFormType() == 'edit'){
nuFORM.setProperty('title', t);
}
var b = $('.nuBreadcrumb').length;
$('#nuBreadcrumb' + b).html(t);
}
Re: nuSetTitle() limited to Edit Forms?
Posted: Wed Feb 07, 2018 1:36 pm
by admin
toms,
Mate, don't get bogged down on stuff that is working.
You are doing a great job finding the things that don't work so that I can fix them - keep doing that.
Steven
Re: nuSetTitle() limited to Edit Forms?
Posted: Wed Feb 07, 2018 3:20 pm
by toms
Steven,
I was just looking for a function that works both on an Edit and Browse form. As there was no such function, I created my own one and I'm happy with it.
Of course, you're not at all obligated to do anything with it. I'm just posting ideas/improvments and maybe if someone finds it useful, it can be used...
Re: nuSetTitle() limited to Edit Forms?
Posted: Wed Feb 07, 2018 8:19 pm
by admin
.