diff --git a/src/www/css/conversation.css b/src/www/css/conversation.css index a6e07ec..9a483ae 100644 --- a/src/www/css/conversation.css +++ b/src/www/css/conversation.css @@ -98,7 +98,7 @@ /* People 'bubles' in the message header */ .msg .people { - padding: 0px 10px 0px 2px; + padding: 0px 2px 0px 2px; white-space: nowrap; text-decoration: none; } @@ -106,9 +106,9 @@ .msg .msg-subject { overflow: hidden; } .msg .people:hover { - background: transparent url(../img/arrow.png) right no-repeat; + /*background: transparent url(../img/arrow.png) right no-repeat;*/ background-color: #e4ebf3; - padding: 0 9px 0 1px; + padding: 0 1px 0 1px; -moz-border-radius: 25%; border: 1px solid #d8e1ed; text-decoration: none; diff --git a/src/www/dragonfly.html b/src/www/dragonfly.html index 78a8ab7..bf202cd 100644 --- a/src/www/dragonfly.html +++ b/src/www/dragonfly.html @@ -177,7 +177,7 @@ - + diff --git a/src/www/js/Dragonfly.js b/src/www/js/Dragonfly.js index 12423df..2d6b455 100644 --- a/src/www/js/Dragonfly.js +++ b/src/www/js/Dragonfly.js @@ -920,7 +920,7 @@ Dragonfly.start = function () d.buildSidebar(); d.translateElements(); - + d.setLoginMessage (_('loadingData')); // set current timezone to default and build timezone selector @@ -1021,4 +1021,17 @@ Dragonfly.main = function () //Dragonfly.buildSidebar(); Dragonfly.observeLoginEvents (); Dragonfly.login(); + + logDebug('Login pane visiblity: ' + $('login-pane').style.display); + logDebug('Main UI visiblity: ' + $('content').style.display); + + if ($('login-pane').style.display == "none") + { + // Only build and translate if we're already logged in. + // Otherwise, only build and translate on login. + + logDebug('Logged in already. Building and translating...'); + Dragonfly.buildSidebar(); + Dragonfly.translateElements(); + } }; diff --git a/src/www/js/Login.js b/src/www/js/Login.js index 6fbe5d7..297e5f2 100644 --- a/src/www/js/Login.js +++ b/src/www/js/Login.js @@ -162,7 +162,8 @@ Dragonfly.showLoginPane = function () hideElement ('loading'); hideElement ('content'); showElement ('login-pane'); - hideElement('status-indicator'); + showElement ('login-button'); + hideElement ('status-indicator'); Dragonfly.setLoginDisabled (false); addElementClass (document.body, 'login'); diff --git a/src/www/js/MailConversationView.js b/src/www/js/MailConversationView.js index 4ee6a35..09b0510 100644 --- a/src/www/js/MailConversationView.js +++ b/src/www/js/MailConversationView.js @@ -240,11 +240,11 @@ Dragonfly.Mail.ConversationView.load = function (loc, jsob) if (msg.list) { replyToList = [ - '', _('mailReplyToList'), '' ].join (''); + '" class="replyall">', _('mailReplyToList'), '' ].join (''); } var forward = [ @@ -264,9 +264,9 @@ Dragonfly.Mail.ConversationView.load = function (loc, jsob) '
', forward, replyToAll, replyToList, replyToSender, '
', '
', '', - '', + '', m.markupParticipants (msg.from), '', - 'to ', m.markupParticipants (concat (msg.to, msg.cc)), '', + ' to ', m.markupParticipants (concat (msg.to, msg.cc)), '', '
', '', d.escapeHTML (msg.date), @@ -276,21 +276,70 @@ Dragonfly.Mail.ConversationView.load = function (loc, jsob) v.formatPart(loc, msg, msg.contents), '', //'
', /* forward, */ replyToAll, replyToSender, '
', ''); - /* - Event.observe (div, 'click', - (function (evt) { - if (hasElementClass (div, 'closed')) { - removeElementClass (div, 'closed'); - } else if (hasElementClass (Event.element (evt), 'msg-header') || - hasElementClass (Event.element (evt), 'disclosure')) { - addElementClass (div, 'closed'); - } else { - return; - } - Event.stop (evt); - }).bindAsEventListener (null)); - */ } html.set ('conv-msg-list'); + + logDebug('Getting "from"...'); + this.sender = $('contact-clicker'); + logDebug('Binding event.'); + Event.observe (this.sender, 'click', this.handleClick.bindAsEventListener(this)); + logDebug('All OK'); +}; + +Dragonfly.Mail.ConversationView.handleClick = function (evt) +{ + var d = Dragonfly; + var element = d.findElement (Event.element (evt), 'SPAN', 'title'); + if (!element) { + return; + } + + var contactname = element.innerHTML; + var t = this.sender.title; + var email = t.substring(t.indexOf('<') + 1, t.length-1); + logDebug('Contact is ' + contactname + ' with email ' + email); + + var picker = d.AddressBook.sideboxPicker.unselectedId; + var children = $(picker).childNodes; + var contact; + + // Loop through and filter contacts *with this email address only*. + for (var i = 0; i < children.length; i++) { + // Find out our bongoId + var tempelement = children[i]; + var bId = tempelement.id; + logDebug('Element ID: ' + bId); + logDebug('Picker ID: ' + picker); + bId = bId.substring(14); + logDebug('Our (hopefully) correct bongoId: ' + bId); + + var tempcontact = d.AddressBook.contactMap[bId]; + if (tempcontact) + { + for (var x = 0; x < tempcontact.email.length; x++) { + if (tempcontact.email[x] == email) + { + contact = tempcontact; + } + } + } + } + + if (!contact) + { + logDebug('Failed to find contact in contactMap.'); + return; + } + + // Create a new contact popup. + var bongoId = contact.bongoId; + logDebug('Awesome! We found our contact! ' + contact.fn); + logDebug('Contact ID: ' + bongoId); + + if (!this.popup.canHideZone()) { + return; + } + this.popup.setElem (element); + d.AddressBook.loadContact(bongoId).addCallback(bind ('summarize', this.popup)); };