/******************************************************************************* * IBM Confidential * * OCO Source Materials * * A and PM: PD * * (c) Copyright IBM Corp. 2015 * * The source code for this program is not published or otherwise divested of * its trade secrets, irrespective of what has been deposited with the U.S. * Copyright Office. ******************************************************************************/ define([ "dojo/_base/declare", "dojo/parser", "bux/dialogs/BaseDialog", "dijit/TitlePane", "pd/model/deltaSpec", "dojo/string", "dojo/dom-construct", "dojo/dom-attr", "dijit/layout/BorderContainer", "dijit/layout/ContentPane" ],function(declare, parser, Dialog, TitlePane, deltaSpec, string, domConst, domAttr, BorderContainer, ContentPane){ var MDAnalyseDialog = declare("pd/widgets/MDAnalyseDialog", [Dialog], { title: PDMSG.ANA.IDS_ANA_DIALOG_TITLE, style: "width: auto; height: auto;", showOnOk: true, _bContainerHeightAuto: true, createDefaultDialogButtons: function(){ this.createButtons([ {label: BUXMSG.GEN.IDS_GEN_YES_BUTTON, action: dojo.hitch(this, this.onOK), type: "button"}, {label: BUXMSG.GEN.IDS_GEN_NO_BUTTON, action: dojo.hitch(this, this.onCancel), type: "button"} ]); }, postCreate: function() { this.inherited(arguments); this.createDefaultDialogButtons(); var noChange = true; var contentDom = domConst.toDom("
"); for (var i=0; i 0) { var bc = new BorderContainer({ style: "height:100px;" }); var content = ""; for (var j=0; j" + section[j].name; if (section[j].simpletype && section[j].previoustype) { content += " " + string.substitute(PDMSG.ANA.IDS_ANA_TYPE_CHANGED_FROM_TO, {0: section[j].previoustype, 1: section[j].simpletype}); } content += ""; } content += ""; var cp = new ContentPane({ region: "center", content: content, "aria-label": deltaSpec[i].contentLabel }); bc.addChild(cp); var titlePane = new TitlePane({ title: deltaSpec[i].label + " ("+section.length+")", content: bc.domNode, open: false }); domAttr.set(titlePane.domNode, "aria-label", deltaSpec[i].groupLabel); domAttr.set(titlePane.containerNode, "role", "group"); domAttr.set(titlePane.containerNode, "aria-label", deltaSpec[i].contentLabel); contentDom.appendChild(titlePane.domNode); noChange = false; } } var headerHTML = ""; if (!noChange){ headerHTML += ""; } headerHTML += "
" + "
 
"; headerHTML += noChange?PDMSG.ANA.IDS_ANA_NO_META_DATA_CHANGES:PDMSG.ANA.IDS_ANA_META_DATA_CHANGES; headerHTML += "

" this.dialogContent.appendChild(domConst.toDom(headerHTML)); this.dialogContent.appendChild(contentDom); this.dialogContent.appendChild( domConst.toDom("
" + (!noChange?PDMSG.ANA.IDS_ANA_METADATA_CHANGES_WARNING+"

":"") + PDMSG.ANA.IDS_ANA_PROCEED_CONFIRM + "
")); }, onOK: function() { if (this.showOnOk !== true) { this.hide(); } if (this._aButtonObjects && this._aButtonObjects[0]) { this._aButtonObjects[0].focus(); } if (this.okHandler) { this.okHandler(); } }, onCancel: function() { this.inherited(arguments); if (this.cancelHandler) { this.cancelHandler(); } }, hide: function() { this.inherited(arguments); this.destroy(); } }); return MDAnalyseDialog; });