Popup windows.
- Source:
Methods
-
(static) CheckPopupsOnUnload() → {String}
-
This review if some popup windows are open, then try to send a warning.
- Source:
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 PopupType
String | Object The type of a popup or the window object. If not defined, the current popup windoe is closed. - Source:
-
(static) ClosePopupsOnUnload()
-
This function close the active popup windows.
- Source:
-
(static) CurrentIsPopupWindow() → {String}
-
Checks if current window is an OTRS popup.
- Source:
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 FunctionToExecute
function The callback function to execute in the parent window. FunctionParameters
Array <optional>
Optional function parameters as array. - Source:
-
(static) FirePopupEvent(Type, Param, ExecuteInMobileMode)
-
This function starts the pop-up event.
Parameters:
Name Type Description Type
String The event type that will be launched. Param
Object The element that contain information about the new screen address. ExecuteInMobileMode
Boolean Do not execute this on mobile devices. - Source:
-
(static) GetPopupObject(Type) → {Object}
-
Get window object by popup type.
Parameters:
Name Type Description Type
String The type of a window, e.g. 'Action'. - Source:
Returns:
The window object of the popup or undefined.- Type
- Object
-
(static) GetWindowMode() → {String}
-
Get the window mode.
- Source:
Returns:
The window mode ('Popup' or 'Iframe') or undefined.- Type
- String
-
(static) HasOpenPopups() → {Boolean}
-
Checks if there are open popups on the page.
- Source:
Returns:
True, if popups are open on the page, false otherwise.- Type
- Boolean
-
(static) Init()
-
The init function.
- Source:
-
(static) InitRegisterPopupAtParentWindow()
-
This function set a timeout and after that try to register a popup at a parent window.
- Source:
-
(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 URL
String The URL to be open in the new window. Type
String The type of a window, e.g. 'Action'. Profile
String The profile of a window, which defines the window parameters. Optional, default is 'Default'. Unlinked
Int Optional parameter, if it's 1, popup will not be linked with the parent - Source:
-
(static) ProfileAdd(Key, Values)
-
Adds a popup profile.
Parameters:
Name Type Description Key
String Name of the Profile (UID). Values
String 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". - Source:
-
(static) ProfileList() → {Object}
-
Get the list of registered popup profiles.
- Source:
Returns:
PopupProfiles object.- Type
- Object
-
(static) RegisterPopupAtParentWindow(WindowObject, Type)
-
This function set the type for a popup window.
Parameters:
Name Type Description WindowObject
Object Real window object. Type
String the window type. - Source:
-
(static) RegisterPopupEvent()
-
Register the pop-up event for a window.
- Source:
-
(static) Resize(Type, Width, Height)
-
This function resizes an opened window.
Parameters:
Name Type Description Type
String The type of a window, e.g. 'Action'. Width
String Width in pixels. Height
String Height in pixels. - Source:
-
(static) SetWindowMode(Mode)
-
Set the window mode.
Parameters:
Name Type Description Mode
String The new window mode ('Popup' or 'Iframe'). - Source: