Dialogs

All the common dialogs (see table below) in administration interface can be reached with the directive select-dialog to make it easy to make an extension that link different entities together.

All the common dialogs (see table below) in administration interface can be reached with the directive select-dialog to make it easy to make an extension that link to different entities together.

Usage example to add a button to select a group.

<button select-dialog dialog-callback="addGroup(item, formData, dialogResult)" dialog-type="group">Add</button>

Attribute clarification

Name Mandatory Description
select-dialog Yes Directive that transform the button to open dialogs instead of standard action.
dialog-callback Yes Define the callback method on the scope that should be invoked when the dialog is closed. Use the parameter name dialogResult for the parameter that should contain the selected result when dialog is closed.
dialog-type Yes Define the type of dialog to open, see dialog type table below.
multi-select No Define if dialog should enable select of multiple items, valid values is true and false (missing attribute is the same as false). All type of the dialogs is not supporting the option.

Example callback function

$scope.addGroup = function(param1, param2, param3){
    // param1 is item from current $scope
    // param2 is formData from current $scope
    // param3 will contain the dialogResult
};

The dialogResult (param3 in above example) is an array of the selecetd item. The array item contains atleast id, systemId and title properties.

[
    { id: "id", systemId: "system id as guid", title: "item title" },
    { id: "id", systemId: "system id as guid", title: "item title" },
    { id: "id", systemId: "system id as guid", title: "item title" },
]

Dialog types

Area Name Multiselect support Description From version
Customers group Yes Select groups 5.0.0
Customers organization Yes Select organizations 5.0.0
Customers person Yes Select persons 5.0.0
Customers role Yes Select roles 5.0.0
Customers person-template Yes Select person templates 5.0.0
Customers group-template Yes Select group templates 5.0.0
Customers organization-template Yes Select organization templates 5.0.0
Customers user Yes Select users 5.0.0
Customers target-group Yes Select target groups 5.0.0
 
Media file No Select files 5.2.0
Media image No Select images 5.2.0
 
Products variant Yes Select variants 5.0.0
Products baseproductandvariant Yes Select base products and variants 5.0.0
Products product Yes Select base products or variants depend on the settings use variant url on display template 5.0.0
Products baseproduct Yes Select base products. 5.0.0
Products assortment Yes Select assortments 5.0.0
Products category Yes Select categories 5.0.0
Products productlist Yes Select product lists 5.2.0
Products relationshiptype Yes Select relationship types 5.0.0
Products pricelist Yes Select price lists 5.0.0
Products inventory Yes Select inventories 5.0.0
 
Websites website Yes Select websites 5.2.0
Websites page No Select pages 5.2.0
Is this page helpful?
Thank you for your feedback!