0.7.0 • Published 7 years ago

mwyatt-dialogue v0.7.0

Weekly downloads
3
License
ISC
Repository
github
Last release
7 years ago

Build Status

Demo

Simple, light and flexible js dialogue. http://mwyatt.github.io/dialogue/

Installation

npm install mwyatt-dialogue --save
var dialogueFactory = require('mwyatt-dialogue');
var dialogue = new dialogueFactory();

dialogue.create({
  title: 'Hello World'
});

Options

PropertyValue
titlestring Gives the dialogue a title.
descriptionstring Gives the dialogue a description.
hardClosebool default: false If true, only clicking the cross in the corner will close the dialogue.
classNamestring Appends the class name string to the dialogue when rendering. This allows for unique styling within specific dialogues.
positionToobject Pass a jquery selection here and the dialogue will be positioned to it when it opens.
draggablebool default: false If true, makes the dialogue draggable.
actionsSpecify any buttons required for the dialogue and the callback functions which will execute when clicked. actions: {'Name': function() {}}
ajaxbool default: false If true, the dialogue is created with a CSS spinner in the body. The ajax request must be handled separately.
onCompletefunction Callback function, fired when dialogue has been fully rendered and positioned.
onClosefunction Fired when dialogue has been closed.
maskbool default: false If true, the browser view port is masked/obscured slightly.
htmlstring Insert html directly into the dialogue.
hideClosebool default: false If true, hides the closing cross from the corner.
widthinteger Integer specifying exact pixel width for dialogue.

Methods

Various methods can be called upon once the dialogue is created.

dialogue.close();
MethodAction
closeCloses the dialogue and removes any events.
setHtmlstring Replaces the html area with the passed string.
setTitlestring Replaces the title area with the passed string.
repositionCenters the dialogue in the viewport.
isOpenreturns bool Returns true if the dialogue is curerntly open.
0.7.0

7 years ago

0.6.3

8 years ago

0.6.2

8 years ago

0.6.1

8 years ago

0.6.0

8 years ago

0.5.3

8 years ago

0.5.2

8 years ago

0.5.1

8 years ago

0.5.0

8 years ago

0.4.4

8 years ago

0.4.3

8 years ago

0.4.2

8 years ago

0.4.1

8 years ago

0.4.0

8 years ago

0.3.0

8 years ago

0.2.8

8 years ago

0.2.6

8 years ago

0.2.5

8 years ago

0.2.4

8 years ago

0.2.2

8 years ago

0.2.1

8 years ago

0.2.0

8 years ago

0.1.0

8 years ago

0.0.8

8 years ago

0.0.7

8 years ago

0.0.6

8 years ago