There are 2 parts of popup control: — toggler — popup
Default Togglerid
{string} — id of connecte popupappendTo
{string} — selector where append tohow
{object} – http://api.jqueryui.com/position/how.fixed
{boolean} – for position fixed popup
{
at: '..',
my: '..',
collision: '..',
using: '..',
within '..',
autoclose: true
animation: true
}
nb-popup-menu({ 'id': 'popup1' 'menu': [ { 'attrs': { 'daria-action': 'someCoolActon' } 'class': [ 'someCoolClass' ] 'href': '#' 'content': 'Скопировать' } { 'href': '#' 'content': 'Переместить' } { 'separator': true() } { 'href': '#' 'content': 'Удалить' } ] })
id
{string}class
{array} — additional classesattrs
{object} — custom DOM attributestail
{string} — position of 'tail' widget — left|right|top|bottomstatic
{boolean} —true()
to prevent initialisationmenu
{array} — array of objects:- Object for menu element:
href
{string}text
{string}attrs
{object} — custom DOM attributesclass
{array} — additional classesid
{string}
- Object for separator:
separator
{boolean} —true()
to render separator
- Object for menu element:
size: m
theme: normal
id
{string}class
{array} — additional classestheme
{string}blank
— popup without stylesisland
— islands styles
attrs
{object} — custom DOM attributes, e.g.:{ 'attr2: 'value2', 'attr2: 'value2' }
titleContent
{xml|string} — modal's title, can be string orxml
xss warning!content
{xml|string} — modal's content, can be string orxml
xss warning!close
{object|boolean} — with default cloase withtrue()
or custom object:class
{array} — custom classes for closeattrs
{object} — custom attrs for close
data-nb
{object}fixed
: {boolean} — for position fixed popup
nb-popup({ 'id': 'genericPopup' 'titleContent': 'Hello, I’m your generic pop-up.' 'content': '<p>And welcome to nanoislands</p>' })
nb-popup({ 'id': 'genericPopup-w-animation' 'animation': false() 'titleContent': 'Hello, I’m your generic pop-up.' 'content': '<p>And welcome to nanoislands</p>' })
nb-popup({ 'id': 'genericPopup2' 'close': true() 'titleContent': 'Hello, I’m your generic pop-up.' 'content': '<p>And welcome to nanoislands</p>' })
id
{string}class
{array} — additional classesattrs
{object} — custom DOM attributeswithoutTail
{boolean}static
{boolean} —true()
to prevent initialisationmenu
{array} — array of objects:- Object for menu element:
href
{string}text
{string}attrs
{object} — custom DOM attributesclass
{array} — additional classesid
{string}
- Object for separator:
separator
{boolean} —true()
to render separator
- Object for menu element:
data-nb
{object}width
: {number}height
: {number}minHeight
: {number}maxHeight
: {number}
nb-popup-menu({ 'id': 'popupMenu' 'menu': [ { 'href': '#' 'content': 'Скопировать' } { 'href': '#' 'content': 'Переместить' } { 'href': '#' 'content': 'Удалить' } ] })
data-nb
{object}modal
:true()
width
:auto
height
:auto
minHeight
:auto
maxHeight
:auto
id
{string}class
{array} — additional classesattrs
{object} — custom DOM attributestitleContent
{xml|string} — modal's title, can be string orxml
xss warning!content
{xml|string} — modal's content, can be string orxml
xss warning!buttons
{xml|array} — popup's buttons:close
{nodeset} — popup's close button:attrs
{object} — custom DOM attributes for close button
data-nb
{object} — popup display paramenters, renteded asdata-nb-*
attributesmodal
{boolean}width
{string}height
{string}minHeight
{string}
nb-popup-modal({ 'id': 'popup-modal1' 'titleContent': 'Some modal popup' 'content': 'Some text for that popup' 'data-nb': { 'width': '300px' } 'close': { 'class': 'ns-action' 'attrs': { 'data-params': '123' } } 'buttons': { 'class': 'ns-subliew-buttons' 'data': [ { 'content': 'Отправить' 'size': 'm' 'theme': 'action' 'class': 'nb-popup__button' } { 'content': 'Сохранить' 'size': 'm' 'class': 'nb-popup__button' } ]} })