You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tt-rss/js/SingleUseDialog.js

20 lines
596 B
JavaScript

/* eslint-disable prefer-rest-params */
/* global dijit, define */
define(["dojo/_base/declare", "dijit/Dialog"], function (declare) {
return declare("fox.SingleUseDialog", dijit.Dialog, {
create: function(params) {
const extant = dijit.byId(params.id);
if (extant) {
console.warn('SingleUseDialog: destroying existing widget:', params.id, '=', extant)
extant.destroyRecursive();
}
return this.inherited(arguments);
},
onHide: function() {
this.destroyRecursive();
}
});
});