diff --git a/src/www/Bongo.rules b/src/www/Bongo.rules index d440200..c7c6401 100644 --- a/src/www/Bongo.rules +++ b/src/www/Bongo.rules @@ -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 \ diff --git a/src/www/css/admin.css b/src/www/css/admin.css index 19f4bce..65970fc 100644 --- a/src/www/css/admin.css +++ b/src/www/css/admin.css @@ -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'); } diff --git a/src/www/css/layout.css b/src/www/css/layout.css index 2ea9a68..e0dda94 100644 --- a/src/www/css/layout.css +++ b/src/www/css/layout.css @@ -1208,3 +1208,9 @@ pre { { padding-top: 25%; } + +#nomail-summary +{ + padding-top: 50%; + text-align: center; +} diff --git a/src/www/dragonfly.html b/src/www/dragonfly.html index 481e630..206bcc5 100644 --- a/src/www/dragonfly.html +++ b/src/www/dragonfly.html @@ -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); - - + +


'); - html.push ('Add Contact'); + html.push ('', _('contactAddLabel'), ''); 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 ('
'); + '', _('genericDelete'), '', + '', _('contactShowConversations'), '', + '', _('contactEditLabel'), 'Are you sure you want to delete the contact “', - Dragonfly.escapeHTML (this.contact.fn), '”? This cannot be undone.' + '
', _('contactConfirmRemovePre'), '“', + Dragonfly.escapeHTML (this.contact.fn), '”', _('contactConfirmRemovePost'), '
' ]; - 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(); }; diff --git a/src/www/js/BongoCalendar.js b/src/www/js/BongoCalendar.js index 6742239..f41960f 100644 --- a/src/www/js/BongoCalendar.js +++ b/src/www/js/BongoCalendar.js @@ -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... diff --git a/src/www/js/Calendar.js b/src/www/js/Calendar.js index 06edadd..c80e191 100644 --- a/src/www/js/Calendar.js +++ b/src/www/js/Calendar.js @@ -343,13 +343,13 @@ Dragonfly.Calendar.Events.build = function (loc) Element.setHTML ( 'toolbar', [ '', - 'Day', + '', _('day'), '', '', - 'Upcoming', + '', _('upcoming'), '', '', - 'Week', + '', _('week'), '', '', - 'Month' + '', _('month'), '' ]); Element.show ('toolbar'); } else { diff --git a/src/www/js/CalendarEditor.js b/src/www/js/CalendarEditor.js index 3330f7e..fbbe959 100644 --- a/src/www/js/CalendarEditor.js +++ b/src/www/js/CalendarEditor.js @@ -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, ''); @@ -910,9 +910,9 @@ Dragonfly.Calendar.CalendarPropsPopup.prototype.edit = function () this.saveId = d.nextId ('calendar-save'); html.push (' Prev | ',
+ ' ', _('genericPreviousShort'), ' | ',
'', d.escapeHTML (title), ' | ',
- 'Next![]() | ',
+ '', _('genericNext'), '![]() | ',
'
Prev';
+ var prev = '
' + _('genericPreviousShort') + '';
tmpLoc.day = reldays.next;
- var next = 'Next
';
+ var next = '' + _('genericNext') + '
';
var html = new d.HtmlBuilder ('| ', this.day.format ('y'), ' | ', '→ | ', '|||||
|---|---|---|---|---|---|---|
| S | M | T | W | T | F | S |
| ', _('sunday-s'), + ' | ', _('monday-s'), + ' | ', _('tuesday-s'), + ' | ', _('wednesday-s'), + ' | ', _('thursday-s'), + ' | ', _('friday-s'), + ' | ', _('saturday-s'), + ' |
', - 'view in calendar' + '', _('viewInCal'), '' ); w.popup.showBelow (); d.requestJSON ('GET', loc).addCallback (function (jsob) { calwidget.layout (jsob); }); diff --git a/src/www/js/Dragonfly.js b/src/www/js/Dragonfly.js index 2cab1e1..8efc2ca 100644 --- a/src/www/js/Dragonfly.js +++ b/src/www/js/Dragonfly.js @@ -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(); }; diff --git a/src/www/js/Login.js b/src/www/js/Login.js index 5b736b6..bbcbbb2 100644 --- a/src/www/js/Login.js +++ b/src/www/js/Login.js @@ -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 (' '); 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 (' '); - d.translateLoginPage (); + //d.setLoginMessage (' '); + 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 { diff --git a/src/www/js/Search.js b/src/www/js/Search.js index 8340be4..738a43c 100644 --- a/src/www/js/Search.js +++ b/src/www/js/Search.js @@ -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; diff --git a/src/www/js/Summary.js b/src/www/js/Summary.js index 9cfc5b0..b7a7f91 100644 --- a/src/www/js/Summary.js +++ b/src/www/js/Summary.js @@ -40,31 +40,34 @@ Dragonfly.Summary.build = function (loc) '
An error occurred:
', + '
', _('genericError'), '
', err.message, '