David,
You would add a postCreate function and the aspect require to the edit widgets Widget.js file:
define([
'dojo/_base/declare',
'dojo/_base/lang',
'dojo/_base/html',
'dojo/i18n!esri/nls/jsapi',
'dojo/on',
'dojo/query',
'dijit/_WidgetsInTemplateMixin',
'jimu/BaseWidget',
'jimu/MapManager',
'esri/dijit/editing/Editor',
'esri/layers/FeatureLayer',
'dojo/aspect'
],
function(declare, lang, html, esriBundle, on, query, _WidgetsInTemplateMixin,
BaseWidget, MapManager, Editor, FeatureLayer, aspect) {
return declare([BaseWidget, _WidgetsInTemplateMixin], {
name: 'Edit',
baseClass: 'jimu-widget-edit',
editor: null,
layers: null,
_defaultStartStr: "",
_defaultAddPointStr: "",
resetInfoWindow: {},
_sharedInfoBetweenEdits: {
editCount: 0,
resetInfoWindow: null
},
postCreate: function () {
/*Workaround for the LanunchPad theme not firing onClose and onOpen for the widget*/
if(this.appConfig.theme.name === "LaunchpadTheme"){
var tPanel = this.getPanel();
if(tPanel){
aspect.after(tPanel, "onClose", lang.hitch(this, this.onClose));
aspect.after(tPanel, "onOpen", lang.hitch(this, this.onOpen));
}
}
/*end work around for LaunchPad*/
},