mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-08 00:54:50 +01:00
Use url-email contact_plus attribute in mail index instead of binding tooltip explicxitly on mail app
This commit is contained in:
parent
02453109d1
commit
db4d26482a
@ -664,7 +664,7 @@ app.classes.mail = AppJS.extend(
|
||||
for(var i = 0; i < content.length; i++)
|
||||
{
|
||||
var value = content[i];
|
||||
var email = et2_createWidget('url-email',{id:widget.id+'_'+i, value:value,readonly:true},widget);
|
||||
var email = et2_createWidget('url-email',{id:widget.id+'_'+i, value:value,readonly:true, contact_plus:true},widget);
|
||||
email.loadingFinished();
|
||||
}
|
||||
}
|
||||
@ -3825,38 +3825,3 @@ app.classes.mail = AppJS.extend(
|
||||
};
|
||||
}
|
||||
});
|
||||
|
||||
// Bind a mouseenter event once for every read-only email
|
||||
$j(function() {
|
||||
// If user doesn't have access to addressbook, stop
|
||||
if(!egw.app('addressbook')) return;
|
||||
|
||||
$j('body').on('mouseenter', 'a[id^="mail-"].et2_email', function() {
|
||||
$j(this).tooltip({
|
||||
items: 'a.et2_email',
|
||||
position: {my:"left top", at:"left bottom", collision:"flipfit"},
|
||||
tooltipClass: "et2_email_popup",
|
||||
content: function() {
|
||||
// Here we could do all sorts of things
|
||||
var extra = {
|
||||
'presets[email]': $j(this).text()
|
||||
};
|
||||
return $j('<a href="#">'+ egw.lang('Add a new contact') + '</a>')
|
||||
.on('click', function() {
|
||||
egw.open('','addressbook','add',extra);
|
||||
});
|
||||
},
|
||||
close: function( event, ui ) {
|
||||
ui.tooltip.hover(
|
||||
function () {
|
||||
$j(this).stop(true).fadeTo(400, 1);
|
||||
//.fadeIn("slow"); // doesn't work because of stop()
|
||||
},
|
||||
function () {
|
||||
$j(this).fadeOut("400", function(){ $j(this).remove(); });
|
||||
}
|
||||
);
|
||||
}
|
||||
}).tooltip("open");
|
||||
});
|
||||
});
|
||||
|
@ -32,9 +32,9 @@
|
||||
<html id="${row}[attachments]"/>
|
||||
<description id="${row}[subject]" no_lang="1"/>
|
||||
<date-time_today align="center" id="${row}[date]" readonly="true"/>
|
||||
<url-email id="${row}[address]" readonly="true"/>
|
||||
<url-email id="${row}[toaddress]" readonly="true"/>
|
||||
<url-email id="${row}[fromaddress]" readonly="true"/>
|
||||
<url-email id="${row}[address]" contact_plus = "true" readonly="true"/>
|
||||
<url-email id="${row}[toaddress]" contact_plus = "true" readonly="true"/>
|
||||
<url-email id="${row}[fromaddress]" contact_plus = "true" readonly="true"/>
|
||||
<vfs-size align="right" id="${row}[size]" no_lang="1" readonly="true"/>
|
||||
</row>
|
||||
</rows>
|
||||
@ -54,7 +54,7 @@
|
||||
<vbox id="mailPreview" width="100%">
|
||||
<hbox width="100%" id="mailPreviewHeadersFrom" class="mailPreviewHeaders">
|
||||
<description value="From"/>
|
||||
<url-email id="previewFromAddress" readonly="true"/>
|
||||
<url-email id="previewFromAddress" contact_plus = "true" readonly="true"/>
|
||||
</hbox>
|
||||
<hbox id="mailPreviewHeadersSubject" class="mailPreviewHeaders">
|
||||
<description value="Subject"/>
|
||||
|
Loading…
Reference in New Issue
Block a user