AnsweredAssumed Answered

Custom Link in Local Data Popup Click on the Map

Question asked by gilbertorm83@gmail.com on May 11, 2018
Latest reply on May 14, 2018 by gilbertorm83@gmail.com

Hello friends!

 

I need to include a link to a url from another system, where I need to include a parameter in the url's formation. This parameter appears by default in the data that is in the popup, but I can not find a correct way to search for this information. Another detail is that this link option should appear only for a specific layer, that is, if the user clicks on the active point of another layer, I need to check if the layer he is clicking on is the one that should provide that link with to url. I was able to implement in the file "application folder \ jimu.js \ PopupManager.js", inside the function "_createPopupMenuButton" according to the code that follows just below:

 

_createPopupMenuButton: function () {
      this.popupMenuButtonDesktop = html.create('span', {
      'class': 'popup-menu-button'
}, query(".actionList", this.popupUnion.bigScreen.domNode)[0]);

 

//Create link
var linkRelatorio = html.create("a", {
      "class": " action action-relatorio",
      "id": "actionRelatorio",
      "innerHTML": "Abrir Relatório",
      "href": "localhost/SigFepamRelatorios/Relatorio.aspx?idRelatorio=1&atanId=",
      "target": "_blank"
}, query(".actionList", this.popupUnion.bigScreen.domNode)[0]);
on(linkRelatorio, "click", this._onActionRelatorio);

...

...

...

 

This code only puts the link with the url without the parameter I need, and in addition, displays the option whenever the popup is opened and not only for the layer that I want.

Attached is an example of how it was. I am from Brazil, in the state of Rio Grande do Sul.

Thanks for any help.
Gilberto

Attachments

Outcomes