<div dir="ltr"><div>Your are right about the reference link, one more here: <a href="http://bitovi.com/blog/2010/06/a-simple-powerful-lightweight-class-for-jquery.html" target="_blank">http://bitovi.com/blog/2010/06/a-simple-powerful-lightweight-class-for-jquery.html</a></div>


<div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Vtiger_List_Js.extend('WorldClock_List_Js', { /* static methods */ }, {<br>


<span style="white-space:pre-wrap">     </span>/* class methods */<br><span style="white-space:pre-wrap">   </span>...<br>});</blockquote><div><br></div><div>Closest php equivalent would be:</div><div>class WorldClock_List_JS extends Vtiger_List_Js {}</div>


<div><br></div><div>If you are on the (WorldClock module, List view) - client-side framework of Vtiger <br></div><div>tries to instantiate the controller (WorldClock_List_Js) if exists otherwise loads (Vtiger_List_Js).</div>

<div>
<br></div><div>Defining key with same name in either static methods / class methods block lets you override </div><div>the parent's behavior. (<a href="http://community.vtiger.com/help/vtigercrm/developers/extensions/examples/world-clock-v1.html#step-7-view-javascript" target="_blank">World-Clock example</a> overrides registerEvents class method).</div>


<div><br></div><div class="gmail_extra"><br clear="all"><div><span style="border-collapse:collapse;font-family:arial,sans-serif;font-size:13px"><b>Connect with us on: </b><a href="http://twitter.com/vtigercrm" style="color:rgb(0,0,204)" target="_blank">Twitter</a> <b>I</b> <a href="http://www.facebook.com/pages/vtiger/226866697333578?sk=wall" style="color:rgb(0,0,204)" target="_blank">Facebook</a> <b>I</b> <a href="https://blogs.vtiger.com/" style="color:rgb(0,0,204)" target="_blank">Blog</a><b> I</b> <a href="http://wiki.vtiger.com/index.php/Main_Page" style="color:rgb(0,0,204)" target="_blank">Wiki</a> <b>I </b><a href="https://discussions.vtiger.com" style="color:rgb(0,0,204)" target="_blank">Forums </a><b>I</b> <a href="https://www.vtiger.com/" style="color:rgb(0,0,204)" target="_blank">Website</a></span></div>



<br><br><div class="gmail_quote">On Wed, Jun 25, 2014 at 1:29 AM, Alan Lord (News) <span dir="ltr"><<a href="mailto:alanslists@gmail.com" target="_blank">alanslists@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


Hi guys,<br>
<br>
Are there any *useful* examples/documentation of this?<br>
<br>
The only reference to $.Class I can find is here: <a href="http://v3.javascriptmvc.com/docs/#&who=jQuery.Class" target="_blank">http://v3.javascriptmvc.com/<u></u>docs/#&who=jQuery.Class</a> But I am not sure if this the same code as is being used in vtiger?<br>



<br>
What I'm trying to understand is, for example in your Worldclock example, you show the following:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Vtiger_List_Js.extend('<u></u>WorldClock_List_Js', {}, {<br>
...<br>
});<br>
</blockquote>
<br>
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.<br>
<br>
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?<br>
<br>
What are the limitations and catches with this approach?<br>
<br>
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?<br>



<br>
Thanks<span><font color="#888888"><br>
<br>
Al<br>
<br>
<br>
<br>
-- <br>
Libertus Solutions<br>
<a href="http://www.libertus.co.uk" target="_blank">http://www.libertus.co.uk</a><br>
<br>
______________________________<u></u>_________________<br>
<a href="http://www.vtiger.com/" target="_blank">http://www.vtiger.com/</a><br>
</font></span></blockquote></div><br></div></div>