Skip to main content

How to extend JQuery bass class in the VtigerCRM

 

[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>


Comments

Popular posts from this blog

Sublime vs Dreamweaver

13 REASONS TO USE OF SUBLIME TEXT OVER DREAMWEAVER 17 MARCH, 2014 BY TOM ELLIOTT I started writing this post over a year ago but back then it was entitled something along the lines of ‘Reasons why I use Dreamweaver over code editors’. This was biased, as I hadn’t properly explored other code editors like Coda, Sublime Text or Notepad++. So, wanting to write an objective post from a web developers point of view, and because I had heard many good things about it, I setup Sublime Text 2 and dove straight in. I’m glad I did because it quickly became obvious that my presumed reasons for Dreamweaver’s superiority were just wrong. We are all creatures of habit to a greater or lesser degree and when we develop workflows to help make our lives easier, we can get entrenched in the view that these honed practices are superior. It’s not our fault, confirmation bias is supposedly  programmed in our DNA . Even so, it’s healthy to try and keep questioning and challenging ourselves, espe...

Difference Between Primary Key and Unique Key In Sql Server

Both  PRIMARY KEY  and  UNIQUE KEY  enforces the Uniqueness of the values  (i.e. avoids duplicate values) on the column[s] on which it is defined.  Also these key’s can Uniquely identify each row in database table. Below table lists out the major  difference between PRIMARY KEY and UNIQUE KEY : PRIMARY KEY UNIQUE KEY NULL It doesn’t allow Null values. Because of this we refer PRIMARY KEY = UNIQUE KEY + Not Null CONSTRAINT Allows Null value. But only one Null value. INDEX By default it adds a clustered index By default it adds a UNIQUE non-clustered index LIMIT A table can have only one PRIMARY KEY Column[s] A table can have more than one UNIQUE Key Column[s] CREATE SYNTAX Below is the sample example for defining a single column as a PRIMARY KEY column while creating a table: CREATE TABLE  dbo.Customer ( Id  IN...

JazzCash Mobile Account

  JazzCash Mobile Account Help Center  > JazzCash Mobile Account What is JazzCash mobile account? JazzCash Mobile Account is an actual bank account that is tagged with your mobile number and can be operated through your phone. Through this Mobile Account you can enjoy complete freedom of accessing financial services anywhere, anytime! More importantly, you don’t have to rely on traveling to a Bank branch, wait at queues or complete any documentation. Mobile Account menu works on all types of mobile phones – smart phone is not required. Customers can make deposits or withdrawals through any Mobilink Microfinance Bank Branch, Mobilink Franchise, Mobilink Business Center and Jazzcash Agents spread across Pakistan. JazzCash Mobile App In line with the continuous digitization of its services to meet demands of growing number of smartphone users, JazzCash is proud to announce Android based App for its Mobile Account users. The App offers a user friendly inte...