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

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

Remove the Loadblanks.ru Browser Hijacker (Removal Guide)

What is Loadblanks.ru Browser Hijacker? Skip this and learn how to remove Loadblanks.ru Browser Hijacker! The  Loadblanks.ru Browser Hijacker  is a computer infection from the  Adware/ShortcutHijacker  family that changes the shortcuts for your installed web browsers so that they automatically open the loadblanks.ru web page. It does this by pointing the browser shortcuts to batch files located in the  %UserProfile%\AppData\Roaming\Browsers\  folder as shown below. These batch files contain an obfuscated command that opens the specified browser to a specific page. In this case, the browser will be forced to automatically open the http://ic.loadblanks.ru/ or http://im.loadblanks.ru homepages. An example of the command executed by the batch file is  start "" "c:\PROGRA~2\google\chrome\APPLIC~1\chrome.exe" "http://im.loadblanks.ru/c/b26cdff542ee7ff6?" . You can see an example of this obfuscated batch file below. Due to these modified sho...

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