How to use custom js libs in the Admin part?

57 views
Skip to first unread message

Dmitry Tsvetkov

unread,
Sep 29, 2015, 6:50:51 AM9/29/15
to Alchemy CMS
Hello!

What I should do to be able to use custom js libs from /app/vendor folder in Alchemy admin part?

Dmitry Tsvetkov

unread,
Sep 29, 2015, 8:21:11 AM9/29/15
to Alchemy CMS
Ah, found it: additional js libs should be added to /app/assets/javascripts/alchemy/alchemy.custom.js

вторник, 29 сентября 2015 г., 13:50:51 UTC+3 пользователь Dmitry Tsvetkov написал:

Thomas von Deyen

unread,
Sep 29, 2015, 8:38:17 AM9/29/15
to alche...@googlegroups.com
Yes, this is one possible solution.

Then the lib will get compiled into the alchemy assets.

If you don't need them to be compiled you could add

content_for(:javascript_includes) { javascript_include_tag(:your_assets }

into you views.

But be sure that you then also need to add the assets to Rails.application.config.assets.precompile



--
You received this message because you are subscribed to the Google Groups "Alchemy CMS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to alchemy-cms...@googlegroups.com.
To post to this group, send email to alche...@googlegroups.com.
Visit this group at http://groups.google.com/group/alchemy-cms.
To view this discussion on the web visit https://groups.google.com/d/msgid/alchemy-cms/9dbb9947-319d-4bef-a125-c0a8a75eb991%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Dmitry Tsvetkov

unread,
Sep 29, 2015, 8:58:39 AM9/29/15
to Alchemy CMS
Thanks!

вторник, 29 сентября 2015 г., 15:38:17 UTC+3 пользователь tvdeyen написал:

Dmitry Tsvetkov

unread,
Oct 1, 2015, 8:14:34 AM10/1/15
to Alchemy CMS
I've created file app/assets/javascripts/alchemy/alchemy.custom.js and added this line to id:
//= require jsoneditor.js
I've placed jsoneditor.js file into vendor/assets/javascripts/
And it still doesn't load jsoneditor in the admin panel. Am I missing something?


вторник, 29 сентября 2015 г., 15:38:17 UTC+3 пользователь tvdeyen написал:
Yes, this is one possible solution.
Reply all
Reply to author
Forward
0 new messages