vendor/assets/javascripts/bhf/application.js in bhf-0.5.9 vs vendor/assets/javascripts/bhf/application.js in bhf-0.5.10
- old
+ new
@@ -1,14 +1,15 @@
//= require ./mootools-core-1.4.5-full-compat.js
//= require ./mootools-more-1.4.0.1.js
//= require ./mootools_ujs_ap
//= require turbolinks
//= require_tree ./classes/
+var ajaxNote = new Ajaxify();
var pageSetup = function(){
var quickEdit;
window.addEvent('domready', function(){
- var ajaxNote = new Ajaxify();
+ ajaxNote.setup();
var lang = document.html.get('lang');
if (lang === 'en') {
lang = 'en-US';
}
else {
@@ -327,10 +328,16 @@
});
};
pageSetup();
if (document.addEventListener) {
+ document.addEventListener('page:fetch', function(){
+ ajaxNote.loading();
+ console.log(ajaxNote);
+ });
+
document.addEventListener('page:load', function(){
pageSetup();
rails.applyEvents();
+ ajaxNote.success();
});
}
\ No newline at end of file