[Vtigercrm-developers] Need a Javascript cluebat...

Prasad prasad at vtiger.com
Fri Mar 28 13:38:14 GMT 2014


Alan,

resources/app.js has helper methods that is global to application - not
sure the intent of extending it.

>From your example - have a wrap method seem more appropriate:

jQuery.Class('GeoTools_List_Js', {
// Static functions
 getEmbededModuleName: function() {
return jQuery('#embedModule').val();
 }
}, {
    // Member functions
    registerGeoToolsEvents: function() {
    // GeoTools_List_Js.getEmbededModuleName()
    }
});

I hope you have looked at:
http://community.vtiger.com/help/vtigercrm/developers/extensions/examples/extension-module.html#resources-myrss-js

Let me know if the example is not clear or aid in your porting.

Regards,
Prasad





*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 Fri, Mar 28, 2014 at 5:46 PM, Alan Lord <alanslists at gmail.com> wrote:

> On 28/03/14 11:27, Alan Lord wrote:
>
>> What I could really do with doing is to override a couple of functions
>> in resources/app.js when the GeoTools page loads.
>>
>
> More by luck than judgement I think, but the following seems to be working
> properly:
>
>  app.prototype = app;
>> app.prototype.getModuleName = function() {
>>                 return jQuery('#embedModule').val();
>> };
>> app.prototype.getViewName = function() {
>>         return jQuery('#embedView').val();
>> };
>>
>
> If anyone would/could care to explain what/why this is working I'd love to
> know ;-)
>
>
> Cheers
>
> Al
>
>
> _______________________________________________
> http://www.vtiger.com/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20140328/13f1eb66/attachment.html>


More information about the vtigercrm-developers mailing list