mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
BUG fix listview not working with IE9
To reproduce: 1. Using IE9, go to demo.silverstripe.com 2. login 3. go to Pages 4. switch to listview 5. expand pages to get to one with pagination (e.g. Pages > Features > Listview) 6. go to next page Expected: you go to the next page Actual: it jumps you back to the home page Fix: this fix passes parameters stored in the hash part of the url, which IE9 and below rely on for PJAX.
This commit is contained in:
parent
08ea44d458
commit
f9e7d47bc9
@ -22,6 +22,14 @@
|
||||
if(window.location.search) {
|
||||
ajaxOpts.data = window.location.search.replace(/^\?/, '') + '&' + $.param(ajaxOpts.data);
|
||||
}
|
||||
|
||||
// For browsers which do not support history.pushState like IE9, ss framework uses hash to track
|
||||
// the current location for PJAX, so for them we pass the query string stored in the hash instead
|
||||
if(!window.history || !window.history.pushState){
|
||||
if(window.location.hash && window.location.hash.indexOf('?') != -1){
|
||||
ajaxOpts.data = window.location.hash.substring(window.location.hash.indexOf('?') + 1) + '&' + $.param(ajaxOpts.data);
|
||||
}
|
||||
}
|
||||
|
||||
form.addClass('loading');
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user