Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
var handleError = function (sError) {
oWorking.hide();
oThis._showErrorDialog(oThis.i18n["catalog.gxe.dialog.mode.edit"], sError);
};
var elViewTools = document.createElement("div");
elViewTools.id = "gxeViewModeTools";
elViewTools.style.display = "inline";
elControlBar.appendChild(elViewTools);
addMode(elViewTools, "view", this.i18n["catalog.gxe.dialog.mode.view"], true);
addMode(elViewTools, "xml", this.i18n["catalog.gxe.dialog.mode.xml"], false);
if (this.canEdit) {
elSep = document.createElement("span");
elSep.className = "gxeButtonSeparator";
elViewTools.appendChild(elSep);
elButton = document.createElement("button");
elButton.className = "gxeButton gxeButton-enabled";
elButton.appendChild(document.createTextNode(this.i18n["catalog.gxe.dialog.mode.edit"]));
elViewTools.appendChild(elButton);
dojo.connect(elButton, "onclick", this, dojo.hitch(this, function (e) {
this._changeMode("edit");
}));
var elEditTools = document.createElement("div");
elEditTools.id = "gxeEditModeTools";
dojo.style(elEditTools, { display: "none" });
elControlBar.appendChild(elEditTools);
elButton = document.createElement("button");
elButton.className = "gxeButton gxeButton-enabled";
elButton.appendChild(document.createTextNode(this.i18n["catalog.gxe.dialog.load"]));
elEditTools.appendChild(elButton);
dojo.connect(elButton, "onclick", this, dojo.hitch(this, function (e) {
this._showLoadDialog();