See ChangeLog

Monotone-Parent: aadc4759a64f724760d38bbdfd92715182856439
Monotone-Revision: 5e99e6ac2d5684eba786f2ce14295f3a3b5267a3

Monotone-Author: ludovic@Sophos.ca
Monotone-Date: 2012-06-21T23:32:18
maint-2.0.2
Ludovic Marcotte 2012-06-21 23:32:18 +00:00
parent 86b689d7e8
commit 6d745e0f4b
16 changed files with 45 additions and 19 deletions

View File

@ -1,3 +1,12 @@
2012-06-21 Ludovic Marcotte <lmarcotte@inverse.ca>
* Added the SOGoSearchMinimumWordLength domain
default which controls the minimal length required
before trigging server-side search operations for
attendee completion, contact searches, etc. The
default value is 2, which means search operations
are trigged once the 3rd character is typed.
2012-06-20 Ludovic Marcotte <lmarcotte@inverse.ca>
* SoObjects/Appointments/SOGoAppointmentObject.m

View File

@ -70,4 +70,6 @@
SOGoReminderEnabled = YES;
SOGoRemindWithASound = YES;
SOGoSearchMinimumWordLength = 2;
}

View File

@ -77,6 +77,8 @@
- (BOOL) hideSystemEMail;
- (int) searchMinimumWordLength;
@end
#endif /* SOGODOMAINDEFAULTS_H */

View File

@ -319,4 +319,9 @@
return [self boolForKey: @"SOGoHideSystemEMail"];
}
- (int) searchMinimumWordLength
{
return [self integerForKey: @"SOGoSearchMinimumWordLength"];
}
@end

View File

@ -1,15 +1,16 @@
/*
Copyright (C) 2004-2005 SKYRIX Software AG
Copyright (C) 2005-2012 Inverse inc.
This file is part of OpenGroupware.org.
This file is part of SOGo.
OGo is free software; you can redistribute it and/or modify it under
SOGo is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the
Free Software Foundation; either version 2, or (at your option) any
later version.
OGo is distributed in the hope that it will be useful, but WITHOUT ANY
SOGo is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
License for more details.
@ -590,4 +591,9 @@
);
}
- (int) minimumSearchLength
{
return [[[context activeUser] domainDefaults] searchMinimumWordLength];
}
@end /* UIxPageFrame */

View File

@ -1,14 +1,15 @@
/*
Copyright (C) 2000-2005 SKYRIX Software AG
Copyright (C) 2000-2012 Inverse inc.
This file is part of OpenGroupware.org.
This file is part of SOGo.
OGo is free software; you can redistribute it and/or modify it under
SOGo is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the
Free Software Foundation; either version 2, or (at your option) any
later version.
OGo is distributed in the hope that it will be useful, but WITHOUT ANY
SOGo is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
License for more details.

View File

@ -1,6 +1,6 @@
/* UIxContactsUserFolders.m - this file is part of SOGo
*
* Copyright (C) 2007-2010 Inverse inc.
* Copyright (C) 2007-2012 Inverse inc.
*
* Author: Wolfgang Sourdeau <wsourdeau@inverse.ca>
*

View File

@ -1,6 +1,6 @@
/* UIxListEditor.m - this file is part of SOGo
*
* Copyright (C) 2008-2011 Inverse inc.
* Copyright (C) 2008-2012 Inverse inc.
*
* Author: Wolfgang Sourdeau <wsourdeau@inverse.ca>
* Francis Lachapelle <flachapelle@inverse.ca>

View File

@ -1,6 +1,6 @@
/* UIxAttendeesEditor.h - this file is part of SOGo
*
* Copyright (C) 2007 Inverse inc.
* Copyright (C) 2007-2012 Inverse inc.
*
* Author: Wolfgang Sourdeau <wsourdeau@inverse.ca>
*
@ -28,7 +28,6 @@
@interface UIxAttendeesEditor : UIxComponent
{
NSString *item;
// NSString *zoom;
}
- (void) setItem: (NSString *) newItem;

View File

@ -1,6 +1,6 @@
/* UIxAttendeesEditor.m - this file is part of SOGo
*
* Copyright (C) 2007 Inverse inc.
* Copyright (C) 2007-2012 Inverse inc.
*
* Author: Wolfgang Sourdeau <wsourdeau@inverse.ca>
*

View File

@ -130,6 +130,7 @@
<script type="text/javascript">
var ApplicationBaseURL = '<var:string value="modulePath"/>';
var ResourcesURL = '<var:string value="applicationPath"/>.woa/WebServerResources';
var minimumSearchLength = <var:string value="minimumSearchLength"/>;
<var:if condition="isSuperUser"
>var IsSuperUser = true;
</var:if>

View File

@ -125,7 +125,7 @@ var SOGoAutoCompletionInterface = {
document.contactLookupAjaxRequest.aborted = true;
document.contactLookupAjaxRequest.abort();
}
if (input.value.trim().length > 2) {
if (input.value.trim().length > minimumSearchLength) {
var urlstr = UserFolderURL + "Contacts/";
if (input.addressBook)
urlstr += input.addressBook + "/contact";

View File

@ -177,7 +177,7 @@ function onContactKeydown(event) {
function performSearch(input) {
// Perform address completion
if (!input.value.blank()) {
if (input.value.trim().length > minimumSearchLength) {
var urlstr = (UserFolderURL
+ "Contacts/allContactSearch?excludeGroups=1&search="
+ encodeURIComponent(input.value));

View File

@ -1,8 +1,6 @@
var d;
function onSearchFormSubmit() {
startAnimation($("pageContent"), $("filterPanel"));
var searchValue = $("searchValue");
var encodedValue = encodeURI(searchValue.value);
@ -16,8 +14,11 @@ function onSearchFormSubmit() {
document.userFoldersRequest.aborted = true;
document.userFoldersRequest.abort();
}
document.userFoldersRequest
= triggerAjaxRequest(url, usersSearchCallback);
if (encodedValue.trim().length > minimumSearchLength) {
startAnimation($("pageContent"), $("filterPanel"));
document.userFoldersRequest
= triggerAjaxRequest(url, usersSearchCallback);
}
}
return false;

View File

@ -1,7 +1,7 @@
/* generic.js - this file is part of SOGo
Copyright (C) 2005 SKYRIX Software AG
Copyright (C) 2006-2011 Inverse
Copyright (C) 2006-2012 Inverse
SOGo is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the
@ -1143,7 +1143,7 @@ function onSearchFormSubmit(event) {
if (searchValue.value != searchValue.ghostPhrase
&& (searchValue.value != searchValue.lastSearch
|| searchValue.value.strip().length > 0)) {
&& searchValue.value.strip().length > minimumSearchLength)) {
search["criteria"] = searchCriteria.value;
search["value"] = searchValue.value;
searchValue.lastSearch = searchValue.value;