diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2017-02-21 13:30:19 -0500 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2017-02-22 13:49:27 -0500 |
commit | f24c2f09f8dcf12792d882f882ab70a99a289881 (patch) | |
tree | a4e999b5d32cedbcbdc2998d21aee26f4f028ddc /actionview/app/assets/javascripts | |
parent | 2e0f7baef344474b39d660db5fb0b8c9fb33dc3b (diff) | |
download | rails-f24c2f09f8dcf12792d882f882ab70a99a289881.tar.gz rails-f24c2f09f8dcf12792d882f882ab70a99a289881.tar.bz2 rails-f24c2f09f8dcf12792d882f882ab70a99a289881.zip |
Move rails-ujs README and LICENCE to actionview
We are going to make rails/rails the official repository
Diffstat (limited to 'actionview/app/assets/javascripts')
-rw-r--r-- | actionview/app/assets/javascripts/MIT-LICENSE | 20 | ||||
-rw-r--r-- | actionview/app/assets/javascripts/README.md | 49 |
2 files changed, 69 insertions, 0 deletions
diff --git a/actionview/app/assets/javascripts/MIT-LICENSE b/actionview/app/assets/javascripts/MIT-LICENSE new file mode 100644 index 0000000000..befcbdc7b7 --- /dev/null +++ b/actionview/app/assets/javascripts/MIT-LICENSE @@ -0,0 +1,20 @@ +Copyright (c) 2007-2017 Rails Core team + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/actionview/app/assets/javascripts/README.md b/actionview/app/assets/javascripts/README.md new file mode 100644 index 0000000000..92f3e8a3b3 --- /dev/null +++ b/actionview/app/assets/javascripts/README.md @@ -0,0 +1,49 @@ +Ruby on Rails unobtrusive scripting adapter. +======================================== + +This unobtrusive scripting support file is developed for the Ruby on Rails framework, but is not strictly tied to any specific backend. You can drop this into any application to: + +- force confirmation dialogs for various actions; +- make non-GET requests from hyperlinks; +- make forms or hyperlinks submit data asynchronously with Ajax; +- have submit buttons become automatically disabled on form submit to prevent double-clicking. + +These features are achieved by adding certain ["data" attributes][data] to your HTML markup. In Rails, they are added by the framework's template helpers. + +Requirements +------------ + +- HTML5 doctype (optional). + +If you don't use HTML5, adding "data" attributes to your HTML4 or XHTML pages might make them fail [W3C markup validation][validator]. However, this shouldn't create any issues for web browsers or other user agents. + +Installation using npm +------------ + +Run `npm install rails-ujs --save` to install the rails-ujs package. + +Installation using Yarn +------------ + +Run `yarn add rails-ujs` to install the rails-ujs package. + +Usage +------------ + +Require `rails-ujs` into your application.js manifest. + +```javascript +//= require rails-ujs +``` + +How to run tests +------------ + +Run `bundle exec rake ujs:server` first, and then run the web tests by visiting [[http://localhost:4567]] in your browser. + +## License +rails-ujs is released under the [MIT License](MIT-LICENSE). + +[data]: http://www.w3.org/TR/html5/dom.html#embedding-custom-non-visible-data-with-the-data-*-attributes "Embedding custom non-visible data with the data-* attributes" +[validator]: http://validator.w3.org/ +[csrf]: http://api.rubyonrails.org/classes/ActionController/RequestForgeryProtection.html |