updated css and gcube context's override of the XMLHttpRequest's send method to support EDISON case
git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/portal/liferay62-plugins/generic-configurable-theme@141821 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
6745fae9fa
commit
116f45f0bb
|
@ -17,18 +17,15 @@ function injectClientContext() {
|
|||
groupId = Liferay.ThemeDisplay.getScopeGroupId();
|
||||
//console.log('Not logged in, injecting groupId only');
|
||||
}
|
||||
|
||||
var send = window.XMLHttpRequest.prototype.send;
|
||||
function sendReplacement(data) {
|
||||
//attach the 3 header params in all the XHR sends
|
||||
(function(send) {
|
||||
XMLHttpRequest.prototype.send = function(data) {
|
||||
this.setRequestHeader("gcube-userId", userId);
|
||||
this.setRequestHeader("gcube-vreid", groupId);
|
||||
this.setRequestHeader("gcube-request-url", location.href);
|
||||
if(this.onreadystatechange) {
|
||||
this._onreadystatechange = this.onreadystatechange;
|
||||
}
|
||||
return send.apply(this, arguments);
|
||||
}
|
||||
window.XMLHttpRequest.prototype.send = sendReplacement;
|
||||
send.call(this, data);
|
||||
};
|
||||
})(XMLHttpRequest.prototype.send);
|
||||
}
|
||||
}
|
||||
/*
|
||||
|
|
Loading…
Reference in New Issue