5b21d338462f15094eae789ba54791716ed4cb42b9839ca6b1d5538a0c06c563e346785265ce99315bdf5460d382e15487f17a7ca985e8edabec98f2b5d57d 4.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. # Bootbox - Bootstrap powered alert, confirm and flexible dialog boxes
  2. Please see http://bootboxjs.com for full usage instructions, or head over to http://paynedigital.com/bootbox for
  3. the original writeup about the project.
  4. ## Contact
  5. The easiest thing is to [find me on twitter @makeusabrew](http://twitter.com/makeusabrew).
  6. ## Contributing
  7. Please see the [CONTRIBUTING](https://github.com/makeusabrew/bootbox/blob/master/CONTRIBUTING.md) file for guidelines.
  8. ## Running Tests [![Build Status](https://api.travis-ci.org/makeusabrew/bootbox.svg)](http://travis-ci.org/makeusabrew/bootbox)
  9. Tests are run using [Karma](http://karma-runner.github.io/0.8/index.html) using the Mocha test adapter.
  10. To run the tests yourself, simply run ```npm install``` within the project followed by ```npm test```.
  11. Please note that this will require [PhantomJS](http://phantomjs.org/) being installed and in your path - if
  12. it is not, you may run the tests and capture browsers manually by running ```karma start``` from the root
  13. of the project.
  14. The project is also hosted on [Travis CI](https://travis-ci.org/makeusabrew/bootbox) - when submitting
  15. pull requests **please** ensure your tests pass as failing requests will be rejected. See the
  16. [CONTRIBUTING](https://github.com/makeusabrew/bootbox/blob/master/CONTRIBUTING.md) file for more information.
  17. ## Building a minified release
  18. The repository no longer contains a minified bootbox.min.js file - this is now only generated
  19. [for releases](https://github.com/makeusabrew/bootbox/releases). To build your own minified copy
  20. for use in development simply run ```npm install``` if you haven't already, followed by ```grunt uglify```.
  21. This will generate a bootbox.min.js file in your working directory.
  22. ## A note on Bootstrap dependencies
  23. Bootbox **4.0.0** is the first release to support Bootstrap 3.0.0.
  24. Bootbox **3.3.0** is the *last* release to support Bootstrap 2.2.x.
  25. Much more dependency information can be found [on the Bootbox website](http://bootboxjs.com/#dependencies).
  26. ### Roadmap
  27. The latest major release of Bootbox - 4.0.0 - involved a total rewrite of the
  28. internal code and introduced an entirely new public API. It has not re-implemented
  29. some functionality from the 3.x series as of yet; this will be addressed in the
  30. the form of new minor releases. Please feel free to add feedback and requests.
  31. There is no new major (e.g. 5.x) release on the roadmap at present.
  32. ### Latest Release: 4.4.0
  33. * Allow `backdrop` options of `true` and `false` to dismiss modals
  34. * Pass dialog as `this` value in callbacks
  35. * Bootstrap 3.3.2 compatibility
  36. * jQuery 1.11.2 compatibility
  37. * Add support for `maxlength` prompt input attribute
  38. * Gracefully detect lack of Bootstrap library rather than crashing
  39. * Expose `addLocale` and `removeLocale` for custom locale settings
  40. * Expose `setLocale` helper to select a locale rather than using `setDefaults("locale", ...)`
  41. * Add Hungarian locale
  42. * Add Croatian locale
  43. * Add Bulgarian locale
  44. * Add Thai locale
  45. * Add Persian locale
  46. * Add Albanian locale
  47. For a full list of releases and changes please see [the changelog](https://github.com/makeusabrew/bootbox/blob/master/CHANGELOG.md).
  48. ## License
  49. (The MIT License)
  50. Copyright (C) 2011-2015 by Nick Payne <nick@kurai.co.uk>
  51. Permission is hereby granted, free of charge, to any person obtaining a copy
  52. of this software and associated documentation files (the "Software"), to deal
  53. in the Software without restriction, including without limitation the rights
  54. to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  55. copies of the Software, and to permit persons to whom the Software is
  56. furnished to do so, subject to the following conditions:
  57. The above copyright notice and this permission notice shall be included in
  58. all copies or substantial portions of the Software.
  59. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  60. IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  61. FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  62. AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  63. LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  64. OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  65. THE SOFTWARE