From 2e66b6a8e611551454fdbf5d73e662fc41eb8d93 Mon Sep 17 00:00:00 2001 From: Francis Lachapelle Date: Wed, 8 Feb 2012 15:41:57 +0000 Subject: [PATCH 1/3] See ChangeLog. Monotone-Parent: 68e5a2b8ae68f37745584028ad7764b76dcc5794 Monotone-Revision: ae0ad3228ddb04bfb233821d8ded09a5b5866c93 Monotone-Author: flachapelle@inverse.ca Monotone-Date: 2012-02-08T15:41:57 --- ChangeLog | 7 +++++++ UI/WebServerResources/ContactsUI.js | 8 ++++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2b0283935..d8698c482 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2012-02-14 Francis Lachapelle + + * UI/WebServerResources/ContactsUI.js (contactsListCallback): when + restoring selection after the folder refresh, call "selectElement" + on each row. This fixes the contacts selection retrieval when using the + contextual menu. + 2012-02-14 Wolfgang Sourdeau * SoObjects/SOGo/SOGoSQLUserProfile.m (_sqlJsonRepresentation:): diff --git a/UI/WebServerResources/ContactsUI.js b/UI/WebServerResources/ContactsUI.js index b5b8faed6..b810565d9 100644 --- a/UI/WebServerResources/ContactsUI.js +++ b/UI/WebServerResources/ContactsUI.js @@ -115,7 +115,6 @@ function contactsListCallback(http) { { categories: contact["c_categories"], contactname: contact["c_cn"] }, tbody); - var cell = createElement("td", null, ( "displayName" ), @@ -197,6 +196,7 @@ function contactsListCallback(http) { var rowPosition = row.rowIndex * row.getHeight(); if (div.getHeight() < rowPosition) div.scrollTop = rowPosition; // scroll to selected contact + row.selectElement(); break; } } @@ -310,9 +310,9 @@ function onMenuExportContact (event) { var selectedFolders = $("contactFolders").getSelectedNodes(); var selectedFolderId = $(selectedFolders[0]).readAttribute("id"); if (selectedFolderId != "/shared") { - var contactIds = $(document.menuTarget).collect(function(row) { - return row.getAttribute("id"); - }); + var contactIds = document.menuTarget.collect(function(row) { + return row.readAttribute("id"); + }); var url = ApplicationBaseURL + selectedFolderId + "/export" + "?uid=" + contactIds.join("&uid="); window.location.href = url; From 3da73073e858ac542a762f26c0194c1626e8fca8 Mon Sep 17 00:00:00 2001 From: Francis Lachapelle Date: Wed, 8 Feb 2012 15:51:24 +0000 Subject: [PATCH 2/3] Updated NEWS file. Monotone-Parent: ae0ad3228ddb04bfb233821d8ded09a5b5866c93 Monotone-Revision: bdd1da1e1be522e483da3257b19a669856f518d6 Monotone-Author: flachapelle@inverse.ca Monotone-Date: 2012-02-08T15:51:24 --- NEWS | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/NEWS b/NEWS index 42055f741..f4da8d0c6 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,20 @@ +1.3.12b (2012-02-14) +------------------- + +Bug Fixes + - we now properly escape strings via the database adapator methods when + saving users settings + - fixed a crash when exporting a vCard without specifying a UID + - fixed the contextual menu on newly created contacts and lists + +1.3.12a (2012-02-13) +------------------- + +Bug Fixes + - the plus sign (+) is now properly escaped in JavaScript (fixes issue when + loading the mailboxes list) + - added missing migration script in Debian/Ubuntu packages + 1.3.12 (2012-02-13) ------------------- New Features From da111aa6cc902c98545021250d0c359dbf5899bb Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Tue, 14 Feb 2012 21:23:31 +0000 Subject: [PATCH 3/3] Monotone-Parent: bdd1da1e1be522e483da3257b19a669856f518d6 Monotone-Revision: c5233a2a4e6a6abdb50191daf1eb589c9ff5cf80 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2012-02-14T21:23:31 --- ChangeLog | 8 ++++++++ SoObjects/SOGo/SOGoUserManager.m | 5 ++++- SoObjects/SOGo/SQLSource.m | 9 ++++++++- 3 files changed, 20 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index d8698c482..63dbacc06 100644 --- a/ChangeLog +++ b/ChangeLog @@ -7,6 +7,14 @@ 2012-02-14 Wolfgang Sourdeau + * SoObjects/SOGo/SOGoUserManager.m (_compactAndCompleteContacts:): + we make sure that "source" is not nil before assigning it to the + compact record. + + * SoObjects/SOGo/SQLSource.m (_lookupContactEntry:considerEmail:): + assign self as value for "source" in the returned record. + (-fetchContactsMatching): same as above. + * SoObjects/SOGo/SOGoSQLUserProfile.m (_sqlJsonRepresentation:): removed obsolete method. (-storeJSONProfileInDB:): we now properly escape the stored value diff --git a/SoObjects/SOGo/SOGoUserManager.m b/SoObjects/SOGo/SOGoUserManager.m index 91915716a..456ed2893 100644 --- a/SoObjects/SOGo/SOGoUserManager.m +++ b/SoObjects/SOGo/SOGoUserManager.m @@ -817,6 +817,7 @@ NSMutableArray *emails; NSString *uid, *email, *info; NSNumber *isGroup; + id source; compactContacts = [NSMutableDictionary dictionary]; while ((userEntry = [contacts nextObject])) @@ -829,7 +830,9 @@ { returnContact = [NSMutableDictionary dictionary]; [returnContact setObject: uid forKey: @"c_uid"]; - [returnContact setObject: [userEntry objectForKey: @"source"] forKey: @"source"]; + source = [userEntry objectForKey: @"source"]; + if (source) + [returnContact setObject: source forKey: @"source"]; [compactContacts setObject: returnContact forKey: uid]; } if (![[returnContact objectForKey: @"c_name"] length]) diff --git a/SoObjects/SOGo/SQLSource.m b/SoObjects/SOGo/SQLSource.m index 84777c8ab..6348d9654 100644 --- a/SoObjects/SOGo/SQLSource.m +++ b/SoObjects/SOGo/SQLSource.m @@ -560,6 +560,8 @@ forKey: @"numberOfSimultaneousBookings"]; } } + + [response setObject: self forKey: @"source"]; } else [self errorWithFormat: @"could not run SQL '%@': %@", sql, ex]; @@ -666,7 +668,12 @@ attrs = [channel describeResults: NO]; while ((row = [channel fetchAttributes: attrs withZone: NULL])) - [results addObject: row]; + { + row = [row mutableCopy]; + [(NSMutableDictionary *) row setObject: self forKey: @"source"]; + [results addObject: row]; + [row release]; + } } else [self errorWithFormat: @"could not run SQL '%@': %@", sql, ex];