[Vtigercrm-developers] Need a Javascript cluebat...

Alan Lord alanslists at gmail.com
Fri Mar 28 13:56:15 GMT 2014


Thanks Prasad,

I mostly understand this but the reason I wanted to override the two 
app.functions() is because I have an almost total clone of List.js. and 
app.getModulename is called very frequently.

If I understand your suggestion below, then I'd need to replace all the 
app.getModuleName and app.getViewName function calls.

The way I've done it means that my List.js is virtually unchanged.

I really don't get Javascript inheritance [ as you can probably tell ;-) 
] so probably should not be doing it this way but I need a complete 
Vtiger_List_Js class to make the listview work...

Al


On 28/03/14 13:38, Prasad wrote:
> Alan,
>
> resources/app.js has helper methods that is global to application - not
> sure the intent of extending it.
>
>  From your example - have a wrap method seem more appropriate:
>
> jQuery.Class('GeoTools_List_Js', {
> // Static functions
> getEmbededModuleName: function() {
> return jQuery('#embedModule').val();
> }
> }, {
>      // Member functions
>      registerGeoToolsEvents: function() {
> // GeoTools_List_Js.getEmbededModuleName()
>      }
> });
>
> I hope you have looked at:
> http://community.vtiger.com/help/vtigercrm/developers/extensions/examples/extension-module.html#resources-myrss-js
>
> Let me know if the example is not clear or aid in your porting.





More information about the vtigercrm-developers mailing list