Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
var hndlError = dojo.hitch(this,function(oErrorx,ioArgs){
if ((typeof(oError) == "undefined") || (oError == null)) {
oError = new Error(this.i18n["catalog.gxe.dialog.invalidResponse"]);
}
if ((typeof(params) != "undefined") && (params != null) &&
(typeof(params.error) == "function")) {
params.error(oError,ioArgs);
} else {
console.log(oError);
}
});
load: dojo.hitch(this, function (responseObject, ioArgs) {
if ((typeof (responseObject) == "undefined") || (responseObject == null)) {
handleError(oThis.i18n["catalog.gxe.dialog.invalidResponse"]);
} else {
var oError = responseObject.error;
if ((typeof (oError) != "undefined") && (oError != null)) {
handleError(oError.message);
} else {
var cfgDefinition = responseObject.cfgDefinition;
if ((typeof (cfgDefinition) == "undefined") || (cfgDefinition == null)) {
handleError(oThis.i18n["catalog.gxe.dialog.invalidResponse"]);
} else {
oThis._prepForEditorLoad();
//handleError(oThis.i18n["catalog.gxe.dialog.invalidResponse"]);
//return;
gxe.cfg.initialize(cfgDefinition);
var elHtmlParent = dojo.byId("gxeDocument");
elHtmlParent.style.display = "none";
oThis.gxeContext.buildUI(cfgDefinition, elHtmlParent, null);
load: dojo.hitch(this, function (responseObject, ioArgs) {
if ((typeof (responseObject) == "undefined") || (responseObject == null)) {
setDetails(this.i18n["catalog.gxe.dialog.invalidResponse"]);
} else {
var oError = responseObject.error;
if ((typeof (oError) != "undefined") && (oError != null)) {
setDetails(oError.message);
} else {
var sInnerHtml = responseObject.details;
if ((typeof (sInnerHtml) == "undefined") || (sInnerHtml == null)) {
setDetails(this.i18n["catalog.gxe.dialog.invalidResponse"]);
} else {
setDetailsHtml(sInnerHtml);
}
}
}
this._changeMode("view");
})
});
load: dojo.hitch(this, function (responseObject, ioArgs) {
if ((typeof (responseObject) == "undefined") || (responseObject == null)) {
addError(this.i18n["catalog.gxe.dialog.invalidResponse"]);
} else {
var oError = responseObject.error;
if ((typeof (oError) != "undefined") && (oError != null)) {
addError(oError.message);
} else {
var oTypes = responseObject.types;
if ((typeof (oTypes) == "undefined") || (oTypes == null)) {
addError(oThis.i18n["catalog.gxe.dialog.invalidResponse"]);
} else if (oTypes.length == 0) {
var elNone = document.createElement("span");
elNone.appendChild(document.createTextNode(this.i18n["catalog.gxe.dialog.noDefinedTypes"]));
elWorking.appendChild(elNone);
} else {
addTypes(oTypes);
}
}
load: dojo.hitch(this, function (responseObject, ioArgs) {
if ((typeof (responseObject) == "undefined") || (responseObject == null)) {
handleError(this.i18n["catalog.gxe.dialog.invalidResponse"]);
} else {
var oError = responseObject.error;
if ((typeof (oError) != "undefined") && (oError != null)) {
handleError(oError.message);
} else {
//handleError(this.i18n["catalog.gxe.dialog.invalidResponse"]);
//return;
var cfgDefinition = responseObject.cfgDefinition;
var sResponseXml = responseObject.xml;
if ((typeof (cfgDefinition) == "undefined") || (cfgDefinition == null)) {
handleError(this.i18n["catalog.gxe.dialog.invalidResponse"]);
} else if ((typeof (sResponseXml) == "undefined") || (sResponseXml == null)) {
handleError(this.i18n["catalog.gxe.dialog.invalidResponse"]);
} else {
var dom = this._makeXmlDom(sResponseXml);
this._prepForEditorLoad();
gxe.cfg.initialize(cfgDefinition);
var elHtmlParent = dojo.byId("gxeDocument");
elHtmlParent.style.display = "none";
this.gxeContext.buildUI(cfgDefinition, elHtmlParent, dom);
elHtmlParent.style.display = "block";
this._onEditorLoaded();
oWorking.hide();
}
}
}
})
});
load: dojo.hitch(this, function (responseObject, ioArgs) {
if ((typeof (responseObject) == "undefined") || (responseObject == null)) {
addError(this.i18n["catalog.gxe.dialog.invalidResponse"]);
} else {
var oError = responseObject.error;
if ((typeof (oError) != "undefined") && (oError != null)) {
addError(oError.message);
} else {
var oTypes = responseObject.types;
if ((typeof (oTypes) == "undefined") || (oTypes == null)) {
addError(oThis.i18n["catalog.gxe.dialog.invalidResponse"]);
} else if (oTypes.length == 0) {
var elNone = document.createElement("span");
elNone.appendChild(document.createTextNode(this.i18n["catalog.gxe.dialog.noDefinedTypes"]));
elWorking.appendChild(elNone);
} else {
addTypes(oTypes);
}
}
}
oDialog.show();
})
});
handleError: function(oWorking,sMsg) {
if ((typeof(sMsg) == "undefined") || (sMsg == null)) {
sMsg = this.i18n["catalog.gxe.dialog.invalidResponse"];
}
if ((typeof(oWorking) != "undefined") && (oWorking != null)) {
oWorking.hide();
}
alert(sMsg);
},