diff --git a/liferay-plugins-sdk-6.2/themes/portos-private-fe-theme/docroot/_diffs/js/custom.js b/liferay-plugins-sdk-6.2/themes/portos-private-fe-theme/docroot/_diffs/js/custom.js index 7012f4a6..d8fc3572 100644 --- a/liferay-plugins-sdk-6.2/themes/portos-private-fe-theme/docroot/_diffs/js/custom.js +++ b/liferay-plugins-sdk-6.2/themes/portos-private-fe-theme/docroot/_diffs/js/custom.js @@ -2,6 +2,18 @@ var iOS = /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream; $(document).ready(function () { + + var doAsUserId = getParameterByName('doAsUserId'); + if(doAsUserId != null){ + $.each($('.doasuser-class a'), function(index, val) { + $(this).attr('href', $(this).attr('href')+'?doAsUserId='+doAsUserId); + }); + } + + function getParameterByName(name) { + var match = RegExp('[?&]' + name + '=([^&]*)').exec(window.location.search); + return match && decodeURIComponent(match[1].replace(/\+/g, ' ')); + } /*optionalRadio();*/ diff --git a/liferay-plugins-sdk-6.2/themes/portos-private-fe-theme/docroot/js/custom.js b/liferay-plugins-sdk-6.2/themes/portos-private-fe-theme/docroot/js/custom.js index 7012f4a6..d8fc3572 100644 --- a/liferay-plugins-sdk-6.2/themes/portos-private-fe-theme/docroot/js/custom.js +++ b/liferay-plugins-sdk-6.2/themes/portos-private-fe-theme/docroot/js/custom.js @@ -2,6 +2,18 @@ var iOS = /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream; $(document).ready(function () { + + var doAsUserId = getParameterByName('doAsUserId'); + if(doAsUserId != null){ + $.each($('.doasuser-class a'), function(index, val) { + $(this).attr('href', $(this).attr('href')+'?doAsUserId='+doAsUserId); + }); + } + + function getParameterByName(name) { + var match = RegExp('[?&]' + name + '=([^&]*)').exec(window.location.search); + return match && decodeURIComponent(match[1].replace(/\+/g, ' ')); + } /*optionalRadio();*/