mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-06-27 04:44:18 +00:00
Merge to 2.2.7
This commit is contained in:
@@ -457,13 +457,12 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
NSData *d;
|
||||
|
||||
//
|
||||
// We mark the cache object as deleted
|
||||
// We destroy the cache object
|
||||
//
|
||||
key = [NSString stringWithFormat: @"%@+%@", [context objectForKey: @"DeviceId"], [folderToDelete nameInContainer]];
|
||||
o = [SOGoCacheGCSObject objectWithName: key inContainer: nil];
|
||||
[o setTableUrl: [self folderTableURL]];
|
||||
[o reloadIfNeeded];
|
||||
[o delete];
|
||||
[o destroy];
|
||||
|
||||
//
|
||||
// We update the FolderSync's synckey
|
||||
@@ -697,7 +696,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
if (![imapGUIDs allKeysForObject: cKey])
|
||||
{
|
||||
// Delete folders cache content to avoid stale data if a new folder gets created with the same name
|
||||
// Destroy folders cache content to avoid stale data if a new folder gets created with the same name
|
||||
key = [NSString stringWithFormat: @"%@+folder%@", [context objectForKey: @"DeviceId"], [cachedGUIDs objectForKey: cKey]];
|
||||
o = [SOGoCacheGCSObject objectWithName: key inContainer: nil];
|
||||
[o setObjectType: ActiveSyncFolderCacheObject];
|
||||
@@ -711,8 +710,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
command_count++;
|
||||
}
|
||||
|
||||
[[o properties] removeAllObjects];
|
||||
[o save];
|
||||
[o destroy];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,3 +1,637 @@
|
||||
commit 397a36cc89f0160bc84ba19b2f7adc2b96a6a5c1
|
||||
Author: Francis Lachapelle <flachapelle@inverse.ca>
|
||||
Date: Wed Jul 30 11:16:10 2014 -0400
|
||||
|
||||
Preparation for release 2.2.7
|
||||
|
||||
M Documentation/SOGo Installation Guide.odt
|
||||
M Documentation/SOGo Mozilla Thunderbird Configuration.odt
|
||||
M Documentation/SOGo Native Microsoft Outlook Configuration.odt
|
||||
M Version
|
||||
|
||||
commit c240931c54873943349d0c65c1fb9b1dadcbd9c1
|
||||
Author: Francis Lachapelle <flachapelle@inverse.ca>
|
||||
Date: Wed Jul 30 11:15:05 2014 -0400
|
||||
|
||||
Update CKEditor to version 4.4.3
|
||||
|
||||
M NEWS
|
||||
M UI/WebServerResources/ckeditor/build-config.js
|
||||
M UI/WebServerResources/ckeditor/ckeditor.js
|
||||
M UI/WebServerResources/ckeditor/lang/ar.js
|
||||
M UI/WebServerResources/ckeditor/lang/ca.js
|
||||
M UI/WebServerResources/ckeditor/lang/cs.js
|
||||
M UI/WebServerResources/ckeditor/lang/cy.js
|
||||
M UI/WebServerResources/ckeditor/lang/da.js
|
||||
M UI/WebServerResources/ckeditor/lang/de.js
|
||||
M UI/WebServerResources/ckeditor/lang/en.js
|
||||
M UI/WebServerResources/ckeditor/lang/es.js
|
||||
M UI/WebServerResources/ckeditor/lang/fi.js
|
||||
M UI/WebServerResources/ckeditor/lang/fr.js
|
||||
M UI/WebServerResources/ckeditor/lang/hu.js
|
||||
M UI/WebServerResources/ckeditor/lang/is.js
|
||||
M UI/WebServerResources/ckeditor/lang/it.js
|
||||
M UI/WebServerResources/ckeditor/lang/nb.js
|
||||
M UI/WebServerResources/ckeditor/lang/nl.js
|
||||
M UI/WebServerResources/ckeditor/lang/no.js
|
||||
M UI/WebServerResources/ckeditor/lang/pl.js
|
||||
M UI/WebServerResources/ckeditor/lang/pt-br.js
|
||||
M UI/WebServerResources/ckeditor/lang/ru.js
|
||||
M UI/WebServerResources/ckeditor/lang/sk.js
|
||||
M UI/WebServerResources/ckeditor/lang/sv.js
|
||||
M UI/WebServerResources/ckeditor/lang/uk.js
|
||||
M UI/WebServerResources/ckeditor/plugins/colordialog/dialogs/colordialog.js
|
||||
M UI/WebServerResources/ckeditor/plugins/image/dialogs/image.js
|
||||
M UI/WebServerResources/ckeditor/plugins/tabletools/dialogs/tableCell.js
|
||||
M UI/WebServerResources/ckeditor/skins/moono/dialog.css
|
||||
M UI/WebServerResources/ckeditor/skins/moono/dialog_ie.css
|
||||
M UI/WebServerResources/ckeditor/skins/moono/dialog_ie7.css
|
||||
M UI/WebServerResources/ckeditor/skins/moono/dialog_ie8.css
|
||||
M UI/WebServerResources/ckeditor/skins/moono/dialog_iequirks.css
|
||||
M UI/WebServerResources/ckeditor/skins/moono/editor.css
|
||||
M UI/WebServerResources/ckeditor/skins/moono/editor_gecko.css
|
||||
M UI/WebServerResources/ckeditor/skins/moono/editor_ie.css
|
||||
M UI/WebServerResources/ckeditor/skins/moono/editor_ie7.css
|
||||
M UI/WebServerResources/ckeditor/skins/moono/editor_ie8.css
|
||||
M UI/WebServerResources/ckeditor/skins/moono/editor_iequirks.css
|
||||
|
||||
commit ef2432e10f396886f09134ff39c9b90cac5e8c2b
|
||||
Author: Francis Lachapelle <flachapelle@inverse.ca>
|
||||
Date: Wed Jul 30 10:36:31 2014 -0400
|
||||
|
||||
Update NEWS file
|
||||
|
||||
M NEWS
|
||||
|
||||
commit 571322958a875e53dc0c689caf3f24a1debdea54
|
||||
Author: Francis Lachapelle <flachapelle@inverse.ca>
|
||||
Date: Wed Jul 30 10:33:15 2014 -0400
|
||||
|
||||
Update fi, fr, de, and es_ES translations
|
||||
|
||||
M SoObjects/Appointments/Finnish.lproj/Localizable.strings
|
||||
M SoObjects/Appointments/French.lproj/Localizable.strings
|
||||
M SoObjects/Appointments/German.lproj/Localizable.strings
|
||||
M SoObjects/Appointments/SpanishSpain.lproj/Localizable.strings
|
||||
M UI/Common/German.lproj/Localizable.strings
|
||||
M UI/PreferencesUI/Finnish.lproj/Localizable.strings
|
||||
M UI/PreferencesUI/French.lproj/Localizable.strings
|
||||
M UI/PreferencesUI/German.lproj/Localizable.strings
|
||||
M UI/PreferencesUI/SpanishSpain.lproj/Localizable.strings
|
||||
M UI/Scheduler/Finnish.lproj/Localizable.strings
|
||||
M UI/Scheduler/French.lproj/Localizable.strings
|
||||
M UI/Scheduler/German.lproj/Localizable.strings
|
||||
M UI/Scheduler/SpanishSpain.lproj/Localizable.strings
|
||||
|
||||
commit bd5c05cca2aa9166198c9c6ea6e9c583da9359bd
|
||||
Author: Francis Lachapelle <flachapelle@inverse.ca>
|
||||
Date: Wed Jul 30 10:31:25 2014 -0400
|
||||
|
||||
Indentation in JavaScript files
|
||||
|
||||
M UI/WebServerResources/AdministrationUI.js
|
||||
M UI/WebServerResources/ContactsUI.js
|
||||
M UI/WebServerResources/MailerUI.js
|
||||
M UI/WebServerResources/SchedulerUI.js
|
||||
M UI/WebServerResources/UIxPreferences.js
|
||||
M UI/WebServerResources/generic.js
|
||||
|
||||
commit ea44308aa3d95d150b6d6565cdf4dbdc79e5c64e
|
||||
Author: Francis Lachapelle <flachapelle@inverse.ca>
|
||||
Date: Tue Jul 29 16:05:46 2014 -0400
|
||||
|
||||
Fix all-day events display in IE
|
||||
|
||||
It also fixes the display of the event categories for all-day events in
|
||||
IE.
|
||||
|
||||
M NEWS
|
||||
M UI/WebServerResources/SchedulerUI.css
|
||||
M UI/WebServerResources/SchedulerUI.js
|
||||
|
||||
commit 94f3246658c151b55ca86404c607fe29de7b94b1
|
||||
Author: Ludovic Marcotte <lmarcotte@inverse.ca>
|
||||
Date: Tue Jul 29 10:36:20 2014 -0400
|
||||
|
||||
Improved error message when you cannot invite users
|
||||
|
||||
M SoObjects/Appointments/English.lproj/Localizable.strings
|
||||
M SoObjects/Appointments/SOGoAppointmentObject.m
|
||||
|
||||
commit 1df7e989e012fbbb3a93293ed944b2c80f48299f
|
||||
Author: Ludovic Marcotte <lmarcotte@inverse.ca>
|
||||
Date: Fri Jul 25 14:48:25 2014 -0400
|
||||
|
||||
Removed worthless declaration
|
||||
|
||||
M UI/Scheduler/UIxCalListingActions.m
|
||||
|
||||
commit d9ca1051b31f7efd35083dc87bd59b143cb3e593
|
||||
Author: Francis Lachapelle <flachapelle@inverse.ca>
|
||||
Date: Fri Jul 25 11:34:33 2014 -0400
|
||||
|
||||
Improve headers of multicolumns view
|
||||
|
||||
M UI/Templates/SchedulerUI/UIxCalDayTable.wox
|
||||
M UI/Templates/SchedulerUI/UIxCalendarSelector.wox
|
||||
M UI/WebServerResources/SchedulerUI.css
|
||||
|
||||
commit 4eefa4c2697d4da8ba72674a81f74492e01a11dd
|
||||
Author: Ludovic Marcotte <lmarcotte@inverse.ca>
|
||||
Date: Fri Jul 25 08:12:12 2014 -0400
|
||||
|
||||
Fixed test since we now return a 200 instead of a 204
|
||||
|
||||
M Tests/Integration/utilities.py
|
||||
|
||||
commit 4c21a050d91e5969921db8f9971752863a7edd48
|
||||
Author: Ludovic Marcotte <lmarcotte@inverse.ca>
|
||||
Date: Thu Jul 24 14:00:57 2014 -0400
|
||||
|
||||
JSON interface to folder subscriptions
|
||||
|
||||
M NEWS
|
||||
M UI/MainUI/SOGoUserHomePage.m
|
||||
M UI/WebServerResources/UIxContactsUserFolders.js
|
||||
|
||||
commit b52289904f607121627a5cf3298f7124a5042d22
|
||||
Author: Alexandre Cloutier <acloutier@inverse.ca>
|
||||
Date: Thu Jul 24 13:48:41 2014 -0400
|
||||
|
||||
task.png for DnD taskList
|
||||
|
||||
A UI/WebServerResources/task.png
|
||||
|
||||
commit c389630d76b4d72e10552be32f8482b4807c1558
|
||||
Author: Alexandre Cloutier <acloutier@inverse.ca>
|
||||
Date: Thu Jul 24 13:35:14 2014 -0400
|
||||
|
||||
DnD tasksList
|
||||
|
||||
M UI/WebServerResources/SchedulerUI.css
|
||||
M UI/WebServerResources/SchedulerUI.js
|
||||
|
||||
commit f6ef94a6314e3fe7d5b863d20a0df4580e8ca7bb
|
||||
Author: Ludovic Marcotte <lmarcotte@inverse.ca>
|
||||
Date: Thu Jul 24 12:48:03 2014 -0400
|
||||
|
||||
improved handling of SOGoSubscriptionFolderFormat
|
||||
|
||||
M NEWS
|
||||
M SoObjects/Appointments/SOGoAppointmentFolders.m
|
||||
M SoObjects/SOGo/SOGoGCSFolder.m
|
||||
M SoObjects/SOGo/SOGoUserFolder.m
|
||||
M UI/Common/UIxAclEditor.m
|
||||
M UI/Common/UIxFolderActions.m
|
||||
M UI/MainUI/SOGoUserHomePage.m
|
||||
M UI/WebServerResources/UIxContactsUserFolders.js
|
||||
|
||||
commit 5de51e8aa1facd6ddaf1162f31f9e42ca810d125
|
||||
Author: Francis Lachapelle <flachapelle@inverse.ca>
|
||||
Date: Thu Jul 24 09:30:19 2014 -0400
|
||||
|
||||
Fix missing argument with new DnD controller
|
||||
|
||||
M UI/WebServerResources/SchedulerUIDnD.js
|
||||
|
||||
commit 006727a74b42ee0fe5fcb479a9ab8080db14602b
|
||||
Author: Ludovic Marcotte <lmarcotte@inverse.ca>
|
||||
Date: Thu Jul 24 08:39:41 2014 -0400
|
||||
|
||||
Properly destroy cache objects of vanished folders
|
||||
|
||||
M ActiveSync/SOGoActiveSyncDispatcher.m
|
||||
M NEWS
|
||||
M SoObjects/SOGo/SOGoCacheGCSObject.m
|
||||
M SoObjects/SOGo/SOGoCacheObject.h
|
||||
|
||||
commit 6619840f80dab04eacac6a7fe66436443796bfd8
|
||||
Author: Jeroen Dekkers <jeroen@dekkers.ch>
|
||||
Date: Tue Jul 22 19:54:18 2014 +0200
|
||||
|
||||
Add Mailer and Appointments to product.list requires of MailPartViewers
|
||||
|
||||
M UI/MailPartViewers/product.plist
|
||||
|
||||
commit 08fd2fcfaa8488a8460c0b555b45f4950f1010a2
|
||||
Author: Francis Lachapelle <flachapelle@inverse.ca>
|
||||
Date: Tue Jul 22 13:26:28 2014 -0400
|
||||
|
||||
Fix JavaScript after bad merge
|
||||
|
||||
M UI/WebServerResources/SchedulerUI.js
|
||||
|
||||
commit a43dd97fc939692f74f38dfcd2064147e8cafbdc
|
||||
Author: Alexandre Cloutier <acloutier@inverse.ca>
|
||||
Date: Tue Jul 22 11:37:45 2014 -0400
|
||||
|
||||
Fix bug with DnD; leftPanelController.stopEvent()
|
||||
|
||||
M UI/WebServerResources/SchedulerUIDnD.js
|
||||
|
||||
commit 192659fdd9d64ddd63f8dcd014a14a3b4e7fad15
|
||||
Author: Francis Lachapelle <flachapelle@inverse.ca>
|
||||
Date: Mon Jul 21 16:12:27 2014 -0400
|
||||
|
||||
Add missing localizable string
|
||||
|
||||
M UI/PreferencesUI/English.lproj/Localizable.strings
|
||||
|
||||
commit 06fe36fd75aaedd05ff7e92cad1320f4dff63160
|
||||
Author: Francis Lachapelle <flachapelle@inverse.ca>
|
||||
Date: Mon Jul 21 16:07:13 2014 -0400
|
||||
|
||||
Add missing localizable strings
|
||||
|
||||
M UI/PreferencesUI/English.lproj/Localizable.strings
|
||||
M UI/Templates/PreferencesUI/UIxPreferences.wox
|
||||
|
||||
commit 24f9d83ff7e8503118aabd02598f3300a07a646b
|
||||
Author: Francis Lachapelle <flachapelle@inverse.ca>
|
||||
Date: Mon Jul 21 16:06:24 2014 -0400
|
||||
|
||||
Fix JavaScript from merge leftover
|
||||
|
||||
M UI/WebServerResources/SchedulerUI.js
|
||||
|
||||
commit 8dd967d0a87a7ee560b854f667fb55c296b89245
|
||||
Author: Ludovic Marcotte <lmarcotte@inverse.ca>
|
||||
Date: Mon Jul 21 15:38:23 2014 -0400
|
||||
|
||||
Updated NEWS file for two merged pull requests
|
||||
|
||||
M NEWS
|
||||
|
||||
commit 08cd080d47f4ef0d0d262021e173b5d6c6519276
|
||||
Author: Ludovic Marcotte <lmarcotte@inverse.ca>
|
||||
Date: Mon Jul 21 15:34:56 2014 -0400
|
||||
|
||||
Fixed charset substitution in meta tags
|
||||
|
||||
M NEWS
|
||||
M UI/MailPartViewers/UIxMailPartHTMLViewer.m
|
||||
|
||||
commit 28e6bb8b9d521dad8801206655c30d57ef3f9ff6
|
||||
Author: Alexandre Cloutier <acloutier@inverse.ca>
|
||||
Date: Fri Jul 18 15:03:28 2014 -0400
|
||||
|
||||
Applied comments
|
||||
|
||||
M UI/Scheduler/English.lproj/Localizable.strings
|
||||
M UI/Templates/SchedulerUI/UIxCalMainView.wox
|
||||
M UI/WebServerResources/SchedulerUI.css
|
||||
M UI/WebServerResources/SchedulerUI.js
|
||||
M UI/WebServerResources/SchedulerUIDnD.js
|
||||
|
||||
commit b892b3f7946e4466a51af901fb4b77da75872d40
|
||||
Author: Alexandre Cloutier <acloutier@inverse.ca>
|
||||
Date: Fri Jul 18 10:14:38 2014 -0400
|
||||
|
||||
Add RegEx
|
||||
|
||||
M UI/Scheduler/English.lproj/Localizable.strings
|
||||
M UI/WebServerResources/SchedulerUI.js
|
||||
|
||||
commit cdf4cc1acb98f451bec00ab7d6e3858937c293a8
|
||||
Author: Alexandre Cloutier <acloutier@inverse.ca>
|
||||
Date: Fri Jul 18 09:46:31 2014 -0400
|
||||
|
||||
fix DnD from eventList to calendarList for repeated event
|
||||
|
||||
M UI/WebServerResources/SchedulerUI.js
|
||||
|
||||
commit 3cac794de5dbda0f005901cbb081b2ee5fa01e7f
|
||||
Author: Alexandre Cloutier <acloutier@inverse.ca>
|
||||
Date: Fri Jul 18 09:33:51 2014 -0400
|
||||
|
||||
move line
|
||||
|
||||
M UI/WebServerResources/SchedulerUIDnD.js
|
||||
|
||||
commit 8f9b24a23f593eb2041cfaaca3e4fb611ddd7060
|
||||
Author: Alexandre Cloutier <acloutier@inverse.ca>
|
||||
Date: Fri Jul 18 09:23:07 2014 -0400
|
||||
|
||||
visual helper while dragging from calendar view to calendarList
|
||||
|
||||
M UI/Templates/SchedulerUI/UIxCalMainView.wox
|
||||
M UI/WebServerResources/SchedulerUI.css
|
||||
M UI/WebServerResources/SchedulerUIDnD.js
|
||||
|
||||
commit a2a7014140ce8abf97ce9b04b9eb7467deda192b
|
||||
Author: Alexandre Cloutier <acloutier@inverse.ca>
|
||||
Date: Thu Jul 17 09:42:32 2014 -0400
|
||||
|
||||
fix dnd repeated event bug + applied comments
|
||||
|
||||
M UI/Scheduler/UIxAppointmentActions.m
|
||||
M UI/WebServerResources/SchedulerUI.js
|
||||
M UI/WebServerResources/SchedulerUIDnD.js
|
||||
|
||||
commit a5ecb2063f449505ab671e3952497f4484b12bec
|
||||
Author: Alexandre Cloutier <acloutier@inverse.ca>
|
||||
Date: Wed Jul 16 10:30:48 2014 -0400
|
||||
|
||||
added event7.png and adjust javascript indentation
|
||||
|
||||
M UI/WebServerResources/SchedulerUI.js
|
||||
M UI/WebServerResources/SchedulerUIDnD.js
|
||||
A UI/WebServerResources/event7.png
|
||||
|
||||
commit 9bd7aeebfb5ea41c078c7e9691fe0c0e9513eb12
|
||||
Author: Alexandre Cloutier <acloutier@inverse.ca>
|
||||
Date: Tue Jul 15 17:29:39 2014 -0400
|
||||
|
||||
DnD from calendarView to CalendarList
|
||||
|
||||
M UI/WebServerResources/SchedulerUIDnD.js
|
||||
|
||||
commit 01af72cfe95e1970fa84405732690355ed72dcd8
|
||||
Author: Alexandre Cloutier <acloutier@inverse.ca>
|
||||
Date: Tue Jul 15 09:49:48 2014 -0400
|
||||
|
||||
DnD from eventList to the calendarList
|
||||
|
||||
M UI/WebServerResources/SchedulerUI.css
|
||||
M UI/WebServerResources/SchedulerUI.js
|
||||
|
||||
commit 6dddb5c98ce402268205eaa4fc7eec3068380f9f
|
||||
Author: Alexandre Cloutier <acloutier@inverse.ca>
|
||||
Date: Fri Jul 11 17:04:06 2014 -0400
|
||||
|
||||
dragNdrop from the events table to the calendars list
|
||||
|
||||
M UI/Templates/SchedulerUI/UIxCalMainView.wox
|
||||
M UI/WebServerResources/SchedulerUI.js
|
||||
M UI/WebServerResources/UIxOccurenceDialog.js
|
||||
|
||||
commit ccf181bcf95a8bebf6c4ab9bdb66c151548cc00d
|
||||
Author: Alexandre Cloutier <acloutier@inverse.ca>
|
||||
Date: Thu Jul 10 13:34:47 2014 -0400
|
||||
|
||||
applied comments and fix repeated events dragNdrop between calendars
|
||||
|
||||
M UI/Scheduler/UIxAppointmentActions.m
|
||||
M UI/WebServerResources/SchedulerUI.js
|
||||
|
||||
commit e478b29c2e40963041abf63c678a7e36d287ad2f
|
||||
Author: Alexandre Cloutier <acloutier@inverse.ca>
|
||||
Date: Wed Jul 9 16:47:13 2014 -0400
|
||||
|
||||
creating and dragNDrop between calendars in multicolumndayview
|
||||
|
||||
M UI/Scheduler/UIxAppointmentActions.m
|
||||
M UI/Scheduler/UIxCalDayTable.m
|
||||
M UI/Templates/SchedulerUI/UIxCalDayTable.wox
|
||||
M UI/WebServerResources/SchedulerUI.js
|
||||
M UI/WebServerResources/SchedulerUIDnD.js
|
||||
|
||||
commit c2027f072d0b59944882ca39fc97f573a2157fd7
|
||||
Author: Alexandre Cloutier <acloutier@inverse.ca>
|
||||
Date: Fri Jul 18 13:57:18 2014 -0400
|
||||
|
||||
indentation
|
||||
|
||||
M SoObjects/Appointments/SOGoAppointmentObject.m
|
||||
|
||||
commit ce6a31dd38aa50736eae48eb073deb991b87173a
|
||||
Author: Alexandre Cloutier <acloutier@inverse.ca>
|
||||
Date: Fri Jul 18 09:26:02 2014 -0400
|
||||
|
||||
Adjust line of code to make it easier to read
|
||||
|
||||
M SoObjects/Appointments/SOGoAppointmentObject.m
|
||||
|
||||
commit a71013eebf8e7dd088a55cd18554d4de9c69369b
|
||||
Author: Alexandre Cloutier <acloutier@inverse.ca>
|
||||
Date: Wed Jul 16 14:26:30 2014 -0400
|
||||
|
||||
javascript indentation
|
||||
|
||||
M UI/WebServerResources/UIxPreferences.js
|
||||
|
||||
commit eaec5a614d713d397b032f58f6d56ac3034165c6
|
||||
Author: Alexandre Cloutier <acloutier@inverse.ca>
|
||||
Date: Wed Jul 16 14:08:39 2014 -0400
|
||||
|
||||
Change exception 403 to 409 and fix indentation in the javascript
|
||||
|
||||
M SoObjects/Appointments/SOGoAppointmentObject.m
|
||||
M UI/WebServerResources/UIxPreferences.js
|
||||
|
||||
commit 5217bed5ae3e298adc48a4c2e8c94ca1ab0e4891
|
||||
Author: Alexandre Cloutier <acloutier@inverse.ca>
|
||||
Date: Wed Jul 16 14:01:50 2014 -0400
|
||||
|
||||
Organized the categories and appointments invitations inside a tabContainer
|
||||
|
||||
M UI/Templates/PreferencesUI/UIxPreferences.wox
|
||||
M UI/WebServerResources/UIxPreferences.css
|
||||
M UI/WebServerResources/UIxPreferences.js
|
||||
M UI/WebServerResources/generic.css
|
||||
|
||||
commit 17319cc8dd39c46a3f0c7c48e1ef9d182d06a663
|
||||
Author: Alexandre Cloutier <acloutier@inverse.ca>
|
||||
Date: Wed Jul 16 10:37:27 2014 -0400
|
||||
|
||||
reverted UIxListEditor.wox
|
||||
|
||||
M UI/Templates/ContactsUI/UIxListEditor.wox
|
||||
|
||||
commit 89d116363ca6a27b08b3b3e6812669ebbbd69ea0
|
||||
Author: Alexandre Cloutier <acloutier@inverse.ca>
|
||||
Date: Wed Jul 16 10:03:13 2014 -0400
|
||||
|
||||
replace ampersands with commas
|
||||
|
||||
M SoObjects/Appointments/SOGoAppointmentObject.m
|
||||
|
||||
commit 7c3e85f517a56ca66f540a8468b75010a5943f5f
|
||||
Author: Alexandre Cloutier <acloutier@inverse.ca>
|
||||
Date: Tue Jul 15 17:34:49 2014 -0400
|
||||
|
||||
applied comments
|
||||
|
||||
M SoObjects/Appointments/SOGoAppointmentObject.m
|
||||
|
||||
commit 05fb7ae0c88a1f9b47d636caabaab96bea426309
|
||||
Author: Alexandre Cloutier <acloutier@inverse.ca>
|
||||
Date: Thu Jul 10 11:13:07 2014 -0400
|
||||
|
||||
applied comments
|
||||
|
||||
M SoObjects/Appointments/SOGoAppointmentObject.m
|
||||
M UI/PreferencesUI/UIxPreferences.m
|
||||
M UI/Templates/PreferencesUI/UIxPreferences.wox
|
||||
M UI/WebServerResources/UIxPreferences.js
|
||||
|
||||
commit ef20108e3297b5d644044307ba84fd2a6c6fbdbc
|
||||
Author: Alexandre Cloutier <acloutier@inverse.ca>
|
||||
Date: Wed Jul 9 17:26:41 2014 -0400
|
||||
|
||||
fix bug where the user could enter any names in the whitelist
|
||||
|
||||
M UI/WebServerResources/UIxPreferences.js
|
||||
|
||||
commit b5c0363400a48610f782c06dd0fdba21cc7cc478
|
||||
Author: Alexandre Cloutier <acloutier@inverse.ca>
|
||||
Date: Mon Jul 7 17:42:43 2014 -0400
|
||||
|
||||
applied comment and refactor code
|
||||
|
||||
M SoObjects/Appointments/SOGoAppointmentObject.m
|
||||
M UI/PreferencesUI/UIxPreferences.h
|
||||
M UI/PreferencesUI/UIxPreferences.m
|
||||
M UI/WebServerResources/UIxPreferences.js
|
||||
|
||||
commit f0b8eb8dfb6d19fdc82fe92a796c9e2b9a9c2aa3
|
||||
Author: Alexandre Cloutier <acloutier@inverse.ca>
|
||||
Date: Mon Jul 7 13:38:37 2014 -0400
|
||||
|
||||
server side code to integrate the whitelist
|
||||
|
||||
M SoObjects/Appointments/English.lproj/Localizable.strings
|
||||
M SoObjects/Appointments/SOGoAppointmentObject.m
|
||||
M UI/PreferencesUI/UIxPreferences.m
|
||||
M UI/WebServerResources/UIxPreferences.js
|
||||
|
||||
commit 16d02455bdcb5e8d2e2c5b4dc160b294895da82c
|
||||
Author: Alexandre Cloutier <acloutier@inverse.ca>
|
||||
Date: Mon Jul 7 10:00:16 2014 -0400
|
||||
|
||||
Serialization of the whiteList
|
||||
|
||||
M UI/PreferencesUI/UIxPreferences.m
|
||||
M UI/Templates/PreferencesUI/UIxPreferences.wox
|
||||
M UI/WebServerResources/UIxPreferences.js
|
||||
|
||||
commit 8ded5a8aaff1e7b4025b6ffe35e3e36d64ebd687
|
||||
Author: Alexandre Cloutier <acloutier@inverse.ca>
|
||||
Date: Fri Jul 4 09:51:41 2014 -0400
|
||||
|
||||
Prevent Invitations and whitelist GUI
|
||||
|
||||
M SoObjects/Appointments/SOGoAppointmentObject.m
|
||||
M UI/PreferencesUI/UIxPreferences.h
|
||||
M UI/PreferencesUI/UIxPreferences.m
|
||||
M UI/Templates/ContactsUI/UIxListEditor.wox
|
||||
M UI/Templates/PreferencesUI/UIxPreferences.wox
|
||||
M UI/WebServerResources/SOGoAutoCompletion.js
|
||||
M UI/WebServerResources/UIxPreferences.css
|
||||
M UI/WebServerResources/UIxPreferences.js
|
||||
|
||||
commit 1cc93c700a0925f84262896ae6d28f90395a8b51
|
||||
Author: Ludovic Marcotte <lmarcotte@inverse.ca>
|
||||
Date: Wed Jul 9 14:08:31 2014 -0400
|
||||
|
||||
Updated NEWS file for changes occurred right after v2.2.6 was released
|
||||
|
||||
M NEWS
|
||||
|
||||
commit 44d0cb5c0d57de6548148ea204f49a5d697e8358
|
||||
Author: Francis Lachapelle <flachapelle@inverse.ca>
|
||||
Date: Wed Jul 9 11:17:36 2014 -0400
|
||||
|
||||
Fix refresh of list when forwarding a message
|
||||
|
||||
Fixes #2818
|
||||
|
||||
M NEWS
|
||||
M SoObjects/Mailer/SOGoDraftObject.h
|
||||
M SoObjects/Mailer/SOGoDraftObject.m
|
||||
M UI/MailerUI/UIxMailEditor.m
|
||||
M UI/WebServerResources/MailerUI.js
|
||||
M UI/WebServerResources/UIxMailEditor.js
|
||||
|
||||
commit dbdb7d90513aa54c2aa314013f236c434eeb0082
|
||||
Author: Ludovic Marcotte <lmarcotte@inverse.ca>
|
||||
Date: Wed Jul 9 10:04:44 2014 -0400
|
||||
|
||||
Fix sending of METHOD:REPLY for DAV clients
|
||||
|
||||
M NEWS
|
||||
M SoObjects/Appointments/SOGoAppointmentObject.m
|
||||
|
||||
commit e343ed240b8de3b06da82a8777fe5d639cbf6a1c
|
||||
Author: Francis Lachapelle <flachapelle@inverse.ca>
|
||||
Date: Tue Jul 8 22:00:06 2014 -0400
|
||||
|
||||
Fix regression of word breaking
|
||||
|
||||
Fixes #2845
|
||||
|
||||
M UI/WebServerResources/UIxCalViewPrint.css
|
||||
M UI/WebServerResources/generic.css
|
||||
|
||||
commit 45553be122c5dd12b0373e3e6fdc4bd2f1aeef4b
|
||||
Author: Francis Lachapelle <flachapelle@inverse.ca>
|
||||
Date: Tue Jul 8 17:19:55 2014 -0400
|
||||
|
||||
Fix rename of calendars, improve tasks count badge
|
||||
|
||||
M NEWS
|
||||
M UI/Scheduler/UIxCalendarSelector.m
|
||||
M UI/Templates/ContactsUI/UIxContactFoldersView.wox
|
||||
M UI/Templates/SchedulerUI/UIxCalendarSelector.wox
|
||||
M UI/WebServerResources/ContactsUI.js
|
||||
M UI/WebServerResources/SchedulerUI.css
|
||||
M UI/WebServerResources/SchedulerUI.js
|
||||
M UI/WebServerResources/UIxContactFolderProperties.js
|
||||
M UI/WebServerResources/generic.css
|
||||
M UI/WebServerResources/generic.js
|
||||
|
||||
commit 1cf4841477dea27261c5654717cabab1ea6ac43e
|
||||
Author: Alexandre Cloutier <acloutier@inverse.ca>
|
||||
Date: Fri Jul 4 11:23:59 2014 -0400
|
||||
|
||||
fix display glitch
|
||||
|
||||
M UI/WebServerResources/SchedulerUI.js
|
||||
|
||||
commit 017a85b7f2c91827615ab1adfbaab6dc4fef9707
|
||||
Author: Alexandre Cloutier <acloutier@inverse.ca>
|
||||
Date: Fri Jul 4 10:46:49 2014 -0400
|
||||
|
||||
fix month events categories display
|
||||
|
||||
M UI/WebServerResources/SchedulerUI.js
|
||||
|
||||
commit 8c8e47daf632ce5146df347c407cbdc5ba858681
|
||||
Author: Alexandre Cloutier <acloutier@inverse.ca>
|
||||
Date: Fri Jul 4 10:37:35 2014 -0400
|
||||
|
||||
fix spacing between events and categorie display
|
||||
|
||||
M UI/WebServerResources/SchedulerUI.js
|
||||
|
||||
commit 8a172467253db8e129a0926d949b86410e50d811
|
||||
Author: Ludovic Marcotte <lmarcotte@inverse.ca>
|
||||
Date: Fri Jul 4 10:18:56 2014 -0400
|
||||
|
||||
Cleaned up code and fixed the translation of the weekdays in the datepicker
|
||||
|
||||
M UI/Scheduler/UIxDatePicker.h
|
||||
M UI/Scheduler/UIxDatePicker.m
|
||||
M UI/WebServerResources/datepicker.js
|
||||
|
||||
commit 4843c6b6d7f05e32047a27e1c6cd28a1912e615d
|
||||
Author: Ludovic Marcotte <lmarcotte@inverse.ca>
|
||||
Date: Fri Jul 4 08:55:35 2014 -0400
|
||||
|
||||
Renamed Multi-Column to Multicolumn and refactored some code
|
||||
|
||||
M UI/Scheduler/English.lproj/Localizable.strings
|
||||
M UI/Scheduler/Toolbars/SOGoAppointmentFolders.toolbar
|
||||
M UI/Scheduler/UIxCalViewPrint.m
|
||||
|
||||
commit 6e13f1547719c5f3bfc6149d9a038de90c284cb2
|
||||
Author: Ludovic Marcotte <lmarcotte@inverse.ca>
|
||||
Date: Wed Jul 2 11:32:18 2014 -0400
|
||||
|
||||
Update ChangeLog
|
||||
|
||||
M ChangeLog
|
||||
|
||||
commit 5dd2088d42388b397e8cc3fde35455b2455f7f3e
|
||||
Author: Ludovic Marcotte <lmarcotte@inverse.ca>
|
||||
Date: Wed Jul 2 11:32:06 2014 -0400
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,3 +1,28 @@
|
||||
2.2.7 (2014-07-30)
|
||||
------------------
|
||||
|
||||
New features
|
||||
- new user preference to prevent event invitations
|
||||
|
||||
Enhancements
|
||||
- improved badges of active tasks count
|
||||
- refresh draft folder after sending a message
|
||||
- now possible to DnD events in the calendar list
|
||||
- improved handling of SOGoSubscriptionFolderFormat
|
||||
- JSON'ified folder subscription interface
|
||||
- updated Finnish, French, German, and Spanish (Spain) translations
|
||||
- updated CKEditor to version 4.4.3
|
||||
|
||||
Bug fixes
|
||||
- fixed weekdays translation in the datepicker
|
||||
- fixed event categories display
|
||||
- fixed all-day events display in IE
|
||||
- fixed rename of calendars
|
||||
- we now correctly add the "METHOD:REPLY" when sending out ITIP messages from DAV clients
|
||||
- fixed refresh of message headers when forwarding a message (#2818)
|
||||
- we now correctly escape all charset= in <meta> tags, not only in the <head>
|
||||
- we now destroy cache objects of vanished folders
|
||||
|
||||
2.2.6 (2014-07-02)
|
||||
------------------
|
||||
|
||||
@@ -9,7 +34,7 @@ Enhancements
|
||||
- implemented the GetAttachment ActiveSync command (#2808)
|
||||
- implemented the Ping ActiveSync command
|
||||
- added "soft deletes" support for ActiveSync (#2734)
|
||||
- now display the active tasks next to calendar names (#2760)
|
||||
- now display the active tasks count next to calendar names (#2760)
|
||||
|
||||
Bug fixes
|
||||
- better handling of empty "Flag" messages over ActiveSync (#2806)
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
"Inviting the following persons is prohibited:" = "Inviting the following persons is prohibited:";
|
||||
"Personal Calendar" = "Personal Calendar";
|
||||
vevent_class0 = "(Public event)";
|
||||
vevent_class1 = "(Private event)";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
"Inviting the following persons is prohibited:" = "Seuraavien henkilöiden kutsuminen on estetty:";
|
||||
"Personal Calendar" = "Henkilökohtainen kalenteri";
|
||||
vevent_class0 = "(Julkinen tapahtuma)";
|
||||
vevent_class1 = "(Yksityinen tapahtuma)";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
"Inviting the following persons is prohibited:" = "L'invitation des personnes suivantes est interdite :";
|
||||
"Personal Calendar" = "Agenda personnel";
|
||||
vevent_class0 = "(Événement public)";
|
||||
vevent_class1 = "(Événement privé)";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
"Inviting the following persons is prohibited:" = "Das Einladen von folgenden Personen ist verboten:";
|
||||
"Personal Calendar" = "Persönlicher Kalender";
|
||||
vevent_class0 = "(Öffentlicher Termin)";
|
||||
vevent_class1 = "(Privater Termin)";
|
||||
|
||||
@@ -750,7 +750,8 @@ static SoSecurityManager *sm = nil;
|
||||
for (userCount = 0; userCount < userMax; userCount++)
|
||||
[currentFolder
|
||||
subscribeUserOrGroup: [proxySubscribers objectAtIndex: userCount]
|
||||
reallyDo: YES];
|
||||
reallyDo: YES
|
||||
response: nil];
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -775,7 +776,8 @@ static SoSecurityManager *sm = nil;
|
||||
for (userCount = 0; userCount < userMax; userCount++)
|
||||
[currentFolder
|
||||
subscribeUserOrGroup: [proxySubscribers objectAtIndex: userCount]
|
||||
reallyDo: NO];
|
||||
reallyDo: NO
|
||||
response: nil];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,3 +1,4 @@
|
||||
"Inviting the following persons is prohibited:" = "Esta prohibido invitar las siguientes personas:";
|
||||
"Personal Calendar" = "Calendario personal";
|
||||
vevent_class0 = "(Evento público)";
|
||||
vevent_class1 = "(Evento privado)";
|
||||
|
||||
@@ -53,6 +53,7 @@
|
||||
{
|
||||
NSString *path;
|
||||
int IMAP4ID;
|
||||
int sourceIMAP4ID;
|
||||
NSMutableDictionary *headers;
|
||||
NSString *inReplyTo;
|
||||
NSString *text;
|
||||
@@ -87,6 +88,9 @@
|
||||
- (void) setSourceFolder: (NSString *) newSourceFolder;
|
||||
- (NSString *) sourceFolder;
|
||||
|
||||
- (void) setSourceIMAP4ID: (int) newSourceIMAPID;
|
||||
- (int) sourceIMAP4ID;
|
||||
|
||||
- (void) setIMAP4ID: (int) newIMAPID;
|
||||
- (int) IMAP4ID;
|
||||
|
||||
|
||||
@@ -197,6 +197,7 @@ static NSString *userAgent = nil;
|
||||
{
|
||||
if ((self = [super init]))
|
||||
{
|
||||
sourceIMAP4ID = -1;
|
||||
IMAP4ID = -1;
|
||||
headers = [NSMutableDictionary new];
|
||||
text = @"";
|
||||
@@ -234,8 +235,7 @@ static NSString *userAgent = nil;
|
||||
{
|
||||
if (!path)
|
||||
{
|
||||
path = [[self userSpoolFolderPath] stringByAppendingPathComponent:
|
||||
nameInContainer];
|
||||
path = [[self userSpoolFolderPath] stringByAppendingPathComponent: nameInContainer];
|
||||
[path retain];
|
||||
}
|
||||
|
||||
@@ -466,6 +466,9 @@ static NSString *userAgent = nil;
|
||||
forKey: @"isHTML"];
|
||||
if (inReplyTo)
|
||||
[infos setObject: inReplyTo forKey: @"inReplyTo"];
|
||||
if (sourceIMAP4ID > -1)
|
||||
[infos setObject: [NSString stringWithFormat: @"%i", sourceIMAP4ID]
|
||||
forKey: @"sourceIMAP4ID"];
|
||||
if (IMAP4ID > -1)
|
||||
[infos setObject: [NSString stringWithFormat: @"%i", IMAP4ID]
|
||||
forKey: @"IMAP4ID"];
|
||||
@@ -513,6 +516,10 @@ static NSString *userAgent = nil;
|
||||
[self setText: value];
|
||||
isHTML = [[infoDict objectForKey: @"isHTML"] boolValue];
|
||||
|
||||
value = [infoDict objectForKey: @"sourceIMAP4ID"];
|
||||
if (value)
|
||||
[self setSourceIMAP4ID: [value intValue]];
|
||||
|
||||
value = [infoDict objectForKey: @"IMAP4ID"];
|
||||
if (value)
|
||||
[self setIMAP4ID: [value intValue]];
|
||||
@@ -564,6 +571,22 @@ static NSString *userAgent = nil;
|
||||
[self debugWithFormat: @"Note: info object does not yet exist: %@", p];
|
||||
}
|
||||
|
||||
//
|
||||
//
|
||||
//
|
||||
- (void) setSourceIMAP4ID: (int) newSourceIMAP4ID
|
||||
{
|
||||
sourceIMAP4ID = newSourceIMAP4ID;
|
||||
}
|
||||
|
||||
//
|
||||
//
|
||||
//
|
||||
- (int) sourceIMAP4ID
|
||||
{
|
||||
return sourceIMAP4ID;
|
||||
}
|
||||
|
||||
//
|
||||
//
|
||||
//
|
||||
@@ -610,7 +633,7 @@ static NSString *userAgent = nil;
|
||||
{
|
||||
if (IMAP4ID > -1)
|
||||
error = [imap4 markURLDeleted: [self imap4URL]];
|
||||
IMAP4ID = [self IMAP4IDFromAppendResult: result];
|
||||
[self setIMAP4ID: [self IMAP4IDFromAppendResult: result]];
|
||||
if (imap4URL)
|
||||
{
|
||||
// Invalidate the IMAP message URL since the message ID has changed
|
||||
@@ -902,9 +925,7 @@ static NSString *userAgent = nil;
|
||||
[self setHeaders: info];
|
||||
|
||||
[self setText: [sourceMail contentForEditing]];
|
||||
[self setSourceURL: [sourceMail imap4URLString]];
|
||||
[self setIMAP4ID: [[sourceMail nameInContainer] intValue]];
|
||||
[self setSourceFolderWithMailObject: sourceMail];
|
||||
|
||||
[self storeInfo];
|
||||
}
|
||||
@@ -934,7 +955,7 @@ static NSString *userAgent = nil;
|
||||
[self setHeaders: info];
|
||||
[self setSourceURL: [sourceMail imap4URLString]];
|
||||
[self setSourceFlag: @"Answered"];
|
||||
[self setIMAP4ID: [[sourceMail nameInContainer] intValue]];
|
||||
[self setSourceIMAP4ID: [[sourceMail nameInContainer] intValue]];
|
||||
[self setSourceFolderWithMailObject: sourceMail];
|
||||
|
||||
[self storeInfo];
|
||||
@@ -957,7 +978,7 @@ static NSString *userAgent = nil;
|
||||
|
||||
[self setSourceURL: [sourceMail imap4URLString]];
|
||||
[self setSourceFlag: @"$Forwarded"];
|
||||
[self setIMAP4ID: [[sourceMail nameInContainer] intValue]];
|
||||
[self setSourceIMAP4ID: [[sourceMail nameInContainer] intValue]];
|
||||
[self setSourceFolderWithMailObject: sourceMail];
|
||||
|
||||
/* attach message */
|
||||
|
||||
@@ -456,6 +456,40 @@ static EOAttribute *textColumn = nil;
|
||||
return nil;
|
||||
}
|
||||
|
||||
- (NSException *) destroy
|
||||
{
|
||||
NSString *tableName, *pathValue, *sql;
|
||||
EOAdaptorChannel *channel;
|
||||
GCSChannelManager *cm;
|
||||
NSException *result;
|
||||
EOAdaptor *adaptor;
|
||||
|
||||
cm = [GCSChannelManager defaultChannelManager];
|
||||
channel = [cm acquireOpenChannelForURL: [self tableUrl]];
|
||||
tableName = [self tableName];
|
||||
|
||||
adaptor = [[channel adaptorContext] adaptor];
|
||||
pathValue = [adaptor formatValue: [self path]
|
||||
forAttribute: textColumn];
|
||||
result = nil;
|
||||
|
||||
sql = [NSString stringWithFormat:
|
||||
(@"DELETE FROM %@"
|
||||
@" WHERE c_path = %@"),
|
||||
tableName,
|
||||
pathValue];
|
||||
|
||||
result = [channel evaluateExpressionX: sql];
|
||||
|
||||
if (result)
|
||||
[self errorWithFormat: @"could not delete record %@"
|
||||
@" in %@: %@", pathValue, tableName, result];
|
||||
|
||||
[cm releaseChannel: channel];
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
- (void) save
|
||||
{
|
||||
NSString *sql;
|
||||
|
||||
@@ -42,6 +42,8 @@
|
||||
- (NSCalendarDate *) creationDate;
|
||||
- (NSCalendarDate *) lastModified;
|
||||
|
||||
- (NSException *) destroy;
|
||||
|
||||
@end
|
||||
|
||||
#endif /* SOGOCACHEOBJECT_H */
|
||||
|
||||
@@ -216,18 +216,17 @@ static NSArray *childRecordFields = nil;
|
||||
|
||||
- (void) setFolderPropertyValue: (id) theValue
|
||||
inCategory: (NSString *) theKey
|
||||
settings: (SOGoUserSettings *) theSettings
|
||||
{
|
||||
SOGoUserSettings *settings;
|
||||
NSMutableDictionary *folderSettings, *values;
|
||||
NSString *module;
|
||||
|
||||
settings = [[context activeUser] userSettings];
|
||||
module = [container nameInContainer];
|
||||
folderSettings = [settings objectForKey: module];
|
||||
folderSettings = [theSettings objectForKey: module];
|
||||
if (!folderSettings)
|
||||
{
|
||||
folderSettings = [NSMutableDictionary dictionary];
|
||||
[settings setObject: folderSettings forKey: module];
|
||||
[theSettings setObject: folderSettings forKey: module];
|
||||
}
|
||||
values = [folderSettings objectForKey: theKey];
|
||||
if (theValue)
|
||||
@@ -249,7 +248,19 @@ static NSArray *childRecordFields = nil;
|
||||
[folderSettings removeObjectForKey: theKey];
|
||||
}
|
||||
|
||||
[settings synchronize];
|
||||
[theSettings synchronize];
|
||||
}
|
||||
|
||||
- (void) setFolderPropertyValue: (id) theValue
|
||||
inCategory: (NSString *) theKey
|
||||
{
|
||||
SOGoUserSettings *settings;
|
||||
|
||||
settings = [[context activeUser] userSettings];
|
||||
|
||||
[self setFolderPropertyValue: theValue
|
||||
inCategory: theKey
|
||||
settings: settings];
|
||||
}
|
||||
|
||||
- (id) folderPropertyValueInCategory: (NSString *) theKey
|
||||
@@ -281,34 +292,19 @@ static NSArray *childRecordFields = nil;
|
||||
SOGoDomainDefaults *dd;
|
||||
|
||||
primaryDN = [row objectForKey: @"c_foldername"];
|
||||
|
||||
if ([primaryDN length])
|
||||
{
|
||||
displayName = [NSMutableString new];
|
||||
if ([primaryDN isEqualToString: [container defaultFolderName]])
|
||||
[displayName appendString: [self labelForKey: primaryDN
|
||||
inContext: context]];
|
||||
else
|
||||
[displayName appendString: primaryDN];
|
||||
|
||||
if (!activeUserIsOwner)
|
||||
{
|
||||
// We MUST NOT use SOGoUser instances here (by calling -primaryIdentity)
|
||||
// as it'll load user defaults and user settings which is _very costly_
|
||||
// since it involves JSON parsing and database requests
|
||||
ownerIdentity = [[SOGoUserManager sharedUserManager]
|
||||
contactInfosForUserWithUIDorEmail: owner];
|
||||
|
||||
folderSubscriptionValues = [[NSMutableDictionary alloc] initWithObjectsAndKeys: displayName, @"FolderName",
|
||||
[ownerIdentity objectForKey: @"cn"], @"UserName",
|
||||
[ownerIdentity objectForKey: @"c_email"], @"Email", nil];
|
||||
DESTROY(displayName);
|
||||
|
||||
dd = [[context activeUser] domainDefaults];
|
||||
subjectFormat = [dd subscriptionFolderFormat];
|
||||
if ([primaryDN isEqualToString: [container defaultFolderName]])
|
||||
displayName = [self labelForKey: primaryDN
|
||||
inContext: context];
|
||||
else
|
||||
displayName =primaryDN;
|
||||
|
||||
displayName = [folderSubscriptionValues keysWithFormat: subjectFormat];
|
||||
[displayName retain];
|
||||
RETAIN(displayName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* This method fetches the display name defined by the owner, but is also the
|
||||
@@ -365,6 +361,7 @@ static NSArray *childRecordFields = nil;
|
||||
else
|
||||
{
|
||||
[self _fetchDisplayNameFromSubscriber];
|
||||
|
||||
if (!displayName)
|
||||
[self _fetchDisplayNameFromOwner];
|
||||
}
|
||||
@@ -856,11 +853,15 @@ static NSArray *childRecordFields = nil;
|
||||
|
||||
- (BOOL) subscribeUserOrGroup: (NSString *) theIdentifier
|
||||
reallyDo: (BOOL) reallyDo
|
||||
response: (WOResponse *) theResponse
|
||||
{
|
||||
NSDictionary *ownerIdentity, *folderSubscriptionValues;
|
||||
NSMutableDictionary *moduleSettings, *folderShowAlarms;
|
||||
NSString *subjectFormat, *formattedName;
|
||||
NSMutableArray *folderSubscription;
|
||||
NSString *subscriptionPointer;
|
||||
NSMutableArray *allUsers;
|
||||
SOGoDomainDefaults *dd;
|
||||
SOGoUserSettings *us;
|
||||
NSDictionary *dict;
|
||||
SOGoUser *sogoUser;
|
||||
@@ -892,6 +893,26 @@ static NSArray *childRecordFields = nil;
|
||||
}
|
||||
|
||||
rc = NO;
|
||||
|
||||
// We MUST NOT use SOGoUser instances here (by calling -primaryIdentity)
|
||||
// as it'll load user defaults and user settings which is _very costly_
|
||||
// since it involves JSON parsing and database requests
|
||||
ownerIdentity = [[SOGoUserManager sharedUserManager]
|
||||
contactInfosForUserWithUIDorEmail: owner];
|
||||
|
||||
|
||||
folderSubscriptionValues = [[NSDictionary alloc] initWithObjectsAndKeys: [self displayName], @"FolderName",
|
||||
[ownerIdentity objectForKey: @"cn"], @"UserName",
|
||||
[ownerIdentity objectForKey: @"c_email"], @"Email", nil];
|
||||
|
||||
dd = [[context activeUser] domainDefaults];
|
||||
subjectFormat = [dd subscriptionFolderFormat];
|
||||
|
||||
formattedName = [folderSubscriptionValues keysWithFormat: subjectFormat];
|
||||
|
||||
// This is consumed by SOGo Integrator during folder subscription since v24.0.6
|
||||
if (theResponse)
|
||||
[theResponse appendContentString: formattedName];
|
||||
|
||||
for (i = 0; i < [allUsers count]; i++)
|
||||
{
|
||||
@@ -929,6 +950,10 @@ static NSArray *childRecordFields = nil;
|
||||
forKey: @"FolderShowAlarms"];
|
||||
}
|
||||
|
||||
[self setFolderPropertyValue: formattedName
|
||||
inCategory: @"FolderDisplayNames"
|
||||
settings: us];
|
||||
|
||||
[folderSubscription addObjectUniquely: subscriptionPointer];
|
||||
|
||||
// By default, we disable alarms on subscribed calendars
|
||||
@@ -987,7 +1012,7 @@ static NSArray *childRecordFields = nil;
|
||||
response = [context response];
|
||||
[response setHeader: @"text/plain; charset=utf-8"
|
||||
forKey: @"Content-Type"];
|
||||
[response setStatus: 204];
|
||||
[response setStatus: 200];
|
||||
|
||||
currentUser = [context activeUser];
|
||||
delegatedUsers = [self _parseDAVDelegatedUsers];
|
||||
@@ -1002,7 +1027,8 @@ static NSArray *childRecordFields = nil;
|
||||
create contention on GDNC. */
|
||||
for (count = 0; count < max; count++)
|
||||
[self subscribeUserOrGroup: [delegatedUsers objectAtIndex: count]
|
||||
reallyDo: reallyDo];
|
||||
reallyDo: reallyDo
|
||||
response: response];
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1021,7 +1047,9 @@ static NSArray *childRecordFields = nil;
|
||||
@"You cannot (un)subscribe to a folder that you own!"];
|
||||
}
|
||||
else
|
||||
[self subscribeUserOrGroup: userLogin reallyDo: reallyDo];
|
||||
[self subscribeUserOrGroup: userLogin
|
||||
reallyDo: reallyDo
|
||||
response: response];
|
||||
}
|
||||
|
||||
return response;
|
||||
|
||||
@@ -153,13 +153,15 @@
|
||||
|
||||
- (NSArray *) _subFoldersFromFolder: (SOGoParentFolder *) parentFolder
|
||||
{
|
||||
NSMutableArray *folders;
|
||||
NSEnumerator *subfolders;
|
||||
SOGoFolder *currentFolder;
|
||||
NSString *folderName, *folderOwner;
|
||||
Class subfolderClass;
|
||||
NSDictionary *folderSubscriptionValues, *ownerIdentity;
|
||||
NSString *folderName, *folderOwner, *formattedName;
|
||||
NSMutableDictionary *currentDictionary;
|
||||
SoSecurityManager *securityManager;
|
||||
SOGoFolder *currentFolder;
|
||||
NSEnumerator *subfolders;
|
||||
NSMutableArray *folders;
|
||||
SOGoDomainDefaults *dd;
|
||||
Class subfolderClass;
|
||||
|
||||
folders = [NSMutableArray array];
|
||||
|
||||
@@ -190,6 +192,18 @@
|
||||
forKey: @"owner"];
|
||||
[currentDictionary setObject: [currentFolder folderType]
|
||||
forKey: @"type"];
|
||||
|
||||
dd = [[context activeUser] domainDefaults];
|
||||
ownerIdentity = [[SOGoUserManager sharedUserManager]
|
||||
contactInfosForUserWithUIDorEmail: owner];
|
||||
folderSubscriptionValues = [[NSDictionary alloc] initWithObjectsAndKeys: [currentFolder displayName], @"FolderName",
|
||||
[ownerIdentity objectForKey: @"cn"], @"UserName",
|
||||
[ownerIdentity objectForKey: @"c_email"], @"Email", nil];
|
||||
|
||||
formattedName = [folderSubscriptionValues keysWithFormat: [dd subscriptionFolderFormat]];
|
||||
[currentDictionary setObject: formattedName
|
||||
forKey: @"formattedName"];
|
||||
|
||||
[folders addObject: currentDictionary];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -101,7 +101,7 @@ class TestACLUtility(TestUtility):
|
||||
post = webdavlib.HTTPPOST(self.resource, subscribeQuery)
|
||||
post.content_type = "application/xml; charset=\"utf-8\""
|
||||
self.client.execute(post)
|
||||
self.test.assertEquals(post.response["status"], 204,
|
||||
self.test.assertEquals(post.response["status"], 200,
|
||||
"subscribtion failure to '%s' for '%s' (status: %d)"
|
||||
% (self.resource, "', '".join(subscribers),
|
||||
post.response["status"]))
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
"Administration" = "Administration";
|
||||
"Disconnect" = "Beenden";
|
||||
"Right Administration" = "Rechteadministration";
|
||||
"Log Console (dev.)" = "Journal (dev.)";
|
||||
"Log Console (dev.)" = "Journal (Entwickler)";
|
||||
|
||||
"User" = "Benutzer";
|
||||
"Vacation message is enabled" = "Abwesenheitsmeldung ist eingeschaltet";
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
/* UIxAclEditor.m - this file is part of SOGo
|
||||
*
|
||||
* Copyright (C) 2006-2010 Inverse inc.
|
||||
*
|
||||
* Author: Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
* Copyright (C) 2006-2014 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
|
||||
@@ -138,7 +136,7 @@
|
||||
- (BOOL) canSubscribeUsers
|
||||
{
|
||||
return [[self clientObject]
|
||||
respondsToSelector: @selector (subscribeUserOrGroup:reallyDo:)];
|
||||
respondsToSelector: @selector (subscribeUserOrGroup:reallyDo:response:)];
|
||||
}
|
||||
|
||||
- (BOOL) currentUserIsSubscribed
|
||||
|
||||
@@ -89,7 +89,10 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
[clientObject subscribeUserOrGroup: login reallyDo: reallyDo];
|
||||
[clientObject subscribeUserOrGroup: login
|
||||
reallyDo: reallyDo
|
||||
response: response];
|
||||
|
||||
if (isMailInvitation)
|
||||
{
|
||||
mailInvitationURL
|
||||
@@ -373,7 +376,8 @@
|
||||
max = [userIDs count];
|
||||
for (count = 0; count < max; count++)
|
||||
[folder subscribeUserOrGroup: [userIDs objectAtIndex: count]
|
||||
reallyDo: YES];
|
||||
reallyDo: YES
|
||||
response: response];
|
||||
ex = nil;
|
||||
}
|
||||
else
|
||||
|
||||
@@ -146,34 +146,34 @@ static NSData* _sanitizeContent(NSData *theData)
|
||||
const char *bytes;
|
||||
char *buf;
|
||||
int i, j, len;
|
||||
BOOL found_delimiter;
|
||||
BOOL found_delimiter, in_meta;
|
||||
|
||||
d = [NSMutableData dataWithData: theData];
|
||||
bytes = [d bytes];
|
||||
len = [d length];
|
||||
i = 0;
|
||||
|
||||
in_meta = NO;
|
||||
|
||||
while (i < len)
|
||||
{
|
||||
// We check if we see </head> in which case, we don't do any kind
|
||||
// of substitution there after.
|
||||
if (i < len-6)
|
||||
// We check if we see <meta ...> in which case, we substitute de charset= stuff.
|
||||
if (i < len-5)
|
||||
{
|
||||
if ((*bytes == '<') &&
|
||||
(*(bytes+1) == '/') &&
|
||||
(*(bytes+2) == 'h' || *(bytes+2) == 'H') &&
|
||||
(*(bytes+3) == 'e' || *(bytes+3) == 'E') &&
|
||||
(*(bytes+4) == 'a' || *(bytes+4) == 'A') &&
|
||||
(*(bytes+5) == 'd' || *(bytes+5) == 'D') &&
|
||||
(*(bytes+6) == '>'))
|
||||
break;
|
||||
(*(bytes+1) == 'm' || *(bytes+2) == 'M') &&
|
||||
(*(bytes+2) == 'e' || *(bytes+3) == 'E') &&
|
||||
(*(bytes+3) == 't' || *(bytes+4) == 'T') &&
|
||||
(*(bytes+4) == 'a' || *(bytes+5) == 'A') &&
|
||||
(*(bytes+5) == ' '))
|
||||
in_meta = YES;
|
||||
}
|
||||
|
||||
// We search for something like :
|
||||
//
|
||||
// <meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
|
||||
//
|
||||
if (i < len-9)
|
||||
if (in_meta && i < len-9)
|
||||
{
|
||||
if ((*bytes == 'c' || *bytes == 'C') &&
|
||||
(*(bytes+1) == 'h' || *(bytes+1) == 'H') &&
|
||||
@@ -195,16 +195,18 @@ static NSData* _sanitizeContent(NSData *theData)
|
||||
// We haven't found anything, let's return the data untouched
|
||||
if ((i+j) >= len)
|
||||
{
|
||||
found_delimiter = NO;
|
||||
in_meta = found_delimiter = NO;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (found_delimiter)
|
||||
[d replaceBytesInRange: NSMakeRange(i, j)
|
||||
withBytes: NULL
|
||||
length: 0];
|
||||
break;
|
||||
{
|
||||
[d replaceBytesInRange: NSMakeRange(i, j)
|
||||
withBytes: NULL
|
||||
length: 0];
|
||||
in_meta = found_delimiter = NO;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{ /* -*- Mode: java; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
requires = ( MAIN );
|
||||
requires = ( MAIN, Mailer, Appointments );
|
||||
|
||||
publicResources = (
|
||||
);
|
||||
|
||||
@@ -808,7 +808,7 @@ static NSArray *infoKeys = nil;
|
||||
jsonResponse = [NSDictionary dictionaryWithObjectsAndKeys:
|
||||
@"success", @"status",
|
||||
[co sourceFolder], @"sourceFolder",
|
||||
[NSNumber numberWithInt: [co IMAP4ID]], @"messageID",
|
||||
[NSNumber numberWithInt: [co sourceIMAP4ID]], @"sourceMessageID",
|
||||
nil];
|
||||
|
||||
recipients_count += [[co allRecipients] count];
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
/* SOGoUserHomePage.m - this file is part of SOGo
|
||||
*
|
||||
* Copyright (C) 2007-2010 Inverse inc.
|
||||
*
|
||||
* Author: Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
* Copyright (C) 2007-2014 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
|
||||
@@ -444,10 +442,8 @@
|
||||
[response setStatus: 200];
|
||||
[response setHeader: @"text/plain; charset=utf-8"
|
||||
forKey: @"Content-Type"];
|
||||
foldersEnum = [folders objectEnumerator];
|
||||
while ((currentFolder = [foldersEnum nextObject]))
|
||||
[response appendContentString:
|
||||
[currentFolder keysWithFormat: @";%{displayName}:%{name}:%{type}"]];
|
||||
|
||||
[response appendContentString: [folders JSONRepresentation]];
|
||||
|
||||
return response;
|
||||
}
|
||||
|
||||
@@ -104,6 +104,10 @@
|
||||
"firstWeekOfYear_First4DayWeek" = "First 4-day week";
|
||||
"firstWeekOfYear_FirstFullWeek" = "First full week";
|
||||
|
||||
"Prevent from being invited to appointments" = "Prevent from being invited to appointments";
|
||||
"White list for appointment invitations:" = "White list for appointment invitations:";
|
||||
"Contacts Names" = "Contacts Names";
|
||||
|
||||
/* Default Calendar */
|
||||
"Default calendar :" = "Default calendar:";
|
||||
"selectedCalendar" = "Selected calendar";
|
||||
|
||||
@@ -104,6 +104,10 @@
|
||||
"firstWeekOfYear_First4DayWeek" = "Ensimmäinen nelipäiväinen viikko";
|
||||
"firstWeekOfYear_FirstFullWeek" = "Ensimmäinen täysi viikko";
|
||||
|
||||
"Prevent from being invited to appointments" = "Estä tapaamiskutsut";
|
||||
"White list for appointment invitations:" = "Valkoinen lista kalenterikutsuille:";
|
||||
"Contacts Names" = "Yhteystietojen Nimet";
|
||||
|
||||
/* Default Calendar */
|
||||
"Default calendar :" = "Oletuskalenteri";
|
||||
"selectedCalendar" = "Valittu kalenteri";
|
||||
|
||||
@@ -104,6 +104,10 @@
|
||||
"firstWeekOfYear_First4DayWeek" = "Première semaine de 4 jours";
|
||||
"firstWeekOfYear_FirstFullWeek" = "Première semaine entière";
|
||||
|
||||
"Prevent from being invited to appointments" = "Interdire de m'inviter à des rendez-vous";
|
||||
"White list for appointment invitations:" = "Liste blanche pour les invitations";
|
||||
"Contacts Names" = "Noms des contacts";
|
||||
|
||||
/* Default Calendar */
|
||||
"Default calendar :" = "Calendrier par défaut :";
|
||||
"selectedCalendar" = "le calendrier sélectionné";
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
/* vacation (auto-reply) */
|
||||
"Enable vacation auto reply" = "Automatische Abwesenheitsnachricht aktivieren";
|
||||
"Auto reply message :" = "Folgende Nachricht wird automatisch an jeden Absender gesendet:";
|
||||
"Auto reply message :" = "Mit folgender Nachricht auf jede eingehende E-Mail antworten:";
|
||||
"Email addresses (separated by commas) :" = "E-Mail-Adressen (getrennt durch Kommata):";
|
||||
"Add default email addresses" = "Standardadresse hinzufügen";
|
||||
"Days between responses :" = "Tage zwischen automatischen Abwesenheitsnachrichten:";
|
||||
@@ -104,6 +104,10 @@
|
||||
"firstWeekOfYear_First4DayWeek" = "Erste 4 Tage Woche";
|
||||
"firstWeekOfYear_FirstFullWeek" = "Erste ganze Woche";
|
||||
|
||||
"Prevent from being invited to appointments" = "Verhindere, dass ich zu Terminen eingeladen werde";
|
||||
"White list for appointment invitations:" = "White-Liste für Termineinladungen:";
|
||||
"Contacts Names" = "Kontaktnamen";
|
||||
|
||||
/* Default Calendar */
|
||||
"Default calendar :" = "Standardkalender";
|
||||
"selectedCalendar" = "Gewählter Kalender";
|
||||
@@ -129,7 +133,7 @@
|
||||
"Label" = "Schlagwort";
|
||||
"Show subscribed mailboxes only" = "Nur abonnierte Ordner anzeigen";
|
||||
"Sort messages by threads" = "Nachrichten nach Thema sortieren";
|
||||
"When sending mail, add unknown recipients to my" = "Wenn ich E-Mails sende, füge die unbekannten Empfänger zu meinem";
|
||||
"When sending mail, add unknown recipients to my" = "Unbekannte Empfänger meiner E-Mails hinzufügen zu";
|
||||
"Check for new mail:" = "Auf neue Nachrichten prüfen:";
|
||||
"messagecheck_manually" = "Manuell";
|
||||
"messagecheck_every_minute" = "Minütlich";
|
||||
@@ -310,7 +314,7 @@
|
||||
"Password change failed - Password is too short" = "Passwortänderung fehlgeschlagen - Passwort ist zu kurz";
|
||||
"Password change failed - Password is too young" = "Passwortänderung fehlgeschlagen - zu frühe Passwortänderung";
|
||||
"Password change failed - Password is in history" = "Passwortänderung fehlgeschlagen - Passwort wurde zuvor verwendet";
|
||||
"Unhandled policy error: %{0}" = "Unbearbeiteter Vorgabenfehler: %{0}";
|
||||
"Unhandled error response" = "Unbearbeitete Fehlerantwort";
|
||||
"Unhandled policy error: %{0}" = "Unerwarteter Fehler bei Passwortänderung: %{0}";
|
||||
"Unhandled error response" = "Unerwarteter Fehler";
|
||||
"Password change is not supported." = "Passwortänderung wird nicht unterstützt.";
|
||||
"Unhandled HTTP error code: %{0}" = "Unbearbeiteter HTTP-Fehlercode: %{0}";
|
||||
"Unhandled HTTP error code: %{0}" = "Unerwarteter HTTP-Fehlercode: %{0}";
|
||||
|
||||
@@ -104,6 +104,10 @@
|
||||
"firstWeekOfYear_First4DayWeek" = "Primera semana del año de 4 días";
|
||||
"firstWeekOfYear_FirstFullWeek" = "Primera semana del año completa";
|
||||
|
||||
"Prevent from being invited to appointments" = "Evitar invitaciones a eventos";
|
||||
"White list for appointment invitations:" = "Lista blanca de invitaciones a eventos:";
|
||||
"Contacts Names" = "Nombres de Contacto";
|
||||
|
||||
/* Default Calendar */
|
||||
"Default calendar :" = "Calendario por defecto";
|
||||
"selectedCalendar" = "Calendario seleccionado";
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
*/
|
||||
|
||||
#import <Foundation/NSCalendarDate.h>
|
||||
#import <Foundation/NSDictionary.h>
|
||||
#import <Foundation/NSPropertyList.h>
|
||||
#import <Foundation/NSString.h>
|
||||
#import <Foundation/NSTimeZone.h>
|
||||
@@ -41,6 +42,7 @@
|
||||
#import <SOGo/NSString+Utilities.h>
|
||||
#import <SOGo/SOGoUser.h>
|
||||
#import <SOGo/SOGoUserDefaults.h>
|
||||
#import <SOGo/SOGoUserSettings.h>
|
||||
#import <SOGo/SOGoDomainDefaults.h>
|
||||
#import <SOGo/SOGoSieveManager.h>
|
||||
#import <SOGo/SOGoSystemDefaults.h>
|
||||
@@ -638,6 +640,47 @@ static NSArray *reminderValues = nil;
|
||||
return [userDefaults busyOffHours];
|
||||
}
|
||||
|
||||
- (NSArray *) whiteList
|
||||
{
|
||||
SOGoUserSettings *us;
|
||||
NSMutableDictionary *moduleSettings;
|
||||
NSArray *whiteList;
|
||||
|
||||
us = [user userSettings];
|
||||
moduleSettings = [us objectForKey: @"Calendar"];
|
||||
whiteList = [moduleSettings objectForKey:@"PreventInvitationsWhitelist"];
|
||||
return whiteList;
|
||||
}
|
||||
|
||||
- (void) setWhiteList: (NSArray *) whiteList
|
||||
{
|
||||
SOGoUserSettings *us;
|
||||
NSMutableDictionary *moduleSettings;
|
||||
us = [user userSettings];
|
||||
moduleSettings = [us objectForKey: @"Calendar"];
|
||||
[moduleSettings setObject: whiteList forKey: @"PreventInvitationsWhitelist"];
|
||||
[us synchronize];
|
||||
}
|
||||
|
||||
- (void) setPreventInvitations: (BOOL) preventInvitations
|
||||
{
|
||||
SOGoUserSettings *us;
|
||||
NSMutableDictionary *moduleSettings;
|
||||
us = [user userSettings];
|
||||
moduleSettings = [us objectForKey: @"Calendar"];
|
||||
[moduleSettings setObject: [NSNumber numberWithBool: preventInvitations] forKey: @"PreventInvitations"];
|
||||
[us synchronize];
|
||||
}
|
||||
|
||||
- (BOOL) preventInvitations
|
||||
{
|
||||
SOGoUserSettings *us;
|
||||
NSMutableDictionary *moduleSettings;
|
||||
us = [user userSettings];
|
||||
moduleSettings = [us objectForKey: @"Calendar"];
|
||||
return [[moduleSettings objectForKey: @"PreventInvitations"] boolValue];
|
||||
}
|
||||
|
||||
- (NSArray *) firstWeekList
|
||||
{
|
||||
return [NSArray arrayWithObjects:
|
||||
|
||||
@@ -314,7 +314,6 @@
|
||||
|
||||
"Repeat" = "Repeat";
|
||||
"Daily" = "Daily";
|
||||
"Multi-Columns" = "Multi-Columns";
|
||||
"Weekly" = "Weekly";
|
||||
"Monthly" = "Monthly";
|
||||
"Yearly" = "Yearly";
|
||||
|
||||
@@ -155,6 +155,7 @@
|
||||
"What to Print" = "Tulostusvalinnat";
|
||||
"Options" = "Asetukset";
|
||||
"Tasks with no due date" = "Tehtävät ilman määräpäivää";
|
||||
"Display working hours only" = "Näytä vain työajat";
|
||||
"Completed tasks" = "Valmistuneet tehtävät";
|
||||
|
||||
/* Appointments */
|
||||
@@ -542,6 +543,8 @@ vtodo_class2 = "(Luottamuksellinen tehtävä)";
|
||||
"tagWasRemoved" = "Mobiililaitteesi kalenteritiedot on päivitettävä mikäli haluat poistaa tämän kalenterin synkronoinnista.⏎ Jatketaanko?";
|
||||
"DestinationCalendarError" = "Lähde- ja kohdekalenterit ovat samoja. Ole hyvä ja yritä kopiointia toiseen kalenteriin.";
|
||||
"EventCopyError" = "Kopiointi epäonnistui. Ole hyvä ja yritä kopiointia toiseen kalenteriin.";
|
||||
"Please select at least one calendar" = "Ole hyvä ja valitse ainakin yksi kalenteri";
|
||||
|
||||
|
||||
"Open Task..." = "Avaa tehtävä...";
|
||||
"Mark Completed" = "Merkitse valmistuneeksi";
|
||||
|
||||
@@ -155,6 +155,7 @@
|
||||
"What to Print" = "Contenu";
|
||||
"Options" = "Options";
|
||||
"Tasks with no due date" = "Tâches sans date d'échéance";
|
||||
"Display working hours only" = "Afficher les heures de bureau seulement";
|
||||
"Completed tasks" = "Tâches complétées";
|
||||
|
||||
/* Appointments */
|
||||
@@ -542,6 +543,8 @@ vtodo_class2 = "(Tâche confidentielle)";
|
||||
"tagWasRemoved" = "Afin de ne plus synchroniser ce calendrier, vous devrez recharger les données sur votre appareil mobile.\nVoulez-vous continuer?";
|
||||
"DestinationCalendarError" = "Le calendrier de destination est le même que celui de l'événement. Choisissez un calendrier de destination différent.";
|
||||
"EventCopyError" = "La copie a échouée. Choisissez un calendrier de destination différent.";
|
||||
"Please select at least one calendar" = "Veuillez sélectionner au moins un calendrier.";
|
||||
|
||||
|
||||
"Open Task..." = "Ouvrir la tâche...";
|
||||
"Mark Completed" = "Marquer comme accomplie";
|
||||
|
||||
@@ -155,6 +155,7 @@
|
||||
"What to Print" = "Was soll gedruckt werden";
|
||||
"Options" = "Optionen";
|
||||
"Tasks with no due date" = "Aufgaben ohne Fälligkeitsdatum";
|
||||
"Display working hours only" = "Nur Arbeitszeit anzeigen";
|
||||
"Completed tasks" = "Abgeschlossene Aufgaben";
|
||||
|
||||
/* Appointments */
|
||||
@@ -542,6 +543,8 @@ vtodo_class2 = "(Vertrauliche Aufgabe)";
|
||||
"tagWasRemoved" = "Wenn der Kalender aus der Synchronisation entfernt wird, müssen die Daten erneut auf das Mobilgerät geladen werden.\nFortfahren?";
|
||||
"DestinationCalendarError" = "Quell- und Zielkalender sind identisch. Bitte kopieren Sie in einen anderen Kalender.";
|
||||
"EventCopyError" = "Kopieren fehlgeschlagen. Bitte kopieren Sie in einen anderen Kalender.";
|
||||
"Please select at least one calendar" = "Bitte mindestens einen Kalender auswählen";
|
||||
|
||||
|
||||
"Open Task..." = "Aufgabe öffnen...";
|
||||
"Mark Completed" = "Als abgeschlossen markieren";
|
||||
|
||||
@@ -155,6 +155,7 @@
|
||||
"What to Print" = "Que imprimir";
|
||||
"Options" = "Parametros";
|
||||
"Tasks with no due date" = "Tareas sin fecha de vencimiento";
|
||||
"Display working hours only" = "Enseñar solo horas de trabajo";
|
||||
"Completed tasks" = "Tareas Finalizadas";
|
||||
|
||||
/* Appointments */
|
||||
@@ -542,6 +543,8 @@ vtodo_class2 = "(Tarea confidencial)";
|
||||
"tagWasRemoved" = "Si quita este calendario de la sincronización, necesitará recargar los datos en su teléfono móvil.\n¿Continuar?";
|
||||
"DestinationCalendarError" = "El calendario origen y el destino son iguales. Por favor, intente copiar a otro calendario.";
|
||||
"EventCopyError" = "La copia falló. Por favor, intente copiar a un calendario distinto.";
|
||||
"Please select at least one calendar" = "Por favor, selecciona al menos un calendario";
|
||||
|
||||
|
||||
"Open Task..." = "Abrir tarea...";
|
||||
"Mark Completed" = "Marcar como completo";
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
image = "day-view.png";
|
||||
tooltip = "Switch to day view"; },
|
||||
{ link = "#";
|
||||
label="Multi-Columns View";
|
||||
label="Multicolumn Day View";
|
||||
onclick = "return onMulticolumnDayOverview();";
|
||||
image = "day-view-multicolumn.png";
|
||||
tooltip = "Switch to multi-columns day view"; },
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
#import <Foundation/NSCalendarDate.h>
|
||||
#import <Foundation/NSDictionary.h>
|
||||
#import <Foundation/NSString.h>
|
||||
#import <Foundation/NSArray.h>
|
||||
|
||||
#import <NGObjWeb/NSException+HTTP.h>
|
||||
#import <NGObjWeb/SoPermissions.h>
|
||||
@@ -52,19 +53,25 @@
|
||||
WOResponse *response;
|
||||
WORequest *rq;
|
||||
SOGoAppointmentObject *co;
|
||||
SoSecurityManager *sm;
|
||||
iCalEvent *event;
|
||||
NSCalendarDate *start, *newStart, *end, *newEnd;
|
||||
NSTimeInterval newDuration;
|
||||
SOGoUserDefaults *ud;
|
||||
NSString *daysDelta, *startDelta, *durationDelta;
|
||||
NSString *daysDelta, *startDelta, *durationDelta, *destionationCalendar;
|
||||
NSArray *calendarsID;
|
||||
NSTimeZone *tz;
|
||||
NSException *ex;
|
||||
SOGoAppointmentFolder *targetCalendar, *sourceCalendar;
|
||||
SOGoAppointmentFolders *folders;
|
||||
|
||||
rq = [context request];
|
||||
|
||||
daysDelta = [rq formValueForKey: @"days"];
|
||||
startDelta = [rq formValueForKey: @"start"];
|
||||
durationDelta = [rq formValueForKey: @"duration"];
|
||||
destionationCalendar = [rq formValueForKey: @"destination"];
|
||||
|
||||
if ([daysDelta length] > 0
|
||||
|| [startDelta length] > 0 || [durationDelta length] > 0)
|
||||
{
|
||||
@@ -105,10 +112,30 @@
|
||||
}
|
||||
|
||||
if ([event hasRecurrenceRules])
|
||||
[event updateRecurrenceRulesUntilDate: end];
|
||||
[event updateRecurrenceRulesUntilDate: end];
|
||||
|
||||
[event setLastModified: [NSCalendarDate calendarDate]];
|
||||
ex = [co saveComponent: event];
|
||||
// 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 isEqualToString:@"0"])
|
||||
{
|
||||
folders = [[self->context activeUser] calendarsFolderInContext: self->context];
|
||||
sourceCalendar = [co container];
|
||||
targetCalendar = [folders lookupName:[destionationCalendar stringValue] inContext: self->context acquire: 0];
|
||||
// The event was moved to a different calendar.
|
||||
sm = [SoSecurityManager sharedSecurityManager];
|
||||
if (![sm validatePermission: SoPerm_DeleteObjects
|
||||
onObject: sourceCalendar
|
||||
inContext: context])
|
||||
{
|
||||
if (![sm validatePermission: SoPerm_AddDocumentsImagesAndFiles
|
||||
onObject: targetCalendar
|
||||
inContext: context])
|
||||
ex = [co moveToFolder: targetCalendar];
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
if (ex)
|
||||
{
|
||||
NSDictionary *jsonResponse;
|
||||
|
||||
@@ -191,7 +191,7 @@
|
||||
NSMutableDictionary *calendar;
|
||||
unsigned int count, foldersCount;
|
||||
NSString *folderName, *fDisplayName;
|
||||
NSNumber *isActive;
|
||||
BOOL *isActive;
|
||||
|
||||
co = [self clientObject];
|
||||
folders = [co subFolders];
|
||||
|
||||
@@ -75,8 +75,6 @@ static NSArray *tasksFields = nil;
|
||||
#define maxBlocks (offsetBlocks * 2) // maximum number of blocks to search
|
||||
// for a free slot (10 days)
|
||||
|
||||
@class SOGoAppointment;
|
||||
|
||||
@implementation UIxCalListingActions
|
||||
|
||||
+ (void) initialize
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
*
|
||||
* Copyright (C) 2006-2014 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
|
||||
* the Free Software Foundation; either version 2, or (at your option)
|
||||
@@ -38,7 +37,6 @@ static NSArray *layoutItems = nil;
|
||||
layoutItems = [NSArray arrayWithObjects: @"LIST", @"Daily", @"Multi-Columns", @"Weekly", nil];
|
||||
[layoutItems retain];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
- (id) init
|
||||
@@ -53,12 +51,9 @@ static NSArray *layoutItems = nil;
|
||||
[item release];
|
||||
}
|
||||
|
||||
/****************************************************************/
|
||||
/* Interfacing; populating the popup list for the print layouts */
|
||||
|
||||
- (void) setItem: (NSString *) newItem
|
||||
{
|
||||
ASSIGN (item, newItem);
|
||||
ASSIGN(item, newItem);
|
||||
}
|
||||
|
||||
- (NSString *) item
|
||||
@@ -76,9 +71,12 @@ static NSArray *layoutItems = nil;
|
||||
return [self labelForKey: [NSString stringWithFormat: item]];
|
||||
}
|
||||
|
||||
//
|
||||
// The objective here is to return the parent view layout and select the print
|
||||
// layout corresponding. Default print view: list view
|
||||
//
|
||||
- (NSString *) parentPrintLayout
|
||||
{
|
||||
// The objective here is to return the parent view layout and select the print layout corresponding. Default print view: list view
|
||||
SOGoUser *activeUser;
|
||||
NSString *parentView;
|
||||
|
||||
@@ -99,7 +97,4 @@ static NSArray *layoutItems = nil;
|
||||
return @"LIST";
|
||||
}
|
||||
|
||||
/******************************************************************/
|
||||
/* */
|
||||
|
||||
@end
|
||||
|
||||
@@ -121,7 +121,8 @@ _intValueFromHex (NSString *hexString)
|
||||
[calendar setObject: [folder ownerInContext: context]
|
||||
forKey: @"owner"];
|
||||
fActiveTasks = [folder activeTasks];
|
||||
[calendar setObject:fActiveTasks forKey:@"activeTasks" ];
|
||||
if (fActiveTasks > 0)
|
||||
[calendar setObject: fActiveTasks forKey:@"activeTasks" ];
|
||||
[calendars addObject: calendar];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
/* UIxDatePicker.h - this file is part of SOGo
|
||||
*
|
||||
* Copyright (C) 2009 Inverse inc.
|
||||
*
|
||||
* Author: Francis Lachapelle <flachapelle@inverse.ca>
|
||||
* Copyright (C) 2009-2014 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
|
||||
|
||||
+101
-75
@@ -1,23 +1,22 @@
|
||||
/*
|
||||
Copyright (C) 2004-2005 SKYRIX Software AG
|
||||
|
||||
This file is part of OpenGroupware.org.
|
||||
|
||||
OGo 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
|
||||
WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
|
||||
License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with OGo; see the file COPYING. If not, write to the
|
||||
Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
|
||||
02111-1307, USA.
|
||||
*/
|
||||
/* UIxDatePicker.h - this file is part of SOGo
|
||||
*
|
||||
* Copyright (C) 2009-2014 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
|
||||
* the Free Software Foundation; either version 2, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This file 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 General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; see the file COPYING. If not, write to
|
||||
* the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#import <Foundation/NSValue.h>
|
||||
#import <Foundation/NSCalendarDate.h>
|
||||
@@ -38,13 +37,18 @@
|
||||
{
|
||||
if ((self = [super init]))
|
||||
{
|
||||
dateID = nil;
|
||||
day = nil;
|
||||
year = nil;
|
||||
label = nil;
|
||||
isDisabled = NO;
|
||||
}
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)dealloc {
|
||||
- (void) dealloc
|
||||
{
|
||||
[self->dateID release];
|
||||
[self->day release];
|
||||
[self->month release];
|
||||
@@ -55,60 +59,79 @@
|
||||
|
||||
/* Accessors */
|
||||
|
||||
- (void)setDateID:(NSString *)_dateID {
|
||||
- (void) setDateID: (NSString *) _dateID
|
||||
{
|
||||
ASSIGNCOPY(self->dateID, _dateID);
|
||||
}
|
||||
- (NSString *)dateID {
|
||||
- (NSString *) dateID
|
||||
{
|
||||
return self->dateID;
|
||||
}
|
||||
|
||||
- (void)setDay:(id)_day {
|
||||
- (void) setDay: (id) _day
|
||||
{
|
||||
ASSIGN(self->day, _day);
|
||||
}
|
||||
- (id)day {
|
||||
return self->day;
|
||||
- (id) day
|
||||
{
|
||||
return self->day;
|
||||
}
|
||||
- (void)setMonth:(id)_month {
|
||||
|
||||
- (void) setMonth: (id) _month
|
||||
{
|
||||
ASSIGN(self->month, _month);
|
||||
}
|
||||
- (id)month {
|
||||
return self->month;
|
||||
- (id) month
|
||||
{
|
||||
return self->month;
|
||||
}
|
||||
- (void)setYear:(id)_year {
|
||||
|
||||
- (void) setYear: (id) _year
|
||||
{
|
||||
ASSIGN(self->year, _year);
|
||||
}
|
||||
- (id)year {
|
||||
return self->year;
|
||||
- (id) year
|
||||
{
|
||||
return self->year;
|
||||
}
|
||||
|
||||
|
||||
- (void)setLabel:(NSString *)_label {
|
||||
- (void) setLabel: (NSString *) _label
|
||||
{
|
||||
ASSIGNCOPY(self->label, _label);
|
||||
}
|
||||
- (NSString *)label {
|
||||
- (NSString *) label
|
||||
{
|
||||
return self->label;
|
||||
}
|
||||
|
||||
|
||||
/* formats */
|
||||
|
||||
- (BOOL)useISOFormats {
|
||||
- (BOOL) useISOFormats
|
||||
{
|
||||
NSNumber *useISOFormats;
|
||||
WOContext *ctx;
|
||||
NSNumber *useISOFormats;
|
||||
|
||||
ctx = [self context];
|
||||
ctx = [self context];
|
||||
useISOFormats = [ctx valueForKey:@"useISOFormats"];
|
||||
if (!useISOFormats) {
|
||||
NSArray *languages = [ctx resourceLookupLanguages];
|
||||
if (languages && [languages count] > 0) {
|
||||
if ([[languages objectAtIndex:0] isEqualToString:@"French"]) {
|
||||
useISOFormats = [NSNumber numberWithBool:NO];
|
||||
if (!useISOFormats)
|
||||
{
|
||||
NSArray *languages;
|
||||
|
||||
languages = [ctx resourceLookupLanguages];
|
||||
if (languages && [languages count] > 0)
|
||||
{
|
||||
if ([[languages objectAtIndex:0] isEqualToString:@"French"])
|
||||
{
|
||||
useISOFormats = [NSNumber numberWithBool:NO];
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!useISOFormats)
|
||||
useISOFormats = [NSNumber numberWithBool:YES];
|
||||
[ctx takeValue:useISOFormats forKey:@"useISOFormats"];
|
||||
}
|
||||
useISOFormats = [NSNumber numberWithBool: YES];
|
||||
|
||||
[ctx takeValue: useISOFormats forKey:@"useISOFormats"];
|
||||
}
|
||||
|
||||
return [useISOFormats boolValue];
|
||||
}
|
||||
|
||||
@@ -116,17 +139,19 @@
|
||||
{
|
||||
char buf[22];
|
||||
|
||||
if ([self useISOFormats]) {
|
||||
sprintf(buf, "%04d-%02d-%02d",
|
||||
[[self year] intValue],
|
||||
[[self month] intValue],
|
||||
[[self day] intValue]);
|
||||
}
|
||||
else {
|
||||
sprintf(buf, "%02d/%02d/%04d",
|
||||
[[self day] intValue],
|
||||
[[self month] intValue],
|
||||
[[self year] intValue]);
|
||||
if ([self useISOFormats])
|
||||
{
|
||||
sprintf(buf, "%04d-%02d-%02d",
|
||||
[[self year] intValue],
|
||||
[[self month] intValue],
|
||||
[[self day] intValue]);
|
||||
}
|
||||
else
|
||||
{
|
||||
sprintf(buf, "%02d/%02d/%04d",
|
||||
[[self day] intValue],
|
||||
[[self month] intValue],
|
||||
[[self year] intValue]);
|
||||
}
|
||||
return [NSString stringWithCString:buf];
|
||||
}
|
||||
@@ -141,29 +166,30 @@
|
||||
return [self useISOFormats] ? @"yyyy-mm-dd" : @"dd/mm/yyyy";
|
||||
}
|
||||
|
||||
/* action */
|
||||
|
||||
- (void) takeValuesFromRequest: (WORequest *) _rq
|
||||
inContext: (WOContext *)_ctx
|
||||
inContext: (WOContext *) _ctx
|
||||
{
|
||||
NSString *dateString;
|
||||
NSCalendarDate *d;
|
||||
NSInteger dateTZOffset, userTZOffset;
|
||||
NSTimeZone *systemTZ, *userTZ;
|
||||
SOGoUserDefaults *ud;
|
||||
NSString *dateString;
|
||||
NSCalendarDate *d;
|
||||
|
||||
dateString = [_rq formValueForKey:[self dateID]];
|
||||
if (dateString == nil) {
|
||||
[self debugWithFormat:@"got no date string!"];
|
||||
return;
|
||||
}
|
||||
|
||||
if (dateString == nil)
|
||||
{
|
||||
[self debugWithFormat:@"got no date string!"];
|
||||
return;
|
||||
}
|
||||
|
||||
d = [NSCalendarDate dateWithString:dateString
|
||||
calendarFormat:[self dateFormat]];
|
||||
if (d == nil) {
|
||||
[self warnWithFormat:@"Could not parse dateString: '%@'",
|
||||
d = [NSCalendarDate dateWithString: dateString
|
||||
calendarFormat: [self dateFormat]];
|
||||
if (!d)
|
||||
{
|
||||
[self warnWithFormat: @"Could not parse dateString: '%@'",
|
||||
dateString];
|
||||
}
|
||||
}
|
||||
|
||||
/* we must adjust the date timezone because "dateWithString:..." uses the
|
||||
system timezone, which can be different from the user's. */
|
||||
@@ -178,11 +204,11 @@
|
||||
seconds: (dateTZOffset - userTZOffset)];
|
||||
[d setTimeZone: userTZ];
|
||||
|
||||
[self setDay: [NSNumber numberWithInt:[d dayOfMonth]]];
|
||||
[self setMonth:[NSNumber numberWithInt:[d monthOfYear]]];
|
||||
[self setDay: [NSNumber numberWithInt:[d dayOfMonth]]];
|
||||
[self setMonth: [NSNumber numberWithInt:[d monthOfYear]]];
|
||||
[self setYear: [NSNumber numberWithInt:[d yearOfCommonEra]]];
|
||||
|
||||
[super takeValuesFromRequest:_rq inContext:_ctx];
|
||||
[super takeValuesFromRequest: _rq inContext: _ctx];
|
||||
}
|
||||
|
||||
- (void) setDisabled: (BOOL) disabled
|
||||
|
||||
@@ -110,7 +110,7 @@
|
||||
var:class="currentContactFolderClass"
|
||||
var:acl-editing="currentContactFolderAclEditing"
|
||||
var:list-editing="currentContactFolderListEditing"
|
||||
><var:string value="currentContactFolderName"/></li
|
||||
><span><var:string value="currentContactFolderName"/></span></li
|
||||
></var:foreach
|
||||
>
|
||||
</ul>
|
||||
|
||||
@@ -11,12 +11,15 @@
|
||||
title="title"
|
||||
const:popup="YES"
|
||||
const:cssFiles="datepicker.css"
|
||||
const:jsFiles="RowEditionController.js,PasswordPolicy.js,ckeditor/ckeditor.js,datepicker.js"
|
||||
const:jsFiles="RowEditionController.js,PasswordPolicy.js,ckeditor/ckeditor.js,datepicker.js, SOGoAutoCompletion.js"
|
||||
>
|
||||
<script type="text/javascript">
|
||||
var localeCode = '<var:string value="localeCode"/>';
|
||||
</script>
|
||||
|
||||
<div class="popupMenu" id="contactsMenu">
|
||||
<ul></ul>
|
||||
</div>
|
||||
|
||||
<div id="colorPickerDialog" style="display: none;" class="dialog right bottom">
|
||||
<div>
|
||||
<span class="blc-FFFFFF"><!-- --></span>
|
||||
@@ -91,33 +94,33 @@
|
||||
<span class="blc-99FF99"><!-- --></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<form id="mainForm" var:href="ownPath">
|
||||
<div class="tabsContainer" id="preferencesTabs">
|
||||
<ul>
|
||||
<li target="generalView"><span>
|
||||
<var:string label:value="General" /></span></li>
|
||||
<var:if condition="userHasCalendarAccess">
|
||||
<var:string label:value="General" /></span></li>
|
||||
<var:if condition="userHasCalendarAccess">
|
||||
<li target="calendarOptionsView"><span><var:string
|
||||
label:value="Calendar Options"/></span></li>
|
||||
</var:if
|
||||
><li target="contactsOptionsView"><span><var:string
|
||||
label:value="Contacts Options"/></span></li
|
||||
><var:if condition="userHasMailAccess">
|
||||
label:value="Calendar Options"/></span></li>
|
||||
</var:if
|
||||
><li target="contactsOptionsView"><span><var:string
|
||||
label:value="Contacts Options"/></span></li
|
||||
><var:if condition="userHasMailAccess">
|
||||
<li target="mailOptionsView"><span><var:string
|
||||
label:value="Mail Options"/></span></li>
|
||||
label:value="Mail Options"/></span></li>
|
||||
<li target="mailAccountsView"><span><var:string
|
||||
label:value="IMAP Accounts"/></span></li>
|
||||
label:value="IMAP Accounts"/></span></li>
|
||||
<var:if condition="isVacationEnabled"><li target="vacationView"><span><var:string
|
||||
label:value="Vacation"/></span></li></var:if
|
||||
><var:if condition="isForwardEnabled"><li target="forwardView"><span><var:string
|
||||
label:value="Forward"/></span></li></var:if>
|
||||
</var:if
|
||||
><var:if condition="shouldDisplayAdditionalPreferences">
|
||||
label:value="Vacation"/></span></li></var:if
|
||||
><var:if condition="isForwardEnabled"><li target="forwardView"><span><var:string
|
||||
label:value="Forward"/></span></li></var:if>
|
||||
</var:if
|
||||
><var:if condition="shouldDisplayAdditionalPreferences">
|
||||
<li target="additionalView"><span>
|
||||
<var:string label:value="Additional Parameters"/></span></li>
|
||||
</var:if
|
||||
><var:if condition="shouldDisplayPasswordChange">
|
||||
<var:string label:value="Additional Parameters"/></span></li>
|
||||
</var:if
|
||||
><var:if condition="shouldDisplayPasswordChange">
|
||||
<li target="passwordView"><span><var:string label:value="Password"/></span></li>
|
||||
</var:if>
|
||||
</ul>
|
||||
@@ -128,38 +131,38 @@
|
||||
<dd><var:string value="sogoVersion"/></dd>
|
||||
<dt><var:string label:value="Language :"/></dt>
|
||||
<dd><var:popup list="languages" item="item"
|
||||
const:id="language"
|
||||
const:name="language"
|
||||
string="languageText"
|
||||
selection="language"
|
||||
label:noSelectionString="choose" /></dd>
|
||||
const:id="language"
|
||||
const:name="language"
|
||||
string="languageText"
|
||||
selection="language"
|
||||
label:noSelectionString="choose" /></dd>
|
||||
<dt><var:string label:value="Current Time Zone :"/></dt>
|
||||
<dd><var:popup list="timeZonesList" item="item"
|
||||
const:id="timezone"
|
||||
const:name="timezone"
|
||||
string="item" selection="userTimeZone" /></dd>
|
||||
const:id="timezone"
|
||||
const:name="timezone"
|
||||
string="item" selection="userTimeZone" /></dd>
|
||||
<dt><var:string label:value="Short Date Format :"/></dt>
|
||||
<dd><var:popup list="shortDateFormatsList" item="item"
|
||||
const:id="shortDateFormat"
|
||||
const:name="shortDateFormat"
|
||||
string="itemShortDateFormatText" selection="userShortDateFormat"/></dd>
|
||||
const:id="shortDateFormat"
|
||||
const:name="shortDateFormat"
|
||||
string="itemShortDateFormatText" selection="userShortDateFormat"/></dd>
|
||||
<dt><var:string label:value="Long Date Format :"/></dt>
|
||||
<dd><var:popup list="longDateFormatsList" item="item"
|
||||
const:id="longDateFormat"
|
||||
const:name="longDateFormat"
|
||||
string="itemLongDateFormatText" selection="userLongDateFormat"
|
||||
/></dd>
|
||||
const:id="longDateFormat"
|
||||
const:name="longDateFormat"
|
||||
string="itemLongDateFormatText" selection="userLongDateFormat"
|
||||
/></dd>
|
||||
<dt><var:string label:value="Time Format :"/></dt>
|
||||
<dd><var:popup list="timeFormatsList" item="item"
|
||||
const:id="timeFormat"
|
||||
const:name="timeFormat"
|
||||
string="itemTimeFormatText" selection="userTimeFormat"
|
||||
/></dd>
|
||||
const:id="timeFormat"
|
||||
const:name="timeFormat"
|
||||
string="itemTimeFormatText" selection="userTimeFormat"
|
||||
/></dd>
|
||||
<dt><var:string label:value="Default module :"/></dt>
|
||||
<dd><var:popup list="availableModules" item="item"
|
||||
const:id="defaultModule"
|
||||
const:name="defaultModule"
|
||||
string="itemModuleText" selection="userDefaultModule"/></dd>
|
||||
const:id="defaultModule"
|
||||
const:name="defaultModule"
|
||||
string="itemModuleText" selection="userDefaultModule"/></dd>
|
||||
</dl>
|
||||
</div>
|
||||
<var:if condition="userHasCalendarAccess">
|
||||
@@ -167,88 +170,132 @@
|
||||
<dl class="dl-horizontal">
|
||||
<dt><var:string label:value="Week begins on :"/></dt>
|
||||
<dd><var:popup list="daysList" item="item"
|
||||
const:id="weekStartDay"
|
||||
const:name="weekStartDay"
|
||||
string="itemWeekStartDay" selection="userWeekStartDay"/></dd>
|
||||
const:id="weekStartDay"
|
||||
const:name="weekStartDay"
|
||||
string="itemWeekStartDay" selection="userWeekStartDay"/></dd>
|
||||
<dt><var:string label:value="Day start time :"/></dt>
|
||||
<dd><var:popup list="hoursList" item="item"
|
||||
const:id="dayStartTime"
|
||||
const:name="dayStartTime"
|
||||
string="item" selection="userDayStartTime"/></dd>
|
||||
const:id="dayStartTime"
|
||||
const:name="dayStartTime"
|
||||
string="item" selection="userDayStartTime"/></dd>
|
||||
<dt><var:string label:value="Day end time :"/></dt>
|
||||
<dd><var:popup list="hoursList" item="item"
|
||||
const:id="dayEndTime"
|
||||
const:name="dayEndTime"
|
||||
string="item" selection="userDayEndTime"/></dd>
|
||||
const:id="dayEndTime"
|
||||
const:name="dayEndTime"
|
||||
string="item" selection="userDayEndTime"/></dd>
|
||||
<dt></dt>
|
||||
<dd><input type="checkbox"
|
||||
const:name="busyOffHours"
|
||||
const:id="busyOffHours"
|
||||
var:checked="busyOffHours" />
|
||||
<dd><input type="checkbox"
|
||||
const:name="busyOffHours"
|
||||
const:id="busyOffHours"
|
||||
var:checked="busyOffHours" />
|
||||
<var:string label:value="Show time as busy outside working hours"/></dd>
|
||||
<dt><var:string label:value="First week of year :"/></dt>
|
||||
<dd><var:popup list="firstWeekList" item="item"
|
||||
const:id="firstWeek"
|
||||
const:name="firstWeek"
|
||||
string="itemFirstWeekText" selection="userFirstWeek"/></dd>
|
||||
<dt><var:string label:value="Default calendar :"/></dt>
|
||||
<dd><var:popup list="defaultCalendarList" item="item"
|
||||
const:id="defaultCalendar"
|
||||
const:name="defaultCalendar"
|
||||
string="itemCalendarText" selection="userDefaultCalendar"/></dd>
|
||||
<dt><var:string label:value="Default events classification :"/></dt>
|
||||
<dd><var:popup list="calendarClassificationsList" item="item"
|
||||
const:id="eventsClassification"
|
||||
const:name="eventsClassification"
|
||||
string="itemClassificationText" selection="eventsDefaultClassification"/></dd>
|
||||
<dt><var:string label:value="Default tasks classification :"/></dt>
|
||||
<dd><var:popup list="calendarClassificationsList" item="item"
|
||||
const:id="tasksClassification"
|
||||
const:name="tasksClassification"
|
||||
string="itemClassificationText" selection="tasksDefaultClassification"/></dd>
|
||||
<dt><var:string label:value="Default reminder :"/></dt>
|
||||
<dd><var:popup list="reminderList" item="item"
|
||||
const:disabledValue="-"
|
||||
label:noSelectionString="reminder_NONE"
|
||||
const:name="reminderList"
|
||||
const:id="reminderList"
|
||||
string="itemReminderText" var:selection="reminder"/></dd>
|
||||
<dt><var:string label:value="First week of year :"/></dt>
|
||||
<dd><var:popup list="firstWeekList" item="item"
|
||||
const:id="firstWeek"
|
||||
const:name="firstWeek"
|
||||
string="itemFirstWeekText" selection="userFirstWeek"/></dd>
|
||||
<dt><var:string label:value="Default calendar :"/></dt>
|
||||
<dd><var:popup list="defaultCalendarList" item="item"
|
||||
const:id="defaultCalendar"
|
||||
const:name="defaultCalendar"
|
||||
string="itemCalendarText" selection="userDefaultCalendar"/></dd>
|
||||
<dt><var:string label:value="Default events classification :"/></dt>
|
||||
<dd><var:popup list="calendarClassificationsList" item="item"
|
||||
const:id="eventsClassification"
|
||||
const:name="eventsClassification"
|
||||
string="itemClassificationText" selection="eventsDefaultClassification"/></dd>
|
||||
<dt><var:string label:value="Default tasks classification :"/></dt>
|
||||
<dd><var:popup list="calendarClassificationsList" item="item"
|
||||
const:id="tasksClassification"
|
||||
const:name="tasksClassification"
|
||||
string="itemClassificationText" selection="tasksDefaultClassification"/></dd>
|
||||
<dt><var:string label:value="Default reminder :"/></dt>
|
||||
<dd><var:popup list="reminderList" item="item"
|
||||
const:disabledValue="-"
|
||||
label:noSelectionString="reminder_NONE"
|
||||
const:name="reminderList"
|
||||
const:id="reminderList"
|
||||
string="itemReminderText" var:selection="reminder"/></dd>
|
||||
</dl>
|
||||
|
||||
<label><var:string label:value="Categories"/></label>
|
||||
<div id="calendarCategoriesListWrapper" class="listWrapper"
|
||||
><table class="categoriesList" cellspacing="0">
|
||||
<thead>
|
||||
<tr class="tableview"
|
||||
><th const:class="tbtv_headercell" const:id="nameTableHeader"
|
||||
><var:string label:value="Name"/></th
|
||||
><th const:class="tbtv_headercell" const:id="colorTableHeader"
|
||||
><var:string label:value="Color"/></th
|
||||
></tr
|
||||
></thead>
|
||||
<tbody>
|
||||
<var:foreach list="calendarCategoryList" item="category">
|
||||
<tr const:class="categoryListRow"
|
||||
><td const:class="categoryListCell"
|
||||
><var:string var:value="category"/></td
|
||||
><td const:class="categoryListCell"
|
||||
><div const:class="colorBox" var:data-color="categoryColor"><entity name="nbsp"/></div></td
|
||||
></tr>
|
||||
</var:foreach>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="bottomToolbar">
|
||||
<a const:id="calendarCategoryAdd" class="bottomButton" href="#">
|
||||
<span><img rsrc:src="add-icon.png" label:title="Add" />
|
||||
</span></a>
|
||||
<a const:id="calendarCategoryDelete" class="bottomButton" href="#">
|
||||
<span><img rsrc:src="remove-icon.png" label:title="Delete" />
|
||||
</span></a>
|
||||
</div>
|
||||
<input type="hidden" const:id="calendarCategoriesValue"
|
||||
const:name="calendarCategoriesValue" var:value="calendarCategoriesValue"/>
|
||||
</div>
|
||||
<div class="tabsContainer" id="calendarOptionsTabs">
|
||||
<ul>
|
||||
<li target="calendarCategoriesView">
|
||||
<span><var:string label:value="Categories"/></span></li>
|
||||
<li target="calendarAppointmentsInvitationsView">
|
||||
<span><var:string label:value="Appointments invitations"/></span></li>
|
||||
</ul>
|
||||
<div class="tabs">
|
||||
<div id="calendarCategoriesView" class="tab">
|
||||
<div id="calendarCategoriesListWrapper" class="listWrapper">
|
||||
<table class="categoriesList" cellspacing="0">
|
||||
<thead>
|
||||
<tr class="tableview">
|
||||
<th const:class="tbtv_headercell" const:id="nameTableHeader">
|
||||
<var:string label:value="Name"/></th>
|
||||
<th const:class="tbtv_headercell" const:id="colorTableHeader">
|
||||
<var:string label:value="Color"/></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<var:foreach list="calendarCategoryList" item="category">
|
||||
<tr const:class="categoryListRow">
|
||||
<td const:class="categoryListCell">
|
||||
<var:string var:value="category"/></td>
|
||||
<td const:class="categoryListCell">
|
||||
<div const:class="colorBox" var:data-color="categoryColor"><entity name="nbsp"/></div></td>
|
||||
</tr>
|
||||
</var:foreach>
|
||||
</tbody>
|
||||
</table>
|
||||
</div><!-- #calendarCategoriesListWrapper -->
|
||||
<div class="bottomToolbar">
|
||||
<a const:id="calendarCategoryAdd" class="bottomButton" href="#">
|
||||
<span><img rsrc:src="add-icon.png" label:title="Add" /></span></a>
|
||||
<a const:id="calendarCategoryDelete" class="bottomButton" href="#">
|
||||
<span><img rsrc:src="remove-icon.png" label:title="Delete" /> </span></a>
|
||||
</div><!-- .bottomToolbar -->
|
||||
<input type="hidden" const:id="calendarCategoriesValue"
|
||||
const:name="calendarCategoriesValue" var:value="calendarCategoriesValue"/>
|
||||
</div><!-- #calendarCategoriesView -->
|
||||
|
||||
<div id="calendarAppointmentsInvitationsView" class="tab">
|
||||
<div><input type="checkbox"
|
||||
const:name="preventInvitations"
|
||||
const:id="preventInvitations"
|
||||
var:checked="preventInvitations" />
|
||||
<var:string label:value="Prevent from being invited to appointments"/></div>
|
||||
<hr />
|
||||
<var:string label:value="White list for appointment invitations:"/>
|
||||
<div id="appointmentsWhiteListWrapper" class="listWrapper">
|
||||
<table id="tableViewWhiteList" cellspacing="0">
|
||||
<thead>
|
||||
<tr class="tableview">
|
||||
<th const:class="tbtv_headercell" const:id="whiteListTableHeader">
|
||||
<var:string label:value="Contacts Names"/></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<var:foreach list="appointmentsWhiteList" item="contact">
|
||||
<tr const:class="whiteListRow">
|
||||
<td const:class="whiteListCell">
|
||||
<var:string var:value="contact"/></td>
|
||||
</tr>
|
||||
</var:foreach>
|
||||
</tbody>
|
||||
</table>
|
||||
</div><!-- #appointmentsWhiteListWrapper -->
|
||||
<div class="bottomToolbar">
|
||||
<a const:id="appointmentsWhiteListAdd" class="bottomButton" href="#">
|
||||
<span><img rsrc:src="add-icon.png" label:title="Add" /></span></a>
|
||||
<a const:id="appointmentsWhiteListDelete" class="bottomButton" href="#">
|
||||
<span><img rsrc:src="remove-icon.png" label:title="Delete" /></span></a>
|
||||
</div><!-- .bottomToolbar -->
|
||||
<input type="hidden" const:id="whiteList"
|
||||
const:name="whiteList" var:value="whiteList"/>
|
||||
</div><!-- #calendarAppointmentsInvitationsView -->
|
||||
</div><!-- .tabs -->
|
||||
</div><!-- #calendarOptionsTabs -->
|
||||
</div><!-- #calendarOptionsView -->
|
||||
</var:if>
|
||||
<div id="contactsOptionsView" class="tab">
|
||||
<label><var:string label:value="Categories"/></label>
|
||||
@@ -258,14 +305,14 @@
|
||||
<tr class="tableview"
|
||||
><th const:class="tbtv_headercell" const:id="nameTableHeader"
|
||||
><var:string label:value="Name"/></th
|
||||
></tr
|
||||
></thead>
|
||||
></tr
|
||||
></thead>
|
||||
<tbody>
|
||||
<var:foreach list="contactsCategoryList" item="category">
|
||||
<tr const:class="categoryListRow"
|
||||
><td const:class="categoryListCell"
|
||||
><var:string var:value="category"/></td
|
||||
></tr>
|
||||
></tr>
|
||||
</var:foreach>
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -278,135 +325,135 @@
|
||||
<span><img rsrc:src="remove-icon.png" label:title="Delete" />
|
||||
</span></a>
|
||||
</div>
|
||||
<input type="hidden" const:id="contactsCategoriesValue"
|
||||
const:name="contactsCategoriesValue" var:value="contactsCategoriesValue"/>
|
||||
<input type="hidden" const:id="contactsCategoriesValue"
|
||||
const:name="contactsCategoriesValue" var:value="contactsCategoriesValue"/>
|
||||
</div>
|
||||
<var:if condition="userHasMailAccess">
|
||||
<div id="mailOptionsView" class="tab">
|
||||
<dl class="dl-horizontal">
|
||||
<dt></dt>
|
||||
<dd><input type="checkbox"
|
||||
const:name="subscribedFoldersOnly"
|
||||
const:id="subscribedFoldersOnly"
|
||||
var:checked="showSubscribedFoldersOnly" />
|
||||
<var:string label:value="Show subscribed mailboxes only"/></dd>
|
||||
<dt></dt>
|
||||
<dd><input type="checkbox"
|
||||
const:name="sortByThreads"
|
||||
const:id="sortByThreads"
|
||||
var:checked="sortByThreads" />
|
||||
<var:string label:value="Sort messages by threads"/></dd>
|
||||
<dd><input type="checkbox"
|
||||
const:name="addOutgoingAddresses"
|
||||
const:id="addOutgoingAddresses"
|
||||
var:checked="addOutgoingAddresses"
|
||||
onChange = "onAddOutgoingAddressesCheck(this);"/>
|
||||
<var:string label:value="When sending mail, add unknown recipients to my"/><br/>
|
||||
<var:popup list="addressBookList" item="item"
|
||||
const:id="addressBookList"
|
||||
const:name="addressBookList"
|
||||
string="itemAddressBookText" selection="userAddressBook"/></dd>
|
||||
const:name="subscribedFoldersOnly"
|
||||
const:id="subscribedFoldersOnly"
|
||||
var:checked="showSubscribedFoldersOnly" />
|
||||
<var:string label:value="Show subscribed mailboxes only"/></dd>
|
||||
<dt></dt>
|
||||
<dd><input type="checkbox"
|
||||
const:name="sortByThreads"
|
||||
const:id="sortByThreads"
|
||||
var:checked="sortByThreads" />
|
||||
<var:string label:value="Sort messages by threads"/></dd>
|
||||
<dd><input type="checkbox"
|
||||
const:name="addOutgoingAddresses"
|
||||
const:id="addOutgoingAddresses"
|
||||
var:checked="addOutgoingAddresses"
|
||||
onChange = "onAddOutgoingAddressesCheck(this);"/>
|
||||
<var:string label:value="When sending mail, add unknown recipients to my"/><br/>
|
||||
<var:popup list="addressBookList" item="item"
|
||||
const:id="addressBookList"
|
||||
const:name="addressBookList"
|
||||
string="itemAddressBookText" selection="userAddressBook"/></dd>
|
||||
<dt></dt>
|
||||
<dt><var:string label:value="Check for new mail:"/></dt>
|
||||
<dd><var:popup list="messageCheckList" item="item"
|
||||
const:id="messageCheck"
|
||||
const:name="messageCheck"
|
||||
string="itemMessageCheckText" selection="userMessageCheck"/></dd>
|
||||
const:id="messageCheck"
|
||||
const:name="messageCheck"
|
||||
string="itemMessageCheckText" selection="userMessageCheck"/></dd>
|
||||
<dt><var:string label:value="Forward messages:"/></dt>
|
||||
<dd><var:popup list="messageForwardingList" item="item"
|
||||
const:id="messageForwarding"
|
||||
const:name="messageForwarding"
|
||||
string="itemMessageForwardingText"
|
||||
selection="userMessageForwarding"/></dd>
|
||||
const:id="messageForwarding"
|
||||
const:name="messageForwarding"
|
||||
string="itemMessageForwardingText"
|
||||
selection="userMessageForwarding"/></dd>
|
||||
<dt><var:string label:value="When replying to a message:"/></dt>
|
||||
<dd><var:popup list="replyPlacementList" item="item"
|
||||
const:id="replyPlacementList"
|
||||
const:name="replyPlacementList"
|
||||
string="itemReplyPlacementText"
|
||||
selection="userReplyPlacement"/></dd>
|
||||
const:id="replyPlacementList"
|
||||
const:name="replyPlacementList"
|
||||
string="itemReplyPlacementText"
|
||||
selection="userReplyPlacement"/></dd>
|
||||
<dt><var:string label:value="And place my signature"/></dt>
|
||||
<dd><var:popup list="signaturePlacementList" item="item"
|
||||
const:id="signaturePlacementList"
|
||||
const:name="signaturePlacementList"
|
||||
string="itemSignaturePlacementText"
|
||||
selection="userSignaturePlacement"/></dd>
|
||||
const:id="signaturePlacementList"
|
||||
const:name="signaturePlacementList"
|
||||
string="itemSignaturePlacementText"
|
||||
selection="userSignaturePlacement"/></dd>
|
||||
<dt><var:string label:value="Compose messages in"/></dt>
|
||||
<dd><var:popup list="composeMessagesType" item="item"
|
||||
const:id="composeMessagesType"
|
||||
const:name="composeMessagesType"
|
||||
string="itemComposeMessagesText"
|
||||
selection="userComposeMessagesType"/></dd>
|
||||
const:id="composeMessagesType"
|
||||
const:name="composeMessagesType"
|
||||
string="itemComposeMessagesText"
|
||||
selection="userComposeMessagesType"/></dd>
|
||||
<dt><var:string label:value="Display remote inline images"/></dt>
|
||||
<dd><var:popup list="displayRemoteInlineImages" item="item"
|
||||
const:id="displayRemoteInlineImages"
|
||||
const:name="displayRemoteInlineImages"
|
||||
string="itemDisplayRemoteInlineImagesText"
|
||||
selection="userDisplayRemoteInlineImages"/></dd>
|
||||
const:id="displayRemoteInlineImages"
|
||||
const:name="displayRemoteInlineImages"
|
||||
string="itemDisplayRemoteInlineImagesText"
|
||||
selection="userDisplayRemoteInlineImages"/></dd>
|
||||
</dl>
|
||||
|
||||
|
||||
<div class="tabsContainer" id="mailOptionsTabs">
|
||||
<ul>
|
||||
<var:if condition="isSieveScriptsEnabled"
|
||||
><li target="mailFiltersView"><span><var:string
|
||||
label:value="Filters"/></span></li
|
||||
></var:if>
|
||||
><li target="mailFiltersView"><span><var:string
|
||||
label:value="Filters"/></span></li
|
||||
></var:if>
|
||||
<li target="mailLabelsView"><span><var:string
|
||||
label:value="Labels"/></span></li>
|
||||
label:value="Labels"/></span></li>
|
||||
</ul>
|
||||
<div class="tabs">
|
||||
<var:if condition="isSieveScriptsEnabled"
|
||||
><div id="mailFiltersView" class="tab">
|
||||
<script type="text/javascript">
|
||||
var sieveCapabilities = <var:string value="sieveCapabilities" const:escapeHTML="NO"/>;
|
||||
</script>
|
||||
<div id="filtersListWrapper" class="listWrapper">
|
||||
<table id="filtersList" cellspacing="0">
|
||||
<thead>
|
||||
<tr class="tableview">
|
||||
<th const:class="tbtv_headercell" const:id="nameTableHeader"
|
||||
><div id="mailFiltersView" class="tab">
|
||||
<script type="text/javascript">
|
||||
var sieveCapabilities = <var:string value="sieveCapabilities" const:escapeHTML="NO"/>;
|
||||
</script>
|
||||
<div id="filtersListWrapper" class="listWrapper">
|
||||
<table id="filtersList" cellspacing="0">
|
||||
<thead>
|
||||
<tr class="tableview">
|
||||
<th const:class="tbtv_headercell" const:id="nameTableHeader"
|
||||
><var:string label:value="Name" /></th>
|
||||
<th const:class="tbtv_headercell" const:id="activeTableHeader"
|
||||
<th const:class="tbtv_headercell" const:id="activeTableHeader"
|
||||
><var:string label:value="Active" /></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody><!--space --></tbody>
|
||||
</table>
|
||||
<input type="hidden" const:name="sieveFilters" const:id="sieveFilters"
|
||||
var:value="sieveFiltersValue"/>
|
||||
</div><!-- #filtersListWrapper -->
|
||||
<div class="bottomToolbar">
|
||||
<a const:id="filterAdd" class="bottomButton" href="#">
|
||||
<span><img rsrc:src="add-icon.png" label:title="Add" /></span></a>
|
||||
<a const:id="filterDelete" class="bottomButton" href="#">
|
||||
<span><img rsrc:src="remove-icon.png" label:title="Delete" /></span></a>
|
||||
<a const:id="filterMoveUp" class="bottomButton" href="#">
|
||||
<span><img rsrc:src="up-icon.png" label:title="Move Up" /></span></a>
|
||||
<a const:id="filterMoveDown" class="bottomButton" href="#">
|
||||
<span><img rsrc:src="down-icon.png" label:title="Move Down" /></span></a>
|
||||
</div><!-- .bottomToolbar -->
|
||||
</div
|
||||
></var:if><!-- #mailFiltersView -->
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody><!--space --></tbody>
|
||||
</table>
|
||||
<input type="hidden" const:name="sieveFilters" const:id="sieveFilters"
|
||||
var:value="sieveFiltersValue"/>
|
||||
</div><!-- #filtersListWrapper -->
|
||||
<div class="bottomToolbar">
|
||||
<a const:id="filterAdd" class="bottomButton" href="#">
|
||||
<span><img rsrc:src="add-icon.png" label:title="Add" /></span></a>
|
||||
<a const:id="filterDelete" class="bottomButton" href="#">
|
||||
<span><img rsrc:src="remove-icon.png" label:title="Delete" /></span></a>
|
||||
<a const:id="filterMoveUp" class="bottomButton" href="#">
|
||||
<span><img rsrc:src="up-icon.png" label:title="Move Up" /></span></a>
|
||||
<a const:id="filterMoveDown" class="bottomButton" href="#">
|
||||
<span><img rsrc:src="down-icon.png" label:title="Move Down" /></span></a>
|
||||
</div><!-- .bottomToolbar -->
|
||||
</div
|
||||
></var:if><!-- #mailFiltersView -->
|
||||
|
||||
<div id="mailLabelsView" class="tab">
|
||||
<div id="mailLabelsListWrapper" class="listWrapper">
|
||||
<table id="labelsList" cellspacing="0">
|
||||
<thead>
|
||||
<tr class="tableview">
|
||||
<th const:class="tbtv_headercell" const:id="labelTableHeader"
|
||||
><var:string label:value="Label"/></th>
|
||||
><var:string label:value="Label"/></th>
|
||||
<th const:class="tbtv_headercell" const:id="colorTableHeader"
|
||||
><var:string label:value="Color"/></th>
|
||||
><var:string label:value="Color"/></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<var:foreach list="mailLabelList" item="label"
|
||||
><tr var:data-name="label.name" const:class="labelListRow">
|
||||
<td const:class="labelListCell"
|
||||
><tr var:data-name="label.name" const:class="labelListRow">
|
||||
<td const:class="labelListCell"
|
||||
><var:string var:value="label.label"/></td>
|
||||
<td const:class="labelListCell">
|
||||
<div const:class="colorBox" var:data-color="label.color"><entity name="nbsp"/></div>
|
||||
</td>
|
||||
</tr>
|
||||
<td const:class="labelListCell">
|
||||
<div const:class="colorBox" var:data-color="label.color"><entity name="nbsp"/></div>
|
||||
</td>
|
||||
</tr>
|
||||
</var:foreach>
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -414,33 +461,33 @@
|
||||
<div class="bottomToolbar">
|
||||
<a const:id="mailLabelAdd" class="bottomButton" href="#">
|
||||
<span><img rsrc:src="add-icon.png" label:title="Add" />
|
||||
</span></a>
|
||||
</span></a>
|
||||
<a const:id="mailLabelDelete" class="bottomButton" href="#">
|
||||
<span><img rsrc:src="remove-icon.png" label:title="Delete" />
|
||||
</span></a>
|
||||
</span></a>
|
||||
</div><!-- .bottomToolbar -->
|
||||
<input type="hidden" const:id="mailLabelsValue"
|
||||
const:name="mailLabelsValue" var:value="mailLabelsValue"/>
|
||||
const:name="mailLabelsValue" var:value="mailLabelsValue"/>
|
||||
</div><!-- #mailLabelsView -->
|
||||
</div><!-- .tabs -->
|
||||
</div><!-- #mailOptionsTabs -->
|
||||
</div><!-- #mailOptionsView -->
|
||||
|
||||
|
||||
<div id="mailAccountsView" class="tab">
|
||||
<input type="hidden" const:name="mailAccountsJSON" const:id="mailAccountsJSON"
|
||||
var:value="mailAccounts"/>
|
||||
var:value="mailAccounts"/>
|
||||
<div id="mailAccountsListWrapper" class="listWrapper"
|
||||
><ul id="mailAccountsList"
|
||||
><!-- space --></ul
|
||||
></div>
|
||||
><ul id="mailAccountsList"
|
||||
><!-- space --></ul
|
||||
></div>
|
||||
<var:if condition="mailAuxiliaryUserAccountsEnabled">
|
||||
<div const:id="mailAccountsToolbar" class="bottomToolbar">
|
||||
<a const:id="mailAccountAdd" class="bottomButton" href="#">
|
||||
<span><img rsrc:src="add-icon.png" label:title="Add" />
|
||||
</span></a>
|
||||
</span></a>
|
||||
<a const:id="mailAccountDelete" class="bottomButton" href="#">
|
||||
<span><img rsrc:src="remove-icon.png" label:title="Delete" />
|
||||
</span></a>
|
||||
</span></a>
|
||||
</div>
|
||||
</var:if>
|
||||
<div id="mailAccountEditor">
|
||||
@@ -448,15 +495,15 @@
|
||||
<dl class="dl-horizontal">
|
||||
<dt><var:string label:value="Server Name:"/></dt>
|
||||
<dd><input const:name="serverName" const:id="serverName" type="text" const:value=""/>
|
||||
<var:string label:value="Port:"/>
|
||||
<input const:name="port" const:id="port" type="text" const:value=""/></dd>
|
||||
<var:string label:value="Port:"/>
|
||||
<input const:name="port" const:id="port" type="text" const:value=""/></dd>
|
||||
<dt><var:string label:value="Encryption:"/></dt>
|
||||
<dd><input const:name="encryption" type="radio" const:value="none"/>
|
||||
<var:string label:value="None"/>
|
||||
<input const:name="encryption" type="radio" const:value="ssl"/>
|
||||
<var:string label:value="SSL"/>
|
||||
<input const:name="encryption" type="radio" const:value="tls"/>
|
||||
<var:string label:value="TLS"/></dd>
|
||||
<var:string label:value="None"/>
|
||||
<input const:name="encryption" type="radio" const:value="ssl"/>
|
||||
<var:string label:value="SSL"/>
|
||||
<input const:name="encryption" type="radio" const:value="tls"/>
|
||||
<var:string label:value="TLS"/></dd>
|
||||
<dt><var:string label:value="User Name:"/></dt>
|
||||
<dd><input const:name="userName" const:id="userName" type="text" const:value=""/></dd>
|
||||
<dt><var:string label:value="Password:"/></dt>
|
||||
@@ -464,11 +511,11 @@
|
||||
</dl>
|
||||
<input const:name="encryption" type="hidden" const:value="none"/>
|
||||
</fieldset>
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
var mailCustomFromEnabled = <var:string value="mailCustomFromEnabled" const:escapeHTML="NO"/>;
|
||||
</script>
|
||||
|
||||
|
||||
<fieldset const:id="identityInfo">
|
||||
<dl class="dl-horizontal">
|
||||
<dt><var:string label:value="Full Name:"/></dt>
|
||||
@@ -481,40 +528,40 @@
|
||||
<dd><span id="actSignature"><!--space --></span></dd>
|
||||
</dl>
|
||||
</fieldset>
|
||||
|
||||
|
||||
<fieldset const:id="returnReceiptsInfo">
|
||||
<var:string
|
||||
label:value="When I receive a request for a return receipt:"
|
||||
/><br/>
|
||||
label:value="When I receive a request for a return receipt:"
|
||||
/><br/>
|
||||
<label><input const:name="receipt-action" const:id="receipt-action-ignore"
|
||||
type="radio" const:value="ignore"/>
|
||||
type="radio" const:value="ignore"/>
|
||||
<var:string
|
||||
label:value="Never send a return receipt"/></label
|
||||
><br/>
|
||||
label:value="Never send a return receipt"/></label
|
||||
><br/>
|
||||
<label><input const:name="receipt-action" const:id="receipt-action-allow"
|
||||
type="radio" const:value="allow"/>
|
||||
type="radio" const:value="allow"/>
|
||||
<var:string
|
||||
label:value="Allow return receipts for some messages"/></label
|
||||
><br/>
|
||||
label:value="Allow return receipts for some messages"/></label
|
||||
><br/>
|
||||
<div id="receiptOptions">
|
||||
<var:string
|
||||
label:value="If I'm not in the To or Cc of the message:"/>
|
||||
label:value="If I'm not in the To or Cc of the message:"/>
|
||||
<select name="receipt-non-recipient-action" id="receipt-non-recipient-action">
|
||||
<option const:value="ignore"><var:string label:value="Never send"/></option>
|
||||
<option const:value="send"><var:string label:value="Always send"/></option>
|
||||
<option const:value="ask"><var:string label:value="Ask me"/></option>
|
||||
</select><br/>
|
||||
|
||||
|
||||
<var:string
|
||||
label:value="If the sender is outside my domain:"/>
|
||||
label:value="If the sender is outside my domain:"/>
|
||||
<select name="receipt-outside-domain-action" id="receipt-outside-domain-action">
|
||||
<option const:value="ignore"><var:string label:value="Never send"/></option>
|
||||
<option const:value="send"><var:string label:value="Always send"/></option>
|
||||
<option const:value="ask"><var:string label:value="Ask me"/></option>
|
||||
</select><br/>
|
||||
|
||||
|
||||
<var:string
|
||||
label:value="In all other cases:"/>
|
||||
label:value="In all other cases:"/>
|
||||
<select name="receipt-any-action" id="receipt-any-action">
|
||||
<option const:value="ignore"><var:string label:value="Never send"/></option>
|
||||
<option const:value="send"><var:string label:value="Always send"/></option>
|
||||
@@ -524,79 +571,79 @@
|
||||
</fieldset>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<var:if condition="isVacationEnabled">
|
||||
<div id="vacationView" class="tab">
|
||||
<label><input type="checkbox"
|
||||
const:name="enableVacation"
|
||||
const:id="enableVacation"
|
||||
var:checked="enableVacation" />
|
||||
<label><input type="checkbox"
|
||||
const:name="enableVacation"
|
||||
const:id="enableVacation"
|
||||
var:checked="enableVacation" />
|
||||
<var:string label:value="Enable vacation auto reply"/></label>
|
||||
<div id="vacation">
|
||||
<label><var:string label:value="Auto reply message :"/><br/>
|
||||
<textarea const:name="autoReplyText"
|
||||
const:id="autoReplyText"
|
||||
var:value="autoReplyText"/>
|
||||
const:id="autoReplyText"
|
||||
var:value="autoReplyText"/>
|
||||
</label><br/>
|
||||
|
||||
<label><var:string label:value="Email addresses (separated by commas) :"/><br/>
|
||||
<input type="hidden"
|
||||
const:id="defaultEmailAddresses"
|
||||
var:value="defaultEmailAddresses" />
|
||||
const:id="defaultEmailAddresses"
|
||||
var:value="defaultEmailAddresses" />
|
||||
<textarea const:name="autoReplyEmailAddresses"
|
||||
const:id="autoReplyEmailAddresses"
|
||||
var:value="autoReplyEmailAddresses" /><br/>
|
||||
const:id="autoReplyEmailAddresses"
|
||||
var:value="autoReplyEmailAddresses" /><br/>
|
||||
<span><a href="#" class="button" id="addDefaultEmailAddresses"><span>
|
||||
<var:string label:value="Add default email addresses" /></span></a>
|
||||
<var:string label:value="Add default email addresses" /></span></a>
|
||||
</span>
|
||||
</label><br/>
|
||||
|
||||
<label><var:string label:value="Days between responses :"/>
|
||||
|
||||
<label><var:string label:value="Days between responses :"/>
|
||||
<var:popup list="daysBetweenResponsesList" item="item"
|
||||
const:id="daysBetweenResponsesList"
|
||||
const:name="daysBetweenResponsesList"
|
||||
string="item"
|
||||
selection="daysBetweenResponses" /></label><br/>
|
||||
|
||||
<label><input type="checkbox"
|
||||
const:name="ignoreLists"
|
||||
const:id="ignoreLists"
|
||||
var:checked="ignoreLists" />
|
||||
const:id="daysBetweenResponsesList"
|
||||
const:name="daysBetweenResponsesList"
|
||||
string="item"
|
||||
selection="daysBetweenResponses" /></label><br/>
|
||||
|
||||
<label><input type="checkbox"
|
||||
const:name="ignoreLists"
|
||||
const:id="ignoreLists"
|
||||
var:checked="ignoreLists" />
|
||||
<var:string label:value="Do not send responses to mailing lists" /></label><br/>
|
||||
|
||||
|
||||
<label class="timeDate"><input var:checked="enableVacationEndDate"
|
||||
const:name="enableVacationEndDate" const:id="enableVacationEndDate" type="checkbox" class="checkBox"
|
||||
/><var:string label:value="Disable auto reply on" /></label><var:component className="UIxTimeDateControl"
|
||||
const:displayTimeControl="0"
|
||||
var:disabled="disableVacationEndDate"
|
||||
const:controlID="vacationEndDate"
|
||||
date="vacationEndDate"
|
||||
const:dayStartHour="0"
|
||||
const:dayEndHour="23"
|
||||
const:name="enableVacationEndDate" const:id="enableVacationEndDate" type="checkbox" class="checkBox"
|
||||
/><var:string label:value="Disable auto reply on" /></label><var:component className="UIxTimeDateControl"
|
||||
const:displayTimeControl="0"
|
||||
var:disabled="disableVacationEndDate"
|
||||
const:controlID="vacationEndDate"
|
||||
date="vacationEndDate"
|
||||
const:dayStartHour="0"
|
||||
const:dayEndHour="23"
|
||||
/>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</var:if
|
||||
><var:if condition="isForwardEnabled">
|
||||
</var:if
|
||||
><var:if condition="isForwardEnabled">
|
||||
<div id="forwardView" class="tab">
|
||||
<label><input type="checkbox"
|
||||
const:name="enableForward"
|
||||
const:id="enableForward"
|
||||
var:checked="enableForward" />
|
||||
<label><input type="checkbox"
|
||||
const:name="enableForward"
|
||||
const:id="enableForward"
|
||||
var:checked="enableForward" />
|
||||
<var:string label:value="Forward incoming messages"/></label><br/>
|
||||
|
||||
<div id="forward">
|
||||
<label><var:string label:value="Email addresses (separated by commas) :"/><br/>
|
||||
<textarea const:name="forwardAddress"
|
||||
const:id="forwardAddress"
|
||||
var:value="forwardAddress" />
|
||||
const:id="forwardAddress"
|
||||
var:value="forwardAddress" />
|
||||
</label><br/>
|
||||
|
||||
<label><input type="checkbox"
|
||||
const:name="forwardKeepCopy"
|
||||
const:id="forwardKeepCopy"
|
||||
var:checked="forwardKeepCopy" />
|
||||
|
||||
<label><input type="checkbox"
|
||||
const:name="forwardKeepCopy"
|
||||
const:id="forwardKeepCopy"
|
||||
var:checked="forwardKeepCopy" />
|
||||
<var:string label:value="Keep a copy" /></label><br/>
|
||||
</div>
|
||||
</div>
|
||||
@@ -605,23 +652,23 @@
|
||||
<var:if condition="shouldDisplayPasswordChange">
|
||||
<div id="passwordView" class="tab">
|
||||
<p id="passwordFields"><label><var:string label:value="New password:"
|
||||
/><input const:id="newPasswordField" class="textField"
|
||||
type="password" const:value=""/></label><br/>
|
||||
<label><var:string label:value="Confirmation:"
|
||||
/><input const:id="newPasswordConfirmationField" class="textField"
|
||||
type="password" const:value=""/></label><br/>
|
||||
<a href="#" class="button" id="changePasswordBtn"
|
||||
><span><var:string label:value="Change"/></span></a><br/>
|
||||
/><input const:id="newPasswordField" class="textField"
|
||||
type="password" const:value=""/></label><br/>
|
||||
<label><var:string label:value="Confirmation:"
|
||||
/><input const:id="newPasswordConfirmationField" class="textField"
|
||||
type="password" const:value=""/></label><br/>
|
||||
<a href="#" class="button" id="changePasswordBtn"
|
||||
><span><var:string label:value="Change"/></span></a><br/>
|
||||
</p>
|
||||
<p id="passwordError"><!-- space --></p>
|
||||
</div>
|
||||
</var:if
|
||||
><var:if condition="shouldDisplayAdditionalPreferences"
|
||||
</var:if
|
||||
><var:if condition="shouldDisplayAdditionalPreferences"
|
||||
><div id="additionalView" class="tab">
|
||||
<var:component className="UIxAdditionalPreferences"/>
|
||||
</div></var:if>
|
||||
<input type="hidden" id="hasChanged" name="hasChanged"
|
||||
var:value="hasChanged"/>
|
||||
var:value="hasChanged"/>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<var:if condition="isMultiColumnView">
|
||||
<div class="calendarLabels">
|
||||
<var:foreach list="calendarsToDisplay" item="currentCalendar">
|
||||
<div class="calendarsToDisplay">
|
||||
<div class="calendarsToDisplay" var:data-folder="currentCalendar.folder">
|
||||
<var:string value="labelForCalendar"/>
|
||||
</div>
|
||||
</var:foreach>
|
||||
@@ -33,7 +33,7 @@
|
||||
<div class="days">
|
||||
<var:foreach list="calendarsToDisplay" item="currentCalendar">
|
||||
<var:foreach list="daysToDisplay" item="currentTableDay">
|
||||
<div var:class="dayClasses" var:day="currentTableDay.shortDateString" var:id="currentAllDayId" hour="allday"><!-- space --></div>
|
||||
<div var:class="dayClasses" var:day="currentTableDay.shortDateString" var:id="currentAllDayId" var:calendar="currentCalendar.folder" hour="allday"><!-- space --></div>
|
||||
</var:foreach>
|
||||
</var:foreach>
|
||||
</div>
|
||||
@@ -75,7 +75,7 @@
|
||||
<var:if condition="isMultiColumnView">
|
||||
<var:foreach list="calendarsToDisplay" item="currentCalendar">
|
||||
<var:foreach list="daysToDisplay" item="currentTableDay">
|
||||
<div var:class="dayClasses" var:id="currentDayId" var:day-number="currentDayNumber" var:day="currentTableDay.shortDateString">
|
||||
<div var:class="dayClasses" var:id="currentDayId" var:day-number="currentDayNumber" var:calendar="currentCalendar.folder" var:day="currentTableDay.shortDateString">
|
||||
<div class="hourCells">
|
||||
<var:foreach list="hoursToDisplay" item="currentTableHour">
|
||||
<div var:class="clickableHourCellClass" var:day="currentTableDay.shortDateString" var:hour="currentAppointmentHour">
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
className="UIxPageFrame"
|
||||
const:userDefaultsKeys="SOGoCalendarCategoriesColors,SOGoDefaultCalendar"
|
||||
const:userSettingsKeys="Calendar,ShowCompletedTasks"
|
||||
const:jsFiles="SchedulerUIDnD.js"
|
||||
const:jsFiles="SchedulerUIDnD.js,jquery-ui.js"
|
||||
title="title">
|
||||
<script type="text/javascript">
|
||||
var firstDayOfWeek = <var:string value="firstDayOfWeek"/>;
|
||||
@@ -34,6 +34,7 @@
|
||||
<div class="preload" style="visibility: hidden;">
|
||||
<img rsrc:src="event-gradient.png"/>
|
||||
</div>
|
||||
<img rsrc:src="event7.png" id="DnDLeftPanelImage" style="visibility: hidden;"/>
|
||||
<div class="menu" id="monthListMenu">
|
||||
<ul>
|
||||
<var:foreach list="monthMenuItems" item="monthMenuItem"
|
||||
|
||||
@@ -12,6 +12,8 @@
|
||||
{ background-color: <var:string value="currentCalendar.color" />; color: <var:string value="contrastingTextColor" />; }
|
||||
div.colorBox.calendarFolder<var:string value="currentCalendar.folder" />
|
||||
{ color: <var:string value="currentCalendar.color" />; }
|
||||
.calendarLabels [data-folder='<var:string value="currentCalendar.folder" />']
|
||||
{ border-color: <var:string value="currentCalendar.color" />; }
|
||||
</var:foreach>
|
||||
</style>
|
||||
<div id="calendarSelector">
|
||||
@@ -39,8 +41,9 @@ div.colorBox.calendarFolder<var:string value="currentCalendar.folder" />
|
||||
><li class="denied" var:id="currentCalendar.id" var:owner="currentCalendar.owner" >
|
||||
<input type="checkbox" class="checkBox" const:disabled="disabled" var:checked="currentCalendar.active" />
|
||||
<div var:class="currentCalendarClass"><entity name="nbsp"/></div>
|
||||
<var:string value="currentCalendar.displayName" />
|
||||
<span id="activeTasks"><var:string value="currentCalendar.activeTasks"/></span>
|
||||
<span><var:string value="currentCalendar.displayName"/></span><var:if
|
||||
condition="currentCalendar.activeTasks"><span class="badge"><var:string value="currentCalendar.activeTasks"/></span
|
||||
></var:if>
|
||||
</li>
|
||||
</var:foreach>
|
||||
</ul>
|
||||
|
||||
@@ -9,21 +9,21 @@ var usersRightsWindowWidth = 450;
|
||||
function onSearchFormSubmit(panel) {
|
||||
var searchValue = panel.down('[name="search"]');
|
||||
var encodedValue = encodeURI(searchValue.value);
|
||||
|
||||
|
||||
if (encodedValue.blank()) {
|
||||
checkAjaxRequestsState();
|
||||
checkAjaxRequestsState();
|
||||
}
|
||||
else {
|
||||
var url = (UserFolderURL
|
||||
+ "usersSearch?search=" + encodedValue);
|
||||
if (document.userFoldersRequest) {
|
||||
document.userFoldersRequest.aborted = true;
|
||||
document.userFoldersRequest.abort();
|
||||
}
|
||||
document.userFoldersRequest
|
||||
= triggerAjaxRequest(url, usersSearchCallback);
|
||||
var url = (UserFolderURL
|
||||
+ "usersSearch?search=" + encodedValue);
|
||||
if (document.userFoldersRequest) {
|
||||
document.userFoldersRequest.aborted = true;
|
||||
document.userFoldersRequest.abort();
|
||||
}
|
||||
document.userFoldersRequest
|
||||
= triggerAjaxRequest(url, usersSearchCallback);
|
||||
}
|
||||
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -31,11 +31,11 @@ function usersSearchCallback(http) {
|
||||
document.userFoldersRequest = null;
|
||||
var div = $("administrationContent");
|
||||
if (http.status == 200) {
|
||||
var response = http.responseText.evalJSON();
|
||||
buildUsersTree(div, response)
|
||||
}
|
||||
var response = http.responseText.evalJSON();
|
||||
buildUsersTree(div, response)
|
||||
}
|
||||
else if (http.status == 404)
|
||||
div.update();
|
||||
div.update();
|
||||
}
|
||||
|
||||
function buildUsersTree(treeDiv, response) {
|
||||
@@ -57,10 +57,10 @@ function buildUsersTree(treeDiv, response) {
|
||||
d.icon.empty = ResourcesURL + '/empty.gif';
|
||||
d.preload ();
|
||||
d.add(0, -1, '');
|
||||
|
||||
|
||||
var isUserDialog = false;
|
||||
var multiplier = ((isUserDialog) ? 1 : 2);
|
||||
|
||||
|
||||
for (var i = 0; i < response.length; i++)
|
||||
addUserLineToTree(d, 1 + i * multiplier, response[i]);
|
||||
treeDiv.innerHTML = "";
|
||||
@@ -78,10 +78,10 @@ function buildUsersTree(treeDiv, response) {
|
||||
|
||||
function addUserLineToTree(tree, parent, line) {
|
||||
var icon = ResourcesURL + '/busy.gif';
|
||||
|
||||
|
||||
var email = line[1] + " <" + line[2] + ">";
|
||||
if (line[3] && !line[3].empty())
|
||||
email += ", " + line[3]; // extra contact info
|
||||
email += ", " + line[3]; // extra contact info
|
||||
tree.add(parent, 0, email, 0, '#', line[0], 'person',
|
||||
'', '',
|
||||
ResourcesURL + '/abcard.png',
|
||||
@@ -92,57 +92,57 @@ function addUserLineToTree(tree, parent, line) {
|
||||
|
||||
function onTreeItemClick(event) {
|
||||
preventDefault(event);
|
||||
|
||||
|
||||
var topNode = $("d");
|
||||
if (topNode.selectedEntry)
|
||||
topNode.selectedEntry.deselect();
|
||||
topNode.selectedEntry.deselect();
|
||||
this.selectElement();
|
||||
topNode.selectedEntry = this;
|
||||
}
|
||||
|
||||
function onUserNodeToggle(event) {
|
||||
this.stopObserving("click", onUserNodeToggle);
|
||||
|
||||
|
||||
var person = this.parentNode.getAttribute("dataname");
|
||||
var url = (UserFolderURLForUser(person) + "foldersSearch");
|
||||
var nodeId = this.getAttribute("id").substr(3);
|
||||
triggerAjaxRequest(url, foldersSearchCallback,
|
||||
{ nodeId: nodeId, user: person });
|
||||
{ nodeId: nodeId, user: person });
|
||||
}
|
||||
|
||||
function foldersSearchCallback(http) {
|
||||
if (http.status == 200) {
|
||||
var response = http.responseText;
|
||||
var nodeId = parseInt(http.callbackData["nodeId"]);
|
||||
|
||||
var dd = $("dd" + (nodeId + 2));
|
||||
var indentValue = (dd ? 1 : 0);
|
||||
d.aIndent.push(indentValue);
|
||||
|
||||
var dd = $("dd" + nodeId);
|
||||
if (response.length) {
|
||||
var folders = response.split(";");
|
||||
var user = http.callbackData["user"];
|
||||
|
||||
dd.innerHTML = '';
|
||||
for (var i = 1; i < folders.length - 1; i++)
|
||||
var response = http.responseText;
|
||||
var nodeId = parseInt(http.callbackData["nodeId"]);
|
||||
|
||||
var dd = $("dd" + (nodeId + 2));
|
||||
var indentValue = (dd ? 1 : 0);
|
||||
d.aIndent.push(indentValue);
|
||||
|
||||
var dd = $("dd" + nodeId);
|
||||
if (response.length) {
|
||||
var folders = response.split(";");
|
||||
var user = http.callbackData["user"];
|
||||
|
||||
dd.innerHTML = '';
|
||||
for (var i = 1; i < folders.length - 1; i++)
|
||||
dd.appendChild(addFolderBranchToTree (d, user, folders[i], nodeId, i, false));
|
||||
dd.appendChild (addFolderBranchToTree (d, user, folders[folders.length-1], nodeId,
|
||||
dd.appendChild (addFolderBranchToTree (d, user, folders[folders.length-1], nodeId,
|
||||
(folders.length - 1), true));
|
||||
for (var i = 1; i < folders.length; i++) {
|
||||
var sd = $("sd" + (nodeId + i));
|
||||
sd.observe("click", onTreeItemClick);
|
||||
sd.observe("dblclick", onFolderOpen);
|
||||
}
|
||||
}
|
||||
else {
|
||||
dd.innerHTML = '';
|
||||
dd.appendChild (addFolderNotFoundNode (d, nodeId, null));
|
||||
var sd = $("sd" + (nodeId + 1));
|
||||
sd.observe("click", onTreeItemClick);
|
||||
}
|
||||
|
||||
d.aIndent.pop();
|
||||
for (var i = 1; i < folders.length; i++) {
|
||||
var sd = $("sd" + (nodeId + i));
|
||||
sd.observe("click", onTreeItemClick);
|
||||
sd.observe("dblclick", onFolderOpen);
|
||||
}
|
||||
}
|
||||
else {
|
||||
dd.innerHTML = '';
|
||||
dd.appendChild (addFolderNotFoundNode (d, nodeId, null));
|
||||
var sd = $("sd" + (nodeId + 1));
|
||||
sd.observe("click", onTreeItemClick);
|
||||
}
|
||||
|
||||
d.aIndent.pop();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -150,19 +150,19 @@ function addFolderBranchToTree(tree, user, folder, nodeId, subId, isLast) {
|
||||
var folderInfos = folder.split(":");
|
||||
var icon = ResourcesURL + '/';
|
||||
if (folderInfos[2] == 'Contact')
|
||||
icon += 'tb-mail-addressbook-flat-16x16.png';
|
||||
icon += 'tb-mail-addressbook-flat-16x16.png';
|
||||
else
|
||||
icon += 'calendar-folder-16x16.png';
|
||||
icon += 'calendar-folder-16x16.png';
|
||||
var folderId = user + ":" + folderInfos[1];
|
||||
var name = folderInfos[0]; // name has the format "Folername (Firstname Lastname <email>)"
|
||||
var pos = name.lastIndexOf(' (');
|
||||
if (pos > -1)
|
||||
name = name.substring(0, pos); // strip the part with fullname and email
|
||||
name = name.substring(0, pos); // strip the part with fullname and email
|
||||
var node = new dTreeNode(subId, nodeId, name, 0, '#', folderId,
|
||||
folderInfos[2] + '-folder', '', '', icon, icon);
|
||||
node._ls = isLast;
|
||||
var content = tree.node(node, (nodeId + subId), null);
|
||||
|
||||
|
||||
return content;
|
||||
}
|
||||
|
||||
|
||||
@@ -53,7 +53,7 @@ function contactsListCallback(http) {
|
||||
if (http.readyState == 4) {
|
||||
if (http.status == 200) {
|
||||
document.contactsListAjaxRequest = null;
|
||||
|
||||
|
||||
var div = $("contactsListContent");
|
||||
var table = $("contactsList");
|
||||
var tbody = table.tBodies[0];
|
||||
@@ -173,13 +173,13 @@ function contactsListCallback(http) {
|
||||
sortHeader = $("phoneHeader");
|
||||
else
|
||||
sortHeader = null;
|
||||
|
||||
|
||||
if (sortHeader) {
|
||||
var sortImages = $(table.tHead).select(".sortImage");
|
||||
$(sortImages).each(function(item) {
|
||||
item.remove();
|
||||
});
|
||||
|
||||
|
||||
var sortImage = createElement("img", "messageSortImage", "sortImage");
|
||||
sortHeader.insertBefore(sortImage, sortHeader.firstChild);
|
||||
if (sorting["ascending"])
|
||||
@@ -433,7 +433,7 @@ function onContactSelectionChange(event) {
|
||||
}
|
||||
if (contactView) {
|
||||
var rows = this.parentNode.getSelectedRowsId();
|
||||
|
||||
|
||||
if (rows.length == 1) {
|
||||
var node = $(rows[0]);
|
||||
loadContact(node.getAttribute('id'));
|
||||
@@ -499,7 +499,7 @@ function onToolbarWriteToSelectedContacts(event) {
|
||||
if (document.body.hasClassName("popup"))
|
||||
window.close();
|
||||
}
|
||||
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -630,6 +630,9 @@ function onFolderSelectionChange(event) {
|
||||
var node = getTarget(event);
|
||||
if (node.tagName == 'UL')
|
||||
return;
|
||||
if (node.tagName == "SPAN")
|
||||
node = node.parentNode;
|
||||
|
||||
// Update rows selection
|
||||
onRowClick(event, node);
|
||||
}
|
||||
@@ -661,7 +664,7 @@ function onConfirmContactSelection(event) {
|
||||
var currentAddressBookName = folder.textContent;
|
||||
var selectorList = null;
|
||||
var initialValues = null;
|
||||
|
||||
|
||||
var contactsList = $("contactsList");
|
||||
var rows = contactsList.getSelectedRows();
|
||||
for (i = 0; i < rows.length; i++) {
|
||||
@@ -754,9 +757,13 @@ function appendAddressBook(name, folder) {
|
||||
li.setAttribute("list-editing", "available");
|
||||
li.setAttribute("acl-editing", "available");
|
||||
li.addClassName("local");
|
||||
li.appendChild(document.createTextNode(name
|
||||
.replace("<", "<", "g")
|
||||
.replace(">", ">", "g")));
|
||||
|
||||
var displayName = document.createElement("span");
|
||||
displayName.appendChild(document.createTextNode(name
|
||||
.replace("<", "<", "g")
|
||||
.replace(">", ">", "g")));
|
||||
li.appendChild(displayName);
|
||||
|
||||
updateAddressBooksMenus();
|
||||
configureDroppables();
|
||||
}
|
||||
@@ -780,7 +787,7 @@ function onFolderUnsubscribeCB(folderId) {
|
||||
var node = $(folderId);
|
||||
node.deselect();
|
||||
node.parentNode.removeChild(node);
|
||||
|
||||
|
||||
var personal = $("/personal");
|
||||
personal.selectElement();
|
||||
onFolderSelectionChange();
|
||||
@@ -917,7 +924,7 @@ function deletePersonalAddressBookCallback(http) {
|
||||
if (http.readyState == 4) {
|
||||
if (isHttpStatus204(http.status)) {
|
||||
var ul = $("contactFolders");
|
||||
|
||||
|
||||
var children = ul.childNodesWithTag("li");
|
||||
var i = 0;
|
||||
var done = false;
|
||||
@@ -995,7 +1002,7 @@ function configureAddressBooks() {
|
||||
contactFolders.on("dblclick", onAddressBookModify);
|
||||
contactFolders.on("selectstart", listRowMouseDownHandler);
|
||||
contactFolders.attachMenu("contactFoldersMenu");
|
||||
|
||||
|
||||
lookupDeniedFolders();
|
||||
configureDroppables();
|
||||
|
||||
@@ -1034,16 +1041,16 @@ function updateAddressBooksMenus() {
|
||||
var menuDIV = $(menuId);
|
||||
if (menuDIV)
|
||||
menuDIV.parentNode.removeChild(menuDIV);
|
||||
|
||||
|
||||
menuDIV = document.createElement("div");
|
||||
pageContent.appendChild(menuDIV);
|
||||
|
||||
|
||||
var menu = document.createElement("ul");
|
||||
menuDIV.appendChild(menu);
|
||||
|
||||
|
||||
$(menuDIV).addClassName("menu");
|
||||
menuDIV.setAttribute("id", menuId);
|
||||
|
||||
|
||||
var submenuIds = new Array();
|
||||
for (var i = 0; i < contactFolders.length; i++) {
|
||||
if (contactFolders[i].hasClassName("local")) {
|
||||
@@ -1060,7 +1067,7 @@ function updateAddressBooksMenus() {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function onAddressBookModify(event) {
|
||||
var folders = $("contactFolders");
|
||||
var selected = folders.getSelectedNodes()[0];
|
||||
@@ -1069,12 +1076,12 @@ function onAddressBookModify(event) {
|
||||
var windowID = sanitizeWindowName(addressBookID + " properties");
|
||||
var width = 410;
|
||||
var height = 410;
|
||||
|
||||
|
||||
$(function() {
|
||||
var properties = window.open(url, windowID, "width="+width+",height="+height+",resizable=0");
|
||||
properties.focus();
|
||||
}).delay(0.1);
|
||||
|
||||
|
||||
}
|
||||
|
||||
function onMenuSharing(event) {
|
||||
@@ -1246,14 +1253,14 @@ getMenus = function() {
|
||||
"moveContactMenu", "copyContactMenu",
|
||||
onMenuExportContact, onMenuRawContact);
|
||||
menus["searchMenu"] = new Array(setSearchCriteria, setSearchCriteria, setSearchCriteria);
|
||||
|
||||
|
||||
var contactFoldersMenu = $("contactFoldersMenu");
|
||||
if (contactFoldersMenu)
|
||||
contactFoldersMenu.prepareVisibility = onAddressBooksMenuPrepareVisibility;
|
||||
var contactMenu = $("contactMenu");
|
||||
if (contactMenu)
|
||||
contactMenu.prepareVisibility = onContactMenuPrepareVisibility;
|
||||
|
||||
|
||||
if (originalGetMenus) {
|
||||
var originalMenus = originalGetMenus();
|
||||
if (originalMenus)
|
||||
@@ -1299,7 +1306,7 @@ function onDocumentKeydown(event) {
|
||||
nextRow = row.previous("tr");
|
||||
if (nextRow) {
|
||||
row.up().deselectAll();
|
||||
|
||||
|
||||
// Adjust the scollbar
|
||||
var viewPort = $("contactsListContent");
|
||||
var divDimensions = viewPort.getDimensions();
|
||||
@@ -1312,7 +1319,7 @@ function onDocumentKeydown(event) {
|
||||
viewPort.scrollTop += rowBottom - divBottom;
|
||||
else if (rowScrollOffset.top > rowPosition.top)
|
||||
viewPort.scrollTop -= rowScrollOffset.top - rowPosition.top;
|
||||
|
||||
|
||||
// Select and load the next message
|
||||
nextRow.selectElement();
|
||||
loadContact(nextRow.readAttribute("id"));
|
||||
@@ -1351,7 +1358,7 @@ function initContacts(event) {
|
||||
}
|
||||
|
||||
Event.observe(document, "keydown", onDocumentKeydown);
|
||||
|
||||
|
||||
configureAddressBooks();
|
||||
configureDraggables();
|
||||
updateAddressBooksMenus();
|
||||
@@ -1371,7 +1378,7 @@ function initContacts(event) {
|
||||
}
|
||||
configureSortableTableHeaders(table);
|
||||
}
|
||||
|
||||
|
||||
if (typeof onWindowResize != 'function') {
|
||||
// When loaded from the mail editor, onWindowResize is
|
||||
// already registered
|
||||
|
||||
+120
-120
@@ -34,13 +34,13 @@ var deleteMessageRequestCount = 0;
|
||||
var messageCheckTimer;
|
||||
|
||||
/* We need to override this method since it is adapted to GCS-based folder
|
||||
references, which we do not use here */
|
||||
references, which we do not use here */
|
||||
function URLForFolderID(folderID, application) {
|
||||
if (application)
|
||||
application = UserFolderURL + application + "/";
|
||||
else
|
||||
application = ApplicationBaseURL;
|
||||
|
||||
|
||||
var url = application + encodeURI(folderID);
|
||||
|
||||
if (url[url.length-1] == '/')
|
||||
@@ -100,7 +100,7 @@ function onMenuSharing(event) {
|
||||
|
||||
if (type == "additional")
|
||||
showAlertDialog(clabels["The user rights cannot be"
|
||||
+ " edited for this object!"]);
|
||||
+ " edited for this object!"]);
|
||||
else {
|
||||
var urlstr = URLForFolderID(folderID) + "/acls";
|
||||
openAclWindow(urlstr);
|
||||
@@ -280,7 +280,7 @@ function mailListToggleMessagesRead(row, force_mark_as_read) {
|
||||
markMailInWindow(window, msguid, markread);
|
||||
|
||||
var url = ApplicationBaseURL + encodeURI(Mailer.currentMailbox) + "/"
|
||||
+ msguid + "/" + action;
|
||||
+ msguid + "/" + action;
|
||||
|
||||
var data = { "msguid": msguid };
|
||||
triggerAjaxRequest(url, mailListMarkMessageCallback, data);
|
||||
@@ -289,14 +289,14 @@ function mailListToggleMessagesRead(row, force_mark_as_read) {
|
||||
}
|
||||
|
||||
/*
|
||||
function mailListMarkMessage(event) {
|
||||
mailListToggleMessagesRead();
|
||||
function mailListMarkMessage(event) {
|
||||
mailListToggleMessagesRead();
|
||||
|
||||
preventDefault(event);
|
||||
preventDefault(event);
|
||||
|
||||
return false;
|
||||
}
|
||||
*/
|
||||
return false;
|
||||
}
|
||||
*/
|
||||
|
||||
function mailListMarkMessageCallback(http) {
|
||||
var data = http.callbackData;
|
||||
@@ -305,7 +305,7 @@ function mailListMarkMessageCallback(http) {
|
||||
}
|
||||
else {
|
||||
log("Message Mark Failed (" + http.status + "): " + http.statusText);
|
||||
Mailer.dataTable.invalidate(data["msguid"], false);
|
||||
Mailer.dataTable.invalidate(data["msguid"], false);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -343,7 +343,7 @@ function mailListToggleMessagesFlagged(row) {
|
||||
flagMailInWindow(window, msguid, flagged);
|
||||
|
||||
var url = ApplicationBaseURL + encodeURI(Mailer.currentMailbox) + "/"
|
||||
+ msguid + "/" + action;
|
||||
+ msguid + "/" + action;
|
||||
var data = { "msguid": msguid };
|
||||
|
||||
triggerAjaxRequest(url, mailListToggleMessageFlaggedCallback, data);
|
||||
@@ -363,11 +363,11 @@ function onUnload(event) {
|
||||
var url = ApplicationBaseURL + encodeURI(Mailer.currentMailbox) + "/expunge";
|
||||
|
||||
new Ajax.Request(url, {
|
||||
asynchronous: false,
|
||||
method: 'get',
|
||||
onFailure: function(transport) {
|
||||
log("Can't expunge current folder: " + transport.status);
|
||||
}
|
||||
asynchronous: false,
|
||||
method: 'get',
|
||||
onFailure: function(transport) {
|
||||
log("Can't expunge current folder: " + transport.status);
|
||||
}
|
||||
});
|
||||
|
||||
return true;
|
||||
@@ -383,12 +383,12 @@ function onDocumentKeydown(event) {
|
||||
keyCode = "A".charCodeAt(0);
|
||||
}
|
||||
}
|
||||
if (keyCode == Event.KEY_DELETE ||
|
||||
if (keyCode == Event.KEY_DELETE ||
|
||||
keyCode == Event.KEY_BACKSPACE) {
|
||||
deleteSelectedMessages();
|
||||
Event.stop(event);
|
||||
}
|
||||
else if (keyCode == Event.KEY_DOWN ||
|
||||
else if (keyCode == Event.KEY_DOWN ||
|
||||
keyCode == Event.KEY_UP) {
|
||||
if (Mailer.currentMessages[Mailer.currentMailbox]) {
|
||||
var row = $("row_" + Mailer.currentMessages[Mailer.currentMailbox]);
|
||||
@@ -411,7 +411,7 @@ function onDocumentKeydown(event) {
|
||||
|
||||
if (divBottom < rowBottom)
|
||||
viewPort.scrollTop += rowBottom - divBottom + centerOffset;
|
||||
else if (viewPort.scrollTop > nextRow.offsetTop)
|
||||
else if (viewPort.scrollTop > nextRow.offsetTop)
|
||||
viewPort.scrollTop -= rowScrollOffset.top - nextRow.offsetTop + centerOffset;
|
||||
|
||||
// Select and load the next message
|
||||
@@ -419,12 +419,12 @@ function onDocumentKeydown(event) {
|
||||
loadMessage(Mailer.currentMessages[Mailer.currentMailbox]);
|
||||
// from generic.js
|
||||
lastClickedRow = nextRow.rowIndex;
|
||||
lastClickedRowId = nextRow.id;
|
||||
lastClickedRowId = nextRow.id;
|
||||
}
|
||||
Event.stop(event);
|
||||
}
|
||||
}
|
||||
else if (((isMac() && event.metaKey == 1) || (!isMac() && event.ctrlKey == 1))
|
||||
else if (((isMac() && event.metaKey == 1) || (!isMac() && event.ctrlKey == 1))
|
||||
&& keyCode == "A".charCodeAt(0)) { // Ctrl-A
|
||||
$("messageListBody").down("TBODY").selectAll();
|
||||
Event.stop(event);
|
||||
@@ -449,18 +449,18 @@ function deleteSelectedMessages(sender) {
|
||||
if (rowIds && rowIds.length > 0) {
|
||||
messageList.deselectAll();
|
||||
for (var i = 0; i < rowIds.length; i++) {
|
||||
if (unseenCount < 1) {
|
||||
var rows = messageList.select('#' + rowIds[i]);
|
||||
if (rows.length > 0) {
|
||||
var row = rows.first();
|
||||
row.hide();
|
||||
if (row.hasClassName("mailer_unreadmail"))
|
||||
unseenCount--;
|
||||
}
|
||||
else {
|
||||
unseenCount = 1;
|
||||
}
|
||||
}
|
||||
if (unseenCount < 1) {
|
||||
var rows = messageList.select('#' + rowIds[i]);
|
||||
if (rows.length > 0) {
|
||||
var row = rows.first();
|
||||
row.hide();
|
||||
if (row.hasClassName("mailer_unreadmail"))
|
||||
unseenCount--;
|
||||
}
|
||||
else {
|
||||
unseenCount = 1;
|
||||
}
|
||||
}
|
||||
var uid = rowIds[i].substr(4); // drop "row_"
|
||||
var path = Mailer.currentMailbox + "/" + uid;
|
||||
uids.push(uid);
|
||||
@@ -508,7 +508,7 @@ function deleteSelectedMessages(sender) {
|
||||
if (nextRow) {
|
||||
// from generic.js
|
||||
lastClickedRow = nextRow.rowIndex;
|
||||
lastClickedRowId = nextRow.id;
|
||||
lastClickedRowId = nextRow.id;
|
||||
}
|
||||
if (Mailer.currentMailboxType != "trash")
|
||||
deleteCachedMailboxByType("trash");
|
||||
@@ -545,10 +545,10 @@ function deleteSelectedMessagesCallback(http) {
|
||||
if (rdata.quotas && data["mailbox"].startsWith('/0/'))
|
||||
updateQuotas(rdata.quotas);
|
||||
}
|
||||
if (data["refreshUnseenCount"])
|
||||
if (data["refreshUnseenCount"])
|
||||
// TODO : the unseen count should be returned when calling the batchDelete remote action,
|
||||
// in order to avoid this extra AJAX call.
|
||||
getUnseenCountForFolder(data["mailbox"]);
|
||||
getUnseenCountForFolder(data["mailbox"]);
|
||||
if (data["refreshFolder"])
|
||||
Mailer.dataTable.refresh();
|
||||
}
|
||||
@@ -572,7 +572,7 @@ function deleteMessagesWithoutTrash(data) {
|
||||
var parameters = "uid=" + data["id"].join(",") + '&withoutTrash=1';
|
||||
data["withoutTrash"] = true;
|
||||
triggerAjaxRequest(url, deleteSelectedMessagesCallback, data, parameters,
|
||||
{ "Content-type": "application/x-www-form-urlencoded" });
|
||||
{ "Content-type": "application/x-www-form-urlencoded" });
|
||||
disposeDialog();
|
||||
}
|
||||
|
||||
@@ -685,9 +685,9 @@ function onMailboxMenuMove(event) {
|
||||
for (var i = 0; i < rowIds.length; i++) {
|
||||
var uid = rowIds[i].substr(4);
|
||||
var path = Mailer.currentMailbox + "/" + uid;
|
||||
var rows = messageList.select('#' + rowIds[i]);
|
||||
if (rows.length > 0)
|
||||
rows.first().hide();
|
||||
var rows = messageList.select('#' + rowIds[i]);
|
||||
if (rows.length > 0)
|
||||
rows.first().hide();
|
||||
uids.push(uid);
|
||||
paths.push(path);
|
||||
// Remove references to closed popups
|
||||
@@ -803,8 +803,8 @@ function openMailbox(mailbox, reload) {
|
||||
if (sortHeader) {
|
||||
var sortImages = sortHeader.up('THEAD').select(".sortImage");
|
||||
$(sortImages).each(function(item) {
|
||||
item.remove();
|
||||
});
|
||||
item.remove();
|
||||
});
|
||||
var sortImage = createElement("img", "messageSortImage", "sortImage");
|
||||
sortHeader.insertBefore(sortImage, sortHeader.firstChild);
|
||||
if (sorting["ascending"])
|
||||
@@ -865,13 +865,13 @@ function openMailbox(mailbox, reload) {
|
||||
Mailer.unseenCountMailboxes.push(mailbox);
|
||||
}
|
||||
|
||||
// Restore previous selection
|
||||
// Restore previous selection
|
||||
var currentMessage = Mailer.currentMessages[mailbox];
|
||||
if (currentMessage) {
|
||||
if (!reload) {
|
||||
loadMessage(currentMessage);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -887,7 +887,7 @@ function messageListCallback(row, data, isNew) {
|
||||
|
||||
// Restore previous selection
|
||||
if (data['uid'] == currentMessage)
|
||||
row.addClassName('_selected');
|
||||
row.addClassName('_selected');
|
||||
|
||||
if (data['Thread'])
|
||||
row.addClassName('openedThread');
|
||||
@@ -968,10 +968,10 @@ function updateUnseenCount(node, count, isDelta) {
|
||||
counterSpan.removeChild(counterSpan.firstChild);
|
||||
}
|
||||
counterSpan.appendChild(document.createTextNode(" (" + count + ")"));
|
||||
if (count > 0) {
|
||||
if (count > 0) {
|
||||
counterSpan.removeClassName("hidden");
|
||||
unseenSpan.addClassName("unseen");
|
||||
}
|
||||
}
|
||||
else {
|
||||
counterSpan.addClassName("hidden");
|
||||
unseenSpan.removeClassName("unseen");
|
||||
@@ -1019,9 +1019,9 @@ function onMessageListRender(event) {
|
||||
// Restore previous selection
|
||||
var currentMessage = Mailer.currentMessages[Mailer.currentMailbox];
|
||||
if (currentMessage) {
|
||||
var rows = this.select("TR#row_" + currentMessage);
|
||||
if (rows.length == 1)
|
||||
rows[0].selectElement();
|
||||
var rows = this.select("TR#row_" + currentMessage);
|
||||
if (rows.length == 1)
|
||||
rows[0].selectElement();
|
||||
}
|
||||
// Update message counter in folder name
|
||||
updateMessageListCounter(event.memo, false);
|
||||
@@ -1105,7 +1105,7 @@ function deleteCachedMailboxByType(type) {
|
||||
function deleteCachedMailbox(mailboxPath) {
|
||||
var keys = Mailer.dataSources.keys();
|
||||
for (var i = 0; i < keys.length; i++) {
|
||||
if (keys[i] == mailboxPath || keys[i].startsWith(mailboxPath + "?"))
|
||||
if (keys[i] == mailboxPath || keys[i].startsWith(mailboxPath + "?"))
|
||||
Mailer.dataSources.unset(keys[i]);
|
||||
}
|
||||
}
|
||||
@@ -1121,8 +1121,8 @@ function deleteCachedMessage(messageId) {
|
||||
Mailer.cachedMessages.splice(counter, 1);
|
||||
done = true;
|
||||
}
|
||||
else
|
||||
counter++;
|
||||
else
|
||||
counter++;
|
||||
}
|
||||
|
||||
function getCachedMessage(idx) {
|
||||
@@ -1134,8 +1134,8 @@ function getCachedMessage(idx) {
|
||||
if (Mailer.cachedMessages[counter]
|
||||
&& Mailer.cachedMessages[counter]['idx'] == Mailer.currentMailbox + '/' + idx)
|
||||
message = Mailer.cachedMessages[counter];
|
||||
else
|
||||
counter++;
|
||||
else
|
||||
counter++;
|
||||
|
||||
return message;
|
||||
}
|
||||
@@ -1223,8 +1223,8 @@ function loadMessage(msguid) {
|
||||
+ msguid + "/view?noframe=1");
|
||||
div.innerHTML = '';
|
||||
document.messageAjaxRequest = triggerAjaxRequest(url,
|
||||
loadMessageCallback,
|
||||
{ 'mailbox': Mailer.currentMailbox,
|
||||
loadMessageCallback,
|
||||
{ 'mailbox': Mailer.currentMailbox,
|
||||
'msguid': msguid,
|
||||
'seenStateHasChanged': seenStateHasChanged });
|
||||
}
|
||||
@@ -1251,13 +1251,13 @@ function loadMessage(msguid) {
|
||||
|
||||
/**
|
||||
* Hide the "Load Images" button when there's no unsafe content
|
||||
*/
|
||||
*/
|
||||
function configureLoadImagesButton() {
|
||||
var loadImagesButton = $("loadImagesButton");
|
||||
if (typeof(loadImagesButton) == "undefined" ||
|
||||
loadImagesButton == null ) {
|
||||
return;
|
||||
}
|
||||
return;
|
||||
}
|
||||
var content = $("messageContent");
|
||||
var unsafeElements = content.select('[unsafe-src], [unsafe-data], [unsafe-classid], [unsafe-background], [unsafe-style]');
|
||||
if (unsafeElements.length == 0) {
|
||||
@@ -1272,7 +1272,7 @@ function configureSignatureFlagImage() {
|
||||
var signedPart = $("signedMessage");
|
||||
if (signedPart) {
|
||||
var supportsSMIME
|
||||
= parseInt(signedPart.getAttribute("supports-smime"));
|
||||
= parseInt(signedPart.getAttribute("supports-smime"));
|
||||
|
||||
if (supportsSMIME) {
|
||||
var loadImagesButton = $("loadImagesButton");
|
||||
@@ -1320,7 +1320,7 @@ function showSignatureMessage () {
|
||||
function hideSignatureMessage () {
|
||||
var div = $("signatureFlagMessage");
|
||||
if (div)
|
||||
div.style.display = "none";
|
||||
div.style.display = "none";
|
||||
}
|
||||
|
||||
function configureLinksInMessage() {
|
||||
@@ -1398,10 +1398,10 @@ function configureiCalLinksInMessage() {
|
||||
// The user delegates the invitation
|
||||
editDelegate.stopObserving("click");
|
||||
editDelegate.observe("click", function(event) {
|
||||
$("delegateEditor").show();
|
||||
$("delegatedTo").focus();
|
||||
this.hide();
|
||||
});
|
||||
$("delegateEditor").show();
|
||||
$("delegatedTo").focus();
|
||||
this.hide();
|
||||
});
|
||||
}
|
||||
|
||||
var delegatedToLink = $("delegatedToLink");
|
||||
@@ -1410,12 +1410,12 @@ function configureiCalLinksInMessage() {
|
||||
// to change the delegated attendee
|
||||
delegatedToLink.stopObserving("click");
|
||||
delegatedToLink.observe("click", function(event) {
|
||||
$("delegatedTo").show();
|
||||
$("iCalendarDelegate").show();
|
||||
$("delegatedTo").focus();
|
||||
this.hide();
|
||||
Event.stop(event);
|
||||
});
|
||||
$("delegatedTo").show();
|
||||
$("iCalendarDelegate").show();
|
||||
$("delegatedTo").focus();
|
||||
this.hide();
|
||||
Event.stop(event);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1428,7 +1428,7 @@ function onICalendarDelegate(event) {
|
||||
currentMsg = mailboxName + "/" + messageName;
|
||||
else
|
||||
currentMsg = Mailer.currentMailbox + "/"
|
||||
+ Mailer.currentMessages[Mailer.currentMailbox];
|
||||
+ Mailer.currentMessages[Mailer.currentMailbox];
|
||||
delegateInvitation(link, ICalendarButtonCallback, currentMsg);
|
||||
}
|
||||
this.blur(); // required by IE
|
||||
@@ -1500,19 +1500,19 @@ function resizeMailContent() {
|
||||
var contentDiv = document.getElementsByClassName('mailer_mailcontent')[0];
|
||||
|
||||
contentDiv.setStyle({ 'top':
|
||||
(Element.getHeight(headerTable) + headerTable.offsetTop) + 'px' });
|
||||
(Element.getHeight(headerTable) + headerTable.offsetTop) + 'px' });
|
||||
|
||||
// Show expand buttons if necessary
|
||||
var spans = $$("TABLE TR.mailer_fieldrow TD.mailer_fieldvalue SPAN");
|
||||
spans.each(function(span) {
|
||||
var row = span.up("TR");
|
||||
if (span.getWidth() > row.getWidth()) {
|
||||
var cell = row.select("TD.mailer_fieldname").first();
|
||||
var link = cell.down("img");
|
||||
link.show();
|
||||
link.observe("click", toggleDisplayHeader);
|
||||
}
|
||||
});
|
||||
var row = span.up("TR");
|
||||
if (span.getWidth() > row.getWidth()) {
|
||||
var cell = row.select("TD.mailer_fieldname").first();
|
||||
var link = cell.down("img");
|
||||
link.show();
|
||||
link.observe("click", toggleDisplayHeader);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function toggleDisplayHeader(event) {
|
||||
@@ -1621,7 +1621,7 @@ function loadMessageCallback(http) {
|
||||
if (http.status == 200) {
|
||||
if (http.callbackData) {
|
||||
document.messageAjaxRequest = null;
|
||||
var msguid = http.callbackData.msguid;
|
||||
var msguid = http.callbackData.msguid;
|
||||
var mailbox = http.callbackData.mailbox;
|
||||
if (Mailer.currentMailbox == mailbox &&
|
||||
Mailer.currentMessages[Mailer.currentMailbox] == msguid) {
|
||||
@@ -1646,8 +1646,8 @@ function loadMessageCallback(http) {
|
||||
}
|
||||
else if (http.status == 404) {
|
||||
showAlertDialog (_("The message you have selected doesn't exist anymore."));
|
||||
Mailer.dataTable.remove(http.callbackData.msguid);
|
||||
Mailer.currentMessages[Mailer.currentMailbox] = null;
|
||||
Mailer.dataTable.remove(http.callbackData.msguid);
|
||||
Mailer.currentMessages[Mailer.currentMailbox] = null;
|
||||
}
|
||||
else
|
||||
log("messageCallback: problem during ajax request: " + http.status);
|
||||
@@ -1840,10 +1840,10 @@ function refreshCurrentFolder() {
|
||||
|
||||
/* Called after sending an email */
|
||||
function refreshMessage(mailbox, messageUID) {
|
||||
if (Mailer.currentMailboxType == 'sent')
|
||||
if (Mailer.currentMailboxType == 'sent' || Mailer.currentMailboxType == 'draft')
|
||||
refreshCurrentFolder();
|
||||
else if (mailbox == Mailer.currentMailbox) {
|
||||
Mailer.dataTable.invalidate(messageUID);
|
||||
Mailer.dataTable.invalidate(messageUID);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1960,13 +1960,13 @@ function initMailer(event) {
|
||||
Event.observe(document, "keydown", onDocumentKeydown);
|
||||
|
||||
/* Perform an expunge when leaving the webmail */
|
||||
// if (isSafari()) {
|
||||
// $('calendarBannerLink').observe("click", onUnload);
|
||||
// $('contactsBannerLink').observe("click", onUnload);
|
||||
// $('logoff').observe("click", onUnload);
|
||||
// }
|
||||
// else
|
||||
Event.observe(window, "beforeunload", onUnload);
|
||||
// if (isSafari()) {
|
||||
// $('calendarBannerLink').observe("click", onUnload);
|
||||
// $('contactsBannerLink').observe("click", onUnload);
|
||||
// $('logoff').observe("click", onUnload);
|
||||
// }
|
||||
// else
|
||||
Event.observe(window, "beforeunload", onUnload);
|
||||
|
||||
onMessageListResize();
|
||||
}
|
||||
@@ -2003,7 +2003,7 @@ function initMailboxTree() {
|
||||
mailboxTree.config.hideRoot = true;
|
||||
mailboxTree.icon.root = ResourcesURL + "/tbtv_account_17x17.png";
|
||||
mailboxTree.icon.folder = ResourcesURL + "/tbtv_leaf_corner_17x17.png";
|
||||
mailboxTree.icon.folderOpen = ResourcesURL + "/tbtv_leaf_corner_17x17.png";
|
||||
mailboxTree.icon.folderOpen = ResourcesURL + "/tbtv_leaf_corner_17x17.png";
|
||||
mailboxTree.icon.node = ResourcesURL + "/tbtv_leaf_corner_17x17.png";
|
||||
mailboxTree.icon.line = ResourcesURL + "/tbtv_line_17x22.png";
|
||||
mailboxTree.icon.join = ResourcesURL + "/tbtv_junction_17x22.png";
|
||||
@@ -2021,7 +2021,7 @@ function initMailboxTree() {
|
||||
|
||||
var chainRq = new AjaxRequestsChain(initMailboxTreeCB);
|
||||
for (var i = 0; i < mailAccounts.length; i++) {
|
||||
var url = ApplicationBaseURL + "/" + i + "/mailboxes";
|
||||
var url = ApplicationBaseURL + "/" + i + "/mailboxes";
|
||||
chainRq.requests.push([url, onLoadMailboxesCallback, i]);
|
||||
}
|
||||
chainRq.start();
|
||||
@@ -2331,7 +2331,7 @@ function onMenuDeleteFolder(event) {
|
||||
var urlstr = URLForFolderID(folderID) + "/delete";
|
||||
var errorLabel = _("The folder could not be deleted.");
|
||||
showConfirmDialog(_("Confirmation"),
|
||||
_("Do you really want to move this folder into the trash ?"),
|
||||
_("Do you really want to move this folder into the trash ?"),
|
||||
function(event) {
|
||||
triggerAjaxRequest(urlstr, folderOperationCallback, errorLabel);
|
||||
disposeDialog();
|
||||
@@ -2448,25 +2448,25 @@ function onMenuLabelNone() {
|
||||
else if (Object.isArray(document.menuTarget))
|
||||
// Menu called from multiple selection in messages list view
|
||||
$(document.menuTarget).collect(function(row) {
|
||||
messages.push(row.getAttribute("id").substr(4));
|
||||
});
|
||||
messages.push(row.getAttribute("id").substr(4));
|
||||
});
|
||||
else
|
||||
// Menu called from one selection in messages list view
|
||||
messages.push(document.menuTarget.getAttribute("id").substr(4));
|
||||
|
||||
var url = ApplicationBaseURL + encodeURI(Mailer.currentMailbox) + "/";
|
||||
messages.each(function(id) {
|
||||
triggerAjaxRequest(url + id + "/removeAllLabels",
|
||||
messageFlagCallback,
|
||||
{ mailbox: Mailer.currentMailbox, msg: id, label: null } );
|
||||
});
|
||||
triggerAjaxRequest(url + id + "/removeAllLabels",
|
||||
messageFlagCallback,
|
||||
{ mailbox: Mailer.currentMailbox, msg: id, label: null } );
|
||||
});
|
||||
}
|
||||
|
||||
function onMenuLabelFlag() {
|
||||
var messages = new Hash();
|
||||
|
||||
var flag = this.readAttribute("data-name");
|
||||
|
||||
|
||||
if (document.menuTarget.tagName == "DIV")
|
||||
// Menu called from message content view
|
||||
messages.set(Mailer.currentMessages[Mailer.currentMailbox],
|
||||
@@ -2483,15 +2483,15 @@ function onMenuLabelFlag() {
|
||||
// Menu called from one selection in messages list view
|
||||
messages.set(document.menuTarget.getAttribute("id").substr(4),
|
||||
document.menuTarget.getAttribute("labels"));
|
||||
|
||||
|
||||
var url = ApplicationBaseURL + encodeURI(Mailer.currentMailbox) + "/";
|
||||
messages.keys().each(function(id) {
|
||||
var flags = messages.get(id).split(" ");
|
||||
var operation = "add";
|
||||
|
||||
|
||||
if (flags.indexOf(flag) > -1)
|
||||
operation = "remove";
|
||||
|
||||
|
||||
triggerAjaxRequest(url + id + "/" + operation + "Label?flag=" + flag.asCSSIdentifier(),
|
||||
messageFlagCallback,
|
||||
{ mailbox: Mailer.currentMailbox, msg: id,
|
||||
@@ -2517,7 +2517,7 @@ function folderRefreshCallback(http) {
|
||||
var oldMailbox = http.callbackData.mailbox;
|
||||
if (http.callbackData.refresh
|
||||
&& oldMailbox == Mailer.currentMailbox) {
|
||||
getUnseenCountForFolder(oldMailbox);
|
||||
getUnseenCountForFolder(oldMailbox);
|
||||
if (http.callbackData.id) {
|
||||
var s = http.callbackData.id + "";
|
||||
var uids = s.split(",");
|
||||
@@ -2542,8 +2542,8 @@ function folderRefreshCallback(http) {
|
||||
log ("folderRefreshCallback failed for UIDs " + s);
|
||||
for (var i = 0; i < uids.length; i++) {
|
||||
var row = $("row_" + uids[i]);
|
||||
if (row)
|
||||
row.show();
|
||||
if (row)
|
||||
row.show();
|
||||
}
|
||||
}
|
||||
var msg = /<p>(.*)<\/p>/m.exec(http.responseText);
|
||||
@@ -2607,7 +2607,7 @@ function onMessageListMenuPrepareVisibility() {
|
||||
function onAccountIconMenuPrepareVisibility() {
|
||||
/* This methods disables or enables the "Delegation..." menu option on
|
||||
mail accounts. */
|
||||
if (document.menuTarget) {
|
||||
if (document.menuTarget) {
|
||||
var mbx = document.menuTarget.getAttribute("dataname");
|
||||
if (mbx) {
|
||||
var lis = this.getElementsByTagName("li");
|
||||
@@ -2656,8 +2656,8 @@ function onLabelMenuPrepareVisibility() {
|
||||
var rows = messageList.getSelectedRows();
|
||||
for (var i = 0; i < rows.length; i++) {
|
||||
$w(rows[i].getAttribute("labels")).each(function(flag) {
|
||||
flags[flag] = true;
|
||||
});
|
||||
flags[flag] = true;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2675,7 +2675,7 @@ function onLabelMenuPrepareVisibility() {
|
||||
// We bind the event handlers if we need to
|
||||
if (lis[i].menuCallback == null) {
|
||||
lis[i].menuCallback = onMenuLabelFlag;
|
||||
lis[i].on("mousedown", onMenuClickHandler);
|
||||
lis[i].on("mousedown", onMenuClickHandler);
|
||||
lis[i].removeClassName("disabled");
|
||||
}
|
||||
|
||||
@@ -2854,9 +2854,9 @@ document.observe("dom:loaded", initMailer);
|
||||
function Mailbox(type, name, unseen, displayName) {
|
||||
this.type = type;
|
||||
if (displayName)
|
||||
this.displayName = displayName;
|
||||
this.displayName = displayName;
|
||||
else
|
||||
this.displayName = name;
|
||||
this.displayName = name;
|
||||
// log("name: " + name + "; dn: " + displayName);
|
||||
this.name = name;
|
||||
this.unseen = unseen;
|
||||
@@ -2893,8 +2893,8 @@ Mailbox.prototype = {
|
||||
if (this.children[i].name == name
|
||||
|| this.children[i].displayName == name)
|
||||
mailbox = this.children[i];
|
||||
else
|
||||
i++;
|
||||
else
|
||||
i++;
|
||||
|
||||
return mailbox;
|
||||
},
|
||||
@@ -2923,7 +2923,7 @@ function configureDraggables() {
|
||||
function configureDroppables() {
|
||||
jQuery('#mailboxTree .dTreeNode[datatype!="account"][datatype!="additional"] .node .nodeName').droppable({
|
||||
hoverClass: 'genericHoverClass',
|
||||
drop: dropAction });
|
||||
drop: dropAction });
|
||||
}
|
||||
|
||||
function startDragging(event, ui) {
|
||||
|
||||
@@ -2,277 +2,384 @@
|
||||
|
||||
// NOTE: The popup menu with id "contactsMenu" must exist before
|
||||
// using this interface.
|
||||
//
|
||||
//
|
||||
// This interface fires two events:
|
||||
// - autocompletion:changed : fired when a new contact is selected
|
||||
// - autocompletion:changedlist : fired when a new list is selected
|
||||
//
|
||||
var SOGoAutoCompletionInterface = {
|
||||
|
||||
// Attributes that could be changed from the object
|
||||
// inheriting the inteface
|
||||
uidField: "c_name",
|
||||
addressBook: null,
|
||||
excludeGroups: false,
|
||||
excludeLists: false,
|
||||
|
||||
// Internal attributes
|
||||
animationParent: null,
|
||||
selectedIndex: -1,
|
||||
delay: 0.750,
|
||||
delayedSearch: false,
|
||||
menu: null,
|
||||
|
||||
bind: function () {
|
||||
this.menu = $('contactsMenu');
|
||||
this.writeAttribute("autocomplete", "off");
|
||||
this.writeAttribute("container", null);
|
||||
this.confirmedValue = null;
|
||||
this.observe("keydown", this.onKeydown.bindAsEventListener(this));
|
||||
this.observe("blur", this.onBlur.bindAsEventListener(this));
|
||||
},
|
||||
|
||||
onKeydown: function (event) {
|
||||
if (event.ctrlKey || event.metaKey) {
|
||||
this.focussed = true;
|
||||
return;
|
||||
}
|
||||
if (event.keyCode == Event.KEY_TAB) {
|
||||
if (this.confirmedValue)
|
||||
this.value = this.confirmedValue;
|
||||
else
|
||||
this.writeAttribute("uid", null);
|
||||
if (document.currentPopupMenu)
|
||||
hideMenu(document.currentPopupMenu);
|
||||
}
|
||||
else if (event.keyCode == 0
|
||||
|| event.keyCode == Event.KEY_BACKSPACE
|
||||
|| event.keyCode == Event.KEY_DELETE
|
||||
|| event.keyCode == 32 // Space
|
||||
|| event.keyCode > 47) {
|
||||
this.confirmedValue = null;
|
||||
this.selectedIndex = -1;
|
||||
if (this.delayedSearch)
|
||||
window.clearTimeout(this.delayedSearch);
|
||||
this.delayedSearch = this.performSearch.delay(this.delay, this);
|
||||
}
|
||||
else if (event.keyCode == Event.KEY_RETURN) {
|
||||
preventDefault(event);
|
||||
if (this.confirmedValue)
|
||||
this.value = this.confirmedValue;
|
||||
else
|
||||
this.writeAttribute("uid", null);
|
||||
if (document.currentPopupMenu)
|
||||
hideMenu(document.currentPopupMenu);
|
||||
this.selectedIndex = -1;
|
||||
if (this.readAttribute("container")) {
|
||||
this.confirmedValue = null;
|
||||
this.fire("autocompletion:changedlist", this.readAttribute("container"));
|
||||
}
|
||||
else
|
||||
this.fire("autocompletion:changed", event.keyCode);
|
||||
}
|
||||
else if (this.menu.getStyle('visibility') == 'visible') {
|
||||
if (event.keyCode == Event.KEY_UP) { // Up arrow
|
||||
if (this.selectedIndex > 0) {
|
||||
var contacts = this.menu.select("li");
|
||||
contacts[this.selectedIndex--].removeClassName("selected");
|
||||
this.value = contacts[this.selectedIndex].readAttribute("address");
|
||||
this.confirmedValue = this.value;
|
||||
this.writeAttribute("uid", contacts[this.selectedIndex].readAttribute("uid"));
|
||||
contacts[this.selectedIndex].addClassName("selected");
|
||||
var container = contacts[this.selectedIndex].readAttribute("container");
|
||||
if (container)
|
||||
this.writeAttribute("container", container);
|
||||
}
|
||||
}
|
||||
else if (event.keyCode == Event.KEY_DOWN) { // Down arrow
|
||||
var contacts = this.menu.select("li");
|
||||
if (contacts.size() - 1 > this.selectedIndex) {
|
||||
if (this.selectedIndex >= 0)
|
||||
contacts[this.selectedIndex].removeClassName("selected");
|
||||
this.selectedIndex++;
|
||||
this.value = contacts[this.selectedIndex].readAttribute("address");
|
||||
this.confirmedValue = this.value;
|
||||
this.writeAttribute("uid", contacts[this.selectedIndex].readAttribute("uid"));
|
||||
contacts[this.selectedIndex].addClassName("selected");
|
||||
var container = contacts[this.selectedIndex].readAttribute("container");
|
||||
if (container)
|
||||
this.writeAttribute("container", container);
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
onBlur: function (event) {
|
||||
if (this.delayedSearch)
|
||||
window.clearTimeout(this.delayedSearch);
|
||||
if (this.confirmedValue) {
|
||||
this.value = this.confirmedValue;
|
||||
if (this.readAttribute("container"))
|
||||
this.fire("autocompletion:changedlist", this.readAttribute("container"));
|
||||
else
|
||||
this.fire("autocompletion:changed", event.keyCode);
|
||||
}
|
||||
else
|
||||
this.writeAttribute("uid", null);
|
||||
},
|
||||
|
||||
performSearch: function (input) {
|
||||
// Perform address completion
|
||||
if (document.contactLookupAjaxRequest) {
|
||||
// Abort any pending request
|
||||
document.contactLookupAjaxRequest.aborted = true;
|
||||
document.contactLookupAjaxRequest.abort();
|
||||
}
|
||||
if (input.value.trim().length > minimumSearchLength) {
|
||||
var urlstr = UserFolderURL + "Contacts/";
|
||||
if (input.addressBook)
|
||||
urlstr += input.addressBook + "/contact";
|
||||
else
|
||||
urlstr += "allContact";
|
||||
urlstr += "Search?search=" + encodeURIComponent(input.value);
|
||||
if (input.excludeGroups)
|
||||
urlstr += "&excludeGroups=1";
|
||||
if (input.excludeLists)
|
||||
urlstr += "&excludeLists=1";
|
||||
if (input.animationParent)
|
||||
startAnimation(input.animationParent);
|
||||
document.contactLookupAjaxRequest =
|
||||
triggerAjaxRequest(urlstr, input.performSearchCallback.bind(input), input);
|
||||
}
|
||||
else {
|
||||
if (document.currentPopupMenu)
|
||||
hideMenu(document.currentPopupMenu);
|
||||
}
|
||||
},
|
||||
|
||||
performSearchCallback: function (http) {
|
||||
if (http.readyState == 4) {
|
||||
var list = this.menu.down("ul");
|
||||
|
||||
var input = http.callbackData;
|
||||
|
||||
if (http.status == 200) {
|
||||
var start = input.value.length;
|
||||
var data = http.responseText.evalJSON(true);
|
||||
|
||||
if (data.contacts.length > 1) {
|
||||
list.select("li").each(function(item) {
|
||||
item.stopObserving("mousedown");
|
||||
item.remove();
|
||||
});
|
||||
|
||||
// Populate popup menu
|
||||
for (var i = 0; i < data.contacts.length; i++) {
|
||||
var contact = data.contacts[i];
|
||||
var completeEmail = contact["c_cn"];
|
||||
var uid = "" + contact[this.uidField];
|
||||
var c_name = "" + contact['c_name'];
|
||||
if (contact["c_mail"])
|
||||
completeEmail += " <" + contact["c_mail"] + ">";
|
||||
var node = new Element('li', { 'address': completeEmail,
|
||||
'uid': uid });
|
||||
var matchPosition = completeEmail.toLowerCase().indexOf(data.searchText.toLowerCase());
|
||||
if (matchPosition > -1) {
|
||||
var matchBefore = completeEmail.substring(0, matchPosition);
|
||||
var matchText = completeEmail.substring(matchPosition, matchPosition + data.searchText.length);
|
||||
var matchAfter = completeEmail.substring(matchPosition + data.searchText.length);
|
||||
node.appendChild(document.createTextNode(matchBefore));
|
||||
node.appendChild(new Element('strong').update(matchText));
|
||||
node.appendChild(document.createTextNode(matchAfter));
|
||||
}
|
||||
else {
|
||||
node.appendChild(document.createTextNode(completeEmail));
|
||||
}
|
||||
list.appendChild(node);
|
||||
if (c_name.endsWith(".vlf")) {
|
||||
// Keep track of list containers
|
||||
node.writeAttribute("container", contact['container']);
|
||||
}
|
||||
if (contact["contactInfo"])
|
||||
node.appendChild(document.createTextNode(" (" + contact["contactInfo"] + ")"));
|
||||
$(node).observe("mousedown", this.onAddressResultClick.bindAsEventListener(this));
|
||||
}
|
||||
|
||||
// Show popup menu
|
||||
var offsetScroll = Element.cumulativeScrollOffset(input);
|
||||
var offset = Element.positionedOffset(input);
|
||||
if ($(document.body).hasClassName("popup") && typeof initPopupMailer == 'undefined')
|
||||
// Hack for some situations where the offset must be computed differently
|
||||
offset = Element.cumulativeOffset(input);
|
||||
var top = offset.top - offsetScroll.top + node.offsetHeight + 3;
|
||||
var height = 'auto';
|
||||
var heightDiff = window.height() - offset[1];
|
||||
var nodeHeight = node.getHeight();
|
||||
|
||||
if ((data.contacts.length * nodeHeight) > heightDiff)
|
||||
// Limit the size of the popup to the window height, minus 12 pixels
|
||||
height = parseInt(heightDiff/nodeHeight) * nodeHeight - 12 + 'px';
|
||||
|
||||
this.menu.setStyle({ top: top + "px",
|
||||
left: offset[0] + "px",
|
||||
height: height,
|
||||
maxWidth: (window.width() - offset[0] - 12) + "px",
|
||||
visibility: "visible" });
|
||||
this.menu.scrollTop = 0;
|
||||
|
||||
document.currentPopupMenu = this.menu;
|
||||
$(document.body).stopObserving("click");
|
||||
$(document.body).observe("click", onBodyClickMenuHandler);
|
||||
}
|
||||
else {
|
||||
if (document.currentPopupMenu)
|
||||
hideMenu(document.currentPopupMenu);
|
||||
|
||||
if (data.contacts.length == 1) {
|
||||
// Single result
|
||||
var contact = data.contacts[0];
|
||||
var uid = "" + contact[this.uidField];
|
||||
var c_name = "" + contact['c_name'];
|
||||
input.writeAttribute("uid", uid);
|
||||
if (c_name.endsWith(".vlf")) {
|
||||
this.writeAttribute("container", contact['container']);
|
||||
}
|
||||
var completeEmail = contact["c_cn"];
|
||||
if (contact["c_mail"])
|
||||
completeEmail += " <" + contact["c_mail"] + ">";
|
||||
if (contact["c_cn"].substring(0, input.value.length).toUpperCase()
|
||||
== input.value.toUpperCase())
|
||||
input.value = completeEmail;
|
||||
else
|
||||
// The result matches email address, not user name
|
||||
input.value += ' >> ' + completeEmail;
|
||||
input.confirmedValue = completeEmail;
|
||||
|
||||
var end = input.value.length;
|
||||
$(input).selectText(start, end);
|
||||
|
||||
this.selectedIndex = -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
if (document.currentPopupMenu)
|
||||
hideMenu(document.currentPopupMenu);
|
||||
document.contactLookupAjaxRequest = null;
|
||||
}
|
||||
},
|
||||
|
||||
onAddressResultClick: function(event) {
|
||||
var e = Event.element(event);
|
||||
if (e.tagName != 'LI')
|
||||
e = e.up('LI');
|
||||
if (e) {
|
||||
preventDefault(event);
|
||||
this.value = e.readAttribute("address");
|
||||
this.writeAttribute("uid", e.readAttribute("uid"));
|
||||
if (e.readAttribute("container"))
|
||||
this.fire("autocompletion:changedlist", e.readAttribute("container"));
|
||||
else {
|
||||
this.confirmedValue = this.value;
|
||||
this.fire("autocompletion:changed", Event.KEY_RETURN);
|
||||
}
|
||||
}
|
||||
|
||||
// Attributes that could be changed from the object
|
||||
// inheriting the inteface
|
||||
uidField: "c_name",
|
||||
addressBook: null,
|
||||
SOGoUsersSearch: false,
|
||||
excludeGroups: false,
|
||||
excludeLists: false,
|
||||
|
||||
// Internal attributes
|
||||
animationParent: null,
|
||||
selectedIndex: -1,
|
||||
delay: 0.750,
|
||||
delayedSearch: false,
|
||||
menu: null,
|
||||
|
||||
bind: function () {
|
||||
this.menu = $('contactsMenu');
|
||||
this.writeAttribute("autocomplete", "off");
|
||||
this.writeAttribute("container", null);
|
||||
this.confirmedValue = null;
|
||||
this.observe("keydown", this.onKeydown.bindAsEventListener(this));
|
||||
this.observe("blur", this.onBlur.bindAsEventListener(this));
|
||||
},
|
||||
|
||||
onKeydown: function (event) {
|
||||
if (event.ctrlKey || event.metaKey) {
|
||||
this.focussed = true;
|
||||
return;
|
||||
}
|
||||
if (event.keyCode == Event.KEY_TAB) {
|
||||
if (this.confirmedValue)
|
||||
this.value = this.confirmedValue;
|
||||
else
|
||||
this.writeAttribute("uid", null);
|
||||
if (document.currentPopupMenu)
|
||||
hideMenu(document.currentPopupMenu);
|
||||
}
|
||||
else if (event.keyCode == 0
|
||||
|| event.keyCode == Event.KEY_BACKSPACE
|
||||
|| event.keyCode == Event.KEY_DELETE
|
||||
|| event.keyCode == 32 // Space
|
||||
|| event.keyCode > 47) {
|
||||
this.confirmedValue = null;
|
||||
this.selectedIndex = -1;
|
||||
if (this.delayedSearch)
|
||||
window.clearTimeout(this.delayedSearch);
|
||||
this.delayedSearch = this.performSearch.delay(this.delay, this);
|
||||
}
|
||||
else if (event.keyCode == Event.KEY_RETURN) {
|
||||
preventDefault(event);
|
||||
if (this.confirmedValue)
|
||||
this.value = this.confirmedValue;
|
||||
else
|
||||
this.writeAttribute("uid", null);
|
||||
if (document.currentPopupMenu)
|
||||
hideMenu(document.currentPopupMenu);
|
||||
this.selectedIndex = -1;
|
||||
if (this.readAttribute("container")) {
|
||||
this.confirmedValue = null;
|
||||
this.fire("autocompletion:changedlist", this.readAttribute("container"));
|
||||
}
|
||||
else
|
||||
this.fire("autocompletion:changed", event.keyCode);
|
||||
}
|
||||
else if (this.menu.getStyle('visibility') == 'visible') {
|
||||
if (event.keyCode == Event.KEY_UP) { // Up arrow
|
||||
if (this.selectedIndex > 0) {
|
||||
var contacts = this.menu.select("li");
|
||||
contacts[this.selectedIndex--].removeClassName("selected");
|
||||
this.value = contacts[this.selectedIndex].readAttribute("address");
|
||||
this.confirmedValue = this.value;
|
||||
this.writeAttribute("uid", contacts[this.selectedIndex].readAttribute("uid"));
|
||||
contacts[this.selectedIndex].addClassName("selected");
|
||||
var container = contacts[this.selectedIndex].readAttribute("container");
|
||||
if (container)
|
||||
this.writeAttribute("container", container);
|
||||
}
|
||||
}
|
||||
else if (event.keyCode == Event.KEY_DOWN) { // Down arrow
|
||||
var contacts = this.menu.select("li");
|
||||
if (contacts.size() - 1 > this.selectedIndex) {
|
||||
if (this.selectedIndex >= 0)
|
||||
contacts[this.selectedIndex].removeClassName("selected");
|
||||
this.selectedIndex++;
|
||||
this.value = contacts[this.selectedIndex].readAttribute("address");
|
||||
this.confirmedValue = this.value;
|
||||
this.writeAttribute("uid", contacts[this.selectedIndex].readAttribute("uid"));
|
||||
contacts[this.selectedIndex].addClassName("selected");
|
||||
var container = contacts[this.selectedIndex].readAttribute("container");
|
||||
if (container)
|
||||
this.writeAttribute("container", container);
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
onBlur: function (event) {
|
||||
if (this.delayedSearch)
|
||||
window.clearTimeout(this.delayedSearch);
|
||||
if (this.confirmedValue) {
|
||||
this.value = this.confirmedValue;
|
||||
if (this.readAttribute("container"))
|
||||
this.fire("autocompletion:changedlist", this.readAttribute("container"));
|
||||
else
|
||||
this.fire("autocompletion:changed", event.keyCode);
|
||||
}
|
||||
else
|
||||
this.writeAttribute("uid", null);
|
||||
},
|
||||
|
||||
performSearch: function (input) {
|
||||
// Perform address completion
|
||||
if (document.contactLookupAjaxRequest) {
|
||||
// Abort any pending request
|
||||
document.contactLookupAjaxRequest.aborted = true;
|
||||
document.contactLookupAjaxRequest.abort();
|
||||
}
|
||||
if (input.value.trim().length > minimumSearchLength) {
|
||||
if (input.SOGoUsersSearch) {
|
||||
var urlstr = UserFolderURL + "usersSearch?search=" + encodeURIComponent(input.value);
|
||||
document.contactLookupAjaxRequest =
|
||||
triggerAjaxRequest(urlstr, input.performUsersSearchCallback.bind(input), input);
|
||||
}
|
||||
else {
|
||||
var urlstr = UserFolderURL + "Contacts/";
|
||||
if (input.addressBook)
|
||||
urlstr += input.addressBook + "/contact";
|
||||
else
|
||||
urlstr += "allContact";
|
||||
urlstr += "Search?search=" + encodeURIComponent(input.value);
|
||||
if (input.excludeGroups)
|
||||
urlstr += "&excludeGroups=1";
|
||||
if (input.excludeLists)
|
||||
urlstr += "&excludeLists=1";
|
||||
if (input.animationParent)
|
||||
startAnimation(input.animationParent);
|
||||
document.contactLookupAjaxRequest =
|
||||
triggerAjaxRequest(urlstr, input.performSearchCallback.bind(input), input);
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (document.currentPopupMenu)
|
||||
hideMenu(document.currentPopupMenu);
|
||||
}
|
||||
},
|
||||
|
||||
performSearchCallback: function (http) {
|
||||
if (http.readyState == 4) {
|
||||
var list = this.menu.down("ul");
|
||||
|
||||
var input = http.callbackData;
|
||||
|
||||
if (http.status == 200) {
|
||||
var start = input.value.length;
|
||||
var data = http.responseText.evalJSON(true);
|
||||
|
||||
if (data.contacts.length > 1) {
|
||||
list.select("li").each(function(item) {
|
||||
item.stopObserving("mousedown");
|
||||
item.remove();
|
||||
});
|
||||
|
||||
// Populate popup menu
|
||||
for (var i = 0; i < data.contacts.length; i++) {
|
||||
var contact = data.contacts[i];
|
||||
var completeEmail = contact["c_cn"];
|
||||
var uid = "" + contact[this.uidField];
|
||||
var c_name = "" + contact['c_name'];
|
||||
if (contact["c_mail"])
|
||||
completeEmail += " <" + contact["c_mail"] + ">";
|
||||
var node = new Element('li', { 'address': completeEmail,
|
||||
'uid': uid });
|
||||
var matchPosition = completeEmail.toLowerCase().indexOf(data.searchText.toLowerCase());
|
||||
if (matchPosition > -1) {
|
||||
var matchBefore = completeEmail.substring(0, matchPosition);
|
||||
var matchText = completeEmail.substring(matchPosition, matchPosition + data.searchText.length);
|
||||
var matchAfter = completeEmail.substring(matchPosition + data.searchText.length);
|
||||
node.appendChild(document.createTextNode(matchBefore));
|
||||
node.appendChild(new Element('strong').update(matchText));
|
||||
node.appendChild(document.createTextNode(matchAfter));
|
||||
}
|
||||
else {
|
||||
node.appendChild(document.createTextNode(completeEmail));
|
||||
}
|
||||
list.appendChild(node);
|
||||
if (c_name.endsWith(".vlf")) {
|
||||
// Keep track of list containers
|
||||
node.writeAttribute("container", contact['container']);
|
||||
}
|
||||
if (contact["contactInfo"])
|
||||
node.appendChild(document.createTextNode(" (" + contact["contactInfo"] + ")"));
|
||||
$(node).observe("mousedown", this.onAddressResultClick.bindAsEventListener(this));
|
||||
}
|
||||
|
||||
// Show popup menu
|
||||
var offsetScroll = Element.cumulativeScrollOffset(input);
|
||||
var offset = Element.positionedOffset(input);
|
||||
if ($(document.body).hasClassName("popup") && typeof initPopupMailer == 'undefined')
|
||||
// Hack for some situations where the offset must be computed differently
|
||||
offset = Element.cumulativeOffset(input);
|
||||
var top = offset.top - offsetScroll.top + node.offsetHeight + 3;
|
||||
var height = 'auto';
|
||||
var heightDiff = window.height() - offset[1];
|
||||
var nodeHeight = node.getHeight();
|
||||
|
||||
if ((data.contacts.length * nodeHeight) > heightDiff)
|
||||
// Limit the size of the popup to the window height, minus 12 pixels
|
||||
height = parseInt(heightDiff/nodeHeight) * nodeHeight - 12 + 'px';
|
||||
|
||||
this.menu.setStyle({ top: top + "px",
|
||||
left: offset[0] + "px",
|
||||
height: height,
|
||||
maxWidth: (window.width() - offset[0] - 12) + "px",
|
||||
visibility: "visible" });
|
||||
this.menu.scrollTop = 0;
|
||||
|
||||
document.currentPopupMenu = this.menu;
|
||||
$(document.body).stopObserving("click");
|
||||
$(document.body).observe("click", onBodyClickMenuHandler);
|
||||
}
|
||||
else {
|
||||
if (document.currentPopupMenu)
|
||||
hideMenu(document.currentPopupMenu);
|
||||
|
||||
if (data.contacts.length == 1) {
|
||||
// Single result
|
||||
var contact = data.contacts[0];
|
||||
var uid = "" + contact[this.uidField];
|
||||
var c_name = "" + contact['c_name'];
|
||||
input.writeAttribute("uid", uid);
|
||||
if (c_name.endsWith(".vlf")) {
|
||||
this.writeAttribute("container", contact['container']);
|
||||
}
|
||||
var completeEmail = contact["c_cn"];
|
||||
if (contact["c_mail"])
|
||||
completeEmail += " <" + contact["c_mail"] + ">";
|
||||
if (contact["c_cn"].substring(0, input.value.length).toUpperCase()
|
||||
== input.value.toUpperCase())
|
||||
input.value = completeEmail;
|
||||
else
|
||||
// The result matches email address, not user name
|
||||
input.value += ' >> ' + completeEmail;
|
||||
input.confirmedValue = completeEmail;
|
||||
|
||||
var end = input.value.length;
|
||||
$(input).selectText(start, end);
|
||||
|
||||
this.selectedIndex = -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
if (document.currentPopupMenu)
|
||||
hideMenu(document.currentPopupMenu);
|
||||
document.contactLookupAjaxRequest = null;
|
||||
}
|
||||
},
|
||||
|
||||
performUsersSearchCallback: function (http) {
|
||||
if (http.readyState == 4) {
|
||||
var list = this.menu.down("ul");
|
||||
var input = http.callbackData;
|
||||
if (http.status == 200) {
|
||||
var response = http.responseText.evalJSON();
|
||||
|
||||
if (response.length > 1) {
|
||||
list.select("li").each(function(item) {
|
||||
item.stopObserving("mousedown");
|
||||
item.remove();
|
||||
});
|
||||
|
||||
// Populate popup menu
|
||||
for (var i = 0; i < response.length; i++) {
|
||||
var c_name = response[i][1];
|
||||
var completeEmail = c_name;
|
||||
var c_mail = response[i][2];
|
||||
var uid = response[i][3];
|
||||
if (c_mail)
|
||||
completeEmail += " <" + c_mail + ">";
|
||||
var node = new Element('li', { 'address': completeEmail,
|
||||
'uid': uid });
|
||||
var matchPosition = completeEmail.toLowerCase().indexOf(input.getValue().toLowerCase());
|
||||
if (matchPosition > -1) {
|
||||
var matchBefore = completeEmail.substring(0, matchPosition);
|
||||
var matchText = completeEmail.substring(matchPosition, matchPosition + input.getValue().length);
|
||||
var matchAfter = completeEmail.substring(matchPosition + input.getValue().length);
|
||||
node.appendChild(document.createTextNode(matchBefore));
|
||||
node.appendChild(new Element('strong').update(matchText));
|
||||
node.appendChild(document.createTextNode(matchAfter));
|
||||
}
|
||||
else {
|
||||
node.appendChild(document.createTextNode(completeEmail));
|
||||
}
|
||||
list.appendChild(node);
|
||||
$(node).observe("mousedown", this.onAddressResultClick.bindAsEventListener(this));
|
||||
}
|
||||
|
||||
// Show popup menu
|
||||
var offsetScroll = Element.cumulativeScrollOffset(input);
|
||||
var offset = Element.positionedOffset(input);
|
||||
if ($(document.body).hasClassName("popup") && typeof initPopupMailer == 'undefined')
|
||||
// Hack for some situations where the offset must be computed differently
|
||||
offset = Element.cumulativeOffset(input);
|
||||
var top = offset.top - offsetScroll.top + node.offsetHeight + 3;
|
||||
var height = 'auto';
|
||||
var heightDiff = window.height() - offset[1];
|
||||
var nodeHeight = node.getHeight();
|
||||
|
||||
if ((response.length * nodeHeight) > heightDiff)
|
||||
// Limit the size of the popup to the window height, minus 12 pixels
|
||||
height = parseInt(heightDiff/nodeHeight) * nodeHeight - 12 + 'px';
|
||||
|
||||
this.menu.setStyle({ top: top + "px",
|
||||
left: offset[0] + "px",
|
||||
height: height,
|
||||
maxWidth: (window.width() - offset[0] - 12) + "px",
|
||||
visibility: "visible" });
|
||||
this.menu.scrollTop = 0;
|
||||
|
||||
document.currentPopupMenu = this.menu;
|
||||
$(document.body).stopObserving("click");
|
||||
$(document.body).observe("click", onBodyClickMenuHandler);
|
||||
}
|
||||
else {
|
||||
if (document.currentPopupMenu)
|
||||
hideMenu(document.currentPopupMenu);
|
||||
|
||||
if (response.length == 1) {
|
||||
// Single result
|
||||
var c_name = response[0][1];
|
||||
var completeEmail = c_name;
|
||||
var c_mail = response[0][2];
|
||||
var c_uid = response[0][0];
|
||||
input.writeAttribute("uid", c_uid);
|
||||
if (c_mail)
|
||||
completeEmail += " <" + c_mail + ">";
|
||||
if (c_uid.substring(0, input.getValue().length).toUpperCase() == input.getValue().toUpperCase())
|
||||
input.value = completeEmail;
|
||||
else
|
||||
// The result matches email address, not user name
|
||||
input.value += ' >> ' + completeEmail;
|
||||
input.confirmedValue = completeEmail;
|
||||
|
||||
var end = input.getValue().length;
|
||||
$(input).selectText(start, end);
|
||||
|
||||
this.selectedIndex = -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
if (document.currentPopupMenu)
|
||||
hideMenu(document.currentPopupMenu);
|
||||
document.contactLookupAjaxRequest = null;
|
||||
}
|
||||
},
|
||||
|
||||
onAddressResultClick: function(event) {
|
||||
var e = Event.element(event);
|
||||
if (e.tagName != 'LI')
|
||||
e = e.up('LI');
|
||||
if (e) {
|
||||
preventDefault(event);
|
||||
this.value = e.readAttribute("address");
|
||||
this.writeAttribute("uid", e.readAttribute("uid"));
|
||||
if (e.readAttribute("container"))
|
||||
this.fire("autocompletion:changedlist", e.readAttribute("container"));
|
||||
else {
|
||||
this.confirmedValue = this.value;
|
||||
this.fire("autocompletion:changed", Event.KEY_RETURN);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -48,6 +48,9 @@ UL#calendarList LI
|
||||
line-height: 2em;
|
||||
padding-left: 10px; }
|
||||
|
||||
#calendarList .badge
|
||||
{ margin-left: 4px; }
|
||||
|
||||
#tasksList .duelater,
|
||||
#tasksList .duetoday,
|
||||
#tasksList .overdue
|
||||
@@ -397,7 +400,7 @@ DIV#daysView
|
||||
border-top: 1px solid #ccc;
|
||||
overflow: auto;
|
||||
overflow-x: hidden;
|
||||
right: 0px;}
|
||||
right: 0px; }
|
||||
|
||||
DIV#calendarHeader
|
||||
{ top: 25px;
|
||||
@@ -420,9 +423,10 @@ DIV#calendarHeader DIV.calendarLabels
|
||||
height: 20px;
|
||||
border-left: 1px solid #ccc;
|
||||
text-align: center;
|
||||
font-style:italic;
|
||||
font-size:150%;
|
||||
}
|
||||
.calendarsToDisplay
|
||||
{ border-top: 2px solid #fff; }
|
||||
DIV#calendarHeader DIV.dayLabels
|
||||
{ top: 32px;
|
||||
height: 35px; }
|
||||
@@ -1296,12 +1300,11 @@ DIV.event > DIV.eventInside
|
||||
overflow: hidden;
|
||||
top: 0px;
|
||||
bottom: 0px;
|
||||
left: 0px;
|
||||
right: 0px;
|
||||
-webkit-border-radius: 2px;
|
||||
border-radius: 2px; }
|
||||
|
||||
DIV.eventInside {
|
||||
width:100%;
|
||||
}
|
||||
border-radius: 2px;
|
||||
cursor:move; }
|
||||
|
||||
DIV.eventInside SPAN.location
|
||||
{ font-size: smaller; }
|
||||
@@ -1439,7 +1442,8 @@ DIV.event.draggable:hover DIV.rightDragGrip
|
||||
#daysView DIV.eventDragGhost > DIV.eventInside
|
||||
{ padding: 0px;
|
||||
border-left: 1px solid #555;
|
||||
border-right: 1px solid #555; }
|
||||
border-right: 1px solid #555;
|
||||
}
|
||||
|
||||
#daysView DIV.eventDragGhost.startGhost > DIV.eventInside
|
||||
{ border-top: 1px solid #555; }
|
||||
@@ -1533,6 +1537,29 @@ DIV#calendarContent .alert-box span {
|
||||
border:1px solid #8ed9f6;
|
||||
}
|
||||
|
||||
DIV#DnDVisualEvents
|
||||
{ background-image: url(event7.png); }
|
||||
|
||||
DIV#DnDVisualTasks
|
||||
{ background-image: url(task.png); }
|
||||
|
||||
DIV#DnDVisualEvents, DIV#DnDVisualTasks
|
||||
{
|
||||
background-repeat: no-repeat;
|
||||
background-position: 4px 2px;
|
||||
width: 5px;
|
||||
height: 20px;
|
||||
padding-left: 24px;
|
||||
padding-top: 5px;
|
||||
}
|
||||
|
||||
#DnDLeftPanelImage
|
||||
{
|
||||
position:absolute;
|
||||
z-index:1;
|
||||
left:0;
|
||||
top:0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -8,6 +8,7 @@ var SOGoEventDragDayLength = 24 * 4; /* quarters */
|
||||
var SOGoEventDragHandleSize = 8; /* handles for dragging mode */
|
||||
var SOGoEventDragHorizontalOffset = 3;
|
||||
var SOGoEventDragVerticalOffset = 3;
|
||||
var calendarID = [], activeCalendars = [];
|
||||
|
||||
/* singleton */
|
||||
var _sogoEventDragUtilities = null;
|
||||
@@ -218,10 +219,7 @@ SOGoEventDragEventCoordinates.prototype = {
|
||||
|
||||
initFromEventCellMultiDay: function(eventCell) {
|
||||
var classNames = eventCell.className.split(" ");
|
||||
for (var i = 0;
|
||||
(this.start == -1 || this.duration == -1)
|
||||
&& i < classNames.length;
|
||||
i++) {
|
||||
for (var i = 0; (this.start == -1 || this.duration == -1) && i < classNames.length; i++) {
|
||||
var className = classNames[i];
|
||||
if (className.startsWith("starts")) {
|
||||
this.start = parseInt(className.substr(6));
|
||||
@@ -231,12 +229,19 @@ SOGoEventDragEventCoordinates.prototype = {
|
||||
}
|
||||
}
|
||||
var dayNumber = -1;
|
||||
|
||||
var dayNode = eventCell.parentNode.parentNode;
|
||||
var classNames = dayNode.className.split(" ");
|
||||
for (var i = 0; dayNumber == -1 && i < classNames.length; i++) {
|
||||
var className = classNames[i];
|
||||
if (className.startsWith("day") && className.length > 3) {
|
||||
dayNumber = parseInt(className.substr(3));
|
||||
if (currentView == "multicolumndayview") {
|
||||
calendarID[0] = dayNode.getAttribute("calendar");
|
||||
var dayNumber = this._updateMulticolumnViewDayNumber(calendarID);
|
||||
}
|
||||
else {
|
||||
var classNames = dayNode.className.split(" ");
|
||||
for (var i = 0; dayNumber == -1 && i < classNames.length; i++) {
|
||||
var className = classNames[i];
|
||||
if (className.startsWith("day") && className.length > 3) {
|
||||
dayNumber = parseInt(className.substr(3));
|
||||
}
|
||||
}
|
||||
}
|
||||
this.dayNumber = dayNumber;
|
||||
@@ -244,14 +249,20 @@ SOGoEventDragEventCoordinates.prototype = {
|
||||
initFromEventCellMultiDayAllDay: function(eventCell) {
|
||||
this.start = 0;
|
||||
this.duration = SOGoEventDragDayLength;
|
||||
|
||||
|
||||
var dayNode = eventCell.parentNode;
|
||||
var classNames = dayNode.className.split(" ");
|
||||
var dayNumber = -1;
|
||||
for (var i = 0; dayNumber == -1 && i < classNames.length; i++) {
|
||||
var className = classNames[i];
|
||||
if (className.startsWith("day") && className.length > 3) {
|
||||
dayNumber = parseInt(className.substr(3));
|
||||
if (currentView == "multicolumndayview") {
|
||||
calendarID[0] = dayNode.getAttribute("calendar");
|
||||
var dayNumber = this._updateMulticolumnViewDayNumber(calendarID);
|
||||
}
|
||||
else {
|
||||
var classNames = dayNode.className.split(" ");
|
||||
var dayNumber = -1;
|
||||
for (var i = 0; dayNumber == -1 && i < classNames.length; i++) {
|
||||
var className = classNames[i];
|
||||
if (className.startsWith("day") && className.length > 3) {
|
||||
dayNumber = parseInt(className.substr(3));
|
||||
}
|
||||
}
|
||||
}
|
||||
this.dayNumber = dayNumber;
|
||||
@@ -294,8 +305,8 @@ SOGoEventDragEventCoordinates.prototype = {
|
||||
current.setEventType(this.eventType);
|
||||
current.initFromEventCell(eventCells[i]);
|
||||
if (this.dayNumber == -1 || current.dayNumber < this.dayNumber) {
|
||||
this.dayNumber = current.dayNumber;
|
||||
this.start = current.start;
|
||||
this.dayNumber = current.dayNumber;
|
||||
this.start = current.start;
|
||||
}
|
||||
this.duration += current.duration;
|
||||
}
|
||||
@@ -321,6 +332,19 @@ SOGoEventDragEventCoordinates.prototype = {
|
||||
|
||||
return "" + hours + ":" + mins;
|
||||
},
|
||||
|
||||
_updateMulticolumnViewDayNumber: function(calendarID) {
|
||||
var calendarList = $("calendarList").getElementsByTagName("li");
|
||||
for (var j = 0; j < calendarList.length ; j++) {
|
||||
if ($("calendarList").getElementsByTagName("li")[j].down().checked)
|
||||
activeCalendars.push($("calendarList").getElementsByTagName("li")[j].getAttribute("id").substr(1));
|
||||
}
|
||||
for (var k = 0; k < activeCalendars.length; k++) {
|
||||
if (activeCalendars[k] == calendarID[0]) {
|
||||
return k;
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
getStartTime: function() {
|
||||
return this._quartersToHM(this.start);
|
||||
@@ -504,8 +528,7 @@ SOGoEventDragGhostController.prototype = {
|
||||
this.currentPointerCoordinates = newCoordinates;
|
||||
if (this.originalPointerCoordinates) {
|
||||
if (!newCoordinates)
|
||||
this.currentPointerCoordinates
|
||||
= this.originalPointerCoordinates.clone();
|
||||
this.currentPointerCoordinates = this.originalPointerCoordinates.clone();
|
||||
this._updateCoordinates();
|
||||
if (this.ghosts) {
|
||||
this._updateGhosts();
|
||||
@@ -515,12 +538,31 @@ SOGoEventDragGhostController.prototype = {
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
_updateMulticolumnViewDayNumber_SEDGC: function() {
|
||||
var calendarID_SEDGC = this.folderClass.substr(14);
|
||||
var calendarList = $("calendarList").getElementsByTagName("li");
|
||||
activeCalendars = [];
|
||||
for (var j = 0; j < calendarList.length ; j++) {
|
||||
if ($("calendarList").getElementsByTagName("li")[j].down().checked)
|
||||
activeCalendars.push($("calendarList").getElementsByTagName("li")[j].getAttribute("id").substr(1));
|
||||
}
|
||||
for (var k = 0; k < activeCalendars.length; k++) {
|
||||
if (activeCalendars[k] == calendarID_SEDGC) {
|
||||
this.currentCoordinates.dayNumber = k;
|
||||
break;
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
_updateCoordinates: function SEDGC__updateCoordinates() {
|
||||
var delta = this.currentPointerCoordinates
|
||||
.getDelta(this.originalPointerCoordinates);
|
||||
var deltaQuarters = delta.x * SOGoEventDragDayLength + delta.y;
|
||||
this.currentCoordinates.dayNumber = this.originalCoordinates.dayNumber;
|
||||
if (currentView == "multicolumndayview")
|
||||
this._updateMulticolumnViewDayNumber_SEDGC();
|
||||
else
|
||||
this.currentCoordinates.dayNumber = this.originalCoordinates.dayNumber;
|
||||
|
||||
// log("dragMode: " + this.dragMode);
|
||||
if (this.dragMode == "move-event") {
|
||||
@@ -565,6 +607,10 @@ SOGoEventDragGhostController.prototype = {
|
||||
var deltaDays = Math.floor(this.currentCoordinates.start
|
||||
/ SOGoEventDragDayLength);
|
||||
this.currentCoordinates.start -= deltaDays * SOGoEventDragDayLength;
|
||||
|
||||
// This dayNumber needs to be updated with the calendar number.
|
||||
if (currentView == "multicolumndayview")
|
||||
this._updateMulticolumnViewDayNumber_SEDGC();
|
||||
this.currentCoordinates.dayNumber += deltaDays;
|
||||
}
|
||||
},
|
||||
@@ -925,6 +971,45 @@ SOGoScrollController.prototype = {
|
||||
}
|
||||
};
|
||||
|
||||
function SOGoEventDragLeftPanelController() {
|
||||
}
|
||||
|
||||
SOGoEventDragLeftPanelController.prototype = {
|
||||
updateLeftPanelVisual : null,
|
||||
dropCalendar : null,
|
||||
DnDLeftPanelImage : $("DnDLeftPanelImage"),
|
||||
|
||||
setLeftPanelVisual: function SEDLPC_setLeftPanelVisual() {
|
||||
var that = this;
|
||||
this.updateLeftPanelVisual = $("leftPanel").on("mousemove", function(e){
|
||||
that.DnDLeftPanelImage.style.left = e.pageX + "px";
|
||||
that.DnDLeftPanelImage.style.top = e.pageY + "px";
|
||||
});
|
||||
this.updateLeftPanelVisual.stop();
|
||||
},
|
||||
|
||||
updateFromPointerHandler: function SEDLPC_updateFromPointerHandler(event) {
|
||||
// Highlight the calendar hover
|
||||
$$('#calendarList li').each(function(e) {
|
||||
e.removeClassName('genericHoverClass');
|
||||
});
|
||||
var hoverCalendar = $(event).findElement('#calendarList li');
|
||||
if (hoverCalendar)
|
||||
hoverCalendar.addClassName('genericHoverClass');
|
||||
this.dropCalendar = hoverCalendar;
|
||||
},
|
||||
|
||||
startEvent: function SEDLPC_startEvent() {
|
||||
this.DnDLeftPanelImage.style.visibility = 'visible';
|
||||
this.updateLeftPanelVisual.start();
|
||||
},
|
||||
|
||||
stopEvent: function SEDLPC_stopEvent() {
|
||||
this.DnDLeftPanelImage.style.visibility = 'hidden';
|
||||
this.updateLeftPanelVisual.stop();
|
||||
}
|
||||
}
|
||||
|
||||
function SOGoEventDragController() {
|
||||
}
|
||||
|
||||
@@ -939,6 +1024,7 @@ SOGoEventDragController.prototype = {
|
||||
draggingModeAreas: null,
|
||||
|
||||
ghostController: null,
|
||||
leftPanelController: null,
|
||||
|
||||
hasSelected: false,
|
||||
dragHasStarted: false,
|
||||
@@ -959,6 +1045,7 @@ SOGoEventDragController.prototype = {
|
||||
this.eventCells = eventCells;
|
||||
|
||||
this.ghostController = new SOGoEventDragGhostController();
|
||||
this.leftPanelController = new SOGoEventDragLeftPanelController();
|
||||
this._determineEventInvitation(eventCells[0]);
|
||||
this._determineEventType(eventCells[0]);
|
||||
this._prepareEventType();
|
||||
@@ -966,6 +1053,7 @@ SOGoEventDragController.prototype = {
|
||||
this.ghostController.setTitle(this.title);
|
||||
this.ghostController.setLocation(this.location);
|
||||
this.ghostController.setFolderClass(this.folderClass);
|
||||
this.leftPanelController.setLeftPanelVisual();
|
||||
|
||||
this.onDragStartBound = this.onDragStart.bindAsEventListener(this);
|
||||
for (var i = 0; i < eventCells.length; i++) {
|
||||
@@ -1036,8 +1124,16 @@ SOGoEventDragController.prototype = {
|
||||
this.ghostController.initWithCoordinates(coordinates);
|
||||
|
||||
if (!this.eventCells) {
|
||||
var folder = getSelectedFolder();
|
||||
var folderID = folder.readAttribute("id").substr(1);
|
||||
if (currentView == "multicolumndayview") {
|
||||
if (target.getAttribute("calendar"))
|
||||
var folderID = target.getAttribute("calendar");
|
||||
else
|
||||
var folderID = target.up("[calendar]").getAttribute("calendar");
|
||||
}
|
||||
else {
|
||||
var folder = getSelectedFolder();
|
||||
var folderID = folder.readAttribute("id").substr(1);
|
||||
}
|
||||
this.ghostController.setFolderClass("calendarFolder" + folderID);
|
||||
}
|
||||
this.ghostController.setDragMode(this._determineDragMode());
|
||||
@@ -1296,6 +1392,8 @@ SOGoEventDragController.prototype = {
|
||||
Event.stopObserving(document.body, "mousemove", this.onDragModeBound);
|
||||
this.onDragStopBound = null;
|
||||
this.onDragModeBound = null;
|
||||
if (this.leftPanelController)
|
||||
this.leftPanelController.stopEvent();
|
||||
|
||||
var utilities = SOGoEventDragUtilities();
|
||||
if (this.dragHasStarted) {
|
||||
@@ -1311,7 +1409,25 @@ SOGoEventDragController.prototype = {
|
||||
.currentCoordinates
|
||||
.getDelta(this.ghostController
|
||||
.originalCoordinates);
|
||||
this.updateDropCallback(this, this.eventCells, delta);
|
||||
|
||||
if (this.leftPanelController.dropCalendar != null) {
|
||||
$$('#calendarList li').each(function(e) {
|
||||
e.removeClassName('genericHoverClass');
|
||||
});
|
||||
calendarID[0] = this.folderClass.substr(14);
|
||||
calendarID[1] = this.leftPanelController.dropCalendar.getAttribute("id").substr(1);
|
||||
delta.start = 0;
|
||||
if (calendarID[0] != calendarID[1])
|
||||
this.updateDropCallback(this, this.eventCells, delta, calendarID);
|
||||
}
|
||||
else if (currentView == "multicolumndayview" && delta.dayNumber != 0) {
|
||||
var position = activeCalendars.indexOf(calendarID[0]);
|
||||
position += delta.dayNumber;
|
||||
calendarID[1] = activeCalendars[position];
|
||||
this.updateDropCallback(this, this.eventCells, delta, calendarID);
|
||||
}
|
||||
else
|
||||
this.updateDropCallback(this, this.eventCells, delta, 0);
|
||||
} else {
|
||||
var eventContainerNodes = utilities.getEventContainerNodes();
|
||||
var dayNode = eventContainerNodes[this.ghostController
|
||||
@@ -1343,10 +1459,25 @@ SOGoEventDragController.prototype = {
|
||||
this.pointerHandler.updateFromEvent(event);
|
||||
if (this.scrollController)
|
||||
this.scrollController.updateFromPointerHandler();
|
||||
|
||||
|
||||
if (this.dragHasStarted) {
|
||||
this.ghostController.updateFromPointerHandler();
|
||||
} else {
|
||||
var newCoordinates = this.ghostController.pointerHandler.getEventViewCoordinates();
|
||||
if (newCoordinates == null && this.leftPanelController != null) {
|
||||
if (this.ghostController.ghosts) {
|
||||
this.ghostController.hideGhosts();
|
||||
this.leftPanelController.startEvent();
|
||||
}
|
||||
this.leftPanelController.updateFromPointerHandler(event);
|
||||
}
|
||||
else {
|
||||
if (this.ghostController.ghosts == null) {
|
||||
this.ghostController.showGhosts();
|
||||
this.leftPanelController.stopEvent();
|
||||
}
|
||||
this.ghostController.updateFromPointerHandler();
|
||||
}
|
||||
}
|
||||
else {
|
||||
var distance = this.pointerHandler.getDistance();
|
||||
if (distance > 3) {
|
||||
$("eventDialog").hide();
|
||||
@@ -1361,7 +1492,6 @@ SOGoEventDragController.prototype = {
|
||||
this.ghostController.updateFromPointerHandler();
|
||||
}
|
||||
}
|
||||
|
||||
Event.stop(event);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -65,6 +65,7 @@ DIV#rightFrameTitle {
|
||||
border:solid black 2px;
|
||||
border-radius:5px;
|
||||
margin-top:3px;
|
||||
overflow:hidden;
|
||||
}
|
||||
|
||||
.eventsTitle, .tasksTitle {
|
||||
@@ -121,6 +122,7 @@ DIV#rightSide {
|
||||
color: #666;
|
||||
text-align: right;
|
||||
min-width:52px;
|
||||
vertical-align:top;
|
||||
}
|
||||
|
||||
/********** Overriding SchedulerUI.css **********/
|
||||
|
||||
@@ -44,7 +44,7 @@ function folderRenameCallback(http) {
|
||||
if (http.readyState == 4) {
|
||||
if (isHttpStatus204(http.status)) {
|
||||
var dict = http.callbackData;
|
||||
dict["node"].innerHTML = dict["name"];
|
||||
dict["node"].childNodesWithTag("span")[0].innerHTML = dict["name"];
|
||||
window.close();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -159,17 +159,17 @@ function foldersSearchCallback(http) {
|
||||
|
||||
var dd = $("dd" + nodeId);
|
||||
if (response.length) {
|
||||
var folders = response.split(";");
|
||||
var folders = response.evalJSON();
|
||||
var user = http.callbackData["user"];
|
||||
|
||||
dd.innerHTML = '';
|
||||
for (var i = 1; i < folders.length - 1; i++)
|
||||
dd.appendChild(addFolderBranchToTree(d, user, folders[i], nodeId, i, false));
|
||||
for (var i = 0; i < folders.length-1; i++)
|
||||
dd.appendChild(addFolderBranchToTree(d, user, folders[i], nodeId, i+1, false));
|
||||
dd.appendChild(addFolderBranchToTree(d, user, folders[folders.length-1], nodeId,
|
||||
(folders.length - 1), true));
|
||||
folders.length, true));
|
||||
//dd.update(str);
|
||||
for (var i = 1; i < folders.length; i++) {
|
||||
var sd = $("sd" + (nodeId + i));
|
||||
for (var i = 0; i < folders.length; i++) {
|
||||
var sd = $("sd" + (nodeId + i + 1));
|
||||
sd.on("click", onTreeItemClick);
|
||||
}
|
||||
}
|
||||
@@ -185,20 +185,21 @@ function foldersSearchCallback(http) {
|
||||
}
|
||||
|
||||
function addFolderBranchToTree(tree, user, folder, nodeId, subId, isLast) {
|
||||
var folderInfos = folder.split(":");
|
||||
var icon = ResourcesURL + '/';
|
||||
if (folderInfos[2] == 'Contact')
|
||||
if (folder.type == 'Contact')
|
||||
icon += 'tb-mail-addressbook-flat-16x16.png';
|
||||
else
|
||||
icon += 'calendar-folder-16x16.png';
|
||||
var folderId = user + ":" + folderInfos[1].substr(1);
|
||||
var folderId = user + ":" + folder.name.substr(1);
|
||||
|
||||
// We sanitize the value to avoid XSS issues
|
||||
var name = folderInfos[0].escapeHTML();
|
||||
var name = folder.displayName.escapeHTML();
|
||||
var node = new dTreeNode(subId, nodeId, name, 0, '#', folderId,
|
||||
folderInfos[2] + '-folder', '', '', icon, icon);
|
||||
folder.type + '-folder', '', '', icon, icon);
|
||||
node._ls = isLast;
|
||||
|
||||
var content = tree.node(node, (nodeId + subId), null);
|
||||
content._formattedName = folder.formattedName;
|
||||
|
||||
return content;
|
||||
}
|
||||
@@ -227,9 +228,7 @@ function onConfirmFolderSelection(event) {
|
||||
folderName = description.replace(/>,.*$/, ">", "g");
|
||||
}
|
||||
else {
|
||||
var resource = $(topNode.selectedEntry).down("SPAN.nodeName");
|
||||
folderName = resource.innerHTML;
|
||||
folderName = folderName.replace(/>,.*(\))?$/, ">)$1", "g");
|
||||
folderName = node._formattedName;
|
||||
}
|
||||
var data = { folderName: folderName, folder: folder, type: type, window: window };
|
||||
if (parent$(accessToSubscribedFolder(folder)))
|
||||
|
||||
@@ -166,7 +166,7 @@ function onPostComplete(http) {
|
||||
p = window.opener;
|
||||
if (p && p.refreshMessage)
|
||||
p.refreshMessage(jsonResponse["sourceFolder"],
|
||||
jsonResponse["messageID"]);
|
||||
jsonResponse["sourceMessageID"]);
|
||||
onCloseButtonClick();
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -11,10 +11,9 @@ function onThisButtonClick(event) {
|
||||
else if (action == 'delete')
|
||||
window.opener.performEventDeletion(calendarFolder, componentName,
|
||||
recurrenceName);
|
||||
else if (action == 'adjust') {
|
||||
else if (action == 'adjust')
|
||||
window.opener.performEventAdjustment(calendarFolder, componentName,
|
||||
recurrenceName, queryParameters);
|
||||
}
|
||||
else
|
||||
window.alert("Invalid action: " + action);
|
||||
|
||||
|
||||
@@ -14,6 +14,12 @@ DIV.bottomToolbar
|
||||
right: 2em;
|
||||
bottom: 8px; }
|
||||
|
||||
#WhiteListAdd, #WhiteListDelete
|
||||
{
|
||||
border-bottom: 1px solid #9B9B9B;
|
||||
border-right: 1px solid #9B9B9B;
|
||||
}
|
||||
|
||||
#mailAccountsToolbar
|
||||
{ left: 5px;
|
||||
bottom: 9px;
|
||||
@@ -47,17 +53,35 @@ DIV.listWrapper
|
||||
padding: 0px;
|
||||
margin-top: 2px;
|
||||
border-left: 1px solid #9b9b9b;
|
||||
border-right: 1px solid #9b9b9b;
|
||||
background: #ccddec;}
|
||||
|
||||
.listWrapper TABLE TD
|
||||
{ height: 22px; }
|
||||
|
||||
#calendarCategoriesListWrapper
|
||||
{ top: 232px;
|
||||
{ top:1em;
|
||||
bottom: 30px;
|
||||
right: 2em;
|
||||
left: 2em; }
|
||||
|
||||
#appointmentsWhiteListWrapper
|
||||
{ top:4.5em;
|
||||
bottom: 30px;
|
||||
right: 2em;
|
||||
left: 2em; }
|
||||
|
||||
#tableViewWhiteList
|
||||
{ width:100%; }
|
||||
|
||||
DIV#calendarOptionsTabs
|
||||
{ position: absolute;
|
||||
top: 225px;
|
||||
left: 0px;
|
||||
right: 0px;
|
||||
bottom: 0px;
|
||||
}
|
||||
|
||||
#contactsCategoriesListWrapper
|
||||
{ overflow: auto;
|
||||
position: absolute;
|
||||
|
||||
@@ -3,111 +3,114 @@ var mailAccounts = null;
|
||||
var dialogs = {};
|
||||
|
||||
function savePreferences(sender) {
|
||||
var sendForm = true;
|
||||
|
||||
var sigList = $("signaturePlacementList");
|
||||
if (sigList)
|
||||
sigList.disabled = false;
|
||||
|
||||
if ($("calendarCategoriesListWrapper"))
|
||||
serializeCalendarCategories();
|
||||
|
||||
if ($("contactsCategoriesListWrapper"))
|
||||
serializeContactsCategories();
|
||||
|
||||
if ($("mailLabelsListWrapper"))
|
||||
serializeMailLabels();
|
||||
|
||||
if (typeof mailCustomFromEnabled !== "undefined" && !emailRE.test($("email").value)) {
|
||||
showAlertDialog(_("Please specify a valid sender address."));
|
||||
sendForm = false;
|
||||
}
|
||||
|
||||
if ($("replyTo")) {
|
||||
var replyTo = $("replyTo").value;
|
||||
if (!replyTo.blank() && !emailRE.test(replyTo)) {
|
||||
showAlertDialog(_("Please specify a valid reply-to address."));
|
||||
sendForm = false;
|
||||
}
|
||||
}
|
||||
|
||||
if ($("dayStartTime")) {
|
||||
var start = $("dayStartTime");
|
||||
var selectedStart = parseInt(start.options[start.selectedIndex].value);
|
||||
var end = $("dayEndTime");
|
||||
var selectedEnd = parseInt(end.options[end.selectedIndex].value);
|
||||
|
||||
if (selectedStart >= selectedEnd) {
|
||||
showAlertDialog (_("Day start time must be prior to day end time."));
|
||||
sendForm = false;
|
||||
}
|
||||
}
|
||||
|
||||
if ($("enableVacation") && $("enableVacation").checked) {
|
||||
if ($("autoReplyText").value.strip().length == 0 || $("autoReplyEmailAddresses").value.strip().length == 0) {
|
||||
showAlertDialog(_("Please specify your message and your email addresses for which you want to enable auto reply."));
|
||||
sendForm = false;
|
||||
}
|
||||
|
||||
if ($("autoReplyText").value.strip().endsWith('\n.')) {
|
||||
showAlertDialog(_("Your vacation message must not end with a single dot on a line."));
|
||||
sendForm = false;
|
||||
}
|
||||
|
||||
if ($("enableVacationEndDate") && $("enableVacationEndDate").checked) {
|
||||
var e = $("vacationEndDate_date");
|
||||
var endDate = e.inputAsDate();
|
||||
var now = new Date();
|
||||
if (isNaN(endDate.getTime()) || endDate.getTime() < now.getTime()) {
|
||||
showAlertDialog(_("End date of your auto reply must be in the future."));
|
||||
var sendForm = true;
|
||||
|
||||
var sigList = $("signaturePlacementList");
|
||||
if (sigList)
|
||||
sigList.disabled = false;
|
||||
|
||||
if ($("appointmentsWhiteListWrapper"))
|
||||
serializeAppointmentsWhiteList();
|
||||
|
||||
if ($("calendarCategoriesListWrapper"))
|
||||
serializeCalendarCategories();
|
||||
|
||||
if ($("contactsCategoriesListWrapper"))
|
||||
serializeContactsCategories();
|
||||
|
||||
if ($("mailLabelsListWrapper"))
|
||||
serializeMailLabels();
|
||||
|
||||
if (typeof mailCustomFromEnabled !== "undefined" && !emailRE.test($("email").value)) {
|
||||
showAlertDialog(_("Please specify a valid sender address."));
|
||||
sendForm = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($("enableForward") && $("enableForward").checked) {
|
||||
var addresses = $("forwardAddress").value.split(",");
|
||||
for (var i = 0; i < addresses.length && sendForm; i++)
|
||||
if (!emailRE.test(addresses[i].strip())) {
|
||||
showAlertDialog(_("Please specify an address to which you want to forward your messages."));
|
||||
sendForm = false;
|
||||
}
|
||||
}
|
||||
|
||||
if (typeof sieveCapabilities != "undefined") {
|
||||
var jsonFilters = prototypeIfyFilters();
|
||||
$("sieveFilters").setValue(Object.toJSON(jsonFilters));
|
||||
}
|
||||
|
||||
if (sendForm) {
|
||||
saveMailAccounts();
|
||||
|
||||
triggerAjaxRequest($("mainForm").readAttribute("action"), function (http) {
|
||||
if (http.readyState == 4) {
|
||||
var response = http.responseText.evalJSON(true);
|
||||
if (http.status == 503) {
|
||||
showAlertDialog(_(response.textStatus));
|
||||
|
||||
if ($("replyTo")) {
|
||||
var replyTo = $("replyTo").value;
|
||||
if (!replyTo.blank() && !emailRE.test(replyTo)) {
|
||||
showAlertDialog(_("Please specify a valid reply-to address."));
|
||||
sendForm = false;
|
||||
}
|
||||
else if (http.status == 200) {
|
||||
if (response.hasChanged == 1) {
|
||||
window.opener.location.reload();
|
||||
window.close();
|
||||
}
|
||||
else {
|
||||
window.close();
|
||||
}
|
||||
}
|
||||
|
||||
if ($("dayStartTime")) {
|
||||
var start = $("dayStartTime");
|
||||
var selectedStart = parseInt(start.options[start.selectedIndex].value);
|
||||
var end = $("dayEndTime");
|
||||
var selectedEnd = parseInt(end.options[end.selectedIndex].value);
|
||||
|
||||
if (selectedStart >= selectedEnd) {
|
||||
showAlertDialog (_("Day start time must be prior to day end time."));
|
||||
sendForm = false;
|
||||
}
|
||||
else {
|
||||
showAlertDialog(_(response.textStatus));
|
||||
}
|
||||
|
||||
if ($("enableVacation") && $("enableVacation").checked) {
|
||||
if ($("autoReplyText").value.strip().length == 0 || $("autoReplyEmailAddresses").value.strip().length == 0) {
|
||||
showAlertDialog(_("Please specify your message and your email addresses for which you want to enable auto reply."));
|
||||
sendForm = false;
|
||||
}
|
||||
}
|
||||
},
|
||||
null,
|
||||
Form.serialize($("mainForm")), // excludes the file input
|
||||
{ "Content-type": "application/x-www-form-urlencoded"}
|
||||
);
|
||||
}
|
||||
return false;
|
||||
|
||||
if ($("autoReplyText").value.strip().endsWith('\n.')) {
|
||||
showAlertDialog(_("Your vacation message must not end with a single dot on a line."));
|
||||
sendForm = false;
|
||||
}
|
||||
|
||||
if ($("enableVacationEndDate") && $("enableVacationEndDate").checked) {
|
||||
var e = $("vacationEndDate_date");
|
||||
var endDate = e.inputAsDate();
|
||||
var now = new Date();
|
||||
if (isNaN(endDate.getTime()) || endDate.getTime() < now.getTime()) {
|
||||
showAlertDialog(_("End date of your auto reply must be in the future."));
|
||||
sendForm = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($("enableForward") && $("enableForward").checked) {
|
||||
var addresses = $("forwardAddress").value.split(",");
|
||||
for (var i = 0; i < addresses.length && sendForm; i++)
|
||||
if (!emailRE.test(addresses[i].strip())) {
|
||||
showAlertDialog(_("Please specify an address to which you want to forward your messages."));
|
||||
sendForm = false;
|
||||
}
|
||||
}
|
||||
|
||||
if (typeof sieveCapabilities != "undefined") {
|
||||
var jsonFilters = prototypeIfyFilters();
|
||||
$("sieveFilters").setValue(Object.toJSON(jsonFilters));
|
||||
}
|
||||
|
||||
if (sendForm) {
|
||||
saveMailAccounts();
|
||||
|
||||
triggerAjaxRequest($("mainForm").readAttribute("action"), function (http) {
|
||||
if (http.readyState == 4) {
|
||||
var response = http.responseText.evalJSON(true);
|
||||
if (http.status == 503) {
|
||||
showAlertDialog(_(response.textStatus));
|
||||
}
|
||||
else if (http.status == 200) {
|
||||
if (response.hasChanged == 1) {
|
||||
window.opener.location.reload();
|
||||
window.close();
|
||||
}
|
||||
else {
|
||||
window.close();
|
||||
}
|
||||
}
|
||||
else {
|
||||
showAlertDialog(_(response.textStatus));
|
||||
}
|
||||
}
|
||||
},
|
||||
null,
|
||||
Form.serialize($("mainForm")), // excludes the file input
|
||||
{ "Content-type": "application/x-www-form-urlencoded"}
|
||||
);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function prototypeIfyFilters() {
|
||||
@@ -212,6 +215,13 @@ function initPreferences() {
|
||||
mailController.attachToTabsContainer(tabsContainer);
|
||||
}
|
||||
|
||||
// Inner tabs on the calendar module tab
|
||||
tabsContainer = $('calendarOptionsTabs');
|
||||
if (tabsContainer) {
|
||||
var mailController = new SOGoTabsController();
|
||||
mailController.attachToTabsContainer(tabsContainer);
|
||||
}
|
||||
|
||||
_setupEvents();
|
||||
|
||||
// Optional function called when initializing the preferences
|
||||
@@ -223,6 +233,50 @@ function initPreferences() {
|
||||
$('colorPickerDialog').on('click', 'span', onColorPickerChoice);
|
||||
$(document.body).on("click", onBodyClickHandler);
|
||||
|
||||
// Calendar whiteList
|
||||
var whiteList = $("appointmentsWhiteListWrapper");
|
||||
if(whiteList) {
|
||||
var whiteListValue = $("whiteList").getValue();
|
||||
if (whiteListValue != "") {
|
||||
whiteListValue = whiteListValue.split(",");
|
||||
var tablebody = $("appointmentsWhiteListWrapper").childNodesWithTag("table")[0].tBodies[0];
|
||||
for (i = 0; i < whiteListValue.length; i++)
|
||||
{
|
||||
var elements = whiteListValue[i].split("=");
|
||||
var row = new Element("tr");
|
||||
var td = new Element("td").update("");
|
||||
var textField = new Element("input");
|
||||
var span = new Element("span");
|
||||
|
||||
row.addClassName("whiteListRow");
|
||||
row.observe("mousedown", onRowClick);
|
||||
td.addClassName ("whiteListCell");
|
||||
td.observe("mousedown", endAllEditables);
|
||||
td.observe("dblclick", onNameEdit);
|
||||
textField.addInterface(SOGoAutoCompletionInterface);
|
||||
textField.SOGoUsersSearch = true;
|
||||
textField.observe("autocompletion:changed", endEditable);
|
||||
textField.addClassName("textField");
|
||||
textField.value = elements[1];
|
||||
textField.setAttribute("uid", elements[0]);
|
||||
textField.hide();
|
||||
span.innerText = elements[1];
|
||||
|
||||
td.appendChild(textField);
|
||||
td.appendChild(span);
|
||||
row.appendChild (td);
|
||||
tablebody.appendChild(row);
|
||||
$(tablebody).deselectAll();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
var table = whiteList.childNodesWithTag("table")[0];
|
||||
table.multiselect = true;
|
||||
$("appointmentsWhiteListAdd").observe("click", onAppointmentsWhiteListAdd);
|
||||
$("appointmentsWhiteListDelete").observe("click", onAppointmentsWhiteListDelete);
|
||||
}
|
||||
|
||||
// Calender categories
|
||||
var wrapper = $("calendarCategoriesListWrapper");
|
||||
if (wrapper) {
|
||||
@@ -282,8 +336,7 @@ function initPreferences() {
|
||||
|
||||
button = $("enableVacationEndDate");
|
||||
if (button) {
|
||||
jQuery("#vacationEndDate_date").closest(".date").datepicker(
|
||||
{ autoclose: true, position: 'above', weekStart: $('weekStartDay').getValue() });
|
||||
jQuery("#vacationEndDate_date").closest(".date").datepicker({ autoclose: true, position: 'above', weekStart: $('weekStartDay').getValue() });
|
||||
button.on("click", function(event) {
|
||||
if (this.checked)
|
||||
$("vacationEndDate_date").enable();
|
||||
@@ -884,10 +937,10 @@ function saveMailAccounts() {
|
||||
|
||||
// Could be null if ModuleConstraints disables email access
|
||||
if (editor)
|
||||
//Instead of removing the modules, we disable it. This will prevent the window to crash if we have a connection error.
|
||||
editor.select('input, select').each(function(i) { i.disable(); })
|
||||
//Instead of removing the modules, we disable it. This will prevent the window to crash if we have a connection error.
|
||||
editor.select('input, select').each(function(i) { i.disable(); })
|
||||
|
||||
compactMailAccounts();
|
||||
compactMailAccounts();
|
||||
var mailAccountsJSON = $("mailAccountsJSON");
|
||||
|
||||
if (mailAccountsJSON)
|
||||
@@ -977,6 +1030,119 @@ function onCalendarColorEdit(e) {
|
||||
onCCE(e, "calendarCategoriesListWrapper");
|
||||
}
|
||||
|
||||
function makeEditable (element) {
|
||||
element.addClassName("editing");
|
||||
element.removeClassName("whiteListCell");
|
||||
|
||||
var span = element.down("SPAN");
|
||||
span.update();
|
||||
|
||||
var textField = element.down("INPUT");
|
||||
textField.show();
|
||||
textField.focus();
|
||||
textField.select();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
function endAllEditables (e) {
|
||||
var r = $$("TABLE#tableViewWhiteList TBODY TR TD");
|
||||
for (var i = 0; i < r.length; i++) {
|
||||
var element = $(r[i]);
|
||||
if (r[i] != this && element.hasClassName("editing"))
|
||||
endEditable(null, element.down("INPUT"));
|
||||
}
|
||||
}
|
||||
|
||||
function onNameEdit (e) {
|
||||
endAllEditables();
|
||||
if (!this.hasClassName("editing")) {
|
||||
makeEditable (this);
|
||||
}
|
||||
}
|
||||
|
||||
function endEditable(event, textField) {
|
||||
if (!textField)
|
||||
textField = this;
|
||||
|
||||
var uid = textField.readAttribute("uid");
|
||||
var cell = textField.up("TD");
|
||||
var textSpan = cell.down("SPAN");
|
||||
|
||||
cell.removeClassName("editing");
|
||||
cell.addClassName("whiteListCell");
|
||||
textField.hide();
|
||||
|
||||
var tmp = textField.value;
|
||||
tmp = tmp.replace (/</, "<");
|
||||
tmp = tmp.replace (/>/, ">");
|
||||
if (!uid)
|
||||
cell.up("TR").addClassName("notfound");
|
||||
if (tmp)
|
||||
textSpan.update(tmp);
|
||||
else
|
||||
cell.up("TR").remove();
|
||||
|
||||
if (event)
|
||||
Event.stop(event);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
function onAppointmentsWhiteListAdd(e) {
|
||||
var tablebody = $("appointmentsWhiteListWrapper").childNodesWithTag("table")[0].tBodies[0];
|
||||
var row = new Element("tr");
|
||||
var td = new Element("td").update("");
|
||||
var textField = new Element("input");
|
||||
var span = new Element("span");
|
||||
|
||||
row.addClassName("whiteListRow");
|
||||
row.observe("mousedown", onRowClick);
|
||||
td.addClassName ("whiteListCell");
|
||||
td.observe("mousedown", endAllEditables);
|
||||
td.observe("dblclick", onNameEdit);
|
||||
textField.addInterface(SOGoAutoCompletionInterface);
|
||||
textField.SOGoUsersSearch = true;
|
||||
textField.observe("autocompletion:changed", endEditable);
|
||||
textField.addClassName("textField");
|
||||
|
||||
td.appendChild(textField);
|
||||
td.appendChild(span);
|
||||
row.appendChild (td);
|
||||
tablebody.appendChild(row);
|
||||
$(tablebody).deselectAll();
|
||||
row.selectElement();
|
||||
|
||||
makeEditable(td);
|
||||
|
||||
}
|
||||
|
||||
function onAppointmentsWhiteListDelete(e) {
|
||||
var list = $('appointmentsWhiteListWrapper').down("TABLE").down("TBODY");
|
||||
var rows = list.getSelectedNodes();
|
||||
var count = rows.length;
|
||||
|
||||
for (var i=0; i < count; i++) {
|
||||
rows[i].editionController = null;
|
||||
rows[i].remove();
|
||||
}
|
||||
}
|
||||
|
||||
function serializeAppointmentsWhiteList() {
|
||||
var r = $$("#appointmentsWhiteListWrapper TBODY TR");
|
||||
|
||||
var values = [];
|
||||
for (var i = 0; i < r.length; i++) {
|
||||
var tds = r[i].childElements().first().down("INPUT");
|
||||
var uid = tds.getAttribute("uid");
|
||||
var value = tds.getValue();
|
||||
var user = uid + "=" + value;
|
||||
if (uid != null)
|
||||
values.push(user);
|
||||
}
|
||||
$("whiteList").value = values;
|
||||
}
|
||||
|
||||
function onCalendarCategoryAdd(e) {
|
||||
var row = new Element("tr");
|
||||
var nametd = new Element("td").update("");
|
||||
@@ -1016,7 +1182,7 @@ function serializeCalendarCategories() {
|
||||
var values = [];
|
||||
for (var i = 0; i < r.length; i++) {
|
||||
var tds = r[i].childElements();
|
||||
var name = $(tds.first()).innerHTML;
|
||||
var name = $(tds.first()).innerHTML.trim();
|
||||
var color = $(tds.last().childElements().first()).readAttribute('data-color');
|
||||
values.push("\"" + name + "\": \"" + color + "\"");
|
||||
}
|
||||
@@ -1106,7 +1272,7 @@ function serializeMailLabels() {
|
||||
var name = r[i].readAttribute("data-name");
|
||||
var label = $(tds.first()).innerHTML;
|
||||
var color = $(tds.last().childElements().first()).readAttribute('data-color');
|
||||
|
||||
|
||||
/* if name is null, that's because we've just added a new tag */
|
||||
if (!name) {
|
||||
name = label.replace(/[ \(\)\/\{%\*<>\\\"]/g, "_");
|
||||
@@ -1144,7 +1310,7 @@ function onContactsCategoryAdd(e) {
|
||||
var list = $('contactsCategoriesListWrapper').down("TABLE").down("TBODY");
|
||||
list.appendChild(row);
|
||||
|
||||
resetContactsTableActions ();
|
||||
resetContactsTableActions();
|
||||
nametd.editionController.startEditing();
|
||||
}
|
||||
|
||||
@@ -1173,15 +1339,14 @@ function serializeContactsCategories() {
|
||||
}
|
||||
|
||||
/* / contact categories */
|
||||
|
||||
|
||||
function onAddOutgoingAddressesCheck(checkBox) {
|
||||
if (!checkBox) {
|
||||
checkBox = $("addOutgoingAddresses");
|
||||
}
|
||||
$("addressBookList").disabled = !checkBox.checked;
|
||||
|
||||
if (!checkBox) {
|
||||
checkBox = $("addOutgoingAddresses");
|
||||
}
|
||||
$("addressBookList").disabled = !checkBox.checked;
|
||||
}
|
||||
|
||||
|
||||
function onReplyPlacementListChange() {
|
||||
if ($("replyPlacementList").value == 0) {
|
||||
// Reply placement is above quote, signature can be place before of after quote
|
||||
|
||||
@@ -28,11 +28,20 @@ var CKBUILDER_CONFIG = {
|
||||
skin: 'moono',
|
||||
preset: 'basic',
|
||||
ignore: [
|
||||
'dev',
|
||||
'.bender',
|
||||
'.DS_Store',
|
||||
'.gitignore',
|
||||
'.gitattributes',
|
||||
'.idea',
|
||||
'.mailmap',
|
||||
'bender.js',
|
||||
'bender-err.log',
|
||||
'bender-out.log',
|
||||
'dev',
|
||||
'node_modules',
|
||||
'package.json',
|
||||
'README.md',
|
||||
'.mailmap'
|
||||
'tests'
|
||||
],
|
||||
plugins : {
|
||||
'about' : 1,
|
||||
|
||||
+492
-487
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -10,4 +10,4 @@ a;s<a+3;s++){var e=new r(i.$.insertRow(-1));e.setAttribute("role","row");for(var
|
||||
b.setAttribute("aria-labelledby",d);b.append(CKEDITOR.dom.element.createFromHtml('<span id="'+d+'" class="cke_voice_label">'+c+"</span>",CKEDITOR.document))}i=CKEDITOR.dom.element.createFromHtml('<table tabIndex="-1" aria-label="'+h.options+'" role="grid" style="border-collapse:separate;" cellspacing="0"><caption class="cke_voice_label">'+h.options+'</caption><tbody role="presentation"></tbody></table>');i.on("mouseover",v);i.on("mouseout",q);var c="00 33 66 99 cc ff".split(" ");a(0,0);a(3,0);a(0,
|
||||
3);a(3,3);var e=new r(i.$.insertRow(-1));e.setAttribute("role","row");for(var d=0;6>d;d++)b(e.$,"#"+c[d]+c[d]+c[d]);for(d=0;12>d;d++)b(e.$,"#000000")})();return{title:h.title,minWidth:360,minHeight:220,onLoad:function(){p=this},onHide:function(){n();var a=g.getChild(0).getHtml();g.setStyle("border-color",a);g.setStyle("border-style","solid");f.getById(k).removeStyle("background-color");f.getById(l).setHtml(" ");g=null},contents:[{id:"picker",label:h.title,accessKey:"I",elements:[{type:"hbox",
|
||||
padding:0,widths:["70%","10%","30%"],children:[{type:"html",html:"<div></div>",onLoad:function(){CKEDITOR.document.getById(this.domId).append(i)},focus:function(){(g||this.getElement().getElementsByTag("td").getItem(0)).focus()}},x,{type:"vbox",padding:0,widths:["70%","5%","25%"],children:[{type:"html",html:"<span>"+h.highlight+'</span>\t\t\t\t\t\t\t\t\t\t\t\t<div id="'+k+'" style="border: 1px solid; height: 74px; width: 74px;"></div>\t\t\t\t\t\t\t\t\t\t\t\t<div id="'+l+'"> </div><span>'+h.selected+
|
||||
'</span>\t\t\t\t\t\t\t\t\t\t\t\t<div id="'+o+'" style="border: 1px solid; height: 20px; width: 74px;"></div>'},{type:"text",label:h.selected,labelStyle:"display:none",id:"selectedColor",style:"width: 74px",onChange:function(){try{f.getById(o).setStyle("background-color",this.getValue())}catch(a){n()}}},x,{type:"button",id:"clear",style:"margin-top: 5px",label:h.clear,onClick:n}]}]}]}]}});
|
||||
'</span>\t\t\t\t\t\t\t\t\t\t\t\t<div id="'+o+'" style="border: 1px solid; height: 20px; width: 74px;"></div>'},{type:"text",label:h.selected,labelStyle:"display:none",id:"selectedColor",style:"width: 76px;margin-top:4px",onChange:function(){try{f.getById(o).setStyle("background-color",this.getValue())}catch(a){n()}}},x,{type:"button",id:"clear",label:h.clear,onClick:n}]}]}]}]}});
|
||||
@@ -2,42 +2,42 @@
|
||||
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.md or http://ckeditor.com/license
|
||||
*/
|
||||
(function(){var r=function(c,j){function r(){var a=arguments,b=this.getContentElement("advanced","txtdlgGenStyle");b&&b.commit.apply(b,a);this.foreach(function(b){b.commit&&"txtdlgGenStyle"!=b.id&&b.commit.apply(b,a)})}function i(a){if(!s){s=1;var b=this.getDialog(),d=b.imageElement;if(d){this.commit(f,d);for(var a=[].concat(a),e=a.length,c,g=0;g<e;g++)(c=b.getContentElement.apply(b,a[g].split(":")))&&c.setup(f,d)}s=0}}var f=1,k=/^\s*(\d+)((px)|\%)?\s*$/i,v=/(^\s*(\d+)((px)|\%)?\s*$)|^$/i,o=/^\d+px$/,
|
||||
(function(){var r=function(c,j){function r(){var a=arguments,b=this.getContentElement("advanced","txtdlgGenStyle");b&&b.commit.apply(b,a);this.foreach(function(b){b.commit&&"txtdlgGenStyle"!=b.id&&b.commit.apply(b,a)})}function i(a){if(!s){s=1;var b=this.getDialog(),d=b.imageElement;if(d){this.commit(e,d);for(var a=[].concat(a),f=a.length,c,g=0;g<f;g++)(c=b.getContentElement.apply(b,a[g].split(":")))&&c.setup(e,d)}s=0}}var e=1,k=/^\s*(\d+)((px)|\%)?\s*$/i,v=/(^\s*(\d+)((px)|\%)?\s*$)|^$/i,o=/^\d+px$/,
|
||||
w=function(){var a=this.getValue(),b=this.getDialog(),d=a.match(k);d&&("%"==d[2]&&l(b,!1),a=d[1]);b.lockRatio&&(d=b.originalElement,"true"==d.getCustomData("isReady")&&("txtHeight"==this.id?(a&&"0"!=a&&(a=Math.round(d.$.width*(a/d.$.height))),isNaN(a)||b.setValueOf("info","txtWidth",a)):(a&&"0"!=a&&(a=Math.round(d.$.height*(a/d.$.width))),isNaN(a)||b.setValueOf("info","txtHeight",a))));g(b)},g=function(a){if(!a.originalElement||!a.preview)return 1;a.commitContent(4,a.preview);return 0},s,l=function(a,
|
||||
b){if(!a.getContentElement("info","ratioLock"))return null;var d=a.originalElement;if(!d)return null;if("check"==b){if(!a.userlockRatio&&"true"==d.getCustomData("isReady")){var e=a.getValueOf("info","txtWidth"),c=a.getValueOf("info","txtHeight"),d=1E3*d.$.width/d.$.height,f=1E3*e/c;a.lockRatio=!1;!e&&!c?a.lockRatio=!0:!isNaN(d)&&!isNaN(f)&&Math.round(d)==Math.round(f)&&(a.lockRatio=!0)}}else void 0!=b?a.lockRatio=b:(a.userlockRatio=1,a.lockRatio=!a.lockRatio);e=CKEDITOR.document.getById(p);a.lockRatio?
|
||||
e.removeClass("cke_btn_unlocked"):e.addClass("cke_btn_unlocked");e.setAttribute("aria-checked",a.lockRatio);CKEDITOR.env.hc&&e.getChild(0).setHtml(a.lockRatio?CKEDITOR.env.ie?"■":"▣":CKEDITOR.env.ie?"□":"▢");return a.lockRatio},x=function(a){var b=a.originalElement;if("true"==b.getCustomData("isReady")){var d=a.getContentElement("info","txtWidth"),e=a.getContentElement("info","txtHeight");d&&d.setValue(b.$.width);e&&e.setValue(b.$.height)}g(a)},y=function(a,b){function d(a,b){var d=a.match(k);return d?
|
||||
("%"==d[2]&&(d[1]+="%",l(e,!1)),d[1]):b}if(a==f){var e=this.getDialog(),c="",g="txtWidth"==this.id?"width":"height",h=b.getAttribute(g);h&&(c=d(h,c));c=d(b.getStyle(g),c);this.setValue(c)}},t,q=function(){var a=this.originalElement;a.setCustomData("isReady","true");a.removeListener("load",q);a.removeListener("error",h);a.removeListener("abort",h);CKEDITOR.document.getById(m).setStyle("display","none");this.dontResetSize||x(this);this.firstLoad&&CKEDITOR.tools.setTimeout(function(){l(this,"check")},
|
||||
b){if(!a.getContentElement("info","ratioLock"))return null;var d=a.originalElement;if(!d)return null;if("check"==b){if(!a.userlockRatio&&"true"==d.getCustomData("isReady")){var f=a.getValueOf("info","txtWidth"),c=a.getValueOf("info","txtHeight"),d=1E3*d.$.width/d.$.height,e=1E3*f/c;a.lockRatio=!1;!f&&!c?a.lockRatio=!0:!isNaN(d)&&!isNaN(e)&&Math.round(d)==Math.round(e)&&(a.lockRatio=!0)}}else void 0!=b?a.lockRatio=b:(a.userlockRatio=1,a.lockRatio=!a.lockRatio);f=CKEDITOR.document.getById(p);a.lockRatio?
|
||||
f.removeClass("cke_btn_unlocked"):f.addClass("cke_btn_unlocked");f.setAttribute("aria-checked",a.lockRatio);CKEDITOR.env.hc&&f.getChild(0).setHtml(a.lockRatio?CKEDITOR.env.ie?"■":"▣":CKEDITOR.env.ie?"□":"▢");return a.lockRatio},x=function(a){var b=a.originalElement;if("true"==b.getCustomData("isReady")){var d=a.getContentElement("info","txtWidth"),c=a.getContentElement("info","txtHeight");d&&d.setValue(b.$.width);c&&c.setValue(b.$.height)}g(a)},y=function(a,b){function d(a,b){var d=a.match(k);return d?
|
||||
("%"==d[2]&&(d[1]+="%",l(c,!1)),d[1]):b}if(a==e){var c=this.getDialog(),g="",h="txtWidth"==this.id?"width":"height",i=b.getAttribute(h);i&&(g=d(i,g));g=d(b.getStyle(h),g);this.setValue(g)}},t,q=function(){var a=this.originalElement;a.setCustomData("isReady","true");a.removeListener("load",q);a.removeListener("error",h);a.removeListener("abort",h);CKEDITOR.document.getById(m).setStyle("display","none");this.dontResetSize||x(this);this.firstLoad&&CKEDITOR.tools.setTimeout(function(){l(this,"check")},
|
||||
0,this);this.dontResetSize=this.firstLoad=!1},h=function(){var a=this.originalElement;a.removeListener("load",q);a.removeListener("error",h);a.removeListener("abort",h);a=CKEDITOR.getUrl(CKEDITOR.plugins.get("image").path+"images/noimage.png");this.preview&&this.preview.setAttribute("src",a);CKEDITOR.document.getById(m).setStyle("display","none");l(this,!1)},n=function(a){return CKEDITOR.tools.getNextId()+"_"+a},p=n("btnLockSizes"),u=n("btnResetSize"),m=n("ImagePreviewLoader"),A=n("previewLink"),
|
||||
z=n("previewImage");return{title:c.lang.image["image"==j?"title":"titleButton"],minWidth:420,minHeight:360,onShow:function(){this.linkEditMode=this.imageEditMode=this.linkElement=this.imageElement=!1;this.lockRatio=!0;this.userlockRatio=0;this.dontResetSize=!1;this.firstLoad=!0;this.addLink=!1;var a=this.getParentEditor(),b=a.getSelection(),d=(b=b&&b.getSelectedElement())&&a.elementPath(b).contains("a",1);CKEDITOR.document.getById(m).setStyle("display","none");t=new CKEDITOR.dom.element("img",a.document);
|
||||
this.preview=CKEDITOR.document.getById(z);this.originalElement=a.document.createElement("img");this.originalElement.setAttribute("alt","");this.originalElement.setCustomData("isReady","false");if(d){this.linkElement=d;this.linkEditMode=!0;var c=d.getChildren();if(1==c.count()){var g=c.getItem(0).getName();if("img"==g||"input"==g)this.imageElement=c.getItem(0),"img"==this.imageElement.getName()?this.imageEditMode="img":"input"==this.imageElement.getName()&&(this.imageEditMode="input")}"image"==j&&
|
||||
this.setupContent(2,d)}if(this.customImageElement)this.imageEditMode="img",this.imageElement=this.customImageElement,delete this.customImageElement;else if(b&&"img"==b.getName()&&!b.data("cke-realelement")||b&&"input"==b.getName()&&"image"==b.getAttribute("type"))this.imageEditMode=b.getName(),this.imageElement=b;this.imageEditMode?(this.cleanImageElement=this.imageElement,this.imageElement=this.cleanImageElement.clone(!0,!0),this.setupContent(f,this.imageElement)):this.imageElement=a.document.createElement("img");
|
||||
this.setupContent(2,d)}if(this.customImageElement)this.imageEditMode="img",this.imageElement=this.customImageElement,delete this.customImageElement;else if(b&&"img"==b.getName()&&!b.data("cke-realelement")||b&&"input"==b.getName()&&"image"==b.getAttribute("type"))this.imageEditMode=b.getName(),this.imageElement=b;this.imageEditMode?(this.cleanImageElement=this.imageElement,this.imageElement=this.cleanImageElement.clone(!0,!0),this.setupContent(e,this.imageElement)):this.imageElement=a.document.createElement("img");
|
||||
l(this,!0);CKEDITOR.tools.trim(this.getValueOf("info","txtUrl"))||(this.preview.removeAttribute("src"),this.preview.setStyle("display","none"))},onOk:function(){if(this.imageEditMode){var a=this.imageEditMode;"image"==j&&"input"==a&&confirm(c.lang.image.button2Img)?(this.imageElement=c.document.createElement("img"),this.imageElement.setAttribute("alt",""),c.insertElement(this.imageElement)):"image"!=j&&"img"==a&&confirm(c.lang.image.img2Button)?(this.imageElement=c.document.createElement("input"),
|
||||
this.imageElement.setAttributes({type:"image",alt:""}),c.insertElement(this.imageElement)):(this.imageElement=this.cleanImageElement,delete this.cleanImageElement)}else"image"==j?this.imageElement=c.document.createElement("img"):(this.imageElement=c.document.createElement("input"),this.imageElement.setAttribute("type","image")),this.imageElement.setAttribute("alt","");this.linkEditMode||(this.linkElement=c.document.createElement("a"));this.commitContent(f,this.imageElement);this.commitContent(2,this.linkElement);
|
||||
this.imageElement.setAttributes({type:"image",alt:""}),c.insertElement(this.imageElement)):(this.imageElement=this.cleanImageElement,delete this.cleanImageElement)}else"image"==j?this.imageElement=c.document.createElement("img"):(this.imageElement=c.document.createElement("input"),this.imageElement.setAttribute("type","image")),this.imageElement.setAttribute("alt","");this.linkEditMode||(this.linkElement=c.document.createElement("a"));this.commitContent(e,this.imageElement);this.commitContent(2,this.linkElement);
|
||||
this.imageElement.getAttribute("style")||this.imageElement.removeAttribute("style");this.imageEditMode?!this.linkEditMode&&this.addLink?(c.insertElement(this.linkElement),this.imageElement.appendTo(this.linkElement)):this.linkEditMode&&!this.addLink&&(c.getSelection().selectElement(this.linkElement),c.insertElement(this.imageElement)):this.addLink?this.linkEditMode?c.insertElement(this.imageElement):(c.insertElement(this.linkElement),this.linkElement.append(this.imageElement,!1)):c.insertElement(this.imageElement)},
|
||||
onLoad:function(){"image"!=j&&this.hidePage("Link");var a=this._.element.getDocument();this.getContentElement("info","ratioLock")&&(this.addFocusable(a.getById(u),5),this.addFocusable(a.getById(p),5));this.commitContent=r},onHide:function(){this.preview&&this.commitContent(8,this.preview);this.originalElement&&(this.originalElement.removeListener("load",q),this.originalElement.removeListener("error",h),this.originalElement.removeListener("abort",h),this.originalElement.remove(),this.originalElement=
|
||||
!1);delete this.imageElement},contents:[{id:"info",label:c.lang.image.infoTab,accessKey:"I",elements:[{type:"vbox",padding:0,children:[{type:"hbox",widths:["280px","110px"],align:"right",children:[{id:"txtUrl",type:"text",label:c.lang.common.url,required:!0,onChange:function(){var a=this.getDialog(),b=this.getValue();if(0<b.length){var a=this.getDialog(),d=a.originalElement;a.preview.removeStyle("display");d.setCustomData("isReady","false");var c=CKEDITOR.document.getById(m);c&&c.setStyle("display",
|
||||
"");d.on("load",q,a);d.on("error",h,a);d.on("abort",h,a);d.setAttribute("src",b);t.setAttribute("src",b);a.preview.setAttribute("src",t.$.src);g(a)}else a.preview&&(a.preview.removeAttribute("src"),a.preview.setStyle("display","none"))},setup:function(a,b){if(a==f){var d=b.data("cke-saved-src")||b.getAttribute("src");this.getDialog().dontResetSize=!0;this.setValue(d);this.setInitValue()}},commit:function(a,b){a==f&&(this.getValue()||this.isChanged())?(b.data("cke-saved-src",this.getValue()),b.setAttribute("src",
|
||||
this.getValue())):8==a&&(b.setAttribute("src",""),b.removeAttribute("src"))},validate:CKEDITOR.dialog.validate.notEmpty(c.lang.image.urlMissing)},{type:"button",id:"browse",style:"display:inline-block;margin-top:10px;",align:"center",label:c.lang.common.browseServer,hidden:!0,filebrowser:"info:txtUrl"}]}]},{id:"txtAlt",type:"text",label:c.lang.image.alt,accessKey:"T","default":"",onChange:function(){g(this.getDialog())},setup:function(a,b){a==f&&this.setValue(b.getAttribute("alt"))},commit:function(a,
|
||||
b){a==f?(this.getValue()||this.isChanged())&&b.setAttribute("alt",this.getValue()):4==a?b.setAttribute("alt",this.getValue()):8==a&&b.removeAttribute("alt")}},{type:"hbox",children:[{id:"basic",type:"vbox",children:[{type:"hbox",requiredContent:"img{width,height}",widths:["50%","50%"],children:[{type:"vbox",padding:1,children:[{type:"text",width:"45px",id:"txtWidth",label:c.lang.common.width,onKeyUp:w,onChange:function(){i.call(this,"advanced:txtdlgGenStyle")},validate:function(){var a=this.getValue().match(v);
|
||||
(a=!!(a&&0!==parseInt(a[1],10)))||alert(c.lang.common.invalidWidth);return a},setup:y,commit:function(a,b,d){var c=this.getValue();a==f?(c?b.setStyle("width",CKEDITOR.tools.cssLength(c)):b.removeStyle("width"),!d&&b.removeAttribute("width")):4==a?c.match(k)?b.setStyle("width",CKEDITOR.tools.cssLength(c)):(a=this.getDialog().originalElement,"true"==a.getCustomData("isReady")&&b.setStyle("width",a.$.width+"px")):8==a&&(b.removeAttribute("width"),b.removeStyle("width"))}},{type:"text",id:"txtHeight",
|
||||
width:"45px",label:c.lang.common.height,onKeyUp:w,onChange:function(){i.call(this,"advanced:txtdlgGenStyle")},validate:function(){var a=this.getValue().match(v);(a=!!(a&&0!==parseInt(a[1],10)))||alert(c.lang.common.invalidHeight);return a},setup:y,commit:function(a,b,d){var c=this.getValue();a==f?(c?b.setStyle("height",CKEDITOR.tools.cssLength(c)):b.removeStyle("height"),!d&&b.removeAttribute("height")):4==a?c.match(k)?b.setStyle("height",CKEDITOR.tools.cssLength(c)):(a=this.getDialog().originalElement,
|
||||
"true"==a.getCustomData("isReady")&&b.setStyle("height",a.$.height+"px")):8==a&&(b.removeAttribute("height"),b.removeStyle("height"))}}]},{id:"ratioLock",type:"html",style:"margin-top:30px;width:40px;height:40px;",onLoad:function(){var a=CKEDITOR.document.getById(u),b=CKEDITOR.document.getById(p);a&&(a.on("click",function(a){x(this);a.data&&a.data.preventDefault()},this.getDialog()),a.on("mouseover",function(){this.addClass("cke_btn_over")},a),a.on("mouseout",function(){this.removeClass("cke_btn_over")},
|
||||
a));b&&(b.on("click",function(a){l(this);var b=this.originalElement,c=this.getValueOf("info","txtWidth");if(b.getCustomData("isReady")=="true"&&c){b=b.$.height/b.$.width*c;if(!isNaN(b)){this.setValueOf("info","txtHeight",Math.round(b));g(this)}}a.data&&a.data.preventDefault()},this.getDialog()),b.on("mouseover",function(){this.addClass("cke_btn_over")},b),b.on("mouseout",function(){this.removeClass("cke_btn_over")},b))},html:'<div><a href="javascript:void(0)" tabindex="-1" title="'+c.lang.image.lockRatio+
|
||||
'" class="cke_btn_locked" id="'+p+'" role="checkbox"><span class="cke_icon"></span><span class="cke_label">'+c.lang.image.lockRatio+'</span></a><a href="javascript:void(0)" tabindex="-1" title="'+c.lang.image.resetSize+'" class="cke_btn_reset" id="'+u+'" role="button"><span class="cke_label">'+c.lang.image.resetSize+"</span></a></div>"}]},{type:"vbox",padding:1,children:[{type:"text",id:"txtBorder",requiredContent:"img{border-width}",width:"60px",label:c.lang.image.border,"default":"",onKeyUp:function(){g(this.getDialog())},
|
||||
onChange:function(){i.call(this,"advanced:txtdlgGenStyle")},validate:CKEDITOR.dialog.validate.integer(c.lang.image.validateBorder),setup:function(a,b){if(a==f){var d;d=(d=(d=b.getStyle("border-width"))&&d.match(/^(\d+px)(?: \1 \1 \1)?$/))&&parseInt(d[1],10);isNaN(parseInt(d,10))&&(d=b.getAttribute("border"));this.setValue(d)}},commit:function(a,b,d){var c=parseInt(this.getValue(),10);a==f||4==a?(isNaN(c)?!c&&this.isChanged()&&b.removeStyle("border"):(b.setStyle("border-width",CKEDITOR.tools.cssLength(c)),
|
||||
b.setStyle("border-style","solid")),!d&&a==f&&b.removeAttribute("border")):8==a&&(b.removeAttribute("border"),b.removeStyle("border-width"),b.removeStyle("border-style"),b.removeStyle("border-color"))}},{type:"text",id:"txtHSpace",requiredContent:"img{margin-left,margin-right}",width:"60px",label:c.lang.image.hSpace,"default":"",onKeyUp:function(){g(this.getDialog())},onChange:function(){i.call(this,"advanced:txtdlgGenStyle")},validate:CKEDITOR.dialog.validate.integer(c.lang.image.validateHSpace),
|
||||
setup:function(a,b){if(a==f){var d,c;d=b.getStyle("margin-left");c=b.getStyle("margin-right");d=d&&d.match(o);c=c&&c.match(o);d=parseInt(d,10);c=parseInt(c,10);d=d==c&&d;isNaN(parseInt(d,10))&&(d=b.getAttribute("hspace"));this.setValue(d)}},commit:function(a,b,c){var e=parseInt(this.getValue(),10);a==f||4==a?(isNaN(e)?!e&&this.isChanged()&&(b.removeStyle("margin-left"),b.removeStyle("margin-right")):(b.setStyle("margin-left",CKEDITOR.tools.cssLength(e)),b.setStyle("margin-right",CKEDITOR.tools.cssLength(e))),
|
||||
!c&&a==f&&b.removeAttribute("hspace")):8==a&&(b.removeAttribute("hspace"),b.removeStyle("margin-left"),b.removeStyle("margin-right"))}},{type:"text",id:"txtVSpace",requiredContent:"img{margin-top,margin-bottom}",width:"60px",label:c.lang.image.vSpace,"default":"",onKeyUp:function(){g(this.getDialog())},onChange:function(){i.call(this,"advanced:txtdlgGenStyle")},validate:CKEDITOR.dialog.validate.integer(c.lang.image.validateVSpace),setup:function(a,b){if(a==f){var c,e;c=b.getStyle("margin-top");e=
|
||||
b.getStyle("margin-bottom");c=c&&c.match(o);e=e&&e.match(o);c=parseInt(c,10);e=parseInt(e,10);c=c==e&&c;isNaN(parseInt(c,10))&&(c=b.getAttribute("vspace"));this.setValue(c)}},commit:function(a,b,c){var e=parseInt(this.getValue(),10);a==f||4==a?(isNaN(e)?!e&&this.isChanged()&&(b.removeStyle("margin-top"),b.removeStyle("margin-bottom")):(b.setStyle("margin-top",CKEDITOR.tools.cssLength(e)),b.setStyle("margin-bottom",CKEDITOR.tools.cssLength(e))),!c&&a==f&&b.removeAttribute("vspace")):8==a&&(b.removeAttribute("vspace"),
|
||||
b.removeStyle("margin-top"),b.removeStyle("margin-bottom"))}},{id:"cmbAlign",requiredContent:"img{float}",type:"select",widths:["35%","65%"],style:"width:90px",label:c.lang.common.align,"default":"",items:[[c.lang.common.notSet,""],[c.lang.common.alignLeft,"left"],[c.lang.common.alignRight,"right"]],onChange:function(){g(this.getDialog());i.call(this,"advanced:txtdlgGenStyle")},setup:function(a,b){if(a==f){var c=b.getStyle("float");switch(c){case "inherit":case "none":c=""}!c&&(c=(b.getAttribute("align")||
|
||||
"").toLowerCase());this.setValue(c)}},commit:function(a,b,c){var e=this.getValue();if(a==f||4==a){if(e?b.setStyle("float",e):b.removeStyle("float"),!c&&a==f)switch(e=(b.getAttribute("align")||"").toLowerCase(),e){case "left":case "right":b.removeAttribute("align")}}else 8==a&&b.removeStyle("float")}}]}]},{type:"vbox",height:"250px",children:[{type:"html",id:"htmlPreview",style:"width:95%;",html:"<div>"+CKEDITOR.tools.htmlEncode(c.lang.common.preview)+'<br><div id="'+m+'" class="ImagePreviewLoader" style="display:none"><div class="loading"> </div></div><div class="ImagePreviewBox"><table><tr><td><a href="javascript:void(0)" target="_blank" onclick="return false;" id="'+
|
||||
"");d.on("load",q,a);d.on("error",h,a);d.on("abort",h,a);d.setAttribute("src",b);t.setAttribute("src",b);a.preview.setAttribute("src",t.$.src);g(a)}else a.preview&&(a.preview.removeAttribute("src"),a.preview.setStyle("display","none"))},setup:function(a,b){if(a==e){var d=b.data("cke-saved-src")||b.getAttribute("src");this.getDialog().dontResetSize=!0;this.setValue(d);this.setInitValue()}},commit:function(a,b){a==e&&(this.getValue()||this.isChanged())?(b.data("cke-saved-src",this.getValue()),b.setAttribute("src",
|
||||
this.getValue())):8==a&&(b.setAttribute("src",""),b.removeAttribute("src"))},validate:CKEDITOR.dialog.validate.notEmpty(c.lang.image.urlMissing)},{type:"button",id:"browse",style:"display:inline-block;margin-top:14px;",align:"center",label:c.lang.common.browseServer,hidden:!0,filebrowser:"info:txtUrl"}]}]},{id:"txtAlt",type:"text",label:c.lang.image.alt,accessKey:"T","default":"",onChange:function(){g(this.getDialog())},setup:function(a,b){a==e&&this.setValue(b.getAttribute("alt"))},commit:function(a,
|
||||
b){a==e?(this.getValue()||this.isChanged())&&b.setAttribute("alt",this.getValue()):4==a?b.setAttribute("alt",this.getValue()):8==a&&b.removeAttribute("alt")}},{type:"hbox",children:[{id:"basic",type:"vbox",children:[{type:"hbox",requiredContent:"img{width,height}",widths:["50%","50%"],children:[{type:"vbox",padding:1,children:[{type:"text",width:"45px",id:"txtWidth",label:c.lang.common.width,onKeyUp:w,onChange:function(){i.call(this,"advanced:txtdlgGenStyle")},validate:function(){var a=this.getValue().match(v);
|
||||
(a=!!(a&&0!==parseInt(a[1],10)))||alert(c.lang.common.invalidWidth);return a},setup:y,commit:function(a,b,d){var f=this.getValue();a==e?(f&&c.activeFilter.check("img{width,height}")?b.setStyle("width",CKEDITOR.tools.cssLength(f)):b.removeStyle("width"),!d&&b.removeAttribute("width")):4==a?f.match(k)?b.setStyle("width",CKEDITOR.tools.cssLength(f)):(a=this.getDialog().originalElement,"true"==a.getCustomData("isReady")&&b.setStyle("width",a.$.width+"px")):8==a&&(b.removeAttribute("width"),b.removeStyle("width"))}},
|
||||
{type:"text",id:"txtHeight",width:"45px",label:c.lang.common.height,onKeyUp:w,onChange:function(){i.call(this,"advanced:txtdlgGenStyle")},validate:function(){var a=this.getValue().match(v);(a=!!(a&&0!==parseInt(a[1],10)))||alert(c.lang.common.invalidHeight);return a},setup:y,commit:function(a,b,d){var f=this.getValue();a==e?(f&&c.activeFilter.check("img{width,height}")?b.setStyle("height",CKEDITOR.tools.cssLength(f)):b.removeStyle("height"),!d&&b.removeAttribute("height")):4==a?f.match(k)?b.setStyle("height",
|
||||
CKEDITOR.tools.cssLength(f)):(a=this.getDialog().originalElement,"true"==a.getCustomData("isReady")&&b.setStyle("height",a.$.height+"px")):8==a&&(b.removeAttribute("height"),b.removeStyle("height"))}}]},{id:"ratioLock",type:"html",style:"margin-top:30px;width:40px;height:40px;",onLoad:function(){var a=CKEDITOR.document.getById(u),b=CKEDITOR.document.getById(p);a&&(a.on("click",function(a){x(this);a.data&&a.data.preventDefault()},this.getDialog()),a.on("mouseover",function(){this.addClass("cke_btn_over")},
|
||||
a),a.on("mouseout",function(){this.removeClass("cke_btn_over")},a));b&&(b.on("click",function(a){l(this);var b=this.originalElement,c=this.getValueOf("info","txtWidth");if(b.getCustomData("isReady")=="true"&&c){b=b.$.height/b.$.width*c;if(!isNaN(b)){this.setValueOf("info","txtHeight",Math.round(b));g(this)}}a.data&&a.data.preventDefault()},this.getDialog()),b.on("mouseover",function(){this.addClass("cke_btn_over")},b),b.on("mouseout",function(){this.removeClass("cke_btn_over")},b))},html:'<div><a href="javascript:void(0)" tabindex="-1" title="'+
|
||||
c.lang.image.lockRatio+'" class="cke_btn_locked" id="'+p+'" role="checkbox"><span class="cke_icon"></span><span class="cke_label">'+c.lang.image.lockRatio+'</span></a><a href="javascript:void(0)" tabindex="-1" title="'+c.lang.image.resetSize+'" class="cke_btn_reset" id="'+u+'" role="button"><span class="cke_label">'+c.lang.image.resetSize+"</span></a></div>"}]},{type:"vbox",padding:1,children:[{type:"text",id:"txtBorder",requiredContent:"img{border-width}",width:"60px",label:c.lang.image.border,"default":"",
|
||||
onKeyUp:function(){g(this.getDialog())},onChange:function(){i.call(this,"advanced:txtdlgGenStyle")},validate:CKEDITOR.dialog.validate.integer(c.lang.image.validateBorder),setup:function(a,b){if(a==e){var d;d=(d=(d=b.getStyle("border-width"))&&d.match(/^(\d+px)(?: \1 \1 \1)?$/))&&parseInt(d[1],10);isNaN(parseInt(d,10))&&(d=b.getAttribute("border"));this.setValue(d)}},commit:function(a,b,d){var c=parseInt(this.getValue(),10);a==e||4==a?(isNaN(c)?!c&&this.isChanged()&&b.removeStyle("border"):(b.setStyle("border-width",
|
||||
CKEDITOR.tools.cssLength(c)),b.setStyle("border-style","solid")),!d&&a==e&&b.removeAttribute("border")):8==a&&(b.removeAttribute("border"),b.removeStyle("border-width"),b.removeStyle("border-style"),b.removeStyle("border-color"))}},{type:"text",id:"txtHSpace",requiredContent:"img{margin-left,margin-right}",width:"60px",label:c.lang.image.hSpace,"default":"",onKeyUp:function(){g(this.getDialog())},onChange:function(){i.call(this,"advanced:txtdlgGenStyle")},validate:CKEDITOR.dialog.validate.integer(c.lang.image.validateHSpace),
|
||||
setup:function(a,b){if(a==e){var d,c;d=b.getStyle("margin-left");c=b.getStyle("margin-right");d=d&&d.match(o);c=c&&c.match(o);d=parseInt(d,10);c=parseInt(c,10);d=d==c&&d;isNaN(parseInt(d,10))&&(d=b.getAttribute("hspace"));this.setValue(d)}},commit:function(a,b,d){var c=parseInt(this.getValue(),10);a==e||4==a?(isNaN(c)?!c&&this.isChanged()&&(b.removeStyle("margin-left"),b.removeStyle("margin-right")):(b.setStyle("margin-left",CKEDITOR.tools.cssLength(c)),b.setStyle("margin-right",CKEDITOR.tools.cssLength(c))),
|
||||
!d&&a==e&&b.removeAttribute("hspace")):8==a&&(b.removeAttribute("hspace"),b.removeStyle("margin-left"),b.removeStyle("margin-right"))}},{type:"text",id:"txtVSpace",requiredContent:"img{margin-top,margin-bottom}",width:"60px",label:c.lang.image.vSpace,"default":"",onKeyUp:function(){g(this.getDialog())},onChange:function(){i.call(this,"advanced:txtdlgGenStyle")},validate:CKEDITOR.dialog.validate.integer(c.lang.image.validateVSpace),setup:function(a,b){if(a==e){var d,c;d=b.getStyle("margin-top");c=
|
||||
b.getStyle("margin-bottom");d=d&&d.match(o);c=c&&c.match(o);d=parseInt(d,10);c=parseInt(c,10);d=d==c&&d;isNaN(parseInt(d,10))&&(d=b.getAttribute("vspace"));this.setValue(d)}},commit:function(a,b,c){var f=parseInt(this.getValue(),10);a==e||4==a?(isNaN(f)?!f&&this.isChanged()&&(b.removeStyle("margin-top"),b.removeStyle("margin-bottom")):(b.setStyle("margin-top",CKEDITOR.tools.cssLength(f)),b.setStyle("margin-bottom",CKEDITOR.tools.cssLength(f))),!c&&a==e&&b.removeAttribute("vspace")):8==a&&(b.removeAttribute("vspace"),
|
||||
b.removeStyle("margin-top"),b.removeStyle("margin-bottom"))}},{id:"cmbAlign",requiredContent:"img{float}",type:"select",widths:["35%","65%"],style:"width:90px",label:c.lang.common.align,"default":"",items:[[c.lang.common.notSet,""],[c.lang.common.alignLeft,"left"],[c.lang.common.alignRight,"right"]],onChange:function(){g(this.getDialog());i.call(this,"advanced:txtdlgGenStyle")},setup:function(a,b){if(a==e){var c=b.getStyle("float");switch(c){case "inherit":case "none":c=""}!c&&(c=(b.getAttribute("align")||
|
||||
"").toLowerCase());this.setValue(c)}},commit:function(a,b,c){var f=this.getValue();if(a==e||4==a){if(f?b.setStyle("float",f):b.removeStyle("float"),!c&&a==e)switch(f=(b.getAttribute("align")||"").toLowerCase(),f){case "left":case "right":b.removeAttribute("align")}}else 8==a&&b.removeStyle("float")}}]}]},{type:"vbox",height:"250px",children:[{type:"html",id:"htmlPreview",style:"width:95%;",html:"<div>"+CKEDITOR.tools.htmlEncode(c.lang.common.preview)+'<br><div id="'+m+'" class="ImagePreviewLoader" style="display:none"><div class="loading"> </div></div><div class="ImagePreviewBox"><table><tr><td><a href="javascript:void(0)" target="_blank" onclick="return false;" id="'+
|
||||
A+'"><img id="'+z+'" alt="" /></a>'+(c.config.image_previewText||"Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Maecenas feugiat consequat diam. Maecenas metus. Vivamus diam purus, cursus a, commodo non, facilisis vitae, nulla. Aenean dictum lacinia tortor. Nunc iaculis, nibh non iaculis aliquam, orci felis euismod neque, sed ornare massa mauris sed velit. Nulla pretium mi et risus. Fusce mi pede, tempor id, cursus ac, ullamcorper nec, enim. Sed tortor. Curabitur molestie. Duis velit augue, condimentum at, ultrices a, luctus ut, orci. Donec pellentesque egestas eros. Integer cursus, augue in cursus faucibus, eros pede bibendum sem, in tempus tellus justo quis ligula. Etiam eget tortor. Vestibulum rutrum, est ut placerat elementum, lectus nisl aliquam velit, tempor aliquam eros nunc nonummy metus. In eros metus, gravida a, gravida sed, lobortis id, turpis. Ut ultrices, ipsum at venenatis fringilla, sem nulla lacinia tellus, eget aliquet turpis mauris non enim. Nam turpis. Suspendisse lacinia. Curabitur ac tortor ut ipsum egestas elementum. Nunc imperdiet gravida mauris.")+
|
||||
"</td></tr></table></div></div>"}]}]}]},{id:"Link",requiredContent:"a[href]",label:c.lang.image.linkTab,padding:0,elements:[{id:"txtUrl",type:"text",label:c.lang.common.url,style:"width: 100%","default":"",setup:function(a,b){if(2==a){var c=b.data("cke-saved-href");c||(c=b.getAttribute("href"));this.setValue(c)}},commit:function(a,b){if(2==a&&(this.getValue()||this.isChanged())){var d=decodeURI(this.getValue());b.data("cke-saved-href",d);b.setAttribute("href",d);if(this.getValue()||!c.config.image_removeLinkByEmptyURL)this.getDialog().addLink=
|
||||
"</td></tr></table></div></div>"}]}]}]},{id:"Link",requiredContent:"a[href]",label:c.lang.image.linkTab,padding:0,elements:[{id:"txtUrl",type:"text",label:c.lang.common.url,style:"width: 100%","default":"",setup:function(a,b){if(2==a){var c=b.data("cke-saved-href");c||(c=b.getAttribute("href"));this.setValue(c)}},commit:function(a,b){if(2==a&&(this.getValue()||this.isChanged())){var d=this.getValue();b.data("cke-saved-href",d);b.setAttribute("href",d);if(this.getValue()||!c.config.image_removeLinkByEmptyURL)this.getDialog().addLink=
|
||||
!0}}},{type:"button",id:"browse",filebrowser:{action:"Browse",target:"Link:txtUrl",url:c.config.filebrowserImageBrowseLinkUrl},style:"float:right",hidden:!0,label:c.lang.common.browseServer},{id:"cmbTarget",type:"select",requiredContent:"a[target]",label:c.lang.common.target,"default":"",items:[[c.lang.common.notSet,""],[c.lang.common.targetNew,"_blank"],[c.lang.common.targetTop,"_top"],[c.lang.common.targetSelf,"_self"],[c.lang.common.targetParent,"_parent"]],setup:function(a,b){2==a&&this.setValue(b.getAttribute("target")||
|
||||
"")},commit:function(a,b){2==a&&(this.getValue()||this.isChanged())&&b.setAttribute("target",this.getValue())}}]},{id:"Upload",hidden:!0,filebrowser:"uploadButton",label:c.lang.image.upload,elements:[{type:"file",id:"upload",label:c.lang.image.btnUpload,style:"height:40px",size:38},{type:"fileButton",id:"uploadButton",filebrowser:"info:txtUrl",label:c.lang.image.btnUpload,"for":["Upload","upload"]}]},{id:"advanced",label:c.lang.common.advancedTab,elements:[{type:"hbox",widths:["50%","25%","25%"],
|
||||
children:[{type:"text",id:"linkId",requiredContent:"img[id]",label:c.lang.common.id,setup:function(a,b){a==f&&this.setValue(b.getAttribute("id"))},commit:function(a,b){a==f&&(this.getValue()||this.isChanged())&&b.setAttribute("id",this.getValue())}},{id:"cmbLangDir",type:"select",requiredContent:"img[dir]",style:"width : 100px;",label:c.lang.common.langDir,"default":"",items:[[c.lang.common.notSet,""],[c.lang.common.langDirLtr,"ltr"],[c.lang.common.langDirRtl,"rtl"]],setup:function(a,b){a==f&&this.setValue(b.getAttribute("dir"))},
|
||||
commit:function(a,b){a==f&&(this.getValue()||this.isChanged())&&b.setAttribute("dir",this.getValue())}},{type:"text",id:"txtLangCode",requiredContent:"img[lang]",label:c.lang.common.langCode,"default":"",setup:function(a,b){a==f&&this.setValue(b.getAttribute("lang"))},commit:function(a,b){a==f&&(this.getValue()||this.isChanged())&&b.setAttribute("lang",this.getValue())}}]},{type:"text",id:"txtGenLongDescr",requiredContent:"img[longdesc]",label:c.lang.common.longDescr,setup:function(a,b){a==f&&this.setValue(b.getAttribute("longDesc"))},
|
||||
commit:function(a,b){a==f&&(this.getValue()||this.isChanged())&&b.setAttribute("longDesc",this.getValue())}},{type:"hbox",widths:["50%","50%"],children:[{type:"text",id:"txtGenClass",requiredContent:"img(cke-xyz)",label:c.lang.common.cssClass,"default":"",setup:function(a,b){a==f&&this.setValue(b.getAttribute("class"))},commit:function(a,b){a==f&&(this.getValue()||this.isChanged())&&b.setAttribute("class",this.getValue())}},{type:"text",id:"txtGenTitle",requiredContent:"img[title]",label:c.lang.common.advisoryTitle,
|
||||
"default":"",onChange:function(){g(this.getDialog())},setup:function(a,b){a==f&&this.setValue(b.getAttribute("title"))},commit:function(a,b){a==f?(this.getValue()||this.isChanged())&&b.setAttribute("title",this.getValue()):4==a?b.setAttribute("title",this.getValue()):8==a&&b.removeAttribute("title")}}]},{type:"text",id:"txtdlgGenStyle",requiredContent:"img{cke-xyz}",label:c.lang.common.cssStyle,validate:CKEDITOR.dialog.validate.inlineStyle(c.lang.common.invalidInlineStyle),"default":"",setup:function(a,
|
||||
b){if(a==f){var c=b.getAttribute("style");!c&&b.$.style.cssText&&(c=b.$.style.cssText);this.setValue(c);var e=b.$.style.height,c=b.$.style.width,e=(e?e:"").match(k),c=(c?c:"").match(k);this.attributesInStyle={height:!!e,width:!!c}}},onChange:function(){i.call(this,"info:cmbFloat info:cmbAlign info:txtVSpace info:txtHSpace info:txtBorder info:txtWidth info:txtHeight".split(" "));g(this)},commit:function(a,b){a==f&&(this.getValue()||this.isChanged())&&b.setAttribute("style",this.getValue())}}]}]}};
|
||||
children:[{type:"text",id:"linkId",requiredContent:"img[id]",label:c.lang.common.id,setup:function(a,b){a==e&&this.setValue(b.getAttribute("id"))},commit:function(a,b){a==e&&(this.getValue()||this.isChanged())&&b.setAttribute("id",this.getValue())}},{id:"cmbLangDir",type:"select",requiredContent:"img[dir]",style:"width : 100px;",label:c.lang.common.langDir,"default":"",items:[[c.lang.common.notSet,""],[c.lang.common.langDirLtr,"ltr"],[c.lang.common.langDirRtl,"rtl"]],setup:function(a,b){a==e&&this.setValue(b.getAttribute("dir"))},
|
||||
commit:function(a,b){a==e&&(this.getValue()||this.isChanged())&&b.setAttribute("dir",this.getValue())}},{type:"text",id:"txtLangCode",requiredContent:"img[lang]",label:c.lang.common.langCode,"default":"",setup:function(a,b){a==e&&this.setValue(b.getAttribute("lang"))},commit:function(a,b){a==e&&(this.getValue()||this.isChanged())&&b.setAttribute("lang",this.getValue())}}]},{type:"text",id:"txtGenLongDescr",requiredContent:"img[longdesc]",label:c.lang.common.longDescr,setup:function(a,b){a==e&&this.setValue(b.getAttribute("longDesc"))},
|
||||
commit:function(a,b){a==e&&(this.getValue()||this.isChanged())&&b.setAttribute("longDesc",this.getValue())}},{type:"hbox",widths:["50%","50%"],children:[{type:"text",id:"txtGenClass",requiredContent:"img(cke-xyz)",label:c.lang.common.cssClass,"default":"",setup:function(a,b){a==e&&this.setValue(b.getAttribute("class"))},commit:function(a,b){a==e&&(this.getValue()||this.isChanged())&&b.setAttribute("class",this.getValue())}},{type:"text",id:"txtGenTitle",requiredContent:"img[title]",label:c.lang.common.advisoryTitle,
|
||||
"default":"",onChange:function(){g(this.getDialog())},setup:function(a,b){a==e&&this.setValue(b.getAttribute("title"))},commit:function(a,b){a==e?(this.getValue()||this.isChanged())&&b.setAttribute("title",this.getValue()):4==a?b.setAttribute("title",this.getValue()):8==a&&b.removeAttribute("title")}}]},{type:"text",id:"txtdlgGenStyle",requiredContent:"img{cke-xyz}",label:c.lang.common.cssStyle,validate:CKEDITOR.dialog.validate.inlineStyle(c.lang.common.invalidInlineStyle),"default":"",setup:function(a,
|
||||
b){if(a==e){var c=b.getAttribute("style");!c&&b.$.style.cssText&&(c=b.$.style.cssText);this.setValue(c);var f=b.$.style.height,c=b.$.style.width,f=(f?f:"").match(k),c=(c?c:"").match(k);this.attributesInStyle={height:!!f,width:!!c}}},onChange:function(){i.call(this,"info:cmbFloat info:cmbAlign info:txtVSpace info:txtHSpace info:txtBorder info:txtWidth info:txtHeight".split(" "));g(this)},commit:function(a,b){a==e&&(this.getValue()||this.isChanged())&&b.setAttribute("style",this.getValue())}}]}]}};
|
||||
CKEDITOR.dialog.add("image",function(c){return r(c,"image")});CKEDITOR.dialog.add("imagebutton",function(c){return r(c,"imagebutton")})})();
|
||||
@@ -7,11 +7,11 @@ g.lang.dir,k=g.plugins.colordialog;return{title:c.title,minWidth:CKEDITOR.env.ie
|
||||
"widthType").getElement(),b=this.getInputElement(),c=b.getAttribute("aria-labelledby");b.setAttribute("aria-labelledby",[c,a.$.id].join(" "))},setup:d(function(a){var b=parseInt(a.getAttribute("width"),10),a=parseInt(a.getStyle("width"),10);return!isNaN(a)?a:!isNaN(b)?b:""}),commit:function(a){var b=parseInt(this.getValue(),10),c=this.getDialog().getValueOf("info","widthType")||j(a);isNaN(b)?a.removeStyle("width"):a.setStyle("width",b+c);a.removeAttribute("width")},"default":""},{type:"select",id:"widthType",
|
||||
label:g.lang.table.widthUnit,labelStyle:"visibility:hidden","default":"px",items:[[h.widthPx,"px"],[h.widthPc,"%"]],setup:d(j)}]},{type:"hbox",widths:["70%","30%"],children:[{type:"text",id:"height",label:e.height,width:"100px","default":"",validate:i.number(c.invalidHeight),onLoad:function(){var a=this.getDialog().getContentElement("info","htmlHeightType").getElement(),b=this.getInputElement(),c=b.getAttribute("aria-labelledby");b.setAttribute("aria-labelledby",[c,a.$.id].join(" "))},setup:d(function(a){var b=
|
||||
parseInt(a.getAttribute("height"),10),a=parseInt(a.getStyle("height"),10);return!isNaN(a)?a:!isNaN(b)?b:""}),commit:function(a){var b=parseInt(this.getValue(),10);isNaN(b)?a.removeStyle("height"):a.setStyle("height",CKEDITOR.tools.cssLength(b));a.removeAttribute("height")}},{id:"htmlHeightType",type:"html",html:"<br />"+h.widthPx}]},f,{type:"select",id:"wordWrap",label:c.wordWrap,"default":"yes",items:[[c.yes,"yes"],[c.no,"no"]],setup:d(function(a){var b=a.getAttribute("noWrap");if("nowrap"==a.getStyle("white-space")||
|
||||
b)return"no"}),commit:function(a){"no"==this.getValue()?a.setStyle("white-space","nowrap"):a.removeStyle("white-space");a.removeAttribute("noWrap")}},f,{type:"select",id:"hAlign",label:c.hAlign,"default":"",items:[[e.notSet,""],[e.alignLeft,"left"],[e.alignCenter,"center"],[e.alignRight,"right"]],setup:d(function(a){var b=a.getAttribute("align");return a.getStyle("text-align")||b||""}),commit:function(a){var b=this.getValue();b?a.setStyle("text-align",b):a.removeStyle("text-align");a.removeAttribute("align")}},
|
||||
{type:"select",id:"vAlign",label:c.vAlign,"default":"",items:[[e.notSet,""],[e.alignTop,"top"],[e.alignMiddle,"middle"],[e.alignBottom,"bottom"],[c.alignBaseline,"baseline"]],setup:d(function(a){var b=a.getAttribute("vAlign"),a=a.getStyle("vertical-align");switch(a){case "top":case "middle":case "bottom":case "baseline":break;default:a=""}return a||b||""}),commit:function(a){var b=this.getValue();b?a.setStyle("vertical-align",b):a.removeStyle("vertical-align");a.removeAttribute("vAlign")}}]},f,{type:"vbox",
|
||||
padding:0,children:[{type:"select",id:"cellType",label:c.cellType,"default":"td",items:[[c.data,"td"],[c.header,"th"]],setup:d(function(a){return a.getName()}),commit:function(a){a.renameNode(this.getValue())}},f,{type:"text",id:"rowSpan",label:c.rowSpan,"default":"",validate:i.integer(c.invalidRowSpan),setup:d(function(a){if((a=parseInt(a.getAttribute("rowSpan"),10))&&1!=a)return a}),commit:function(a){var b=parseInt(this.getValue(),10);b&&1!=b?a.setAttribute("rowSpan",this.getValue()):a.removeAttribute("rowSpan")}},
|
||||
{type:"text",id:"colSpan",label:c.colSpan,"default":"",validate:i.integer(c.invalidColSpan),setup:d(function(a){if((a=parseInt(a.getAttribute("colSpan"),10))&&1!=a)return a}),commit:function(a){var b=parseInt(this.getValue(),10);b&&1!=b?a.setAttribute("colSpan",this.getValue()):a.removeAttribute("colSpan")}},f,{type:"hbox",padding:0,widths:["60%","40%"],children:[{type:"text",id:"bgColor",label:c.bgColor,"default":"",setup:d(function(a){var b=a.getAttribute("bgColor");return a.getStyle("background-color")||
|
||||
b}),commit:function(a){this.getValue()?a.setStyle("background-color",this.getValue()):a.removeStyle("background-color");a.removeAttribute("bgColor")}},k?{type:"button",id:"bgColorChoose","class":"colorChooser",label:c.chooseColor,onLoad:function(){this.getElement().getParent().setStyle("vertical-align","bottom")},onClick:function(){g.getColorFromDialog(function(a){a&&this.getDialog().getContentElement("info","bgColor").setValue(a);this.focus()},this)}}:f]},f,{type:"hbox",padding:0,widths:["60%","40%"],
|
||||
children:[{type:"text",id:"borderColor",label:c.borderColor,"default":"",setup:d(function(a){var b=a.getAttribute("borderColor");return a.getStyle("border-color")||b}),commit:function(a){this.getValue()?a.setStyle("border-color",this.getValue()):a.removeStyle("border-color");a.removeAttribute("borderColor")}},k?{type:"button",id:"borderColorChoose","class":"colorChooser",label:c.chooseColor,style:(m?"margin-right":"margin-left")+": 10px",onLoad:function(){this.getElement().getParent().setStyle("vertical-align",
|
||||
b)return"no"}),commit:function(a){"no"==this.getValue()?a.setStyle("white-space","nowrap"):a.removeStyle("white-space");a.removeAttribute("noWrap")}},f,{type:"select",id:"hAlign",label:c.hAlign,"default":"",items:[[e.notSet,""],[e.alignLeft,"left"],[e.alignCenter,"center"],[e.alignRight,"right"],[e.alignJustify,"justify"]],setup:d(function(a){var b=a.getAttribute("align");return a.getStyle("text-align")||b||""}),commit:function(a){var b=this.getValue();b?a.setStyle("text-align",b):a.removeStyle("text-align");
|
||||
a.removeAttribute("align")}},{type:"select",id:"vAlign",label:c.vAlign,"default":"",items:[[e.notSet,""],[e.alignTop,"top"],[e.alignMiddle,"middle"],[e.alignBottom,"bottom"],[c.alignBaseline,"baseline"]],setup:d(function(a){var b=a.getAttribute("vAlign"),a=a.getStyle("vertical-align");switch(a){case "top":case "middle":case "bottom":case "baseline":break;default:a=""}return a||b||""}),commit:function(a){var b=this.getValue();b?a.setStyle("vertical-align",b):a.removeStyle("vertical-align");a.removeAttribute("vAlign")}}]},
|
||||
f,{type:"vbox",padding:0,children:[{type:"select",id:"cellType",label:c.cellType,"default":"td",items:[[c.data,"td"],[c.header,"th"]],setup:d(function(a){return a.getName()}),commit:function(a){a.renameNode(this.getValue())}},f,{type:"text",id:"rowSpan",label:c.rowSpan,"default":"",validate:i.integer(c.invalidRowSpan),setup:d(function(a){if((a=parseInt(a.getAttribute("rowSpan"),10))&&1!=a)return a}),commit:function(a){var b=parseInt(this.getValue(),10);b&&1!=b?a.setAttribute("rowSpan",this.getValue()):
|
||||
a.removeAttribute("rowSpan")}},{type:"text",id:"colSpan",label:c.colSpan,"default":"",validate:i.integer(c.invalidColSpan),setup:d(function(a){if((a=parseInt(a.getAttribute("colSpan"),10))&&1!=a)return a}),commit:function(a){var b=parseInt(this.getValue(),10);b&&1!=b?a.setAttribute("colSpan",this.getValue()):a.removeAttribute("colSpan")}},f,{type:"hbox",padding:0,widths:["60%","40%"],children:[{type:"text",id:"bgColor",label:c.bgColor,"default":"",setup:d(function(a){var b=a.getAttribute("bgColor");
|
||||
return a.getStyle("background-color")||b}),commit:function(a){this.getValue()?a.setStyle("background-color",this.getValue()):a.removeStyle("background-color");a.removeAttribute("bgColor")}},k?{type:"button",id:"bgColorChoose","class":"colorChooser",label:c.chooseColor,onLoad:function(){this.getElement().getParent().setStyle("vertical-align","bottom")},onClick:function(){g.getColorFromDialog(function(a){a&&this.getDialog().getContentElement("info","bgColor").setValue(a);this.focus()},this)}}:f]},f,
|
||||
{type:"hbox",padding:0,widths:["60%","40%"],children:[{type:"text",id:"borderColor",label:c.borderColor,"default":"",setup:d(function(a){var b=a.getAttribute("borderColor");return a.getStyle("border-color")||b}),commit:function(a){this.getValue()?a.setStyle("border-color",this.getValue()):a.removeStyle("border-color");a.removeAttribute("borderColor")}},k?{type:"button",id:"borderColorChoose","class":"colorChooser",label:c.chooseColor,style:(m?"margin-right":"margin-left")+": 10px",onLoad:function(){this.getElement().getParent().setStyle("vertical-align",
|
||||
"bottom")},onClick:function(){g.getColorFromDialog(function(a){a&&this.getDialog().getContentElement("info","borderColor").setValue(a);this.focus()},this)}}:f]}]}]}]}],onShow:function(){this.cells=CKEDITOR.plugins.tabletools.getSelectedCells(this._.editor.getSelection());this.setupContent(this.cells)},onOk:function(){for(var a=this._.editor.getSelection(),b=a.createBookmarks(),c=this.cells,d=0;d<c.length;d++)this.commitContent(c[d]);this._.editor.forceNextSelectionCheck();a.selectBookmarks(b);this._.editor.selectionChange()},
|
||||
onLoad:function(){var a={};this.foreach(function(b){b.setup&&b.commit&&(b.setup=CKEDITOR.tools.override(b.setup,function(c){return function(){c.apply(this,arguments);a[b.id]=b.getValue()}}),b.commit=CKEDITOR.tools.override(b.commit,function(c){return function(){a[b.id]!==b.getValue()&&c.apply(this,arguments)}}))})}}});
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user