Skip to content

Commit

Permalink
Added Handlebars JS.
Browse files Browse the repository at this point in the history
  • Loading branch information
jorrizza committed Jan 28, 2016
1 parent eba4ea6 commit 22affc1
Show file tree
Hide file tree
Showing 2 changed files with 4,609 additions and 0 deletions.
1 change: 1 addition & 0 deletions app/assets/javascripts/alchemy/alchemy.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
//= require select2_locale_fr
//= require select2_locale_nl
//= require select2_locale_ru
//= require handlebars
//= require alchemy/alchemy.base
//= require alchemy/alchemy.autocomplete
//= require alchemy/alchemy.browser
Expand Down
Loading

5 comments on commit 22affc1

@mamhoff
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you use the https://github.com/leshill/handlebars_assets gem insteas of committing the entire JS library to the Alchemy repo? That way, we can offload updates of that library to the gem instead of having to maintain ourselves.

@tvdeyen
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, absolutely! Also, the templates will be precompiled with rake assets:precompile and we can get rid of script tags and use .hbs templates instead.

@jorrizza
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea! I'll see what I can do. The _page.html.erb template does use some controller variables (mostly for sorting). So that might be a little more complex than that. Having the Handlebars asset in a gem is a good idea regardless.

@tvdeyen
Copy link

@tvdeyen tvdeyen commented on 22affc1 Feb 2, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not add the @sorting also to the json response? It's more like a "show children and all buttons on the right" toggle, then anything else.

@jorrizza
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

True. That's a good point.

I'm running into the leshill/handlebars_assets#141 problem too. I'm going to leave this unsolved for now while I'm fixing more important things.

Please sign in to comment.