mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-10-26 04:38:53 +00:00
Merge branch 'master' into fix-some-warnings
Conflicts: SoObjects/Appointments/SOGoAppointmentObject.m
This commit is contained in:
commit
a5cc2bb5d5
66 files changed
+676
-343
No files matched your search
@@ -40,6 +40,11 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#include "NSDate+ActiveSync.h"
|
||||
#include "NSString+ActiveSync.h"
|
||||
|
||||
#import <NGObjWeb/WOContext+SoObjects.h>
|
||||
|
||||
#import <SOGo/SOGoUser.h>
|
||||
#import <SOGo/SOGoUserDefaults.h>
|
||||
|
||||
@implementation NGVCard (ActiveSync)
|
||||
|
||||
//
|
||||
@@ -227,7 +232,16 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
// Other, less important fields
|
||||
if ((o = [self birthday]))
|
||||
[s appendFormat: @"<Birthday xmlns=\"Contacts:\">%@</Birthday>", [o activeSyncRepresentationInContext: context]];
|
||||
{
|
||||
NSTimeZone *userTimeZone;
|
||||
userTimeZone = [[[context activeUser] userDefaults] timeZone];
|
||||
|
||||
[s appendFormat: @"<Birthday xmlns=\"Contacts:\">%@</Birthday>",
|
||||
[[o dateByAddingYears: 0 months: 0 days: 0
|
||||
hours: 0 minutes: 0
|
||||
seconds: ([userTimeZone secondsFromGMTForDate: o])*-1]
|
||||
activeSyncRepresentationInContext: context]];
|
||||
}
|
||||
|
||||
if ((o = [self note]))
|
||||
{
|
||||
|
||||
@@ -1081,17 +1081,18 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
SOGoMailAccounts *accountsFolder;
|
||||
SOGoUserFolder *userFolder;
|
||||
SOGoMailObject *mailObject;
|
||||
NSMutableArray *a;
|
||||
NSArray *partKeys;
|
||||
int p;
|
||||
|
||||
NSRange r1, r2;
|
||||
|
||||
r1 = [realCollectionId rangeOfString: @"/"];
|
||||
r2 = [realCollectionId rangeOfString: @"/" options: 0 range: NSMakeRange(NSMaxRange(r1)+1, [realCollectionId length]-NSMaxRange(r1)-1)];
|
||||
|
||||
folderName = [realCollectionId substringToIndex: r1.location];
|
||||
messageName = [realCollectionId substringWithRange: NSMakeRange(NSMaxRange(r1), r2.location-r1.location-1)];
|
||||
pathToPart = [realCollectionId substringFromIndex: r2.location+1];
|
||||
a = [[realCollectionId componentsSeparatedByString: @"/"] mutableCopy];
|
||||
[a autorelease];
|
||||
pathToPart = [a lastObject];
|
||||
[a removeLastObject];
|
||||
messageName = [a lastObject];
|
||||
[a removeLastObject];
|
||||
folderName = [a componentsJoinedByString: @"/"];
|
||||
|
||||
userFolder = [[context activeUser] homeFolderInContext: context];
|
||||
accountsFolder = [userFolder lookupName: @"Mail" inContext: context acquire: NO];
|
||||
@@ -1288,20 +1289,21 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
SOGoMailAccounts *accountsFolder;
|
||||
SOGoUserFolder *userFolder;
|
||||
SOGoMailObject *mailObject;
|
||||
NSMutableArray *a;
|
||||
|
||||
if ([fileReference length])
|
||||
{
|
||||
// fetch attachment
|
||||
NSRange r1, r2;
|
||||
NSArray *partKeys;
|
||||
int p;
|
||||
|
||||
r1 = [realCollectionId rangeOfString: @"/"];
|
||||
r2 = [realCollectionId rangeOfString: @"/" options: 0 range: NSMakeRange(NSMaxRange(r1)+1, [realCollectionId length]-NSMaxRange(r1)-1)];
|
||||
|
||||
folderName = [realCollectionId substringToIndex: r1.location];
|
||||
messageName = [realCollectionId substringWithRange: NSMakeRange(NSMaxRange(r1), r2.location-r1.location-1)];
|
||||
pathToPart = [realCollectionId substringFromIndex: r2.location+1];
|
||||
a = [[realCollectionId componentsSeparatedByString: @"/"] mutableCopy];
|
||||
[a autorelease];
|
||||
pathToPart = [a lastObject];
|
||||
[a removeLastObject];
|
||||
messageName = [a lastObject];
|
||||
[a removeLastObject];
|
||||
folderName = [a componentsJoinedByString: @"/"];
|
||||
|
||||
userFolder = [[context activeUser] homeFolderInContext: context];
|
||||
accountsFolder = [userFolder lookupName: @"Mail" inContext: context acquire: NO];
|
||||
@@ -1317,13 +1319,13 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
currentBodyPart = [mailObject lookupImap4BodyPartKey: [partKeys objectAtIndex:0] inContext: context];
|
||||
for (p = 1; p < [partKeys count]; p++)
|
||||
{
|
||||
currentBodyPart = [currentBodyPart lookupImap4BodyPartKey: [partKeys objectAtIndex:p] inContext: context];
|
||||
}
|
||||
{
|
||||
currentBodyPart = [currentBodyPart lookupImap4BodyPartKey: [partKeys objectAtIndex:p] inContext: context];
|
||||
}
|
||||
|
||||
[s appendString: @"<Fetch>"];
|
||||
[s appendString: @"<Status>1</Status>"];
|
||||
[s appendFormat: @"<FileReference xmlns=\"AirSyncBase:\">%@</FileReference>", fileReference];
|
||||
[s appendFormat: @"<FileReference xmlns=\"AirSyncBase:\">mail/%@/%@/%@</FileReference>", [folderName stringByEscapingURL], messageName, pathToPart];
|
||||
[s appendString: @"<Properties>"];
|
||||
|
||||
[s appendFormat: @"<ContentType xmlns=\"AirSyncBase:\">%@/%@</ContentType>", [[currentBodyPart partInfo] objectForKey: @"type"], [[currentBodyPart partInfo] objectForKey: @"subtype"]];
|
||||
@@ -1946,6 +1948,9 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
}
|
||||
else
|
||||
{
|
||||
if (heartbeatInterval < internalInterval)
|
||||
heartbeatInterval = internalInterval;
|
||||
|
||||
status = 1;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
3.0.2 (2016-02-DD)
|
||||
------------------
|
||||
|
||||
New features
|
||||
- [web] show all/only this calendar
|
||||
- [web] convert a message to an appointment or a task (#1722)
|
||||
- [web] customizable base font size for HTML messages
|
||||
|
||||
Enhancements
|
||||
- [web] added Junk handling feature from v2
|
||||
- [web] updated Material Icons font to version 2.1.3
|
||||
@@ -8,6 +13,8 @@ Enhancements
|
||||
- [web] mail filters are now sortable
|
||||
- [web] now supports RFC6154 and NoInferiors IMAP flag
|
||||
- [web] improved confirm dialogs for deletions
|
||||
- [web] allow resources to prevent invitations (#3410)
|
||||
- [web] warn when double-booking attendees and offer force save option
|
||||
|
||||
Bug fixes
|
||||
- [web] handle birthday dates before 1970
|
||||
@@ -16,6 +23,11 @@ Bug fixes
|
||||
- [web] fixed virtual repeater when moving up in messages list
|
||||
- [web] really delete mailboxes being deleted from the Trash folder (#595, #1189, #641)
|
||||
- [web] fixed address autocompletion of mail editor affecting cards list of active addressbook
|
||||
- [web] fixed batched delete of components (#3516)
|
||||
- [web] fixed mail draft autosave in preferences (#3519)
|
||||
- [web] fixed password change (#3496)
|
||||
- [eas] allow EAS attachments get on 2nd-level mailboxes (#3505)
|
||||
- [eas] fix EAS bday shift (#3518)
|
||||
|
||||
3.0.1 (2016-02-05)
|
||||
------------------
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright (C) 2007-2014 Inverse inc.
|
||||
Copyright (C) 2007-2016 Inverse inc.
|
||||
|
||||
This file is part of SOGo
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
/*
|
||||
Copyright (C) 2007-2015 Inverse inc.
|
||||
Copyright (C) 2004-2005 SKYRIX Software AG
|
||||
Copyright (C) 2007-2016 Inverse inc.
|
||||
|
||||
This file is part of SOGo
|
||||
|
||||
@@ -46,6 +45,7 @@
|
||||
#import <SOGo/NSDictionary+Utilities.h>
|
||||
#import <SOGo/NSObject+DAV.h>
|
||||
#import <SOGo/NSString+Utilities.h>
|
||||
#import <SOGo/SOGoDateFormatter.h>
|
||||
#import <SOGo/SOGoGroup.h>
|
||||
#import <SOGo/SOGoUser.h>
|
||||
#import <SOGo/SOGoUserSettings.h>
|
||||
@@ -402,8 +402,8 @@
|
||||
}
|
||||
|
||||
// This method scans the list of attendees.
|
||||
- (NSException *) _handleAttendeeAvailability: (NSArray *) theAttendees
|
||||
forEvent: (iCalEvent *) theEvent
|
||||
- (NSException *) _handleAttendeesAvailability: (NSArray *) theAttendees
|
||||
forEvent: (iCalEvent *) theEvent
|
||||
{
|
||||
iCalPerson *currentAttendee;
|
||||
SOGoUser *user;
|
||||
@@ -420,7 +420,7 @@
|
||||
|
||||
i = count = 0;
|
||||
|
||||
// Build list of the attendees uids without ressources
|
||||
// Build list of the attendees uids
|
||||
unavailableAttendees = [[NSMutableArray alloc] init];
|
||||
enumerator = [theAttendees objectEnumerator];
|
||||
ownerUID = [[[self context] activeUser] login];
|
||||
@@ -436,7 +436,7 @@
|
||||
moduleSettings = [us objectForKey:@"Calendar"];
|
||||
|
||||
// Check if the user prevented their account from beeing invited to events
|
||||
if (![user isResource] && [[moduleSettings objectForKey:@"PreventInvitations"] boolValue])
|
||||
if ([[moduleSettings objectForKey:@"PreventInvitations"] boolValue])
|
||||
{
|
||||
// Check if the user have a whiteList
|
||||
whiteList = [moduleSettings objectForKey:@"PreventInvitationsWhitelist"];
|
||||
@@ -483,20 +483,20 @@
|
||||
//
|
||||
// This methods scans the list of attendees. If they are
|
||||
// considered as resource, it checks for conflicting
|
||||
// dates for the event.
|
||||
// dates for the event and potentially auto-accept/decline
|
||||
// the invitation.
|
||||
//
|
||||
// For normal attendees, it'll return an exception with
|
||||
// conflicting dates, unless we force the save.//
|
||||
// We check for between startDate + 1 second and
|
||||
// endDate - 1 second
|
||||
//
|
||||
//
|
||||
// It also CHANGES the participation status of resources
|
||||
// depending on constraints defined on them.
|
||||
//
|
||||
// Note that it doesn't matter if it changes the participation
|
||||
// status since in case of an error, nothing will get saved.
|
||||
//
|
||||
- (NSException *) _handleResourcesConflicts: (NSArray *) theAttendees
|
||||
- (NSException *) _handleAttendeesConflicts: (NSArray *) theAttendees
|
||||
forEvent: (iCalEvent *) theEvent
|
||||
force: (BOOL) forceSave
|
||||
{
|
||||
iCalPerson *currentAttendee;
|
||||
NSMutableArray *attendees;
|
||||
@@ -527,110 +527,115 @@
|
||||
enumerator = [attendees objectEnumerator];
|
||||
while ((currentUID = [enumerator nextObject]))
|
||||
{
|
||||
NSCalendarDate *start, *end, *rangeStartDate, *rangeEndDate;
|
||||
SOGoAppointmentFolder *folder;
|
||||
NGCalendarDateRange *range;
|
||||
NSMutableArray *fbInfo;
|
||||
NSArray *allOccurences;
|
||||
|
||||
BOOL must_delete;
|
||||
int i, j, delta;
|
||||
|
||||
user = [SOGoUser userWithLogin: currentUID];
|
||||
|
||||
if ([user isResource])
|
||||
|
||||
// We get the start/end date for our conflict range. If the event to be added is recurring, we
|
||||
// check for at least a year to start with.
|
||||
start = [[theEvent startDate] dateByAddingYears: 0 months: 0 days: 0 hours: 0 minutes: 0 seconds: 1];
|
||||
end = [[theEvent endDate] dateByAddingYears: ([theEvent isRecurrent] ? 1 : 0) months: 0 days: 0 hours: 0 minutes: 0 seconds: -1];
|
||||
|
||||
folder = [user personalCalendarFolderInContext: context];
|
||||
|
||||
// Deny access to the resource if the ACLs don't allow the user
|
||||
if ([user isResource] && ![folder aclSQLListingFilter])
|
||||
{
|
||||
NSCalendarDate *start, *end, *rangeStartDate, *rangeEndDate;
|
||||
SOGoAppointmentFolder *folder;
|
||||
NGCalendarDateRange *range;
|
||||
NSMutableArray *fbInfo;
|
||||
NSArray *allOccurences;
|
||||
|
||||
BOOL must_delete;
|
||||
int i, j, delta;
|
||||
|
||||
// We get the start/end date for our conflict range. If the event to be added is recurring, we
|
||||
// check for at least a year to start with.
|
||||
start = [[theEvent startDate] dateByAddingYears: 0 months: 0 days: 0 hours: 0 minutes: 0 seconds: 1];
|
||||
end = [[theEvent endDate] dateByAddingYears: ([theEvent isRecurrent] ? 1 : 0) months: 0 days: 0 hours: 0 minutes: 0 seconds: -1];
|
||||
|
||||
folder = [user personalCalendarFolderInContext: context];
|
||||
|
||||
// Deny access to the resource if the ACLs don't allow the user
|
||||
if (![folder aclSQLListingFilter])
|
||||
{
|
||||
NSDictionary *values;
|
||||
NSString *reason;
|
||||
NSDictionary *values;
|
||||
NSString *reason;
|
||||
|
||||
values = [NSDictionary dictionaryWithObjectsAndKeys:
|
||||
[user cn], @"Cn",
|
||||
[user systemEmail], @"SystemEmail"];
|
||||
reason = [values keysWithFormat: [self labelForKey: @"Cannot access resource: \"%{Cn} %{SystemEmail}\""]];
|
||||
return [NSException exceptionWithHTTPStatus:403 reason: reason];
|
||||
}
|
||||
values = [NSDictionary dictionaryWithObjectsAndKeys:
|
||||
[user cn], @"Cn",
|
||||
[user systemEmail], @"SystemEmail"];
|
||||
reason = [values keysWithFormat: [self labelForKey: @"Cannot access resource: \"%{Cn} %{SystemEmail}\""]];
|
||||
return [NSException exceptionWithHTTPStatus:403 reason: reason];
|
||||
}
|
||||
|
||||
fbInfo = [NSMutableArray arrayWithArray: [folder fetchFreeBusyInfosFrom: start
|
||||
fbInfo = [NSMutableArray arrayWithArray: [folder fetchFreeBusyInfosFrom: start
|
||||
to: end]];
|
||||
|
||||
// We first remove any occurences in the freebusy that corresponds to the
|
||||
// current event. We do this to avoid raising a conflict if we move a 1 hour
|
||||
// meeting from 12:00-13:00 to 12:15-13:15. We would overlap on ourself otherwise.
|
||||
//
|
||||
// We must also check here for repetitive events that don't overlap our event.
|
||||
// We remove all events that don't overlap. The events here are already
|
||||
// decomposed.
|
||||
//
|
||||
if ([theEvent isRecurrent])
|
||||
allOccurences = [theEvent recurrenceRangesWithinCalendarDateRange: [NGCalendarDateRange calendarDateRangeWithStartDate: start
|
||||
endDate: end]
|
||||
firstInstanceCalendarDateRange: [NGCalendarDateRange calendarDateRangeWithStartDate: [theEvent startDate]
|
||||
endDate: [theEvent endDate]]];
|
||||
else
|
||||
allOccurences = nil;
|
||||
|
||||
for (i = [fbInfo count]-1; i >= 0; i--)
|
||||
// We first remove any occurences in the freebusy that corresponds to the
|
||||
// current event. We do this to avoid raising a conflict if we move a 1 hour
|
||||
// meeting from 12:00-13:00 to 12:15-13:15. We would overlap on ourself otherwise.
|
||||
//
|
||||
// We must also check here for repetitive events that don't overlap our event.
|
||||
// We remove all events that don't overlap. The events here are already
|
||||
// decomposed.
|
||||
//
|
||||
if ([theEvent isRecurrent])
|
||||
allOccurences = [theEvent recurrenceRangesWithinCalendarDateRange: [NGCalendarDateRange calendarDateRangeWithStartDate: start
|
||||
endDate: end]
|
||||
firstInstanceCalendarDateRange: [NGCalendarDateRange calendarDateRangeWithStartDate: [theEvent startDate]
|
||||
endDate: [theEvent endDate]]];
|
||||
else
|
||||
allOccurences = nil;
|
||||
|
||||
for (i = [fbInfo count]-1; i >= 0; i--)
|
||||
{
|
||||
// We MUST use the -uniqueChildWithTag method here because the event has been flattened, so its timezone has been
|
||||
// modified in SOGoAppointmentFolder: -fixupCycleRecord: ....
|
||||
rangeStartDate = [[fbInfo objectAtIndex: i] objectForKey: @"startDate"];
|
||||
delta = [[rangeStartDate timeZoneDetail] timeZoneSecondsFromGMT] - [[[(iCalDateTime *)[theEvent uniqueChildWithTag: @"dtstart"] timeZone] periodForDate: [theEvent startDate]] secondsOffsetFromGMT];
|
||||
rangeStartDate = [rangeStartDate dateByAddingYears: 0 months: 0 days: 0 hours: 0 minutes: 0 seconds: delta];
|
||||
|
||||
rangeEndDate = [[fbInfo objectAtIndex: i] objectForKey: @"endDate"];
|
||||
delta = [[rangeEndDate timeZoneDetail] timeZoneSecondsFromGMT] - [[[(iCalDateTime *)[theEvent uniqueChildWithTag: @"dtend"] timeZone] periodForDate: [theEvent endDate]] secondsOffsetFromGMT];
|
||||
rangeEndDate = [rangeEndDate dateByAddingYears: 0 months: 0 days: 0 hours: 0 minutes: 0 seconds: delta];
|
||||
|
||||
range = [NGCalendarDateRange calendarDateRangeWithStartDate: rangeStartDate
|
||||
endDate: rangeEndDate];
|
||||
|
||||
// We remove the freebusy entries corresponding to the actual event being modified
|
||||
if ([[[fbInfo objectAtIndex: i] objectForKey: @"c_uid"] compare: [theEvent uid]] == NSOrderedSame)
|
||||
{
|
||||
// We MUST use the -uniqueChildWithTag method here because the event has been flattened, so its timezone has been
|
||||
// modified in SOGoAppointmentFolder: -fixupCycleRecord: ....
|
||||
rangeStartDate = [[fbInfo objectAtIndex: i] objectForKey: @"startDate"];
|
||||
delta = [[rangeStartDate timeZoneDetail] timeZoneSecondsFromGMT] - [[[(iCalDateTime *)[theEvent uniqueChildWithTag: @"dtstart"] timeZone] periodForDate: [theEvent startDate]] secondsOffsetFromGMT];
|
||||
rangeStartDate = [rangeStartDate dateByAddingYears: 0 months: 0 days: 0 hours: 0 minutes: 0 seconds: delta];
|
||||
|
||||
rangeEndDate = [[fbInfo objectAtIndex: i] objectForKey: @"endDate"];
|
||||
delta = [[rangeEndDate timeZoneDetail] timeZoneSecondsFromGMT] - [[[(iCalDateTime *)[theEvent uniqueChildWithTag: @"dtend"] timeZone] periodForDate: [theEvent endDate]] secondsOffsetFromGMT];
|
||||
rangeEndDate = [rangeEndDate dateByAddingYears: 0 months: 0 days: 0 hours: 0 minutes: 0 seconds: delta];
|
||||
|
||||
range = [NGCalendarDateRange calendarDateRangeWithStartDate: rangeStartDate
|
||||
endDate: rangeEndDate];
|
||||
[fbInfo removeObjectAtIndex: i];
|
||||
continue;
|
||||
}
|
||||
|
||||
if ([[[fbInfo objectAtIndex: i] objectForKey: @"c_uid"] compare: [theEvent uid]] == NSOrderedSame)
|
||||
// No need to check if the event isn't recurrent here as it's handled correctly
|
||||
// when we compute the "end" date.
|
||||
if ([allOccurences count])
|
||||
{
|
||||
must_delete = YES;
|
||||
|
||||
for (j = 0; j < [allOccurences count]; j++)
|
||||
{
|
||||
[fbInfo removeObjectAtIndex: i];
|
||||
continue;
|
||||
}
|
||||
|
||||
// No need to check if the event isn't recurrent here as it's handled correctly
|
||||
// when we compute the "end" date.
|
||||
if ([allOccurences count])
|
||||
{
|
||||
must_delete = YES;
|
||||
|
||||
for (j = 0; j < [allOccurences count]; j++)
|
||||
if ([range doesIntersectWithDateRange: [allOccurences objectAtIndex: j]])
|
||||
{
|
||||
if ([range doesIntersectWithDateRange: [allOccurences objectAtIndex: j]])
|
||||
{
|
||||
must_delete = NO;
|
||||
break;
|
||||
}
|
||||
must_delete = NO;
|
||||
break;
|
||||
}
|
||||
|
||||
if (must_delete)
|
||||
[fbInfo removeObjectAtIndex: i];
|
||||
}
|
||||
|
||||
if (must_delete)
|
||||
[fbInfo removeObjectAtIndex: i];
|
||||
}
|
||||
}
|
||||
|
||||
// Find the attendee associated to the current UID
|
||||
for (i = 0; i < [theAttendees count]; i++)
|
||||
{
|
||||
currentAttendee = [theAttendees objectAtIndex: i];
|
||||
if ([[currentAttendee uidInContext: context] isEqualToString: currentUID])
|
||||
break;
|
||||
else
|
||||
currentAttendee = nil;
|
||||
}
|
||||
|
||||
if ([fbInfo count])
|
||||
{
|
||||
SOGoDateFormatter *formatter;
|
||||
|
||||
formatter = [[context activeUser] dateFormatterInContext: context];
|
||||
|
||||
// Find the attendee associated to the current UID
|
||||
for (i = 0; i < [theAttendees count]; i++)
|
||||
{
|
||||
currentAttendee = [theAttendees objectAtIndex: i];
|
||||
if ([[currentAttendee uidInContext: context] isEqualToString: currentUID])
|
||||
break;
|
||||
else
|
||||
currentAttendee = nil;
|
||||
}
|
||||
|
||||
if ([fbInfo count])
|
||||
if ([user isResource])
|
||||
{
|
||||
// If we always force the auto-accept if numberOfSimultaneousBookings <= 0 (ie., no limit
|
||||
// is imposed) or if numberOfSimultaneousBookings is greater than the number of
|
||||
@@ -650,35 +655,63 @@
|
||||
NSDictionary *values;
|
||||
NSString *reason;
|
||||
iCalEvent *event;
|
||||
|
||||
|
||||
calendar = [iCalCalendar parseSingleFromSource: [[fbInfo objectAtIndex: 0] objectForKey: @"c_content"]];
|
||||
event = [[calendar events] lastObject];
|
||||
|
||||
|
||||
values = [NSDictionary dictionaryWithObjectsAndKeys:
|
||||
[NSString stringWithFormat: @"%d", [user numberOfSimultaneousBookings]], @"NumberOfSimultaneousBookings",
|
||||
[user cn], @"Cn",
|
||||
[user systemEmail], @"SystemEmail",
|
||||
([event summary] ? [event summary] : @""), @"EventTitle",
|
||||
[[fbInfo objectAtIndex: 0] objectForKey: @"startDate"], @"StartDate",
|
||||
nil];
|
||||
|
||||
[NSString stringWithFormat: @"%d", [user numberOfSimultaneousBookings]], @"NumberOfSimultaneousBookings",
|
||||
[user cn], @"Cn",
|
||||
[user systemEmail], @"SystemEmail",
|
||||
([event summary] ? [event summary] : @""), @"EventTitle",
|
||||
[formatter formattedDateAndTime: [[fbInfo objectAtIndex: 0] objectForKey: @"startDate"]], @"StartDate",
|
||||
nil];
|
||||
|
||||
reason = [values keysWithFormat: [self labelForKey: @"Maximum number of simultaneous bookings (%{NumberOfSimultaneousBookings}) reached for resource \"%{Cn} %{SystemEmail}\". The conflicting event is \"%{EventTitle}\", and starts on %{StartDate}."]];
|
||||
|
||||
|
||||
return [NSException exceptionWithHTTPStatus: 403
|
||||
reason: reason];
|
||||
}
|
||||
}
|
||||
else if (currentAttendee)
|
||||
//
|
||||
// We are dealing with a normal attendee. Lets check if we have conflicts, unless
|
||||
// we are being asked to force the save anyway
|
||||
//
|
||||
else if (!forceSave)
|
||||
{
|
||||
// No conflict, we auto-accept. We do this for resources automatically if no
|
||||
// double-booking is observed. If it's not the desired behavior, just don't
|
||||
// set the resource as one!
|
||||
[[currentAttendee attributes] removeObjectForKey: @"RSVP"];
|
||||
[currentAttendee setParticipationStatus: iCalPersonPartStatAccepted];
|
||||
NSMutableDictionary *info;
|
||||
NSMutableArray *conflicts;
|
||||
id o;
|
||||
|
||||
info = [NSMutableDictionary dictionary];
|
||||
conflicts = [NSMutableArray array];
|
||||
|
||||
[info setObject: [currentAttendee cn] forKey: @"attendee_name"];
|
||||
[info setObject: [currentAttendee rfc822Email] forKey: @"attendee_email"];
|
||||
|
||||
for (i = 0; i < [fbInfo count]; i++)
|
||||
{
|
||||
o = [fbInfo objectAtIndex: i];
|
||||
[conflicts addObject: [NSDictionary dictionaryWithObjectsAndKeys: [formatter formattedDateAndTime: [o objectForKey: @"startDate"]], @"startDate",
|
||||
[formatter formattedDateAndTime: [o objectForKey: @"endDate"]], @"endDate", nil]];
|
||||
}
|
||||
|
||||
[info setObject: conflicts forKey: @"conflicts"];
|
||||
|
||||
return [NSException exceptionWithHTTPStatus: 403
|
||||
reason: [info jsonRepresentation]];
|
||||
}
|
||||
} // if ([fbInfo count]) ...
|
||||
else if (currentAttendee && [user isResource])
|
||||
{
|
||||
// No conflict, we auto-accept. We do this for resources automatically if no
|
||||
// double-booking is observed. If it's not the desired behavior, just don't
|
||||
// set the resource as one!
|
||||
[[currentAttendee attributes] removeObjectForKey: @"RSVP"];
|
||||
[currentAttendee setParticipationStatus: iCalPersonPartStatAccepted];
|
||||
}
|
||||
}
|
||||
|
||||
} // if ([user isResource]) ...
|
||||
|
||||
return nil;
|
||||
}
|
||||
|
||||
@@ -687,6 +720,7 @@
|
||||
//
|
||||
- (NSException *) _handleAddedUsers: (NSArray *) attendees
|
||||
fromEvent: (iCalEvent *) newEvent
|
||||
force: (BOOL) forceSave
|
||||
{
|
||||
iCalPerson *currentAttendee;
|
||||
NSEnumerator *enumerator;
|
||||
@@ -694,9 +728,9 @@
|
||||
NSException *e;
|
||||
|
||||
// We check for conflicts
|
||||
if ((e = [self _handleResourcesConflicts: attendees forEvent: newEvent]))
|
||||
if ((e = [self _handleAttendeesConflicts: attendees forEvent: newEvent force: forceSave]))
|
||||
return e;
|
||||
if ((e = [self _handleAttendeeAvailability: attendees forEvent: newEvent]))
|
||||
if ((e = [self _handleAttendeesAvailability: attendees forEvent: newEvent]))
|
||||
return e;
|
||||
|
||||
enumerator = [attendees objectEnumerator];
|
||||
@@ -752,6 +786,7 @@ inRecurrenceExceptionsForEvent: (iCalEvent *) theEvent
|
||||
//
|
||||
- (NSException *) _handleUpdatedEvent: (iCalEvent *) newEvent
|
||||
fromOldEvent: (iCalEvent *) oldEvent
|
||||
force: (BOOL) forceSave
|
||||
{
|
||||
NSArray *addedAttendees, *deletedAttendees, *updatedAttendees;
|
||||
iCalEventChanges *changes;
|
||||
@@ -791,9 +826,9 @@ inRecurrenceExceptionsForEvent: (iCalEvent *) theEvent
|
||||
withType: @"calendar:cancellation"];
|
||||
}
|
||||
|
||||
if ((ex = [self _handleResourcesConflicts: [newEvent attendees] forEvent: newEvent]))
|
||||
if ((ex = [self _handleAttendeesConflicts: [newEvent attendees] forEvent: newEvent force: forceSave]))
|
||||
return ex;
|
||||
if ((ex = [self _handleAttendeeAvailability: [newEvent attendees] forEvent: newEvent]))
|
||||
if ((ex = [self _handleAttendeesAvailability: [newEvent attendees] forEvent: newEvent]))
|
||||
return ex;
|
||||
|
||||
addedAttendees = [changes insertedAttendees];
|
||||
@@ -842,7 +877,7 @@ inRecurrenceExceptionsForEvent: (iCalEvent *) theEvent
|
||||
if ([addedAttendees count])
|
||||
{
|
||||
// Send an invitation to new attendees
|
||||
if ((ex = [self _handleAddedUsers: addedAttendees fromEvent: newEvent]))
|
||||
if ((ex = [self _handleAddedUsers: addedAttendees fromEvent: newEvent force: forceSave]))
|
||||
return ex;
|
||||
|
||||
[self sendEMailUsingTemplateNamed: @"Invitation"
|
||||
@@ -887,6 +922,12 @@ inRecurrenceExceptionsForEvent: (iCalEvent *) theEvent
|
||||
//
|
||||
//
|
||||
- (NSException *) saveComponent: (iCalEvent *) newEvent
|
||||
{
|
||||
return [self saveComponent: newEvent force: NO];
|
||||
}
|
||||
|
||||
- (NSException *) saveComponent: (iCalEvent *) newEvent
|
||||
force: (BOOL) forceSave
|
||||
{
|
||||
iCalEvent *oldEvent, *oldMasterEvent;
|
||||
NSCalendarDate *recurrenceId;
|
||||
@@ -911,7 +952,7 @@ inRecurrenceExceptionsForEvent: (iCalEvent *) theEvent
|
||||
|
||||
// We catch conflicts and abort the save process immediately
|
||||
// in case of one with resources
|
||||
if ((ex = [self _handleAddedUsers: attendees fromEvent: newEvent]))
|
||||
if ((ex = [self _handleAddedUsers: attendees fromEvent: newEvent force: forceSave]))
|
||||
return ex;
|
||||
|
||||
if ([attendees count])
|
||||
@@ -954,7 +995,7 @@ inRecurrenceExceptionsForEvent: (iCalEvent *) theEvent
|
||||
if (!hasOrganizer || [oldMasterEvent userIsOrganizer: ownerUser])
|
||||
// The owner is the organizer of the event; handle the modifications. We aslo
|
||||
// catch conflicts just like when the events are created
|
||||
if ((ex = [self _handleUpdatedEvent: newEvent fromOldEvent: oldEvent]))
|
||||
if ((ex = [self _handleUpdatedEvent: newEvent fromOldEvent: oldEvent force: forceSave]))
|
||||
return ex;
|
||||
}
|
||||
|
||||
@@ -1591,7 +1632,6 @@ inRecurrenceExceptionsForEvent: (iCalEvent *) theEvent
|
||||
currentUser = [context activeUser];
|
||||
attendees = [occurence attendeesWithoutUser: currentUser];
|
||||
|
||||
#warning Make sure this is correct ..
|
||||
if (![attendees count] && event != occurence)
|
||||
attendees = [event attendeesWithoutUser: currentUser];
|
||||
|
||||
@@ -1994,7 +2034,7 @@ inRecurrenceExceptionsForEvent: (iCalEvent *) theEvent
|
||||
attendees = [event attendeesWithoutUser: ownerUser];
|
||||
if ([attendees count])
|
||||
{
|
||||
if ((ex = [self _handleAddedUsers: attendees fromEvent: event]))
|
||||
if ((ex = [self _handleAddedUsers: attendees fromEvent: event force: YES]))
|
||||
return ex;
|
||||
else
|
||||
{
|
||||
@@ -2146,7 +2186,7 @@ inRecurrenceExceptionsForEvent: (iCalEvent *) theEvent
|
||||
if (!newEvent && oldEvent)
|
||||
[self prepareDeleteOccurence: oldEvent];
|
||||
// The master event was changed, A RECCURENCE-ID was added or modified
|
||||
else if ((ex = [self _handleUpdatedEvent: newEvent fromOldEvent: oldEvent]))
|
||||
else if ((ex = [self _handleUpdatedEvent: newEvent fromOldEvent: oldEvent force: YES]))
|
||||
return ex;
|
||||
}
|
||||
//
|
||||
|
||||
@@ -61,7 +61,8 @@
|
||||
- (void) updateComponent: (iCalRepeatableEntityObject *) newObject;
|
||||
- (NSException *) saveCalendar: (iCalCalendar *) newCalendar;
|
||||
- (NSException *) saveComponent: (iCalRepeatableEntityObject *) newObject;
|
||||
|
||||
- (NSException *) saveComponent: (iCalRepeatableEntityObject *) newEvent
|
||||
force: (BOOL) forceSave;
|
||||
/* mail notifications */
|
||||
- (void) sendEMailUsingTemplateNamed: (NSString *) pageName
|
||||
forObject: (iCalRepeatableEntityObject *) object
|
||||
|
||||
@@ -675,6 +675,12 @@
|
||||
return [self saveCalendar: [newObject parent]];
|
||||
}
|
||||
|
||||
- (NSException *) saveComponent: (iCalRepeatableEntityObject *) newEvent
|
||||
force: (BOOL) forceSave
|
||||
{
|
||||
return [self saveComponent: newEvent];
|
||||
}
|
||||
|
||||
/* raw saving */
|
||||
|
||||
/* EMail Notifications */
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
/*
|
||||
|
||||
Copyright (C) 2006-2014 Inverse inc.
|
||||
Copyright (C) 2004-2005 SKYRIX Software AG
|
||||
Copyright (C) 2006-2014-2016 Inverse inc.
|
||||
|
||||
This file is part of SOGo.
|
||||
|
||||
@@ -26,24 +24,6 @@
|
||||
|
||||
#import "SOGoCalendarComponent.h"
|
||||
|
||||
/*
|
||||
SOGoTaskObject
|
||||
|
||||
Represents a single task. This SOPE controller object manages all the
|
||||
attendee storages (that is, it might store into multiple folders for meeting
|
||||
tasks!).
|
||||
|
||||
Note: SOGoTaskObject do not need to exist yet. They can also be "new"
|
||||
tasks with an externally generated unique key.
|
||||
*/
|
||||
|
||||
@class NSArray;
|
||||
@class NSException;
|
||||
@class NSString;
|
||||
|
||||
@class iCalToDo;
|
||||
@class iCalCalendar;
|
||||
|
||||
@interface SOGoTaskObject : SOGoCalendarComponent
|
||||
|
||||
@end
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
/*
|
||||
Copyright (C) 2006-2014 Inverse inc.
|
||||
Copyright (C) 2004-2005 SKYRIX Software AG
|
||||
Copyright (C) 2006-2014-2016 Inverse inc.
|
||||
|
||||
This file is part of SOGo.
|
||||
|
||||
|
||||
@@ -164,8 +164,7 @@
|
||||
NSMutableArray *keys;
|
||||
NSArray *acceptedTypes;
|
||||
|
||||
acceptedTypes
|
||||
= [NSArray arrayWithObjects: @"text/plain", @"text/html", nil];
|
||||
acceptedTypes = [NSArray arrayWithObjects: @"text/plain", @"text/html", nil];
|
||||
keys = [NSMutableArray array];
|
||||
[self addRequiredKeysOfStructure: [self bodyStructure]
|
||||
path: @"" toArray: keys acceptedTypes: acceptedTypes
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
/*
|
||||
Copyright (C) 2004 SKYRIX Software AG
|
||||
Copyright (C) 2005-2016 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.
|
||||
@@ -48,21 +48,6 @@
|
||||
|
||||
- (NSString *) stringForObjectValue: (id) date;
|
||||
|
||||
// - (void) setFullWeekdayNameAndDetails;
|
||||
|
||||
// - (NSString *) date: (NSCalendarDate *) date
|
||||
// withFormat: (unsigned int) format;
|
||||
// - (NSString *) date: (NSCalendarDate *) date
|
||||
// withNSFormat: (NSNumber *) format;
|
||||
|
||||
|
||||
// - (NSString *) shortDayOfWeek: (int)_day;
|
||||
// - (NSString *) fullDayOfWeek: (int)_day;
|
||||
// - (NSString *) shortMonthOfYear: (int)_month;
|
||||
// - (NSString *) fullMonthOfYear: (int)_month;
|
||||
|
||||
// - (NSString *) fullWeekdayNameAndDetailsForDate: (NSCalendarDate *)_date;
|
||||
|
||||
@end
|
||||
|
||||
#endif /* __SOGoDateFormatter_H_ */
|
||||
@@ -1,14 +1,14 @@
|
||||
/*
|
||||
Copyright (C) 2004 SKYRIX Software AG
|
||||
Copyright (C) 2005-2016 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.
|
||||
@@ -21,7 +21,7 @@
|
||||
|
||||
#import <Foundation/NSCalendarDate.h>
|
||||
#import <Foundation/NSDictionary.h>
|
||||
#import <Foundation/NSUserDefaults.h> /* for NSXXXFormatString, ... */
|
||||
#import <Foundation/NSUserDefaults.h>
|
||||
|
||||
#import "SOGoDateFormatter.h"
|
||||
|
||||
|
||||
@@ -72,6 +72,7 @@
|
||||
SOGoTrashFolderName = "Trash";
|
||||
SOGoJunkFolderName = "Junk";
|
||||
SOGoMailComposeMessageType = "html";
|
||||
SOGoMailComposeFontSize = 0;
|
||||
SOGoMailDisplayRemoteInlineImages = "never";
|
||||
|
||||
SOGoMailAutoSave = "5";
|
||||
|
||||
@@ -132,6 +132,9 @@ extern NSString *SOGoWeekStartFirstFullWeek;
|
||||
- (void) setMailComposeMessageType: (NSString *) newValue;
|
||||
- (NSString *) mailComposeMessageType;
|
||||
|
||||
- (void) setMailComposeFontSize: (NSString *) newValue;
|
||||
- (NSString *) mailComposeFontSize;
|
||||
|
||||
- (void) setMailDisplayRemoteInlineImages: (NSString *) newValue;
|
||||
- (NSString *) mailDisplayRemoteInlineImages;
|
||||
|
||||
|
||||
@@ -534,6 +534,16 @@ NSString *SOGoWeekStartFirstFullWeek = @"FirstFullWeek";
|
||||
return [self stringForKey: @"SOGoMailComposeMessageType"];
|
||||
}
|
||||
|
||||
- (void) setMailComposeFontSize: (NSString *) newValue
|
||||
{
|
||||
[self setObject: newValue forKey: @"SOGoMailComposeFontSize"];
|
||||
}
|
||||
|
||||
- (NSString *) mailComposeFontSize
|
||||
{
|
||||
return [self stringForKey: @"SOGoMailComposeFontSize"];
|
||||
}
|
||||
|
||||
- (void) setMailDisplayRemoteInlineImages: (NSString *) newValue
|
||||
{
|
||||
[self setObject: newValue forKey: @"SOGoMailDisplayRemoteInlineImages"];
|
||||
|
||||
@@ -187,6 +187,13 @@
|
||||
"Save As..." = "Save As...";
|
||||
"Print Preview" = "Print Preview";
|
||||
"View Message Source" = "View Message Source";
|
||||
|
||||
/* Message view "more" menu: create an event from message */
|
||||
"Convert To Event" = "Convert To Event";
|
||||
|
||||
/* Message view "more" menu: create a task from message */
|
||||
"Convert To Task" = "Convert To Task";
|
||||
|
||||
"Print..." = "Print...";
|
||||
"Delete Message" = "Delete Message";
|
||||
"Delete Selected Messages" = "Delete Selected Messages";
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* UIxMailActions.m - this file is part of SOGo
|
||||
*
|
||||
* Copyright (C) 2007-2014 Inverse inc.
|
||||
* Copyright (C) 2007-2016 Inverse inc.
|
||||
*
|
||||
* This file is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -24,10 +24,13 @@
|
||||
#import <NGObjWeb/WORequest.h>
|
||||
#import <NGObjWeb/NSException+HTTP.h>
|
||||
|
||||
#import <SoObjects/Mailer/NSString+Mail.h>
|
||||
#import <SoObjects/Mailer/SOGoDraftObject.h>
|
||||
#import <SoObjects/Mailer/SOGoDraftsFolder.h>
|
||||
#import <SoObjects/Mailer/SOGoMailAccount.h>
|
||||
#import <SoObjects/Mailer/SOGoMailObject.h>
|
||||
#import <SoObjects/Mailer/SOGoMailObject+Draft.h>
|
||||
#import <SoObjects/SOGo/NSArray+Utilities.h>
|
||||
#import <SoObjects/SOGo/NSDictionary+Utilities.h>
|
||||
#import <SoObjects/SOGo/NSString+Utilities.h>
|
||||
#import <SoObjects/SOGo/SOGoUser.h>
|
||||
@@ -116,6 +119,61 @@
|
||||
andString: [data jsonRepresentation]];
|
||||
}
|
||||
|
||||
- (WOResponse *) viewPlainAction
|
||||
{
|
||||
BOOL htmlContent;
|
||||
NSArray *acceptedTypes, *types;
|
||||
NSDictionary *parts;
|
||||
NSMutableArray *keys;
|
||||
NSMutableDictionary *data;
|
||||
NSString *rawPart, *contentKey, *subject, *content;
|
||||
NSUInteger index;
|
||||
SOGoMailObject *co;
|
||||
|
||||
co = [self clientObject];
|
||||
subject = [co decodedSubject];
|
||||
htmlContent = NO;
|
||||
data = [NSMutableDictionary dictionary];
|
||||
|
||||
if (subject)
|
||||
[data setObject: subject
|
||||
forKey: @"subject"];
|
||||
|
||||
// Fetch the text parts of the message body structure
|
||||
acceptedTypes = [NSArray arrayWithObjects: @"text/plain", @"text/html", nil];
|
||||
keys = [NSMutableArray array];
|
||||
[co addRequiredKeysOfStructure: [co bodyStructure]
|
||||
path: @"" toArray: keys acceptedTypes: acceptedTypes
|
||||
withPeek: NO];
|
||||
|
||||
// Use plain part if available, otherwise use the HTML part
|
||||
types = [keys objectsForKey: @"mimeType" notFoundMarker: @""];
|
||||
index = [types indexOfObject: @"text/plain"];
|
||||
if (index == NSNotFound)
|
||||
{
|
||||
index = [types indexOfObject: @"text/html"];
|
||||
htmlContent = YES;
|
||||
}
|
||||
|
||||
// Fetch part and convert HTML if necessary
|
||||
contentKey = [keys objectAtIndex: index];
|
||||
parts = [co fetchPlainTextStrings: [NSArray arrayWithObject: contentKey]];
|
||||
if ([parts count] > 0)
|
||||
{
|
||||
rawPart = [[parts allValues] objectAtIndex: 0];
|
||||
if (htmlContent)
|
||||
content = [rawPart htmlToText];
|
||||
else
|
||||
content = rawPart;
|
||||
if (content)
|
||||
[data setObject: [content stringByTrimmingSpaces]
|
||||
forKey: @"content"];
|
||||
}
|
||||
|
||||
return [self responseWithStatus: 201
|
||||
andString: [data jsonRepresentation]];
|
||||
}
|
||||
|
||||
/* active message */
|
||||
|
||||
- (id) markMessageUnflaggedAction
|
||||
|
||||
@@ -612,9 +612,11 @@ static NSArray *infoKeys = nil;
|
||||
{
|
||||
NSDictionary *info;
|
||||
NSException *error;
|
||||
NSString *fontSize, *content;
|
||||
NGMimeType *mimeType;
|
||||
WORequest *request;
|
||||
SOGoDraftObject *co;
|
||||
SOGoUserDefaults *ud;
|
||||
|
||||
error = nil;
|
||||
request = [context request];
|
||||
@@ -632,7 +634,22 @@ static NSArray *infoKeys = nil;
|
||||
info = [self infoFromRequest];
|
||||
[co setHeaders: info];
|
||||
[co setIsHTML: isHTML];
|
||||
[co setText: (isHTML ? [NSString stringWithFormat: @"<html>%@</html>", text] : text)];;
|
||||
if (isHTML)
|
||||
{
|
||||
// Set a base font size if mail is HTML and user has set a default font-size
|
||||
ud = [[context activeUser] userDefaults];
|
||||
fontSize = [ud mailComposeFontSize];
|
||||
if ([fontSize intValue] > 0)
|
||||
content = [NSString stringWithFormat: @"<html><span style=\"font-size: %@px;\">%@</span></html>",
|
||||
fontSize, text];
|
||||
else
|
||||
content = [NSString stringWithFormat: @"<html>%@</html>", text];
|
||||
}
|
||||
else
|
||||
{
|
||||
content = text;
|
||||
}
|
||||
[co setText: content];
|
||||
error = [co storeInfo];
|
||||
}
|
||||
|
||||
|
||||
@@ -278,6 +278,11 @@
|
||||
actionClass = "UIxMailActions";
|
||||
actionName = "forward";
|
||||
};
|
||||
viewplain = {
|
||||
protectedBy = "View";
|
||||
actionClass = "UIxMailActions";
|
||||
actionName = "viewPlain";
|
||||
};
|
||||
markMessageUncollapse = {
|
||||
protectedBy = "View";
|
||||
actionClass = "UIxMailActions";
|
||||
|
||||
@@ -142,6 +142,10 @@
|
||||
"Compose messages in" = "Compose messages in";
|
||||
"composemessagestype_html" = "HTML";
|
||||
"composemessagestype_text" = "Plain text";
|
||||
|
||||
/* Base font size for messages composed in HTML */
|
||||
"Default font size" = "Default font size";
|
||||
|
||||
"Display remote inline images" = "Display remote inline images";
|
||||
"displayremoteinlineimages_never" = "Never";
|
||||
"displayremoteinlineimages_always" = "Always";
|
||||
|
||||
@@ -171,6 +171,9 @@ static SoProduct *preferencesProduct = nil;
|
||||
if (![[defaults source] objectForKey: @"SOGoMailComposeMessageType"])
|
||||
[[defaults source] setObject: [defaults mailComposeMessageType] forKey: @"SOGoMailComposeMessageType"];
|
||||
|
||||
if (![[defaults source] objectForKey: @"SOGoMailComposeFontSize"])
|
||||
[[defaults source] setObject: [defaults mailComposeFontSize] forKey: @"SOGoMailComposeFontSize"];
|
||||
|
||||
if (![[defaults source] objectForKey: @"SOGoMailDisplayRemoteInlineImages"])
|
||||
[[defaults source] setObject: [defaults mailDisplayRemoteInlineImages] forKey: @"SOGoMailDisplayRemoteInlineImages"];
|
||||
|
||||
|
||||
@@ -1163,6 +1163,27 @@ static NSArray *reminderValues = nil;
|
||||
: [self _defaultEmailAddresses]);
|
||||
}
|
||||
|
||||
//
|
||||
// Used by templates
|
||||
//
|
||||
- (NSArray *) fontSizesList
|
||||
{
|
||||
static NSArray *fontSizes = nil;
|
||||
|
||||
if (!fontSizes)
|
||||
{
|
||||
fontSizes = [NSArray arrayWithObjects: @"8", @"9", @"10", @"11", @"12", @"13", @"14", @"16", @"18",
|
||||
@"20", @"22", @"24", @"26", @"28",
|
||||
@"36",
|
||||
@"48",
|
||||
@"72",
|
||||
nil];
|
||||
[fontSizes retain];
|
||||
}
|
||||
|
||||
return fontSizes;
|
||||
}
|
||||
|
||||
//
|
||||
// Used by templates
|
||||
//
|
||||
|
||||
@@ -437,6 +437,13 @@ vtodo_class2 = "(Confidential task)";
|
||||
"When I modify my calendar, send a mail to" = "When I modify my calendar, send a mail to";
|
||||
"Email Address" = "Email Address";
|
||||
"Export" = "Export";
|
||||
|
||||
/* Show only the calendar for which the menu is displayed */
|
||||
"Show Only This Calendar" = "Show Only This Calendar";
|
||||
|
||||
/* Show all calendar (personal, subscriptions and web) */
|
||||
"Show All Calendars" = "Show All Calendars";
|
||||
|
||||
"Links to this Calendar" = "Links to this Calendar";
|
||||
"Authenticated User Access" = "Authenticated User Access";
|
||||
"CalDAV URL" = "CalDAV URL ";
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
/* UIxAppointmentActions.h - this file is part of SOGo
|
||||
*
|
||||
* Copyright (C) 2010 Inverse inc.
|
||||
*
|
||||
* Author: Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
* Copyright (C) 2010-2016 Inverse inc.
|
||||
*
|
||||
* This file is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
/* UIxAppointmentActions.m - this file is part of SOGo
|
||||
*
|
||||
* Copyright (C) 2011-2014 Inverse inc.
|
||||
*
|
||||
* Author: Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
* Copyright (C) 2011-2016 Inverse inc.
|
||||
*
|
||||
* This file is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -65,6 +63,7 @@
|
||||
NSException *ex;
|
||||
SOGoAppointmentFolder *targetCalendar, *sourceCalendar;
|
||||
SOGoAppointmentFolders *folders;
|
||||
BOOL forceSave;
|
||||
|
||||
rq = [context request];
|
||||
params = [[rq contentAsString] objectFromJSONString];
|
||||
@@ -73,6 +72,7 @@
|
||||
startDelta = [params objectForKey: @"start"];
|
||||
durationDelta = [params objectForKey: @"duration"];
|
||||
destionationCalendar = [params objectForKey: @"destination"];
|
||||
forceSave = NO;
|
||||
|
||||
if (daysDelta || startDelta || durationDelta)
|
||||
{
|
||||
@@ -116,7 +116,8 @@
|
||||
[event updateRecurrenceRulesUntilDate: end];
|
||||
|
||||
[event setLastModified: [NSCalendarDate calendarDate]];
|
||||
ex = [co saveComponent: event];
|
||||
ex = [co saveComponent: event force: forceSave];
|
||||
|
||||
// This condition will be executed only if the event is moved from a calendar to another. If destionationCalendar == 0; there is no calendar change
|
||||
if ([destionationCalendar length] > 0)
|
||||
{
|
||||
@@ -135,12 +136,21 @@
|
||||
ex = [co moveToFolder: targetCalendar];
|
||||
}
|
||||
}
|
||||
|
||||
if (ex)
|
||||
{
|
||||
unsigned int httpStatus;
|
||||
|
||||
httpStatus = 500;
|
||||
|
||||
if ([ex respondsToSelector: @selector(httpStatus)])
|
||||
httpStatus = [ex httpStatus];
|
||||
|
||||
jsonResponse = [NSDictionary dictionaryWithObjectsAndKeys:
|
||||
[ex reason], @"message",
|
||||
[ex reason], @"message",
|
||||
nil];
|
||||
response = [self responseWithStatus: 403
|
||||
|
||||
response = [self responseWithStatus: httpStatus
|
||||
andJSONRepresentation: jsonResponse];
|
||||
}
|
||||
else
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* UIxAppointmentEditor.h - this file is part of SOGo
|
||||
*
|
||||
* Copyright (C) 2007-2015 Inverse inc.
|
||||
* Copyright (C) 2007-2016 Inverse inc.
|
||||
*
|
||||
* This file is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* UIxAppointmentEditor.m - this file is part of SOGo
|
||||
*
|
||||
* Copyright (C) 2007-2015 Inverse inc.
|
||||
* Copyright (C) 2007-2016 Inverse inc.
|
||||
*
|
||||
* This file is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -454,7 +454,9 @@
|
||||
SOGoAppointmentObject *co;
|
||||
SoSecurityManager *sm;
|
||||
WORequest *request;
|
||||
|
||||
unsigned int httpStatus;
|
||||
BOOL forceSave;
|
||||
|
||||
event = [self event];
|
||||
co = [self clientObject];
|
||||
@@ -475,6 +477,7 @@
|
||||
else
|
||||
{
|
||||
[self setAttributes: params];
|
||||
forceSave = NO;
|
||||
|
||||
if ([event hasRecurrenceRules])
|
||||
[self _adjustRecurrentRules];
|
||||
@@ -498,12 +501,12 @@
|
||||
}
|
||||
|
||||
// Save the event.
|
||||
ex = [co saveComponent: event];
|
||||
ex = [co saveComponent: event force: forceSave];
|
||||
}
|
||||
else
|
||||
{
|
||||
// The event was modified -- save it.
|
||||
ex = [co saveComponent: event];
|
||||
ex = [co saveComponent: event force: forceSave];
|
||||
|
||||
if (componentCalendar
|
||||
&& ![[componentCalendar ocsPath]
|
||||
@@ -526,9 +529,12 @@
|
||||
if (ex)
|
||||
{
|
||||
httpStatus = 500;
|
||||
|
||||
if ([ex respondsToSelector: @selector(httpStatus)])
|
||||
httpStatus = [ex httpStatus];
|
||||
|
||||
jsonResponse = [NSDictionary dictionaryWithObjectsAndKeys:
|
||||
@"failure", @"status",
|
||||
[ex reason], @"message",
|
||||
[ex reason], @"message",
|
||||
nil];
|
||||
}
|
||||
else
|
||||
|
||||
@@ -101,7 +101,8 @@
|
||||
<a ui-sref="app.addressbook.card.view({addressbookId: editor.currentFolder.id, cardId: ref.reference})">{{ ref.$fullname() }}</a>
|
||||
</h3>
|
||||
<h4 ng-show="ref.email">
|
||||
<a ui-sref="mailto:{{ref.email}}" ng-class="ng-scope">{{ ref.email }}</a>
|
||||
<a href="#" ng-bind="ref.email"
|
||||
ng-click="addressbook.newMessageWithRecipient($event, ref.email, ref.$fullname())"><!-- contact email --></a>
|
||||
</h4>
|
||||
</div>
|
||||
</md-list-item>
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
xmlns:label="OGo:label"
|
||||
className="UIxPageFrame"
|
||||
title="title"
|
||||
const:jsFiles="Common.js, Preferences.services.js, Contacts.services.js, Mailer.js, Mailer.services.js, vendor/ckeditor/ckeditor.js, vendor/ckeditor/ck.js, vendor/angular-file-upload.min.js">
|
||||
const:jsFiles="Common.js, Preferences.services.js, Contacts.services.js, Scheduler.services.js, Mailer.js, Mailer.services.js, vendor/ckeditor/ckeditor.js, vendor/ckeditor/ck.js, vendor/angular-file-upload.min.js">
|
||||
<script type="text/javascript">
|
||||
var mailAccounts = <var:string value="mailAccounts" const:escapeHTML="NO" />;
|
||||
var userNames = <var:string value="userNames" const:escapeHTML="NO" />;
|
||||
@@ -116,7 +116,8 @@
|
||||
md-menu-origin="md-menu-origin">more_vert</md-icon>
|
||||
<md-menu-content width="3">
|
||||
<md-menu-item>
|
||||
<md-button type="button" md-menu-align-target="md-menu-align-target" ng-click="app.markFolderRead(folder)">
|
||||
<md-button type="button" md-menu-align-target="md-menu-align-target"
|
||||
ng-click="app.markFolderRead(folder)">
|
||||
<var:string label:value="Mark Folder Read"/>
|
||||
</md-button>
|
||||
</md-menu-item>
|
||||
|
||||
@@ -87,6 +87,19 @@
|
||||
<var:string label:value="View Message Source"/>
|
||||
</md-button>
|
||||
</md-menu-item>
|
||||
<md-menu-divider><!-- divider --></md-menu-divider>
|
||||
<md-menu-item>
|
||||
<md-button label:aria-label="Convert To Event"
|
||||
ng-click="viewer.convertToEvent($event)">
|
||||
<var:string label:value="Convert To Event"/>
|
||||
</md-button>
|
||||
</md-menu-item>
|
||||
<md-menu-item>
|
||||
<md-button label:aria-label="Convert To Task"
|
||||
ng-click="viewer.convertToTask($event)">
|
||||
<var:string label:value="Convert To Task"/>
|
||||
</md-button>
|
||||
</md-menu-item>
|
||||
</md-menu-content>
|
||||
</md-menu>
|
||||
</md-card-actions>
|
||||
|
||||
@@ -14,7 +14,11 @@
|
||||
<md-icon class="material-icons sg-icon-toolbar-bg">filter_list</md-icon>
|
||||
<md-input-container class="md-block md-flex">
|
||||
<label><var:string label:value="Filter name"/></label>
|
||||
<input class="md-title" type="text" ng-model="filterEditor.filter.name" required="required"/>
|
||||
<input class="md-title"
|
||||
type="text"
|
||||
md-autofocus="true"
|
||||
ng-model="filterEditor.filter.name"
|
||||
required="required"/>
|
||||
</md-input-container>
|
||||
<md-button type="button" class="sg-icon-button " ng-click="filterEditor.cancel()">
|
||||
<md-icon>close</md-icon>
|
||||
|
||||
@@ -511,19 +511,18 @@
|
||||
</md-checkbox>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<div layout="row" layout-align="start center" flex="50" flex-xs="100">
|
||||
<md-checkbox
|
||||
class="md-align-top-left" ng-model="app.preferences.defaults.SOGoMailAddOutgoingAddresses"
|
||||
ng-true-value="1"
|
||||
ng-false-value="0"
|
||||
label:arial-label="When sending mail, add unknown recipients to my">
|
||||
<var:string label:value="When sending mail, add unknown recipients to my"/>
|
||||
</md-checkbox>
|
||||
|
||||
<md-input-container>
|
||||
<label><var:string label:aria-label="Address Book"/></label>
|
||||
<md-input-container class="md-block md-flex">
|
||||
<label><var:string label:value="When sending mail, add unknown recipients to my"/></label>
|
||||
<md-select
|
||||
ng-disabled="app.preferences.defaults.SOGoMailAddOutgoingAddresses == 0"
|
||||
ng-disabled="app.preferences.defaults.SOGoMailAddOutgoingAddresses != 1"
|
||||
ng-model="app.preferences.defaults.SOGoSelectedAddressBook">
|
||||
<var:foreach list="addressBookList" item="item">
|
||||
<md-option var:value="item.id">
|
||||
@@ -534,7 +533,7 @@
|
||||
</md-input-container>
|
||||
</div>
|
||||
|
||||
<md-input-container class="md-block">
|
||||
<md-input-container class="md-block" flex="50" flex-xs="100">
|
||||
<label><var:string label:value="Forward messages"/></label>
|
||||
<md-select ng-model="app.preferences.defaults.SOGoMailMessageForwarding">
|
||||
<var:foreach list="messageForwardingList" item="item">
|
||||
@@ -569,18 +568,42 @@
|
||||
</md-input-container>
|
||||
</div>
|
||||
|
||||
<md-input-container class="md-block">
|
||||
<label><var:string label:value="Compose messages in"/></label>
|
||||
<md-select ng-model="app.preferences.defaults.SOGoMailComposeMessageType">
|
||||
<var:foreach list="composeMessagesType" item="item">
|
||||
<md-option var:value="item">
|
||||
<var:string value="itemComposeMessagesText"/>
|
||||
</md-option>
|
||||
</var:foreach>
|
||||
</md-select>
|
||||
</md-input-container>
|
||||
<div layout="row" layout-wrap="layout-wrap">
|
||||
<md-input-container class="md-block" flex="50">
|
||||
<label><var:string label:value="Compose messages in"/></label>
|
||||
<md-select ng-model="app.preferences.defaults.SOGoMailComposeMessageType">
|
||||
<var:foreach list="composeMessagesType" item="item">
|
||||
<md-option var:value="item">
|
||||
<var:string value="itemComposeMessagesText"/>
|
||||
</md-option>
|
||||
</var:foreach>
|
||||
</md-select>
|
||||
</md-input-container>
|
||||
|
||||
<md-input-container class="md-block">
|
||||
<div layout="row" flex="50"
|
||||
ng-show="app.preferences.defaults.SOGoMailComposeMessageType == 'html'">
|
||||
<md-checkbox
|
||||
ng-model="app.preferences.defaults.SOGoMailComposeFontSizeEnabled"
|
||||
label:aria-label="Default font size">
|
||||
</md-checkbox>
|
||||
<md-input-container class="md-block md-flex">
|
||||
<label><var:string label:value="Default font size"/></label>
|
||||
<md-select label:aria-label="Default font size"
|
||||
ng-disabled="!app.preferences.defaults.SOGoMailComposeFontSizeEnabled"
|
||||
ng-required="app.preferences.defaults.SOGoMailComposeFontSizeEnabled"
|
||||
ng-model="app.preferences.defaults.SOGoMailComposeFontSize">
|
||||
<var:foreach list="fontSizesList" item="item">
|
||||
<md-option var:value="item">
|
||||
<var:string value="item"/>
|
||||
</md-option>
|
||||
</var:foreach>
|
||||
</md-select>
|
||||
<div class="md-char-counter">px</div>
|
||||
</md-input-container>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<md-input-container class="md-block" flex="50" flex-xs="100">
|
||||
<label><var:string label:value="Display remote inline images"/></label>
|
||||
<md-select ng-model="app.preferences.defaults.SOGoMailDisplayRemoteInlineImages">
|
||||
<var:foreach list="displayRemoteInlineImages" item="item">
|
||||
@@ -594,7 +617,8 @@
|
||||
<div layout="row" layout-align="start center">
|
||||
<p><var:string label:value="Auto save every"/></p>
|
||||
<md-input-container class="md-input-number" md-no-float="md-no-float">
|
||||
<input type="number" min="0" label:aria-label="minutes" ng-model="preferences.defaults.SOGoMailAutoSave"/>
|
||||
<input type="number" min="0" label:aria-label="minutes"
|
||||
ng-model="app.preferences.defaults.SOGoMailAutoSave"/>
|
||||
</md-input-container>
|
||||
<var:string label:value="minutes"/>
|
||||
</div>
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
<form name="eventForm" ng-submit="editor.save(eventForm)">
|
||||
<md-toolbar ng-class="editor.component.getClassName('bg')">
|
||||
<div class="md-toolbar-tools">
|
||||
<md-icon class="material-icons sg-icon-toolbar-bg">event</md-icon>
|
||||
<!-- summary -->
|
||||
<md-icon ng-if="editor.component.classification == 'confidential'">visibility_off</md-icon>
|
||||
<md-icon ng-if="editor.component.classification == 'private'">vpn_key</md-icon>
|
||||
|
||||
@@ -188,6 +188,17 @@
|
||||
</md-button>
|
||||
</md-menu-item>
|
||||
<md-menu-divider><!-- divider --></md-menu-divider>
|
||||
<md-menu-item>
|
||||
<md-button ng-click="app.showOnly(calendar)">
|
||||
<var:string label:value="Show Only This Calendar"/>
|
||||
</md-button>
|
||||
</md-menu-item>
|
||||
<md-menu-item>
|
||||
<md-button ng-click="app.showAll()">
|
||||
<var:string label:value="Show All Calendars"/>
|
||||
</md-button>
|
||||
</md-menu-item>
|
||||
<md-menu-divider><!-- divider --></md-menu-divider>
|
||||
<md-menu-item>
|
||||
<md-button ng-click="app.showLinks(calendar)">
|
||||
<var:string label:value="Links to this Calendar"/>
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
<form name="eventForm" ng-submit="editor.save(eventForm)">
|
||||
<md-toolbar ng-class="editor.component.getClassName('bg')">
|
||||
<div class="md-toolbar-tools">
|
||||
<md-icon class="material-icons sg-icon-toolbar-bg">assignment_turned_in</md-icon>
|
||||
<!-- summary -->
|
||||
<md-icon ng-if="editor.component.classification == 'confidential'">visibility_off</md-icon>
|
||||
<md-icon ng-if="editor.component.classification == 'private'">vpn_key</md-icon>
|
||||
|
||||
@@ -4,7 +4,7 @@ include ../common.make
|
||||
|
||||
WEBSERVER_RESOURCE_DIRS = css fonts img js
|
||||
JS_FILES = js/Administration.* js/Common.* js/Contacts.* js/Mailer.* js/Main.* js/Preferences.* js/Scheduler.* css/styles.*
|
||||
JS_LIB_FILES = js/vendor/angular-animate.* js/vendor/angular-aria.* js/vendor/angular-file-upload.min.js js/vendor/angular-material.* js/vendor/angular-sanitize.* js/vendor/angular-ui-router.* js/vendor/angular.* js/vendor/lodash.*
|
||||
JS_LIB_FILES = js/vendor/angular-animate.* js/vendor/angular-aria.* js/vendor/angular-file-upload.min.js js/vendor/ng-sortable.* js/vendor/angular-material.* js/vendor/angular-sanitize.* js/vendor/angular-ui-router.* js/vendor/angular.* js/vendor/lodash.*
|
||||
CSS_FILES = css/styles.css css/styles.css.map
|
||||
|
||||
.DEFAULT_GOAL := all
|
||||
@@ -26,7 +26,11 @@ prod:
|
||||
grunt --stack build
|
||||
git update-index --no-assume-unchanged $(CSS_FILES) $(JS_FILES) $(JS_LIB_FILES)
|
||||
git add -f $(CSS_FILES) $(JS_FILES) $(JS_LIB_FILES)
|
||||
git commit -m "(js/css) Update generated files"
|
||||
@if ! git diff --quiet --exit-code; then \
|
||||
git commit -m "(js/css) Update generated files"; \
|
||||
else \
|
||||
echo "Nothing to commit; skipping git-commit"; \
|
||||
fi
|
||||
git update-index --assume-unchanged $(CSS_FILES) $(JS_FILES) $(JS_LIB_FILES)
|
||||
|
||||
all:
|
||||
|
||||
@@ -2,8 +2,8 @@ module.exports = function(grunt) {
|
||||
var js_files = {
|
||||
'js/Common.js': ['js/Common/*.app.js', 'js/Common/*.filter.js', 'js/Common/*Controller.js', 'js/Common/*.service.js', 'js/Common/*.directive.js', 'js/Common/utils.js'],
|
||||
'js/Main.js': ['js/Main/Main.app.js'],
|
||||
'js/Scheduler.services.js': ['js/Scheduler/*.service.js'],
|
||||
'js/Scheduler.js': ['js/Scheduler/Scheduler.app.js', 'js/Scheduler/*Controller.js', 'js/Scheduler/*.directive.js'],
|
||||
'js/Scheduler.services.js': ['js/Scheduler/*.service.js', 'js/Scheduler/*Controller.js', 'js/Scheduler/*.directive.js'],
|
||||
'js/Scheduler.js': ['js/Scheduler/Scheduler.app.js'],
|
||||
'js/Contacts.services.js': ['js/Contacts/*.service.js'],
|
||||
'js/Contacts.js': ['js/Contacts/Contacts.app.js', 'js/Contacts/*Controller.js', 'js/Contacts/*.directive.js'],
|
||||
'js/Mailer.services.js': ['js/Mailer/*.service.js', 'js/Mailer/*Controller.js', 'js/Mailer/*.directive.js'],
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
function l(){var a,b,c=arguments[0],d=c,e=arguments;for(labels[c]?d=labels[c]:clabels[c]&&(d=clabels[c]),a=1,b=0;a<e.length;a++,b++)d=d.replace("%{"+b+"}",e[a]);return a=1,e.length>1&&(d=d.replace(/%((%)|s|d)/g,function(b){var c=null;if(b[2])c=b[2];else{switch(c=e[a],b){case"%d":c=parseFloat(c),isNaN(c)&&(c=0)}a++}return c})),d}function hexToRgb(a){var b=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(a);return b?{r:parseInt(b[1],16),g:parseInt(b[2],16),b:parseInt(b[3],16)}:null}function contrast(a){var b,c,d=1;if(b=hexToRgb(a)){c=[b.r/255,b.g/255,b.b/255];for(var e=0;e<c.length;++e)c[e]<=.03928?c[e]=c[e]/12.92:c[e]=Math.pow((c[e]+.055)/1.055,2.4);d=.2126*c[0]+.7152*c[1]+.0722*c[2]}return d>.179?"black":"white"}function guid(){function a(){return(65536*(1+Math.random())|0).toString(16).substring(1)}return(a()+a()+"-"+a()+"-4"+a().substr(0,3)+"-"+a()+"-"+a()+a()+a()).toLowerCase()}!function(){"use strict";function a(a,b,c,d){d.definePalette("sogo-green",{50:"eaf5e9",100:"cbe5c8",200:"aad6a5",300:"88c781",400:"66b86a",500:"56b04c",600:"4da143",700:"388e3c",800:"367d2e",900:"225e1b",A100:"ffffff",A200:"69f0ae",A400:"00e676",A700:"00c853",contrastDefaultColor:"dark",contrastLightColors:["300","400","500","600","700","800","900"]}),d.definePalette("sogo-blue",{50:"f0faf9",100:"e1f5f3",200:"ceebe8",300:"bfe0dd",400:"b2d6d3",500:"a1ccc8",600:"8ebfbb",700:"7db3b0",800:"639997",900:"4d8080",A100:"d4f7fa",A200:"c3f5fa",A400:"53e3f0",A700:"00b0c0",contrastDefaultColor:"light",contrastDarkColors:["50","100","200"]}),d.definePalette("sogo-paper",{50:"fcf7f8",100:"f7f1dc",200:"ede5ca",300:"e6d8ba",400:"e2d2a3",500:"d6c48d",600:"baa870",700:"857545",800:"524517",900:"433809",1000:"000000",A100:"ffffff",A200:"eeeeee",A400:"bdbdbd",A700:"616161",contrastDefaultColor:"dark",contrastLightColors:["800","900"]}),d.theme("default").primaryPalette("sogo-blue",{"default":"900","hue-1":"400","hue-2":"800","hue-3":"A700"}).accentPalette("sogo-green",{"default":"500","hue-1":"A100","hue-2":"300","hue-3":"A700"}).backgroundPalette("grey",{"default":"A100","hue-1":"200","hue-2":"300","hue-3":"500"}),DebugEnabled||(a.debugEnabled(!1),b.debugInfoEnabled(!1)),c.interceptors.push("AuthInterceptor"),c.interceptors.push("ErrorInterceptor")}function b(a,b){return{response:function(c){return c&&/^application\/json/.test(c.config.headers.Accept)&&/^<!DOCTYPE html>/.test(c.data)?(a.location.reload(!0),b.reject()):c}}}function c(a,b){return{responseError:function(c){return/^application\/json/.test(c.config.headers.Accept)&&a.$broadcast("http:Error",c),b.reject(c)}}}angular.module("SOGo.Common",["ngAnimate","ngSanitize","ngMaterial","mdColors"]).value("sgSettings",{isPopup:document.body.classList.contains("popup"),baseURL:function(){return ApplicationBaseURL||null},activeUser:function(a){var b={login:UserLogin||null,identification:UserIdentification||null,email:UserEmail||null,language:UserLanguage||null,folderURL:UserFolderURL||null,isSuperUser:IsSuperUser||null,path:{calendar:UserCalendarPath||null,contacts:UserContactsPath||null,mail:UserMailPath||null,preferences:UserPreferencesPath||null,administration:IsSuperUser?UserAdministrationPath:null,logoff:UserLogoffPath||null}};return a?b[a]:b}}).constant("sgColors",{selection:["#FFFFFF","#330033","#C0C0C0","#999999","#666666","#333333","#000000","#FFCCCC","#FF6666","#FF0000","#CC0000","#990000","#660000","#330000","#FFCC99","#FF9966","#FF9900","#FF6600","#CC6600","#993300","#663300","#FFFF99","#FFFF66","#FFCC66","#FFCC33","#CC9933","#996633","#663333","#FFFFCC","#FFFF33","#FFFF00","#FFCC00","#999900","#666600","#333300","#CCCCCC","#66FF99","#33FF33","#33CC00","#009900","#006600","#003300","#99FFFF","#33FFFF","#66CCCC","#00CCCC","#339999","#336666","#003333","#CCFFFF","#66FFFF","#33CCFF","#3366FF","#3333FF","#000099","#000066","#CCCCFF","#9999FF","#6666CC","#6633FF","#6600CC","#333399","#330099","#FFCCFF","#FF99FF","#CC66CC","#CC33CC","#993399","#663366","#99FF99"]}).constant("sgConstant",{xs:"(max-width: 599px)","gt-xs":"(min-width: 600px)",sm:"(min-width: 600px) and (max-width: 959px)","gt-sm":"(min-width: 960px)",md:"(min-width: 960px) and (max-width: 1279px)","gt-md":"(min-width: 1280px)",lg:"(min-width: 1280px) and (max-width: 1919px)","gt-lg":"(min-width: 1920px)",xl:"(min-width: 1920px)"}).config(a).factory("AuthInterceptor",b).factory("ErrorInterceptor",c),a.$inject=["$logProvider","$compileProvider","$httpProvider","$mdThemingProvider"],b.$inject=["$window","$q"],c.$inject=["$rootScope","$q"]}(),function(){"use strict";function a(a){c=a}function b(a,b,d){function e(a){var b=a.join("");return b}function f(a,b,c,d,e,f){if(e){var g="rgb("+e.value[0]+","+e.value[1]+","+e.value[2]+")",h="rgb("+e.contrast[0]+","+e.contrast[1]+","+e.contrast[2]+")",i={theme:c,palette:d,value:g,contrast:h,hue:f};s.insertRule(a(i),t),t+=1,s.insertRule(b(i),t),t+=1}}function g(a,b,c,d,e){if(d){var f="rgb("+d.value[0]+","+d.value[1]+","+d.value[2]+")";s.insertRule(a({theme:b,palette:c,value:f,hue:e}),t),t+=1}}functiLine truncated
|
||||
onFolderSelect:b.onFolderSelect},controller:d,controllerAs:"subscribe"})}}function d(a,b,c,d){var e=this;e.selectedUser=null,e.users=d.$users,e.searchTextOptions={updateOn:"default blur",debounce:{"default":300,blur:0}},e.onChange=function(){d.$filter(e.searchText).then(function(){e.selectedUser&&_.isUndefined(_.find(d.$users,function(a){return a.uid==e.selectedUser.uid}))&&(e.selectedUser=null)})},e.selectUser=function(a){e.selectedUser==e.users[a]?e.selectedUser=null:e.users[a].$folders(b).then(function(){e.selectedUser=e.users[a]})},e.selectFolder=function(a){c({folderData:a})},e.close=function(){a.hide()}}a.$inject=["User"],c.$inject=["$mdDialog"],d.$inject=["$mdDialog","folderType","onFolderSelect","User"],angular.module("SOGo.Common").directive("sgSubscribe",a)}(),function(){"use strict";function a(){return{template:['<div class="sg-time-pane">',' <div class="hours-pane">',' <div ng-repeat="hoursBigLine in hours" layout="row" layout-sm="column">',' <div ng-repeat="hoursLine in hoursBigLine" layout="row" class="hours">',' <md-button class="hourBtn md-fab md-mini" ng-repeat="hour in hoursLine" id="{{hour.id}}"',' ng-click="hourClickHandler(hour.displayName)">{{hour.displayName}}</md-button>'," </div>"," </div>"," </div>",' <div class="min5" ng-show="is5min()">',' <div layout="row" layout-sm="column">',' <div ng-repeat="minutesLine in min5" layout="row">',' <md-button class="minuteBtn md-fab md-mini" ng-repeat="minute in minutesLine" id="{{minute.id}}"',' ng-click="minuteClickHandler(minute.displayName)">{{minute.displayName}}</md-button>'," </div>"," </div>"," </div>",' <div class="sg-time-scroll-mask" ng-hide="is5min()">',' <div class="min1" layout="row" layout-sm="column" layout-wrap>',' <div ng-repeat="minutesLine in min1" layout="row" layout-align="space-around center" flex="50">',' <md-button class="minuteBtn md-fab md-mini" ng-repeat="minute in minutesLine" id="{{minute.id}}"',' ng-click="minuteClickHandler(minute.displayName)">{{minute.displayName}}</md-button>'," </div>"," </div>"," </div>",' <div flex layout="row" layout-align="center center" class="toggle-pane">',' <md-button class="toggleBtn md-fab md-mini" ng-bind="getToggleBtnLbl()" ng-click="toggleManual5min()"></md-button>'," </div>","</div>"].join(""),scope:{},require:["ngModel","sgTimePane"],controller:b,controllerAs:"ctrl",bindToController:!0,link:function(a,b,c,d){var e=d[0],f=d[1],g=b;f.configureNgModel(e,f,g)}}}function b(a,b,c,d,f,g,h,i,j,k,l){var m;this.$scope=c,this.$element=a,this.timePaneElement=a[0].querySelector(".sg-time-pane"),this.$animate=d,this.$q=f,this.$mdInkRipple=k,this.$mdUtil=l,this.keyCode=g.KEY_CODE,this.dateUtil=i,this.id=e++,this.ngModelCtrl=null,this.selectedTime=null,this.displayTime=null,this.isInitialized=!1,c.hours=[],c.hours[0]=[],c.hours[0][0]=[],c.hours[0][1]=[],c.hours[1]=[],c.hours[1][0]=[],c.hours[1][1]=[];for(var n=0;6>n;n++)c.hours[0][0][n]={id:"tp-"+this.id+"-hour-"+n,displayName:10>n?"0"+n:""+n,selected:!1},c.hours[0][1][n]={id:"tp-"+this.id+"-hour-"+(n+6),displayName:10>n+6?"0"+(n+6):""+(n+6),selected:!1},c.hours[1][0][n]={id:"tp-"+this.id+"-hour-"+(n+12),displayName:""+(n+12),selected:!1},c.hours[1][1][n]={id:"tp-"+this.id+"-hour-"+(n+18),displayName:""+(n+18),selected:!1};for(c.min5=[],c.min5[0]=[],c.min5[1]=[],n=0;6>n;n++)m=5*n,c.min5[0][n]={id:"tp-"+this.id+"-minute5-"+m,displayName:10>m?":0"+m:":"+m,selected:!0},c.min5[1][n]={id:"tp-"+this.id+"-minute5-"+(m+30),displayName:":"+(m+30),selected:!1};for(c.min1=[],n=0;12>n;n++){c.min1[n]=[];for(var o=0;5>o;o++)m=5*n+o,c.min1[n][o]={id:"tp-"+this.id+"-minute-"+m,displayName:10>m?":0"+m:":"+m,selected:!0}}c.show5min=!0,c.getToggleBtnLbl=function(){return c.is5min()?">>":"<<"},c.toggleManual5min=function(){c.manual5min=!c.is5min()},c.is5min=function(){return c.manual5min===!0||c.manual5min===!1?c.manual5min:c.show5min},b.tabindex||a.attr("tabindex","-1");var p=this;this.hourClickHandler=function(a){var b=new Date(p.displayTime);b.setHours(Number(a)),p.setNgModelValue(b,"hours")},c.hourClickHandler=this.hourClickHandler,this.minuteClickHandler=function(a){var b=a.substr(1),c=new Date(p.displayTime);c.setMinutes(Number(b)),p.setNgModelValue(c,"minutes")},c.minuteClickHandler=this.minuteClickHandler,this.attachTimePaneEventListeners()}angular.module("SOGo.Common").directive("sgTimePane",a);var c="md-bg",d="md-focus",e=0;b.$inject=["$element","$attrs","$scope","$animate","$q","$mdConstant","$mdTheming","$$mdDateUtil","$mdDateLocale","$mdInkRipple","$mdUtil"],b.prototype.configureNgModel=function(a,b,c){this.ngModelCtrl=a;var d=this;a.$render=function(){d.changeSelectedTime(d.ngModelCtrl.$viewValue,b,c)}},b.prototype.changeSelectedTime=function(a,b,d){var e=this.selectedTime;this.selectedTime=a,this.changeDisplayTime(a).then(function(){if(e){var d=e.getHours(),f=document.getElementById("tp-"+b.id+"-hour-"+d);f&&(f.cLine truncated
|
||||
function l(){var a,b,c=arguments[0],d=c,e=arguments;for(labels[c]?d=labels[c]:clabels[c]&&(d=clabels[c]),a=1,b=0;a<e.length;a++,b++)d=d.replace("%{"+b+"}",e[a]);return a=1,e.length>1&&(d=d.replace(/%((%)|s|d)/g,function(b){var c=null;if(b[2])c=b[2];else{switch(c=e[a],b){case"%d":c=parseFloat(c),isNaN(c)&&(c=0)}a++}return c})),d}function hexToRgb(a){var b=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(a);return b?{r:parseInt(b[1],16),g:parseInt(b[2],16),b:parseInt(b[3],16)}:null}function contrast(a){var b,c,d=1;if(b=hexToRgb(a)){c=[b.r/255,b.g/255,b.b/255];for(var e=0;e<c.length;++e)c[e]<=.03928?c[e]=c[e]/12.92:c[e]=Math.pow((c[e]+.055)/1.055,2.4);d=.2126*c[0]+.7152*c[1]+.0722*c[2]}return d>.179?"black":"white"}function guid(){function a(){return(65536*(1+Math.random())|0).toString(16).substring(1)}return(a()+a()+"-"+a()+"-4"+a().substr(0,3)+"-"+a()+"-"+a()+a()+a()).toLowerCase()}!function(){"use strict";function a(a,b,c,d){d.definePalette("sogo-green",{50:"eaf5e9",100:"cbe5c8",200:"aad6a5",300:"88c781",400:"66b86a",500:"56b04c",600:"4da143",700:"388e3c",800:"367d2e",900:"225e1b",A100:"ffffff",A200:"69f0ae",A400:"00e676",A700:"00c853",contrastDefaultColor:"dark",contrastLightColors:["300","400","500","600","700","800","900"]}),d.definePalette("sogo-blue",{50:"f0faf9",100:"e1f5f3",200:"ceebe8",300:"bfe0dd",400:"b2d6d3",500:"a1ccc8",600:"8ebfbb",700:"7db3b0",800:"639997",900:"4d8080",A100:"d4f7fa",A200:"c3f5fa",A400:"53e3f0",A700:"00b0c0",contrastDefaultColor:"light",contrastDarkColors:["50","100","200"]}),d.definePalette("sogo-paper",{50:"fcf7f8",100:"f7f1dc",200:"ede5ca",300:"e6d8ba",400:"e2d2a3",500:"d6c48d",600:"baa870",700:"857545",800:"524517",900:"433809",1000:"000000",A100:"ffffff",A200:"eeeeee",A400:"bdbdbd",A700:"616161",contrastDefaultColor:"dark",contrastLightColors:["800","900"]}),d.theme("default").primaryPalette("sogo-blue",{"default":"900","hue-1":"400","hue-2":"800","hue-3":"A700"}).accentPalette("sogo-green",{"default":"500","hue-1":"A100","hue-2":"300","hue-3":"A700"}).backgroundPalette("grey",{"default":"A100","hue-1":"200","hue-2":"300","hue-3":"500"}),DebugEnabled||(a.debugEnabled(!1),b.debugInfoEnabled(!1)),c.interceptors.push("AuthInterceptor"),c.interceptors.push("ErrorInterceptor")}function b(a,b){return{response:function(c){return c&&/^application\/json/.test(c.config.headers.Accept)&&/^<!DOCTYPE html>/.test(c.data)?(a.location.reload(!0),b.reject()):c}}}function c(a,b){return{responseError:function(c){return/^application\/json/.test(c.config.headers.Accept)&&a.$broadcast("http:Error",c),b.reject(c)}}}angular.module("SOGo.Common",["ngAnimate","ngSanitize","ngMaterial","mdColors"]).value("sgSettings",{isPopup:document.body.classList.contains("popup"),baseURL:function(){return ApplicationBaseURL||null},activeUser:function(a){var b={login:UserLogin||null,identification:UserIdentification||null,email:UserEmail||null,language:UserLanguage||null,folderURL:UserFolderURL||null,isSuperUser:IsSuperUser||null,path:{calendar:UserCalendarPath||null,contacts:UserContactsPath||null,mail:UserMailPath||null,preferences:UserPreferencesPath||null,administration:IsSuperUser?UserAdministrationPath:null,logoff:UserLogoffPath||null}};return a?b[a]:b}}).constant("sgColors",{selection:["#FFFFFF","#330033","#C0C0C0","#999999","#666666","#333333","#000000","#FFCCCC","#FF6666","#FF0000","#CC0000","#990000","#660000","#330000","#FFCC99","#FF9966","#FF9900","#FF6600","#CC6600","#993300","#663300","#FFFF99","#FFFF66","#FFCC66","#FFCC33","#CC9933","#996633","#663333","#FFFFCC","#FFFF33","#FFFF00","#FFCC00","#999900","#666600","#333300","#CCCCCC","#66FF99","#33FF33","#33CC00","#009900","#006600","#003300","#99FFFF","#33FFFF","#66CCCC","#00CCCC","#339999","#336666","#003333","#CCFFFF","#66FFFF","#33CCFF","#3366FF","#3333FF","#000099","#000066","#CCCCFF","#9999FF","#6666CC","#6633FF","#6600CC","#333399","#330099","#FFCCFF","#FF99FF","#CC66CC","#CC33CC","#993399","#663366","#99FF99"]}).constant("sgConstant",{xs:"(max-width: 599px)","gt-xs":"(min-width: 600px)",sm:"(min-width: 600px) and (max-width: 959px)","gt-sm":"(min-width: 960px)",md:"(min-width: 960px) and (max-width: 1279px)","gt-md":"(min-width: 1280px)",lg:"(min-width: 1280px) and (max-width: 1919px)","gt-lg":"(min-width: 1920px)",xl:"(min-width: 1920px)"}).config(a).factory("AuthInterceptor",b).factory("ErrorInterceptor",c),a.$inject=["$logProvider","$compileProvider","$httpProvider","$mdThemingProvider"],b.$inject=["$window","$q"],c.$inject=["$rootScope","$q"]}(),function(){"use strict";function a(a){c=a}function b(a,b,d){function e(a){var b=a.join("");return b}function f(a,b,c,d,e,f){if(e){var g="rgb("+e.value[0]+","+e.value[1]+","+e.value[2]+")",h="rgb("+e.contrast[0]+","+e.contrast[1]+","+e.contrast[2]+")",i={theme:c,palette:d,value:g,contrast:h,hue:f};s.insertRule(a(i),t),t+=1,s.insertRule(b(i),t),t+=1}}function g(a,b,c,d,e){if(d){var f="rgb("+d.value[0]+","+d.value[1]+","+d.value[2]+")";s.insertRule(a({theme:b,palette:c,value:f,hue:e}),t),t+=1}}functiLine truncated
|
||||
},controller:d,controllerAs:"subscribe"})}}function d(a,b,c,d){var e=this;e.selectedUser=null,e.users=d.$users,e.searchTextOptions={updateOn:"default blur",debounce:{"default":300,blur:0}},e.onChange=function(){d.$filter(e.searchText).then(function(){e.selectedUser&&_.isUndefined(_.find(d.$users,function(a){return a.uid==e.selectedUser.uid}))&&(e.selectedUser=null)})},e.selectUser=function(a){e.selectedUser==e.users[a]?e.selectedUser=null:e.users[a].$folders(b).then(function(){e.selectedUser=e.users[a]})},e.selectFolder=function(a){c({folderData:a})},e.close=function(){a.hide()}}a.$inject=["User"],c.$inject=["$mdDialog"],d.$inject=["$mdDialog","folderType","onFolderSelect","User"],angular.module("SOGo.Common").directive("sgSubscribe",a)}(),function(){"use strict";function a(){return{template:['<div class="sg-time-pane">',' <div class="hours-pane">',' <div ng-repeat="hoursBigLine in hours" layout="row" layout-sm="column">',' <div ng-repeat="hoursLine in hoursBigLine" layout="row" class="hours">',' <md-button class="hourBtn md-fab md-mini" ng-repeat="hour in hoursLine" id="{{hour.id}}"',' ng-click="hourClickHandler(hour.displayName)">{{hour.displayName}}</md-button>'," </div>"," </div>"," </div>",' <div class="min5" ng-show="is5min()">',' <div layout="row" layout-sm="column">',' <div ng-repeat="minutesLine in min5" layout="row">',' <md-button class="minuteBtn md-fab md-mini" ng-repeat="minute in minutesLine" id="{{minute.id}}"',' ng-click="minuteClickHandler(minute.displayName)">{{minute.displayName}}</md-button>'," </div>"," </div>"," </div>",' <div class="sg-time-scroll-mask" ng-hide="is5min()">',' <div class="min1" layout="row" layout-sm="column" layout-wrap>',' <div ng-repeat="minutesLine in min1" layout="row" layout-align="space-around center" flex="50">',' <md-button class="minuteBtn md-fab md-mini" ng-repeat="minute in minutesLine" id="{{minute.id}}"',' ng-click="minuteClickHandler(minute.displayName)">{{minute.displayName}}</md-button>'," </div>"," </div>"," </div>",' <div flex layout="row" layout-align="center center" class="toggle-pane">',' <md-button class="toggleBtn md-fab md-mini" ng-bind="getToggleBtnLbl()" ng-click="toggleManual5min()"></md-button>'," </div>","</div>"].join(""),scope:{},require:["ngModel","sgTimePane"],controller:b,controllerAs:"ctrl",bindToController:!0,link:function(a,b,c,d){var e=d[0],f=d[1],g=b;f.configureNgModel(e,f,g)}}}function b(a,b,c,d,f,g,h,i,j,k,l){var m;this.$scope=c,this.$element=a,this.timePaneElement=a[0].querySelector(".sg-time-pane"),this.$animate=d,this.$q=f,this.$mdInkRipple=k,this.$mdUtil=l,this.keyCode=g.KEY_CODE,this.dateUtil=i,this.id=e++,this.ngModelCtrl=null,this.selectedTime=null,this.displayTime=null,this.isInitialized=!1,c.hours=[],c.hours[0]=[],c.hours[0][0]=[],c.hours[0][1]=[],c.hours[1]=[],c.hours[1][0]=[],c.hours[1][1]=[];for(var n=0;6>n;n++)c.hours[0][0][n]={id:"tp-"+this.id+"-hour-"+n,displayName:10>n?"0"+n:""+n,selected:!1},c.hours[0][1][n]={id:"tp-"+this.id+"-hour-"+(n+6),displayName:10>n+6?"0"+(n+6):""+(n+6),selected:!1},c.hours[1][0][n]={id:"tp-"+this.id+"-hour-"+(n+12),displayName:""+(n+12),selected:!1},c.hours[1][1][n]={id:"tp-"+this.id+"-hour-"+(n+18),displayName:""+(n+18),selected:!1};for(c.min5=[],c.min5[0]=[],c.min5[1]=[],n=0;6>n;n++)m=5*n,c.min5[0][n]={id:"tp-"+this.id+"-minute5-"+m,displayName:10>m?":0"+m:":"+m,selected:!0},c.min5[1][n]={id:"tp-"+this.id+"-minute5-"+(m+30),displayName:":"+(m+30),selected:!1};for(c.min1=[],n=0;12>n;n++){c.min1[n]=[];for(var o=0;5>o;o++)m=5*n+o,c.min1[n][o]={id:"tp-"+this.id+"-minute-"+m,displayName:10>m?":0"+m:":"+m,selected:!0}}c.show5min=!0,c.getToggleBtnLbl=function(){return c.is5min()?">>":"<<"},c.toggleManual5min=function(){c.manual5min=!c.is5min()},c.is5min=function(){return c.manual5min===!0||c.manual5min===!1?c.manual5min:c.show5min},b.tabindex||a.attr("tabindex","-1");var p=this;this.hourClickHandler=function(a){var b=new Date(p.displayTime);b.setHours(Number(a)),p.setNgModelValue(b,"hours")},c.hourClickHandler=this.hourClickHandler,this.minuteClickHandler=function(a){var b=a.substr(1),c=new Date(p.displayTime);c.setMinutes(Number(b)),p.setNgModelValue(c,"minutes")},c.minuteClickHandler=this.minuteClickHandler,this.attachTimePaneEventListeners()}angular.module("SOGo.Common").directive("sgTimePane",a);var c="md-bg",d="md-focus",e=0;b.$inject=["$element","$attrs","$scope","$animate","$q","$mdConstant","$mdTheming","$$mdDateUtil","$mdDateLocale","$mdInkRipple","$mdUtil"],b.prototype.configureNgModel=function(a,b,c){this.ngModelCtrl=a;var d=this;a.$render=function(){d.changeSelectedTime(d.ngModelCtrl.$viewValue,b,c)}},b.prototype.changeSelectedTime=function(a,b,d){var e=this.selectedTime;this.selectedTime=a,this.changeDisplayTime(a).then(function(){if(e){var d=e.getHours(),f=document.getElementById("tp-"+b.id+"-hour-"+d);f&&(f.classList.remove(c),f.setAttribuLine truncated
|
||||
//# sourceMappingURL=Common.js.map
|
||||
@@ -1 +1 @@
|
||||
{"version":3,"sources":["Common/utils.js","Common/Common.app.js","Common/mdColors.app.js","Common/decodeUri.filter.js","Common/encodeUri.filter.js","Common/ensureTarget.filter.js","Common/loc.filter.js","Common/range.filter.js","Common/AclController.js","Common/navController.js","Common/Acl.service.js","Common/Alarm.service.js","Common/Authentication.service.js","Common/Dialog.service.js","Common/Gravatar.service.js","Common/Resource.service.js","Common/User.service.js","Common/sgFocus.service.js","Common/sgAvatarImage.directive.js","Common/sgColorPicker.directive.js","Common/sgCompile.directive.js","Common/sgEnter.directive.js","Common/sgEscape.directive.js","Common/sgFocus.directive.js","Common/sgFolderStylesheet.directive.js","Common/sgPlaceholder.directive.js","Common/sgSearch.directive.js","Common/sgSubscribe.directive.js","Common/sgTimepicker.directive.js","Common/sgToggleGrid.directive.js"],"names":["l","i","j","key","arguments","value","args","labels","clabels","length","replace","m","val","parseFloat","isNaN","hexToRgb","hex","result","exec","r","parseInt","g","b","contrast","color","c","Math","pow","guid","S4","random","toString","substring","substr","toLowerCase","configure","$logProvider","$compileProvider","$httpProvider","$mdThemingProvider","definePalette","50","100","200","300","400","500","600","700","800","900","A100","A200","A400","A700","contrastDefaultColor","contrastLightColors","contrastDarkColors","1000","theme","primaryPalette","default","hue-1","hue-2","hue-3","accentPalette","backgroundPalette","DebugEnabled","debugEnabled","debugInfoEnabled","interceptors","push","AuthInterceptor","$window","$q","response","test","config","headers","Accept","data","location","reload","reject","ErrorInterceptor","$rootScope","responseError","rejection","$broadcast","angular","module","isPopup","document","body","classList","contains","baseURL","ApplicationBaseURL","activeUser","param","settings","login","UserLogin","identification","UserIdentification","email","UserEmail","language","UserLanguage","folderURL","UserFolderURL","isSuperUser","IsSuperUser","path","calendar","UserCalendarPath","contacts","UserContactsPath","mail","UserMailPath","preferences","UserPreferencesPath","administration","UserAdministrationPath","logoff","UserLogoffPath","constant","selection","xs","gt-xs","sm","gt-sm","md","gt-md","lg","gt-lg","xl","factory","$inject","_$mdThemingProvider","runBlock","$interpolate","$document","$log","buildCssSelectors","selectors","join","addRule","fgInterpolate","bgInterpolate","themeName","paletteName","colorArray","hueName","colorValue","colorContrast","context","palette","hue","customSheet","insertRule","index","addBorderRule","bdrInterpolate","getStyleSheet","style","head","querySelector","createElement","title","appendChild","createTextNode","sheet","fgDefault","bgDefault","bdrDefault","fgDefaultHue","bgDefaultHue","fgColor","bgColor","bdrColor","fgHue","bgHue","cssRules","deleteRule","forEach","_THEMES","_PALETTES","colors","primary","name","hues","run","decodeUri","decodeURIComponent","filter","encodeUri","encodeURIComponent","ensureTarget","$sce","element","tree","find","attr","trustAs","html","loc","range","n","res","AclController","$mdDialog","Dialog","usersWithACL","User","folder","userFilter","$query","$filter","$acl","users","closeModal","$resetUsersRights","hide","saveModal","$saveUsersRights","then","status","alert","confirmChange","user","confirmation","$confirmRights","vm","showing","message","removeUser","$removeUser","uid","addUser","$addUser","userToAdd","searchText","selectedUid","selectUser","error","selectedUser","$rights","this","controller","navController","$scope","$timeout","$interval","$http","$mdSidenav","$mdToast","$mdMedia","sgConstant","sgSettings","Alarm","leftIsClose","isOpen","onHttpError","event","statusText","show","template","hideDelay","position","console","debug","currentDay","window","get","secondsBeforeTomorrow","toggleLeft","toggle","toggleRight","$watch","newVal","isGtMedium","$on","getAlarms","Acl","folderId","Settings","Resource","extend","$$resource","$User","prototype","$users","owner","_this","deferred","defer","acls","isDefined","userResource","fetch","canSubscribeUser","isSubscribed","wasSubscribed","bind","resolve","promise","_","indexOf","pluck","userClass","isGroup","splice","$resetRights","deferredSave","deferredSubscribe","action","$rightsAreDirty","$omit","save","$shadowRights","copy","rights","uids","all","currentAlarm","AlarmService","$toast","now","Date","browserTime","floor","getTime","alarms","sort","a","x","y","next","pop","utc","url","alarmTime","delay","f","showAlarm","cancel","AlarmController","scope","reminder","ok","summary","locals","Authentication","readCookie","foundCookie","prefix","pairs","currentPair","start","cookie","split","charAt","readLoginCookie","loginValues","base64decode","redirectUrl","username","domain","userName","address","baseAddress","altBaseAddress","parts","hostpart","protocol","newAddress","href","sLine truncated
|
||||
{"version":3,"sources":["Common/utils.js","Common/Common.app.js","Common/mdColors.app.js","Common/decodeUri.filter.js","Common/encodeUri.filter.js","Common/ensureTarget.filter.js","Common/loc.filter.js","Common/range.filter.js","Common/AclController.js","Common/navController.js","Common/Acl.service.js","Common/Alarm.service.js","Common/Authentication.service.js","Common/Dialog.service.js","Common/Gravatar.service.js","Common/Resource.service.js","Common/User.service.js","Common/sgFocus.service.js","Common/sgAvatarImage.directive.js","Common/sgColorPicker.directive.js","Common/sgCompile.directive.js","Common/sgEnter.directive.js","Common/sgEscape.directive.js","Common/sgFocus.directive.js","Common/sgFolderStylesheet.directive.js","Common/sgPlaceholder.directive.js","Common/sgSearch.directive.js","Common/sgSubscribe.directive.js","Common/sgTimepicker.directive.js","Common/sgToggleGrid.directive.js"],"names":["l","i","j","key","arguments","value","args","labels","clabels","length","replace","m","val","parseFloat","isNaN","hexToRgb","hex","result","exec","r","parseInt","g","b","contrast","color","c","Math","pow","guid","S4","random","toString","substring","substr","toLowerCase","configure","$logProvider","$compileProvider","$httpProvider","$mdThemingProvider","definePalette","50","100","200","300","400","500","600","700","800","900","A100","A200","A400","A700","contrastDefaultColor","contrastLightColors","contrastDarkColors","1000","theme","primaryPalette","default","hue-1","hue-2","hue-3","accentPalette","backgroundPalette","DebugEnabled","debugEnabled","debugInfoEnabled","interceptors","push","AuthInterceptor","$window","$q","response","test","config","headers","Accept","data","location","reload","reject","ErrorInterceptor","$rootScope","responseError","rejection","$broadcast","angular","module","isPopup","document","body","classList","contains","baseURL","ApplicationBaseURL","activeUser","param","settings","login","UserLogin","identification","UserIdentification","email","UserEmail","language","UserLanguage","folderURL","UserFolderURL","isSuperUser","IsSuperUser","path","calendar","UserCalendarPath","contacts","UserContactsPath","mail","UserMailPath","preferences","UserPreferencesPath","administration","UserAdministrationPath","logoff","UserLogoffPath","constant","selection","xs","gt-xs","sm","gt-sm","md","gt-md","lg","gt-lg","xl","factory","$inject","_$mdThemingProvider","runBlock","$interpolate","$document","$log","buildCssSelectors","selectors","join","addRule","fgInterpolate","bgInterpolate","themeName","paletteName","colorArray","hueName","colorValue","colorContrast","context","palette","hue","customSheet","insertRule","index","addBorderRule","bdrInterpolate","getStyleSheet","style","head","querySelector","createElement","title","appendChild","createTextNode","sheet","fgDefault","bgDefault","bdrDefault","fgDefaultHue","bgDefaultHue","fgColor","bgColor","bdrColor","fgHue","bgHue","cssRules","deleteRule","forEach","_THEMES","_PALETTES","colors","primary","name","hues","run","decodeUri","decodeURIComponent","filter","encodeUri","encodeURIComponent","ensureTarget","$sce","element","tree","find","attr","trustAs","html","loc","range","n","res","AclController","$mdDialog","Dialog","usersWithACL","User","folder","userFilter","$query","$filter","$acl","users","closeModal","$resetUsersRights","hide","saveModal","$saveUsersRights","then","status","alert","confirmChange","user","confirmation","$confirmRights","vm","showing","message","removeUser","$removeUser","uid","addUser","$addUser","userToAdd","searchText","selectedUid","selectUser","error","selectedUser","$rights","this","controller","navController","$scope","$timeout","$interval","$http","$mdSidenav","$mdToast","$mdMedia","sgConstant","sgSettings","Alarm","leftIsClose","isOpen","onHttpError","event","statusText","show","template","hideDelay","position","console","debug","currentDay","window","get","secondsBeforeTomorrow","toggleLeft","toggle","toggleRight","$watch","newVal","isGtMedium","$on","getAlarms","Acl","folderId","Settings","Resource","extend","$$resource","$User","prototype","$users","owner","_this","deferred","defer","acls","isDefined","userResource","fetch","canSubscribeUser","isSubscribed","wasSubscribed","bind","resolve","promise","_","indexOf","pluck","userClass","isGroup","splice","$resetRights","deferredSave","deferredSubscribe","action","$rightsAreDirty","$omit","save","$shadowRights","copy","rights","uids","all","currentAlarm","AlarmService","$toast","now","Date","browserTime","floor","getTime","alarms","sort","a","x","y","next","pop","utc","url","alarmTime","delay","f","showAlarm","cancel","AlarmController","scope","reminder","ok","summary","locals","Authentication","readCookie","foundCookie","prefix","pairs","currentPair","start","cookie","split","charAt","readLoginCookie","loginValues","base64decode","redirectUrl","username","domain","userName","address","baseAddress","altBaseAddress","parts","hostpart","protocol","newAddress","href","sLine truncated
|
||||
@@ -93,7 +93,7 @@
|
||||
*/
|
||||
getService.$inject = ['$q', '$http', 'passwordPolicyConfig'];
|
||||
function getService($q, $http, passwordPolicyConfig) {
|
||||
var _this = this, service;
|
||||
var service;
|
||||
|
||||
service = {
|
||||
login: function(data) {
|
||||
@@ -171,7 +171,7 @@
|
||||
|
||||
changePassword: function(newPassword) {
|
||||
var d = $q.defer(),
|
||||
loginCookie = _this.readLoginCookie();
|
||||
loginCookie = readLoginCookie();
|
||||
|
||||
$http({
|
||||
method: 'POST',
|
||||
|
||||
@@ -328,7 +328,7 @@ Date.prototype.beginOfDay = function() {
|
||||
return beginOfDay;
|
||||
};
|
||||
|
||||
Date.prototype.beginOfWeek = function() {
|
||||
Date.prototype.beginOfWeek = function(firstDayOfWeek) {
|
||||
var offset = firstDayOfWeek - this.getDay();
|
||||
if (offset > 0)
|
||||
offset -= 7;
|
||||
@@ -340,8 +340,8 @@ Date.prototype.beginOfWeek = function() {
|
||||
return beginOfWeek;
|
||||
};
|
||||
|
||||
Date.prototype.endOfWeek = function() {
|
||||
var endOfWeek = this.beginOfWeek();
|
||||
Date.prototype.endOfWeek = function(firstDayOfWeek) {
|
||||
var endOfWeek = this.beginOfWeek(firstDayOfWeek);
|
||||
endOfWeek.addDays(6);
|
||||
|
||||
endOfWeek.setHours(23);
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
!function(){"use strict";function a(a,f){a.state("app",{url:"/addressbooks","abstract":!0,views:{addressbooks:{templateUrl:"UIxContactFoldersView",controller:"AddressBooksController",controllerAs:"app"}},resolve:{stateAddressbooks:b}}).state("app.addressbook",{url:"/:addressbookId",views:{addressbook:{templateUrl:"addressbook",controller:"AddressBookController",controllerAs:"addressbook"}},resolve:{stateAddressbook:c}}).state("app.addressbook.new",{url:"/{contactType:(?:card|list)}/new",views:{card:{templateUrl:"UIxContactEditorTemplate",controller:"CardController",controllerAs:"editor"}},resolve:{stateCard:d}}).state("app.addressbook.card",{url:"/:cardId","abstract":!0,views:{card:{template:"<ui-view/>"}},resolve:{stateCard:e}}).state("app.addressbook.card.view",{url:"/view",views:{"card@app.addressbook":{templateUrl:"UIxContactViewTemplate",controller:"CardController",controllerAs:"editor"}}}).state("app.addressbook.card.editor",{url:"/edit",views:{"card@app.addressbook":{templateUrl:"UIxContactEditorTemplate",controller:"CardController",controllerAs:"editor"}}}),f.otherwise("/addressbooks/personal")}function b(a){return a.$findAll(window.contactFolders)}function c(a,b,c,d){var e=_.find(d.$findAll(),function(a){return a.id==c.addressbookId});return e?(e.selectedCard=!1,e.$reload(),e):a.reject("Addressbook "+c.addressbookId+" not found")}function d(a,b,c){var d="v"+a.contactType,e=new c({pid:a.addressbookId,c_component:d});return b.selectedCard=!0,e}function e(a,b){return b.selectedCard=a.cardId,b.$getCard(a.cardId)}function f(a,b,c){a.$on("$stateChangeError",function(a,d,e,f,g,h){b.error(h),c.go("app.addressbook",{addressbookId:"personal"})}),a.$on("$routeChangeError",function(a,c,d,e){b.error(a,c,d,e)})}angular.module("SOGo.ContactsUI",["ui.router","angularFileUpload","ck","SOGo.Common","SOGo.PreferencesUI","SOGo.MailerUI"]).config(a).run(f),a.$inject=["$stateProvider","$urlRouterProvider"],b.$inject=["AddressBook"],c.$inject=["$q","$state","$stateParams","AddressBook"],d.$inject=["$stateParams","stateAddressbook","Card"],e.$inject=["$stateParams","stateAddressbook"],f.$inject=["$rootScope","$log","$state"]}(),function(){"use strict";function a(a,b,c,d,e,f,g,h,i,j,k,m,n){function o(a){d.go("app.addressbook.card.view",{addressbookId:n.id,cardId:a.id})}function p(a,b){b.selected=!b.selected,a.preventDefault(),a.stopPropagation()}function q(a){function b(a,b,c,d){a.create=function(a){b.hide(),c.go("app.addressbook.new",{addressbookId:d,contactType:a})}}f.show({parent:angular.element(document.body),targetEvent:a,clickOutsideToClose:!0,escapeToClose:!0,template:['<md-dialog aria-label="'+l("Create component")+'">'," <md-dialog-content>",' <div layout="column">'," <md-button ng-click=\"create('card')\">"," "+l("Contact")," </md-button>"," <md-button ng-click=\"create('list')\">"," "+l("List")," </md-button>"," </div>"," </md-dialog-content>","</md-dialog>"].join(""),locals:{addressbookId:D.selectedFolder.id},controller:b}),b.$inject=["scope","$mdDialog","$state","addressbookId"]}function r(a,b){return a&&a.c_component==b&&!a.selected}function s(){_.each(D.selectedFolder.cards,function(a){a.selected=!1})}function t(){j.confirm(l("Warning"),l("Are you sure you want to delete the selected contacts?")).then(function(){var a=_.filter(D.selectedFolder.cards,function(a){return a.selected});D.selectedFolder.$deleteCards(a),delete D.selectedFolder.selectedCard},function(a,b){})}function u(){var a=_.filter(D.selectedFolder.cards,function(a){return a.selected}),b=_.pluck(a,"id");c.location.href=ApplicationBaseURL+"/"+D.selectedFolder.id+"/export?uid="+b.join("&uid=")}function v(a){var b=_.filter(D.selectedFolder.cards,function(a){return a.selected});D.selectedFolder.$copyCards(b,a).then(function(){},function(a){j.alert(l("Error"),a)})}function w(){_.each(D.selectedFolder.cards,function(a){a.selected=!0})}function x(a){D.selectedFolder.$filter("",{sort:a})}function y(a){return i.$query.sort==a}function z(){D.mode.search=!1,D.selectedFolder.$filter("")}function A(a,b){g.$findAll().then(function(c){var d=_.filter(c,function(a){return 0===a.id?a:void 0})[0];d.$getMailboxes().then(function(e){d.$newMessage().then(function(d){f.show({parent:angular.element(document.body),targetEvent:a,clickOutsideToClose:!1,escapeToClose:!1,templateUrl:"../Mail/UIxMailEditor",controller:"MessageEditorController",controllerAs:"editor",locals:{stateAccounts:c,stateMessage:d,stateRecipients:b}})})})})}function B(a,b,c){var d=[{full:c+" <"+b+">"}];D.newMessage(a,d),a.stopPropagation(),a.preventDefault()}function C(a){var c=_.filter(D.selectedFolder.cards,function(a){return a.selected}),d=[],e=[];_.each(c,function(a){"vcard"==a.c_component&&a.c_mail.length?e.push({full:a.c_cn+" <"+a.c_mail+">"}):a.$isList()&&(angular.isDefined(a.refs)&&a.refs.length?_.each(a.refs,function(a){a.email.length&&e.push({full:a.c_cn+" <"+a.email+">"})}):d.push(D.selectedFolder.$getCard(a.id).then(function(a){return a.$futureCardLine truncated
|
||||
!function(){"use strict";function a(a,f){a.state("app",{url:"/addressbooks","abstract":!0,views:{addressbooks:{templateUrl:"UIxContactFoldersView",controller:"AddressBooksController",controllerAs:"app"}},resolve:{stateAddressbooks:b}}).state("app.addressbook",{url:"/:addressbookId",views:{addressbook:{templateUrl:"addressbook",controller:"AddressBookController",controllerAs:"addressbook"}},resolve:{stateAddressbook:c}}).state("app.addressbook.new",{url:"/{contactType:(?:card|list)}/new",views:{card:{templateUrl:"UIxContactEditorTemplate",controller:"CardController",controllerAs:"editor"}},resolve:{stateCard:d}}).state("app.addressbook.card",{url:"/:cardId","abstract":!0,views:{card:{template:"<ui-view/>"}},resolve:{stateCard:e}}).state("app.addressbook.card.view",{url:"/view",views:{"card@app.addressbook":{templateUrl:"UIxContactViewTemplate",controller:"CardController",controllerAs:"editor"}}}).state("app.addressbook.card.editor",{url:"/edit",views:{"card@app.addressbook":{templateUrl:"UIxContactEditorTemplate",controller:"CardController",controllerAs:"editor"}}}),f.otherwise("/addressbooks/personal")}function b(a){return a.$findAll(window.contactFolders)}function c(a,b,c,d){var e=_.find(d.$findAll(),function(a){return a.id==c.addressbookId});return e?(e.selectedCard=!1,e.$reload(),e):a.reject("Addressbook "+c.addressbookId+" not found")}function d(a,b,c){var d="v"+a.contactType,e=new c({pid:a.addressbookId,c_component:d});return b.selectedCard=!0,e}function e(a,b){return b.selectedCard=a.cardId,b.$getCard(a.cardId)}function f(a,b,c){a.$on("$stateChangeError",function(a,d,e,f,g,h){b.error(h),c.go("app.addressbook",{addressbookId:"personal"})}),a.$on("$routeChangeError",function(a,c,d,e){b.error(a,c,d,e)})}angular.module("SOGo.ContactsUI",["ui.router","angularFileUpload","ck","SOGo.Common","SOGo.PreferencesUI","SOGo.MailerUI"]).config(a).run(f),a.$inject=["$stateProvider","$urlRouterProvider"],b.$inject=["AddressBook"],c.$inject=["$q","$state","$stateParams","AddressBook"],d.$inject=["$stateParams","stateAddressbook","Card"],e.$inject=["$stateParams","stateAddressbook"],f.$inject=["$rootScope","$log","$state"]}(),function(){"use strict";function a(a,b,c,d,e,f,g,h,i,j,k,m,n){function o(a){d.go("app.addressbook.card.view",{addressbookId:n.id,cardId:a.id})}function p(a,b){b.selected=!b.selected,a.preventDefault(),a.stopPropagation()}function q(a){function b(a,b,c,d){a.create=function(a){b.hide(),c.go("app.addressbook.new",{addressbookId:d,contactType:a})}}f.show({parent:angular.element(document.body),targetEvent:a,clickOutsideToClose:!0,escapeToClose:!0,template:['<md-dialog aria-label="'+l("Create component")+'">'," <md-dialog-content>",' <div layout="column">'," <md-button ng-click=\"create('card')\">"," "+l("Contact")," </md-button>"," <md-button ng-click=\"create('list')\">"," "+l("List")," </md-button>"," </div>"," </md-dialog-content>","</md-dialog>"].join(""),locals:{addressbookId:D.selectedFolder.id},controller:b}),b.$inject=["scope","$mdDialog","$state","addressbookId"]}function r(a,b){return a&&a.c_component==b&&!a.selected}function s(){_.each(D.selectedFolder.cards,function(a){a.selected=!1})}function t(){j.confirm(l("Warning"),l("Are you sure you want to delete the selected contacts?"),{ok:l("Delete")}).then(function(){var a=_.filter(D.selectedFolder.cards,function(a){return a.selected});D.selectedFolder.$deleteCards(a),delete D.selectedFolder.selectedCard},function(a,b){})}function u(){var a=_.filter(D.selectedFolder.cards,function(a){return a.selected}),b=_.pluck(a,"id");c.location.href=ApplicationBaseURL+"/"+D.selectedFolder.id+"/export?uid="+b.join("&uid=")}function v(a){var b=_.filter(D.selectedFolder.cards,function(a){return a.selected});D.selectedFolder.$copyCards(b,a).then(function(){},function(a){j.alert(l("Error"),a)})}function w(){_.each(D.selectedFolder.cards,function(a){a.selected=!0})}function x(a){D.selectedFolder.$filter("",{sort:a})}function y(a){return i.$query.sort==a}function z(){D.mode.search=!1,D.selectedFolder.$filter("")}function A(a,b){g.$findAll().then(function(c){var d=_.filter(c,function(a){return 0===a.id?a:void 0})[0];d.$getMailboxes().then(function(e){d.$newMessage().then(function(d){f.show({parent:angular.element(document.body),targetEvent:a,clickOutsideToClose:!1,escapeToClose:!1,templateUrl:"../Mail/UIxMailEditor",controller:"MessageEditorController",controllerAs:"editor",locals:{stateAccounts:c,stateMessage:d,stateRecipients:b}})})})})}function B(a,b,c){var d=[{full:c+" <"+b+">"}];D.newMessage(a,d),a.stopPropagation(),a.preventDefault()}function C(a){var c=_.filter(D.selectedFolder.cards,function(a){return a.selected}),d=[],e=[];_.each(c,function(a){"vcard"==a.c_component&&a.c_mail.length?e.push({full:a.c_cn+" <"+a.c_mail+">"}):a.$isList()&&(angular.isDefined(a.refs)&&a.refs.length?_.each(a.refs,function(a){a.email.length&&e.push({full:a.c_cn+" <"+a.email+">"})}):d.push(D.selectedFolder.$getCard(a.id).then(function(a){retLine truncated
|
||||
//# sourceMappingURL=Contacts.js.map
|
||||
@@ -1 +1 @@
|
||||
{"version":3,"sources":["Contacts/Contacts.app.js","Contacts/AddressBookController.js","Contacts/AddressBooksController.js","Contacts/CardController.js","Contacts/sgAddress.directive.js"],"names":["configure","$stateProvider","$urlRouterProvider","state","url","abstract","views","addressbooks","templateUrl","controller","controllerAs","resolve","stateAddressbooks","addressbook","stateAddressbook","card","stateCard","stateNewCard","template","card@app.addressbook","otherwise","AddressBook","$findAll","window","contactFolders","$q","$state","$stateParams","_","find","id","addressbookId","selectedCard","$reload","reject","Card","tag","contactType","pid","c_component","cardId","$getCard","runBlock","$rootScope","$log","$on","event","toState","toParams","fromState","fromParams","error","go","current","previous","rejection","angular","module","config","run","$inject","AddressBookController","$scope","$window","$timeout","$mdDialog","Account","Dialog","Settings","selectCard","toggleCardSelection","$event","selected","preventDefault","stopPropagation","newComponent","ev","ComponentDialogController","scope","create","type","hide","show","parent","element","document","body","targetEvent","clickOutsideToClose","escapeToClose","l","join","locals","vm","selectedFolder","notSelectedComponent","currentCard","unselectCards","each","cards","confirmDeleteSelectedCards","confirm","then","selectedCards","filter","$deleteCards","data","status","saveSelectedCards","selectedUIDs","pluck","location","href","ApplicationBaseURL","copySelectedCards","folder","$copyCards","alert","selectAll","sort","field","$filter","sortedBy","$query","cancelSearch","mode","search","newMessage","recipients","accounts","account","o","$getMailboxes","mailboxes","$newMessage","message","stateAccounts","stateMessage","stateRecipients","newMessageWithRecipient","recipient","fn","full","newMessageWithSelectedCards","promises","c_mail","length","push","c_cn","$isList","isDefined","refs","ref","email","$futureCardData","all","this","service","AddressBooksController","$mdToast","$mdMedia","$mdSidenav","FileUploader","focus","User","select","params","editMode","value","close","newAddressbook","prompt","name","isEditable","isRemote","owner","UserLogin","$add","edit","originalAddressbook","extend","$omit","revertEditing","save","$rename","confirmDelete","isSubscription","$delete","response","statusText","importCards","CardsImportDialogController","filterByExtension","item","isTextFile","indexOf","test","position","hideDelay","uploader","autoUpload","queueLimit","filters","onSuccessItem","headers","msg","imported","simple","content","onErrorItem","exportCards","showLinks","LinksDialogController","showProperties","PropertiesDialogController","srcAddressBook","saveProperties","$save","init","cancel","share","$acl","$users","usersWithACL","users","subscribeToFolder","addressbookData","console","debug","$subscribe","activeUser","CardController","transformCategory","input","isString","addOrgUnit","i","$addOrgUnit","addBirthday","birthday","Date","addScreenName","$addScreenName","addEmail","$addEmail","addPhone","$addPhone","addUrl","$addUrl","addAddress","$addAddress","addMember","$addMember","userFilter","excludedCards","dry","excludeLists","$cards","form","$valid","copy","reset","$reset","isNew","$fullname","ok","exportCard","currentFolder","toggleRawSource","showRawSource","rawSource","$$resource","post","allEmailTypes","$EMAIL_TYPES","allTelTypes","$TEL_TYPES","allUrlTypes","$URL_TYPES","allAddressTypes","$ADDRESS_TYPES","categories","userFilterResults","sgAddress","restrict","addressLines","lines","locality_region","street","street2","locality","region","country","postalcode","directive"],"mappings":"CAGA,WACE,YAUA,SAASA,GAAUC,EAAgBC,GACjCD,EACGE,MAAM,OACLC,IAAK,gBACLC,YAAU,EACVC,OACEC,cACEC,YAAa,wBACbC,WAAY,yBACZC,aAAc,QAGlBC,SACEC,kBAAmBA,KAGtBT,MAAM,mBACLC,IAAK,kBACLE,OACEO,aACEL,YAAa,cACbC,WAAY,wBACZC,aAAc,gBAGlBC,SACEG,iBAAkBA,KAGrBX,MAAM,uBACLC,IAAK,mCACLE,OACES,MACEP,YAAa,2BACbC,WAAY,iBACZC,aAAc,WAGlBC,SACEK,UAAWC,KAGdd,MAAM,wBACLC,IAAK,WACLC,YAAU,EACVC,OACES,MACEG,SAAU,eAGdP,SACEK,UAAWA,KAGdb,MAAM,6BACLC,IAAK,QACLE,OACEa,wBACEX,YAAa,yBACbC,WAAY,iBACZC,aAAc,aAInBP,MAAM,+BACLC,IAAK,QACLE,OACEa,wBACEX,YAAa,2BACbC,WAAY,iBACZC,aAAc,aAMtBR,EAAmBkB,UAAU,0BAO/B,QAASR,GAAkBS,GACzB,MAAOA,GAAYC,SAASC,OAAOC,gBAOrC,QAASV,GAAiBW,EAAIC,EAAQC,EAAcN,GAClD,GAAIR,GAAce,EAAEC,KAAKR,EAAYC,WAAY,SAAST,GACxD,MAAOA,GAAYiB,IAAMH,EAAaI,eAExC,OAAIlB,IACFA,EAAYmB,cAAe,EAC3BnB,EAAYoB,UACLpB,GAEFY,EAAGS,OAAO,eAAiBP,EAAaI,cAAgB,cAOjE,QAASd,GAAaU,EAAcb,EAAkBqB,GACpD,GAAIC,GAAM,IAAMT,EAAaU,YACzBtB,EAAO,GAAIoB,IAAOG,IAAKX,EAAaI,cAAeQ,YAAaH,GAEpE,OADAtB,GAAiBkB,cAAe,EACzBjB,EAOT,QAASC,GAAUW,EAAcb,GAE/B,MADAA,GAAiBkB,aAAeL,EAAaa,OACtC1B,EAAiB2B,SAASd,EAAaa,QAOhD,QAASE,GAASC,EAAYC,EAAMlB,GAClCiB,EAAWE,IAAI,oBAAqB,SAASC,EAAOC,EAASC,EAAUC,EAAWC,EAAYC,GAC5FP,EAAKO,MAAMA,GACXzB,EAAO0B,GAAG,mBAAqBrB,cAAe,eAEhDY,EAAWE,IAAI,oBAAqB,SAASC,EAAOO,EAASC,EAAUC,GACrEX,EAAKO,MAAML,EAAOO,EAASC,EAAUC,KA7IzCCLine truncated
|
||||
{"version":3,"sources":["Contacts/Contacts.app.js","Contacts/AddressBookController.js","Contacts/AddressBooksController.js","Contacts/CardController.js","Contacts/sgAddress.directive.js"],"names":["configure","$stateProvider","$urlRouterProvider","state","url","abstract","views","addressbooks","templateUrl","controller","controllerAs","resolve","stateAddressbooks","addressbook","stateAddressbook","card","stateCard","stateNewCard","template","card@app.addressbook","otherwise","AddressBook","$findAll","window","contactFolders","$q","$state","$stateParams","_","find","id","addressbookId","selectedCard","$reload","reject","Card","tag","contactType","pid","c_component","cardId","$getCard","runBlock","$rootScope","$log","$on","event","toState","toParams","fromState","fromParams","error","go","current","previous","rejection","angular","module","config","run","$inject","AddressBookController","$scope","$window","$timeout","$mdDialog","Account","Dialog","Settings","selectCard","toggleCardSelection","$event","selected","preventDefault","stopPropagation","newComponent","ev","ComponentDialogController","scope","create","type","hide","show","parent","element","document","body","targetEvent","clickOutsideToClose","escapeToClose","l","join","locals","vm","selectedFolder","notSelectedComponent","currentCard","unselectCards","each","cards","confirmDeleteSelectedCards","confirm","ok","then","selectedCards","filter","$deleteCards","data","status","saveSelectedCards","selectedUIDs","pluck","location","href","ApplicationBaseURL","copySelectedCards","folder","$copyCards","alert","selectAll","sort","field","$filter","sortedBy","$query","cancelSearch","mode","search","newMessage","recipients","accounts","account","o","$getMailboxes","mailboxes","$newMessage","message","stateAccounts","stateMessage","stateRecipients","newMessageWithRecipient","recipient","fn","full","newMessageWithSelectedCards","promises","c_mail","length","push","c_cn","$isList","isDefined","refs","ref","email","$futureCardData","all","this","service","AddressBooksController","$mdToast","$mdMedia","$mdSidenav","FileUploader","focus","User","select","params","editMode","value","close","newAddressbook","prompt","name","isEditable","isRemote","owner","UserLogin","$add","edit","originalAddressbook","extend","$omit","revertEditing","save","$rename","confirmDelete","isSubscription","$delete","response","statusText","importCards","CardsImportDialogController","filterByExtension","item","isTextFile","indexOf","test","position","hideDelay","uploader","autoUpload","queueLimit","filters","onSuccessItem","headers","msg","imported","simple","content","onErrorItem","exportCards","showLinks","LinksDialogController","showProperties","PropertiesDialogController","srcAddressBook","saveProperties","$save","init","cancel","share","$acl","$users","usersWithACL","users","subscribeToFolder","addressbookData","console","debug","$subscribe","activeUser","CardController","transformCategory","input","isString","addOrgUnit","i","$addOrgUnit","addBirthday","birthday","Date","addScreenName","$addScreenName","addEmail","$addEmail","addPhone","$addPhone","addUrl","$addUrl","addAddress","$addAddress","addMember","$addMember","userFilter","excludedCards","dry","excludeLists","$cards","form","$valid","copy","reset","$reset","isNew","$fullname","exportCard","currentFolder","toggleRawSource","showRawSource","rawSource","$$resource","post","allEmailTypes","$EMAIL_TYPES","allTelTypes","$TEL_TYPES","allUrlTypes","$URL_TYPES","allAddressTypes","$ADDRESS_TYPES","categories","userFilterResults","sgAddress","restrict","addressLines","lines","locality_region","street","street2","locality","region","country","postalcode","directive"],"mappings":"CAGA,WACE,YAUA,SAASA,GAAUC,EAAgBC,GACjCD,EACGE,MAAM,OACLC,IAAK,gBACLC,YAAU,EACVC,OACEC,cACEC,YAAa,wBACbC,WAAY,yBACZC,aAAc,QAGlBC,SACEC,kBAAmBA,KAGtBT,MAAM,mBACLC,IAAK,kBACLE,OACEO,aACEL,YAAa,cACbC,WAAY,wBACZC,aAAc,gBAGlBC,SACEG,iBAAkBA,KAGrBX,MAAM,uBACLC,IAAK,mCACLE,OACES,MACEP,YAAa,2BACbC,WAAY,iBACZC,aAAc,WAGlBC,SACEK,UAAWC,KAGdd,MAAM,wBACLC,IAAK,WACLC,YAAU,EACVC,OACES,MACEG,SAAU,eAGdP,SACEK,UAAWA,KAGdb,MAAM,6BACLC,IAAK,QACLE,OACEa,wBACEX,YAAa,yBACbC,WAAY,iBACZC,aAAc,aAInBP,MAAM,+BACLC,IAAK,QACLE,OACEa,wBACEX,YAAa,2BACbC,WAAY,iBACZC,aAAc,aAMtBR,EAAmBkB,UAAU,0BAO/B,QAASR,GAAkBS,GACzB,MAAOA,GAAYC,SAASC,OAAOC,gBAOrC,QAASV,GAAiBW,EAAIC,EAAQC,EAAcN,GAClD,GAAIR,GAAce,EAAEC,KAAKR,EAAYC,WAAY,SAAST,GACxD,MAAOA,GAAYiB,IAAMH,EAAaI,eAExC,OAAIlB,IACFA,EAAYmB,cAAe,EAC3BnB,EAAYoB,UACLpB,GAEFY,EAAGS,OAAO,eAAiBP,EAAaI,cAAgB,cAOjE,QAASd,GAAaU,EAAcb,EAAkBqB,GACpD,GAAIC,GAAM,IAAMT,EAAaU,YACzBtB,EAAO,GAAIoB,IAAOG,IAAKX,EAAaI,cAAeQ,YAAaH,GAEpE,OADAtB,GAAiBkB,cAAe,EACzBjB,EAOT,QAASC,GAAUW,EAAcb,GAE/B,MADAA,GAAiBkB,aAAeL,EAAaa,OACtC1B,EAAiB2B,SAASd,EAAaa,QAOhD,QAASE,GAASC,EAAYC,EAAMlB,GAClCiB,EAAWE,IAAI,oBAAqB,SAASC,EAAOC,EAASC,EAAUC,EAAWC,EAAYC,GAC5FP,EAAKO,MAAMA,GACXzB,EAAO0B,GAAG,mBAAqBrB,cAAe,eAEhDY,EAAWE,IAAI,oBAAqB,SAASC,EAAOO,EAASC,EAAUC,GACrEX,EAAKO,MAAML,EAAOO,EAASC,EAAUC,KA7IzCCLine truncated
|
||||
@@ -1,2 +1,2 @@
|
||||
!function(){"use strict";function a(b){if("function"!=typeof b.then)if(this.init(b),this.name&&!this.id){var c=a.$$resource.create("createFolder",this.name);this.$unwrap(c),this.acls={objectEditor:1,objectCreator:1,objectEraser:1}}else this.id&&(this.$acl=new a.$$Acl("Contacts/"+this.id));else this.$unwrap(b)}a.$factory=["$q","$timeout","$log","sgSettings","Resource","Card","Acl","Preferences",function(b,c,d,e,f,g,h,i){return angular.extend(a,{$q:b,$timeout:c,$log:d,$$resource:new f(e.activeUser("folderURL")+"Contacts",e.activeUser()),$Card:g,$$Acl:h,$Preferences:i,$query:{search:"name_or_address",value:"",sort:"c_cn",asc:1},activeUser:e.activeUser(),selectedFolder:null,$refreshTimeout:null}),i.ready().then(function(){i.settings.Contact.SortingState&&(a.$query.sort=i.settings.Contact.SortingState[0],a.$query.asc=parseInt(i.settings.Contact.SortingState[1]))}),a}];try{angular.module("SOGo.ContactsUI")}catch(b){angular.module("SOGo.ContactsUI",["SOGo.Common","SOGo.PreferencesUI"])}angular.module("SOGo.ContactsUI").factory("AddressBook",a.$factory),a.$filterAll=function(b,c,d){var e={search:b};if(!b)return a.$cards=[],a.$q.when(a.$cards);if(angular.isUndefined(a.$cards))a.$cards=[];else if(a.$query.value==b)return a.$q.when(a.$cards);return a.$query.value=b,angular.extend(e,c),a.$$resource.fetch(null,"allContactSearch",e).then(function(c){var e,f,g,h=function(a){return this.id==a.id};for(e=d?_.filter(c.contacts,function(a){return _.isUndefined(_.find(d,h,a))}):c.contacts,g=a.$cards.length-1;g>=0;g--)f=a.$cards[g],_.isUndefined(_.find(e,h,f))&&a.$cards.splice(g,1);return _.each(e,function(c,d){if(_.isUndefined(_.find(a.$cards,h,c))){var e=new a.$Card(c,b);a.$cards.splice(d,0,e)}}),a.$log.debug(a.$cards),a.$cards})},a.$add=function(a){var b,c,d;b=a.isSubscription?this.$subscriptions:this.$addressbooks,c=_.find(b,function(b){return"personal"==a.id||"personal"!=b.id&&1===b.name.localeCompare(a.name)}),d=c?_.indexOf(_.pluck(b,"id"),c.id):1,b.splice(d,0,a)},a.$findAll=function(b){var c=this;return b&&(this.$addressbooks=[],this.$subscriptions=[],this.$remotes=[],angular.forEach(b,function(b,d){var e=new a(b);e.isRemote?c.$remotes.push(e):e.isSubscription?c.$subscriptions.push(e):c.$addressbooks.push(e)})),_.union(this.$addressbooks,this.$subscriptions,this.$remotes)},a.$find=function(b){var c=a.$Preferences.ready().then(function(){return a.$$resource.fetch(b,"view",a.$query)});return new a(c)},a.$subscribe=function(b,c){var d=this;return a.$$resource.userResource(b).fetch(c,"subscribe").then(function(b){var c=new a(b);return _.isUndefined(_.find(d.$subscriptions,function(a){return a.id==b.id}))&&a.$add(c),c})},a.prototype.init=function(b,c){this.$cards||(this.$isLoading=!0,this.$cards=[],this.cards=[]),angular.extend(this,b),this.isOwned=a.activeUser.isSuperUser||this.owner==a.activeUser.login,this.isSubscription=!this.isRemote&&this.owner!=a.activeUser.login},a.prototype.$id=function(){return this.id?a.$q.when(this.id):this.$futureAddressBookData.then(function(a){return a.id})},a.prototype.isSelectedCard=function(a){return this.selectedCard==a},a.prototype.$selectedCount=function(){var a;return a=0,this.cards&&(a=_.filter(this.cards,function(a){return a.selected}).length),a},a.prototype.$startRefreshTimeout=function(){var b=this;a.$refreshTimeout&&a.$timeout.cancel(a.$refreshTimeout),a.$Preferences.ready().then(function(){var c=a.$Preferences.defaults.SOGoRefreshViewCheck;if(c&&"manually"!=c){var d=angular.bind(b,a.prototype.$reload);a.$refreshTimeout=a.$timeout(d,1e3*c.timeInterval())}})},a.prototype.$reload=function(){return this.$startRefreshTimeout(),this.$filter()},a.prototype.$filter=function(b,c,d){var e,f=this;return c&&c.dry?c.dry&&(e=angular.copy(a.$query)):(this.$isLoading=!0,e=a.$query),a.$Preferences.ready().then(function(){return c&&(angular.extend(e,c),c.dry&&!b)?(f.$cards=[],a.$q.when(f.$cards)):(angular.isDefined(b)&&(e.value=b),f.$id().then(function(b){return a.$$resource.fetch(b,"view",e)}).then(function(e){var g,h,i,j,k=function(a){return f.id==a.id};for(h=c&&c.dry?f.$cards:f.cards,g=d?_.filter(e.cards,function(a){return _.isUndefined(_.find(d,k,a))}):e.cards,j=h.length-1;j>=0;j--)i=h[j],_.isUndefined(_.find(g,k,i))&&h.splice(j,1);return _.each(g,function(c,d){if(_.isUndefined(_.find(h,k,c))){var e=new a.$Card(c,b);h.splice(d,0,e)}}),_.each(g,function(a,b){var c,d;h[b].id!=a.id&&(c=_.findIndex(h,k,a),d=h.splice(c,1),h.splice(b,0,d[0]))}),f.$isLoading=!1,h}))})},a.prototype.$rename=function(b){var c=_.indexOf(_.pluck(a.$addressbooks,"id"),this.id);return this.name=b,a.$addressbooks.splice(c,1),a.$add(this),this.$save()},a.prototype.$delete=function(){var b,c,d=this,e=a.$q.defer();return this.isSubscription?(c=a.$$resource.fetch(this.id,"unsubscribe"),b=a.$subscriptions):(c=a.$$resource.remove(this.id),b=a.$addressbooks),c.then(function(){var a=_.indexOf(_.pluck(b,"id"),d.id);b.splice(a,1),e.resolve()},e.reject),e.promise},a.prototype.$deleteCards=function(b){var c=_.map(b,function(a){return a.idLine truncated
|
||||
!function(){"use strict";function a(b){if("function"!=typeof b.then)if(this.init(b),this.name&&!this.id){var c=a.$$resource.create("createFolder",this.name);this.$unwrap(c),this.acls={objectEditor:1,objectCreator:1,objectEraser:1}}else this.id&&(this.$acl=new a.$$Acl("Contacts/"+this.id));else this.$unwrap(b)}a.$factory=["$q","$timeout","$log","sgSettings","Resource","Card","Acl","Preferences",function(b,c,d,e,f,g,h,i){return angular.extend(a,{$q:b,$timeout:c,$log:d,$$resource:new f(e.activeUser("folderURL")+"Contacts",e.activeUser()),$Card:g,$$Acl:h,$Preferences:i,$query:{search:"name_or_address",value:"",sort:"c_cn",asc:1},activeUser:e.activeUser(),selectedFolder:null,$refreshTimeout:null}),i.ready().then(function(){i.settings.Contact.SortingState&&(a.$query.sort=i.settings.Contact.SortingState[0],a.$query.asc=parseInt(i.settings.Contact.SortingState[1]))}),a}];try{angular.module("SOGo.ContactsUI")}catch(b){angular.module("SOGo.ContactsUI",["SOGo.Common","SOGo.PreferencesUI"])}angular.module("SOGo.ContactsUI").factory("AddressBook",a.$factory),a.$filterAll=function(b,c,d){var e={search:b};return b?(angular.isUndefined(a.$cards)&&(a.$cards=[]),angular.extend(e,c),a.$$resource.fetch(null,"allContactSearch",e).then(function(c){var e,f,g,h=function(a){return this.id==a.id};for(e=d?_.filter(c.contacts,function(a){return _.isUndefined(_.find(d,h,a))}):c.contacts,g=a.$cards.length-1;g>=0;g--)f=a.$cards[g],_.isUndefined(_.find(e,h,f))&&a.$cards.splice(g,1);return _.each(e,function(c,d){if(_.isUndefined(_.find(a.$cards,h,c))){var e=new a.$Card(c,b);a.$cards.splice(d,0,e)}}),a.$log.debug(a.$cards),a.$cards})):(a.$cards=[],a.$q.when(a.$cards))},a.$add=function(a){var b,c,d;b=a.isSubscription?this.$subscriptions:this.$addressbooks,c=_.find(b,function(b){return"personal"==a.id||"personal"!=b.id&&1===b.name.localeCompare(a.name)}),d=c?_.indexOf(_.pluck(b,"id"),c.id):1,b.splice(d,0,a)},a.$findAll=function(b){var c=this;return b&&(this.$addressbooks=[],this.$subscriptions=[],this.$remotes=[],angular.forEach(b,function(b,d){var e=new a(b);e.isRemote?c.$remotes.push(e):e.isSubscription?c.$subscriptions.push(e):c.$addressbooks.push(e)})),_.union(this.$addressbooks,this.$subscriptions,this.$remotes)},a.$find=function(b){var c=a.$Preferences.ready().then(function(){return a.$$resource.fetch(b,"view",a.$query)});return new a(c)},a.$subscribe=function(b,c){var d=this;return a.$$resource.userResource(b).fetch(c,"subscribe").then(function(b){var c=new a(b);return _.isUndefined(_.find(d.$subscriptions,function(a){return a.id==b.id}))&&a.$add(c),c})},a.prototype.init=function(b,c){this.$cards||(this.$isLoading=!0,this.$cards=[],this.cards=[]),angular.extend(this,b),this.isOwned=a.activeUser.isSuperUser||this.owner==a.activeUser.login,this.isSubscription=!this.isRemote&&this.owner!=a.activeUser.login},a.prototype.$id=function(){return this.id?a.$q.when(this.id):this.$futureAddressBookData.then(function(a){return a.id})},a.prototype.isSelectedCard=function(a){return this.selectedCard==a},a.prototype.$selectedCount=function(){var a;return a=0,this.cards&&(a=_.filter(this.cards,function(a){return a.selected}).length),a},a.prototype.$startRefreshTimeout=function(){var b=this;a.$refreshTimeout&&a.$timeout.cancel(a.$refreshTimeout),a.$Preferences.ready().then(function(){var c=a.$Preferences.defaults.SOGoRefreshViewCheck;if(c&&"manually"!=c){var d=angular.bind(b,a.prototype.$reload);a.$refreshTimeout=a.$timeout(d,1e3*c.timeInterval())}})},a.prototype.$reload=function(){return this.$startRefreshTimeout(),this.$filter()},a.prototype.$filter=function(b,c,d){var e,f=this;return c&&c.dry?c.dry&&(e=angular.copy(a.$query)):(this.$isLoading=!0,e=a.$query),a.$Preferences.ready().then(function(){return c&&(angular.extend(e,c),c.dry&&!b)?(f.$cards=[],a.$q.when(f.$cards)):(angular.isDefined(b)&&(e.value=b),f.$id().then(function(b){return a.$$resource.fetch(b,"view",e)}).then(function(e){var g,h,i,j,k=function(a){return f.id==a.id};for(h=c&&c.dry?f.$cards:f.cards,g=d?_.filter(e.cards,function(a){return _.isUndefined(_.find(d,k,a))}):e.cards,j=h.length-1;j>=0;j--)i=h[j],_.isUndefined(_.find(g,k,i))&&h.splice(j,1);return _.each(g,function(c,d){if(_.isUndefined(_.find(h,k,c))){var e=new a.$Card(c,b);h.splice(d,0,e)}}),_.each(g,function(a,b){var c,d;h[b].id!=a.id&&(c=_.findIndex(h,k,a),d=h.splice(c,1),h.splice(b,0,d[0]))}),f.$isLoading=!1,h}))})},a.prototype.$rename=function(b){var c=_.indexOf(_.pluck(a.$addressbooks,"id"),this.id);return this.name=b,a.$addressbooks.splice(c,1),a.$add(this),this.$save()},a.prototype.$delete=function(){var b,c,d=this,e=a.$q.defer();return this.isSubscription?(c=a.$$resource.fetch(this.id,"unsubscribe"),b=a.$subscriptions):(c=a.$$resource.remove(this.id),b=a.$addressbooks),c.then(function(){var a=_.indexOf(_.pluck(b,"id"),d.id);b.splice(a,1),e.resolve()},e.reject),e.promise},a.prototype.$deleteCards=function(b){var c=_.map(b,function(a){return a.id}),d=this;return a.$$resource.post(this.id,"batchDelete",{uids:c}).then(functLine truncated
|
||||
//# sourceMappingURL=Contacts.services.js.map
|
||||
@@ -1 +1 @@
|
||||
{"version":3,"sources":["Contacts/AddressBook.service.js","Contacts/Card.service.js"],"names":["AddressBook","futureAddressBookData","then","this","init","name","id","newAddressBookData","$$resource","create","$unwrap","acls","objectEditor","objectCreator","objectEraser","$acl","$$Acl","$factory","$q","$timeout","$log","Settings","Resource","Card","Acl","Preferences","angular","extend","activeUser","$Card","$Preferences","$query","search","value","sort","asc","selectedFolder","$refreshTimeout","ready","settings","Contact","SortingState","parseInt","module","e","factory","$filterAll","options","excludedCards","params","$cards","when","isUndefined","fetch","response","results","card","index","compareIds","data","_","filter","contacts","find","length","splice","each","debug","$add","addressbook","list","sibling","i","isSubscription","$subscriptions","$addressbooks","o","localeCompare","indexOf","pluck","$findAll","_this","$remotes","forEach","isRemote","push","union","$find","addressbookId","$subscribe","uid","path","userResource","addressbookData","prototype","$isLoading","cards","isOwned","isSuperUser","owner","login","$id","$futureAddressBookData","isSelectedCard","cardId","selectedCard","$selectedCount","count","selected","$startRefreshTimeout","cancel","refreshViewCheck","defaults","SOGoRefreshViewCheck","f","bind","$reload","timeInterval","$filter","query","dry","copy","isDefined","oldIndex","removedCards","findIndex","$rename","$save","$delete","promise","d","defer","remove","resolve","reject","$deleteCards","uids","map","post","difference","$copyCards","folder","save","$omit","$getCard","fullCard","cachedCard","$futureCardData","isError","isObject","key","futureCardData","partial","pid","newCardData","newguid","isNew","$TEL_TYPES","$EMAIL_TYPES","$URL_TYPES","$ADDRESS_TYPES","Gravatar","$gravatar","SOGoContactsCategories","$categories","SOGoAlternateAvatar","$alternateAvatar","join","$unwrapCollection","filterCategories","re","RegExp","category","collection","refs","categories","$$fullname","$fullname","$$email","$preferredEmail","$$image","image","no_404","empty","action","c_component","birthday","$birthday","$mdDateLocaleProvider","formatDate","$shadowData","attribute","names","fn","c_cn","c_givenname","nickname","c_sn","c_org","emails","$description","description","title","role","orgUnits","unit","email","test","type","$shortFormat","fullname","$isCard","$isList","$addOrgUnit","orgUnit","$addEmail","$addScreenName","screenName","c_screenname","$addPhone","phones","$addUrl","url","urls","$addAddress","postoffice","street","street2","locality","region","country","postalcode","addresses","$addMember","$reset","reference","Date","deep","getTime","toString","desc"],"mappings":"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 truncated
|
||||
{"version":3,"sources":["Contacts/AddressBook.service.js","Contacts/Card.service.js"],"names":["AddressBook","futureAddressBookData","then","this","init","name","id","newAddressBookData","$$resource","create","$unwrap","acls","objectEditor","objectCreator","objectEraser","$acl","$$Acl","$factory","$q","$timeout","$log","Settings","Resource","Card","Acl","Preferences","angular","extend","activeUser","$Card","$Preferences","$query","search","value","sort","asc","selectedFolder","$refreshTimeout","ready","settings","Contact","SortingState","parseInt","module","e","factory","$filterAll","options","excludedCards","params","isUndefined","$cards","fetch","response","results","card","index","compareIds","data","_","filter","contacts","find","length","splice","each","debug","when","$add","addressbook","list","sibling","i","isSubscription","$subscriptions","$addressbooks","o","localeCompare","indexOf","pluck","$findAll","_this","$remotes","forEach","isRemote","push","union","$find","addressbookId","$subscribe","uid","path","userResource","addressbookData","prototype","$isLoading","cards","isOwned","isSuperUser","owner","login","$id","$futureAddressBookData","isSelectedCard","cardId","selectedCard","$selectedCount","count","selected","$startRefreshTimeout","cancel","refreshViewCheck","defaults","SOGoRefreshViewCheck","f","bind","$reload","timeInterval","$filter","query","dry","copy","isDefined","oldIndex","removedCards","findIndex","$rename","$save","$delete","promise","d","defer","remove","resolve","reject","$deleteCards","uids","map","post","difference","$copyCards","folder","save","$omit","$getCard","fullCard","cachedCard","$futureCardData","isError","isObject","key","futureCardData","partial","pid","newCardData","newguid","isNew","$TEL_TYPES","$EMAIL_TYPES","$URL_TYPES","$ADDRESS_TYPES","Gravatar","$gravatar","SOGoContactsCategories","$categories","SOGoAlternateAvatar","$alternateAvatar","join","$unwrapCollection","filterCategories","re","RegExp","category","collection","refs","categories","$$fullname","$fullname","$$email","$preferredEmail","$$image","image","no_404","empty","action","c_component","birthday","$birthday","$mdDateLocaleProvider","formatDate","$shadowData","attribute","names","fn","c_cn","c_givenname","nickname","c_sn","c_org","emails","$description","description","title","role","orgUnits","unit","email","test","type","$shortFormat","fullname","$isCard","$isList","$addOrgUnit","orgUnit","$addEmail","$addScreenName","screenName","c_screenname","$addPhone","phones","$addUrl","url","urls","$addAddress","postoffice","street","street2","locality","region","country","postalcode","addresses","$addMember","$reset","reference","Date","deep","getTime","toString","desc"],"mappings":"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 truncated
|
||||
@@ -1,2 +1,2 @@
|
||||
!function(){"use strict";function a(a,l){a.state("mail",{url:"/Mail",views:{mailboxes:{templateUrl:"UIxMailMainFrame",controller:"MailboxesController",controllerAs:"app"}},resolve:{stateAccounts:b}}).state("mail.account",{url:"/:accountId","abstract":!0,views:{mailbox:{template:"<ui-view/>"}},resolve:{stateAccount:c}}).state("mail.account.virtualMailbox",{url:"/virtual",views:{"mailbox@mail":{templateUrl:"UIxMailFolderTemplate",controller:"MailboxController",controllerAs:"mailbox"}},resolve:{stateMailbox:g}}).state("mail.account.virtualMailbox.message",{url:"/:mailboxId/:messageId",views:{message:{templateUrl:"UIxMailViewTemplate",controller:"MessageController",controllerAs:"viewer"}},resolve:{stateMailbox:h,stateMessages:f,stateMessage:i}}).state("mail.account.inbox",{url:"/inbox",views:{"mailbox@mail":{templateUrl:"UIxMailFolderTemplate",controller:"MailboxController",controllerAs:"mailbox"}},resolve:{stateMailbox:e,stateMessages:f}}).state("mail.account.mailbox",{url:"/:mailboxId",views:{"mailbox@mail":{templateUrl:"UIxMailFolderTemplate",controller:"MailboxController",controllerAs:"mailbox"}},resolve:{stateMailbox:d,stateMessages:f}}).state("mail.account.mailbox.message",{url:"/:messageId",views:{message:{templateUrl:"UIxMailViewTemplate",controller:"MessageController",controllerAs:"viewer"}},onEnter:j,onExit:k,resolve:{stateMessage:i}}),l.otherwise("/Mail/0/inbox")}function b(a,b){var c=b.$findAll(window.mailAccounts),d=[];return angular.forEach(c,function(a,b){var c=a.$getMailboxes();d.push(c.then(function(b){return a}))}),a.all(d)}function c(a,b){return _.find(b,function(b){return b.id==a.accountId})}function d(a,b,c,d,e,f){var g,h,i=e(c.mailboxId);return h=function(a){var b=_.find(a,function(a){return a.path==i});return b||angular.forEach(a,function(a){!b&&a.children&&a.children.length>0&&(b=h(a.children))}),b},f.selectedFolder&&(f.selectedFolder.$isLoading=!0),g=h(d.$mailboxes),g?(g.$topIndex=0,g):b.go("mail.account.inbox")}function e(a,b){return b.selectedFolder&&(b.selectedFolder.$isLoading=!0),a.$mailboxes[0]}function f(a,b){return a.$virtualMode?[]:b.$filter()}function g(a,b){return b.$virtualMode?b.selectedFolder:a.reject("No virtual mailbox defined")}function h(a,b,c,d){var e=c(d.mailboxId);return b.$virtualMode?(b.selectedFolder.resetSelectedMessage(),_.find(b.selectedFolder.$mailboxes,function(a){return a.path==e})):a.reject("No virtual mailbox defined for message")}function i(a,b,c,d,e,f){var g;return(g=_.find(e.$messages,function(a){return a.uid==parseInt(c.messageId)}))?g.$reload():void d.go("mail.account.mailbox",{accountId:e.$account.id,mailboxId:b(e.path)})}function j(a,b){b.selectedMessage=parseInt(a.messageId)}function k(a){a.selectedMessage=-1}function l(a,b,c){a.$on("$stateChangeError",function(a,d,e,f,g,h){b.error(h),a.preventDefault(),"mail.account.inbox"!=d.name?c.go("mail.account.inbox"):c.go("mail")}),a.$on("$routeChangeError",function(a,c,d,e){b.error(a,c,d,e)})}angular.module("SOGo.MailerUI",["ui.router","ck","angularFileUpload","SOGo.Common","SOGo.ContactsUI","ngAnimate","SOGo.PreferencesUI"]).config(a).run(l),a.$inject=["$stateProvider","$urlRouterProvider"],b.$inject=["$q","Account"],c.$inject=["$stateParams","stateAccounts"],d.$inject=["$q","$state","$stateParams","stateAccount","decodeUriFilter","Mailbox"],e.$inject=["stateAccount","Mailbox"],f.$inject=["Mailbox","stateMailbox"],g.$inject=["$q","Mailbox"],h.$inject=["$q","Mailbox","decodeUriFilter","$stateParams"],i.$inject=["Mailbox","encodeUriFilter","$stateParams","$state","stateMailbox","stateMessages"],j.$inject=["$stateParams","stateMailbox"],k.$inject=["stateMailbox"],l.$inject=["$rootScope","$log","$state"]}();
|
||||
!function(){"use strict";function a(a,l){a.state("mail",{url:"/Mail",views:{mailboxes:{templateUrl:"UIxMailMainFrame",controller:"MailboxesController",controllerAs:"app"}},resolve:{stateAccounts:b}}).state("mail.account",{url:"/:accountId","abstract":!0,views:{mailbox:{template:"<ui-view/>"}},resolve:{stateAccount:c}}).state("mail.account.virtualMailbox",{url:"/virtual",views:{"mailbox@mail":{templateUrl:"UIxMailFolderTemplate",controller:"MailboxController",controllerAs:"mailbox"}},resolve:{stateMailbox:g}}).state("mail.account.virtualMailbox.message",{url:"/:mailboxId/:messageId",views:{message:{templateUrl:"UIxMailViewTemplate",controller:"MessageController",controllerAs:"viewer"}},resolve:{stateMailbox:h,stateMessages:f,stateMessage:i}}).state("mail.account.inbox",{url:"/inbox",views:{"mailbox@mail":{templateUrl:"UIxMailFolderTemplate",controller:"MailboxController",controllerAs:"mailbox"}},resolve:{stateMailbox:e,stateMessages:f}}).state("mail.account.mailbox",{url:"/:mailboxId",views:{"mailbox@mail":{templateUrl:"UIxMailFolderTemplate",controller:"MailboxController",controllerAs:"mailbox"}},resolve:{stateMailbox:d,stateMessages:f}}).state("mail.account.mailbox.message",{url:"/:messageId",views:{message:{templateUrl:"UIxMailViewTemplate",controller:"MessageController",controllerAs:"viewer"}},onEnter:j,onExit:k,resolve:{stateMessage:i}}),l.otherwise("/Mail/0/inbox")}function b(a,b){var c=b.$findAll(window.mailAccounts),d=[];return angular.forEach(c,function(a,b){var c=a.$getMailboxes();d.push(c.then(function(b){return a}))}),a.all(d)}function c(a,b){return _.find(b,function(b){return b.id==a.accountId})}function d(a,b,c,d,e,f){var g,h,i=e(c.mailboxId);return h=function(a){var b=_.find(a,function(a){return a.path==i});return b||angular.forEach(a,function(a){!b&&a.children&&a.children.length>0&&(b=h(a.children))}),b},f.selectedFolder&&(f.selectedFolder.$isLoading=!0),g=h(d.$mailboxes),g?(g.$topIndex=0,g):b.go("mail.account.inbox")}function e(a,b){return b.selectedFolder&&(b.selectedFolder.$isLoading=!0),a.$mailboxes[0]}function f(a,b){return a.$virtualMode?[]:b.$filter()}function g(a,b){return b.$virtualMode?b.selectedFolder:a.reject("No virtual mailbox defined")}function h(a,b,c,d){var e=c(d.mailboxId);return b.$virtualMode?(b.selectedFolder.resetSelectedMessage(),_.find(b.selectedFolder.$mailboxes,function(a){return a.path==e})):a.reject("No virtual mailbox defined for message")}function i(a,b,c,d,e,f){var g;return(g=_.find(e.$messages,function(a){return a.uid==parseInt(c.messageId)}))?g.$reload():void d.go("mail.account.mailbox",{accountId:e.$account.id,mailboxId:b(e.path)})}function j(a,b){b.selectedMessage=parseInt(a.messageId)}function k(a){a.selectedMessage=-1}function l(a,b,c){a.$on("$stateChangeError",function(a,d,e,f,g,h){b.error(h),a.preventDefault(),"mail.account.inbox"!=d.name?c.go("mail.account.inbox"):c.go("mail")}),a.$on("$routeChangeError",function(a,c,d,e){b.error(a,c,d,e)})}angular.module("SOGo.MailerUI",["ui.router","ck","angularFileUpload","SOGo.Common","SOGo.ContactsUI","SOGo.SchedulerUI","ngAnimate","SOGo.PreferencesUI"]).config(a).run(l),a.$inject=["$stateProvider","$urlRouterProvider"],b.$inject=["$q","Account"],c.$inject=["$stateParams","stateAccounts"],d.$inject=["$q","$state","$stateParams","stateAccount","decodeUriFilter","Mailbox"],e.$inject=["stateAccount","Mailbox"],f.$inject=["Mailbox","stateMailbox"],g.$inject=["$q","Mailbox"],h.$inject=["$q","Mailbox","decodeUriFilter","$stateParams"],i.$inject=["Mailbox","encodeUriFilter","$stateParams","$state","stateMailbox","stateMessages"],j.$inject=["$stateParams","stateMailbox"],k.$inject=["stateMailbox"],l.$inject=["$rootScope","$log","$state"]}();
|
||||
//# sourceMappingURL=Mailer.js.map
|
||||
@@ -1 +1 @@
|
||||
{"version":3,"sources":["Mailer/Mailer.app.js"],"names":["configure","$stateProvider","$urlRouterProvider","state","url","views","mailboxes","templateUrl","controller","controllerAs","resolve","stateAccounts","abstract","mailbox","template","stateAccount","mailbox@mail","stateMailbox","stateVirtualMailbox","message","stateVirtualMailboxOfMessage","stateMessages","stateMessage","stateInbox","onEnter","onEnterMessage","onExit","onExitMessage","otherwise","$q","Account","accounts","$findAll","window","mailAccounts","promises","angular","forEach","account","i","$getMailboxes","push","then","objects","all","$stateParams","_","find","id","accountId","$state","decodeUriFilter","Mailbox","_find","mailboxId","o","path","children","length","selectedFolder","$isLoading","$mailboxes","$topIndex","go","$virtualMode","$filter","reject","resetSelectedMessage","mailboxObject","encodeUriFilter","$messages","messageObject","uid","parseInt","messageId","$reload","$account","selectedMessage","runBlock","$rootScope","$log","$on","event","toState","toParams","fromState","fromParams","error","preventDefault","name","current","previous","rejection","module","config","run","$inject"],"mappings":"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","file":"Mailer.js","sourcesContent":["/* -*- Mode: javascript; indent-tabs-mode: nil; c-basic-offset: 2 -*- */\n/* JavaScript for SOGo.MailerUI module */\n\n(function() {\n 'use strict';\n\n angular.module('SOGo.MailerUI', ['ui.router', 'ck', 'angularFileUpload', 'SOGo.Common', 'SOGo.ContactsUI', 'ngAnimate', 'SOGo.PreferencesUI'])\n .config(configure)\n .run(runBlock);\n\n /**\n * @ngInject\n */\n configure.$inject = ['$stateProvider', '$urlRouterProvider'];\n function configure($stateProvider, $urlRouterProvider) {\n $stateProvider\n .state('mail', {\n url: '/Mail',\n views: {\n mailboxes: {\n templateUrl: 'UIxMailMainFrame', // UI/Templates/MailerUI/UIxMailMainFrame.wox\n controller: 'MailboxesController',\n controllerAs:Line truncated
|
||||
{"version":3,"sources":["Mailer/Mailer.app.js"],"names":["configure","$stateProvider","$urlRouterProvider","state","url","views","mailboxes","templateUrl","controller","controllerAs","resolve","stateAccounts","abstract","mailbox","template","stateAccount","mailbox@mail","stateMailbox","stateVirtualMailbox","message","stateVirtualMailboxOfMessage","stateMessages","stateMessage","stateInbox","onEnter","onEnterMessage","onExit","onExitMessage","otherwise","$q","Account","accounts","$findAll","window","mailAccounts","promises","angular","forEach","account","i","$getMailboxes","push","then","objects","all","$stateParams","_","find","id","accountId","$state","decodeUriFilter","Mailbox","_find","mailboxId","o","path","children","length","selectedFolder","$isLoading","$mailboxes","$topIndex","go","$virtualMode","$filter","reject","resetSelectedMessage","mailboxObject","encodeUriFilter","$messages","messageObject","uid","parseInt","messageId","$reload","$account","selectedMessage","runBlock","$rootScope","$log","$on","event","toState","toParams","fromState","fromParams","error","preventDefault","name","current","previous","rejection","module","config","run","$inject"],"mappings":"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","file":"Mailer.js","sourcesContent":["/* -*- Mode: javascript; indent-tabs-mode: nil; c-basic-offset: 2 -*- */\n/* JavaScript for SOGo.MailerUI module */\n\n(function() {\n 'use strict';\n\n angular.module('SOGo.MailerUI', ['ui.router', 'ck', 'angularFileUpload', 'SOGo.Common', 'SOGo.ContactsUI', 'SOGo.SchedulerUI', 'ngAnimate', 'SOGo.PreferencesUI'])\n .config(configure)\n .run(runBlock);\n\n /**\n * @ngInject\n */\n configure.$inject = ['$stateProvider', '$urlRouterProvider'];\n function configure($stateProvider, $urlRouterProvider) {\n $stateProvider\n .state('mail', {\n url: '/Mail',\n views: {\n mailboxes: {\n templateUrl: 'UIxMailMainFrame', // UI/Templates/MailerUI/UIxMailMainFrame.wox\n controller: 'MailboxesController',Line truncated
|
||||
@@ -1,3 +1,3 @@
|
||||
!function(){"use strict";function a(b){"function"!=typeof b.then&&(angular.extend(this,b),_.each(this.identities,function(a){a.fullName?a.full=a.fullName+" <"+a.email+">":a.full="<"+a.email+">"}),a.$log.debug("Account: "+JSON.stringify(b,void 0,2)))}a.$factory=["$q","$timeout","$log","sgSettings","Resource","Preferences","Mailbox","Message",function(b,c,d,e,f,g,h,i){return angular.extend(a,{$q:b,$timeout:c,$log:d,$$resource:new f(e.activeUser("folderURL")+"Mail",e.activeUser()),$Preferences:g,$Mailbox:h,$Message:i}),a}];try{angular.module("SOGo.MailerUI")}catch(b){angular.module("SOGo.MailerUI",["SOGo.Common"])}angular.module("SOGo.MailerUI").factory("Account",a.$factory),a.$findAll=function(b){return b?a.$unwrapCollection(b):a.$$resource.fetch("","mailAccounts").then(function(b){return a.$unwrapCollection(b)})},a.$unwrapCollection=function(b){var c=[];return angular.forEach(b,function(b,d){b.id=d,c[d]=new a(b)}),c},a.prototype.$getMailboxes=function(b){var c=this;return!this.$mailboxes||b&&b.reload?a.$Mailbox.$find(this).then(function(b){return c.$mailboxes=b,a.$Preferences.ready().then(function(){var b,d=function(a){_.forEach(a,function(a){a.$expanded=b.indexOf("/"+a.id)>=0,a.children&&a.children.length>0&&d(a.children)})};a.$Preferences.settings.Mail.ExpandedFolders&&(b=angular.isString(a.$Preferences.settings.Mail.ExpandedFolders)?angular.fromJson(a.$Preferences.settings.Mail.ExpandedFolders):a.$Preferences.settings.Mail.ExpandedFolders,b.length>0&&d(c.$mailboxes)),c.$flattenMailboxes({reload:!0})}),c.$mailboxes}):a.$q.when(this.$mailboxes)},a.prototype.$flattenMailboxes=function(b){var c=this,d=[],e=[],f=function(a){_.each(a,function(a){d.push(a),(b&&b.all||a.$expanded)&&a.children&&a.children.length>0&&f(a.children)})};return!this.$$flattenMailboxes||b&&(b.reload||b.all)?(f(this.$mailboxes),b&&b.all||(c.$$flattenMailboxes=d,b&&b.saveState&&(_.reduce(d,function(a,b){return b.$expanded&&a.push("/"+b.id),a},e),a.$$resource.post(null,"saveFoldersState",e)))):d=this.$$flattenMailboxes,d},a.prototype.$getMailboxByType=function(a){var b,c=function(b){var d=_.find(b,function(b){return b.type==a});return d||angular.forEach(b,function(a){!d&&a.children&&a.children.length>0&&(d=c(a.children))}),d};return b=c(this.$mailboxes)},a.prototype.$getMailboxByPath=function(a){var b=null,c=function(b){var d=_.find(b,function(b){return b.path==a});return d||angular.forEach(b,function(a){!d&&a.children&&a.children.length>0&&(d=c(a.children))}),d};return b=c(this.$mailboxes)},a.prototype.$newMailbox=function(b,c){var d=this;return a.$$resource.post(b.toString(),"createFolder",{name:c}).then(function(){d.$getMailboxes({reload:!0})})},a.prototype.updateQuota=function(a){var b,c,d;b=Math.round(1e4*a.usedSpace/a.maxQuota)/100,c=l("quotasFormat"),d=c.formatted(b,Math.round(a.maxQuota/10.24)/100),this.$quota={percent:b,description:d}},a.prototype.$newMessage=function(){var b=this;return a.$$resource.fetch(this.id.toString(),"compose").then(function(c){a.$log.debug("New message (compose): "+JSON.stringify(c,void 0,2));var d=new a.$Message(c.accountId,b.$getMailboxByPath(c.mailboxPath),c);return d}).then(function(b){return a.$$resource.fetch(b.$absolutePath({asDraft:!0}),"edit").then(function(c){return a.$log.debug("New message (edit): "+JSON.stringify(c,void 0,2)),angular.extend(b.editable,c),b.isNew=!0,b})})},a.prototype.$addDelegate=function(b){var c=this,d=a.$q.defer(),e={uid:b.uid};return!b.uid||_.indexOf(_.pluck(this.delegates,"uid"),b.uid)>-1?d.resolve():a.$$resource.fetch(this.id.toString(),"addDelegate",e).then(function(){c.delegates.push(b),d.resolve(c.users)},function(a,b){d.reject(l("An error occured please try again."))}),d.promise},a.prototype.$removeDelegate=function(b){var c=this,d={uid:b};return a.$$resource.fetch(this.id.toString(),"removeDelegate",d).then(function(){var a=_.indexOf(_.pluck(c.delegates,"uid"),b);a>=0&&c.delegates.splice(a,1)})}}(),function(){"use strict";function a(b,c){if(this.$account=b,"function"!=typeof c.then){if(this.init(c),this.name&&!this.path){var d=a.$$resource.create("createFolder",this.name);this.$unwrap(d)}}else this.$unwrap(c)}a.$factory=["$q","$timeout","$log","sgSettings","Resource","Message","Acl","Preferences","sgMailbox_PRELOAD",function(b,c,d,e,f,g,h,i,j){return angular.extend(a,{$q:b,$timeout:c,$log:d,$$resource:new f(e.activeUser("folderURL")+"Mail",e.activeUser()),$Message:g,$$Acl:h,$Preferences:i,$query:{sort:"date",asc:0},selectedFolder:null,$refreshTimeout:null,$virtualMode:!1,PRELOAD:j}),i.ready().then(function(){i.settings.Mail.SortingState&&(a.$query.sort=i.settings.Mail.SortingState[0],a.$query.asc=parseInt(i.settings.Mail.SortingState[1]))}),a}];try{angular.module("SOGo.MailerUI")}catch(b){angular.module("SOGo.MailerUI",["SOGo.Common"])}angular.module("SOGo.MailerUI").constant("sgMailbox_PRELOAD",{LOOKAHEAD:50,SIZE:100}).factory("Mailbox",a.$factory),a.$find=function(b){var c;return c=this.$$resource.fetch(b.id.toString(),"view"),a.$unwrapCollection(b,c)},a.$unwrapCLine truncated
|
||||
N.newSearchParam=v,N.showAdvancedSearch=r,N.hideAdvancedSearch=s,N.toggleAdvancedSearch=t,N.search={options:{"":l("Select a criteria"),subject:l("Enter Subject"),from:l("Enter From"),to:l("Enter To"),cc:l("Enter Cc"),body:l("Enter Body")},mailbox:"INBOX",subfolders:1,match:"AND",params:[]},N.refreshUnseenCount()}a.$inject=["$state","$timeout","$mdDialog","$mdToast","$mdMedia","$mdSidenav","sgFocus","encodeUriFilter","Dialog","sgSettings","Account","Mailbox","VirtualMailbox","User","Preferences","stateAccounts"],angular.module("SOGo.MailerUI").controller("MailboxesController",a)}(),function(){"use strict";function a(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o){function p(){var b,c,d={};return a.opener&&a.opener.$mailboxController&&a.opener.$mailboxController.selectedFolder.$id()==g.$id()&&(c=a.opener.$mailboxController,d.mailboxCtrl=c,a.opener.$messageController&&a.opener.$messageController.message.uid==h.uid&&(b=a.opener.$messageController,d.messageCtrl=b)),d}function q(a){D.$showDetailedRecipients=!0,a.stopPropagation(),a.preventDefault()}function r(){var a,b,d,e,f,i=p();i.messageCtrl?(a=i.mailboxCtrl.selectedFolder,b=i.messageCtrl.message,d=i.messageCtrl.$state):(a=g,b=h,d=c),a.$deleteMessages([b]).then(function(c){var g=c;if(b=null,angular.isDefined(d)){c>0&&(g-=1,e=a.$messages[g]),c<a.$messages.length&&(f=a.$messages[c]),e?e.isread&&f&&!f.isread&&(g=c,e=f):f&&(g=c,e=f);try{e?(d.go("mail.account.mailbox.message",{messageId:e.uid}),g<a.$topIndex?a.$topIndex=g:g>a.$lastVisibleIndex&&(a.$topIndex=g-(a.$lastVisibleIndex-a.$topIndex))):d.go("mail.account.mailbox")}catch(h){}}z()})}function s(a,b,c){null===E&&(angular.isDefined(c)||(c=[]),E=d.show({parent:angular.element(document.body),targetEvent:a,clickOutsideToClose:!1,escapeToClose:!1,templateUrl:"UIxMailEditor",controller:"MessageEditorController",controllerAs:"editor",locals:{stateAccounts:D.accounts,stateAccount:D.account,stateMessage:b,stateRecipients:c}})["finally"](function(){E=null,z()}))}function t(){c.go("mail.account.mailbox").then(function(){D.message=null,delete g.selectedMessage})}function u(a){var b=D.message.$reply();s(a,b)}function v(a){var b=D.message.$replyAll();s(a,b)}function w(a){var b=D.message.$forward();s(a,b)}function x(a){D.message.$editableContent().then(function(){s(a,D.message)})}function y(){var b=[j.baseURL(),"UIxMailPopupView#/Mail",D.message.accountId,i(i(D.message.$mailbox.path)),D.message.uid].join("/"),c=D.message.$absolutePath();F=a.open(b,c,["width=680","height=520","resizable=1","scrollbars=1","toolbar=0","location=0","directories=0","status=0","menubar=0","copyhistory=0"].join(","))}function z(){a.opener&&a.close()}function A(a,b){var c=D.account.$newMessage();s(a,c,[b]),a.stopPropagation(),a.preventDefault()}function B(){window.location.href=ApplicationBaseURL+"/"+D.mailbox.id+"/saveMessages?uid="+D.message.uid}function C(a){D.showRawSource||D.rawSource?D.showRawSource=!D.showRawSource:o.$$resource.post(D.message.id,"viewsource").then(function(a){D.rawSource=a,D.showRawSource=!0})}var D=this,E=null,F=null;a.$messageController=D,D.$state=c,D.accounts=e,D.account=f,D.mailbox=g,D.message=h,D.service=o,D.tags={searchText:"",selected:""},D.showFlags=h.flags&&h.flags.length>0,D.$showDetailedRecipients=!1,D.showDetailedRecipients=q,D.doDelete=r,D.close=t,D.reply=u,D.replyAll=v,D.forward=w,D.edit=x,D.openPopup=y,D.closePopup=z,D.newMessage=A,D.saveMessage=B,D.toggleRawSource=C,D.showRawSource=!1,a.opener&&(b.$watchCollection("viewer.message.flags",function(a,b){var c;(a||b)&&(c=p(),c.messageCtrl&&c.messageCtrl.service.$timeout(function(){c.messageCtrl.message.flags=a}))}),b.$watch("viewer.message.isflagged",function(a,b){var c=p();c.mailboxCtrl&&c.mailboxCtrl.service.$timeout(function(){var b=_.find(c.mailboxCtrl.selectedFolder.$messages,{uid:D.message.uid});b.isflagged=a})}))}a.$inject=["$window","$scope","$state","$mdDialog","stateAccounts","stateAccount","stateMailbox","stateMessage","encodeUriFilter","sgSettings","sgFocus","Dialog","Account","Mailbox","Message"],angular.module("SOGo.MailerUI").controller("MessageController",a)}(),function(){"use strict";function a(a,b,c,d,e,f,g,h,i,j,k,m,n,o,p){function q(){var b,c={};return a.opener&&a.opener.$mailboxController&&("draft"==a.opener.$mailboxController.selectedFolder.type?(c.draftMailboxCtrl=a.opener.$mailboxController,a.opener.$messageController&&a.opener.$messageController.message.uid==h.uid&&(c.draftMessageCtrl=a.opener.$messageController)):h.origin&&(b=h.origin.message,a.opener.$mailboxController.selectedFolder.$id()==b.$mailbox.$id()&&(c.originMailboxCtrl=a.opener.$mailboxController))),c}function r(){var a,b,c;if(z.message.attachmentAttrs)for(a=0;a<z.message.attachmentAttrs.length;a++)b={name:z.message.attachmentAttrs[a].filename,type:z.message.attachmentAttrs[a].mimetype,size:parseInt(z.message.attachmentAttrs[a].size)},c=new f.FileItem(z.uploader,b),c.progress=100,c.isUploaded=!0,c.isSuccess=!0,c.inlineUrl=z.message.attachmentAttrs[a].url,z.uploader.queue.push(c)}function s(a){Line truncated
|
||||
!function(){"use strict";function a(b){"function"!=typeof b.then&&(angular.extend(this,b),_.each(this.identities,function(a){a.fullName?a.full=a.fullName+" <"+a.email+">":a.full="<"+a.email+">"}),a.$log.debug("Account: "+JSON.stringify(b,void 0,2)))}a.$factory=["$q","$timeout","$log","sgSettings","Resource","Preferences","Mailbox","Message",function(b,c,d,e,f,g,h,i){return angular.extend(a,{$q:b,$timeout:c,$log:d,$$resource:new f(e.activeUser("folderURL")+"Mail",e.activeUser()),$Preferences:g,$Mailbox:h,$Message:i}),a}];try{angular.module("SOGo.MailerUI")}catch(b){angular.module("SOGo.MailerUI",["SOGo.Common"])}angular.module("SOGo.MailerUI").factory("Account",a.$factory),a.$findAll=function(b){return b?a.$unwrapCollection(b):a.$$resource.fetch("","mailAccounts").then(function(b){return a.$unwrapCollection(b)})},a.$unwrapCollection=function(b){var c=[];return angular.forEach(b,function(b,d){b.id=d,c[d]=new a(b)}),c},a.prototype.$getMailboxes=function(b){var c=this;return!this.$mailboxes||b&&b.reload?a.$Mailbox.$find(this).then(function(b){return c.$mailboxes=b,a.$Preferences.ready().then(function(){var b,d=function(a){_.forEach(a,function(a){a.$expanded=b.indexOf("/"+a.id)>=0,a.children&&a.children.length>0&&d(a.children)})};a.$Preferences.settings.Mail.ExpandedFolders&&(b=angular.isString(a.$Preferences.settings.Mail.ExpandedFolders)?angular.fromJson(a.$Preferences.settings.Mail.ExpandedFolders):a.$Preferences.settings.Mail.ExpandedFolders,b.length>0&&d(c.$mailboxes)),c.$flattenMailboxes({reload:!0})}),c.$mailboxes}):a.$q.when(this.$mailboxes)},a.prototype.$flattenMailboxes=function(b){var c=this,d=[],e=[],f=function(a){_.each(a,function(a){d.push(a),(b&&b.all||a.$expanded)&&a.children&&a.children.length>0&&f(a.children)})};return!this.$$flattenMailboxes||b&&(b.reload||b.all)?(f(this.$mailboxes),b&&b.all||(c.$$flattenMailboxes=d,b&&b.saveState&&(_.reduce(d,function(a,b){return b.$expanded&&a.push("/"+b.id),a},e),a.$$resource.post(null,"saveFoldersState",e)))):d=this.$$flattenMailboxes,d},a.prototype.$getMailboxByType=function(a){var b,c=function(b){var d=_.find(b,function(b){return b.type==a});return d||angular.forEach(b,function(a){!d&&a.children&&a.children.length>0&&(d=c(a.children))}),d};return b=c(this.$mailboxes)},a.prototype.$getMailboxByPath=function(a){var b=null,c=function(b){var d=_.find(b,function(b){return b.path==a});return d||angular.forEach(b,function(a){!d&&a.children&&a.children.length>0&&(d=c(a.children))}),d};return b=c(this.$mailboxes)},a.prototype.$newMailbox=function(b,c){var d=this;return a.$$resource.post(b.toString(),"createFolder",{name:c}).then(function(){d.$getMailboxes({reload:!0})})},a.prototype.updateQuota=function(a){var b,c,d;b=Math.round(1e4*a.usedSpace/a.maxQuota)/100,c=l("quotasFormat"),d=c.formatted(b,Math.round(a.maxQuota/10.24)/100),this.$quota={percent:b,description:d}},a.prototype.$newMessage=function(){var b=this;return a.$$resource.fetch(this.id.toString(),"compose").then(function(c){a.$log.debug("New message (compose): "+JSON.stringify(c,void 0,2));var d=new a.$Message(c.accountId,b.$getMailboxByPath(c.mailboxPath),c);return d}).then(function(b){return a.$$resource.fetch(b.$absolutePath({asDraft:!0}),"edit").then(function(c){return a.$log.debug("New message (edit): "+JSON.stringify(c,void 0,2)),angular.extend(b.editable,c),b.isNew=!0,b})})},a.prototype.$addDelegate=function(b){var c=this,d=a.$q.defer(),e={uid:b.uid};return!b.uid||_.indexOf(_.pluck(this.delegates,"uid"),b.uid)>-1?d.resolve():a.$$resource.fetch(this.id.toString(),"addDelegate",e).then(function(){c.delegates.push(b),d.resolve(c.users)},function(a,b){d.reject(l("An error occured please try again."))}),d.promise},a.prototype.$removeDelegate=function(b){var c=this,d={uid:b};return a.$$resource.fetch(this.id.toString(),"removeDelegate",d).then(function(){var a=_.indexOf(_.pluck(c.delegates,"uid"),b);a>=0&&c.delegates.splice(a,1)})}}(),function(){"use strict";function a(b,c){if(this.$account=b,"function"!=typeof c.then){if(this.init(c),this.name&&!this.path){var d=a.$$resource.create("createFolder",this.name);this.$unwrap(d)}}else this.$unwrap(c)}a.$factory=["$q","$timeout","$log","sgSettings","Resource","Message","Acl","Preferences","sgMailbox_PRELOAD",function(b,c,d,e,f,g,h,i,j){return angular.extend(a,{$q:b,$timeout:c,$log:d,$$resource:new f(e.activeUser("folderURL")+"Mail",e.activeUser()),$Message:g,$$Acl:h,$Preferences:i,$query:{sort:"date",asc:0},selectedFolder:null,$refreshTimeout:null,$virtualMode:!1,PRELOAD:j}),i.ready().then(function(){i.settings.Mail.SortingState&&(a.$query.sort=i.settings.Mail.SortingState[0],a.$query.asc=parseInt(i.settings.Mail.SortingState[1]))}),a}];try{angular.module("SOGo.MailerUI")}catch(b){angular.module("SOGo.MailerUI",["SOGo.Common"])}angular.module("SOGo.MailerUI").constant("sgMailbox_PRELOAD",{LOOKAHEAD:50,SIZE:100}).factory("Mailbox",a.$factory),a.$find=function(b){var c;return c=this.$$resource.fetch(b.id.toString(),"view"),a.$unwrapCollection(b,c)},a.$unwrapCLine truncated
|
||||
N.emptyTrashFolder=D,N.exportMails=E,N.confirmDelete=F,N.markFolderRead=G,N.share=H,N.metadataForFolder=I,N.setFolderAs=J,N.refreshUnseenCount=K,N.showingAdvancedSearch=!1,N.currentSearchParam="",N.addSearchParam=u,N.newSearchParam=v,N.showAdvancedSearch=r,N.hideAdvancedSearch=s,N.toggleAdvancedSearch=t,N.search={options:{"":l("Select a criteria"),subject:l("Enter Subject"),from:l("Enter From"),to:l("Enter To"),cc:l("Enter Cc"),body:l("Enter Body")},mailbox:"INBOX",subfolders:1,match:"AND",params:[]},N.refreshUnseenCount()}a.$inject=["$state","$timeout","$mdDialog","$mdToast","$mdMedia","$mdSidenav","sgFocus","encodeUriFilter","Dialog","sgSettings","Account","Mailbox","VirtualMailbox","User","Preferences","stateAccounts"],angular.module("SOGo.MailerUI").controller("MailboxesController",a)}(),function(){"use strict";function a(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q){function r(){var b,c,d={};return a.opener&&a.opener.$mailboxController&&a.opener.$mailboxController.selectedFolder.$id()==g.$id()&&(c=a.opener.$mailboxController,d.mailboxCtrl=c,a.opener.$messageController&&a.opener.$messageController.message.uid==h.uid&&(b=a.opener.$messageController,d.messageCtrl=b)),d}function s(a){I.$showDetailedRecipients=!0,a.stopPropagation(),a.preventDefault()}function t(){var a,b,d,e,f,i=r();i.messageCtrl?(a=i.mailboxCtrl.selectedFolder,b=i.messageCtrl.message,d=i.messageCtrl.$state):(a=g,b=h,d=c),a.$deleteMessages([b]).then(function(c){var g=c;if(b=null,angular.isDefined(d)){c>0&&(g-=1,e=a.$messages[g]),c<a.$messages.length&&(f=a.$messages[c]),e?e.isread&&f&&!f.isread&&(g=c,e=f):f&&(g=c,e=f);try{e?(d.go("mail.account.mailbox.message",{messageId:e.uid}),g<a.$topIndex?a.$topIndex=g:g>a.$lastVisibleIndex&&(a.$topIndex=g-(a.$lastVisibleIndex-a.$topIndex))):d.go("mail.account.mailbox")}catch(h){}}B()})}function u(a,b,c){null===J&&(angular.isDefined(c)||(c=[]),J=d.show({parent:angular.element(document.body),targetEvent:a,clickOutsideToClose:!1,escapeToClose:!1,templateUrl:"UIxMailEditor",controller:"MessageEditorController",controllerAs:"editor",locals:{stateAccounts:I.accounts,stateAccount:I.account,stateMessage:b,stateRecipients:c}})["finally"](function(){J=null,B()}))}function v(){c.go("mail.account.mailbox").then(function(){I.message=null,delete g.selectedMessage})}function w(a){var b=I.message.$reply();u(a,b)}function x(a){var b=I.message.$replyAll();u(a,b)}function y(a){var b=I.message.$forward();u(a,b)}function z(a){I.message.$editableContent().then(function(){u(a,I.message)})}function A(){var b=[j.baseURL(),"UIxMailPopupView#/Mail",I.message.accountId,i(i(I.message.$mailbox.path)),I.message.uid].join("/"),c=I.message.$absolutePath();K=a.open(b,c,["width=680","height=520","resizable=1","scrollbars=1","toolbar=0","location=0","directories=0","status=0","menubar=0","copyhistory=0"].join(","))}function B(){a.opener&&a.close()}function C(a,b){var c=I.account.$newMessage();u(a,c,[b]),a.stopPropagation(),a.preventDefault()}function D(){window.location.href=ApplicationBaseURL+"/"+I.mailbox.id+"/saveMessages?uid="+I.message.uid}function E(a){I.showRawSource||I.rawSource?I.showRawSource=!I.showRawSource:q.$$resource.post(I.message.id,"viewsource").then(function(a){I.rawSource=a,I.showRawSource=!0})}function F(a){return H(a,"appointment")}function G(a){return H(a,"task")}function H(a,b){I.message.$plainContent().then(function(c){var e={pid:m.$defaultCalendar(),type:b,summary:c.subject,comment:c.content},f=new n(e),g=[j.activeUser("folderURL"),"Calendar","UIx"+b.capitalize()+"EditorTemplate"].join("/");return d.show({parent:angular.element(document.body),targetEvent:a,clickOutsideToClose:!0,escapeToClose:!0,templateUrl:g,controller:"ComponentEditorController",controllerAs:"editor",locals:{stateComponent:f}})})}var I=this,J=null,K=null;a.$messageController=I,I.$state=c,I.accounts=e,I.account=f,I.mailbox=g,I.message=h,I.service=q,I.tags={searchText:"",selected:""},I.showFlags=h.flags&&h.flags.length>0,I.$showDetailedRecipients=!1,I.showDetailedRecipients=s,I.doDelete=t,I.close=v,I.reply=w,I.replyAll=x,I.forward=y,I.edit=z,I.openPopup=A,I.closePopup=B,I.newMessage=C,I.saveMessage=D,I.toggleRawSource=E,I.showRawSource=!1,I.convertToEvent=F,I.convertToTask=G,a.opener&&(b.$watchCollection("viewer.message.flags",function(a,b){var c;(a||b)&&(c=r(),c.messageCtrl&&c.messageCtrl.service.$timeout(function(){c.messageCtrl.message.flags=a}))}),b.$watch("viewer.message.isflagged",function(a,b){var c=r();c.mailboxCtrl&&c.mailboxCtrl.service.$timeout(function(){var b=_.find(c.mailboxCtrl.selectedFolder.$messages,{uid:I.message.uid});b.isflagged=a})}))}a.$inject=["$window","$scope","$state","$mdDialog","stateAccounts","stateAccount","stateMailbox","stateMessage","encodeUriFilter","sgSettings","sgFocus","Dialog","Calendar","Component","Account","Mailbox","Message"],angular.module("SOGo.MailerUI").controller("MessageController",a)}(),function(){"use strict";function a(a,b,c,d,e,f,g,h,i,j,k,m,n,o,p){function q(){var b,c={};return a.opener&&a.opener.$mailLine truncated
|
||||
//# sourceMappingURL=Mailer.services.js.map
|
||||
@@ -1 +1 @@
|
||||
{"version":3,"sources":["Mailer/Account.service.js","Mailer/Mailbox.service.js","Mailer/Message.service.js","Mailer/VirtualMailbox.service.js","Mailer/MailboxController.js","Mailer/MailboxesController.js","Mailer/MessageController.js","Mailer/MessageEditorController.js","Mailer/sgIMIP.directive.js","Mailer/sgZoomableImage.directive.js"],"names":["Account","futureAccountData","then","angular","extend","this","_","each","identities","identity","fullName","full","email","$log","debug","JSON","stringify","undefined","$factory","$q","$timeout","Settings","Resource","Preferences","Mailbox","Message","$$resource","activeUser","$Preferences","$Mailbox","$Message","module","e","factory","$findAll","data","$unwrapCollection","fetch","o","collection","forEach","i","id","prototype","$getMailboxes","options","_this","$mailboxes","reload","$find","ready","expandedFolders","_visit","mailboxes","$expanded","indexOf","children","length","settings","Mail","ExpandedFolders","isString","fromJson","$flattenMailboxes","when","allMailboxes","expandedMailboxes","push","all","$$flattenMailboxes","saveState","reduce","mailbox","post","$getMailboxByType","type","_find","find","$getMailboxByPath","path","$newMailbox","name","toString","updateQuota","percent","format","description","Math","round","usedSpace","maxQuota","l","formatted","$quota","$newMessage","message","accountId","mailboxPath","$absolutePath","asDraft","editable","isNew","$addDelegate","user","deferred","defer","param","uid","pluck","delegates","resolve","users","status","reject","promise","$removeDelegate","splice","account","futureMailboxData","$account","init","newMailboxData","create","$unwrap","Acl","PRELOAD","$$Acl","$query","sort","asc","selectedFolder","$refreshTimeout","$virtualMode","SortingState","parseInt","constant","LOOKAHEAD","SIZE","createMailboxes","level","index","quotas","map","split","component","asCSSIdentifier","join","$isLoading","$messages","uidsMap","$id","$acl","$isEditable","isEditable","isUndefined","$shadowData","$omit","getLength","getItemAtIndex","$lastVisibleIndex","max","$loadMessage","$selectedCount","count","filter","selected","isSelectedMessage","messageId","selectedMessage","$filter","sortingAttributes","filters","isDefined","unseenCount","cancel","searchInput","secondFilter","match","searchBy","copy","refreshViewCheck","defaults","SOGoRefreshViewCheck","f","bind","timeInterval","endIndex","uids","futureHeadersData","startIndex","loaded","subject","min","loading","$unwrapHeaders","$rename","findParent","parent","parentMailbox","$save","sibling","localeCompare","$compact","$setFolderAs","$emptyTrash","$markAsRead","$flagMessages","flags","operation","msgUIDs","$delete","remove","$_deleteMessages","messages","unseen","firstIndex","isread","forEachRight","selectedIndex","findIndex","$deleteMessages","$markOrUnMarkMessagesAsJunk","method","$copyMessages","folder","$moveMessages","$reset","value","key","save","error","$futureMailboxData","headers","$topIndex","invoke","threaded","msgs","msg","object","isError","j","messageHeaders","futureMessageData","lazy","$mailbox","$hasUnsafeContent","$loadUnsafeContent","to","cc","bcc","$formatFullAddresses","Gravatar","$gravatar","SOGoMailLabelsColors","$tags","SOGoMailDisplayRemoteInlineImages","$displayRemoteInlineImages","filterTags","query","re","RegExp","results","keys","tag","pair","search","color","draftId","$setUID","oldUID","constructor","shortname","replace","image","$shortRecipients","result","$shortAddress","address","allowReplyAll","recipientsCount","isDraft","loadUnsafeContent","$content","parts","part","msgclass","content","alternatePart","preferredPart","contentType","isArray","formattedMessage","$smime","validSignature","valid","mixedPart","safeContent","html","unsafeContent","document","createElement","innerHTML","suffix","element","elements","querySelectorAll","attr","removeAttr","participants","participant","compile","$editableContent","text","addTag","$addOrRemoveTag","removeTag","$imipAction","action","$reload","$sendMDN","shouldAskReceipt","$deleteAttachment","filename","attachmentAttrs","attachment","toggleFlag","isflagged","$reply","$newDraft","$replyAll","$forward","origin","response","$send","startsWith","isanswered","isforwarded","$futureMessageData","VirtualMailbox","setMailboxes","startSearch","params","stopSearch","resetSelectedMessage","len","k","MailboxController","$window","$state","$mdDialog","stateAccounts","stateAccount","stateMailbox","encodeUriFilter","Dialog","selectMessage","go","mailboxId","toggleMessageSelection","$event","preventDefault","stopPropagation","unselectMessages","vm","confirmDeleteSelectedMessages","confirm","deleteSelectedMessage","selectedMessages","unselectMessage","markOrUnMarkMessagesAsJunk","moveSelectedMessage","nextMessage","previousMessage","nextIndex","copySelectedMessages","selectedUIDs","moveSelectedMessages","saveSelectedMessages","window","location","href","ApplicationBaseURL","selectAll","markSelectedMessagesAsFlagged","d","markLine truncated
|
||||
{"version":3,"sources":["Mailer/Account.service.js","Mailer/Mailbox.service.js","Mailer/Message.service.js","Mailer/VirtualMailbox.service.js","Mailer/MailboxController.js","Mailer/MailboxesController.js","Mailer/MessageController.js","Mailer/MessageEditorController.js","Mailer/sgIMIP.directive.js","Mailer/sgZoomableImage.directive.js"],"names":["Account","futureAccountData","then","angular","extend","this","_","each","identities","identity","fullName","full","email","$log","debug","JSON","stringify","undefined","$factory","$q","$timeout","Settings","Resource","Preferences","Mailbox","Message","$$resource","activeUser","$Preferences","$Mailbox","$Message","module","e","factory","$findAll","data","$unwrapCollection","fetch","o","collection","forEach","i","id","prototype","$getMailboxes","options","_this","$mailboxes","reload","$find","ready","expandedFolders","_visit","mailboxes","$expanded","indexOf","children","length","settings","Mail","ExpandedFolders","isString","fromJson","$flattenMailboxes","when","allMailboxes","expandedMailboxes","push","all","$$flattenMailboxes","saveState","reduce","mailbox","post","$getMailboxByType","type","_find","find","$getMailboxByPath","path","$newMailbox","name","toString","updateQuota","percent","format","description","Math","round","usedSpace","maxQuota","l","formatted","$quota","$newMessage","message","accountId","mailboxPath","$absolutePath","asDraft","editable","isNew","$addDelegate","user","deferred","defer","param","uid","pluck","delegates","resolve","users","status","reject","promise","$removeDelegate","splice","account","futureMailboxData","$account","init","newMailboxData","create","$unwrap","Acl","PRELOAD","$$Acl","$query","sort","asc","selectedFolder","$refreshTimeout","$virtualMode","SortingState","parseInt","constant","LOOKAHEAD","SIZE","createMailboxes","level","index","quotas","map","split","component","asCSSIdentifier","join","$isLoading","$messages","uidsMap","$id","$acl","$isEditable","isEditable","$isNoInferiors","isNoInferiors","isUndefined","$shadowData","$omit","getLength","getItemAtIndex","$lastVisibleIndex","max","$loadMessage","$selectedCount","count","filter","selected","isSelectedMessage","messageId","selectedMessage","$filter","sortingAttributes","filters","isDefined","unseenCount","cancel","searchInput","secondFilter","match","searchBy","copy","refreshViewCheck","defaults","SOGoRefreshViewCheck","f","bind","timeInterval","endIndex","uids","futureHeadersData","startIndex","loaded","subject","min","loading","$unwrapHeaders","flags","$rename","findParent","parent","parentMailbox","$save","sibling","localeCompare","$compact","$setFolderAs","$emptyTrash","$markAsRead","$flagMessages","operation","msgUIDs","$delete","remove","$_deleteMessages","messages","unseen","firstIndex","isread","forEachRight","selectedIndex","findIndex","$deleteMessages","$markOrUnMarkMessagesAsJunk","method","$copyMessages","folder","$moveMessages","$reset","value","key","save","error","$futureMailboxData","headers","$topIndex","invoke","threaded","msgs","msg","object","isError","j","messageHeaders","futureMessageData","lazy","$mailbox","$hasUnsafeContent","$loadUnsafeContent","to","cc","bcc","$formatFullAddresses","Gravatar","$gravatar","SOGoMailLabelsColors","$tags","SOGoMailDisplayRemoteInlineImages","$displayRemoteInlineImages","filterTags","query","re","RegExp","results","keys","tag","pair","search","color","draftId","$setUID","oldUID","constructor","shortname","replace","image","$shortRecipients","result","$shortAddress","address","allowReplyAll","recipientsCount","isDraft","loadUnsafeContent","$content","parts","part","msgclass","content","alternatePart","preferredPart","contentType","isArray","formattedMessage","$smime","validSignature","valid","mixedPart","safeContent","html","unsafeContent","document","createElement","innerHTML","suffix","element","elements","querySelectorAll","attr","removeAttr","participants","participant","compile","$editableContent","text","$plainContent","addTag","$addOrRemoveTag","removeTag","$imipAction","action","$reload","$sendMDN","shouldAskReceipt","$deleteAttachment","filename","attachmentAttrs","attachment","toggleFlag","isflagged","$reply","$newDraft","$replyAll","$forward","origin","response","$send","startsWith","isanswered","isforwarded","$futureMessageData","VirtualMailbox","setMailboxes","startSearch","params","stopSearch","resetSelectedMessage","len","k","MailboxController","$window","$state","$mdDialog","stateAccounts","stateAccount","stateMailbox","encodeUriFilter","Dialog","selectMessage","go","mailboxId","toggleMessageSelection","$event","preventDefault","stopPropagation","unselectMessages","vm","confirmDeleteSelectedMessages","confirm","ok","deleteSelectedMessage","selectedMessages","unselectMessage","markOrUnMarkMessagesAsJunk","moveSelectedMessage","nextMessage","previousMessage","nextIndex","copySelectedMessages","selectedUIDs","moveSelectedMessages","saveSelectedMessages","window","location","href","ApplicationBaseURL"Line truncated
|
||||
@@ -4,7 +4,7 @@
|
||||
(function() {
|
||||
'use strict';
|
||||
|
||||
angular.module('SOGo.MailerUI', ['ui.router', 'ck', 'angularFileUpload', 'SOGo.Common', 'SOGo.ContactsUI', 'ngAnimate', 'SOGo.PreferencesUI'])
|
||||
angular.module('SOGo.MailerUI', ['ui.router', 'ck', 'angularFileUpload', 'SOGo.Common', 'SOGo.ContactsUI', 'SOGo.SchedulerUI', 'ngAnimate', 'SOGo.PreferencesUI'])
|
||||
.config(configure)
|
||||
.run(runBlock);
|
||||
|
||||
|
||||
@@ -362,6 +362,15 @@
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* @function $plainContent
|
||||
* @memberof Message.prototype
|
||||
* @returns the a plain text representation of the subject and body
|
||||
*/
|
||||
Message.prototype.$plainContent = function() {
|
||||
return Message.$$resource.fetch(this.$absolutePath(), 'viewplain');
|
||||
};
|
||||
|
||||
/**
|
||||
* @function addTag
|
||||
* @memberof Message.prototype
|
||||
@@ -576,27 +585,24 @@
|
||||
*/
|
||||
Message.prototype.$send = function() {
|
||||
var _this = this,
|
||||
data = angular.copy(this.editable),
|
||||
deferred = Message.$q.defer();
|
||||
data = angular.copy(this.editable);
|
||||
|
||||
Message.$log.debug('send = ' + JSON.stringify(data, undefined, 2));
|
||||
|
||||
Message.$$resource.post(this.$absolutePath({asDraft: true}), 'send', data).then(function(data) {
|
||||
return Message.$$resource.post(this.$absolutePath({asDraft: true}), 'send', data).then(function(data) {
|
||||
if (data.status == 'success') {
|
||||
deferred.resolve(data);
|
||||
if (angular.isDefined(_this.origin)) {
|
||||
if (_this.origin.action.startsWith('reply'))
|
||||
_this.origin.message.isanswered = true;
|
||||
else if (_this.origin.action == 'forward')
|
||||
_this.origin.message.isforwarded = true;
|
||||
}
|
||||
return data;
|
||||
}
|
||||
else {
|
||||
deferred.reject(data);
|
||||
return Message.$q.reject(data);
|
||||
}
|
||||
});
|
||||
|
||||
return deferred.promise;
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
/**
|
||||
* @ngInject
|
||||
*/
|
||||
MessageController.$inject = ['$window', '$scope', '$state', '$mdDialog', 'stateAccounts', 'stateAccount', 'stateMailbox', 'stateMessage', 'encodeUriFilter', 'sgSettings', 'sgFocus', 'Dialog', 'Account', 'Mailbox', 'Message'];
|
||||
function MessageController($window, $scope, $state, $mdDialog, stateAccounts, stateAccount, stateMailbox, stateMessage, encodeUriFilter, sgSettings, focus, Dialog, Account, Mailbox, Message) {
|
||||
MessageController.$inject = ['$window', '$scope', '$state', '$mdDialog', 'stateAccounts', 'stateAccount', 'stateMailbox', 'stateMessage', 'encodeUriFilter', 'sgSettings', 'sgFocus', 'Dialog', 'Calendar', 'Component', 'Account', 'Mailbox', 'Message'];
|
||||
function MessageController($window, $scope, $state, $mdDialog, stateAccounts, stateAccount, stateMailbox, stateMessage, encodeUriFilter, sgSettings, focus, Dialog, Calendar, Component, Account, Mailbox, Message) {
|
||||
var vm = this, messageDialog = null, popupWindow = null;
|
||||
|
||||
// Expose controller
|
||||
@@ -35,6 +35,8 @@
|
||||
vm.saveMessage = saveMessage;
|
||||
vm.toggleRawSource = toggleRawSource;
|
||||
vm.showRawSource = false;
|
||||
vm.convertToEvent = convertToEvent;
|
||||
vm.convertToTask = convertToTask;
|
||||
|
||||
// One-way refresh of the parent window when modifying the message from a popup window.
|
||||
if ($window.opener) {
|
||||
@@ -254,6 +256,45 @@
|
||||
vm.showRawSource = !vm.showRawSource;
|
||||
}
|
||||
}
|
||||
|
||||
function convertToEvent($event) {
|
||||
return convertToComponent($event, 'appointment');
|
||||
}
|
||||
|
||||
function convertToTask($event) {
|
||||
return convertToComponent($event, 'task');
|
||||
}
|
||||
|
||||
function convertToComponent($event, type) {
|
||||
vm.message.$plainContent().then(function(data) {
|
||||
var componentData = {
|
||||
pid: Calendar.$defaultCalendar(),
|
||||
type: type,
|
||||
summary: data.subject,
|
||||
comment: data.content
|
||||
};
|
||||
var component = new Component(componentData);
|
||||
// UI/Templates/SchedulerUI/UIxAppointmentEditorTemplate.wox or
|
||||
// UI/Templates/SchedulerUI/UIxTaskEditorTemplate.wox
|
||||
var templateUrl = [
|
||||
sgSettings.activeUser('folderURL'),
|
||||
'Calendar',
|
||||
'UIx' + type.capitalize() + 'EditorTemplate'
|
||||
].join('/');
|
||||
return $mdDialog.show({
|
||||
parent: angular.element(document.body),
|
||||
targetEvent: $event,
|
||||
clickOutsideToClose: true,
|
||||
escapeToClose: true,
|
||||
templateUrl: templateUrl,
|
||||
controller: 'ComponentEditorController',
|
||||
controllerAs: 'editor',
|
||||
locals: {
|
||||
stateComponent: component
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
angular
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
!function(){"use strict";function a(){var b=this;this.defaults={},this.settings={},this.defaultsPromise=a.$$resource.fetch("jsonDefaults").then(function(c){var d=_.object(_.map(c.SOGoMailLabelsColors,function(a,b){return"$"==b.charAt(0)?["_"+b,a]:[b,a]}));return c.SOGoMailLabelsColors=d,c.Vacation?(c.Vacation.endDate?c.Vacation.endDate=new Date(1e3*parseInt(c.Vacation.endDate)):(c.Vacation.endDateEnabled=0,c.Vacation.endDate=new Date),c.Vacation.autoReplyEmailAddresses&&c.Vacation.autoReplyEmailAddresses.length?c.Vacation.autoReplyEmailAddresses=c.Vacation.autoReplyEmailAddresses.join(","):delete c.Vacation.autoReplyEmailAddresses):c.Vacation={},angular.isUndefined(c.Vacation.autoReplyEmailAddresses)&&angular.isDefined(window.defaultEmailAddresses)&&(c.Vacation.autoReplyEmailAddresses=window.defaultEmailAddresses),angular.isUndefined(c.Vacation.daysBetweenResponse)&&(c.Vacation.daysBetweenResponse=7),angular.isUndefined(c.Vacation.endDate)&&(c.Vacation.endDateEnabled=0,c.Vacation.endDate=new Date),c.Forward&&c.Forward.forwardAddress&&(c.Forward.forwardAddress=c.Forward.forwardAddress.join(",")),angular.isUndefined(c.SOGoCalendarCategoriesColors)&&(c.SOGoCalendarCategoriesColors={},c.SOGoCalendarCategories=[]),angular.isUndefined(c.SOGoContactsCategories)&&(c.SOGoContactsCategories=[]),angular.extend(b.defaults,c),angular.extend(a.$mdDateLocaleProvider,c.locale),a.$mdDateLocaleProvider.firstDayOfWeek=parseInt(c.SOGoFirstDayOfWeek),a.$mdDateLocaleProvider.weekNumberFormatter=function(a){return l("Week %d",a)},a.$mdDateLocaleProvider.msgCalendar=l("Calender"),a.$mdDateLocaleProvider.msgOpenCalendar=l("Open Calendar"),a.$mdDateLocaleProvider.parseDate=function(b){return b?b.parseDate(a.$mdDateLocaleProvider,c.SOGoShortDateFormat):new Date(NaN)},a.$mdDateLocaleProvider.formatDate=function(b){return b?b.format(a.$mdDateLocaleProvider,c.SOGoShortDateFormat):""},a.$mdDateLocaleProvider.formatTime=function(b){return b?b.format(a.$mdDateLocaleProvider,c.SOGoTimeFormat):""},b.defaults}),this.settingsPromise=a.$$resource.fetch("jsonSettings").then(function(c){return c.Calendar&&(c.Calendar.PreventInvitationsWhitelist?c.Calendar.PreventInvitationsWhitelist=_.map(c.Calendar.PreventInvitationsWhitelist,function(b,c){var d=/^(.+)\s<(\S+)>$/.exec(b);return new a.$User({uid:c,cn:d[1],c_email:d[2]})}):c.Calendar.PreventInvitationsWhitelist=[]),angular.extend(b.settings,c),b.settings})}a.$factory=["$q","$timeout","$log","$mdDateLocale","sgSettings","Resource","User",function(b,c,d,e,f,g,h){return angular.extend(a,{$q:b,$timeout:c,$log:d,$mdDateLocaleProvider:e,$$resource:new g(f.activeUser("folderURL"),f.activeUser()),activeUser:f.activeUser(),$User:h}),new a}];try{angular.module("SOGo.PreferencesUI")}catch(b){angular.module("SOGo.PreferencesUI",["SOGo.Common"])}angular.module("SOGo.PreferencesUI").factory("Preferences",a.$factory),a.prototype.ready=function(){return a.$q.all([this.defaultsPromise,this.settingsPromise])},a.prototype.$save=function(){return a.$$resource.save("Preferences",this.$omit(!0)).then(function(a){return a})},a.prototype.$omit=function(a){var b,c,d;return b={},d={},angular.forEach(this,function(c,d){"constructor"!=d&&"$"!=d[0]&&(a?b[d]=angular.copy(c):b[d]=c)}),c=_.object(_.map(b.defaults.SOGoMailLabelsColors,function(a,b){return"_"==b.charAt(0)&&"$"==b.charAt(1)?b.length>2&&"$"==b.charAt(2)?[a[0].toLowerCase().replace(/[ \(\)\/\{%\*<>\\\"]/g,"_"),a]:[b.substring(1),a]:[b,a]})),b.defaults.SOGoMailLabelsColors=c,b.defaults.Vacation&&(b.defaults.Vacation.endDateEnabled?b.defaults.Vacation.endDate=b.defaults.Vacation.endDate.getTime()/1e3:b.defaults.Vacation.endDate=0,b.defaults.Vacation.autoReplyEmailAddresses?b.defaults.Vacation.autoReplyEmailAddresses=_.filter(b.defaults.Vacation.autoReplyEmailAddresses.split(","),function(a){return a.length}):b.defaults.Vacation.autoReplyEmailAddresses=[]),b.defaults.Forward&&b.defaults.Forward.forwardAddress&&(b.defaults.Forward.forwardAddress=b.defaults.Forward.forwardAddress.split(",")),b.settings.Calendar&&b.settings.Calendar.PreventInvitationsWhitelist&&(_.each(b.settings.Calendar.PreventInvitationsWhitelist,function(a){d[a.uid]=a.$shortFormat()}),b.settings.Calendar.PreventInvitationsWhitelist=d),b}}();
|
||||
!function(){"use strict";function a(){var b=this;this.defaults={},this.settings={},this.defaultsPromise=a.$$resource.fetch("jsonDefaults").then(function(c){var d=_.object(_.map(c.SOGoMailLabelsColors,function(a,b){return"$"==b.charAt(0)?["_"+b,a]:[b,a]}));return c.SOGoMailLabelsColors=d,c.SOGoMailAutoSave=parseInt(c.SOGoMailAutoSave)||0,c.SOGoMailComposeFontSizeEnabled=parseInt(c.SOGoMailComposeFontSize)>0,window.CKEDITOR&&c.SOGoMailComposeFontSizeEnabled&&(window.CKEDITOR.config.fontSize_defaultLabel=c.SOGoMailComposeFontSize,window.CKEDITOR.addCss(".cke_editable { font-size: "+c.SOGoMailComposeFontSize+"px; }")),c.Vacation?(c.Vacation.endDate?c.Vacation.endDate=new Date(1e3*parseInt(c.Vacation.endDate)):(c.Vacation.endDateEnabled=0,c.Vacation.endDate=new Date),c.Vacation.autoReplyEmailAddresses&&c.Vacation.autoReplyEmailAddresses.length?c.Vacation.autoReplyEmailAddresses=c.Vacation.autoReplyEmailAddresses.join(","):delete c.Vacation.autoReplyEmailAddresses):c.Vacation={},angular.isUndefined(c.Vacation.autoReplyEmailAddresses)&&angular.isDefined(window.defaultEmailAddresses)&&(c.Vacation.autoReplyEmailAddresses=window.defaultEmailAddresses),angular.isUndefined(c.Vacation.daysBetweenResponse)&&(c.Vacation.daysBetweenResponse=7),angular.isUndefined(c.Vacation.endDate)&&(c.Vacation.endDateEnabled=0,c.Vacation.endDate=new Date),c.Forward&&c.Forward.forwardAddress&&(c.Forward.forwardAddress=c.Forward.forwardAddress.join(",")),angular.isUndefined(c.SOGoCalendarCategoriesColors)&&(c.SOGoCalendarCategoriesColors={},c.SOGoCalendarCategories=[]),angular.isUndefined(c.SOGoContactsCategories)&&(c.SOGoContactsCategories=[]),angular.extend(b.defaults,c),b.$mdDateLocaleProvider=a.$mdDateLocaleProvider,angular.extend(b.$mdDateLocaleProvider,c.locale),b.$mdDateLocaleProvider.firstDayOfWeek=parseInt(c.SOGoFirstDayOfWeek),b.$mdDateLocaleProvider.weekNumberFormatter=function(a){return l("Week %d",a)},b.$mdDateLocaleProvider.msgCalendar=l("Calender"),b.$mdDateLocaleProvider.msgOpenCalendar=l("Open Calendar"),b.$mdDateLocaleProvider.parseDate=function(a){return a?a.parseDate(b.$mdDateLocaleProvider,c.SOGoShortDateFormat):new Date(NaN)},b.$mdDateLocaleProvider.formatDate=function(a){return a?a.format(b.$mdDateLocaleProvider,c.SOGoShortDateFormat):""},b.$mdDateLocaleProvider.formatTime=function(a){return a?a.format(b.$mdDateLocaleProvider,c.SOGoTimeFormat):""},b.defaults}),this.settingsPromise=a.$$resource.fetch("jsonSettings").then(function(c){return c.Calendar&&(c.Calendar.PreventInvitationsWhitelist?c.Calendar.PreventInvitationsWhitelist=_.map(c.Calendar.PreventInvitationsWhitelist,function(b,c){var d=/^(.+)\s<(\S+)>$/.exec(b);return new a.$User({uid:c,cn:d[1],c_email:d[2]})}):c.Calendar.PreventInvitationsWhitelist=[]),angular.extend(b.settings,c),b.settings})}a.$factory=["$q","$timeout","$log","$mdDateLocale","sgSettings","Resource","User",function(b,c,d,e,f,g,h){return angular.extend(a,{$q:b,$timeout:c,$log:d,$mdDateLocaleProvider:e,$$resource:new g(f.activeUser("folderURL"),f.activeUser()),activeUser:f.activeUser(),$User:h}),new a}];try{angular.module("SOGo.PreferencesUI")}catch(b){angular.module("SOGo.PreferencesUI",["SOGo.Common"])}angular.module("SOGo.PreferencesUI").factory("Preferences",a.$factory),a.prototype.ready=function(){return a.$q.all([this.defaultsPromise,this.settingsPromise])},a.prototype.$save=function(){return a.$$resource.save("Preferences",this.$omit(!0)).then(function(a){return a})},a.prototype.$omit=function(a){var b,c,d;return b={},d={},angular.forEach(this,function(c,d){"constructor"!=d&&"$"!=d[0]&&(a?b[d]=angular.copy(c):b[d]=c)}),c=_.object(_.map(b.defaults.SOGoMailLabelsColors,function(a,b){return"_"==b.charAt(0)&&"$"==b.charAt(1)?b.length>2&&"$"==b.charAt(2)?[a[0].toLowerCase().replace(/[ \(\)\/\{%\*<>\\\"]/g,"_"),a]:[b.substring(1),a]:[b,a]})),b.defaults.SOGoMailLabelsColors=c,b.defaults.SOGoMailComposeFontSizeEnabled||(b.defaults.SOGoMailComposeFontSize=0),delete b.defaults.SOGoMailComposeFontSizeEnabled,b.defaults.Vacation&&(b.defaults.Vacation.endDateEnabled?b.defaults.Vacation.endDate=b.defaults.Vacation.endDate.getTime()/1e3:b.defaults.Vacation.endDate=0,b.defaults.Vacation.autoReplyEmailAddresses?b.defaults.Vacation.autoReplyEmailAddresses=_.filter(b.defaults.Vacation.autoReplyEmailAddresses.split(","),function(a){return a.length}):b.defaults.Vacation.autoReplyEmailAddresses=[]),b.defaults.Forward&&b.defaults.Forward.forwardAddress&&(b.defaults.Forward.forwardAddress=b.defaults.Forward.forwardAddress.split(",")),b.settings.Calendar&&b.settings.Calendar.PreventInvitationsWhitelist&&(_.each(b.settings.Calendar.PreventInvitationsWhitelist,function(a){d[a.uid]=a.$shortFormat()}),b.settings.Calendar.PreventInvitationsWhitelist=d),b}}();
|
||||
//# sourceMappingURL=Preferences.services.js.map
|
||||
@@ -1 +1 @@
|
||||
{"version":3,"sources":["Preferences/Preferences.service.js"],"names":["Preferences","_this","this","defaults","settings","defaultsPromise","$$resource","fetch","then","data","labels","_","object","map","SOGoMailLabelsColors","value","key","charAt","Vacation","endDate","Date","parseInt","endDateEnabled","autoReplyEmailAddresses","length","join","angular","isUndefined","isDefined","window","defaultEmailAddresses","daysBetweenResponse","Forward","forwardAddress","SOGoCalendarCategoriesColors","SOGoCalendarCategories","SOGoContactsCategories","extend","$mdDateLocaleProvider","locale","firstDayOfWeek","SOGoFirstDayOfWeek","weekNumberFormatter","weekNumber","l","msgCalendar","msgOpenCalendar","parseDate","dateString","SOGoShortDateFormat","NaN","formatDate","date","format","formatTime","SOGoTimeFormat","settingsPromise","Calendar","PreventInvitationsWhitelist","match","exec","$User","uid","cn","c_email","$factory","$q","$timeout","$log","Settings","Resource","User","activeUser","module","e","factory","prototype","ready","all","$save","save","$omit","deep","preferences","whitelist","forEach","copy","toLowerCase","replace","substring","getTime","filter","split","v","each","user","$shortFormat"],"mappings":"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","file":"Preferences.services.js","sourcesContent":["/* -*- Mode: javascript; indent-tabs-mode: nil; c-basic-offset: 2 -*- */\n\n(function() {\n 'use strict';\n\n /**\n * @name Preferences\n * @constructor\n */\n functioLine truncated
|
||||
{"version":3,"sources":["Preferences/Preferences.service.js"],"names":["Preferences","_this","this","defaults","settings","defaultsPromise","$$resource","fetch","then","data","labels","_","object","map","SOGoMailLabelsColors","value","key","charAt","SOGoMailAutoSave","parseInt","SOGoMailComposeFontSizeEnabled","SOGoMailComposeFontSize","window","CKEDITOR","config","fontSize_defaultLabel","addCss","Vacation","endDate","Date","endDateEnabled","autoReplyEmailAddresses","length","join","angular","isUndefined","isDefined","defaultEmailAddresses","daysBetweenResponse","Forward","forwardAddress","SOGoCalendarCategoriesColors","SOGoCalendarCategories","SOGoContactsCategories","extend","$mdDateLocaleProvider","locale","firstDayOfWeek","SOGoFirstDayOfWeek","weekNumberFormatter","weekNumber","l","msgCalendar","msgOpenCalendar","parseDate","dateString","SOGoShortDateFormat","NaN","formatDate","date","format","formatTime","SOGoTimeFormat","settingsPromise","Calendar","PreventInvitationsWhitelist","match","exec","$User","uid","cn","c_email","$factory","$q","$timeout","$log","Settings","Resource","User","activeUser","module","e","factory","prototype","ready","all","$save","save","$omit","deep","preferences","whitelist","forEach","copy","toLowerCase","replace","substring","getTime","filter","split","v","each","user","$shortFormat"],"mappings":"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 truncated
|
||||
@@ -23,6 +23,18 @@
|
||||
|
||||
data.SOGoMailLabelsColors = labels;
|
||||
|
||||
// Mail editor autosave is a number of minutes or 0 if disabled
|
||||
data.SOGoMailAutoSave = parseInt(data.SOGoMailAutoSave) || 0;
|
||||
|
||||
// Specify a base font size for HTML messages when SOGoMailComposeFontSize is not zero
|
||||
data.SOGoMailComposeFontSizeEnabled = parseInt(data.SOGoMailComposeFontSize) > 0;
|
||||
|
||||
if (window.CKEDITOR && data.SOGoMailComposeFontSizeEnabled) {
|
||||
// HTML editor is enabled; set user's preferred font size
|
||||
window.CKEDITOR.config.fontSize_defaultLabel = data.SOGoMailComposeFontSize;
|
||||
window.CKEDITOR.addCss('.cke_editable { font-size: ' + data.SOGoMailComposeFontSize + 'px; }');
|
||||
}
|
||||
|
||||
// We convert our list of autoReplyEmailAddresses/forwardAddress into a string.
|
||||
// We also convert our date objects into real date, otherwise we'll have strings
|
||||
// or undefined values and the md-datepicker does NOT like this.
|
||||
@@ -66,21 +78,22 @@
|
||||
angular.extend(_this.defaults, data);
|
||||
|
||||
// Configure date locale
|
||||
angular.extend(Preferences.$mdDateLocaleProvider, data.locale);
|
||||
Preferences.$mdDateLocaleProvider.firstDayOfWeek = parseInt(data.SOGoFirstDayOfWeek);
|
||||
Preferences.$mdDateLocaleProvider.weekNumberFormatter = function(weekNumber) {
|
||||
_this.$mdDateLocaleProvider = Preferences.$mdDateLocaleProvider;
|
||||
angular.extend(_this.$mdDateLocaleProvider, data.locale);
|
||||
_this.$mdDateLocaleProvider.firstDayOfWeek = parseInt(data.SOGoFirstDayOfWeek);
|
||||
_this.$mdDateLocaleProvider.weekNumberFormatter = function(weekNumber) {
|
||||
return l('Week %d', weekNumber);
|
||||
};
|
||||
Preferences.$mdDateLocaleProvider.msgCalendar = l('Calender');
|
||||
Preferences.$mdDateLocaleProvider.msgOpenCalendar = l('Open Calendar');
|
||||
Preferences.$mdDateLocaleProvider.parseDate = function(dateString) {
|
||||
return dateString? dateString.parseDate(Preferences.$mdDateLocaleProvider, data.SOGoShortDateFormat) : new Date(NaN);
|
||||
_this.$mdDateLocaleProvider.msgCalendar = l('Calender');
|
||||
_this.$mdDateLocaleProvider.msgOpenCalendar = l('Open Calendar');
|
||||
_this.$mdDateLocaleProvider.parseDate = function(dateString) {
|
||||
return dateString? dateString.parseDate(_this.$mdDateLocaleProvider, data.SOGoShortDateFormat) : new Date(NaN);
|
||||
};
|
||||
Preferences.$mdDateLocaleProvider.formatDate = function(date) {
|
||||
return date? date.format(Preferences.$mdDateLocaleProvider, data.SOGoShortDateFormat) : '';
|
||||
_this.$mdDateLocaleProvider.formatDate = function(date) {
|
||||
return date? date.format(_this.$mdDateLocaleProvider, data.SOGoShortDateFormat) : '';
|
||||
};
|
||||
Preferences.$mdDateLocaleProvider.formatTime = function(date) {
|
||||
return date? date.format(Preferences.$mdDateLocaleProvider, data.SOGoTimeFormat) : '';
|
||||
_this.$mdDateLocaleProvider.formatTime = function(date) {
|
||||
return date? date.format(_this.$mdDateLocaleProvider, data.SOGoTimeFormat) : '';
|
||||
};
|
||||
|
||||
return _this.defaults;
|
||||
@@ -197,6 +210,10 @@
|
||||
|
||||
preferences.defaults.SOGoMailLabelsColors = labels;
|
||||
|
||||
if (!preferences.defaults.SOGoMailComposeFontSizeEnabled)
|
||||
preferences.defaults.SOGoMailComposeFontSize = 0;
|
||||
delete preferences.defaults.SOGoMailComposeFontSizeEnabled;
|
||||
|
||||
if (preferences.defaults.Vacation) {
|
||||
if (preferences.defaults.Vacation.endDateEnabled)
|
||||
preferences.defaults.Vacation.endDate = preferences.defaults.Vacation.endDate.getTime()/1000;
|
||||
|
||||
@@ -1,3 +1,2 @@
|
||||
!function(){"use strict";function a(a,d){a.state("calendars",{url:"/calendar",views:{calendars:{templateUrl:"UIxCalMainView",controller:"CalendarsController",controllerAs:"app"}},resolve:{stateCalendars:b}}).state("calendars.view",{url:"/{view:(?:day|week|month|multicolumnday)}/:day",views:{calendarView:{templateUrl:function(a){return a.view+"view?day="+a.day},controller:"CalendarController",controllerAs:"calendar"}},resolve:{stateEventsBlocks:c}}),d.when("/calendar/day",function(){var a=new Date;return"/calendar/day/"+a.getDayString()}),d.when("/calendar/multicolumnday",function(){var a=new Date;return"/calendar/multicolumnday/"+a.getDayString()}),d.when("/calendar/week",function(){var a=new Date;return"/calendar/week/"+a.getDayString()}),d.when("/calendar/month",function(){var a=new Date;return"/calendar/month/"+a.getDayString()}),d.otherwise("/calendar")}function b(a){return a.$calendars||a.$findAll(window.calendarsData)}function c(a,b,c){return b.$eventsBlocksForView(a.view,a.day.asDate()).then(function(a){return _.forEach(a,function(a){a.id&&(a.calendar=new c({id:a.id,name:a.calendarName}))}),a})}function d(a,b,c,d,e){a.$on("$stateChangeError",function(a,c,e,f,g,h){b.error(h),d.go("calendar")}),a.$on("$routeChangeError",function(a,c,d,e){b.error(a,c,d,e)}),0===c.url().length&&e.ready().then(function(){var a="/calendar/",b=/(.+)view/.exec(e.settings.Calendar.View);a+=b?b[1]:"week",c.replace().url(a)})}angular.module("SOGo.SchedulerUI",["ui.router","angularFileUpload","SOGo.Common","SOGo.PreferencesUI","SOGo.ContactsUI","SOGo.MailerUI"]).config(a).run(d),a.$inject=["$stateProvider","$urlRouterProvider"],b.$inject=["Calendar"],c.$inject=["$stateParams","Component","Calendar"],d.$inject=["$rootScope","$log","$location","$state","Preferences"]}(),function(){"use strict";function a(a,b,c,d,e,f,g){function h(){f.$eventsBlocksForView(d.view,d.day.asDate()).then(function(a){l.views=a,_.forEach(l.views,function(a){a.id&&(a.calendar=new e({id:a.id,name:a.calendarName}))})})}function i(a){var b=angular.element(a.currentTarget).attr("date");c.go("calendars.view",{day:b})}function j(a){c.go("calendars.view",{view:a})}var k,l=this;l.views=g,l.changeDate=i,l.changeView=j,k=b.$on("calendars:list",h),a.$on("$destroy",k)}a.$inject=["$scope","$rootScope","$state","$stateParams","Calendar","Component","stateEventsBlocks"],angular.module("SOGo.SchedulerUI").controller("CalendarController",a)}(),function(){"use strict";function a(a,b,c,d,e,f,g,h){function i(a,b){(b&&b.reload||z.componentType!=a)&&(angular.isUndefined(h["$"+a])&&h.$filter(a),z.unselectComponents(),z.componentType=a,h.saveSelectedList(a))}function j(){_.each(h["$"+z.componentType],function(a){a.selected=!1})}function k(){_.each(h["$"+z.componentType],function(a){a.selected=!0})}function m(a,b){b.selected=!b.selected,a.preventDefault(),a.stopPropagation()}function n(){e.confirm(l("Warning"),l("Are you sure you want to delete the selected components?")).then(function(){var a=_.filter(h["$"+z.componentType],function(a){return a.selected});g.$deleteComponents(a)})}function o(a,b){q(a,b,"appointment")}function p(a,b){q(a,b,"task")}function q(a,b,c){if(b.viewable){var e="UIx"+c.capitalize()+"ViewTemplate";d.show({parent:angular.element(document.body),targetEvent:a,clickOutsideToClose:!0,escapeToClose:!0,templateUrl:e,controller:"ComponentController",controllerAs:"editor",locals:{stateComponent:b}})}}function r(a,b){var c,e="appointment";b?(c=b,e=b.type):("tasks"==z.componentType&&(e="task"),c=new h({pid:g.$defaultCalendar(),type:e}));var f="UIx"+e.capitalize()+"EditorTemplate";return d.show({parent:angular.element(document.body),targetEvent:a,clickOutsideToClose:!0,escapeToClose:!0,templateUrl:f,controller:"ComponentEditorController",controllerAs:"editor",locals:{stateComponent:c}})}function s(c){function e(a,b,c,d){a.updateThisOccurrence=function(){c.$adjust(d).then(b.hide,b.cancel)},a.updateAllOccurrences=function(){delete c.occurrenceId,c.$adjust(d).then(b.hide,b.cancel)}}var f,i,j,k,m,n,o;f=h.$ghost.component,i=h.$ghost.pointerHandler,f.isNew?(j=i.currentEventCoordinates,f.summary="",f.isAllDay&&(j.duration-=96),f.setDelta(15*j.duration),r(null,f)["finally"](function(){b(function(){h.$ghost.pointerHandler=null,h.$ghost.component=null})})):(k=i.currentEventCoordinates.getDelta(i.originalEventCoordinates),m={days:k.dayNumber,start:15*k.start,duration:15*k.duration},i.originalCalendar&&0!==k.dayNumber&&(n=i.currentEventCoordinates.dayNumber,o=_.filter(g.$findAll(),{active:1}),m.destination=o[n].id,m.days=0),f.isException||!f.occurrenceId?f.$adjust(m).then(function(){a.$emit("calendars:list"),b(function(){h.$ghost={}})}):f.occurrenceId&&d.show({clickOutsideToClose:!0,escapeToClose:!0,locals:{component:f,params:m},template:['<md-dialog flex="50" md-flex="80" sm-flex="90">',' <md-dialog-content class="md-dialog-content">'," <p>"+l("editRepeatingItem")+"</p>"," </md-dialog-content>"," <md-dialog-actions>",' <md-button ng-click="updateThisOccurrence()">'+l("buLine truncated
|
||||
this.currentEventCoordinates.duration=-b));var g;this.currentEventCoordinates.start<0?(g=Math.ceil(-this.currentEventCoordinates.start/f.EventDragDayLength),this.currentEventCoordinates.start+=g*f.EventDragDayLength,this.currentEventCoordinates.dayNumber-=g):this.currentEventCoordinates.start>=f.EventDragDayLength&&(g=Math.floor(this.currentEventCoordinates.start/f.EventDragDayLength),this.currentEventCoordinates.start-=g*f.EventDragDayLength,this.currentEventCoordinates.dayNumber+=g),c.debug("event coordinates "+JSON.stringify(this.currentEventCoordinates)),a.$emit("calendar:drag")},getContainerBasedCoordinates:function(a,b){var c=b||this.currentCoordinates,d=c.getDelta(a.coordinates),e=a.element;return(d.x<a.daysOffset||d.x>e.clientWidth||d.y<0||d.y>e.clientHeight)&&(d=null),d},prepareWithEventType:function(a){var b={multiday:this.getEventMultiDayViewCoordinates,"multiday-allday":this.getEventMultiDayAllDayViewCoordinates,monthly:this.getEventMonthlyViewCoordinates,unknown:null},c=b[a];this.eventType=a,this.getEventViewCoordinates=c},getEventMultiDayViewCoordinates:function(a,b){var c=this.getEventMultiDayAllDayViewCoordinates(a,b);if(c){var d=a.quarterHeight,e=this.getContainerBasedCoordinates(a,b);e.y+=a.element.scrollTop,c.y=Math.floor((e.y-f.EventDragHorizontalOffset)/d);var g=f.EventDragDayLength-1;c.y<0?c.y=0:c.y>g&&(c.y=g)}return c},getEventMultiDayAllDayViewCoordinates:function(a,b){var c,d=this.getContainerBasedCoordinates(a,b);if(d){c=new r;var f=a.dayWidth,g=a.daysOffset;c.x=Math.floor((d.x-g)/f);var h=0,i=e.$view.maxX;if("move-event"!=this.dragMode){var j=k.calendarData();j&&(h=i=j.index)}c.x<h?c.x=h:c.x>i&&(c.x=i),c.y=0}else c=null;return c},getEventMonthlyViewCoordinates:function(a,b){var c,d=this.getContainerBasedCoordinates(a,b);if(d){c=new r;var e=0,f=a.dayWidth,g=a.daysOffset,h=a.dayHeight,i=Math.floor((d.y-e)/h);0>i&&(i=0),c.x=Math.floor((d.x-g)/f),c.x<0?c.x=0:c.x>6&&(c.x=6),c.x+=7*i,c.y=0}else c=null;return c},getDistance:function(){return this.currentCoordinates.getDistance(this.originalCoordinates)},setTimeFromQuarters:function(a,b){var c,d;c=Math.floor(b/4),d=b%4*15,a.setHours(c,d)}}}return{restrict:"CA",require:"^sgCalendarDay",link:h}}a.$inject=["$rootScope","$timeout","$log","Preferences","Calendar","CalendarSettings","Component"],angular.module("SOGo.SchedulerUI").directive("sgDraggableCalendarBlock",a)}();
|
||||
!function(){"use strict";function a(a,d){a.state("calendars",{url:"/calendar",views:{calendars:{templateUrl:"UIxCalMainView",controller:"CalendarsController",controllerAs:"app"}},resolve:{stateCalendars:b}}).state("calendars.view",{url:"/{view:(?:day|week|month|multicolumnday)}/:day",views:{calendarView:{templateUrl:function(a){return a.view+"view?day="+a.day},controller:"CalendarController",controllerAs:"calendar"}},resolve:{stateEventsBlocks:c}}),d.when("/calendar/day",function(){var a=new Date;return"/calendar/day/"+a.getDayString()}),d.when("/calendar/multicolumnday",function(){var a=new Date;return"/calendar/multicolumnday/"+a.getDayString()}),d.when("/calendar/week",function(){var a=new Date;return"/calendar/week/"+a.getDayString()}),d.when("/calendar/month",function(){var a=new Date;return"/calendar/month/"+a.getDayString()}),d.otherwise("/calendar")}function b(a){return a.$calendars||a.$findAll(window.calendarsData)}function c(a,b,c){return b.$eventsBlocksForView(a.view,a.day.asDate()).then(function(a){return _.forEach(a,function(a){a.id&&(a.calendar=new c({id:a.id,name:a.calendarName}))}),a})}function d(a,b,c,d,e){a.$on("$stateChangeError",function(a,c,e,f,g,h){b.error(h),d.go("calendar")}),a.$on("$routeChangeError",function(a,c,d,e){b.error(a,c,d,e)}),0===c.url().length&&e.ready().then(function(){var a="/calendar/",b=/(.+)view/.exec(e.settings.Calendar.View);a+=b?b[1]:"week",c.replace().url(a)})}angular.module("SOGo.SchedulerUI",["ui.router","angularFileUpload","SOGo.Common","SOGo.PreferencesUI","SOGo.ContactsUI","SOGo.MailerUI"]).config(a).run(d),a.$inject=["$stateProvider","$urlRouterProvider"],b.$inject=["Calendar"],c.$inject=["$stateParams","Component","Calendar"],d.$inject=["$rootScope","$log","$location","$state","Preferences"]}();
|
||||
//# sourceMappingURL=Scheduler.js.map
|
||||
@@ -1 +1 @@
|
||||
{"version":3,"sources":["Scheduler/Scheduler.app.js","Scheduler/CalendarController.js","Scheduler/CalendarListController.js","Scheduler/CalendarsController.js","Scheduler/ComponentController.js","Scheduler/sgCalendarDay.directive.js","Scheduler/sgCalendarDayBlock.directive.js","Scheduler/sgCalendarDayTable.directive.js","Scheduler/sgCalendarGhost.directive.js","Scheduler/sgCalendarMonthDay.directive.js","Scheduler/sgCalendarMonthEvent.directive.js","Scheduler/sgCalendarScrollView.directive.js","Scheduler/sgDraggableCalendarBlock.directive.js"],"names":["configure","$stateProvider","$urlRouterProvider","state","url","views","calendars","templateUrl","controller","controllerAs","resolve","stateCalendars","calendarView","$stateParams","view","day","stateEventsBlocks","when","now","Date","getDayString","otherwise","Calendar","$calendars","$findAll","window","calendarsData","Component","$eventsBlocksForView","asDate","then","_","forEach","id","calendar","name","calendarName","runBlock","$rootScope","$log","$location","$state","Preferences","$on","event","toState","toParams","fromState","fromParams","error","go","current","previous","rejection","length","ready","exec","settings","View","replace","angular","module","config","run","$inject","CalendarController","$scope","updateView","data","vm","changeDate","$event","date","element","currentTarget","attr","changeView","deregisterCalendarsList","this","CalendarListController","$timeout","$mdDialog","Dialog","selectComponentType","type","options","reload","componentType","isUndefined","$filter","unselectComponents","saveSelectedList","each","component","selected","selectAll","toggleComponentSelection","preventDefault","stopPropagation","confirmDeleteSelectedComponents","confirm","l","components","filter","$deleteComponents","openEvent","openComponent","openTask","task","viewable","capitalize","show","parent","document","body","targetEvent","clickOutsideToClose","escapeToClose","locals","stateComponent","newComponent","baseComponent","pid","$defaultCalendar","updateComponentFromGhost","RecurrentComponentDialogController","params","updateThisOccurrence","$adjust","hide","cancel","updateAllOccurrences","occurrenceId","pointerHandler","coordinates","delta","calendarNumber","activeCalendars","$ghost","isNew","currentEventCoordinates","summary","isAllDay","duration","setDelta","getDelta","originalEventCoordinates","days","dayNumber","start","originalCalendar","active","destination","isException","$emit","template","join","filterpopup","filteredBy","sort","field","sortedBy","cancelSearch","mode","search","value","selectedList","SelectedList","CalendarsController","$window","$mdToast","FileUploader","focus","Settings","User","newCalendar","ev","prompt","isEditable","isRemote","owner","UserLogin","$id","$add","addWebCalendar","inputType","$addWebCalendar","confirmDelete","folder","isSubscription","$delete","status","alert","importCalendar","CalendarImportDialogController","scope","filterByExtension","item","isTextFile","indexOf","test","position","hideDelay","uploader","ApplicationBaseURL","autoUpload","queueLimit","filters","fn","onSuccessItem","response","headers","msg","imported","simple","content","onErrorItem","close","exportCalendar","location","href","showLinks","LinksDialogController","showProperties","PropertiesDialogController","srcCalendar","saveProperties","$save","init","$omit","$watch","color","editFolder","editMode","revertEditing","$reset","renameFolder","$rename","share","$acl","$users","usersWithACL","users","subscribeToFolder","calendarData","debug","$subscribe","today","fragments","hash","split","path","activeUser","service","categories","map","defaults","SOGoCalendarCategories","asCSSIdentifier","SOGoCalendarCategoriesColors","union","o","pick","$subscriptions","$webcalendars","newList","oldList","ids","pluck","i","isEqual","$get","$setActivation","ComponentController","AddressBook","Alarm","cardFilter","$query","$filterAll","$cards","edit","editAllOccurrences","$getComponent","$futureComponentData","reply","c","$reply","getAlarms","replyAllOccurrences","delegatedTo","$hasAlarm","alarm","deleteOccurrence","remove","deleteAllOccurrences","toggleRawSource","$$resource","post","ComponentRawSourceDialogController","organizer","ComponentEditorController","Card","addAttachUrl","toggleRecurrenceEditor","showRecurrenceEditor","$hasCustomRepeat","toggleAttendeesEditor","showAttendeesEditor","addAttendee","card","isString","isValidEmail","emails","searchText","save","form","$valid","getDays","end","daysUpTo","stringWithSeparator","getHours","hours","push","toString","addStartDate","$addStartDate","oldStartDate","getTime","addDueDate","$addDueDate","oldDueDate","due","updateStartTime","addMinutes","getMinutes","adjustStartTime","valueOf","oldEndDate","updateFreeBusy","updateEndTime","adjustEndTime","minutesTo","updateDueTime","adjustDueTime","attendeesEditor","isDefined","attendees","sgCalendarDay","restrict","dayString","sgCalendarDayController","index","findIndexLine truncated
|
||||
{"version":3,"sources":["Scheduler/Scheduler.app.js"],"names":["configure","$stateProvider","$urlRouterProvider","state","url","views","calendars","templateUrl","controller","controllerAs","resolve","stateCalendars","calendarView","$stateParams","view","day","stateEventsBlocks","when","now","Date","getDayString","otherwise","Calendar","$calendars","$findAll","window","calendarsData","Component","$eventsBlocksForView","asDate","then","_","forEach","id","calendar","name","calendarName","runBlock","$rootScope","$log","$location","$state","Preferences","$on","event","toState","toParams","fromState","fromParams","error","go","current","previous","rejection","length","ready","exec","settings","View","replace","angular","module","config","run","$inject"],"mappings":"CAGA,WACE,YAUA,SAASA,GAAUC,EAAgBC,GACjCD,EACGE,MAAM,aACLC,IAAK,YACLC,OACEC,WACEC,YAAa,iBACbC,WAAY,sBACZC,aAAc,QAGlBC,SACEC,eAAgBA,KAGnBR,MAAM,kBACLC,IAAK,iDAGLC,OACEO,cACEL,YAAa,SAASM,GAKpB,MAAOA,GAAaC,KAAO,YAAcD,EAAaE,KAExDP,WAAY,qBACZC,aAAc,aAGlBC,SACEM,kBAAmBA,KAIzBd,EAAmBe,KAAK,gBAAiB,WAEvC,GAAIC,GAAM,GAAIC,KACd,OAAO,iBAAmBD,EAAIE,iBAEhClB,EAAmBe,KAAK,2BAA4B,WAElD,GAAIC,GAAM,GAAIC,KACd,OAAO,4BAA8BD,EAAIE,iBAE3ClB,EAAmBe,KAAK,iBAAkB,WAExC,GAAIC,GAAM,GAAIC,KACd,OAAO,kBAAoBD,EAAIE,iBAEjClB,EAAmBe,KAAK,kBAAmB,WAEzC,GAAIC,GAAM,GAAIC,KACd,OAAO,mBAAqBD,EAAIE,iBAKlClB,EAAmBmB,UAAU,aAO/B,QAASV,GAAeW,GACtB,MAAOA,GAASC,YAAcD,EAASE,SAASC,OAAOC,eAOzD,QAASV,GAAkBH,EAAcc,EAAWL,GAElD,MAAOK,GAAUC,qBAAqBf,EAAaC,KAAMD,EAAaE,IAAIc,UACvEC,KAAK,SAASzB,GAQb,MAPA0B,GAAEC,QAAQ3B,EAAO,SAASS,GACpBA,EAAKmB,KAGPnB,EAAKoB,SAAW,GAAIZ,IAAWW,GAAInB,EAAKmB,GAAIE,KAAMrB,EAAKsB,kBAGpD/B,IAQb,QAASgC,GAASC,EAAYC,EAAMC,EAAWC,EAAQC,GACrDJ,EAAWK,IAAI,oBAAqB,SAASC,EAAOC,EAASC,EAAUC,EAAWC,EAAYC,GAC5FV,EAAKU,MAAMA,GACXR,EAAOS,GAAG,cAEZZ,EAAWK,IAAI,oBAAqB,SAASC,EAAOO,EAASC,EAAUC,GACrEd,EAAKU,MAAML,EAAOO,EAASC,EAAUC,KAER,IAA3Bb,EAAUpC,MAAMkD,QAElBZ,EAAYa,QAAQzB,KAAK,WACvB,GAAI1B,GAAM,aACNU,EAAO,WAAW0C,KAAKd,EAAYe,SAASnC,SAASoC,KAEvDtD,IADEU,EACKA,EAAK,GAEL,OACT0B,EAAUmB,UAAUvD,IAAIA,KAvH9BwD,QAAQC,OAAO,oBAAqB,YAAa,oBAAqB,cAAe,qBAAsB,kBAAmB,kBAC3HC,OAAO9D,GACP+D,IAAI1B,GAKPrC,EAAUgE,SAAW,iBAAkB,sBAmEvCrD,EAAeqD,SAAW,YAQ1BhD,EAAkBgD,SAAW,eAAgB,YAAa,YAmB1D3B,EAAS2B,SAAW,aAAc,OAAQ,YAAa,SAAU","file":"Scheduler.js","sourcesContent":["/* -*- Mode: javascript; indent-tabs-mode: nil; c-basic-offset: 2 -*- */\n/* JavaScript for SOGo.SchedulerUI module */\n\n(function() {\n 'use strict';\n\n angular.module('SOGo.SchedulerUI', ['ui.router', 'angularFileUpload', 'SOGo.Common', 'SOGo.PreferencesUI', 'SOGo.ContactsUI', 'SOGo.MailerUI'])\n .config(configure)\n .run(runBlock);\n\n /**\n * @ngInject\n */\n configure.$inject = ['$stateProvider', '$urlRouterProvider'];\n function configure($stateProvider, $urlRouterProvider) {\n $stateProvider\n .state('calendars', {\n url: '/calendar',\n views: {\n calendars: {\n templateUrl: 'UIxCalMainView', // UI/Templates/SchedulerUI/UIxCalMainView.wox\n controller: 'CalendarsController',\n controllerAs: 'app'\n }\n },\n resolve: {\n stateCalendars: stateCalendars\n }\n })\n .state('calendars.view', {\n url: '/{view:(?:day|week|month|multicolumnday)}/:day',\n //sticky: true,\n //deepStateRedirect: true,\n views: {\n calendarView: {\n templateUrl: function($stateParams) {\n // UI/Templates/SchedulerUI/UIxCalDayView.wox or\n // UI/Templates/SchedulerUI/UIxCalWeekView.wox or\n // UI/Templates/SchedulerUI/UIxCalMonthView.wox or\n // UI/Templates/SchedulerUI/UIxCalMulticolumnDayView.wox\n return $stateParams.view + 'view?day=' + $stateParams.day;\n },\n controller: 'CalendarController',\n controllerAs: 'calendar'\n }\n },\n resolve: {\n stateEventsBlocks: stateEventsBlocks\n }\n });\n\n $urlRouterProvider.when('/calendar/day', function() {\n // If no date is specified, show today\n var now = new Date();\n return '/calendar/day/' + now.getDayString();\n });\n $urlRouterProvider.when('/calendar/multicolumnday', function() {\n // If no date is specified, show today\n var now = new Date();\n return '/calendar/multicolumnday/' + now.getDayString();\n });\n $urlRouterProvider.when('/calendar/week', function() {\n // If no date is specified, show today's week\n var now = new Date();\n return '/calendar/week/' + now.getDayString();\n });\n $urlRouterProvider.when('/calendar/month', function() {\n // If no date is specified, show today's month\n var now = new Date();\n return '/calendar/month/' + now.getDayString();\n });\n\n // If none of the above states are matched, use this as the fallback.\n // runBlock will also act as a fallback by looking at user's settings\n $urlRouterProvideLine truncated
|
||||
@@ -1,2 +1,3 @@
|
||||
!function(){"use strict";function a(b){if(this.init(b),this.name&&!this.id){var c=a.$$resource.create("createFolder",this.name);this.$unwrap(c)}}a.$factory=["$q","$timeout","$log","sgSettings","Resource","Preferences","Component","Acl",function(b,c,d,e,f,g,h,i){return angular.extend(a,{$q:b,$timeout:c,$log:d,$$resource:new f(e.activeUser("folderURL")+"Calendar",e.activeUser()),$Preferences:g,$Component:h,$$Acl:i,activeUser:e.activeUser(),$view:null}),a}];try{angular.module("SOGo.SchedulerUI")}catch(b){angular.module("SOGo.SchedulerUI",["SOGo.Common"])}angular.module("SOGo.SchedulerUI").value("CalendarSettings",{EventDragDayLength:96,EventDragHorizontalOffset:3}).factory("Calendar",a.$factory),a.$defaultCalendar=function(){var b,c=a.$Preferences.defaults.SOGoDefaultCalendar;return"first"==c&&(b=_.find(a.$findAll(null,!0),function(a){return a.active}))?b.id:"personal"},a.$add=function(a){var b,c,d;b=a.isWebCalendar?this.$webcalendars:a.isSubscription?this.$subscriptions:this.$calendars,c=_.find(b,function(b){return"personal"!=b.id&&1===b.name.localeCompare(a.name)}),d=c?_.indexOf(_.pluck(b,"id"),c.id):1,b.splice(d,0,a)},a.$findAll=function(b,c){var d=this;return b&&(this.$calendars=[],this.$subscriptions=[],this.$webcalendars=[],angular.forEach(b,function(b,c){var e=new a(b);e.isWebCalendar?d.$webcalendars.push(e):e.isSubscription?d.$subscriptions.push(e):d.$calendars.push(e)})),c?_.union(this.$calendars,_.filter(this.$subscriptions,function(a){return a.acls.objectCreator})):_.union(this.$calendars,this.$subscriptions,this.$webcalendars)},a.$get=function(b){var c;return c=_.find(a.$calendars,function(a){return a.id==b}),c||(c=_.find(a.$subscriptions,function(a){return a.id==b})),c||(c=_.find(a.$webcalendars,function(a){return a.id==b})),c},a.$getIndex=function(b){var c;return c=_.indexOf(_.pluck(a.$calendars,"id"),b),0>c&&(c=_.indexOf(_.pluck(a.$subscriptions,"id"),b)),0>c&&(c=_.indexOf(_.pluck(a.$webcalendars,"id"),b)),c},a.$subscribe=function(b,c){var d=this;return a.$$resource.userResource(b).fetch(c,"subscribe").then(function(b){var c=new a(b);return _.find(d.$subscriptions,function(a){return a.id==b.id})||a.$add(c),c})},a.$addWebCalendar=function(b){var c=this,d=a.$q.defer();return _.find(c.$webcalendars,function(a){return a.urls.webCalendarURL==b})?d.reject():a.$$resource.post(null,"addWebCalendar",{url:b}).then(function(c){angular.extend(c,{isWebCalendar:!0,isEditable:!0,isRemote:!1,owner:a.activeUser.login,urls:{webCalendarURL:b}});var e=new a(c);a.$add(e),a.$$resource.fetch(e.id,"reload").then(function(b){a.$log.debug(JSON.stringify(b,void 0,2))}),d.resolve()},function(){d.reject()}),d.promise},a.$deleteComponents=function(b){var c={},d=this;_.forEach(b,function(a){angular.isDefined(c[a.c_folder])||(c[a.c_folder]=[]),c[a.c_folder].push(a.c_name)}),_.forEach(c,function(b,c){a.$$resource.post(c,"batchDelete",{uids:b})}),d.$Component.$events=_.difference(d.$Component.$events,b),d.$Component.$tasks=_.difference(d.$Component.$tasks,b)},a.prototype.init=function(b){this.color=this.color||"#AAAAAA",angular.extend(this,b),this.id&&(this.$acl=new a.$$Acl("Calendar/"+this.id)),this.isOwned=a.activeUser.isSuperUser||this.owner==a.activeUser.login,this.isSubscription=!this.isRemote&&this.owner!=a.activeUser.login,angular.isUndefined(this.$shadowData)&&(this.$shadowData=this.$omit())},a.prototype.$id=function(){return this.id?a.$q.when(this.id):this.$futureCalendarData.then(function(a){return a.id})},a.prototype.getClassName=function(a){return angular.isUndefined(a)&&(a="fg"),a+"-folder"+this.id},a.prototype.$rename=function(){var b,c,d=this;return this.name==this.$shadowData.name?a.$q.when():(c=this.isWebCalendar?a.$webcalendars:this.isSubscription?a.$subscriptions:a.$calendars,b=_.indexOf(_.pluck(c,"id"),this.id),b>-1?this.$save().then(function(){c.splice(b,1),a.$add(d)}):a.$q.reject())},a.prototype.$delete=function(){var b,c,d=this;return this.isSubscription?(c=a.$$resource.fetch(this.id,"unsubscribe"),b=a.$subscriptions):(c=a.$$resource.remove(this.id),b=this.isWebCalendar?a.$webcalendars:a.$calendars),c.then(function(){var a=_.indexOf(_.pluck(b,"id"),d.id);b.splice(a,1)})},a.prototype.$reset=function(){var a=this;angular.forEach(this,function(b,c){"constructor"!=c&&"$"!=c[0]&&delete a[c]}),angular.extend(this,this.$shadowData),this.$shadowData=this.$omit()},a.prototype.$save=function(){var b=this;return a.$$resource.save(this.id,this.$omit()).then(function(a){return b.$shadowData=b.$omit(),a},function(c){return a.$log.error(JSON.stringify(c,void 0,2)),b.$reset(),c})},a.prototype.$setActivation=function(){return a.$$resource.fetch(this.id,(this.active?"":"de")+"activateFolder")},a.prototype.$getComponent=function(b,c){return a.$Component.$find(this.id,b,c)},a.prototype.$unwrap=function(b){var c=this;this.$futureCalendarData=b.then(function(b){return a.$timeout(function(){return c.init(b),c})},function(b){c.isError=!0,angular.isObject(b)&&a.$timeout(function(){angular.extend(c,b)})})},a.prototype.$omit=functiLine truncated
|
||||
!function(){"use strict";function a(b){if(this.init(b),this.name&&!this.id){var c=a.$$resource.create("createFolder",this.name);this.$unwrap(c)}}a.$factory=["$q","$timeout","$log","sgSettings","Resource","Preferences","Component","Acl",function(b,c,d,e,f,g,h,i){return angular.extend(a,{$q:b,$timeout:c,$log:d,$$resource:new f(e.activeUser("folderURL")+"Calendar",e.activeUser()),$Preferences:g,$Component:h,$$Acl:i,activeUser:e.activeUser(),$view:null}),a}];try{angular.module("SOGo.SchedulerUI")}catch(b){angular.module("SOGo.SchedulerUI",["SOGo.Common"])}angular.module("SOGo.SchedulerUI").value("CalendarSettings",{EventDragDayLength:96,EventDragHorizontalOffset:3}).factory("Calendar",a.$factory),a.$defaultCalendar=function(){var b,c=a.$Preferences.defaults.SOGoDefaultCalendar;return"first"==c&&(b=_.find(a.$findAll(null,!0),function(a){return a.active}))?b.id:"personal"},a.$add=function(a){var b,c,d;b=a.isWebCalendar?this.$webcalendars:a.isSubscription?this.$subscriptions:this.$calendars,c=_.find(b,function(b){return"personal"!=b.id&&1===b.name.localeCompare(a.name)}),d=c?_.indexOf(_.pluck(b,"id"),c.id):1,b.splice(d,0,a)},a.$findAll=function(b,c){var d=this;return b?(this.$calendars=[],this.$subscriptions=[],this.$webcalendars=[],angular.forEach(b,function(b,c){var e=new a(b);e.isWebCalendar?d.$webcalendars.push(e):e.isSubscription?d.$subscriptions.push(e):d.$calendars.push(e)})):angular.isUndefined(this.$calendars)&&(this.$calendars=[],this.$subscriptions=[],this.$webcalendars=[],a.$$resource.fetch("calendarslist").then(function(b){a.$findAll(b.calendars,c)})),c?_.union(this.$calendars,_.filter(this.$subscriptions,function(a){return a.acls.objectCreator})):_.union(this.$calendars,this.$subscriptions,this.$webcalendars)},a.$get=function(b){var c;return c=_.find(a.$calendars,function(a){return a.id==b}),c||(c=_.find(a.$subscriptions,function(a){return a.id==b})),c||(c=_.find(a.$webcalendars,function(a){return a.id==b})),c},a.$getIndex=function(b){var c;return c=_.indexOf(_.pluck(a.$calendars,"id"),b),0>c&&(c=_.indexOf(_.pluck(a.$subscriptions,"id"),b)),0>c&&(c=_.indexOf(_.pluck(a.$webcalendars,"id"),b)),c},a.$subscribe=function(b,c){var d=this;return a.$$resource.userResource(b).fetch(c,"subscribe").then(function(b){var c=new a(b);return _.find(d.$subscriptions,function(a){return a.id==b.id})||a.$add(c),c})},a.$addWebCalendar=function(b){var c=this,d=a.$q.defer();return _.find(c.$webcalendars,function(a){return a.urls.webCalendarURL==b})?d.reject():a.$$resource.post(null,"addWebCalendar",{url:b}).then(function(c){angular.extend(c,{isWebCalendar:!0,isEditable:!0,isRemote:!1,owner:a.activeUser.login,urls:{webCalendarURL:b}});var e=new a(c);a.$add(e),a.$$resource.fetch(e.id,"reload").then(function(b){a.$log.debug(JSON.stringify(b,void 0,2))}),d.resolve()},function(){d.reject()}),d.promise},a.$deleteComponents=function(b){var c={},d=[];return _.forEach(b,function(a){angular.isDefined(c[a.pid])||(c[a.pid]=[]),c[a.pid].push(a.id)}),_.forEach(c,function(b,c){d.push(a.$$resource.post(c,"batchDelete",{uids:b}))}),a.$q.all(d)},a.prototype.init=function(b){this.color=this.color||"#AAAAAA",angular.extend(this,b),this.id&&(this.$acl=new a.$$Acl("Calendar/"+this.id)),this.isOwned=a.activeUser.isSuperUser||this.owner==a.activeUser.login,this.isSubscription=!this.isRemote&&this.owner!=a.activeUser.login,angular.isUndefined(this.$shadowData)&&(this.$shadowData=this.$omit())},a.prototype.$id=function(){return this.id?a.$q.when(this.id):this.$futureCalendarData.then(function(a){return a.id})},a.prototype.getClassName=function(a){return angular.isUndefined(a)&&(a="fg"),a+"-folder"+this.id},a.prototype.$rename=function(){var b,c,d=this;return this.name==this.$shadowData.name?a.$q.when():(c=this.isWebCalendar?a.$webcalendars:this.isSubscription?a.$subscriptions:a.$calendars,b=_.indexOf(_.pluck(c,"id"),this.id),b>-1?this.$save().then(function(){c.splice(b,1),a.$add(d)}):a.$q.reject())},a.prototype.$delete=function(){var b,c,d=this;return this.isSubscription?(c=a.$$resource.fetch(this.id,"unsubscribe"),b=a.$subscriptions):(c=a.$$resource.remove(this.id),b=this.isWebCalendar?a.$webcalendars:a.$calendars),c.then(function(){var a=_.indexOf(_.pluck(b,"id"),d.id);b.splice(a,1)})},a.prototype.$reset=function(){var a=this;angular.forEach(this,function(b,c){"constructor"!=c&&"$"!=c[0]&&delete a[c]}),angular.extend(this,this.$shadowData),this.$shadowData=this.$omit()},a.prototype.$save=function(){var b=this;return a.$$resource.save(this.id,this.$omit()).then(function(a){return b.$shadowData=b.$omit(),a},function(c){return a.$log.error(JSON.stringify(c,void 0,2)),b.$reset(),c})},a.prototype.$setActivation=function(){return a.$$resource.fetch(this.id,(this.active?"":"de")+"activateFolder")},a.prototype.$getComponent=function(b,c){return a.$Component.$find(this.id,b,c)},a.prototype.$unwrap=function(b){var c=this;this.$futureCalendarData=b.then(function(b){return a.$timeout(function(){return c.init(b),c})},function(b){c.isError=!0,angular.isObjectLine truncated
|
||||
var d=c||r.component;d.$reply().then(function(){a.$emit("calendars:list"),b.hide(),e.getAlarms()})}function m(){q=c.$get(r.component.pid).$getComponent(r.component.id),q.$futureComponentData.then(function(){q.reply=r.component.reply,q.delegatedTo=r.component.delegatedTo,q.$hasAlarm=r.component.$hasAlarm,q.alarm=r.component.alarm,k(q)})}function n(){r.component.remove(!0).then(function(){a.$emit("calendars:list"),b.hide()})}function o(){r.component.remove().then(function(){a.$emit("calendars:list"),b.hide()})}function p(a){c.$$resource.post(r.component.pid+"/"+r.component.id,"raw").then(function(c){function d(a,b){a.close=function(){b.hide()}}b.hide(),b.show({parent:angular.element(document.body),targetEvent:a,clickOutsideToClose:!0,escapeToClose:!0,template:['<md-dialog flex="80" flex-xs="100" aria-label="'+l("View Raw Source")+'">',' <md-dialog-content class="md-dialog-content">'," <pre>",c," </pre>"," </md-dialog-content>"," <md-dialog-actions>",' <md-button ng-click="close()">'+l("Close")+"</md-button>"," </md-dialog-actions>","</md-dialog>"].join(""),controller:d}),d.$inject=["scope","$mdDialog"]})}var q,r=this;r.component=f,r.close=g,r.cardFilter=h,r.edit=i,r.editAllOccurrences=j,r.reply=k,r.replyAllOccurrences=m,r.deleteOccurrence=n,r.deleteAllOccurrences=o,r.toggleRawSource=p,angular.isUndefined(r.component.$futureComponentData)&&(q=c.$get(r.component.pid).$getComponent(r.component.id,r.component.occurrenceId),q.$futureComponentData.then(function(){r.component=q,r.organizer=[r.component.organizer]}))}function b(a,b,c,d,e,f,g,h,i,j,k,l){function m(){var a=H.component.addAttachUrl("");focus("attachUrl_"+a)}function n(){H.showRecurrenceEditor=!H.showRecurrenceEditor,H.component.$hasCustomRepeat=H.showRecurrenceEditor}function o(){H.showAttendeesEditor=!H.showAttendeesEditor}function p(a){return i.$filterAll(a),i.$cards}function q(a){angular.isString(a)?a.isValidEmail()&&(H.component.addAttendee(new j({emails:[{value:a}]})),H.searchText=""):H.component.addAttendee(a)}function r(b){b.$valid&&H.component.$save().then(function(b){a.$emit("calendars:list"),e.hide(),k.getAlarms()},function(a,b){c.debug("failed")})}function s(){H.component.$reset(),H.component.isNew&&(H.component=null),e.cancel()}function t(){var a=[];return H.component.start&&H.component.end&&(a=H.component.start.daysUpTo(H.component.end)),_.map(a,function(a){return{stringWithSeparator:a.stringWithSeparator(),getDayString:a.getDayString()}})}function u(){for(var a=[],b=0;23>=b;b++)a.push(b.toString());return a}function v(){H.component.$addStartDate(),E=new Date(H.component.start.getTime())}function w(){H.component.$addDueDate(),G=new Date(H.component.due.getTime())}function x(){H.component.start.addMinutes(60*E.getHours()+E.getMinutes()),y()}function y(){var a;a=E.valueOf()-H.component.start.valueOf(),0!==a&&(E=new Date(H.component.start.getTime()),"appointment"===H.component.type&&(H.component.end=new Date(H.component.start.getTime()),H.component.end.addMinutes(H.component.delta),F=new Date(H.component.end.getTime())),D())}function z(){H.component.end.addMinutes(60*F.getHours()+F.getMinutes()),A()}function A(){var a=F.valueOf()-H.component.end.valueOf();0!==a&&(a=H.component.start.minutesTo(H.component.end),0>a?H.component.end=new Date(F.getTime()):(H.component.delta=a,F=new Date(H.component.end.getTime())),D())}function B(){H.component.due.addMinutes(60*G.getHours()+G.getMinutes()),C()}function C(){G=new Date(H.component.due.getTime())}function D(){H.attendeesEditor.days=t(),H.component.updateFreeBusy()}var E,F,G,H=this;H.service=g,H.component=l,H.categories={},H.showRecurrenceEditor=H.component.$hasCustomRepeat,H.toggleRecurrenceEditor=n,H.showAttendeesEditor=angular.isDefined(H.component.attendees),H.toggleAttendeesEditor=o,H.cardFilter=p,H.addAttendee=q,H.addAttachUrl=m,H.cancel=s,H.save=r,H.attendeesEditor={days:t(),hours:u()},H.addStartDate=v,H.addDueDate=w,H.updateStartTime=x,H.adjustStartTime=y,H.updateEndTime=z,H.adjustEndTime=A,H.updateDueTime=B,H.adjustDueTime=C,H.component.start&&(E=new Date(H.component.start.getTime())),H.component.end&&(F=new Date(H.component.end.getTime())),H.component.due&&(G=new Date(H.component.due.getTime()))}a.$inject=["$rootScope","$mdDialog","Calendar","AddressBook","Alarm","stateComponent"],b.$inject=["$rootScope","$scope","$log","$timeout","$mdDialog","User","Calendar","Component","AddressBook","Card","Alarm","stateComponent"],angular.module("SOGo.SchedulerUI").controller("ComponentController",a).controller("ComponentEditorController",b)}(),function(){"use strict";function a(){return{restrict:"E",scope:{day:"@sgDay",dayNumber:"@sgDayNumber",dayString:"@sgDayString",calendar:"@sgCalendar"},controller:b}}function b(a,b){this.day=a.day,this.dayNumber=a.dayNumber,this.dayString=a.dayString,this.calendarData=function(){var c,d,e;return a.calendar?(c=a.calendar,e=_.filter(b.$findAll(),{active:1}),d=_.findIndex(e,function(a){return a.id==c}),{pid:c,index:d}):null}}b.$inject=["$scope","Calendar"Line truncated
|
||||
//# sourceMappingURL=Scheduler.services.js.map
|
||||
@@ -1 +1 @@
|
||||
{"version":3,"sources":["Scheduler/Calendar.service.js","Scheduler/Component.service.js"],"names":["Calendar","futureCalendarData","this","init","name","id","newCalendarData","$$resource","create","$unwrap","$factory","$q","$timeout","$log","Settings","Resource","Preferences","Component","Acl","angular","extend","activeUser","$Preferences","$Component","$$Acl","$view","module","e","value","EventDragDayLength","EventDragHorizontalOffset","factory","$defaultCalendar","calendar","defaultCalendar","defaults","SOGoDefaultCalendar","_","find","$findAll","active","$add","list","sibling","i","isWebCalendar","$webcalendars","isSubscription","$subscriptions","$calendars","o","localeCompare","indexOf","pluck","splice","data","writable","_this","forEach","push","union","filter","acls","objectCreator","$get","$getIndex","$subscribe","uid","path","userResource","fetch","then","calendarData","$addWebCalendar","url","d","defer","urls","webCalendarURL","reject","post","isEditable","isRemote","owner","login","debug","JSON","stringify","undefined","resolve","promise","$deleteComponents","components","calendars","component","isDefined","c_folder","c_name","uids","$events","difference","$tasks","prototype","color","$acl","isOwned","isSuperUser","isUndefined","$shadowData","$omit","$id","when","$futureCalendarData","getClassName","base","$rename","$save","$delete","remove","$reset","key","save","error","$setActivation","$getComponent","componentId","recurrenceId","$find","isError","isObject","futureComponentData","pid","newComponentData","newguid","isNew","Card","Gravatar","$Card","$gravatar","baseURL","timeFormat","$query","search","$queryEvents","sort","asc","filterpopup","$queryTasks","$refreshTimeout","$ghost","ready","settings","EventsFilterState","TasksFilterState","EventsSortingState","parseInt","TasksSortingState","show_completed","ShowCompletedTasks","$categories","SOGoCalendarCategoriesColors","SOGoTimeFormat","$selectedCount","count","event","selected","length","task","$startRefreshTimeout","type","cancel","refreshViewCheck","SOGoRefreshViewCheck","f","bind","$filter","timeInterval","options","now","Date","day","getDate","month","getMonth","year","getFullYear","queryKey","capitalize","params","otherType","dirty","each","keys","$unwrapCollection","calendarId","occurrenceId","join","filterCategories","query","re","RegExp","category","saveSelectedList","componentType","$eventsBlocksForView","view","date","viewAction","startDate","endDate","beginOfWeek","setTime","getTime","addDays","setDate","setMonth","endOfWeek","$eventsBlocks","j","dates","deferred","toLowerCase","sd","getDayString","ed","views","reduceComponent","associateComponent","objects","eventData","componentData","object","eventsFields","start","c_startdate","hour","getHourString","blocks","block","nbr","$views","viewData","allDayBlocks","reduce","events","flatten","dayNumber","calendarName","fields","invoke","$parseDate","dateString","time","substring","split","no_time","categories","repeat","alarm","action","quantity","unit","reference","relation","status","delta","classification","isString","setMinutes","Math","round","getMinutes","end","minutesTo","setDelta","dueDate","due","c_category","$isRecurrent","days","byDayMask","occurrence","frequency","byday","toString","interval","monthdays","months","until","$hasCustomRepeat","hasCustomRepeat","units","M","H","D","W","match","exec","SOGoCalendarDefaultReminder","$hasAlarm","destinationCalendar","updateFreeBusy","b","isReadOnly","isEditableOccurrence","isInvitation","userHasRSVP","isInvitationOccurrence","enablePercentComplete","coversFreeBusy","quarter","freebusy","updateFreeBusyCoverage","roundedStart","roundedEnd","startQuarter","endQuarter","daysUpTo","index","hourKey","currentDay","dayKey","getHours","beginOfDay","addMinutes","attendees","attendee","image","email","updateFreeBusyAttendee","sday","eday","map","addAttendee","card","$isList","isGroup","container","listId","refs","ref","c_cn","$preferredEmail","role","c_uid","hasAttendee","emails","deleteAttendee","findIndex","currentAttendee","canRemindAttendeesByEmail","addAttachUrl","attachUrl","attachUrls","deleteAttachUrl","$addDueDate","toISOString","$deleteDueDate","$addStartDate","$deleteStartDate","$reply","reply","delegatedTo","$adjust","every","values","v","dlp","constructor","$mdDateLocaleProvider","format","startTime","endTime","dueTime","stringWithSeparator","organizer","occurrenceOnly","$futureComponentData","copy","repeatDescription","localizedString","l","toUpperCase","alarmDescription"],"mappings":"CAEA,WACE,YAOA,SAASA,GAASC,GAGhB,GADAC,KAAKC,KAAKF,GACNC,KAAKE,OAASF,KAAKG,GAAI,CAEzB,GAAIC,GAAkBN,EAASO,WAAWC,OAAO,eAAgBN,KAAKE,KACtEF,MAAKO,QAAQH,IASjBN,EAASU,UAAY,KAAM,WAAY,OAAQ,aAAc,WAAY,cAAe,YAAa,MAAO,SAASC,EAAIC,EAAUC,EAAMC,EAAUC,EAAUC,EAAaC,EAAWC,GAanL,MAZAC,SAAQC,OAAOpB,GACbW,GAAIA,EACJC,SAAUA,EACVC,KAAMA,EACNN,WAAY,GAAIQ,GAASD,EAASO,WAAW,aAAe,WAAYP,EAASO,cACjFC,aAAcN,EACdO,WAAYN,EACZO,MAAON,EACPG,WAAYP,EAASO,aACrBI,MAAO,OAGFzB,GAOT,KACEmB,Line truncated
|
||||
{"version":3,"sources":["Scheduler/Calendar.service.js","Scheduler/Component.service.js","Scheduler/CalendarController.js","Scheduler/CalendarListController.js","Scheduler/CalendarsController.js","Scheduler/ComponentController.js","Scheduler/sgCalendarDay.directive.js","Scheduler/sgCalendarDayBlock.directive.js","Scheduler/sgCalendarDayTable.directive.js","Scheduler/sgCalendarGhost.directive.js","Scheduler/sgCalendarMonthDay.directive.js","Scheduler/sgCalendarMonthEvent.directive.js","Scheduler/sgCalendarScrollView.directive.js","Scheduler/sgDraggableCalendarBlock.directive.js"],"names":["Calendar","futureCalendarData","this","init","name","id","newCalendarData","$$resource","create","$unwrap","$factory","$q","$timeout","$log","Settings","Resource","Preferences","Component","Acl","angular","extend","activeUser","$Preferences","$Component","$$Acl","$view","module","e","value","EventDragDayLength","EventDragHorizontalOffset","factory","$defaultCalendar","calendar","defaultCalendar","defaults","SOGoDefaultCalendar","_","find","$findAll","active","$add","list","sibling","i","isWebCalendar","$webcalendars","isSubscription","$subscriptions","$calendars","o","localeCompare","indexOf","pluck","splice","data","writable","_this","forEach","push","isUndefined","fetch","then","calendars","union","filter","acls","objectCreator","$get","$getIndex","$subscribe","uid","path","userResource","calendarData","$addWebCalendar","url","d","defer","urls","webCalendarURL","reject","post","isEditable","isRemote","owner","login","debug","JSON","stringify","undefined","resolve","promise","$deleteComponents","components","promises","component","isDefined","pid","uids","all","prototype","color","$acl","isOwned","isSuperUser","$shadowData","$omit","$id","when","$futureCalendarData","getClassName","base","$rename","$save","$delete","remove","$reset","key","save","error","$setActivation","$getComponent","componentId","recurrenceId","$find","isError","isObject","futureComponentData","newComponentData","newguid","isNew","Card","Gravatar","$Card","$gravatar","timeFormat","$query","search","$queryEvents","sort","asc","filterpopup","$queryTasks","$refreshTimeout","$ghost","ready","settings","EventsFilterState","TasksFilterState","EventsSortingState","parseInt","TasksSortingState","show_completed","ShowCompletedTasks","$categories","SOGoCalendarCategoriesColors","SOGoTimeFormat","$selectedCount","count","$events","event","selected","length","$tasks","task","$startRefreshTimeout","type","cancel","refreshViewCheck","SOGoRefreshViewCheck","f","bind","$filter","timeInterval","options","now","Date","day","getDate","month","getMonth","year","getFullYear","queryKey","capitalize","params","otherType","dirty","each","keys","$unwrapCollection","calendarId","occurrenceId","join","filterCategories","query","re","RegExp","category","saveSelectedList","componentType","$eventsBlocksForView","view","date","firstDayOfWeek","viewAction","startDate","endDate","SOGoFirstDayOfWeek","beginOfWeek","setTime","getTime","addDays","setDate","setMonth","endOfWeek","$eventsBlocks","j","dates","deferred","toLowerCase","sd","getDayString","ed","views","reduceComponent","associateComponent","objects","eventData","componentData","object","eventsFields","start","c_startdate","hour","getHourString","blocks","block","nbr","$views","viewData","allDayBlocks","reduce","events","flatten","dayNumber","calendarName","fields","invoke","$parseDate","dateString","time","substring","split","no_time","categories","repeat","alarm","action","quantity","unit","reference","relation","status","delta","classification","isString","setMinutes","Math","round","getMinutes","end","minutesTo","setDelta","dueDate","due","c_category","$isRecurrent","days","byDayMask","occurrence","frequency","byday","toString","interval","monthdays","months","until","$hasCustomRepeat","hasCustomRepeat","units","M","H","D","W","match","exec","SOGoCalendarDefaultReminder","$hasAlarm","destinationCalendar","updateFreeBusy","b","isReadOnly","isEditableOccurrence","isInvitation","userHasRSVP","isInvitationOccurrence","enablePercentComplete","coversFreeBusy","quarter","freebusy","updateFreeBusyCoverage","roundedStart","roundedEnd","startQuarter","endQuarter","daysUpTo","index","hourKey","currentDay","dayKey","getHours","beginOfDay","addMinutes","attendees","attendee","image","email","updateFreeBusyAttendee","sday","eday","map","c_folder","addAttendee","card","$isList","isGroup","container","c_name","listId","refs","ref","c_cn","$preferredEmail","role","c_uid","hasAttendee","emails","deleteAttendee","findIndex","currentAttendee","canRemindAttendeesByEmail","addAttachUrl","attachUrl","attachUrls","deleteAttachUrl","$addDueDate","toISOString","$deleteDueDate","$addStartDate","$deleteStartDate","$reply","reply","delegatedTo","$adjust","every","values","v","dlp","constructor","$mdDateLocaleProvider","format","startTime","endTime","dueTime","stringWithSeparator","organizer","occurrenceOnly","$futureComponentData","copy","repeatDescrLine truncated
|
||||
@@ -124,6 +124,14 @@
|
||||
_this.$calendars.push(calendar);
|
||||
});
|
||||
}
|
||||
else if (angular.isUndefined(this.$calendars)) {
|
||||
this.$calendars = [];
|
||||
this.$subscriptions = [];
|
||||
this.$webcalendars = [];
|
||||
Calendar.$$resource.fetch('calendarslist').then(function(data) {
|
||||
Calendar.$findAll(data.calendars, writable);
|
||||
});
|
||||
}
|
||||
|
||||
if (writable) {
|
||||
return _.union(this.$calendars, _.filter(this.$subscriptions, function(calendar) { return calendar.acls.objectCreator; }));
|
||||
@@ -235,25 +243,19 @@
|
||||
* @return a promise of the HTTP operation
|
||||
*/
|
||||
Calendar.$deleteComponents = function(components) {
|
||||
|
||||
// We create a c_folder -> event hash
|
||||
var calendars = {}, _this = this;
|
||||
var _this = this, calendars = {}, promises = [];
|
||||
|
||||
_.forEach(components, function(component) {
|
||||
if (!angular.isDefined(calendars[component.c_folder]))
|
||||
calendars[component.c_folder] = [];
|
||||
|
||||
calendars[component.c_folder].push(component.c_name);
|
||||
if (!angular.isDefined(calendars[component.pid]))
|
||||
calendars[component.pid] = [];
|
||||
calendars[component.pid].push(component.id);
|
||||
});
|
||||
|
||||
_.forEach(calendars, function(uids, c_folder) {
|
||||
Calendar.$$resource.post(c_folder, 'batchDelete', {uids: uids});
|
||||
_.forEach(calendars, function(uids, pid) {
|
||||
promises.push(Calendar.$$resource.post(pid, 'batchDelete', {uids: uids}));
|
||||
});
|
||||
|
||||
// We slice both arrays - might be useful if in the future, we can delete
|
||||
// events and tasks at the same time.
|
||||
_this.$Component.$events = _.difference(_this.$Component.$events, components);
|
||||
_this.$Component.$tasks = _.difference(_this.$Component.$tasks, components);
|
||||
return Calendar.$q.all(promises);
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
@@ -80,8 +80,12 @@
|
||||
{ ok: l('Delete') })
|
||||
.then(function() {
|
||||
// User confirmed the deletion
|
||||
var components = _.filter(Component['$' + vm.componentType], function(component) { return component.selected; });
|
||||
Calendar.$deleteComponents(components);
|
||||
var components = _.filter(Component['$' + vm.componentType], function(component) {
|
||||
return component.selected;
|
||||
});
|
||||
Calendar.$deleteComponents(components).then(function() {
|
||||
$rootScope.$emit('calendars:list');
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -21,6 +21,8 @@
|
||||
vm.share = share;
|
||||
vm.importCalendar = importCalendar;
|
||||
vm.exportCalendar = exportCalendar;
|
||||
vm.showOnly = showOnly;
|
||||
vm.showAll = showAll;
|
||||
vm.showLinks = showLinks;
|
||||
vm.showProperties = showProperties;
|
||||
vm.subscribeToFolder = subscribeToFolder;
|
||||
@@ -202,6 +204,19 @@
|
||||
window.location.href = ApplicationBaseURL + '/' + calendar.id + '.ics' + '/export';
|
||||
}
|
||||
|
||||
function showOnly(calendar) {
|
||||
_.forEach(Calendar.$findAll(), function(o) {
|
||||
if (calendar.id == o.id)
|
||||
o.active = 1;
|
||||
else
|
||||
o.active = 0;
|
||||
});
|
||||
}
|
||||
|
||||
function showAll() {
|
||||
_.forEach(Calendar.$findAll(), function(o) { o.active = 1; });
|
||||
}
|
||||
|
||||
function showLinks(calendar) {
|
||||
$mdDialog.show({
|
||||
parent: angular.element(document.body),
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
$Preferences: Preferences,
|
||||
$Card: Card,
|
||||
$gravatar: Gravatar,
|
||||
$$resource: new Resource(Settings.baseURL(), Settings.activeUser()),
|
||||
$$resource: new Resource(Settings.activeUser('folderURL') + 'Calendar', Settings.activeUser()),
|
||||
timeFormat: "%H:%M",
|
||||
// Filter parameters common to events and tasks
|
||||
$query: { value: '', search: 'title_Category_Location' },
|
||||
@@ -236,35 +236,40 @@
|
||||
* @returns a promise of a collection of objects describing the events blocks
|
||||
*/
|
||||
Component.$eventsBlocksForView = function(view, date) {
|
||||
var viewAction, startDate, endDate, params;
|
||||
var _this = this;
|
||||
|
||||
if (view == 'day') {
|
||||
viewAction = 'dayView';
|
||||
startDate = endDate = date;
|
||||
}
|
||||
else if (view == 'multicolumnday') {
|
||||
viewAction = 'multicolumndayView';
|
||||
startDate = endDate = date;
|
||||
}
|
||||
else if (view == 'week') {
|
||||
viewAction = 'weekView';
|
||||
startDate = date.beginOfWeek();
|
||||
endDate = new Date();
|
||||
endDate.setTime(startDate.getTime());
|
||||
endDate.addDays(6);
|
||||
}
|
||||
else if (view == 'month') {
|
||||
viewAction = 'monthView';
|
||||
startDate = date;
|
||||
startDate.setDate(1);
|
||||
startDate = startDate.beginOfWeek();
|
||||
endDate = new Date();
|
||||
endDate.setTime(startDate.getTime());
|
||||
endDate.setMonth(endDate.getMonth() + 1);
|
||||
endDate.addDays(-1);
|
||||
endDate = endDate.endOfWeek();
|
||||
}
|
||||
return this.$eventsBlocks(viewAction, startDate, endDate);
|
||||
return Component.$Preferences.ready().then(function(data) {
|
||||
var firstDayOfWeek, viewAction, startDate, endDate, params;
|
||||
firstDayOfWeek = Component.$Preferences.defaults.SOGoFirstDayOfWeek;
|
||||
|
||||
if (view == 'day') {
|
||||
viewAction = 'dayView';
|
||||
startDate = endDate = date;
|
||||
}
|
||||
else if (view == 'multicolumnday') {
|
||||
viewAction = 'multicolumndayView';
|
||||
startDate = endDate = date;
|
||||
}
|
||||
else if (view == 'week') {
|
||||
viewAction = 'weekView';
|
||||
startDate = date.beginOfWeek(firstDayOfWeek);
|
||||
endDate = new Date();
|
||||
endDate.setTime(startDate.getTime());
|
||||
endDate.addDays(6);
|
||||
}
|
||||
else if (view == 'month') {
|
||||
viewAction = 'monthView';
|
||||
startDate = date;
|
||||
startDate.setDate(1);
|
||||
startDate = startDate.beginOfWeek(firstDayOfWeek);
|
||||
endDate = new Date();
|
||||
endDate.setTime(startDate.getTime());
|
||||
endDate.setMonth(endDate.getMonth() + 1);
|
||||
endDate.addDays(-1);
|
||||
endDate = endDate.endOfWeek(firstDayOfWeek);
|
||||
}
|
||||
return _this.$eventsBlocks(viewAction, startDate, endDate);
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
@@ -23,17 +23,6 @@ CKEDITOR.editorConfig = function( config ) {
|
||||
config.tabSpaces = 4;
|
||||
config.allowedContent = true; // don't filter tags
|
||||
|
||||
// The list of fonts size to be displayed in the Font Size combo in the toolbar.
|
||||
config.fontSize_sizes = '8/8px;9/9px;10/10px;11/11px;12/12px;13/13px;14/14px;16/16px;18/18px;20/20px;22/22px;24/24px;26/26px;28/28px;36/36px;48/48px;72/72px';
|
||||
|
||||
// Explicitly show the default site font size to the end user (as defined in contents.css)
|
||||
config.fontSize_defaultLabel = '13px';
|
||||
|
||||
// The CSS file(s) to be used to apply style to editor content.
|
||||
// For example, the following ck.css could overwrite the font-size of .cke_editable
|
||||
//config.contentsCss = ['/SOGo.woa/WebServerResources/js/vendor/ckeditor/contents.css', // default CSS
|
||||
// '/css/ck.css']; // custom CSS
|
||||
|
||||
// Disables the built-in words spell checker if browser provides one. Defaults to true.
|
||||
// http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-disableNativeSpellChecker
|
||||
//config.disableNativeSpellChecker = false;
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
!function(a){"use strict";"function"==typeof define&&define.amd?define(a):"undefined"!=typeof module&&"undefined"!=typeof module.exports?module.exports=a():"undefined"!=typeof Package?Sortable=a():window.Sortable=a()}(function(){"use strict";function a(a,b){if(!a||!a.nodeType||1!==a.nodeType)throw"Sortable: `el` must be HTMLElement, and not "+{}.toString.call(a);this.el=a,this.options=b=r({},b),a[L]=this;var c={group:Math.random(),sort:!0,disabled:!1,store:null,handle:null,scroll:!0,scrollSensitivity:30,scrollSpeed:10,draggable:/[uo]l/i.test(a.nodeName)?"li":">*",ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",ignore:"a, img",filter:null,animation:0,setData:function(a,b){a.setData("Text",b.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1};for(var d in c)!(d in b)&&(b[d]=c[d]);V(b);for(var f in this)"_"===f.charAt(0)&&(this[f]=this[f].bind(this));this.nativeDraggable=b.forceFallback?!1:P,e(a,"mousedown",this._onTapStart),e(a,"touchstart",this._onTapStart),this.nativeDraggable&&(e(a,"dragover",this),e(a,"dragenter",this)),T.push(this._onDragOver),b.store&&this.sort(b.store.get(this))}function b(a){v&&v.state!==a&&(h(v,"display",a?"none":""),!a&&v.state&&w.insertBefore(v,s),v.state=a)}function c(a,b,c){if(a){c=c||N,b=b.split(".");var d=b.shift().toUpperCase(),e=new RegExp("\\s("+b.join("|")+")(?=\\s)","g");do if(">*"===d&&a.parentNode===c||(""===d||a.nodeName.toUpperCase()==d)&&(!b.length||((" "+a.className+" ").match(e)||[]).length==b.length))return a;while(a!==c&&(a=a.parentNode))}return null}function d(a){a.dataTransfer&&(a.dataTransfer.dropEffect="move"),a.preventDefault()}function e(a,b,c){a.addEventListener(b,c,!1)}function f(a,b,c){a.removeEventListener(b,c,!1)}function g(a,b,c){if(a)if(a.classList)a.classList[c?"add":"remove"](b);else{var d=(" "+a.className+" ").replace(K," ").replace(" "+b+" "," ");a.className=(d+(c?" "+b:"")).replace(K," ")}}function h(a,b,c){var d=a&&a.style;if(d){if(void 0===c)return N.defaultView&&N.defaultView.getComputedStyle?c=N.defaultView.getComputedStyle(a,""):a.currentStyle&&(c=a.currentStyle),void 0===b?c:c[b];b in d||(b="-webkit-"+b),d[b]=c+("string"==typeof c?"":"px")}}function i(a,b,c){if(a){var d=a.getElementsByTagName(b),e=0,f=d.length;if(c)for(;f>e;e++)c(d[e],e);return d}return[]}function j(a,b,c,d,e,f,g){var h=N.createEvent("Event"),i=(a||b[L]).options,j="on"+c.charAt(0).toUpperCase()+c.substr(1);h.initEvent(c,!0,!0),h.to=b,h.from=e||b,h.item=d||b,h.clone=v,h.oldIndex=f,h.newIndex=g,b.dispatchEvent(h),i[j]&&i[j].call(a,h)}function k(a,b,c,d,e,f){var g,h,i=a[L],j=i.options.onMove;return g=N.createEvent("Event"),g.initEvent("move",!0,!0),g.to=b,g.from=a,g.dragged=c,g.draggedRect=d,g.related=e||b,g.relatedRect=f||b.getBoundingClientRect(),a.dispatchEvent(g),j&&(h=j.call(i,g)),h}function l(a){a.draggable=!1}function m(){R=!1}function n(a,b){var c=a.lastElementChild,d=c.getBoundingClientRect();return(b.clientY-(d.top+d.height)>5||b.clientX-(d.right+d.width)>5)&&c}function o(a){for(var b=a.tagName+a.className+a.src+a.href+a.textContent,c=b.length,d=0;c--;)d+=b.charCodeAt(c);return d.toString(36)}function p(a){var b=0;if(!a||!a.parentNode)return-1;for(;a&&(a=a.previousElementSibling);)"TEMPLATE"!==a.nodeName.toUpperCase()&&b++;return b}function q(a,b){var c,d;return function(){void 0===c&&(c=arguments,d=this,setTimeout(function(){1===c.length?a.call(d,c[0]):a.apply(d,c),c=void 0},b))}}function r(a,b){if(a&&b)for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c]);return a}var s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J={},K=/\s+/g,L="Sortable"+(new Date).getTime(),M=window,N=M.document,O=M.parseInt,P=!!("draggable"in N.createElement("div")),Q=function(a){return a=N.createElement("x"),a.style.cssText="pointer-events:auto","auto"===a.style.pointerEvents}(),R=!1,S=Math.abs,T=([].slice,[]),U=q(function(a,b,c){if(c&&b.scroll){var d,e,f,g,h=b.scrollSensitivity,i=b.scrollSpeed,j=a.clientX,k=a.clientY,l=window.innerWidth,m=window.innerHeight;if(z!==c&&(y=b.scroll,z=c,y===!0)){y=c;do if(y.offsetWidth<y.scrollWidth||y.offsetHeight<y.scrollHeight)break;while(y=y.parentNode)}y&&(d=y,e=y.getBoundingClientRect(),f=(S(e.right-j)<=h)-(S(e.left-j)<=h),g=(S(e.bottom-k)<=h)-(S(e.top-k)<=h)),f||g||(f=(h>=l-j)-(h>=j),g=(h>=m-k)-(h>=k),(f||g)&&(d=M)),(J.vx!==f||J.vy!==g||J.el!==d)&&(J.el=d,J.vx=f,J.vy=g,clearInterval(J.pid),d&&(J.pid=setInterval(function(){d===M?M.scrollTo(M.pageXOffset+f*i,M.pageYOffset+g*i):(g&&(d.scrollTop+=g*i),f&&(d.scrollLeft+=f*i))},24)))}},30),V=function(a){var b=a.group;b&&"object"==typeof b||(b=a.group={name:b}),["pull","put"].forEach(function(a){a in b||(b[a]=!0)}),a.groups=" "+b.name+(b.put.join?" "+b.put.join(" "):"")+" "};return a.prototype={constructor:a,_onTapStart:function(a){var b=this,d=this.el,e=this.options,f=a.type,g=a.touches&&a.touches[0],h=(g||a).target,i=h,k=e.filter;if(!("mousedown"===f&&0!==a.button||e.disabled)&&(h=c(h,e.draggable,d))){if(D=p(h),"function"==typLine truncated
|
||||
//# sourceMappingURL=ng-sortable.js.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../bower_components/Sortable/Sortable.js","../../bower_components/Sortable/ng-sortable.js"],"names":["factory","define","amd","module","exports","Package","Sortable","window","el","options","nodeType","toString","call","this","_extend","expando","defaults","group","Math","random","sort","disabled","store","handle","scroll","scrollSensitivity","scrollSpeed","draggable","test","nodeName","ghostClass","chosenClass","ignore","filter","animation","setData","dataTransfer","dragEl","textContent","dropBubble","dragoverBubble","dataIdAttr","delay","forceFallback","fallbackClass","fallbackOnBody","name","_prepareGroup","fn","charAt","bind","nativeDraggable","supportDraggable","_on","_onTapStart","touchDragOverListeners","push","_onDragOver","get","_cloneHide","state","cloneEl","_css","rootEl","insertBefore","_closest","selector","ctx","document","split","tag","shift","toUpperCase","re","RegExp","join","parentNode","length","className","match","_globalDragOver","evt","dropEffect","preventDefault","event","addEventListener","_off","removeEventListener","_toggleClass","classList","replace","RSPACE","prop","val","style","defaultView","getComputedStyle","currentStyle","_find","tagName","iterator","list","getElementsByTagName","i","n","_dispatchEvent","sortable","targetEl","fromEl","startIndex","newIndex","createEvent","onName","substr","initEvent","to","from","item","clone","oldIndex","dispatchEvent","_onMove","toEl","dragRect","targetRect","retVal","onMoveFn","onMove","dragged","draggedRect","related","relatedRect","getBoundingClientRect","_disableDraggable","_unsilent","_silent","_ghostIsLast","lastEl","lastElementChild","rect","clientY","top","height","clientX","right","width","_generateId","str","src","href","sum","charCodeAt","_index","index","previousElementSibling","_throttle","callback","ms","args","_this","arguments","setTimeout","apply","dst","key","hasOwnProperty","parentEl","ghostEl","nextEl","scrollEl","scrollParentEl","lastCSS","lastParentCSS","activeGroup","tapEvt","touchEvt","moved","autoScroll","Date","getTime","win","parseInt","createElement","supportCssPointerEvents","cssText","pointerEvents","abs","slice","_autoScroll","vx","vy","sens","speed","x","y","winWidth","innerWidth","winHeight","innerHeight","offsetWidth","scrollWidth","offsetHeight","scrollHeight","left","bottom","clearInterval","pid","setInterval","scrollTo","pageXOffset","pageYOffset","scrollTop","scrollLeft","forEach","groups","put","prototype","constructor","type","touch","touches","target","originalTarget","button","some","criteria","trim","_prepareDragStart","dragStartFn","ownerDocument","nextSibling","_disableDelayedDrag","_triggerDragStart","_onDrop","_dragStartTimer","clearTimeout","_onDragStart","selection","empty","getSelection","removeAllRanges","err","_dragStarted","active","_emulateDragOver","_lastX","_lastY","elementFromPoint","parent","groupName","indexOf","_onTouchMove","_appendGhost","dx","dy","translate3d","ghostRect","css","cloneNode","marginTop","marginLeft","body","appendChild","useFallback","_offUpEvents","pull","_loopId","effectAllowed","revert","groupPut","isOwner","canSort","stopPropagation","contains","children","animated","_animate","after","floating","cssFloat","display","isWide","isLong","halfway","nextElementSibling","moveVector","elTop","offsetTop","tgTop","prevRect","currentRect","removeChild","save","handleEvent","toArray","order","getAttribute","items","id","set","closest","option","value","destroy","Array","querySelectorAll","removeAttribute","splice","utils","on","off","find","is","extend","throttle","toggleClass","create","version","require","angular","constant","directive","$parse","ngSortableConfig","removed","getSourceFactory","scope","ngRepeat","childNodes","node","nodeValue","itemsExpr","$parent","restrict","ngSortable","link","$el","_emitEvent","source","getSource","model","models","_sync","prevItems","copy","$apply","watchers","Object","keys","reduce","opts","onStart","onEnd","onAdd","onUpdate","onRemove","onSort","unwatch","$watch"],"mappings":"CAOA,SAAWA,GACV,YAEsB,mBAAXC,SAAyBA,OAAOC,IAC1CD,OAAOD,GAEkB,mBAAVG,SAAkD,mBAAlBA,QAAOC,QACtDD,OAAOC,QAAUJ,IAEU,mBAAZK,SACfC,SAAWN,IAIXO,OAAiB,SAAIP,KAEpB,WACF,YAqJA,SAASM,GAASE,EAAIC,GACrB,IAAMD,IAAMA,EAAGE,UAA4B,IAAhBF,EAAGE,SAC7B,KAAM,kDAAoDC,SAASC,KAAKJ,EAGzEK,MAAKL,GAAKA,EACVK,KAAKJ,QAAUA,EAAUK,KAAYL,GAIrCD,EAAGO,GAAWF,IAId,IAAIG,IACHC,MAAOC,KAAKC,SACZC,MAAM,EACNC,UAAU,EACVC,MAAO,KACPC,OAAQ,KACRC,QAAQ,EACRC,kBAAmB,GACnBC,YAAa,GACbC,UAAW,SAASC,KAAKpB,EAAGqB,UAAY,KAAO,KAC/CC,WAAY,iBACZC,YAAa,kBACbC,OAAQ,SACRC,OAAQ,KACRC,UAAW,EACXC,QAAS,SAAUC,EAAcC,GAChCD,EAAaD,QAAQ,OAAQE,EAAOC,cAErCC,YAAY,EACZC,gBAAgB,EAChBC,WAAY,UACZC,MAAO,EACPC,eAAe,EACfC,cAAe,oBACfC,gBAAgB,EAKjB,KAAK,GAAIC,KAAQ9B,KACd8B,IAAQrC,MAAaA,EAAQqC,GAAQ9B,EAAS8B,GAGjDC,GAActC,EAGd,KAAK,GAAIuC,KAAMnC,MACO,MAAjBmC,EAAGC,OAAO,KACbpC,KAAKmC,GAAMnC,KAAKmC,GAAIE,KAAKrC,MAK3BA,MAAKsC,gBAAkB1C,EAAQkC,eAAgB,EAAQS,EAGvDC,EAAI7C,EAAI,YAAaK,KAAKyC,aAC1BD,EAAI7C,EAAI,aAAcK,KAAKLine truncated
|
||||
Reference in new issue
Block a user