vtiger Forum Index vtiger
The Honest Open Source CRM
 

Javascript for new Module
Click here to go to the original topic

 
       vtiger Forum Index -> Help - 5.0.3
Previous topic :: Next topic  
Author Message
kcassio



Joined: 02 May 2008
Posts: 41
Location: Denver Metro, Colorado

Posted: Fri Jun 27, 2008 9:59 pm    Post subject: Javascript for new Module  

Hi,

Does anyone know of a good guide anywhere on how to create the javascripts for a newly created module?

Thank you,
Back to top  
joebordes



Joined: 18 Aug 2006
Posts: 1089
Location: Alicante/Valencia, Spain

Posted: Fri Jun 27, 2008 10:41 pm    Post subject: Re: Javascript for new Module  

If you follow the main guidelines for creating a module you should be able to put your javascript code into a file called

modules/newmodulename/newmodulename.js

and get it loaded and ready to be used.

There is not much more to it.

Joe
TSolucio
Back to top  
kcassio



Joined: 02 May 2008
Posts: 41
Location: Denver Metro, Colorado

Posted: Fri Jun 27, 2008 10:46 pm    Post subject: Re: Javascript for new Module  

Man, then I'm totally stuck somewhere.

(BTW - Thanks, your answers are definitely helping me out a lot.)

I created a new module (thanks to your directlon) and am relating it to the Leads module. The search box is coming up, but when I try to add a new item from the new module it is never enters the getRelCheckquery Query. It seems to be passing the right variables to the script, but never runs the query.

This is what is written to the vtiger.log file:

06/27/08 15:31:37,082 [1756] DEBUG layout_utils - Entering AlphabeticalSearch(Licenses,Popup,referencecode,true,basic,detailview,,,,,) method ...
06/27/08 15:31:37,085 [1756] DEBUG layout_utils - Exiting AlphabeticalSearch method ...
06/27/08 15:31:37,086 [1756] DEBUG layout_utils - Entering getRelCheckquery(Licenses,Leads,154367) method ...
06/27/08 15:31:37,086 [1756] DEBUG layout_utils - Exiting getRelCheckquery method ...
--------
C:\www\webdev\vtigercrm\include\utils\ListViewUtils.php:3283
C:\www\webdev\vtigercrm\Popup.php:256
C:\www\webdev\vtigercrm\modules\Licenses\Popup.php:22
C:\www\webdev\vtigercrm\index.php:584

06/27/08 15:31:37,087 [1756] DEBUG layout_utils - Entering getPopupCheckquery(,,) method ...
06/27/08 15:31:37,087 [1756] DEBUG layout_utils - Exiting getPopupCheckquery method ...


Any thoughts.
Thanks,
Back to top  
kcassio



Joined: 02 May 2008
Posts: 41
Location: Denver Metro, Colorado

Posted: Fri Jun 27, 2008 10:53 pm    Post subject: Re: Javascript for new Module  

A little more information:

Adding the query in the updateRelations.php script for Leads causes the vTiger screen to return to a blank screen. Again, the correct variables seem to be passing into the application.

Here's the line I added to the Leads updateRelations.php file:

elseif($dest_mod == 'Licenses')
$adb->query("insert into vtiger_setm_licensesrel values (".$_REQUEST["parentid"].",".$id.",'Leads')");

And the last lines logged in the vtiger log are:

06/27/08 16:52:14,618 [812] DEBUG index - setting cookie ck_login_id_vtiger to 3
06/27/08 16:52:14,619 [812] DEBUG index - setting cookie ck_login_theme_vtiger to alphagrey
06/27/08 16:52:14,619 [812] DEBUG index - setting cookie ck_login_language_vtiger to en_us
06/27/08 16:52:14,619 [812] DEBUG index - skipping headers
06/27/08 16:52:14,621 [812] DEBUG index - Entering isPermitted(Leads,updateRelations,) method ...
06/27/08 16:52:14,622 [812] DEBUG index - Exiting isPermitted method ...

This is driving me crazy .... any help would be so greatly appreciated.

Thanks again,
Back to top  
 
       vtiger Forum Index -> Help - 5.0.3
Page 1 of 1


Powered by phpBB Search Engine Indexer
Powered by phpBB 2.0.15 © 2001, 2002 phpBB Group