mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-03 04:29:28 +01:00
display all Adresses popup
This commit is contained in:
parent
144da1e76d
commit
2a7b7d9376
@ -547,17 +547,34 @@ app.classes.mail = AppJS.extend(
|
|||||||
mail_showAllAddresses: function(_id) {
|
mail_showAllAddresses: function(_id) {
|
||||||
var dataElem = {data:{subject:"",fromaddress:"",toaddress:"",additionaltoaddress:"",ccaddress:"",date:"",subject:""}};
|
var dataElem = {data:{subject:"",fromaddress:"",toaddress:"",additionaltoaddress:"",ccaddress:"",date:"",subject:""}};
|
||||||
dataElem = egw.dataGetUIDdata(_id);
|
dataElem = egw.dataGetUIDdata(_id);
|
||||||
console.log(_id,dataElem);
|
//console.log(_id,dataElem);
|
||||||
var buttons = [
|
var buttons = [
|
||||||
{text: this.egw.lang("Close"), id:"close"}
|
{text: this.egw.lang("Close"), id:"close"}
|
||||||
];
|
];
|
||||||
|
var allAddresses = [{type:this.egw.lang('from'),address:dataElem.data.fromaddress}];
|
||||||
|
allAddresses.push({type:this.egw.lang('to'),address:dataElem.data.toaddress})
|
||||||
|
var parsedTo = [];
|
||||||
|
if (dataElem.data.additionaltoaddress.length>0) parsedTo=JSON.parse(dataElem.data.additionaltoaddress);
|
||||||
|
//console.log(_id,parsedTo);
|
||||||
|
for (i=0;i<parsedTo.length;i++)
|
||||||
|
{
|
||||||
|
allAddresses.push({type:'',address:parsedTo[i]});
|
||||||
|
}
|
||||||
|
var parsedCC = [];
|
||||||
|
if (dataElem.data.ccaddress.length>0) parsedCC=JSON.parse(dataElem.data.ccaddress);
|
||||||
|
//console.log(_id,parsedCC);
|
||||||
|
for (i=0;i<parsedCC.length;i++)
|
||||||
|
{
|
||||||
|
allAddresses.push({type:(i==0?this.egw.lang('cc'):''),address:parsedCC[i]});
|
||||||
|
}
|
||||||
var dialog = et2_createWidget("dialog",{
|
var dialog = et2_createWidget("dialog",{
|
||||||
// If you use a template, the second parameter will be the value of the template, as if it were submitted.
|
// If you use a template, the second parameter will be the value of the template, as if it were submitted.
|
||||||
callback: function(button_id, value) {},
|
callback: function(button_id, value) {},
|
||||||
buttons: buttons,
|
buttons: buttons,
|
||||||
|
modal: false,
|
||||||
title: dataElem.data.subject,
|
title: dataElem.data.subject,
|
||||||
template:"/egroupware/mail/templates/default/displayAllAdresses.xet",
|
template:"/egroupware/mail/templates/default/displayAllAdresses.xet",
|
||||||
value: { content: {displayallAdresses:[{type:this.egw.lang('to'),address:JSON.parse(dataElem.data.additionaltoaddress)[0]}]}, sel_options: {}}
|
value: { content: {displayallAdresses:allAddresses}, sel_options: {}}
|
||||||
});
|
});
|
||||||
|
|
||||||
},
|
},
|
||||||
|
@ -373,6 +373,11 @@ input[type=button] {
|
|||||||
position: relative;
|
position: relative;
|
||||||
background-color: white;
|
background-color: white;
|
||||||
}
|
}
|
||||||
|
.maildisplayAllAdresses {
|
||||||
|
max-height: 245px !important;
|
||||||
|
overflow:scroll;
|
||||||
|
overflow-x:hidden;
|
||||||
|
}
|
||||||
#mail-compose_fileselector {
|
#mail-compose_fileselector {
|
||||||
width: 245px !important;
|
width: 245px !important;
|
||||||
}
|
}
|
||||||
|
@ -2,17 +2,20 @@
|
|||||||
<!-- $Id$ -->
|
<!-- $Id$ -->
|
||||||
<overlay>
|
<overlay>
|
||||||
<template id="mail.displayAllAdresses" template="" lang="" group="0" version="1.9.001">
|
<template id="mail.displayAllAdresses" template="" lang="" group="0" version="1.9.001">
|
||||||
<grid disabled="@no_griddata" id="displayallAdresses">
|
<description value="All Adresses:" />
|
||||||
<columns>
|
<vbox class="maildisplayAllAdresses">
|
||||||
<column width="10%" />
|
<grid disabled="@no_griddata" id="displayallAdresses">
|
||||||
<column width="80%" />
|
<columns>
|
||||||
</columns>
|
<column width="10%" />
|
||||||
<rows>
|
<column width="80%" />
|
||||||
<row >
|
</columns>
|
||||||
<description id="${row}[type]" />
|
<rows>
|
||||||
<url-email align="right" id="${row}[address]" readonly='true'/>
|
<row >
|
||||||
</row>
|
<description id="${row}[type]" />
|
||||||
</rows>
|
<url-email align="left" id="${row}[address]" readonly='true'/>
|
||||||
</grid>
|
</row>
|
||||||
|
</rows>
|
||||||
|
</grid>
|
||||||
|
</vbox>
|
||||||
</template>
|
</template>
|
||||||
</overlay>
|
</overlay>
|
||||||
|
Loading…
Reference in New Issue
Block a user