Added a button, but did not understand how to make it to open a link in a new window

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • roman042
    Member
    • Jun 2017
    • 64

    Added a button, but did not understand how to make it to open a link in a new window

    Added a button, but did not understand how to make it to open a link in a new window.
    Help me to understand

    Espo.define('crm:views/account/detail', 'views/detail', function (Dep) {

    return Dep.extend({

    setup: function () {
    Dep.prototype.setup.call(this);
    this.menu.buttons.push({
    'label': 'Test',
    'style' : 'default',
    'link': 'https://ya.ru',
    'iconHtml': '<span class="glyphicon glyphicon-th-list"></span>'
    });
    },
    relatedAttributeMap: {
    'contacts': {
    'billingAddressCity': 'addressCity',
    'billingAddressStreet': 'addressStreet',
    'billingAddressPostalCode': 'addressPostalCode',
    'billingAddressState': 'addressState',
    'billingAddressCountry': 'addressCountry',
    'id': 'accountId',
    'name': 'accountName'
    }
    }
    });
    });
  • tanya
    Senior Member
    • Jun 2014
    • 4308

    #2
    Hello
    an example - client/modules/crm/src/views/lead/detail.js
    set the parameter 'action', and define this method

    Comment

    Working...