updated 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/d4science-responsive-theme@141824 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
3436bff364
commit
83ff8b44fd
2
pom.xml
2
pom.xml
|
@ -11,7 +11,7 @@
|
||||||
<artifactId>d4science-responsive-theme</artifactId>
|
<artifactId>d4science-responsive-theme</artifactId>
|
||||||
<packaging>war</packaging>
|
<packaging>war</packaging>
|
||||||
<name>d4science-responsive-theme Theme</name>
|
<name>d4science-responsive-theme Theme</name>
|
||||||
<version>6.3.1-SNAPSHOT</version>
|
<version>6.3.2-SNAPSHOT</version>
|
||||||
<build>
|
<build>
|
||||||
<plugins>
|
<plugins>
|
||||||
<plugin>
|
<plugin>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
name=d4science-responsive-theme
|
name=d4science-responsive-theme
|
||||||
module-group-id=liferay
|
module-group-id=liferay
|
||||||
module-incremental-version=5
|
module-incremental-version=6
|
||||||
tags=
|
tags=
|
||||||
short-description=
|
short-description=
|
||||||
change-log=
|
change-log=
|
||||||
|
|
|
@ -17,15 +17,15 @@ function injectClientContext() {
|
||||||
groupId = Liferay.ThemeDisplay.getScopeGroupId();
|
groupId = Liferay.ThemeDisplay.getScopeGroupId();
|
||||||
//console.log('Not logged in, injecting groupId only');
|
//console.log('Not logged in, injecting groupId only');
|
||||||
}
|
}
|
||||||
|
//attach the 3 header params in all the XHR sends
|
||||||
XMLHttpRequest.prototype.realSend = XMLHttpRequest.prototype.send;
|
(function(send) {
|
||||||
var newSend = function(vData) {
|
XMLHttpRequest.prototype.send = function(data) {
|
||||||
this.setRequestHeader("gcube-userId", userId);
|
this.setRequestHeader("gcube-userId", userId);
|
||||||
this.setRequestHeader("gcube-vreid", groupId);
|
this.setRequestHeader("gcube-vreid", groupId);
|
||||||
this.setRequestHeader("gcube-request-url", location.href);
|
this.setRequestHeader("gcube-request-url", location.href);
|
||||||
this.realSend(vData);
|
send.call(this, data);
|
||||||
};
|
};
|
||||||
XMLHttpRequest.prototype.send = newSend;
|
})(XMLHttpRequest.prototype.send);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in New Issue