Select to view content in your preferred language

How to detect widget settings page closing ?

2768
2
Jump to solution
12-11-2015 04:38 AM
MathieuVILLEMONT1
Deactivated User

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 Emeritus

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 Emeritus

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
Deactivated User

Nice hack Robert !

0 Kudos