diff --git a/phpgwapi/js/jsapi/egw_links.js b/phpgwapi/js/jsapi/egw_links.js index b4c2fde122..5648414ceb 100644 --- a/phpgwapi/js/jsapi/egw_links.js +++ b/phpgwapi/js/jsapi/egw_links.js @@ -307,6 +307,11 @@ egw.extend('links', egw.MODULE_GLOBAL, function() { // if there are vars, we add them urlencoded to the url var query = []; + + // If ajax flag is there, it must be the last one + var ajax = vars.ajax || false; + delete vars.ajax; + for(var name in vars) { var val = vars[name]; @@ -322,6 +327,12 @@ egw.extend('links', egw.MODULE_GLOBAL, function() { query.push(name+'='+encodeURIComponent(val)); } } + + // Add ajax flag at the end + if(ajax) + { + query.push('ajax='+encodeURIComponent(ajax)); + } return query.length ? _url+'?'+query.join('&') : _url; },