summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorjessib <jessib@leap.se>2012-11-16 15:31:48 -0800
committerjessib <jessib@leap.se>2012-11-16 15:31:48 -0800
commit18a67ffdc21e44e21363f863b1a31d74b98ee3eb (patch)
treeb4f9e96e18ee9e8adaf1d5cecbc61c659f8ee9e5 /app
parentf1e3b135eec6e0a6a02b920cdadd7adc5889f9e2 (diff)
playing around with pjax-rails but not using it yet
Diffstat (limited to 'app')
-rw-r--r--app/assets/javascripts/application.js5
-rw-r--r--app/views/layouts/application.html.haml3
2 files changed, 7 insertions, 1 deletions
diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js
index dc975d4..36a9979 100644
--- a/app/assets/javascripts/application.js
+++ b/app/assets/javascripts/application.js
@@ -16,3 +16,8 @@
//= require users
//= require_tree .
//= require bootstrap
+//= require jquery.pjax
+
+$(function() {
+ $('a:not([data-remote]):not([data-behavior]):not([data-skip-pjax])').pjax('[data-pjax-container]');
+}); \ No newline at end of file
diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml
index e3b7977..b0644f2 100644
--- a/app/views/layouts/application.html.haml
+++ b/app/views/layouts/application.html.haml
@@ -19,5 +19,6 @@
.row
.span12
= render 'layouts/messages' # TODO: In firefox, these are hidden by header
- = yield
+ %div{"data-pjax-container" => ""}
+ = yield
%footer