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

Prasad prasad at vtiger.com
Wed Jun 25 03:41:25 GMT 2014


Alan,

registerEvents is the main function that gets invoked on the client-side
javascript controller.
Either new / extend works.

With extending the base list view it gets the other function definitions
that can be invoked at sometime later.

WorldClock v1 example doesn't follow the same UI conventions as its parent
and hence does not invoke the parent method.

Have a look at few standard modules like (Contacts
<http://trac.vtiger.com/svn/vtiger/vtigercrm/branches/6.0.0/layouts/vlayout/modules/Contacts/resources/Detail.js>,
Rss
<http://trac.vtiger.com/svn/vtiger/vtigercrm/branches/6.1.0/layouts/vlayout/modules/Rss/resources/List.js>)
that does extend client-side controller.


*Connect with us on: *Twitter <http://twitter.com/vtigercrm> *I* Facebook
<http://www.facebook.com/pages/vtiger/226866697333578?sk=wall> *I* Blog
<https://blogs.vtiger.com/>* I* Wiki
<http://wiki.vtiger.com/index.php/Main_Page> *I *Forums
<https://discussions.vtiger.com>*I* Website <https://www.vtiger.com/>


On Wed, Jun 25, 2014 at 2:58 AM, Alan Lord (News) <alanslists at gmail.com>
wrote:

> On 24/06/14 21:34, Prasad wrote:
>
>  Defining key with same name in either static methods / class methods
>> block lets you override
>> the parent's behavior. (World-Clock example
>> <http://community.vtiger.com/help/vtigercrm/developers/
>> extensions/examples/world-clock-v1.html#step-7-view-javascript>
>> overrides registerEvents class method).
>>
>
> Thanks Prasad,
>
> One more question then.
>
> As you say above World_Clock_Js.registerEvents is an override...
>
> There are many other functions triggered by the registerEvents() method of
> Vtiger_List_Js which are really important to make the whole ListView work.
> I'm guessing that this World_Clock_Js override will not also trigger all
> the registerEvent calls in the Vtiger_List_Js method of the same name?
>
> If that is the case, what is the point of extending/inheriting the
> Vtiger_List_Js class in this example?
>
> Why not just have a new class?
>
>
> Thanks
>
> Al
>
>
> --
> Libertus Solutions
> http://www.libertus.co.uk
>
> _______________________________________________
> http://www.vtiger.com/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20140625/88a08536/attachment.html>


More information about the vtigercrm-developers mailing list