diff --git a/phpgwapi/js/egw_json.js b/phpgwapi/js/egw_json.js index 334154b34b..1726d01bf0 100644 --- a/phpgwapi/js/egw_json.js +++ b/phpgwapi/js/egw_json.js @@ -328,7 +328,9 @@ egw_json_request.prototype.sendRequest = function(_async, _callback, _sender) dataType: 'json', type: 'POST', success: this.handleResponse, - error: function(_xmlhttp,_err) { window.console.error('Ajax request to ' + this.url + ' failed: ' + _err); } + error: function(_xmlhttp,_err) { + window.console.error('Ajax request to ' + this.url + ' failed: ' + _err); + } }); } diff --git a/phpgwapi/js/jsapi/egw_links.js b/phpgwapi/js/jsapi/egw_links.js index 268ef1ce05..53e8a08f97 100644 --- a/phpgwapi/js/jsapi/egw_links.js +++ b/phpgwapi/js/jsapi/egw_links.js @@ -441,7 +441,7 @@ egw.extend('links', egw.MODULE_GLOBAL, function() { var self = this; // bind change handler select.change(function(){ - if (this.value) self.open('', this.value, 'add', {}, this.value); + if (this.value) self.open('', this.value, 'add', {}, undefined, this.value); this.value = ''; }); // need to load common translations for app-names diff --git a/phpgwapi/js/jsapi/egw_open.js b/phpgwapi/js/jsapi/egw_open.js index f2abb8a46c..7036805d53 100644 --- a/phpgwapi/js/jsapi/egw_open.js +++ b/phpgwapi/js/jsapi/egw_open.js @@ -37,9 +37,10 @@ egw.extend('open', egw.MODULE_WND_LOCAL, function(_egw, _wnd) { * @param string type default "edit", possible "view", "view_list", "edit" (falls back to "view") and "add" * @param object|string extra extra url parameters to append as object or string * @param string target target of window to open + * @param string target_app target application to open in that tab * @memberOf egw */ - open: function(id_data, app, type, extra, target) + open: function(id_data, app, type, extra, target, target_app) { var id; if(typeof target === 'undefined') @@ -126,7 +127,7 @@ egw.extend('open', egw.MODULE_WND_LOCAL, function(_egw, _wnd) { } popup = app_registry[type+'_popup']; } - return this.open_link(this.link(url, params), undefined, popup, target); + return this.open_link(this.link(url, params), target, popup, target_app); }, /** @@ -172,6 +173,10 @@ egw.extend('open', egw.MODULE_WND_LOCAL, function(_egw, _wnd) { // Use framework's link handler, if present return _wnd.egw_link_handler(url,_target); } + else if (_target == '_self') + { + _wnd.location.href = url; + } else { return _wnd.open(url, _target);