comunicationLeap/node_modules/toastr-master/README.md
node_modules/toastr-master/README.mdRaw
1# toastr
2**toastr** is a Javascript library for non-blocking notifications. jQuery is required. The goal is to create a simple core library that can be customized and extended.
3
4[](https://travis-ci.org/CodeSeven/toastr)
5
6## Current Version
72.1.2
8
9## Demo
10- Demo can be found at http://codeseven.github.io/toastr/demo.html
11- [Demo using FontAwesome icons with toastr](http://plnkr.co/edit/6W9URNyyp2ItO4aUWzBB?p=preview)
12
13## [CDNjs](https://cdnjs.com/libraries/toastr.js)
14Toastr is hosted at CDN JS
15
16#### Debug
17- [//cdnjs.cloudflare.com/ajax/libs/toastr.js/latest/js/toastr.js](//cdnjs.cloudflare.com/ajax/libs/toastr.js/latest/js/toastr.js)
18- [//cdnjs.cloudflare.com/ajax/libs/toastr.js/latest/css/toastr.css](//cdnjs.cloudflare.com/ajax/libs/toastr.js/latest/css/toastr.css)
19
20#### Minified
21- [//cdnjs.cloudflare.com/ajax/libs/toastr.js/latest/js/toastr.min.js](//cdnjs.cloudflare.com/ajax/libs/toastr.js/latest/js/toastr.min.js)
22- [//cdnjs.cloudflare.com/ajax/libs/toastr.js/latest/css/toastr.min.css](//cdnjs.cloudflare.com/ajax/libs/toastr.js/latest/css/toastr.min.css)
23
24## Install
25
26#### [NuGet Gallery](http://nuget.org/packages/toastr)
27```
28Install-Package toastr
29```
30
31#### [Bower](http://bower.io/search/?q=toastr)
32```
33bower install toastr
34```
35
36#### [npm](https://www.npmjs.com/package/toastr)
37```
38npm install --save toastr
39```
40
41## Wiki and Change Log
42[Wiki including Change Log](https://github.com/CodeSeven/toastr/wiki)
43
44## Breaking Changes
45
46####Animation Changes
47The following animations options have been deprecated and should be replaced:
48
49 - Replace `options.fadeIn` with `options.showDuration`
50 - Replace `options.onFadeIn` with `options.onShown`
51 - Replace `options.fadeOut` with `options.hideDuration`
52 - Replace `options.onFadeOut` with `options.onHidden`
53
54## Quick Start
55
56### 3 Easy Steps
57For other API calls, see the [demo](http://codeseven.github.io/toastr/demo.html).
58
591. Link to toastr.css `<link href="toastr.css" rel="stylesheet"/>`
60
612. Link to toastr.js `<script src="toastr.js"></script>`
62
633. use toastr to display a toast for info, success, warning or error
64 ```js
65 // Display an info toast with no title
66 toastr.info('Are you the 6 fingered man?')
67 ```
68
69### Other Options
70```js
71// Display a warning toast, with no title
72toastr.warning('My name is Inigo Montoya. You killed my father, prepare to die!')
73
74// Display a success toast, with a title
75toastr.success('Have fun storming the castle!', 'Miracle Max Says')
76
77// Display an error toast, with a title
78toastr.error('I do not think that word means what you think it means.', 'Inconceivable!')
79
80// Immediately remove current toasts without using animation
81toastr.remove()
82
83// Remove current toasts using animation
84toastr.clear()
85
86// Override global options
87toastr.success('We do have the Kapua suite available.', 'Turtle Bay Resort', {timeOut: 5000})
88```
89
90### Escape HTML characters
91In case you want to escape HTML charaters in title and message
92
93 toastr.options.escapeHtml = true;
94
95### Close Button
96Optionally enable a close button
97```js
98toastr.options.closeButton = true;
99````
100
101Optionally override the close button's HTML.
102
103```js
104toastr.options.closeHtml = '<button><i class="icon-off"></i></button>';
105```
106
107You can also override the CSS/LESS for `#toast-container .toast-close-button`
108
109Optionally override the hide animation when the close button is clicked (falls back to hide configuration).
110```js
111toastr.options.closeMethod = 'fadeOut';
112toastr.options.closeDuration = 300;
113toastr.options.closeEasing = 'swing';
114```
115
116### Display Sequence
117Show newest toast at bottom (top is default)
118```js
119toastr.options.newestOnTop = false;
120```
121
122### Callbacks
123```js
124// Define a callback for when the toast is shown/hidden
125toastr.options.onShown = function() { console.log('hello'); }
126toastr.options.onHidden = function() { console.log('goodbye'); }
127```
128
129### Animation Options
130Toastr will supply default animations, so you do not have to provide any of these settings. However you have the option to override the animations if you like.
131
132####Easings
133Optionally override the animation easing to show or hide the toasts. Default is swing. swing and linear are built into jQuery.
134```js
135toastr.options.showEasing = 'swing';
136toastr.options.hideEasing = 'linear';
137toastr.options.closeEasing = 'linear';
138```
139
140Using the jQuery Easing plugin (http://www.gsgd.co.uk/sandbox/jquery/easing/)
141```js
142toastr.options.showEasing = 'easeOutBounce';
143toastr.options.hideEasing = 'easeInBack';
144toastr.options.closeEasing = 'easeInBack';
145```
146
147####Animation Method
148Use the jQuery show/hide method of your choice. These default to fadeIn/fadeOut. The methods fadeIn/fadeOut, slideDown/slideUp, and show/hide are built into jQuery.
149```js
150toastr.options.showMethod = 'slideDown';
151toastr.options.hideMethod = 'slideUp';
152toastr.options.closeMethod = 'slideUp';
153```
154
155###Prevent Duplicates
156Rather than having identical toasts stack, set the preventDuplicates property to true. Duplicates are matched to the previous toast based on their message content.
157```js
158toastr.options.preventDuplicates = true;
159```
160
161###Timeouts
162Control how toastr interacts with users by setting timeouts appropriately. Timeouts can be disabled by setting them to 0.
163```js
164toastr.options.timeOut = 30; // How long the toast will display without user interaction
165toastr.options.extendedTimeOut = 60; // How long the toast will display after a user hovers over it
166```
167
168
169###Progress Bar
170Visually indicate how long before a toast expires.
171```js
172toastr.options.progressBar = true;
173```
174
175## Building Toastr
176
177To build the minified and css versions of Toastr you will need [node](http://nodejs.org) installed. (Use Homebrew or Chocolatey.)
178
179```
180npm install -g gulp karma-cli
181npm install
182```
183
184At this point the dependencies have been installed and you can build Toastr
185
186- Run the analytics `gulp analyze`
187- Run the test `gulp test`
188- Run the build `gulp`
189
190## Contributing
191
192For a pull request to be considered it must resolve a bug, or add a feature which is beneficial to a large audience.
193
194Pull requests must pass existing unit tests, CI processes, and add additional tests to indicate successful operation of a new feature, or the resolution of an identified bug.
195
196Requests must be made against the `develop` branch. Pull requests submitted against the `master` branch will not be considered.
197
198All pull requests are subject to approval by the repository owners, who have sole discretion over acceptance or denial.
199
200## Authors
201**John Papa**
202
203+ [http://twitter.com/John_Papa](http://twitter.com/John_Papa)
204
205**Tim Ferrell**
206
207+ [http://twitter.com/ferrell_tim](http://twitter.com/ferrell_tim)
208
209**Hans Fjällemark**
210
211+ [http://twitter.com/hfjallemark](http://twitter.com/hfjallemark)
212
213## Credits
214Inspired by https://github.com/Srirangan/notifer.js/.
215
216## Copyright
217Copyright © 2012-2015
218
219## License
220toastr is under MIT license - http://www.opensource.org/licenses/mit-license.php