Modal dialog for set items by type

Items dialog

Modal dialog for writing items in groups (eg. contacts). Using modal-dialog package and is dependent on jquery.

This dialog is completely without styles, so for styling you have to read more about modal-dialog package.

var Items = require('items-dialog');
var items = new Items;
items.types = {
    facebook: 'Facebook',
    google: 'Google plus',
    skype: 'Skype'

You have to set just object with list of types. This can be for example from your database, where keys are IDs and values are publicly visible names.

Thane call the open method which can be added to some event handler (eg. click on some button).

items.defaults = {
    facebook: ['david', 'george']
var data = items.getValues();

This will return object which has got the same structure like defaults property.

You can add text input into your form and connect it with items-dialog. Then after every change, data from getValues method will be added into your input. These data are "stringified".


This feature is like the previous one, except one thing. You are connecting div element not text input and data are rendered into this element.

  • 1.0.0
    • Initial version