Select to view content in your preferred language

How I can Add a link in Attribute Inspector Editor for the Editor Widget?

1676
2
Jump to solution
04-21-2017 04:23 PM
DairisTapanes_Rios
Deactivated User
  1. I'm using Editor Widget with Template Picker. I need to add a link to open a dialog box to do more action in the attribute editor. Please see the attach image.I have tried 

    var link = domConstruct.create("a", {
    "class": "action",
    "id": "statsLink",
    "innerHTML": "Attach Documents", //text that appears in the popup for the link
    "href": "javascript: void(0);"
    }, query(".actionList", map.infoWindow.domNode)[0]);


    //when the link is clicked register a function that will run
    on(link, "click", showDialog);

    },

but doesn't work, 

I'm using Editor Widget as in this sample (Edit rivers and waterbodies ) I'm wondering if is it possible to add the link as I want ?

thanks in advance !

0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus

Dairis,

   Here is how you would do that for the edit widgets attributes inspector:

        var link = domConstruct.create("a", {
          "class": "atiNavButtons",
          "id": "statsLink",
          "innerHTML": "Attach Documents", //text that appears in the popup for the link
          "href": "javascript: void(0);"
        }, query(".atiButtons", map.infoWindow.domNode)[0]);

        //when the link is clicked register a function that will run
        on(link, "click", showDialog);

View solution in original post

2 Replies
RobertScheitlin__GISP
MVP Emeritus

Dairis,

   Here is how you would do that for the edit widgets attributes inspector:

        var link = domConstruct.create("a", {
          "class": "atiNavButtons",
          "id": "statsLink",
          "innerHTML": "Attach Documents", //text that appears in the popup for the link
          "href": "javascript: void(0);"
        }, query(".atiButtons", map.infoWindow.domNode)[0]);

        //when the link is clicked register a function that will run
        on(link, "click", showDialog);
DairisTapanes_Rios
Deactivated User

Thank you so much !

0 Kudos