Change filter to js with history for bulletins
This commit is contained in:
1 parent
253f4bcb54
commit
963a0cb604
8 files changed
+114
-65
No files matched your search
@@ -12,4 +12,5 @@
|
||||
//= require orbit-1.0
|
||||
//= require tinymce-jquery
|
||||
//= require tinymce_orbit
|
||||
//= require orbit-bar-search
|
||||
//= require orbit-bar-search
|
||||
//= require side_bar_history
|
||||
@@ -1,31 +1,49 @@
|
||||
$(function () {
|
||||
$('#back_sidebar a, #back_main a.nav').live('click',
|
||||
function () {
|
||||
$.getScript(this.href);
|
||||
history.pushState(null, document.title, this.href);
|
||||
history_edited = true;
|
||||
return false;
|
||||
}
|
||||
);
|
||||
var history_edited = false;
|
||||
|
||||
$('#back_main a.reload').live('click',
|
||||
function () {
|
||||
$.getScript(this.href);
|
||||
history.replaceState(null, document.title, this.href);
|
||||
history_edited = true;
|
||||
return false;
|
||||
}
|
||||
);
|
||||
|
||||
$('.form').live('submit', function () {
|
||||
$.post(this.action, $(this).serialize(), null, 'script');
|
||||
$('#back_sidebar a, #back_main a.nav').live('click',
|
||||
function () {
|
||||
$.getScript(this.href);
|
||||
history.pushState(null, document.title, this.href);
|
||||
history_edited = true;
|
||||
return false;
|
||||
});
|
||||
}
|
||||
);
|
||||
|
||||
$(window).bind("popstate", function () {
|
||||
if (history_edited) {
|
||||
$.getScript(location.href);
|
||||
}
|
||||
});
|
||||
$('#back_main a.reload').live('click',
|
||||
function () {
|
||||
$.getScript(this.href);
|
||||
history.replaceState(null, document.title, this.href);
|
||||
history_edited = true;
|
||||
return false;
|
||||
}
|
||||
);
|
||||
|
||||
$('.form').live('submit', function () {
|
||||
$.post(this.action, $(this).serialize(), null, 'script');
|
||||
history_edited = true;
|
||||
return false;
|
||||
});
|
||||
|
||||
$(document).on('click', '.js_history',
|
||||
function () {
|
||||
$.getScript(this.href);
|
||||
history.pushState(null, document.title, this.href);
|
||||
history_edited = true;
|
||||
return false;
|
||||
}
|
||||
);
|
||||
|
||||
$(document).on('click', '.pagination a',
|
||||
function () {
|
||||
$.getScript(this.href);
|
||||
history.pushState(null, document.title, this.href);
|
||||
history_edited = true;
|
||||
return false;
|
||||
}
|
||||
);
|
||||
|
||||
$(window).bind("popstate", function () {
|
||||
if (history_edited) {
|
||||
$.getScript(location.href);
|
||||
}
|
||||
});
|
||||
Reference in new issue
Block a user