# Namespace: WindowService

## module:core.services. WindowService

The service is responsible for displaying global windows. For example, modal dialogs (popups).

### Methods

#### <static> closePopup( [popupId])

  Closes the top-level popup or does nothing if there is none.

  ##### Parameters:

  Name | Type | Argument | Default | Description
  --- | --- | --- | --- | ---
  `popupId` | string | <optional> | null |

#### <static> showPopup(view)

  Shows a marionette.view as a popup. If another popup is already shown, overlaps it. The size of the view and it's location is totally the view's responsibility.

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `view` | Marionette.View | A Marionette.View instance to show.

  ##### Returns:

  The popup id that you can use to close it.
  Type
    String

#### <static> showTransientPopup(view, options)

  Shows a marionette.view as a transient popup. If another popup is already shown, overlaps it. The size of the view and it's location is totally the view's responsibility.

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `view` | Marionette.View | A Marionette.View instance to show.

  `options`

  Object

  Options object.

  ###### Properties

  Name | Type | Argument | Default | Description
  --- | --- | --- | --- | ---
  `fadeBackground` | Boolean | <optional> | true | Whether to fade the background behind the popup.

#### Search results