RecurrenceConfirmationPopup

A confirmation dialog shown when modifying a recurring event or some of its occurrences. For recurring events, the dialog informs the user that the change will be applied to all occurrences.

For occurrences, the dialog lets the user choose if the change should affect all future occurrences, or this occurrence only.

Recurrence confirmation popup
//<code-header>
fiddle.title = 'Recurrence confirmation popup';
//</code-header>
const
    eventRecord = new EventModel({
        id             : 1,
        name           : 'Every other week',
        startDate      : '2018-01-01',
        duration       : 3,
        recurrenceRule : 'FREQ=WEEKLY;INTERVAL=2'
    }),
    confirmation = new RecurrenceConfirmationPopup({
        rootElement : document.body,
        bbar        : {
            items : {
                // Disable button
                changeSingleButton : {
                    disabled : true
                }
            }
        }
    });

new Button({
    appendTo : targetElement,
    text     : 'Click to show recurrence dialog',
    onClick() {
        confirmation.confirm({
            eventRecord,
            actionType : 'delete'
        });
    }
});

Built-in widgets and buttons

The Popup does not contain any built-in widgets, but it has built-in buttons in the toolbar that you can customize:

Widget ref Type Weight Description
changeSingleButton Button 100 Change a single event in a recurring sequence
changeMultipleButton Button 200 Change all future events in a recurring sequence
cancelButton Button 300 Cancel

Usage example:

const confirmation = new RecurrenceConfirmationPopup({
    bbar        : {
        items : {
            // Disable button
            changeSingleButton : {
                disabled : true
            }
        }
    }
});

confirmation.confirm({
    eventRecord : recurringEvent,
    actionType  : "delete",
    changerFn   : () => recurringEvent.remove(event)
});

Configs

120

Common

listenersEvents

Accessibility

ariaLabelWidget
keyMapKeyMap

Content

bbarPanel
defaultsContainer
footerPanel
headerPanel
itemsContainer
lazyItemsContainer
namedItemsContainer
stripsPanel
tbarPanel
textContentContainer
toolsPanel

CSS

bodyClsPanel
borderContainer
clsWidget
colorWidget
htmlClsWidget
itemClsContainer
styleWidget
uiPanel

DOM

adoptWidget
appendToWidget
contentWidget
datasetWidget
htmlWidget
idWidget
tagWidget

Float & align

alignWidget
anchorWidget
centeredWidget
floatingWidget
xWidget
yWidget

Layout

alignSelfWidget
dockWidget
flexWidget
heightWidget
hiddenWidget
hideWhenEmptyContainer
layoutContainer
layoutStyleContainer
marginWidget
maxHeightWidget
maxWidthWidget
minHeightWidget
minWidthWidget
textAlignWidget
weightWidget
widthWidget

misc

tabBarItemsContainer

Misc

dataFieldWidget
disabledWidget
iconPanel
localeClassLocalizable
localizableLocalizable
maskedWidget
ownerWidget
readOnlyWidget
refWidget
rippleWidget
tabWidget
titlePanel
tooltipWidget

Other

columnWidget
defaultFocusContainer
drawerPanel
labelPositionContainer
modalPopup
renditionContainer
resizableResizable
rtlRTL
spanWidget

Record

recordContainer

Scrolling

State

stateIdState

Properties

101

Class hierarchy

isRecurrenceConfirmationPopup: Boolean= truereadonly
Identifies an object as an instance of RecurrenceConfirmationPopup class, or subclass thereof.
isRecurrenceConfirmationPopup: Boolean= truereadonlystatic
Identifies an object as an instance of RecurrenceConfirmationPopup class, or subclass thereof.
isContainerContainer
isDelayableDelayable
isEventsEvents
isKeyMapKeyMap
isLocalizableLocalizable
isPanelPanel
isPopupPopup
isResizableResizable
isStateState
isToolableToolable
isWidgetWidget

Other

Reference to the cancel button, if used

Reference to the "Apply changes to multiple occurrences" button, if used

Reference to the button that causes changing of the event itself only, if used

$namestaticWidget
columnWidget
firstItemContainer
hasChangesContainer
isValidContainer
itemsContainer
labelPositionContainer
lastItemContainer
renditionContainer
resizableResizable
rtlRTL
spanWidget
toolsPanel
typestaticWidget
valuesContainer

Accessibility

keyMapKeyMap

Content

bbarPanel
tbarPanel

CSS

clsWidget

DOM

appendToWidget
contentWidget
datasetWidget
elementWidget
htmlWidget
idWidget
styleWidget

Float & align

xWidget
yWidget

Layout

alignSelfWidget
flexWidget
heightWidget
layoutContainer
layoutStyleContainer
marginWidget
maxHeightWidget
maxWidthWidget
minHeightWidget
minWidthWidget
widthWidget

Lifecycle

configBase

Misc

cellInfoWidget
disabledWidget
localeHelperLocalizable
localeManagerLocalizable
readOnlyWidget
refWidget
tabWidget
titlePanel
tooltipWidget

Record

recordContainer

State

stateState

Visibility

hiddenWidget
isVisibleWidget

Widget hierarchy

ownerWidget
parentWidget
widgetMapContainer

Functions

81

Other

Displays the confirmation.

This function is async, and awaitable, resolving only when the process has been either completed or canceled Usage example:

const popup = new RecurrenceConfirmationPopup();

await popup.confirm({
    eventRecord,
    actionType : "delete",
    changerFn  : () => eventStore.remove(record)
});

Toast.show('Event deleted');
ParameterTypeDescription
configObject

The following config options are supported:

config.eventRecordEventModel

Event being modified.

config.actionTypeupdate | delete

Type of modification to be applied to the event. Can be either "update" or "delete".

config.changerFnfunction

A function that should be called to apply the change to the event upon user choice.

config.thisObjfunction

changerFn and cancelFn functions scope.

config.cancelFnfunction

Function called on Cancel button click.

Returns: Boolean -

true if the operation has been completed either way, false if the operation was canceled.

Handler for cancel button. It calls cancelFn provided to confirm call and then hides the dialog.

Handler for "Apply changes to multiple occurrences" button. It calls processMultipleRecords and then hides the dialog.

Handler for the button that causes changing of the event itself only. It calls processSingleRecord and then hides the dialog.

Applies changes to multiple occurrences as reaction on "Apply changes to multiple occurrences" button click.

Applies changes to a single record by making it a "real" event and adding an exception to the recurrence. The method is called as reaction on clicking the button that causes changing of the event itself only.

addContainer
closePopup
composeWidget
createOnFrameDelayable
disableWidget
enableWidget
focusWidget
getAtContainer
getWidgetByIdContainer
insertContainer
LstaticLocalizable
maskWidget
onEvents
recomposeWidget
relayAllEvents
removeContainer
removeAllContainer
resetValuesContainer
setValuesContainer
triggerEvents
unEvents
unmaskWidget

Configuration

applyDefaultsstaticBase

Events

Float & align

alignToWidget
setXYWidget
showByWidget
toFrontWidget

Lifecycle

createstaticWidget
destroystaticBase
initClassstaticWidget

Misc

attachTooltipstaticWidget
fromElementstaticWidget
fromSelectorstaticWidget
getByIdstaticWidget
isOfTypeNamestaticBase
mixinstaticBase
optionalLstaticLocalizable

State

Visibility

hideWidget
showWidget

Widget hierarchy

closestWidget
containsWidget
ownsWidget
queryWidget
queryAllWidget
upWidget

Events

22

Event handlers

22

Typedefs

7

CSS variables

60