* Added ability to adjust default calendar view in Preferences.

* Changed one of my 'bad translation ways' - we now use d.format instead for Logout link.
* Even more event arg bug fixes - this one closes bug #9408.
* We now perform a noop/lazy/late translation for mailbox labels (drafts, sent, inbox etc).
This commit is contained in:
halex
2007-07-15 08:58:13 +00:00
parent 012f72a874
commit 8d72093cd6
5 changed files with 45 additions and 15 deletions
+1 -1
View File
@@ -950,7 +950,7 @@ Dragonfly.start = function ()
$('login-user').value = '';
$('login-password').value = '';
Element.setText ('user-name', d.userName);
Element.setHTML ('logout-text', _('Log out') + ' ' + d.userName);
Element.setHTML ('logout-text', d.format(_('Log out {0}...'), d.userName));
showElement ('content');
// Add administration link if we're admin
+4 -4
View File
@@ -411,7 +411,7 @@ Dragonfly.Mail.joinParticipants = function (parts)
}, parts).join (', ');
};
Dragonfly.Mail.Conversations = { label: 'Conversations' };
Dragonfly.Mail.Conversations = { label: N_('Conversations') };
Dragonfly.Mail.handlers['conversations'] = Dragonfly.Mail.Conversations;
Dragonfly.Mail.Conversations.parseArgs = function (loc, args)
@@ -561,7 +561,7 @@ Dragonfly.Mail.Messages.load = function (loc, jsob)
};
*/
Dragonfly.Mail.Contacts = { label: 'Contacts' };
Dragonfly.Mail.Contacts = { label: N_('Contacts') };
Dragonfly.Mail.handlers['contacts'] = Dragonfly.Mail.Contacts;
Dragonfly.Mail.Contacts.parseArgs = function (loc, args)
@@ -664,7 +664,7 @@ Dragonfly.Mail.Contacts.getBreadCrumbs = function (loc)
}
};
Dragonfly.Mail.Subscriptions = { label: 'Mailing Lists' };
Dragonfly.Mail.Subscriptions = { label: N_('Mailing Lists') };
Dragonfly.Mail.handlers['subscriptions'] = Dragonfly.Mail.Subscriptions;
Dragonfly.Mail.Subscriptions.parseArgs = function (loc, args)
@@ -777,7 +777,7 @@ Dragonfly.Mail.Subscriptions.getBreadCrumbs = function (loc)
}
};
Dragonfly.Mail.ToMe = { label: 'To Me' };
Dragonfly.Mail.ToMe = { label: N_('To Me') };
Dragonfly.Mail.handlers['tome'] = Dragonfly.Mail.ToMe;
Dragonfly.Mail.ToMe.parseArgs = function (loc, args)
+1 -1
View File
@@ -91,7 +91,7 @@ Dragonfly.Mail.ConversationView.formatPart = function (loc, msg, part)
html.push (v.formatPart(loc, msg, child));
} else {
if (!inAttachments) {
html.push ('<div class="msg-attachments"><b>Attachments:</b><ul>');
html.push ('<div class="msg-attachments"><b>', _('Attachments:'), '</b><ul>');
inAttachments = 1;
}
var partLoc = new d.Location (loc);
+10 -3
View File
@@ -124,9 +124,16 @@ Dragonfly.Calendar.OccurrencePopup.prototype.edit = function (evt, occurrence, e
this.setClosable (false);
delete this.changes; // may be set if we're editing after a save but before dispose
if (occurrence) {
this.occurrence = (typeof occurrence == 'string')
? d.JCal.buildNewEvent (occurrence).occurrences[0]
: occurrence;
if (!occurrence.pageX)
{
this.occurrence = (typeof occurrence == 'string')
? d.JCal.buildNewEvent (occurrence).occurrences[0]
: occurrence;
}
else
{
// Rebuild the event?
}
} else if (!this.occurrence) {
this.occurrence = d.JCal.buildNewEvent ().occurrences[0];
}
+29 -6
View File
@@ -295,7 +295,17 @@ Dragonfly.Preferences.Editor.build = function (loc)
composerhtml.set (composerpage);
var calendarhtml = new d.HtmlBuilder ();
calendarhtml.push ('<p>Nothing to see here, move along.</p>');
calendarhtml.push ('<table border="0" cellspacing="0">',
'<tr><td><label>', _('Default view:'), '</label></td>',
'<td><select id="defaultcalview">',
'<option value="month">', _('Month'), '</option>',
'<option value="week">', _('Week'), '</option>',
'<option value="upcoming">', _('Upcoming'), '</option>',
'<option value="day">', _('Day'), '</option>',
'</select></td></tr>',
'<tr><td><label>', _('Day start:'), '</label></td>',
'<td><input type="text" style="width: 20px;" id="daystart"></td></tr>',
'</table>');
calendarhtml.set (calendarpage);
var form = [
@@ -329,6 +339,8 @@ Dragonfly.Preferences.Editor.save = function ()
p.prefs.mail.autoBcc = $('autobcc').value;
p.prefs.mail.signature = $('signature').value;
p.prefs.mail.usesig = $('usesig').checked;
p.prefs.calendar.defaultView = $('defaultcalview').value;
p.prefs.calendar.dayStart = $('daystart').value;
// Finish up
p.save();
@@ -350,12 +362,23 @@ Dragonfly.Preferences.Editor.load = function (loc, jsob)
document.title = 'Preferences: ' + Dragonfly.title;
// Mail prefs
$('from').value = jsob.mail.from;
if (jsob.mail && jsob.mail.from)
{
$('from').value = jsob.mail.from;
}
else
{
logWarning('You have no prefs. I should probably warn you, or.. something.');
}
if (jsob.mail.autoBcc) { $('autobcc').value = jsob.mail.autoBcc; }
if (jsob.mail.pageSize) { $('mailpagesize').value = jsob.mail.pageSize; }
if (jsob.mail.signature) { $('signature').value = jsob.mail.signature; }
if (jsob.mail.usesig) { $('usesig').checked = jsob.mail.usesig; }
if (jsob.mail.autoBcc) { $('autobcc').value = jsob.mail.autoBcc; }
if (jsob.mail.pageSize) { $('mailpagesize').value = jsob.mail.pageSize; }
if (jsob.mail.signature) { $('signature').value = jsob.mail.signature; }
if (jsob.mail.usesig) { $('usesig').checked = jsob.mail.usesig; }
// Calendar prefs
if (jsob.calendar.defaultView) { $('defaultcalview').value = jsob.calendar.defaultView; }
if (jsob.calendar.dayStart) { $('daystart').value = jsob.calendar.dayStart; }
logDebug('We just loaded.');
};