Merge branch 'SOGo-5.8' into fix-5768

This commit is contained in:
smizrahi
2023-05-23 15:54:54 +02:00
20 changed files with 104 additions and 33 deletions
+6 -1
View File
@@ -1145,9 +1145,14 @@ andAttribute: (EOAttribute *)_attribute
{
// Update c_startdate for appointments
if ([theComponent respondsToSelector:@selector(startDate)]) {
NSTimeInterval t = [startDate timeIntervalSince1970];
startDate = [theComponent startDate];
if (startDate) {
[quickRow setObject:[NSNumber numberWithUnsignedInt:[startDate timeIntervalSince1970]] forKey:@"c_startdate"];
if (t < (long long)INT_MAX && t > (long long)INT_MIN)
[quickRow setObject:[NSNumber numberWithInt: t] forKey:@"c_startdate"];
else
[quickRow setObject:[NSNumber numberWithInt: 0] forKey:@"c_startdate"];
}
}
+19 -1
View File
@@ -1575,7 +1575,8 @@ firstInstanceCalendarDateRange: (NGCalendarDateRange *) fir
{
if ([filters isEqualToString:@"title_Category_Location"] || [filters isEqualToString:@"entireContent"])
{
[baseWhere addObject: [NSString stringWithFormat: @"(c_title isCaseInsensitiveLike: '*%@*' OR c_category isCaseInsensitiveLike: '*%@*' OR c_location isCaseInsensitiveLike: '*%@*')",
[baseWhere addObject: [NSString stringWithFormat: @"(c_title isCaseInsensitiveLike: '*%@*' OR c_category isCaseInsensitiveLike: '*%@*' OR c_location isCaseInsensitiveLike: '*%@*' OR c_content isCaseInsensitiveLike: '*SUMMARY:*%@*')",
[title asSafeSQLLikeString],
[title asSafeSQLLikeString],
[title asSafeSQLLikeString],
[title asSafeSQLLikeString]]];
@@ -1698,6 +1699,23 @@ firstInstanceCalendarDateRange: (NGCalendarDateRange *) fir
else
ma = [NSMutableArray array];
if (title && [title length] > 0) {
// Case when multiple summary are set in c_content
// Need to filter on title
int i;
NSDictionary *currentItem;
for (i = [ma count] - 1; i >= 0; i--) {
currentItem = [ma objectAtIndex: i];
if (currentItem && [currentItem objectForKey: @"c_title"]
&& [[currentItem objectForKey: @"c_title"] length] > 0) {
if ([[currentItem objectForKey: @"c_title"] rangeOfString: title options: NSCaseInsensitiveSearch].location == NSNotFound) {
[ma removeObjectAtIndex: i];
}
}
}
}
return ma;
}
+12 -6
View File
@@ -33,6 +33,8 @@ static const NSString *POLICY_MIN_DIGIT = @"POLICY_MIN_DIGIT";
static const NSString *POLICY_MIN_SPECIAL_SYMBOLS = @"POLICY_MIN_SPECIAL_SYMBOLS";
static const NSString *POLICY_MIN_LENGTH = @"POLICY_MIN_LENGTH";
static const NSString *SPECIAL_SYMBOL_ALLOWED = @"%$&*(){}!?\\@#.,:;+=";
@implementation SOGoPasswordPolicy
- (id) init
@@ -58,7 +60,7 @@ static const NSString *POLICY_MIN_LENGTH = @"POLICY_MIN_LENGTH";
return [NSArray arrayWithObjects: [NSString stringWithFormat:@"(.*[a-z].*){%i}", [count intValue]],
[NSString stringWithFormat:@"(.*[A-Z].*){%i}", [count intValue]],
[NSString stringWithFormat:@"(.*[0-9].*){%i}", [count intValue]],
[NSString stringWithFormat:@"([%%$&*(){}!?\\@#.,:;+=].*){%i,}", [count intValue]],
[NSString stringWithFormat:@"([%@].*){%i,}", SPECIAL_SYMBOL_ALLOWED, [count intValue]],
[NSString stringWithFormat:@".{%i,}", [count intValue]],
nil];
}
@@ -98,12 +100,16 @@ static const NSString *POLICY_MIN_LENGTH = @"POLICY_MIN_LENGTH";
NSNumber *value = [policy objectForKey:@"value"];
if (0 < value) {
NSString *newLabel = [[translations objectForKey: label]
stringByReplacingOccurrencesOfString: @"%{0}"
withString: [value stringValue]];
stringByReplacingOccurrencesOfString: @"%{0}"
withString: [value stringValue]];
if ([POLICY_MIN_SPECIAL_SYMBOLS isEqualToString: label]) {
newLabel = [[newLabel stringByAppendingString: @" "]
stringByAppendingString: SPECIAL_SYMBOL_ALLOWED];
}
[userTranslatedPasswordPolicy addObject:[NSDictionary dictionaryWithObjectsAndKeys:
newLabel, @"label",
[policy objectForKey:@"regex"], @"regex",
nil]];
newLabel, @"label",
[policy objectForKey:@"regex"], @"regex",
nil]];
} else {
// Do nothing
}
@@ -260,7 +260,7 @@
"POLICY_MIN_LOWERCASE_LETTER" = "Minimum of %{0} lowercase letter";
"POLICY_MIN_UPPERCASE_LETTER" = "Minimum of %{0} uppercase letter";
"POLICY_MIN_DIGIT" = "Minimum of %{0} digit";
"POLICY_MIN_SPECIAL_SYMBOLS" = "Minimum of %{0}special symbols";
"POLICY_MIN_SPECIAL_SYMBOLS" = "Minimum of %{0} special symbols";
"POLICY_MIN_LENGTH" = "Minimum length of %{0} characters";
@@ -565,6 +565,7 @@ vtodo_class2 = "(Confidential task)";
"CalDAV URL" = "CalDAV URL ";
"WebDAV ICS URL" = "WebDAV ICS URL";
"WebDAV XML URL" = "WebDAV XML URL";
"Copy to clipboard" = "Copy to clipboard";
/* Error messages */
"dayFieldInvalid" = "Please specify a numerical value in the Days field greater or equal to 1.";
@@ -565,6 +565,7 @@ vtodo_class2 = "(Tâche confidentielle)";
"CalDAV URL" = "Accès en CalDAV ";
"WebDAV ICS URL" = "Représentation ICS en WebDAV";
"WebDAV XML URL" = "Représentation XML en WebDAV";
"Copy to clipboard" = "Copier dans le presse-papier";
/* Error messages */
"dayFieldInvalid" = "Veuillez spécifier un chiffre supérieur ou égal à 1 dans le champ Jours.";
+1 -2
View File
@@ -219,8 +219,7 @@
</label>
<input type="text" name="subject"
ng-model="editor.message.editable.subject"
ng-keydown="editor.ignoreReturn($event)"
ng-required="true"/>
ng-keydown="editor.ignoreReturn($event)" />
<div ng-messages="messageForm.subject.$error">
<div ng-message="required"><var:string label:value="Please specify a subject."/></div>
</div>
@@ -35,34 +35,58 @@
<div layout="column" ng-hide="::links.calendar.isWebCalendar">
<div class="sg-md-title"><var:string label:value="Authenticated User Access"/></div>
<md-input-container class="md-block">
<md-input-container class="md-input-clipboard">
<label><var:string label:value="CalDAV URL"/></label>
<input type="text" ng-model="::links.calendar.urls.calDavURL" ng-readonly="true"/>
<input id="user-caldav-url" type="text" ng-model="::links.calendar.urls.calDavURL" ng-readonly="true"/>
<md-button aria-label="Copy to clipboard" class="md-icon-button" ng-click="links.clipboard('user-caldav-url')">
<md-tooltip><var:string label:value="Copy to clipboard"/></md-tooltip>
<md-icon label:aria-label="Copy Icon">content_copy</md-icon>
</md-button>
</md-input-container>
<md-input-container class="md-block">
<md-input-container class="md-input-clipboard">
<label><var:string label:value="WebDAV ICS URL"/></label>
<input type="text" ng-model="::links.calendar.urls.webDavICSURL" ng-readonly="true"/>
<input id="user-webdav-ics-url" type="text" ng-model="::links.calendar.urls.webDavICSURL" ng-readonly="true"/>
<md-button aria-label="Copy to clipboard" class="md-icon-button" ng-click="links.clipboard('user-webdav-ics-url')">
<md-tooltip><var:string label:value="Copy to clipboard"/></md-tooltip>
<md-icon label:aria-label="Content_copy">content_copy</md-icon>
</md-button>
</md-input-container>
<md-input-container class="md-block">
<md-input-container class="md-input-clipboard">
<label><var:string label:value="WebDAV XML URL"/></label>
<input type="text" ng-model="::links.calendar.urls.webDavXMLURL" ng-readonly="true"/>
<input id="user-webdav-xml-url" type="text" ng-model="::links.calendar.urls.webDavXMLURL" ng-readonly="true"/>
<md-button aria-label="Copy to clipboard" class="md-icon-button" ng-click="links.clipboard('user-webdav-xml-url')">
<md-tooltip><var:string label:value="Copy to clipboard"/></md-tooltip>
<md-icon label:aria-label="Content_copy">content_copy</md-icon>
</md-button>
</md-input-container>
</div>
<var:if condition="isPublicAccessEnabled">
<div layout="column" ng-hide="::links.calendar.isWebCalendar">
<div class="sg-md-title"><var:string label:value="Public Access"/></div>
<md-input-container class="md-block">
<md-input-container class="md-input-clipboard">
<label><var:string label:value="CalDAV URL"/></label>
<input type="text" ng-model="::links.calendar.urls.publicCalDavURL" ng-readonly="true"/>
<input id="public-caldav-url" type="text" ng-model="::links.calendar.urls.publicCalDavURL" ng-readonly="true"/>
<md-button aria-label="Copy to clipboard" class="md-icon-button" ng-click="links.clipboard('public-caldav-url')">
<md-tooltip><var:string label:value="Copy to clipboard"/></md-tooltip>
<md-icon label:aria-label="Content_copy">content_copy</md-icon>
</md-button>
</md-input-container>
<md-input-container class="md-block">
<md-input-container class="md-input-clipboard">
<label><var:string label:value="WebDAV ICS URL"/></label>
<input type="text" ng-model="::links.calendar.urls.publicWebDavICSURL" ng-readonly="true"/>
<input id="public-webdav-ics-url" type="text" ng-model="::links.calendar.urls.publicWebDavICSURL" ng-readonly="true"/>
<md-button aria-label="Copy to clipboard" class="md-icon-button" ng-click="links.clipboard('public-webdav-ics-url')">
<md-tooltip><var:string label:value="Copy to clipboard"/></md-tooltip>
<md-icon label:aria-label="Content_copy">content_copy</md-icon>
</md-button>
</md-input-container>
<md-input-container class="md-block">
<md-input-container class="md-input-clipboard">
<label><var:string label:value="WebDAV XML URL"/></label>
<input type="text" ng-model="::links.calendar.urls.publicWebDavXMLURL" ng-readonly="true"/>
<input id="public-webdav-xml-url" type="text" ng-model="::links.calendar.urls.publicWebDavXMLURL" ng-readonly="true"/>
<md-button aria-label="Copy to clipboard" class="md-icon-button" ng-click="links.clipboard('public-webdav-xml-url')">
<md-tooltip><var:string label:value="Copy to clipboard"/></md-tooltip>
<md-icon label:aria-label="Content_copy">content_copy</md-icon>
</md-button>
</md-input-container>
</div>
</var:if>
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -414,7 +414,8 @@
recipients.push(card.$shortFormat());
}
}
else if (selectedFolder.$loadCard(card)) {
else {
selectedFolder.$loadCard(card);
promises.push(selectedFolder.$futureHeadersData.then(function() {
var i = selectedFolder.idsMap[card.id];
if (angular.isDefined(i)) {
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -12,10 +12,10 @@
this.$onInit = function() {
$scope.isPopup = stateParent.isPopup;
this.account = stateAccount;
this.autocomplete = {to: {}, cc: {}, bcc: {}};
this.autosave = null;
this.isFullscreen = false;
this.hideBcc = (stateMessage.editable.bcc.length === 0);
this.hideCc = (stateMessage.editable.cc.length === 0);
@@ -218,6 +218,12 @@
$event.preventDefault();
return false;
}
if ($event.keyCode == 186 && $event.key == 'ü') { //Key code for separator ';' but is keycode for ü in german keyboard
$event.stopPropagation();
$event.preventDefault();
let element = $window.document.getElementById($event.target.id);
element.value = element.value + 'ü'
}
};
this.save = function (options) {
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -293,10 +293,16 @@
var vm = this;
vm.calendar = calendar;
vm.close = close;
vm.clipboard = clipboard
function close() {
$mdDialog.hide();
}
function clipboard(elem_id) {
var linkUrl = document.getElementById(elem_id);
navigator.clipboard.writeText(linkUrl.value);
}
}
};
@@ -12,6 +12,10 @@ md-input-container {
&.md-no-flex {
flex: none !important;
}
&.md-input-clipboard {
display: flex;
flex-direction: row-reverse;
}
.md-errors-spacer {
// Temporary fix for https://github.com/angular/material/issues/6214
min-height: 0 !important;