Permalink
Browse files

Load jquery unobtrusive js driver.

At least one ujs driver needs to be loaded if enki is to be used with Rails 3. Since Prototype is not included in any layout I'm adding Jquery that is used everywhere in Enki.

Without this driver things like the Logout button in Admin panel did not work. It was pointing to GET admin_session_url instead of
DELETE admin_session_url.

The driver required jquery update.
  • Loading branch information...
1 parent 712d0e8 commit de926a903d7f2ab704e0069b604d3e722fbe4e40 Adam Wróbel committed with xaviershay Dec 20, 2010
Showing with 5,693 additions and 2,590 deletions.
  1. +3 −0 app/views/layouts/admin.html.erb
  2. +2 −0 app/views/layouts/application.html.erb
  3. +5,528 −2,590 public/javascripts/jquery.js
  4. +160 −0 public/javascripts/rails.js
@@ -5,10 +5,13 @@
<title><%= enki_config[:title] %> - Admin</title>
+ <%= csrf_meta_tag %>
+
<%= javascript_include_tag 'jquery.js' %>
<%= javascript_include_tag 'jquery.livequery.js' %>
<%= javascript_include_tag 'jquery.form.js' %>
<%= javascript_include_tag 'jquery.easing.1.3.js' %>
+ <%= javascript_include_tag 'rails.js' %>
<%= javascript_include_tag 'humanmsg' %>
<%= javascript_include_tag 'admin/shortcut' %>
<%= javascript_include_tag 'admin/common' %>
@@ -3,8 +3,10 @@
<head>
<meta charset="utf-8">
<title><%= html_title yield(:page_title) %></title>
+ <%= csrf_meta_tag %>
<%= stylesheet_link_tag 'application' %>
<%= javascript_include_tag 'jquery' %>
+ <%= javascript_include_tag 'rails' %>
<%= open_id_delegation_link_tags(enki_config[:open_id_delegation, :server], enki_config[:open_id_delegation, :delegate]) if enki_config[:open_id_delegation] %>
<%= yield(:head) %>
</head>
Oops, something went wrong.

0 comments on commit de926a9

Please sign in to comment.