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

Alan Lord alanslists at gmail.com
Fri Mar 28 11:27:50 GMT 2014


I've been looking at migrating GeoTools to VT6. It's been a good way to 
learn about VT6 as it is quite a complex module in terms of the View it 
needs to produce.

One thing I need to accomplish is to support the idea of an embedded 
list (a list view of a module within an another module). And it's mostly 
working now. BUt I've supidly copied the app.js from /resources and I've 
ended up with duplicate event handlers on the same page.

What I could really do with doing is to override a couple of functions 
in resources/app.js when the GeoTools page loads.

I've been reading up on Javascript's prototype and am getting rather 
confused :-(

As an example in app.js the function:

> var app = {
...
> 	getModuleName : function() {
> 		return jQuery('#module').val();
> 	},
...

I would like to override so it instead does:

> 	getModuleName : function() {
> 		return jQuery('#embedModule').val();
> 	},

Anyone care to hit me with a cluebat?

I know I could write a new function and replace the calls elsewhere but 
that doesn't really seem to be the correct way in this new object based 
MVC architecture.

Cheers

Al



More information about the vtigercrm-developers mailing list