Details
-
Type: Bug
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: EE-1.8.2.GA_P03
-
Fix Version/s: EE-1.8.2.GA_P04
-
Component/s: Bridge
-
Labels:None
-
Environment:n/a
Description
On a <reload> sent from the server, the Bridge appends rvn={view number} to the URL. This, however, isn't taking into account possible Client side parameters (window.location.hash).
Suggested fix:
application.js
commandDispatcher.register('reload', function(element) {
logger.info('Reloading');
var url = window.location.href;
sendDisposeViews = Function.NOOP;
dispose();
if (url.contains('rvn=')) {
window.location.reload();
} else {
var view = element.getAttribute('view');
if (view == '') {
window.location.reload();
} else {
var queryPrefix = url.contains('?') ? '&' : '?';
var hash = window.location.hash ? window.location.hash : "";
if( hash.length > 0 ){
url = url.substr(0,url.length-hash.length);
}
window.location.href = url + queryPrefix + 'rvn=' + view + hash;
}
}
});
Suggested fix:
application.js
commandDispatcher.register('reload', function(element) {
logger.info('Reloading');
var url = window.location.href;
sendDisposeViews = Function.NOOP;
dispose();
if (url.contains('rvn=')) {
window.location.reload();
} else {
var view = element.getAttribute('view');
if (view == '') {
window.location.reload();
} else {
var queryPrefix = url.contains('?') ? '&' : '?';
var hash = window.location.hash ? window.location.hash : "";
if( hash.length > 0 ){
url = url.substr(0,url.length-hash.length);
}
window.location.href = url + queryPrefix + 'rvn=' + view + hash;
}
}
});
Activity
- All
- Comments
- History
- Activity
- Remote Attachments
- Subversion
Preserve client side set URL fragment after page reload.