function processLinkTemplate(link, item) {
      var processedLink = link;
      var pnxProperties = link.match(/\{(pnx\..*?)\}/g) || [];
      pnxProperties.forEach(function (property) {
        var value = property.replace(/[{}]/g, '').split('.').reduce(function (o, i) {
          try {
            var h = /(.*)(\[\d\])/.exec(i);
            if (h instanceof Array) {
              return o[h[1]][h[2].replace(/[^\d]/g, '')];
            }
            return o[i];
          } catch (e) {
            return '';
          }
        }, item);
        processedLink = processedLink.replace(property, value);
      });
      return function () {
        return window.open(processedLink, '_blank');
      };
    }
/**
     * Process a link into a function to call when the action is clicked.
     * The function will open the processed link in a new tab.
     * Will replace {pnx.xxx.xxx} expressions with properties from the item.
     * @param  {string}    link    the original link string from the html
     * @param  {object}    item    the item object obtained from the controller
     * @return {function}          function to call when the action is clicked
     */
Process a link into a function to call when the action is clicked.
The function will open the processed link in a new tab.
Will replace {pnx.xxx.xxx} expressions with properties from the item.
@param  {string}    link    the original link string from the html
@param  {object}    item    the item object obtained from the controller
@return {function}          function to call when the action is clicked
Process a link into a function to call when the action is clicked . The function will open the processed link in a new tab . Will replace { pnx . xxx . xxx } expressions with properties from the item . @param { string } link the original link string from the html @param { object } item the item object obtained from the controller @return { function } function to call when the action is clicked
function processLinkTemplate(link, item) {
      var processedLink = link;
      var pnxProperties = link.match(/\{(pnx\..*?)\}/g) || [];
      pnxProperties.forEach(function (property) {
        var value = property.replace(/[{}]/g, '').split('.').reduce(function (o, i) {
          try {
            var h = /(.*)(\[\d\])/.exec(i);
            if (h instanceof Array) {
              return o[h[1]][h[2].replace(/[^\d]/g, '')];
            }
            return o[i];
          } catch (e) {
            return '';
          }
        }, item);
        processedLink = processedLink.replace(property, value);
      });
      return function () {
        return window.open(processedLink, '_blank');
      };
    }
function processLinkTemplate ( link , item ) { var processedLink = link ; var pnxProperties = link . match ( / \{(pnx\..*?)\} / g ) || [ ] ; pnxProperties . forEach ( function ( property ) { var value = property . replace ( / [{}] / g , '' ) . split ( '.' ) . reduce ( function ( o , i ) { try { var h = / (.*)(\[\d\]) / . exec ( i ) ; if ( h instanceof Array ) { return o [ h [ 1 ] ] [ h [ 2 ] . replace ( / [^\d] / g , '' ) ] ; } return o [ i ] ; } catch ( e ) { return '' ; } } , item ) ; processedLink = processedLink . replace ( property , value ) ; } ) ; return function ( ) { return window . open ( processedLink , '_blank' ) ; } ; }
Process a link into a function to call when the action is clicked.
Process a link into a function to call when the action is clicked .