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
Solved! Go to Solution.
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");
})));
},
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");
})));
},
Thanks Rober -Your advice works for me but I did change at AGS service level as we are not using public AGOL.
Don't forget to mark this question as answered by clicking on the "Correct Answer" link on the reply that answered your question.