From 0502f9326c91b47ddb59b9c7194faa2775140518 Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Tue, 26 Nov 2013 22:23:08 +0000 Subject: [PATCH] Make sure ajax flag is at the end so framework finds it --- phpgwapi/js/jsapi/egw_links.js | 11 +++++++++++ 1 file changed, 11 insertions(+) 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; },