define([ "dojo/_base/lang" ], function(lang) { var integratedViewManagement = lang.getObject("siemens.spectrumSupport.", true); return lang.mixin(integratedViewManagement, { defineConfirmClose : function(handlerId, actionId) { if (handlerId !== undefined && handlerId !== null && handlerId !== '') { window.confirmClose = function() { // only the last window should invoke this var openWindows = window.top.getOpenWindows(); if (openWindows.length == 1 && window.top == window.top.topWindow) { display_sendAction(handlerId, actionId, ''); return false; } return true; } } else { window.confirmClose = function() { return true; } } }, completeClosed : function() { try { window.ODV.closeConfirmed(); window.logoff(); } catch (e) { log.error(e); } } }); });