Jump to content


Stratos Provatopoulos

Member Since 07 Apr 2013
Offline Last Active Feb 11 2014 04:01 PM
-----

Posts I've Made

In Topic: Edit extra fields in n_n_relations

06 August 2013 - 09:37 PM

I am afraid that I am having trouble understanding you.

If I understand correctly the problem is now solved and you can insert/update/normally.

But you want to obviate something... What exactly do you want to obviate?


In Topic: Edit extra fields in n_n_relations

06 August 2013 - 08:08 AM

OK now I am starting to understand.

The problem is at the addTab function located at jquery.tab.config.js.

 

This function is supposed to replace the string "{primary_key_value}" with the value of the option that you select from the dropdown (in your example the dropdown is the input which says Seleccione Cargos). The select input is populated with the contents of the table that you are linking to (in you example Cargo).

 

My first question is whether that table (Cargo) has a primary key which is set to auto_increment

 

If you have set a primary key on that table, then I would like you to see if there are any javascript errors in the console that stop the execution of javascript. You should also check that the correct javascript files are linked from their respective paths.

 

 

If there aren't any javascript errors and the correct files are loaded, then I want you to go to the jquery.tab.config.js file which is located at \assets\grocery_crud\js\jquery_plugins\config\jquery.tab.config.js, go to line 12 and change the code from 

tabContentTemplate = $('#'+field+"Template").html(),
tabContentHtml = tabContentTemplate.replace( /\{primary_key_value\}/g, value )

to

tabContentTemplate = $('#'+field+"Template").html(),
alert(tabContentTemplate);
alert(value);
tabContentHtml = tabContentTemplate.replace( /\{primary_key_value\}/g, value )
alert(tabContentHtml); 

Execute your example and please reply with the contents of the alertbox.


In Topic: Edit extra fields in n_n_relations

05 August 2013 - 10:11 PM

Am I also going to need the response of the ajax call not just the header.

Now for the second error. Are you using tiny_mce on your theme? I am afraid that for the time being my solution works only with tinyMce


In Topic: Edit extra fields in n_n_relations

04 August 2013 - 11:04 PM

No I meant in the network tab, if you click on the update_validation ajax call, the one you showed me in your previous post, you should see the raw output of the server. Can you please attach a screenshot with this information


In Topic: Edit extra fields in n_n_relations

04 August 2013 - 06:45 AM

Update validation always runs whether you have implemented or not. Usually if you haven't set any rules you just get success:true.

But since I don't since the other ajax call that actually implements the update I am guessing that something is wrong.

 

If you click on that entry a new panel should appear on the right. I actually wanted that output.. sorry I forgot to mention it