mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-08 00:54:50 +01:00
fixed not working _self target
This commit is contained in:
parent
7a0df1531d
commit
e2cce43bad
@ -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);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user