Popup windows.
Methods
-
(static) CheckPopupsOnUnload() → {String}
-
This review if some popup windows are open, then try to send a warning.
Returns:
A Warning text.- Type
- String
-
(static) ClosePopup(PopupType)
-
This function closes an opened popup. If no parameter is given, we are in the popup itself and want to close it. If a parameter is defined we are in the parent window and want to close a specific popup window. There are four possible states for this function: 1) In parent window, trying to close a "real" popup 2) In parent window, trying to close an iframe-popup ("responsive mode") 3) In the popup itself, closing itself ("real" popup) 4) In the popup itself, closing itself (iframe-popup, "responsive mode")
Parameters:
Name Type Description PopupTypeString | Object The type of a popup or the window object. If not defined, the current popup windoe is closed. -
(static) ClosePopupsOnUnload()
-
This function close the active popup windows.
-
(static) CurrentIsPopupWindow() → {String}
-
Checks if current window is an OTRS popup.
Returns:
Returns the type of popup if one, undefined otherwise.- Type
- String
-
(static) ExecuteInParentWindow(FunctionToExecute, FunctionParametersopt)
-
Takes a callback function and hands it over to the parent window (to be executed there). This is needed to call a function in the parent window from the popup window. The popup window can be a real popup or an iframe, so it is not as easy as calling window.opener. IMPORTANT: The FunctionToExecute always needs the ParentWindowObject as first Parameter, which is used inside this function.
Parameters:
Name Type Attributes Description FunctionToExecutefunction The callback function to execute in the parent window. FunctionParametersArray <optional>
Optional function parameters as array. -
(static) FirePopupEvent(Type, Param, ExecuteInMobileMode)
-
This function starts the pop-up event.
Parameters:
Name Type Description TypeString The event type that will be launched. ParamObject The element that contain information about the new screen address. ExecuteInMobileModeBoolean Do not execute this on mobile devices. -
(static) GetPopupObject(Type) → {Object}
-
Get window object by popup type.
Parameters:
Name Type Description TypeString The type of a window, e.g. 'Action'. Returns:
The window object of the popup or undefined.- Type
- Object
-
(static) GetWindowMode() → {String}
-
Get the window mode.
Returns:
The window mode ('Popup' or 'Iframe') or undefined.- Type
- String
-
(static) HasOpenPopups() → {Boolean}
-
Checks if there are open popups on the page.
Returns:
True, if popups are open on the page, false otherwise.- Type
- Boolean
-
(static) Init()
-
The init function.
-
(static) InitRegisterPopupAtParentWindow()
-
This function set a timeout and after that try to register a popup at a parent window.
-
(static) OpenPopup(URL, Type, Profile, Unlinked)
-
This function opens a popup window. Every popup is of a specific type and there can only be one window of a type at a time.
Parameters:
Name Type Description URLString The URL to be open in the new window. TypeString The type of a window, e.g. 'Action'. ProfileString The profile of a window, which defines the window parameters. Optional, default is 'Default'. UnlinkedInt Optional parameter, if it's 1, popup will not be linked with the parent -
(static) ProfileAdd(Key, Values)
-
Adds a popup profile.
Parameters:
Name Type Description KeyString Name of the Profile (UID). ValuesString Profile string as expected by window.open(), e. g. "dependent=yes,height=700,left=100,top=100,location=no,menubar=no,resizable=yes,scrollbars=yes,status=no,toolbar=no,width=1000". -
(static) ProfileList() → {Object}
-
Get the list of registered popup profiles.
Returns:
PopupProfiles object.- Type
- Object
-
(static) RegisterPopupAtParentWindow(WindowObject, Type)
-
This function set the type for a popup window.
Parameters:
Name Type Description WindowObjectObject Real window object. TypeString the window type. -
(static) RegisterPopupEvent()
-
Register the pop-up event for a window.
-
(static) Resize(Type, Width, Height)
-
This function resizes an opened window.
Parameters:
Name Type Description TypeString The type of a window, e.g. 'Action'. WidthString Width in pixels. HeightString Height in pixels. -
(static) SetWindowMode(Mode)
-
Set the window mode.
Parameters:
Name Type Description ModeString The new window mode ('Popup' or 'Iframe').