Rztree
A ztree now version 3.5.17 ruby gem to use with rails 4. Test on rails 4.1.8
Installation
Add this line to your application's Gemfile:
gem 'rztree', '~> 0.0.8'
And then execute:
$ bundle
Usage
Add this line to your application.js file:
//= require jquery
//= require jquery.ztree.all.js
//= require jquery_ujs
//= require turbolinks
And then add this line to your application.css file:
*= require zTreeStyle
Last rake the non_digest image version:
rake -T
RAILS_ENV=production rake non_digested_of_ztree # or non_digested
Note
rztree/ztree
is a rails demo.
RAILS_ENV=production rake assets:precompile
RAILS_ENV=production rake non_digested_of_ztree # or non_digested
RAILS_ENV=production rails server
If you want to use the default custom icon, you can download it. Here is the demo page(http://www.ztree.me/v3/demo.php#_105).
Other
You can use part of ztree. Here is all examples:
//= require jquery.ztree.all.js
//= require jquery.ztree.core.js
//= require jquery.ztree.excheck.js
//= require jquery.ztree.exedit.js
//= require jquery.ztree.exhide.js
Contributing
- Fork it ( https://github.com/FlowerWrong/rztree/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request