From 6069996d9c6739e017307d8399b6a77c1d204e02 Mon Sep 17 00:00:00 2001 From: Ludovic Marcotte Date: Mon, 5 Apr 2010 19:38:43 +0000 Subject: [PATCH] See ChangeLog Monotone-Parent: 1d50284cefca6f8926df742321e4f938e6a5b91f Monotone-Revision: bf61903ccf7c6cc0d2ac1b5e7741da7a1e6dd891 Monotone-Author: ludovic@Sophos.ca Monotone-Date: 2010-04-05T19:38:43 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 10 ++++++++++ UI/Contacts/UIxContactEditor.m | 12 ++++++++++++ UI/WebServerResources/SOGoRootPage.js | 8 ++++---- 3 files changed, 26 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4ac16041c..818bea60a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2010-04-05 Ludovic Marcotte + + * UI/WebServerResources/SOGoRootPage.js + We now correctly use our rounded value for the + expire value when using ppolicy. + + * UI/Contacts/UIxContactEditor.m + We now use URL: in cards w/o a home/work preferred + value as a home URL. + 2010-04-02 Francis Lachapelle * SoObjects/Appointments/SOGoCalendarComponent.m diff --git a/UI/Contacts/UIxContactEditor.m b/UI/Contacts/UIxContactEditor.m index 471332431..f272ba7c8 100644 --- a/UI/Contacts/UIxContactEditor.m +++ b/UI/Contacts/UIxContactEditor.m @@ -439,6 +439,18 @@ to: [self _simpleValueForType: @"work" inArray: elements]]; [self _setSnapshotValue: @"homeURL" to: [self _simpleValueForType: @"home" inArray: elements]]; + + // If we don't have a "work" or "home" URL but we still have + // an URL field present, let's add it to the "home" value + if ([[snapshot objectForKey: @"workURL"] length] == 0 && + [[snapshot objectForKey: @"homeURL"] length] == 0 && + [elements count] > 0) + { + [self _setSnapshotValue: @"homeURL" + to: [[elements objectAtIndex: 0] value: 0]]; + } + + [self _setSnapshotValue: @"calFBURL" to: [[card uniqueChildWithTag: @"FBURL"] value: 0]]; diff --git a/UI/WebServerResources/SOGoRootPage.js b/UI/WebServerResources/SOGoRootPage.js index 8958d2a4c..fa65003f6 100644 --- a/UI/WebServerResources/SOGoRootPage.js +++ b/UI/WebServerResources/SOGoRootPage.js @@ -302,15 +302,15 @@ function createPasswordExpirationDialog(expire) { var value, string; if (expire > 86400) { - value = expire/86400; + value = Math.round(expire/86400); string = _("days"); } else if (expire > 3600) { - value = expire/3600; + value = Math.round(expire/3600); string = _("hours"); } else if (expire > 60) { - value = expire/60; + value = Math.round(expire/60); string = _("minutes"); } else { @@ -319,7 +319,7 @@ function createPasswordExpirationDialog(expire) { } return createDialog("passwordExpirationDialog", _("Password about to expire"), - _("Your password is going to expire in %{0} %{1}.").formatted(expire, string), + _("Your password is going to expire in %{0} %{1}.").formatted(value, string), button, "right"); }