Welcome to the nuBuilder Forums!

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

Add text style

Questions related to using nuBuilder Forte.
Janusz
nuBuilder Team
Posts: 506
Joined: Fri Dec 28, 2018 1:41 pm
Location: Krakow, Poland
Has thanked: 8 times
Been thanked: 18 times

Re: Add text style

Unread post by Janusz »

So - nuDebug Reulsts - is empty.

For HTML it looks to be desplayed in the browse form
https://drive.google.com/open?id=1hGxFm ... l3G-tABcQA
and in edit as following:
https://drive.google.com/open?id=1hQALP ... yZuYnu0QrD

for save there are some errors:
https://drive.google.com/open?id=1y2o8o ... 4pMZWA7PIi
https://drive.google.com/open?id=1VjS7w ... 04zmJgkuSt
If you like nuBuilder, please leave a review on SourceForge
nac
Posts: 115
Joined: Tue Dec 12, 2017 11:28 pm
Location: Aberdeen, UK
Has thanked: 9 times
Been thanked: 12 times

Re: Add text style

Unread post by nac »

Thanks Janusz,

It looks like the Trumbowyg editor is not getting the contents from the textarea object when the form is loaded. This then affects the saving.
It is difficult to investigate this with fragments of code; ideally one would look at the application interactively. Perhaps, as a start, could you paste the entire contents of the form's Custom Code>JavaScript in your reply (use the code tags) ?

BTW, I would not put this type of field in the Browse form unless needed for searching - it would not render as formatted text.

Neil
Janusz
nuBuilder Team
Posts: 506
Joined: Fri Dec 28, 2018 1:41 pm
Location: Krakow, Poland
Has thanked: 8 times
Been thanked: 18 times

Re: Add text style

Unread post by Janusz »

Neil,
Thank you very much for you involvement - I appreciate it very much.

In fact the server I am testing it now - is temporary one with no sensitive data on it (just one test table) so I can share the access.

Would it be possible for you to open the following and have a look?
Last edited by Janusz on Wed Feb 13, 2019 2:01 pm, edited 1 time in total.
If you like nuBuilder, please leave a review on SourceForge
nac
Posts: 115
Joined: Tue Dec 12, 2017 11:28 pm
Location: Aberdeen, UK
Has thanked: 9 times
Been thanked: 12 times

Re: Add text style

Unread post by nac »

Janusz,

Sure - I will have a look and see what I can do.
I have noted the credentials. If you wish, you can delete/edit them in the previous post. (Always best to be cautious about these things.)

Neil
Janusz
nuBuilder Team
Posts: 506
Joined: Fri Dec 28, 2018 1:41 pm
Location: Krakow, Poland
Has thanked: 8 times
Been thanked: 18 times

Re: Add text style

Unread post by Janusz »

Thanks,
and just updated the previous post.

Janusz
If you like nuBuilder, please leave a review on SourceForge
nac
Posts: 115
Joined: Tue Dec 12, 2017 11:28 pm
Location: Aberdeen, UK
Has thanked: 9 times
Been thanked: 12 times

Re: Add text style

Unread post by nac »

Janusz,

It is fixed. There was a name clash and so I changed the ID of the HTML object from "tre-field1" to 'field1_tre'. The div id="tre-field1" remains the same as before .

Neil
nac
Posts: 115
Joined: Tue Dec 12, 2017 11:28 pm
Location: Aberdeen, UK
Has thanked: 9 times
Been thanked: 12 times

Re: Add text style

Unread post by nac »

As a follow-up, the efficiency of the save operation can be improved by skipping the objects which have not been edited. Here is the modified function.

Code: Select all

function nuBeforeSave() {
var hcont;
var ocont;
treField.forEach(function(element) {
    hcont = $("#"+"tre-"+ element).trumbowyg('html'); 
    ocont = $("#"+element).val();
    if (hcont !== ocont) {
       $("#"+element).val(hcont).change(); 
    }   
  });   
return true;
}
N
Janusz
nuBuilder Team
Posts: 506
Joined: Fri Dec 28, 2018 1:41 pm
Location: Krakow, Poland
Has thanked: 8 times
Been thanked: 18 times

Re: Add text style

Unread post by Janusz »

Neil,
Yeah it's working !!! :-)

Really Thank you very very much for your involvement and help.

Janusz
If you like nuBuilder, please leave a review on SourceForge
nac
Posts: 115
Joined: Tue Dec 12, 2017 11:28 pm
Location: Aberdeen, UK
Has thanked: 9 times
Been thanked: 12 times

Re: Add text style

Unread post by nac »

Zapraszamy!
Janusz
nuBuilder Team
Posts: 506
Joined: Fri Dec 28, 2018 1:41 pm
Location: Krakow, Poland
Has thanked: 8 times
Been thanked: 18 times

Re: Add text style

Unread post by Janusz »

Dziękuję Bardzo - i zapraszam na piwo jak będziesz w Krakowie.

Janusz
If you like nuBuilder, please leave a review on SourceForge
Post Reply