* If we bypass the login screen with correct auth, we now load the
labels, instead of just on login. * Conversation people dropdowns removed from stylesheet. * Login button fixup. * Reply-to-list now has a different icon and brackets around mailto address have been removed: <list@example.com> => list@example.com * Sender name now clickable in conversation view - doesn't do anything obvious yet.
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -177,7 +177,7 @@
|
||||
<label for="login-default" id="login-default-label"></label>
|
||||
</td></tr>
|
||||
|
||||
<tr><td colspan="3"><input type="button" value="Log In" id="login-button">
|
||||
<tr><td colspan="3"><input type="button" value="Log In" id="login-button" style="float: right;">
|
||||
<span id="status-indicator"><img src="img/ajax-loader.gif" style="float: right;"></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
+14
-1
@@ -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();
|
||||
}
|
||||
};
|
||||
|
||||
+2
-1
@@ -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');
|
||||
|
||||
|
||||
@@ -240,11 +240,11 @@ Dragonfly.Mail.ConversationView.load = function (loc, jsob)
|
||||
if (msg.list)
|
||||
{
|
||||
replyToList = [
|
||||
'<a href="mailto:', encodeURIComponent (msg.list),
|
||||
'<a href="mailto:', encodeURIComponent ((msg.list).slice(1, -1)),
|
||||
'?subject=', encodeURIComponent ('Re: ' + msg.subject),
|
||||
'&inreplyto=', encodeURIComponent (msg.bongoId),
|
||||
'&conversation=', encodeURIComponent (loc.conversation),
|
||||
'" class="reply">', _('mailReplyToList'), '</a>' ].join ('');
|
||||
'" class="replyall">', _('mailReplyToList'), '</a>' ].join ('');
|
||||
}
|
||||
|
||||
var forward = [
|
||||
@@ -264,9 +264,9 @@ Dragonfly.Mail.ConversationView.load = function (loc, jsob)
|
||||
'<div class="msg-actions top">', forward, replyToAll, replyToList, replyToSender, '</div>',
|
||||
'<div class="people-group">',
|
||||
'<img class="disclosure" src="img/blank.gif" />',
|
||||
'<span class="sender" title="', msg.from, '">',
|
||||
'<span id="contact-clicker" class="sender" title="', msg.from, '">',
|
||||
m.markupParticipants (msg.from), '</span>',
|
||||
'to <span class="recipients">', m.markupParticipants (concat (msg.to, msg.cc)), '</span>',
|
||||
' to <span class="recipients">', m.markupParticipants (concat (msg.to, msg.cc)), '</span>',
|
||||
'</div>',
|
||||
'<span class="date">',
|
||||
d.escapeHTML (msg.date),
|
||||
@@ -276,21 +276,70 @@ Dragonfly.Mail.ConversationView.load = function (loc, jsob)
|
||||
v.formatPart(loc, msg, msg.contents), '</div>',
|
||||
//'<div class="msg-actions bottom">', /* forward, */ replyToAll, replyToSender, '</div>',
|
||||
'</div>');
|
||||
/*
|
||||
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));
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user