summaryrefslogtreecommitdiff
path: root/skins/larry/ui.js
diff options
context:
space:
mode:
authorthomascube <thomas@roundcube.net>2012-01-05 16:15:37 +0000
committerthomascube <thomas@roundcube.net>2012-01-05 16:15:37 +0000
commit7961f8c2c10c1a9f2dbaaaf4611478a13c0d7bb9 (patch)
treeca86af90b425fb772639503624c31cba56c5039e /skins/larry/ui.js
parent8304e5d76cd96d78a9cbddaf5d2407b5dc31d079 (diff)
Embed address book widget on compose screen
Diffstat (limited to 'skins/larry/ui.js')
-rw-r--r--skins/larry/ui.js21
1 files changed, 16 insertions, 5 deletions
diff --git a/skins/larry/ui.js b/skins/larry/ui.js
index ee51500e7..9e9e6b701 100644
--- a/skins/larry/ui.js
+++ b/skins/larry/ui.js
@@ -82,6 +82,7 @@ function rcube_mail_ui()
else if (rcmail.env.action == 'compose') {
rcmail.addEventListener('aftertoggle-editor', function(){ window.setTimeout(function(){ layout_composeview() }, 100); });
rcmail.addEventListener('aftersend-attachment', show_uploadform);
+ rcmail.addEventListener('add-recipient', function(p){ show_header_row(p.field, true); });
layout_composeview();
$('#composeoptionstoggle').parent().click(function(){
@@ -182,8 +183,13 @@ function rcube_mail_ui()
}
}
});
-
- $(window).resize(resize);
+
+ $(window).resize(function(e) {
+ // check target due to bugs in jquery
+ // http://bugs.jqueryui.com/ticket/7514
+ // http://bugs.jquery.com/ticket/9841
+ if (e.target == window) resize();
+ });
}
/**
@@ -631,11 +637,16 @@ function rcube_mail_ui()
/**
*
*/
- function show_header_row(which)
+ function show_header_row(which, updated)
{
- if (compose_headers[which])
+ var row = $('#compose-' + which);
+ if (row.is(':visible'))
+ return; // nothing to be done here
+
+ if (compose_headers[which] && !updated)
$('#_' + which).val(compose_headers[which]);
- $('#compose-' + which).show();
+
+ row.show();
$('#' + which + '-link').hide();
layout_composeview();
return false;