How to detect widget settings page closing ?

2409
2
Jump to solution
12-11-2015 04:38 AM
MathieuVILLEMONT1
Occasional Contributor

Hello,

Is there a way to detect that the widget settings page is closing?  (i.e. when the user clicks on the X or on the Cancel button)

Thanks

Tags (1)
0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Esteemed Contributor

Mathieu,

  Sure here is some code:

postCreate: function() {
  var settingsDom = dojoQuery(".jimu-popup.widget-setting-popup")[0];
  var aWidget = dijit.getEnclosingWidget(settingsDom);
  aspect.before(aWidget, "onClose", this.sendAlert);
},

sendAlert: function() {
  alert("closing");
},

View solution in original post

2 Replies
RobertScheitlin__GISP
MVP Esteemed Contributor

Mathieu,

  Sure here is some code:

postCreate: function() {
  var settingsDom = dojoQuery(".jimu-popup.widget-setting-popup")[0];
  var aWidget = dijit.getEnclosingWidget(settingsDom);
  aspect.before(aWidget, "onClose", this.sendAlert);
},

sendAlert: function() {
  alert("closing");
},
MathieuVILLEMONT1
Occasional Contributor

Nice hack Robert !

0 Kudos