How can I override the default "click on phone number" action?

I noticed that when a phone number with the appropriate format is clicked in the Contacts view, this performs a "callto:<phone number" action which connects to Skype or other compatible software. It would be useful to me if I could override this action. How can I achieve this? Can this be done with a custom module or is there another better way?

Thanks in advance!

Parents
  • hi André Policarpo

    yes , you can do by overriding phone handlebar files.

    copy clients/base/fields/phone/*.hbs to custom/clients/base/fields/phone

    and then load js file using jsgrouping

    1.   custom/Extension/application/Ext/JSGroupings

    you can click on that and perform action

    this is detail.hbs   try this

    {{#if value}}

        <img style="cursor:pointer;float:left;margin-right:5px;padding-top:2px;width:24px" src="custom/themes/default/images/abc.png" onclick="one();">

        <div class="ellipsis_inline" data-placement="bottom" title="{{value}}">

            {{#if skypeValue}}

            <a href="callto:{{skypeValue}}">{{value}}</a>

            {{else}}{{value}}

            {{/if}}

          

        </div>

    {{/if}}

    Rebuild JS Grouping Files

    Quick Repair & Rebuild

    ..

  • What exactly are you trying to override? The action it performs or the formatting/URL it creates for such phone numbers?

Reply Children