diff --git a/addressbook/js/app.js b/addressbook/js/app.js index ad2a8ba827..dcd3d802f4 100644 --- a/addressbook/js/app.js +++ b/addressbook/js/app.js @@ -769,15 +769,23 @@ app.classes.addressbook = AppJS.extend( */ adb_mail_vcard: function(_action, _elems) { - var link = ''; + var link = {'preset[type]':[], 'preset[file]':[]}; var content = {vcard:{file:[], type:[]}}; + var nm = this.et2.getWidgetById('nm'); + if(fetchAll(_elems, nm, jQuery.proxy(function(ids) { + this.adb_mail_vcard(_action, ids.map(function(num) {return {id:'addressbook::'+num};})); + }, this))) + { + return; + } + for (var i = 0; i < _elems.length; i++) { var idToUse = _elems[i].id; var idToUseArray = idToUse.split('::'); idToUse = idToUseArray[1]; - link += "preset[type][]="+"text/vcard; charset="+(egw.preference('vcard_charset', 'addressbook') || 'utf-8')+'&'; - link += "preset[file][]="+"vfs://default/apps/addressbook/"+idToUse+"/.entry"+'&'; + link['preset[type]'].push("text/vcard; charset="+(egw.preference('vcard_charset', 'addressbook') || 'utf-8')); + link['preset[file]'].push("vfs://default/apps/addressbook/"+idToUse+"/.entry"); content.vcard.file.push("vfs://default/apps/addressbook/"+idToUse+"/.entry"); content.vcard.type.push("text/vcard; charset="+(egw.preference('vcard_charset', 'addressbook') || 'utf-8')); } diff --git a/api/js/jsapi/egw_open.js b/api/js/jsapi/egw_open.js index 274eca001c..43981bade9 100644 --- a/api/js/jsapi/egw_open.js +++ b/api/js/jsapi/egw_open.js @@ -449,6 +449,68 @@ egw.extend('open', egw.MODULE_WND_LOCAL, function(_egw, _wnd) { var popups = window.framework.popups_get(_app, _regexp); + var openUp = function (_app, _extra) { + + var len = 0; + if (typeof _extra == "string") + { + len = _extra.length; + } + else if (typeof _extra == "object") + { + for (var i in _extra) + { + if (jQuery.isArray(_extra[i])) + { + var tmp = ''; + for (var j in _extra[i]) + { + tmp += i+'[]='+_extra[i][j]+'&'; + + } + len += tmp.length; + } + else + { + len += _extra[i].length; + } + } + } + + // Accoring to microsoft, IE 10/11 can only accept a url with 2083 caharacters + // therefore we need to send request to compose window with POST method + // instead of GET. We create a temporary