Select to view content in your preferred language

AWAB Edit widget customisation

1350
3
Jump to solution
10-26-2016 09:14 PM
chandupatel
Deactivated User

Hi - I am working on customisation of AWAB Edit widget in AGOL. I want to diable the 'Delete' functionality from the widget but users can add the feature. Basically remove the 'Delete' button from the Edit tool popup window. Thanks in advance

Ramesh

Tags (2)
0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus

Chandu,

   If you are using a hosted Feature Layer on AGOL then you can set the allowed edit properties

Or in the Widget.js update this function (add line 16 - 18):

      /***************************************
      * Methods for extra works
      ****************************************/
      _addButtonToInspector: function() {
        var closeButton = new Button({
          label: this.nls.close,
          "class": " atiButton closeButton"
        }, html.create("div"));

        html.place(closeButton.domNode,
                   this.editor.attributeInspector.deleteBtn.domNode,
                   "after");
        this.own(on(closeButton, 'click', lang.hitch(this, function() {
          this.editPopup.hide();
        })));
        this.own(on(this.editPopup, "show", lang.hitch(this, function(){
          html.setStyle(this.editor.attributeInspector.deleteBtn.domNode, "display", "none");
        })));
      },

View solution in original post

3 Replies
RobertScheitlin__GISP
MVP Emeritus

Chandu,

   If you are using a hosted Feature Layer on AGOL then you can set the allowed edit properties

Or in the Widget.js update this function (add line 16 - 18):

      /***************************************
      * Methods for extra works
      ****************************************/
      _addButtonToInspector: function() {
        var closeButton = new Button({
          label: this.nls.close,
          "class": " atiButton closeButton"
        }, html.create("div"));

        html.place(closeButton.domNode,
                   this.editor.attributeInspector.deleteBtn.domNode,
                   "after");
        this.own(on(closeButton, 'click', lang.hitch(this, function() {
          this.editPopup.hide();
        })));
        this.own(on(this.editPopup, "show", lang.hitch(this, function(){
          html.setStyle(this.editor.attributeInspector.deleteBtn.domNode, "display", "none");
        })));
      },
chandupatel
Deactivated User

Thanks Rober -Your advice works for me but I did change at AGS service level as we are not using public AGOL.

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Don't forget to mark this question as answered by clicking on the "Correct Answer" link on the reply that answered your question.

0 Kudos