forked from extern/egroupware
Check popup blocker for when trying to open mail compose popup from filemamanger/Collabora
This commit is contained in:
parent
95c3c6f30b
commit
b8eacf5332
3
api/js/jsapi/egw_global.d.ts
vendored
3
api/js/jsapi/egw_global.d.ts
vendored
@ -1120,8 +1120,9 @@ declare interface IegwWndLocal extends IegwGlobal
|
||||
* @param {object} _content content to be passed to method
|
||||
* @param {string|object} _extra url or object of extra
|
||||
* @param {regexp} _regexp regular expression to get specific popup with matched url
|
||||
* @param {boolean} _check_popup_blocker TRUE check if browser pop-up blocker is on/off, FALSE no check
|
||||
*/
|
||||
openWithinWindow(_app : string, _method : string, _content : object, _extra? : string|object, _regexp? : RegExp) : void;
|
||||
openWithinWindow(_app : string, _method : string, _content : object, _extra? : string|object, _regexp? : RegExp, _check_popup_blocker? : boolean) : void;
|
||||
|
||||
/**
|
||||
* implemented in egw_ready.js
|
||||
|
@ -514,8 +514,9 @@ egw.extend('open', egw.MODULE_WND_LOCAL, function(_egw, _wnd)
|
||||
* @param {object} _content content to be passed to method
|
||||
* @param {string|object} _extra url or object of extra
|
||||
* @param {regex} _regexp regular expression to get specific popup with matched url
|
||||
* @param {boolean} _check_popup_blocker TRUE check if browser pop-up blocker is on/off, FALSE no check
|
||||
*/
|
||||
openWithinWindow: function (_app, _method, _content, _extra, _regexp)
|
||||
openWithinWindow: function (_app, _method, _content, _extra, _regexp, _check_popup_blocker)
|
||||
{
|
||||
var popups = window.framework.popups_get(_app, _regexp);
|
||||
|
||||
@ -554,7 +555,7 @@ egw.extend('open', egw.MODULE_WND_LOCAL, function(_egw, _wnd)
|
||||
// Firefox:~ 65k, Safari:80k, Chrome: 2MB, Apache: 4k, Nginx: 4k
|
||||
if (len > 2083)
|
||||
{
|
||||
var popup = egw.open('','mail','add','','compose__','mail');
|
||||
var popup = egw.open('','mail','add','','compose__','mail', _check_popup_blocker);
|
||||
var $tmpForm = jQuery(document.createElement('form'));
|
||||
var $tmpSubmitInput = jQuery(document.createElement('input')).attr({type:"submit"});
|
||||
for (var i in _extra)
|
||||
@ -578,7 +579,7 @@ egw.extend('open', egw.MODULE_WND_LOCAL, function(_egw, _wnd)
|
||||
}
|
||||
else
|
||||
{
|
||||
egw.open('', _app, 'add', _extra, _app, _app);
|
||||
egw.open('', _app, 'add', _extra, _app, _app, _check_popup_blocker);
|
||||
}
|
||||
};
|
||||
for(var i = 0; i < popups.length; i++)
|
||||
|
@ -229,7 +229,7 @@ var filemanagerAPP = /** @class */ (function (_super) {
|
||||
content.data.files["filemode"] = params['preset[filemode]'];
|
||||
// always open compose in html mode, as attachment links look a lot nicer in html
|
||||
params["mimeType"] = 'html';
|
||||
return egw.openWithinWindow("mail", "setCompose", content, params, /mail.mail_compose.compose/);
|
||||
return egw.openWithinWindow("mail", "setCompose", content, params, /mail.mail_compose.compose/, true);
|
||||
};
|
||||
/**
|
||||
* Mail files action: open compose with already attached files
|
||||
|
@ -259,7 +259,7 @@ export class filemanagerAPP extends EgwApp
|
||||
content.data.files["filemode"] = params['preset[filemode]'];
|
||||
// always open compose in html mode, as attachment links look a lot nicer in html
|
||||
params["mimeType"] = 'html';
|
||||
return egw.openWithinWindow("mail", "setCompose", content, params, /mail.mail_compose.compose/);
|
||||
return egw.openWithinWindow("mail", "setCompose", content, params, /mail.mail_compose.compose/, true);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user