* Fixed a tiny typo by Jonny in r129 - there was a space just before the username in the URL, which causes a 404 if you follow it.

* Adds a non-working Preferences dialog to the userbar.
* Main interface is now localisable.
* Moved search top right, and removed the timezone selector.
* New internal userbar layout (the top thing) to fit things we shove there - report any rendering issues.
* Link to administration panel if user is logged in as 'admin'
* Fixed hrefs in Hawkeye (issue caused by previous patch). Dragonfly must live at the root URL (/dragonfly.html).
This commit is contained in:
halex
2007-06-29 04:29:28 +00:00
parent db4d294eac
commit e5a8024244
20 changed files with 277 additions and 110 deletions
+5
View File
@@ -19,8 +19,10 @@ dist_css_DATA := \
src/www/css/interpreter.css \
src/www/css/layout.css \
src/www/css/login.css \
src/www/css/modal.css \
src/www/css/print.css \
src/www/css/summary.css \
src/www/css/tabs.css \
src/www/css/widgets.css
imgdir = $(htdocsdir)/img
@@ -54,6 +56,7 @@ dist_img_DATA := \
src/www/img/cal-selected-stipple.png \
src/www/img/cal-today.png \
src/www/img/cal-today-stipple.png \
src/www/img/close.gif \
src/www/img/closed-read.png \
src/www/img/closed-unread.png \
src/www/img/contact-16.png \
@@ -77,6 +80,7 @@ dist_img_DATA := \
src/www/img/grad-tab.png \
src/www/img/grad-textarea.png \
src/www/img/grad-toolbar.png \
src/www/img/big-info.png \
src/www/img/grippy.png \
src/www/img/grippy-h.gif \
src/www/img/grippy-h.png \
@@ -226,6 +230,7 @@ dist_js_DATA := \
src/www/js/Mail.js \
src/www/js/MailListView.js \
src/www/js/MailWidgets.js \
src/www/js/Modal.js \
src/www/js/OccurrenceEditor.js \
src/www/js/Preferences.js \
src/www/js/Search.js \
+12 -12
View File
@@ -17,7 +17,7 @@ body {
#body-override {
color: #2e3436;
background: url('../img/bg.png');
background: url('/img/bg.png');
background-repeat: repeat-x;
background-color: #fff;
margin-top: 25px;
@@ -40,7 +40,7 @@ body {
text-align: center;
padding: 0px;
background-image: url('../img/login-pane.png');
background-image: url('/img/login-pane.png');
/*background-repeat: no-repeat; /* Make sure this doesn't actually happen. */
overflow: none;
}
@@ -72,15 +72,15 @@ input, select {
}
.lang {
background-image: url('../img/locale.png');
background-image: url('/img/locale.png');
}
.username {
background-image: url('../img/user.png');
background-image: url('/img/user.png');
}
.password {
background-image: url('../img/locked.png');
background-image: url('/img/locked.png');
}
.password, .username, .lang {
@@ -109,7 +109,7 @@ p {
}
#page {
background: url('../img/cbg.png');
background: url('/img/cbg.png');
background-repeat: repeat-x;
background-color: #eeeeec; /* Tango GREY */
margin-left: 155px; /* Push across width of sidebar, minus 10px, for bg behind round corner */
@@ -144,7 +144,7 @@ p {
#sidebar {
color: #eeeeec; /* Tango WHITE */
background: url('../img/sbg.png');
background: url('/img/sbg.png');
background-repeat: no-repeat;
background-color: #2e3436; /* Tango DARK-GREY */
float: left;
@@ -170,7 +170,7 @@ p {
}
.selecteditem {
background-image: url('../img/sel.png');
background-image: url('/img/sel.png');
width: 175px;
background-repeat: no-repeat;
color: #2e3436;
@@ -272,14 +272,14 @@ ul.nav{
}
.error {
background-image: url('../img/dialog-error-32.png');
background-image: url('/img/dialog-error-32.png');
background-color: #a40000;
color: #eeeeec;
border: 3px solid #cc0000;
}
.info {
background-image: url('../img/dialog-information-32.png');
background-image: url('/img/dialog-information-32.png');
background-color: #3465a4;
color: #eeeeec;
border: 3px solid #204a85;
@@ -320,8 +320,8 @@ a.button, span.button, del.button {
a.button, span.button, del.button,
a.button span, span.button button, span.button input, del.button span {
background-image:url('../img/form_buttons.png');
_background-image:url('../img/form_buttons.gif');
background-image:url('/img/form_buttons.png');
_background-image:url('/img/form_buttons.gif');
}
+6
View File
@@ -1208,3 +1208,9 @@ pre {
{
padding-top: 25%;
}
#nomail-summary
{
padding-top: 50%;
text-align: center;
}
+47 -21
View File
@@ -15,6 +15,8 @@
@import url(css/contacts.css);
@import url(css/calendar.css);
@import url(css/summary.css);
@import url(css/modal.css);
@import url(css/tabs.css);
</style>
<style type="text/css" media="print">
@import url(css/print.css);
@@ -57,6 +59,7 @@
<script type="text/javascript" src="js/ValidatingEntry.js"></script>
<script type="text/javascript" src="js/Preferences.js"></script>
<script type="text/javascript" src="js/Modal.js"></script>
<script type="text/javascript" src="js/AddressBook.js"></script>
@@ -152,11 +155,11 @@
<table cellpadding="0" cellspacing="6" summary="">
<tr>
<th><label id="login-user-label"></label></th>
<td colspan="2"><input type="text" class="text-entry" id="login-user"></td>
<td colspan="2"><input type="text" class="text-entry" id="login-user" style="width: 98%;"></td>
</tr>
<tr>
<th><label id="login-password-label"></label></th>
<td colspan="2"><input type="password" class="text-entry" id="login-password"></td>
<td colspan="2"><input type="password" class="text-entry" id="login-password" style="width: 98%;"></td>
</tr>
<tr>
<tr>
@@ -165,6 +168,7 @@
<select id="login-language" style="width: 100%;">
<option value="en">English</option>
<option value="fr">Fran&ccedil;ais</option>
<option value="igpay">Igpay Atinlay</option>
</select>
</td>
</tr>
@@ -190,29 +194,28 @@
<div id="notification">Notification</div>
<table id="page-frame" cellspacing="0" cellpadding="0">
<tr id="page-header">
<td id="logo" class="header-cell">
<td id="logo" class="header-cell" colspan="2">
<table cellspacing="0" cellpadding="0">
<tr><td width="100%">
<span id="user-name"></span>
<ul id="section-user">
<li><a href="javascript:void(Dragonfly.logout());">Log Out</a></li>
<li id="admin-link"><a href="admin" target="_blank">Administration</a></li>
<li><a href="javascript:void(showBox());" id="settings-text">Settings</a></li>
<li id="admin-link"><a href="admin" target="_blank" id="admin-text">Administration</a></li>
<li><a href="javascript:void(Dragonfly.logout());" id="logout-text">Log Out</a></li>
<!--
Feedback disabled. Check the destination address in Dragonfly.js
when re-enabled.
<li><a href="javascript:void(Dragonfly.sendFeedback());">Send Feedback</a></li> -->
</ul>
</td>
<td class="header-cell" style="text-align: right; padding-right: 15px;">
</td><td style="text-align: right; padding-right: 15px;">
<div id="search">
<input id="search-entry" type="search" placeholder="Search Bongo" autosave="BongoSearch" results="10">
<input type="button" onclick="void(Dragonfly.search ($('search-entry').value))" value="Search">
<!--<input type="button" onclick="void(Dragonfly.search (''))" value="Clear">-->
<input type="button" id="bongosearch" onclick="void(Dragonfly.search ($('search-entry').value))" value="Search">
</div>
</div>
</td>
</table>
</td>
<!--<td class="header-cell" style="text-align:right; padding-right:15px;">
<form id="view-tz">
<label id="tzlabel">Timezone: <span id="tzselect"></span></label>
</form>
</td>-->
</tr>
<tr>
<td id="section-sidebar">
@@ -221,20 +224,20 @@
<span class="c"><span class="cr"></span></span>
<span class="b"><span class="br"></span></span>
<div id="sidebar-tabs-large">
<div class="tab" id="summary-tab"><a id="summary-tab-href" href="#summary" title="Look at an overview of your mail and events"><strong>Summary</strong></a></div>
<div class="tab" id="summary-tab"><a id="summary-tab-href" href="#summary" title="Look at an overview of your mail and events"><strong id="summary-tab-label">Summary</strong></a></div>
<div class="tab" id="mail-tab"><a id="mail-tab-href" href="#mail" title="Read your mail"><strong>Mail</strong></a></div>
<div class="action"><a href="mailto:">Compose New Mail</a></div>
<div class="tab" id="mail-tab"><a id="mail-tab-href" href="#mail" title="Read your mail"><strong id="mail-tab-label">Mail</strong></a></div>
<div class="action"><a id="compose-tab" href="mailto:">Compose New Mail</a></div>
<div class="tab-spacer"></div>
<div class="tab" id="calendar-tab"><a id="calendar-tab-href" href="#calendar" title="View your calendar"><strong>Calendar</strong></a></div>
<div class="tab" id="calendar-tab"><a id="calendar-tab-href" href="#calendar" title="View your calendar"><strong id="calendar-tab-label">Calendar</strong></a></div>
<div class="action"><a id="new-event-href" href="javascript:void(Dragonfly.Calendar.newEvent())">Create New Event</a></div>
</div>
<div id="sidebar-tabs-small">
Show: <select id="sidebar-select">
<option value="summary">Summary</option>
<option value="mail">Mail</option>
<option value="calendar">Calendar</option>
<option value="summary" id="summary-tab-label-alt">Summary</option>
<option value="mail" id="mail-tab-label-alt">Mail</option>
<option value="calendar" id="calendar-tab-label-alt">Calendar</option>
<option value="search" id="sidebar-select-search">Search</option>
</select>
<p>
@@ -253,6 +256,29 @@
</tr>
</table>
</div>
<!-- The magical Preferences dialog. -->
<div id="overlay" style="display:none"></div>
<div id="box" style="display:none">
<img id="close" src="img/close.gif" onclick="hideBox()" alt="Close"
title="Close this window" />
<div id="header">
<ul id="primary">
<li><span>About Me</span></li>
<li><a href="#">Display</a></li>
<li><a href="#">Timezone</a></li>
</ul>
</div>
<div id="main">
<div id="contents">
<h3>About Me</h3>
<p>Curabitur vel urna vitae nunc bibendum porttitor. Nam tortor quam, luctus id, convallis sed, rutrum ac, ante. Proin euismod lacus vitae elit. Nullam vel diam in metus consectetuer facilisis.</p>
<label for="fname">Full Name: </label><input type="text" id="fname" name="fname" />
<br />
<div id="buttons" style="text-align: right;"><input type="button" value="Cancel" onclick="hideBox()">&nbsp;<input type="submit" value="OK"></div>
</div>
</div>
</div>
<div id="extra" style="display: none">
<a id="source">Source</a>
| <a href="javascript:void(Dragonfly.toggleConsole());">Console</a></li>
+10 -10
View File
@@ -5,25 +5,25 @@
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
<title>Bongo Web Administration - %(breadcrumb)s</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="icon" href="../img/bongo-favicon.ico" type="image/ico">
<link rel="icon" href="../img/bongo-favicon.png" type="image/png">
<link rel="icon" href="/img/bongo-favicon.ico" type="image/ico">
<link rel="icon" href="/img/bongo-favicon.png" type="image/png">
<style type="text/css" media="screen">
@import url(../css/admin.css);
</style>
<script type="text/javascript" src="../js/lib/prototype/prototype.js"></script>
<script type="text/javascript" src="../js/lib/script.aculo.us/effects.js"></script>
<script type="text/javascript" src="/js/lib/prototype/prototype.js"></script>
<script type="text/javascript" src="/js/lib/script.aculo.us/effects.js"></script>
</head>
<body id="body-override">
<div id="userinfo">Logged in as: <i>admin</i> [<a href="%(url|/)slogout">logout</a>]</div>
<div id="logo"><img src="../img/Bongo-logo.png" alt="Bongo" /></div>
<div id="logo"><img src="/img/Bongo-logo.png" alt="Bongo" /></div>
<div id="sidebar">
<ul class="nav">
<li tal:attributes="class dsktab"><a href="%(url|/)s"><img src="../img/user-desktop.png" border="0" alt="" class="icon" /> Desktop</a></li>
<li class="disabled"><img src="../img/system-users.png" alt="" class="icon" /> Users</li>
<li tal:attributes="class agntab"><a href="%(url|/)sagents"><img src="../img/system-installer.png" border="0" alt="" class="icon" /> Agents</a></li>
<li tal:attributes="class systab"><a href="%(url|/)ssystem"><img src="../img/network-server.png" border="0" alt="" class="icon" /> System</a></li>
<li class="disabled"><img src="../img/help-browser.png" alt="" class="icon" /> Help</li>
<li tal:attributes="class dsktab"><a href="%(url|/)s"><img src="/img/user-desktop.png" border="0" alt="" class="icon" /> Desktop</a></li>
<li class="disabled"><img src="/img/system-users.png" alt="" class="icon" /> Users</li>
<li tal:attributes="class agntab"><a href="%(url|/)sagents"><img src="/img/system-installer.png" border="0" alt="" class="icon" /> Agents</a></li>
<li tal:attributes="class systab"><a href="%(url|/)ssystem"><img src="/img/network-server.png" border="0" alt="" class="icon" /> System</a></li>
<li class="disabled"><img src="/img/help-browser.png" alt="" class="icon" /> Help</li>
</ul>
</div>
<div id="page">
+5 -5
View File
@@ -2,17 +2,17 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Bongo Web Administration » Login</title>
<link rel="icon" href="../img/bongo-favicon.ico" type="image/ico">
<link rel="icon" href="../img/bongo-favicon.png" type="image/png">
<link rel="icon" href="/img/bongo-favicon.ico" type="image/ico">
<link rel="icon" href="/img/bongo-favicon.png" type="image/png">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<style type="text/css" media="screen">
@import url(../css/admin.css);
@import url(/css/admin.css);
</style>
<script type="text/javascript" src="../js/Browser.js"></script>
<script type="text/javascript" src="/js/Browser.js"></script>
</head>
<body onload="document.forms[0].elements[0].focus();">
<!-- Since TAL really doesn't like inline <script> element data. -->
<script type="text/javascript" src="../js/BrowserCheck.js"></script>
<script type="text/javascript" src="/js/BrowserCheck.js"></script>
<div style="margin: 18px;" class="error" tal:condition="badauth">You have specified an invalid username or password.</div>
<div style="margin: 18px;" class="info" tal:condition="loggedout">You have successfully logged out!</div>
Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

+22 -22
View File
@@ -166,7 +166,7 @@ Dragonfly.AddressBook.ContactPicker.prototype.buildHtml = function (html)
Dragonfly.ListSelector.prototype.buildHtml.call (this, html);
this.newContactId = Dragonfly.nextId ('contact-new');
html.push ('<p style="padding-top:3px; text-align:center;">');
html.push ('<a id="', this.newContactId, '" class="action">Add Contact</a>');
html.push ('<a id="', this.newContactId, '" class="action">', _('contactAddLabel'), '</a>');
this.popup = new Dragonfly.AddressBook.ContactPopup();
};
@@ -219,7 +219,7 @@ Dragonfly.AddressBook.ContactPicker.prototype.newContactHandler = function (evt)
// The ContactPopup manages the interaction for creating and editing contacts
Dragonfly.AddressBook.ContactPopup = function (elem)
{
{
Dragonfly.PopupBuble.apply (this, arguments);
};
@@ -227,14 +227,14 @@ Dragonfly.AddressBook.ContactPopup.prototype = clone (Dragonfly.PopupBuble.proto
Dragonfly.AddressBook.ContactPopup.prototype.FieldTypes = {
props: ['tel', 'im', 'email', 'url', 'org', 'adr'],
email: {name:'email', label:'Email', prop: 'email', type: 'INTERNET', protocol: 'mailto:'},
phone: {name:'phone', label:'Phone', prop: 'tel', protocol: 'tel:'},
fax: {name:'fax', label:'Fax', prop: 'tel', type: 'FAX', protocol: 'tel:'},
mobile: {name:'mobile', label:'Mobile', prop: 'tel', type: 'CELL', protocol: 'tel:'},
im: {name:'im', label:'IM', prop: 'im', protocol: 'im:'},
website: {name:'website', label:'Website', prop: 'url', protocol: 'http:'},
org: {name:'org', label:'Company', prop: 'org'},
address: {name:'address', label:'Address', prop: 'adr', longtext:true}
email: {name:'email', label:'contactEmail', prop: 'email', type: 'INTERNET', protocol: 'mailto:'},
phone: {name:'phone', label:'contactPhone', prop: 'tel', protocol: 'tel:'},
fax: {name:'fax', label:'contactFax', prop: 'tel', type: 'FAX', protocol: 'tel:'},
mobile: {name:'mobile', label:'contactMobile', prop: 'tel', type: 'CELL', protocol: 'tel:'},
im: {name:'im', label:'contactIM', prop: 'im', protocol: 'im:'},
website: {name:'website', label:'contactWebsite', prop: 'url', protocol: 'http:'},
org: {name:'org', label:'contactCompany', prop: 'org'},
address: {name:'address', label:'contactAddress', prop: 'adr', longtext:true}
};
Dragonfly.AddressBook.ContactPopup.prototype.Form = [{
@@ -302,9 +302,9 @@ Dragonfly.AddressBook.ContactPopup.prototype.summarize = function (contact, elem
var loc = new d.Location ({ tab: 'mail', set:'all', handler:'contacts',
contact: contact.bongoId });
html.push ('<div class="actions">',
'<a id="', deleteId, '" class="secondary">Delete</a>',
'<a href="#', loc.getClientUrl(), '">Show Conversations</a>',
'<a id="', editId, '">Edit</a></div>');
'<a id="', deleteId, '" class="secondary">', _('genericDelete'), '</a>',
'<a href="#', loc.getClientUrl(), '">', _('contactShowConversations'), '</a>',
'<a id="', editId, '">', _('contactEditLabel'), '</a></div>');
html.set (this.contentId);
Event.observe (deleteId, 'click', this.delConfirm.bindAsEventListener (this));
@@ -323,7 +323,7 @@ Dragonfly.AddressBook.ContactPopup.prototype.buildTab = function (html, tab)
var name = this.getName (field.prop, [tab.type, field.type]);
name = this.getFreeField (name, true);
html.push ('<li><label>', field.label, '</label>');
html.push ('<li><label>', _(field.label), '</label>');
if (field.longtext) {
html.push ('<textarea name="', name, '"></textarea>');
} else {
@@ -453,11 +453,11 @@ Dragonfly.AddressBook.ContactPopup.prototype.edit = function (evt, contact, elem
var form = [
'<form id="', this.formId, '"><img style="float:left; margin-right:5px;" align="middle" ',
'src="img/contact-unknown.png"><div><p><input style="width:75%;" name="fn"><p><label>',
'<input type="checkbox" name="isMyContact">This is Me</label></div>', notebook, '</form>'];
'<input type="checkbox" name="isMyContact">', _('contactSelf'), '</label></div>', notebook, '</form>'];
var actions = [{ value: "Cancel", onclick: 'dispose'}, { value: "Save", onclick: 'save'}];
var actions = [{ value: _('genericCancel'), onclick: 'dispose'}, { value: _('genericSave'), onclick: 'save'}];
if (this.contact.bongoId) { // only add delete for pre-existing contacts
actions.unshift ({ value: "Delete", onclick: 'del', secondary: true });
actions.unshift ({ value: _('genericDelete'), onclick: 'del', secondary: true });
}
this.setForm (form, actions);
@@ -474,7 +474,7 @@ Dragonfly.AddressBook.ContactPopup.prototype.del = function ()
if (elem) {
elem.parentNode.removeChild(elem);
}
Dragonfly.notify ('DELETED!!');
Dragonfly.notify (_('genericChangesSaved'));
return result;
});
this.dispose();
@@ -502,7 +502,7 @@ Dragonfly.AddressBook.ContactPopup.prototype.save = function ()
$(this.elem).scrollIntoView();
}
Dragonfly.notify ('Changes saved.');
Dragonfly.notify (_('genericChangesSaved'));
this.summarize ();
this.shouldAutohide = true;
callLater (2, bind ('autohide', this));
@@ -515,10 +515,10 @@ Dragonfly.AddressBook.ContactPopup.prototype.delConfirm = function ()
{
this.hide();
var text = [
'<p>Are you sure you want to delete the contact &ldquo;',
Dragonfly.escapeHTML (this.contact.fn), '&rdquo;? This cannot be undone.'
'<p>', _('contactConfirmRemovePre'), '&ldquo;',
Dragonfly.escapeHTML (this.contact.fn), '&rdquo;', _('contactConfirmRemovePost'), '</p>'
];
var actions = [{ value: "Cancel", onclick: 'dispose'}, { value: "Delete", onclick: 'del'}];
var actions = [{ value: _('genericCancel'), onclick: 'dispose'}, { value: _('genericDelete'), onclick: 'del'}];
this.setForm (text, actions);
this.show();
};
+1 -1
View File
@@ -92,7 +92,7 @@ Dragonfly.Calendar.BongoCalendar.prototype.parseJSON = function (jsob)
this.type = 'personal';
}
this.subscriptionUrl = "/user/ " + d.userName + "/calendar/" + d.escapeHTML(this.cal.name) + "/events";
this.subscriptionUrl = "/user/" + d.userName + "/calendar/" + d.escapeHTML(this.cal.name) + "/events";
/*
// this should probably trust the server...
+4 -4
View File
@@ -343,13 +343,13 @@ Dragonfly.Calendar.Events.build = function (loc)
Element.setHTML (
'toolbar', [
'<label>View: </label>',
'<a id="calendar-view-day" href="#">Day</a>',
'<a id="calendar-view-day" href="#">', _('day'), '</a>',
'<span class="bar"> | </span>',
'<a id="calendar-view-upcoming" href="#">Upcoming</a>',
'<a id="calendar-view-upcoming" href="#">', _('upcoming'), '</a>',
'<span class="bar"> | </span>',
'<a id="calendar-view-week" href="#">Week</a>',
'<a id="calendar-view-week" href="#">', _('week'), '</a>',
'<span class="bar"> | </span>',
'<a id="calendar-view-month" href="#">Month</a>'
'<a id="calendar-view-month" href="#">', _('month'), '</a>'
]);
Element.show ('toolbar');
} else {
+6 -6
View File
@@ -11,7 +11,7 @@ Dragonfly.Calendar.PersonalProperties = function (parent, calendar, showImport)
this.colorId = this.color.id;
// sharing bits
this.disclosure = new d.DisclosingLink (null, 'Share this calendar');
this.disclosure = new d.DisclosingLink (null, _('shareCalendar'));
this.publishId = this.disclosure.checkId;
this.nb = new d.Notebook();
@@ -805,7 +805,7 @@ Dragonfly.Calendar.NewSubscriptionPopup.prototype.buildHtml = function (html)
Dragonfly.PopupBuble.prototype.buildHtml.call (
this, html, '<form id="', this.formId, '">Url: <textarea rows="2" id="', this.urlId, '"></textarea>',
'<div class="actions">',
'<input id="', this.cancelId, '" type="button" value="Cancel">',
'<input id="', this.cancelId, '" type="button" value="', _('genericCancel'), '">',
'<input id="', this.subscribeId, '" type="submit" value="Subscribe"></div>',
'</form>');
@@ -910,9 +910,9 @@ Dragonfly.Calendar.CalendarPropsPopup.prototype.edit = function ()
this.saveId = d.nextId ('calendar-save');
html.push ('<div class="actions">',
'<input id="', deleteId, '" type="button" value="Delete" class="secondary">',
'<input id="', cancelId, '" type="button" value="Cancel"> ',
'<input id="', this.saveId, '" type="button" value="Save">',
'<input id="', deleteId, '" type="button" value="', _('genericDelete'), '" class="secondary">',
'<input id="', cancelId, '" type="button" value="', _('genericCancel'), '"> ',
'<input id="', this.saveId, '" type="button" value="', _('genericSave'), '">',
'</div>');
html.set (this.contentId);
@@ -948,7 +948,7 @@ Dragonfly.Calendar.CalendarPropsPopup.prototype.summarize = function ()
var editId = d.nextId ('calendar-edit');
html.push ('<div class="actions">',
'<a id="', deleteId, '" class="secondary">Delete</a>',
'<a id="', deleteId, '" class="secondary">', _('genericDelete'), '</a>',
'<a id="', inviteId, '">Send Invitation...</a>',
'<a id="', editId, '">Edit</a>',
'</div>');
+4 -4
View File
@@ -76,9 +76,9 @@ Dragonfly.Calendar.setToMonthView = function (loc, dateBaseUrl)
var html = [
'<table cellspacing="0" cellpadding="0" class="month-header"><tr>',
'<td class="month-prev"><a href="', d.escapeHTML (reldays.prev), '"><img src="img/blank.gif" alt="">Prev</a></td>',
'<td class="month-prev"><a href="', d.escapeHTML (reldays.prev), '"><img src="img/blank.gif" alt="">', _('genericPreviousShort'), '</a></td>',
'<td class="month-header-title"><h2 class="month-header">', d.escapeHTML (title), '</h2></td>',
'<td class="month-next"><a href="', d.escapeHTML (reldays.next), '">Next<img src="img/blank.gif" alt=""></a></td>',
'<td class="month-next"><a href="', d.escapeHTML (reldays.next), '">', _('genericNext'), '<img src="img/blank.gif" alt=""></a></td>',
'</tr></table>'
];
html.push ('<div id="calendar-wrapper" class="scroll">',
@@ -249,10 +249,10 @@ Dragonfly.Calendar.setToColumnView = function (loc, numDays, isupcoming, dateBas
var reldays = c.getRelativeDays (loc);
tmpLoc.day = reldays.prev;
var prev = '<a href="#' + tmpLoc.getClientUrl() + '" class="month-prev"><img src="img/blank.gif" alt="">Prev</a>';
var prev = '<a href="#' + tmpLoc.getClientUrl() + '" class="month-prev"><img src="img/blank.gif" alt="">' + _('genericPreviousShort') + '</a>';
tmpLoc.day = reldays.next;
var next = '<a href="#' + tmpLoc.getClientUrl() + '" class="month-next">Next<img src="img/blank.gif" alt=""></a>';
var next = '<a href="#' + tmpLoc.getClientUrl() + '" class="month-next">' + _('genericNext') + '<img src="img/blank.gif" alt=""></a>';
var html = new d.HtmlBuilder ('<h2 id="calendar-header">', escapeHTML (title), '</h2>',
'<table class="calendarwrapper" cellpadding="0" cellspacing="0">',
+10 -3
View File
@@ -155,7 +155,14 @@ Dragonfly.Calendar.MonthWidget.prototype.buildHtml = function (html)
'<th id="kludgysidebartitle" class="header" colspan="5">', this.day.format ('y'), '</th>',
'<td id="kludgysidebarright" class="next"><a href="#', nextUrl, '">&rarr;</a></td></tr>',
'<tr></tr>',
'<tr class="daylabels"><td>S</td><td>M</td><td>T</td><td>W</td><td>T</td><td>F</td><td>S</td></tr>');
'<tr class="daylabels"><td>', _('sunday-s'),
'</td><td>', _('monday-s'),
'</td><td>', _('tuesday-s'),
'</td><td>', _('wednesday-s'),
'</td><td>', _('thursday-s'),
'</td><td>', _('friday-s'),
'</td><td>', _('saturday-s'),
'</td></tr>');
this.headerRows = 3;
var rows = 0;
@@ -192,7 +199,7 @@ Dragonfly.Calendar.MonthWidget.prototype.buildHtml = function (html)
}
html.push ('</tr>');
}
html.push ('<tr><td id="kludgysidebartoday" colspan="7" valign="middle" class="todaylink"><p><a href="#', thisMonth, '">Show Today</a></td></tr>');
html.push ('<tr><td id="kludgysidebartoday" colspan="7" valign="middle" class="todaylink"><p><a href="#', thisMonth, '">', _('showToday'), '</a></td></tr>');
html.push ('</table>');
html.push ('</div>');
@@ -350,7 +357,7 @@ Dragonfly.Calendar.MonthWidget.showPopup = function (evt) {
'<h3>', this.day.format ('dddd, MMMM d'), '</h3>',
'<div style="width:150px;">', calwidget, '</div>',
'<p style="text-align:center;">',
'<a href="#' + loc.getClientUrl() + '">view in calendar</a>'
'<a href="#' + loc.getClientUrl() + '">', _('viewInCal'), '</a>'
);
w.popup.showBelow ();
d.requestJSON ('GET', loc).addCallback (function (jsob) { calwidget.layout (jsob); });
+32 -4
View File
@@ -813,7 +813,7 @@ Dragonfly.buildSidebar = function ()
html.set (d.sideBook.appendPage (IMG({ 'class': 'icon calendars', src: '/img/blank.gif' })));
// todo tab of sidebook
// d.sideBook.appendPage (DIV(), IMG({ 'class': 'icon todos', src: '/img/blank.gif' }));
//d.sideBook.appendPage (DIV(), IMG({ 'class': 'icon todos', src: '/img/blank.gif' }));
d.HtmlBuilder.buildChild ('sidebox-sidebook', d.sideBook);
};
@@ -887,13 +887,41 @@ Dragonfly.observeEvents = function ()
d.sidebarSelectChanged.bindAsEventListener (null));
};
Dragonfly.translateElements = function ()
{
// Top bar
Element.setHTML ('admin-text', _('administrationLabel'));
Element.setHTML ('logout-text', _('logoutLabel'));
Element.setHTML ('settings-text', _('preferencesLabel'));
$('bongosearch').value = _('searchButtonLabel');
Element.setHTML ('sidebar-select-search', _('searchButtonLabel'));
// Sidebar
Element.setHTML ('summary-tab-label', _('summaryTabLabel'));
Element.setHTML ('summary-tab-label-alt', _('summaryTabLabel'));
document.getElementById('summary-tab-href').title = _('summaryTabHint');
Element.setHTML ('mail-tab-label', _('mailTabLabel'));
Element.setHTML ('mail-tab-label-alt', _('mailTabLabel'));
document.getElementById('mail-tab-href').title = _('mailTabHint');
Element.setHTML ('compose-tab', _('composeMailLabel'));
Element.setHTML ('calendar-tab-label', _('calendarTabLabel'));
Element.setHTML ('calendar-tab-label-alt', _('calendarTabLabel'));
document.getElementById('calendar-tab-href').title = _('calendarTabHint');
Element.setHTML ('new-event-href', _('composeEventLabel'));
}
Dragonfly.start = function ()
{
var d = Dragonfly;
var p = d.Preferences;
var c = d.Calendar;
d.buildSidebar();
d.translateElements();
d.setLoginMessage ('Logged in: loading contacts and calendars...');
d.setLoginMessage (_('loadingData'));
// set current timezone to default and build timezone selector
d.curTzid = c.Preferences.getDefaultTimezone();
@@ -905,7 +933,7 @@ Dragonfly.start = function ()
return def.addCallbacks (
function (res) {
var loc = new d.Location (location.hash);
d.setLoginMessage ('Logged in: loading ' + d.escapeHTML (loc.tab) + '...');
d.setLoginMessage (_('loadingItemPre') + d.escapeHTML (loc.tab) + _('loadingItemPost'));
return d.go (loc.user == d.userName ? loc : '#').addErrback (
function (err) {
logDebug ('got error on first try:', d.reprError (err), '; trying summary...');
@@ -990,7 +1018,7 @@ Dragonfly.main = function ()
{
Dragonfly.browserDetect();
Dragonfly.initHtmlZones();
Dragonfly.buildSidebar();
//Dragonfly.buildSidebar();
Dragonfly.observeLoginEvents ();
Dragonfly.login();
};
+10 -8
View File
@@ -44,7 +44,7 @@ Dragonfly.login = function (user)
d.authToken = btoa (user + ':');
}
d.setLoginMessage ('Attempting to log in...');
d.setLoginMessage (_('loggingInMessage'));
d.setLoginDisabled (true);
p.load().addCallbacks (
@@ -56,9 +56,9 @@ Dragonfly.login = function (user)
d.setLoginMessage ('&nbsp;');
d.showLoginPane();
} else if (err.req) {
d.setLoginMessage ('Incorrect user or password');
d.setLoginMessage (_('wrongCredentials'));
} else {
d.setLoginMessage ('Error logging in (check Logs)');
d.setLoginMessage (_('genericLoginError'));
logError ('login error: ' + d.reprError (err));
}
d.setLoginDisabled (false);
@@ -90,13 +90,15 @@ Dragonfly.logout = function ()
}
};
Dragonfly.translateLoginPage = function ()
Dragonfly.translateLogin = function ()
{
// Login screen
Element.setHTML ('login-user-label', _('loginNameLabel'));
Element.setHTML ('login-password-label', _('loginPasswordLabel'));
Element.setHTML ('login-language-label', _('loginLanguageLabel'));
Element.setHTML ('login-default-label', _('loginRememberMeLabel'));
$('login-button').value = _('loginLoginLabel');
Dragonfly.logoutMessage = _('loggedOutMessage');
};
Dragonfly.languageChanged = function (evt)
@@ -104,12 +106,12 @@ Dragonfly.languageChanged = function (evt)
var d = Dragonfly;
var g = d.Gettext;
d.setLoginMessage ('Loading language...');
//d.setLoginMessage ('Loading language...');
d.setLoginDisabled (true);
g.setLocale (null, $('login-language').value).addCallbacks (
function (res) {
d.setLoginMessage ('&nbsp;');
d.translateLoginPage ();
//d.setLoginMessage ('&nbsp;');
d.translateLogin ();
d.setLoginDisabled (false);
return res;
},
@@ -154,7 +156,7 @@ Dragonfly.showLoginPane = function ()
addElementClass (document.body, 'login');
if (location.hash == '#LoggedOut') {
Dragonfly.setLoginMessage ('You have successfully logged out');
Dragonfly.setLoginMessage (Dragonfly.logoutMessage);
location.hash = (Dragonfly.isWebkit) ? '' : '#';
$('login-user').focus();
} else {
+1 -1
View File
@@ -117,7 +117,7 @@ Dragonfly.Search.Contacts.connectHtml = function (elem)
Event.observe ('contacts-search-results', 'click',
(function (evt) {
var elem = Event.element (evt);
var card = d.findElement (elem, 'DIV', $('contacts-search'));
var card = d.findElement (elem, 'TABLE', $('contacts-search'));
var bongoId = card && card.getAttribute ('bongoid');
if (!bongoId) {
return;
+10 -7
View File
@@ -40,31 +40,34 @@ Dragonfly.Summary.build = function (loc)
'<tbody> <tr>',
'<td class="summary-column"> ',
'<div id="starred-summary" class="summary-category mail-summary"> ',
'<h3><a href="#', starredUrl, '">Starred Mail</a></h3> ',
'<h3><a href="#', starredUrl, '">', _('starredMailLabel'), '</a></h3> ',
'<ul id="starred-list"></ul>',
'</div> ',
'<div id="tome-summary" class="summary-category mail-summary"> ',
'<h3><a href="#', tomeUrl, '">Mail To Me</a></h3> ',
'<h3><a href="#', tomeUrl, '">', _('mailToMeLabel'), '</a></h3> ',
'<ul id="tome-list"></ul>',
'</div> ',
'<div id="frommycontacts-summary" class="summary-category mail-summary"> ',
'<h3><a href="#', contactsUrl, '">Mail From My Contacts</a></h3> ',
'<h3><a href="#', contactsUrl, '">', _('contactMailLabel'), '</a></h3> ',
'<ul id="frommycontacts-list"></ul>',
'</div> ',
'<div id="subscriptions-summary" class="summary-category mail-summary"> ',
'<h3><a href="#', subsUrl, '">Mail To Mailing lists</a></h3> ',
'<h3><a href="#', subsUrl, '">', _('listMailLabel'), '</a></h3> ',
'<ul id="subscriptions-list"></ul>',
'</div> ',
'<div id="nomail-summary" style="display: none;">You have no new mail.</div>',
'<div id="nomail-summary" style="display: none;"><table style="margin: auto;"><tr>',
'<td><img src="img/big-info.png" style="float: left;" /></td>',
'<td style="vertical-align:middle;">', _('summaryNoMail'), '</td>',
'</tr></table></div>',
'</td> ',
'<td class="summary-column"> ',
'<div id="invites-summary" class="summary-category cal-summary">',
'<h3>Invitations</h3>',
'<h3>', _('invitationsLabel'), '</h3>',
'<div id="summary-cal-invites"></div>',
'<div id="summary-event-invites"></div>',
'</div>',
'<div class="summary-category cal-summary">',
'<h3>Upcoming Events</h3>',
'<h3>', _('upcomingEvents'), '</h3>',
'<div id="summary-cal"></div>',
'</div>',
'</td> ',
+2 -2
View File
@@ -693,9 +693,9 @@ Dragonfly.PopupBuble.prototype.showError = function (err)
this.hide();
var closeId = Dragonfly.nextId ('popup-close');
var html = new Dragonfly.HtmlBuilder (
'<p><strong>An error occurred:</strong><p style="text-align:center;">',
'<p><strong>', _('genericError'), '</strong><p style="text-align:center;">',
err.message, '<div class="actions">',
'<input id="', closeId, '" type="button" value="Bummer"></div>'
'<input id="', closeId, '" type="button" value="', _('genericErrorOK'), '"></div>'
);
html.set (this.contentId);
Event.observe (closeId, 'click', this.disposeAndReload.bindAsEventListener (this));
+7
View File
@@ -1,3 +1,10 @@
###########################
# DO NOT USE ME YET!!!!
###########################
# Here's some invalid syntax to stop you from trying:
Let's just hope this does actually work!
# Login.js
loginNameLabel=Name:
loginPasswordLabel=Password:
+83
View File
@@ -0,0 +1,83 @@
{
"genericError" : "Naay rroreay ashay ccuredoay: ",
"genericErrorOK" : "Ummerbay",
"loginNameLabel" : "Amenay:",
"loginPasswordLabel" : "Asswordpay:",
"loginLanguageLabel" : "Anguagelay:",
"loginRememberMeLabel" : "Ememberray Emay",
"loginLoginLabel" : "Oglay Niay",
"loggedOutMessage" : "Ouyay avehay uccessfullysay oggedlay utoay.",
"loggingInMessage" : "Ogginglay ouyay niay...",
"wrongCredentials" : "Adbay seruay roay asswordpay.",
"genericLoginError" : "Rroreay ogginglay niay (heckcay Ogslay)",
"loadingData" : "Oggedlay niay: oadinglay ontactscay ndaay alendarscay...",
"loadingItemPre" : "Oggedlay niay: oadinglay ",
"loadingItemPost" : "...",
"administrationLabel" : "Dministrationaay",
"logoutLabel" : "Oglay utoay",
"preferencesLabel" : "Referencespay",
"searchButtonLabel" : "Earchsay",
"summaryTabLabel" : "Ummarysay",
"summaryTabHint" : "Ooklay taay naay verviewoay foay ouryay ailmay ndaay ventseay.",
"mailTabLabel" : "Ailmay",
"mailTabHint" : "Eadray ouryay ailmay.",
"calendarTabLabel" : "Alendarcay",
"calendarTabHint" : "Iewvay ouryay alendarcay.",
"composeMailLabel" : "Omposecay Ewnay Ailmay",
"composeEventLabel" : "Reatecay Ewnay Venteay",
"summaryNoMail" : "Uoyay avehay onay ewnay ailmay.",
"upcomingEvents" : "Pcominguay ventseay",
"showToday" : "Howsay Odaytay",
"viewInCal" : "Iewvay niay alendarcay",
"starredMailLabel" : "Tarredsay Ailmay",
"mailToMeLabel" : "Ailmay otay Emay",
"contactMailLabel" : "Ailmay romfay Ymay Ontactscay",
"listMailLabel" : "Ailmay romfay Ailingmay Istslay",
"invitationsLabel" : "Nvitationsiay",
"shareCalendar" : "Haresay histay alendarcay",
"contactAddLabel" : "Ddaay Ontactcay",
"contactShowConversations" : "Howsay Onversationssay",
"contactEditLabel" : "Diteay",
"contactSelf" : "Histey siey Emey",
"contactConfirmRemovePre" : "Reaay ouyay uresay ouyay antway otay eleteday hetay ontactcay ",
"contactConfirmRemovePost" : "? Histay annotcay ebay ndoneuay.",
"contactEmail" : "Maileay",
"contactPhone" : "Honepay",
"contactFax" : "Axfay",
"contactMobile" : "Ellcay",
"contactIM" : "IM",
"contactWebsite" : "Ebsiteway",
"contactCompany" : "Ompanycay",
"contactAddress" : "Ddressaay",
"genericCancel" : "Ancelcay",
"genericSave" : "Avesay",
"genericDelete" : "Eleteday",
"genericChangesSaved" : "Hangescay avedsay.",
"monday" : "Ondaymay",
"monday-s" : "O",
"tuesday" : "Uesdaytay",
"tuesday-s" : "U",
"wednesday" : "Ednesdayway",
"wednesday-s" : "E",
"thursday" : "Hursdaytay",
"thursday-s" : "H",
"friday" : "Ridayfay",
"friday-s" : "R",
"saturday" : "Aturdaysay",
"saturday-s" : "A",
"sunday" : "Undaysay",
"sunday-s" : "U",
"day" : "Ayday",
"upcoming" : "Pcominguay",
"week" : "Eekway",
"month" : "Onthmay"
}