Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The card need to be of type Ext.panel.Panel, and need to extend the card wizard interface 'Editor.controller.admin.IWizardCard'.
In add task window for each group separate function is introduce. The purpose of those functions is to insert new card groups in the desired position.
The functions are:

  • insertPreImport
  • insertImport
  • insertPostImport

...

Use the "insertCard" function from TaskAddWindow to insert cards in card groups. The insert function accepts two parameters:

  • card -  extjs panel component
  • group - target group where the card will exist. Available options: "preimport", "import" and "postimport".              

Card wizard interface: IWizardCard

For each component the card type and card position can be defined using the following parameters:

  • importType : available options are "preimport", "import" and "postimport". Defines where the component will appear.
  • groupIndex: integer type. Defines the card index in the group.(ex. groupIndex:0, this card will appear first in the defined group)


This interface provide us with couple of functions needed for manipulation with the buttons visibility and functionality.

In the interface there are two types of functions:

...

  • functions wich hides and shows the card components (Component handler type)

 

Button handler type:

 

'triggerNextCard' function


This function is called each time when the next button on the wizard window is clicked.
The purpose of this function is to to set/switch the next active card in wizard window, if there is one.
Switching the card is done with firing the specific event, who is handled by the wizard window controller (TaskOverview.js).
Using events for switching the cards, makes the validations of the card components more flexible.
Posible steps before the card is changed:

...

    • the next card is displayed

 

'triggerSkipCard' function


This function is called each time when the skip button on the wizard window is clicked.
This button exist only if after the current active card there are another card from different card group.
A card group is set of cards in one wizard window group (ex. globalese group of cards).
Skipping the card is done with firing the specific event, this event also is handled by the wizard window controller (TaskOverveiw.js).
When group of cards is skipped, the validation logic of all cards also is skipped.

...