[Vtigercrm-developers] jQuery.Class and extend()

Alan Lord (News) alanslists at gmail.com
Tue Jun 24 19:59:00 GMT 2014


Hi guys,

Are there any *useful* examples/documentation of this?

The only reference to $.Class I can find is here: 
http://v3.javascriptmvc.com/docs/#&who=jQuery.Class But I am not sure if 
this the same code as is being used in vtiger?

What I'm trying to understand is, for example in your Worldclock 
example, you show the following:

> Vtiger_List_Js.extend('WorldClock_List_Js', {}, {
> ...
> });

Now, from my very rudimentary understanding this means that I am 
creating a "clone" (if you like) of Vtiger_List_Js that also contains 
the functions and parameters defined in WorldClock_List_Js.

What I am trying to understand is if I create a function in 
WorldClock_List_Js that has the same name as the original in 
Vtiger_List_Js will my new one override it?

What are the limitations and catches with this approach?

My reason for these questions is I'm wanting to override a few functions 
in Vtiger_List_Js and add a few more. I'd really like to not have to 
create a whole copy of the Vtiger_List_Js class in my module if I can 
help it... But I can't seem to get it to work. Maybe I am 
misunderstanding something?

Thanks

Al



-- 
Libertus Solutions
http://www.libertus.co.uk



More information about the vtigercrm-developers mailing list