On dialog closed
768750
function(ta) {
				var fm = this.fm,
					xhr = $(ta).data('xhr');
				if (xhr.state() === 'pending') {
					xhr.reject();
				}
			}
979923
def closeEvent( self, event ):
        
        if ( XConfigDialog._instance == self ):
            XConfigDialog._instance = None
        
        super(XConfigDialog, self).closeEvent(event)
1277917
function endDialog(success, content) {
    if (success) {
        createPackageFile(content);
        process.stdout.write('Succesfully created gas-include.json');
        checkbox.display('green');
        process.exit(0);
    } else {
        process.stdout.write('Failed to create gas-include.json');
        checkbox.display('red');
        process.exit(1);
    }
}
1063209
protected final void attemptCloseDialog() {
        switch (buttonType) {
            case AlertDialog.BUTTON_NEGATIVE:
                dialog.cancel();
                break;
            case AlertDialog.BUTTON_NEUTRAL:
                dialog.cancel();
                break;
            case AlertDialog.BUTTON_POSITIVE:
                dialog.dismiss();
                break;
            default:
                break;
        }
    }
383627
void exit() {

        if (m_changed) {
            CmsConfirmationDialog.show(
                CmsVaadinUtils.getMessageText(org.opencms.ui.apps.Messages.GUI_EDITOR_CLOSE_CAPTION_0),
                CmsVaadinUtils.getMessageText(org.opencms.ui.apps.Messages.GUI_EDITOR_CLOSE_TEXT_0),
                new Runnable() {

                    public void run() {

                        exitInternal();
                    }
                });
        } else {
            exitInternal();
        }

    }
1083577
protected void onWindowClose() {

        boolean savePage = Window.confirm(
            Messages.get().key(Messages.GUI_EDITOR_SAVE_BEFORE_LEAVING_1, m_editableData.getSitePath()));
        if (savePage) {
            saveEditorContent();
        }
    }
1071432
void closeDelayed() {

        Scheduler.RepeatingCommand command = new Scheduler.RepeatingCommand() {

            public boolean execute() {

                if (CmsErrorDialog.isShowingErrorDialogs()) {
                    return true;
                } else {
                    Window.Location.assign(m_closeLink);
                    return false;
                }

            }
        };
        Scheduler.get().scheduleFixedDelay(command, 300);
    }
1241643
void closedHandler(Object context, String input, Object frame, String stateName) {
        if (getReadyState() == ReadyState.CLOSED) {
            return;
        }
        
        // TODO: Determine whether channels need to be cleaned up.
        if (this.channels.size() != 0) {
            for (int i = 1; i <= this.channels.size(); i++) { // 1-based
                AmqpChannel channel = this.channels.get(i);
                AmqpFrame   f = new AmqpFrame();
                
                // Close each channel which should result in CLOSE event
                // to be fired for each of the registered ChannelListener(s).
                f.setMethodName("closeChannel");
                f.setChannelId((short) i);
                channel.channelClosedHandler(this, "", f, "closeChannel");
            }
        }
        
        try {
            // Mark the readyState to be CLOSED.
            readyState = ReadyState.CLOSED;
            
            // Fire CLOSE event for the ConnectionListener(s) registered
            // on AmqpClient object.
            fireOnClosed(new ConnectionEvent(this, Kind.CLOSE));

            // If the WebSocket(or ByteSocket) is still not closed, then 
            // invoke the close() method. The callback in this case will be a
            // a no-op as we have completed the book-keeping here.
            if (websocket != null) {
                websocket.close();
            }
        }
        catch (Exception e1) {
            throw new IllegalStateException(e1);
        }
        finally {
            websocket = null;
        }

    }
342704
private void fireOnClosed(ChannelEvent e) {
        if (readyState == ReadyState.CLOSED) {
            // If the channel has been closed, then we should not fire events.
            return;
        }
        
        readyState = ReadyState.CLOSED;
        List<EventListener> listeners = changes.getListenerList(AMQP);
        for (EventListener listener : listeners) {
            ChannelListener amqpListener = (ChannelListener)listener;
            amqpListener.onClose(e);
        }
    }
379911
def closeEvent(self, event):
        
        if not self.viewWidget().canClose():
            event.ignore()
        else:
            super(XViewDialog, self).closeEvent(event)
10118
@Override
	protected void onConnectionClose()
    {
    	super.onConnectionClose();
    	
    	try
        {
        	if (transport != null && !transport.isClosed())
        	{
	            log.debug("#"+id+" Closing transport");
	            this.transport.close();
        	}
        }
        catch (Exception e)
        {
            log.error("Could not close transport",e);
        }
    }
895855
public void finish(List<CmsUUID> ids) {

        if (m_selectedRunnable == null) {
            m_dialogContext.finish(ids);
            if (ids.size() == 1) {
                m_dialogContext.focus(ids.get(0));

            }
        } else {
            m_selectedRunnable.run();
        }
    }
83342
protected void closeDialog(boolean breakingUp) {

        m_controller.stopEditingGroupcontainer();
        m_editingPlaceholder.removeFromParent();
        m_editorDialog.hide();
        RootPanel.get().removeStyleName(I_CmsLayoutBundle.INSTANCE.containerpageCss().groupcontainerEditing());
        if (!breakingUp) {
            m_groupContainer.clearEditingPlaceholder();
            Style style = m_groupContainer.getElement().getStyle();
            style.clearPosition();
            style.clearTop();
            style.clearLeft();
            style.clearZIndex();
            style.clearWidth();
            m_parentContainer.insert(m_groupContainer, m_indexPosition);
            m_groupContainer.getElementOptionBar().setVisible(true);
            if (!m_groupContainer.iterator().hasNext()) {
                // group-container is empty, mark it
                m_groupContainer.addStyleName(I_CmsLayoutBundle.INSTANCE.containerpageCss().emptyGroupContainer());
            }
        }
        clearInstance();
        removeFromParent();
        if (!m_controller.getData().isUseClassicEditor()) {
            for (Widget element : m_groupContainer) {
                if (element instanceof CmsContainerPageElementPanel) {
                    ((CmsContainerPageElementPanel)element).removeInlineEditor();
                }
            }
        }
        m_controller.reinitializeButtons();
        m_controller.reInitInlineEditing();
        m_controller.fireEvent(new CmsContainerpageEvent(EventType.elementEdited));
    }
1278341
@Handler
    public void onClose(Close event, Channel channel)
            throws InterruptedException {
        Writer writer = inputWriters.get(channel);
        if (writer != null) {
            writer.close(event);
        }
        writer = outputWriters.get(channel);
        if (writer != null) {
            writer.close(event);
        }
    }
725819
function() {
        if (!this._closed) {
            this._closed = true;

            removeElement(this.el);

            this.selectivity.events.off('selectivity-selecting', this.close);

            this.triggerClose();

            this._removeScrollListeners();
        }
    }
304379
function(obj){
            var theDialog = this.getDialog(obj);
            if(theDialog){
                var rest = Array.prototype.slice.call(arguments, 1);
                theDialog.close.apply(theDialog, rest);
            }
        }
784273
function closeInstance(dialogue) {

  // none may be open yet, or one may be open but may be closing another which is not open
  if (typeof dialogue === 'undefined' || typeof dialogue.options === 'undefined' || !dialoguesOpen.length) {
    return;
  }

  dialoguesOpen.forEach(function(dialogueSingle, index) {
    if (dialogueSingle.options.id == dialogue.options.id) {
      dialoguesOpen.splice(index, 1);
    }
  });

  if (!dialoguesOpen.length) {
    document.removeEventListener('keyup', handleKeyup);
    document.removeEventListener('mousedown', handleMousedown);
  }

  // .off('click.dialogue.action')

  // dialogue.container.off(); // needed?
  docBody.removeChild(dialogue.container);
  dialogue.options.onClose.call(dialogue);
}