diff --git a/pom.xml b/pom.xml
index b2516c1..5012b39 100644
--- a/pom.xml
+++ b/pom.xml
@@ -11,7 +11,7 @@
d4science-responsive-theme
war
d4science-responsive-theme Theme
- 6.3.1-SNAPSHOT
+ 6.3.2-SNAPSHOT
diff --git a/src/main/webapp/WEB-INF/liferay-plugin-package.properties b/src/main/webapp/WEB-INF/liferay-plugin-package.properties
index 46d6d5f..c3ad2ba 100644
--- a/src/main/webapp/WEB-INF/liferay-plugin-package.properties
+++ b/src/main/webapp/WEB-INF/liferay-plugin-package.properties
@@ -1,6 +1,6 @@
name=d4science-responsive-theme
module-group-id=liferay
-module-incremental-version=5
+module-incremental-version=6
tags=
short-description=
change-log=
diff --git a/src/main/webapp/js/gcube-context.js b/src/main/webapp/js/gcube-context.js
index f3d7d1d..7472746 100644
--- a/src/main/webapp/js/gcube-context.js
+++ b/src/main/webapp/js/gcube-context.js
@@ -17,31 +17,31 @@ function injectClientContext() {
groupId = Liferay.ThemeDisplay.getScopeGroupId();
//console.log('Not logged in, injecting groupId only');
}
-
- XMLHttpRequest.prototype.realSend = XMLHttpRequest.prototype.send;
- var newSend = function(vData) {
- this.setRequestHeader("gcube-userId", userId);
- this.setRequestHeader("gcube-vreid", groupId);
- this.setRequestHeader("gcube-request-url", location.href);
- this.realSend(vData);
- };
- XMLHttpRequest.prototype.send = newSend;
+ //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);
+ send.call(this, data);
+ };
+ })(XMLHttpRequest.prototype.send);
}
}
/*
* Override the expire function of the Liferay.Session javascript object. It makes the default behaviour and then open a modal
* */
$(function () {
- AUI().use('liferay-session', function(A) {
- if(Liferay.Session) {
- console.log('Liferay session default overridden');
- Liferay.Session.expire = function() {
- var instance = this;
- instance.set('sessionState', 'expired', {});
- $("#expirationModal").css("display", "block");
- $("#expirationModal").modal({backdrop: 'static', keyboard: false},'show');
- $("body div.alert.alert-block.popup-alert-warning.alert-error").html("Due to inactivity your session has expired, please Refresh");
- };
- }
- });
+ AUI().use('liferay-session', function(A) {
+ if(Liferay.Session) {
+ console.log('Liferay session default overridden');
+ Liferay.Session.expire = function() {
+ var instance = this;
+ instance.set('sessionState', 'expired', {});
+ $("#expirationModal").css("display", "block");
+ $("#expirationModal").modal({backdrop: 'static', keyboard: false},'show');
+ $("body div.alert.alert-block.popup-alert-warning.alert-error").html("Due to inactivity your session has expired, please Refresh");
+ };
+ }
});
+});