Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to 2.4.1 #4

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@ test/tmp
test/version_tmp
tmp
/tags
.idea
File renamed without changes.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
## v2.4.1

* use fancytree v. 2.4.1
* stylesheets converted to SCSS and does not use ERB anymore
* minimized and concatenated file versions removed in favor of asset pipeline
* skins are working

## v2.3.0

* use fancytree v. 2.3.0
Expand Down
42 changes: 19 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
# Fancytree::Rails

fancytree-rails is a simple gem to add [FancyTree](https://github.com/mar10/fancytree) vendor files to the
`fancytree-rails` is a simple gem to add [FancyTree](https://github.com/mar10/fancytree) JavaScript library files to the
Rails asset pipeline.

## Installation

Add this line to your application's Gemfile:

gem 'fancytree-rails'
```ruby
gem 'fancytree-rails'
```

And then execute:

Expand All @@ -19,39 +21,33 @@ Or install it yourself as:

## Usage

In your Gemfile, add:

Note that [jquery-ui-rails](https://github.com/joliss/jquery-ui-rails) also needs to be available.

```ruby
gem 'fancytree-rails'
```
Require all javascript (core and all extensions) by adding the following to `app/assets/javascripts/application.js`:

Note that also [jquery-ui-rails](https://github.com/joliss/jquery-ui-rails) needs to be available.

Require javascript to ```app/assets/javascripts/application.js```:

```
```js
//= require fancytree
```

In case you want to use *gridnav* add also ```//=require fancytree/jquery.fancytree.gridnav.js```
Or you can add core and required extensions only, for example:
```js
//= require fancytree/jquery.fancytree-core
//= require fancytree/src/jquery.fancytree.glyph
//= require fancytree/src/jquery.fancytree.gridnav
```

Extend stylesheet assets ```app/assets/stylesheets/application.css```
by:
Extend stylesheet assets (defaults to the `lion` skin) by adding the following to `app/assets/stylesheets/application.css`:

```
```css
*= require ui.fancytree
```

or if you want to use another style include it directly:
```
*= require fancytree/skin-awesome/ui.fancytree
If you want to use another skin, include it's stylesheet instead:
```css
*= require fancytree/skin-vista/ui.fancytree
```
Note that for awesome style (extension) to work you to:

1. Add ```font-awesome-rails``` gem (and include its style in application.css)
2. Enable ```awesome``` extension in Fancytree.
3. Include extension code (```//= require fancytree/jquery.fancytree.awesome```) to ```app/assets/javascripts/application.js```.
Note that for `awesome` or `bootatrap` skin to work you need to use `font-awesome-rails` or [one](https://github.com/twbs/bootstrap-sass) [of](https://github.com/seyhunak/twitter-bootstrap-rails) the `bootstrap` gems accordingly.

## Credits

Expand Down
Binary file removed app/assets/images/fancytree/icons.gif
Binary file not shown.
Binary file removed app/assets/images/fancytree/loading.gif
Binary file not shown.
2 changes: 1 addition & 1 deletion app/assets/javascripts/fancytree.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
//= require jquery
//= require fancytree/jquery.fancytree-all.js
//= require fancytree/jquery.fancytree-all
Loading