UNPKG

4.05 kBMarkdownView Raw
1# Bootbox - Bootstrap powered alert, confirm and flexible dialog boxes
2
3Please see http://bootboxjs.com for full usage instructions, or head over to http://paynedigital.com/bootbox for
4the original writeup about the project.
5
6## Contact
7
8[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/makeusabrew/bootbox?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
9
10The easiest thing is to [find me on twitter @makeusabrew](http://twitter.com/makeusabrew).
11
12## Contributing
13
14Please see the [CONTRIBUTING](https://github.com/makeusabrew/bootbox/blob/master/CONTRIBUTING.md) file for guidelines.
15
16## Running Tests [![Build Status](https://api.travis-ci.org/makeusabrew/bootbox.svg)](http://travis-ci.org/makeusabrew/bootbox)
17
18Tests are run using [Karma](http://karma-runner.github.io/0.8/index.html) using the Mocha test adapter.
19To run the tests yourself, simply run ```npm install``` within the project followed by ```npm test```.
20Please note that this will require [PhantomJS](http://phantomjs.org/) being installed and in your path - if
21it is not, you may run the tests and capture browsers manually by running ```karma start``` from the root
22of the project.
23
24The project is also hosted on [Travis CI](https://travis-ci.org/makeusabrew/bootbox) - when submitting
25pull requests **please** ensure your tests pass as failing requests will be rejected. See the
26[CONTRIBUTING](https://github.com/makeusabrew/bootbox/blob/master/CONTRIBUTING.md) file for more information.
27
28## A note on Bootstrap dependencies
29
30Bootbox **5.0.0** is the first release to support Bootstrap 4.0.0.
31
32Bootbox **4.0.0** is the first release to support Bootstrap 3.0.0.
33
34Bootbox **3.3.0** is the *last* release to support Bootstrap 2.2.x.
35
36Much more dependency information can be found [on the Bootbox website](http://bootboxjs.com/getting-started.html#bootbox-dependencies).
37
38### Latest Release: 5.0.0
39
40- Updates Bootbox to be compatible with both Bootstrap 4 and Bootstrap 3.
41- Pulls button locale options to separate file
42- Various bugfixes
43
44#### Prompt
45
46- Adds new input types for prompt:
47 - radio
48 - range
49- Adds prompt input constraints for `min`, `max`, `step`, `maxlength`, `pattern`, and `required`
50- Adds `pattern` option for prompt inputs
51- Allows `message` option for prompt
52- Allows `multiple` option for prompt (when using the `select` input type)
53- Refactors prompt function to use the same dialog factory as alert and confirm.
54
55#### Dialog options
56
57- Adds `locale` option - allows locale to be set on a dialog-by-dialog basis
58- Adds `swapButtonOrder` option to allow reversing the default button order
59- Adds `centerVertical` option - adds support for vertically-centered dialogs (requires Bootstrap 4)
60
61
62
63For a full list of releases and changes please see [the changelog](https://github.com/makeusabrew/bootbox/blob/master/CHANGELOG.md).
64
65## License
66
67(The MIT License)
68
69Copyright (C) 2011-2019 by Nick Payne <nick@kurai.co.uk>
70
71Permission is hereby granted, free of charge, to any person obtaining a copy
72of this software and associated documentation files (the "Software"), to deal
73in the Software without restriction, including without limitation the rights
74to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
75copies of the Software, and to permit persons to whom the Software is
76furnished to do so, subject to the following conditions:
77
78The above copyright notice and this permission notice shall be included in
79all copies or substantial portions of the Software.
80
81THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
82IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
83FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
84AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
85LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
86OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
87THE SOFTWARE
88
\No newline at end of file