Merge to 2.0.6
Conflicts: Documentation/SOGo Installation Guide.odtmaint-2.1.1 SOGo-2.0.6
commit
a79a9c4eff
540
ChangeLog
540
ChangeLog
|
@ -1,3 +1,543 @@
|
|||
commit faf228022ac83e3c66b0f4f1e23654a9b273e601
|
||||
Author: Ludovic Marcotte <lmarcotte@inverse.ca>
|
||||
Date: Fri Jun 21 11:25:55 2013 -0400
|
||||
|
||||
Updated for the release
|
||||
|
||||
M Documentation/SOGo Installation Guide.odt
|
||||
M Documentation/SOGo Mobile Devices Configuration.odt
|
||||
M Documentation/SOGo Mozilla Thunderbird Configuration.odt
|
||||
M Documentation/SOGo Native Microsoft Outlook Configuration.odt
|
||||
M NEWS
|
||||
M Version
|
||||
|
||||
commit 3e87ba92db5eb698f3d73bba4e3e2457ef2b4ea2
|
||||
Author: Ludovic Marcotte <lmarcotte@inverse.ca>
|
||||
Date: Fri Jun 21 10:45:03 2013 -0400
|
||||
|
||||
Updated french translation
|
||||
|
||||
M UI/Scheduler/French.lproj/Localizable.strings
|
||||
|
||||
commit 0a87ff97b6a7d4add9b8413074a0567e289386af
|
||||
Author: Jean Raby <jraby@inverse.ca>
|
||||
Date: Fri Jun 21 09:36:54 2013 -0400
|
||||
|
||||
cosmetic fix, no functional change
|
||||
|
||||
added a POST payload to test this code
|
||||
|
||||
M SoObjects/SOGo/SOGoCASSession.m
|
||||
A Tests/README-cas-logoutRequest
|
||||
|
||||
commit 031cd210f74bb130bea7fd73e41864e045a5aac9
|
||||
Author: Ludovic Marcotte <lmarcotte@inverse.ca>
|
||||
Date: Thu Jun 20 20:29:16 2013 -0400
|
||||
|
||||
Better description
|
||||
|
||||
M NEWS
|
||||
|
||||
commit 9d9a434fdc3deb403301a4b006a50967df3265d7
|
||||
Author: Ludovic Marcotte <lmarcotte@inverse.ca>
|
||||
Date: Thu Jun 20 15:44:35 2013 -0400
|
||||
|
||||
Avoid crashing when reading fcs crap.
|
||||
|
||||
M NEWS
|
||||
M OpenChange/RTFHandler.m
|
||||
|
||||
commit 41ed498d6512b9cf2ef01654ea29be4c535d0c16
|
||||
Author: Jean Raby <jraby@inverse.ca>
|
||||
Date: Thu Jun 20 14:32:14 2013 -0400
|
||||
|
||||
Add support for CAS LogoutRequests
|
||||
|
||||
Fixes #2346
|
||||
This changes the serviceURL sent by SOGo to the CAS server:
|
||||
/SOGo/so/ -> /SOGo/so/index
|
||||
|
||||
M NEWS
|
||||
M SoObjects/SOGo/GNUmakefile
|
||||
M SoObjects/SOGo/SOGoCASSession.h
|
||||
M SoObjects/SOGo/SOGoCASSession.m
|
||||
M SoObjects/SOGo/SOGoCache.h
|
||||
M SoObjects/SOGo/SOGoCache.m
|
||||
M UI/MainUI/SOGoRootPage.m
|
||||
|
||||
commit d28482557ff344e908ad5ad2056965ead061b1b2
|
||||
Author: Ludovic Marcotte <lmarcotte@inverse.ca>
|
||||
Date: Thu Jun 20 13:43:45 2013 -0400
|
||||
|
||||
Fix for bug 2285
|
||||
|
||||
M OpenChange/MAPIStoreGCSFolder.m
|
||||
|
||||
commit 4c97d549394b7d7e701f281620d355bc283f7012
|
||||
Author: Ludovic Marcotte <lmarcotte@inverse.ca>
|
||||
Date: Thu Jun 20 09:10:09 2013 -0400
|
||||
|
||||
Fix for bug #2119
|
||||
|
||||
M NEWS
|
||||
M OpenChange/MAPIStoreMailMessage.m
|
||||
|
||||
commit c08263d1c3d6444616f51643c409a4e2d7c02593
|
||||
Author: Ludovic Marcotte <lmarcotte@inverse.ca>
|
||||
Date: Wed Jun 19 17:36:43 2013 -0400
|
||||
|
||||
Updated patch
|
||||
|
||||
M SoObjects/SOGo/SOGoProxyAuthenticator.m
|
||||
|
||||
commit dc96466462a0f3814da34e07bad0bdabc1db0169
|
||||
Author: Ludovic Marcotte <lmarcotte@inverse.ca>
|
||||
Date: Wed Jun 19 16:06:12 2013 -0400
|
||||
|
||||
Updated for the release
|
||||
|
||||
M NEWS
|
||||
|
||||
commit 1734b387a353cab21b1f768791af8983e9f9ec98
|
||||
Author: Ludovic Marcotte <lmarcotte@inverse.ca>
|
||||
Date: Wed Jun 19 15:45:40 2013 -0400
|
||||
|
||||
Fix for bug #2237
|
||||
|
||||
M SoObjects/SOGo/SOGoProxyAuthenticator.m
|
||||
M SoObjects/SOGo/SOGoPublicBaseFolder.m
|
||||
|
||||
commit 871115e349dd71ac2801650ff98fc98a888dabd6
|
||||
Author: Ludovic Marcotte <lmarcotte@inverse.ca>
|
||||
Date: Wed Jun 19 15:07:19 2013 -0400
|
||||
|
||||
Fixed bug #2294
|
||||
|
||||
M SoObjects/SOGo/SOGoContentObject.m
|
||||
M UI/Common/UIxFolderActions.h
|
||||
M UI/Common/UIxFolderActions.m
|
||||
M UI/Contacts/UIxContactFolderActions.m
|
||||
M UI/Contacts/UIxContactFoldersView.m
|
||||
M UI/Contacts/product.plist
|
||||
M UI/Scheduler/UIxCalFolderActions.h
|
||||
M UI/Scheduler/UIxCalFolderActions.m
|
||||
M UI/Scheduler/UIxCalMainActions.h
|
||||
M UI/Scheduler/UIxCalMainActions.m
|
||||
M UI/Scheduler/product.plist
|
||||
M UI/WebServerResources/ContactsUI.js
|
||||
M UI/WebServerResources/SchedulerUI.js
|
||||
|
||||
commit a7642868792e58cfb4c6d1614e53787b26f6fa33
|
||||
Author: Ludovic Marcotte <lmarcotte@inverse.ca>
|
||||
Date: Wed Jun 19 14:09:20 2013 -0400
|
||||
|
||||
Fix for bug #2313
|
||||
|
||||
M SoObjects/Mailer/SOGoMailFolder.m
|
||||
M UI/MailerUI/UIxMailUserRightsEditor.h
|
||||
M UI/MailerUI/UIxMailUserRightsEditor.m
|
||||
|
||||
commit 5304461e4cc5a4a366a33e84a74f7c785be8aa0d
|
||||
Author: Ludovic Marcotte <lmarcotte@inverse.ca>
|
||||
Date: Wed Jun 19 10:23:47 2013 -0400
|
||||
|
||||
now possible to see who created a event/task in a delegated calendar
|
||||
|
||||
M NEWS
|
||||
M SoObjects/Appointments/iCalEntityObject+SOGo.h
|
||||
M SoObjects/Appointments/iCalEntityObject+SOGo.m
|
||||
M SoObjects/SOGo/SOGoUser.h
|
||||
M SoObjects/SOGo/SOGoUserManager.m
|
||||
M UI/Scheduler/English.lproj/Localizable.strings
|
||||
M UI/Scheduler/UIxAppointmentEditor.m
|
||||
M UI/Scheduler/UIxComponentEditor.h
|
||||
M UI/Scheduler/UIxComponentEditor.m
|
||||
M UI/Templates/SchedulerUI/UIxCalMainView.wox
|
||||
M UI/Templates/SchedulerUI/UIxComponentEditor.wox
|
||||
M UI/WebServerResources/SchedulerUI.js
|
||||
M UI/WebServerResources/UIxAppointmentEditor.js
|
||||
|
||||
commit 6b25f08943032852466189cd98b3c956772f276b
|
||||
Author: Jean Raby <jraby@inverse.ca>
|
||||
Date: Tue Jun 18 19:33:36 2013 -0400
|
||||
|
||||
Use domainDefaults to get imapCASServiceName
|
||||
|
||||
M SoObjects/SOGo/SOGoWebAuthenticator.m
|
||||
|
||||
commit a0022e06f70c381b2816c23f8ffc5453cc8c2fd1
|
||||
Author: Jean Raby <jraby@inverse.ca>
|
||||
Date: Tue Jun 18 17:57:17 2013 -0400
|
||||
|
||||
New preference: SOGoIMAPCASServiceName
|
||||
|
||||
Reworked CAS section a bit and add some information regarding casifying sieve.
|
||||
|
||||
M Documentation/SOGo Installation Guide.odt
|
||||
|
||||
commit 0fb006c19faa62e7b05f8ef7edd23581046b50d9
|
||||
Author: Jean Raby <jraby@inverse.ca>
|
||||
Date: Tue Jun 18 16:36:11 2013 -0400
|
||||
|
||||
New domain preference: SOGoIMAPCASServiceName
|
||||
|
||||
Set this to the service name expected by the CAS server if it differs
|
||||
from SOGoIMAPServer. This is useful to request a CAS ticket for service
|
||||
imap://imap.domain.com while connecting through imapproxy on imap://127.0.0.1:1143
|
||||
|
||||
SOGoDAVAuthenticator is not updated since it doesn't really use the imap code.
|
||||
|
||||
M SoObjects/SOGo/SOGoDomainDefaults.h
|
||||
M SoObjects/SOGo/SOGoDomainDefaults.m
|
||||
M SoObjects/SOGo/SOGoWebAuthenticator.m
|
||||
|
||||
commit 47a3f1a19d1089a105aeefba831f119b407ca196
|
||||
Author: Ludovic Marcotte <lmarcotte@inverse.ca>
|
||||
Date: Tue Jun 18 14:14:42 2013 -0400
|
||||
|
||||
toggle to send or not notifications
|
||||
|
||||
M NEWS
|
||||
M SoObjects/Appointments/SOGoCalendarComponent.m
|
||||
M UI/Scheduler/English.lproj/Localizable.strings
|
||||
M UI/Scheduler/UIxAppointmentEditor.h
|
||||
M UI/Scheduler/UIxAppointmentEditor.m
|
||||
M UI/Templates/SchedulerUI/UIxAppointmentEditor.wox
|
||||
|
||||
commit f25344182debb14001c39db452374f138cd0ee8b
|
||||
Author: Ludovic Marcotte <lmarcotte@inverse.ca>
|
||||
Date: Fri Jun 14 14:58:16 2013 -0400
|
||||
|
||||
Rewrote escapedForCards so it's 10 times faster.
|
||||
|
||||
M SOPE/NGCards/NSString+NGCards.m
|
||||
|
||||
commit f24e3a0a3146b2d5207af8555377c80d52c477b5
|
||||
Author: Jean Raby <jraby@inverse.ca>
|
||||
Date: Wed Jun 12 02:36:50 2013 -0400
|
||||
|
||||
whitespace fixes. tabkill
|
||||
|
||||
M SoObjects/SOGo/SOGoDAVAuthenticator.m
|
||||
M SoObjects/SOGo/SOGoProxyAuthenticator.m
|
||||
M SoObjects/SOGo/SOGoWebAuthenticator.m
|
||||
|
||||
commit afb7bc309c03562acf5066faa8b3c9f1e43950a0
|
||||
Author: Ludovic Marcotte <lmarcotte@inverse.ca>
|
||||
Date: Tue Jun 11 11:21:58 2013 -0400
|
||||
|
||||
Added message submissions rate-limiting support
|
||||
|
||||
M Documentation/SOGo Installation Guide.odt
|
||||
M NEWS
|
||||
M SoObjects/SOGo/SOGoCache.h
|
||||
M SoObjects/SOGo/SOGoCache.m
|
||||
M SoObjects/SOGo/SOGoSystemDefaults.h
|
||||
M SoObjects/SOGo/SOGoSystemDefaults.m
|
||||
M UI/MailerUI/UIxMailEditor.m
|
||||
|
||||
commit cfee5aa3f4095576d00bc7d05f7606d3ca72571e
|
||||
Author: Ludovic Marcotte <lmarcotte@inverse.ca>
|
||||
Date: Tue Jun 11 09:41:17 2013 -0400
|
||||
|
||||
Added new failed login rate-limiting options
|
||||
|
||||
M Documentation/SOGo Installation Guide.odt
|
||||
M NEWS
|
||||
M SoObjects/SOGo/NSCalendarDate+SOGo.m
|
||||
M SoObjects/SOGo/SOGoCache.h
|
||||
M SoObjects/SOGo/SOGoCache.m
|
||||
M SoObjects/SOGo/SOGoSystemDefaults.h
|
||||
M SoObjects/SOGo/SOGoSystemDefaults.m
|
||||
M SoObjects/SOGo/SOGoUserManager.m
|
||||
M UI/MainUI/SOGoRootPage.m
|
||||
|
||||
commit 2a51f6f385b71506e1d089fa9045e74b53954703
|
||||
Author: Francis Lachapelle <flachapelle@inverse.ca>
|
||||
Date: Mon Jun 10 21:07:00 2013 -0400
|
||||
|
||||
Update CKEditor to version 4.1.2
|
||||
|
||||
Also added the blockquote plugin.
|
||||
|
||||
M UI/WebServerResources/ckeditor/build-config.js
|
||||
M UI/WebServerResources/ckeditor/ckeditor.js
|
||||
M UI/WebServerResources/ckeditor/config.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/clipboard/dialogs/paste.js
|
||||
M UI/WebServerResources/ckeditor/plugins/icons.png
|
||||
M UI/WebServerResources/ckeditor/plugins/wsc/dialogs/ciframe.html
|
||||
M UI/WebServerResources/ckeditor/plugins/wsc/dialogs/wsc.js
|
||||
A UI/WebServerResources/ckeditor/plugins/wsc/dialogs/wsc_ie.js
|
||||
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
|
||||
M UI/WebServerResources/ckeditor/skins/moono/icons.png
|
||||
|
||||
commit 4cffea43ebf88870a718f4e244ea224e0d952f42
|
||||
Author: Jean Raby <jraby@inverse.ca>
|
||||
Date: Fri Jun 7 15:16:12 2013 -0400
|
||||
|
||||
French translation of Sync Issues
|
||||
|
||||
M Scripts/openchange_user_cleanup
|
||||
|
||||
commit cafce5753db7f35dafd5e37db4cf219754efd18e
|
||||
Author: Jean Raby <jraby@inverse.ca>
|
||||
Date: Thu Jun 6 16:04:47 2013 -0400
|
||||
|
||||
update description of MultipleBookingsFieldName
|
||||
|
||||
M Documentation/SOGo Installation Guide.odt
|
||||
|
||||
commit 5d6a5f5d5ed13be922226f2894ca8eed57f5061b
|
||||
Author: Francis Lachapelle <flachapelle@inverse.ca>
|
||||
Date: Thu Jun 6 13:21:26 2013 -0400
|
||||
|
||||
Update CKEditor to version 4.1.1
|
||||
|
||||
M NEWS
|
||||
M UI/WebServerResources/ckeditor/build-config.js
|
||||
M UI/WebServerResources/ckeditor/ckeditor.js
|
||||
M UI/WebServerResources/ckeditor/config.js
|
||||
M UI/WebServerResources/ckeditor/contents.css
|
||||
A 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
|
||||
A UI/WebServerResources/ckeditor/lang/pt-br.js
|
||||
D UI/WebServerResources/ckeditor/lang/pt.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
|
||||
A UI/WebServerResources/ckeditor/plugins/colordialog/dialogs/colordialog.js
|
||||
M UI/WebServerResources/ckeditor/plugins/icons.png
|
||||
M UI/WebServerResources/ckeditor/plugins/image/dialogs/image.js
|
||||
M UI/WebServerResources/ckeditor/plugins/link/dialogs/link.js
|
||||
M UI/WebServerResources/ckeditor/plugins/scayt/dialogs/options.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/dialog_opera.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
|
||||
M UI/WebServerResources/ckeditor/skins/moono/icons.png
|
||||
M UI/WebServerResources/ckeditor/styles.js
|
||||
|
||||
commit 8e5a26dfb15f6105d014dc3298573a25ccf75844
|
||||
Author: Francis Lachapelle <flachapelle@inverse.ca>
|
||||
Date: Wed Jun 5 15:53:53 2013 -0400
|
||||
|
||||
Remove unicode separators from JSON
|
||||
|
||||
Fixes #2309
|
||||
|
||||
M NEWS
|
||||
M SoObjects/SOGo/NSString+Utilities.m
|
||||
|
||||
commit 4cb0facd72b06d09f0e1403f673bef25ed47cac5
|
||||
Author: Ludovic Marcotte <lmarcotte@inverse.ca>
|
||||
Date: Tue Jun 4 08:51:38 2013 -0400
|
||||
|
||||
Fixed bug #2206
|
||||
|
||||
M NEWS
|
||||
M UI/MailerUI/UIxMailView.m
|
||||
|
||||
commit 854bce28fbefe913aa6a823436a991da23164a60
|
||||
Author: Francis Lachapelle <flachapelle@inverse.ca>
|
||||
Date: Mon Jun 3 12:07:18 2013 -0400
|
||||
|
||||
Fix condition in UIxMailPartHTMLViewer
|
||||
|
||||
M UI/MailPartViewers/UIxMailPartHTMLViewer.m
|
||||
|
||||
commit 49e964c5294f9b65295e55a46417a2fa73eadf44
|
||||
Author: Francis Lachapelle <flachapelle@inverse.ca>
|
||||
Date: Mon Jun 3 11:47:48 2013 -0400
|
||||
|
||||
Fix decoding charset parameter
|
||||
|
||||
To avoid a libxml bug/limitation, we were already stripping the charset
|
||||
parameter, but we were not considering the single quote as valid
|
||||
delimiter.
|
||||
|
||||
M NEWS
|
||||
M UI/MailPartViewers/UIxMailPartHTMLViewer.m
|
||||
|
||||
commit 3281cea2a213e8d551a60227da0ad1409ec85266
|
||||
Author: Jean Raby <jraby@inverse.ca>
|
||||
Date: Fri May 31 15:54:22 2013 -0400
|
||||
|
||||
Add bindFields to the sample configuration file
|
||||
|
||||
M Scripts/sogo.conf
|
||||
|
||||
commit 82253e91d2e8f0410625e11a03737883ea9f1d60
|
||||
Author: Jean Raby <jraby@inverse.ca>
|
||||
Date: Fri May 24 15:00:05 2013 -0400
|
||||
|
||||
don't use -M when creating the sogo user on debian
|
||||
|
||||
-M was not available in lenny. It is not actually needed since useradd
|
||||
won't create the homedir when adding a system user (-r)
|
||||
|
||||
M packaging/debian-multiarch/sogo.preinst
|
||||
M packaging/debian/sogo.preinst
|
||||
|
||||
commit 1d1ed9a031f17d607b804bcb177fa106c46f6f9b
|
||||
Author: Jean Raby <jraby@inverse.ca>
|
||||
Date: Wed May 15 14:51:15 2013 -0400
|
||||
|
||||
Update ldap filter description, example and syntax
|
||||
|
||||
M Documentation/SOGo Installation Guide.odt
|
||||
|
||||
commit 2bd8a2935f737f99544cb45659c61afbc16eaea2
|
||||
Author: Francis Lachapelle <flachapelle@inverse.ca>
|
||||
Date: Thu May 9 08:12:27 2013 -0400
|
||||
|
||||
Change default value of SOGoMailSpoolPath
|
||||
|
||||
Set the spool path to /var/spool/sogo and modified the installation
|
||||
guide to point to the tmpwatch cronjob when changing SOGoMailSpoolPath.
|
||||
|
||||
M Documentation/SOGo Installation Guide.odt
|
||||
M Scripts/tmpwatch
|
||||
M SoObjects/SOGo/SOGoDefaults.plist
|
||||
|
||||
commit 8a25e3882746fa7e772a8f73b160f5fa2e05a875
|
||||
Author: Francis Lachapelle <flachapelle@inverse.ca>
|
||||
Date: Thu May 2 09:07:17 2013 -0400
|
||||
|
||||
Add indent group to ckeditor toolbar
|
||||
|
||||
M UI/WebServerResources/ckeditor/config.js
|
||||
|
||||
commit 4ec19d46fa8fa8bde0c7f1b6a87d4828677de7c0
|
||||
Author: Ludovic Marcotte <lmarcotte@inverse.ca>
|
||||
Date: Thu Apr 25 14:46:00 2013 -0400
|
||||
|
||||
Removed left-over code that would cause the logic from bug #2035 to not work.
|
||||
|
||||
M SoObjects/Appointments/SOGoAppointmentFolder.m
|
||||
|
||||
commit d46a39e2523b3322bd8d9285b53638cd304912dd
|
||||
Author: Jean Raby <jraby@inverse.ca>
|
||||
Date: Mon Apr 22 13:22:16 2013 -0400
|
||||
|
||||
TOC links
|
||||
|
||||
M Documentation/SOGo Installation Guide.odt
|
||||
|
||||
commit 23e10d30be3aaef111ebb9ecd8ff87fdd3ec19d2
|
||||
Author: Jean Raby <jraby@inverse.ca>
|
||||
Date: Mon Apr 22 12:31:18 2013 -0400
|
||||
|
||||
Added ldap attribute mapping table
|
||||
|
||||
M Documentation/SOGo Installation Guide.odt
|
||||
|
||||
commit a53c66e8a449d17f4f4484ef299b7500a8a5612b
|
||||
Author: Jean Raby <jraby@inverse.ca>
|
||||
Date: Thu Apr 18 14:35:56 2013 -0400
|
||||
|
||||
Install openchange_user_cleanup in usr/sbin/
|
||||
|
||||
Instead of usr/share/doc/sogo/
|
||||
|
||||
D Scripts/openchange_cleanup.py
|
||||
M packaging/debian-multiarch/rules
|
||||
M packaging/debian-multiarch/sogo.docs
|
||||
M packaging/debian/rules
|
||||
M packaging/debian/sogo.docs
|
||||
M packaging/rhel/sogo.spec
|
||||
|
||||
commit 4fb3492ea858458ea7e37acb73fa2ae35b41aed5
|
||||
Author: Jean Raby <jraby@inverse.ca>
|
||||
Date: Thu Apr 18 14:28:55 2013 -0400
|
||||
|
||||
openchange_cleanup.py -> openchange_user_cleanup
|
||||
|
||||
A Scripts/openchange_user_cleanup
|
||||
|
||||
commit 353f40ac3e0552d95cd787b319eb6d60d1a42f81
|
||||
Author: Jean Raby <jraby@inverse.ca>
|
||||
Date: Thu Apr 18 14:15:35 2013 -0400
|
||||
|
||||
try to cleanup under INBOX too (altnamespace = no)
|
||||
|
||||
M Scripts/openchange_cleanup.py
|
||||
|
||||
commit 96c831f72686fed7a1469b401ebb3bc732fd0432
|
||||
Author: Jean Raby <jraby@inverse.ca>
|
||||
Date: Thu Apr 18 14:11:36 2013 -0400
|
||||
|
||||
Use separator sent by the imap server, not '/'
|
||||
|
||||
M Scripts/openchange_cleanup.py
|
||||
|
||||
commit d7fdfc6cb27665de2c9b5d860454b69fe9107d54
|
||||
Author: Jean Raby <jraby@inverse.ca>
|
||||
Date: Tue Apr 16 15:16:54 2013 -0400
|
||||
|
||||
Update NEWS + bump version
|
||||
|
||||
M NEWS
|
||||
M Version
|
||||
|
||||
commit d02f58b3cd6de503de7d2ea4d3963a5e4dcb6212
|
||||
Author: Jean Raby <jraby@inverse.ca>
|
||||
Date: Tue Apr 16 15:12:29 2013 -0400
|
||||
|
||||
Update ChangeLog
|
||||
|
||||
M ChangeLog
|
||||
|
||||
commit 62fee93d866b8eb35abbf67d61ba5274a3a27827
|
||||
Author: Ludovic Marcotte <lmarcotte@inverse.ca>
|
||||
Date: Tue Apr 16 14:33:57 2013 -0400
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
26
NEWS
26
NEWS
|
@ -1,4 +1,30 @@
|
|||
2.0.6 (2013-06-21)
|
||||
------------------
|
||||
|
||||
Enhancements
|
||||
- updated CKEditor to version 4.1.1 (#2333)
|
||||
- new failed login attemps rate-limiting options. See the new
|
||||
SOGoMaximumFailedLoginCount, SOGoMaximumFailedLoginInterval and
|
||||
SOGoFailedLoginBlockInterval defaults
|
||||
- new message submissions rate-limiting options. See the new
|
||||
SOGoMaximumMessageSubmissionCount, SOGoMaximumRecipientCount,
|
||||
SOGoMaximumSubmissionInterval and SOGoMessageSubmissionBlockInterval defaults
|
||||
- now possible to send or not event notifications on a per-event basis
|
||||
- now possible to see who created an event/task in a delegated calendar
|
||||
- multi-domain support in OpenChange (implemented using a trick)
|
||||
|
||||
Bug fixes
|
||||
- fixed decoding of the charset parameter when using single quotes (#2306)
|
||||
- fixed potential crash when sending MDN from Sent folder (#2209)
|
||||
- fixed handling of unicode separators (#2309)
|
||||
- fixed public access when SOGoTrustProxyAuthentication is used (#2237)
|
||||
- fixed access right issues with import feature (#2294)
|
||||
- fixed IMAP ACL issue when SOGoForceExternalLoginWithEmail is used (#2313)
|
||||
- fixed handling of CAS logoutRequest (#2346)
|
||||
- fixed many major OpenChange stability issues
|
||||
|
||||
2.0.5a (2013-04-17)
|
||||
------------------
|
||||
|
||||
Bug fixes
|
||||
- Fixed an issue when parsing user CN with leading or trailing spaces (#2287)
|
||||
|
|
|
@ -461,7 +461,7 @@ static Class NSNumberK;
|
|||
[mapping setObject: cLastModified forKey: changeNumber];
|
||||
[messageEntry setObject: changeNumber forKey: @"version"];
|
||||
|
||||
newChangeNum = [changeNumber unsignedLongValue];
|
||||
newChangeNum = [changeNumber unsignedLongLongValue];
|
||||
changeKey = [self getReplicaKeyFromGlobCnt: newChangeNum >> 16];
|
||||
[self _setChangeKey: changeKey forMessageEntry: messageEntry
|
||||
inChangeListOnly: NO];
|
||||
|
|
|
@ -693,7 +693,15 @@ _compareBodyKeysByPriority (id entry1, id entry2, void *data)
|
|||
ngAddress = [[NGMailAddressParser mailAddressParserWithString: fullMail]
|
||||
parse];
|
||||
if ([ngAddress isKindOfClass: [NGMailAddress class]])
|
||||
{
|
||||
cn = [ngAddress displayName];
|
||||
|
||||
// If we don't have a displayName, we use the email address instead. This
|
||||
// avoid bug #2119 - where Outlook won't display anything in the "From" field,
|
||||
// nor in the recipient field if we reply to the email.
|
||||
if (![cn length])
|
||||
cn = [ngAddress address];
|
||||
}
|
||||
else
|
||||
cn = @"";
|
||||
|
||||
|
|
|
@ -777,6 +777,10 @@ const unsigned short ansicpg874[256] = {
|
|||
[_html appendBytes: v length: strlen(v)];
|
||||
free(v);
|
||||
}
|
||||
else if ([s hasPrefix: @"fcs"])
|
||||
{
|
||||
// ignore
|
||||
}
|
||||
else if ([s hasPrefix: @"fs"])
|
||||
{
|
||||
// ignore
|
||||
|
|
|
@ -155,20 +155,41 @@
|
|||
|
||||
- (NSString *) escapedForCards
|
||||
{
|
||||
NSString *string;
|
||||
NSMutableString *string;
|
||||
unsigned int len, i;
|
||||
unichar c;
|
||||
|
||||
string = [self stringByReplacingString: @"\\"
|
||||
withString: @"\\\\"];
|
||||
string = [string stringByReplacingString: @","
|
||||
withString: @"\\,"];
|
||||
// string = [string stringByReplacingString: @":"
|
||||
// withString: @"\\:"];
|
||||
string = [string stringByReplacingString: @";"
|
||||
withString: @"\\;"];
|
||||
string = [string stringByReplacingString: @"\n"
|
||||
withString: @"\\n"];
|
||||
string = [string stringByReplacingString: @"\r"
|
||||
withString: @"\\r"];
|
||||
len = [self length];
|
||||
string = [NSMutableString stringWithCapacity: len * 1.5];
|
||||
|
||||
for (i = 0; i < len; i++)
|
||||
{
|
||||
c = [self characterAtIndex: i];
|
||||
|
||||
switch (c)
|
||||
{
|
||||
case '\\':
|
||||
[string appendString: @"\\\\"];
|
||||
break;
|
||||
case ',':
|
||||
[string appendString: @"\\,"];
|
||||
break;
|
||||
//case ':':
|
||||
// [string appendString: @"\\:"];
|
||||
//break;
|
||||
case ';':
|
||||
[string appendString: @"\\;"];
|
||||
break;
|
||||
case'\n':
|
||||
[string appendString: @"\\n"];
|
||||
break;
|
||||
case'\r':
|
||||
[string appendString: @"\\r"];
|
||||
break;
|
||||
default:
|
||||
[string appendFormat: @"%C", c];
|
||||
}
|
||||
}
|
||||
|
||||
return string;
|
||||
}
|
||||
|
|
|
@ -89,6 +89,16 @@ def main():
|
|||
except Exception as e:
|
||||
print "Error during sqlCleanup, continuing: %s" % str(e)
|
||||
|
||||
def getsep(client):
|
||||
seq = None
|
||||
(code, data) = client.list("", "")
|
||||
if code == "OK" and data is not None:
|
||||
# yes this is ugly but it works on cyrus and dovecot.
|
||||
# (\\Noinferiors \\HasNoChildren) "/" INBOX
|
||||
m = re.search(".*\s+[\"\']?(.)[\"\']?\s+[\"\']?.*[\"\']?$", data[0])
|
||||
sep = m.group(1)
|
||||
return sep
|
||||
|
||||
def extractmb(si):
|
||||
inparen = False
|
||||
inquote = False
|
||||
|
@ -120,13 +130,13 @@ def extractmb(si):
|
|||
|
||||
return parts[-1]
|
||||
|
||||
def cleanupmb(mb, client):
|
||||
(code, data) = client.list("%s/" % mb, "%")
|
||||
def cleanupmb(mb, sep, client):
|
||||
(code, data) = client.list("%s%s" % (mb, sep), "%")
|
||||
if code == "OK":
|
||||
for si in data:
|
||||
if si is not None:
|
||||
submb = extractmb(si)
|
||||
cleanupmb(submb, client)
|
||||
cleanupmb(submb, sep, client)
|
||||
else:
|
||||
raise Exception, "Failure while cleaning up '%s'" % mb
|
||||
client.unsubscribe(mb)
|
||||
|
@ -145,13 +155,20 @@ def imapCleanup(imaphost, imapport, username, userpass):
|
|||
|
||||
print "Logged in as '%s'" % username
|
||||
|
||||
for foldername in ("Sync Issues", "Junk E-mail"):
|
||||
sep = getsep(client)
|
||||
if not sep:
|
||||
client.logout()
|
||||
return
|
||||
|
||||
for foldername in ("Sync Issues", "Junk E-mail",
|
||||
"INBOX%sSync Issues" % sep, "INBOX%sJunk E-mail" % sep,
|
||||
"Probl&AOg-mes de synchronisation"):
|
||||
(code, data) = client.list(foldername, "%")
|
||||
if code == "OK":
|
||||
for si in data:
|
||||
if si is not None:
|
||||
mb = extractmb(si)
|
||||
cleanupmb(mb, client)
|
||||
cleanupmb(mb, sep, client)
|
||||
client.logout()
|
||||
|
||||
def mapistoreCleanup(mapistorefolder, username):
|
|
@ -44,8 +44,9 @@
|
|||
// {
|
||||
// type = ldap;
|
||||
// CNFieldName = cn;
|
||||
// IDFieldName = uid;
|
||||
// UIDFieldName = uid;
|
||||
// IDFieldName = uid; // first field of the DN for direct binds
|
||||
// bindFields = (uid, mail); // array of fields to use for indirect binds
|
||||
// baseDN = "ou=users,dc=acme,dc=com";
|
||||
// bindDN = "uid=sogo,ou=users,dc=acme,dc=com";
|
||||
// bindPassword = qwerty;
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
#!/bin/sh
|
||||
|
||||
# SOGOSPOOL must match the value of the configuration parameter SOGoMailSpoolPath
|
||||
SOGOSPOOL=/var/spool/sogo
|
||||
|
||||
/usr/sbin/tmpwatch 24 "$SOGOSPOOL"
|
||||
|
|
|
@ -2901,9 +2901,6 @@ firstInstanceCalendarDateRange: (NGCalendarDateRange *) fir
|
|||
NSMutableString *content;
|
||||
NSString *uid;
|
||||
|
||||
uid = [self globallyUniqueObjectId];
|
||||
[event setUid: uid];
|
||||
|
||||
// We first look if there's an event with the same UID in our calendar. If not,
|
||||
// let's reuse what is in the event, otherwise generate a new GUID and use it.
|
||||
uid = [event uid];
|
||||
|
|
|
@ -760,6 +760,10 @@
|
|||
SOGoUser *ownerUser;
|
||||
SOGoDomainDefaults *dd;
|
||||
|
||||
// If defined, we return immediately. When not defined, we send the notifications correctly
|
||||
if ([object firstChildWithTag: @"X-SOGo-Send-Appointment-Notifications"])
|
||||
return;
|
||||
|
||||
ownerUser = [SOGoUser userWithLogin: owner];
|
||||
dd = [ownerUser domainDefaults];
|
||||
if ([dd appointmentSendEMailNotifications] && [object isStillRelevant])
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
/* iCalEntityObject+SOGo.h - this file is part of SOGo
|
||||
*
|
||||
* Copyright (C) 2007 Inverse inc.
|
||||
*
|
||||
* Author: Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
* Copyright (C) 2007-2013 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
|
||||
|
@ -48,6 +46,8 @@ extern NSNumber *iCalDistantFutureNumber;
|
|||
- (NSMutableDictionary *) quickRecord;
|
||||
|
||||
- (int) priorityNumber;
|
||||
- (NSString *) createdBy;
|
||||
|
||||
- (NSNumber *) quickRecordDateAsNumber: (NSCalendarDate *) _date
|
||||
withOffset: (int) offset
|
||||
forAllDay: (BOOL) allDay;
|
||||
|
|
|
@ -242,4 +242,19 @@ NSNumber *iCalDistantFutureNumber = nil;
|
|||
return priorityNumber;
|
||||
}
|
||||
|
||||
- (NSString *) createdBy
|
||||
{
|
||||
NSString *created_by;
|
||||
|
||||
created_by = [[self firstChildWithTag: @"X-SOGo-Component-Created-By"] flattenedValuesForKey: @""];
|
||||
|
||||
// We consider "SENT-BY" in case our custom header isn't found
|
||||
if (![created_by length])
|
||||
{
|
||||
created_by = [[self organizer] sentBy];
|
||||
}
|
||||
|
||||
return created_by;
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
/*
|
||||
Copyright (C) 2009-2011 Inverse inc.
|
||||
Copyright (C) 2009-2013 Inverse inc.
|
||||
Copyright (C) 2004-2005 SKYRIX Software AG
|
||||
|
||||
This file is part of OpenGroupware.org.
|
||||
This file is part of SOGo.
|
||||
|
||||
OGo is free software; you can redistribute it and/or modify it under
|
||||
SOGo is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU Lesser General Public License as published by the
|
||||
Free Software Foundation; either version 2, or (at your option) any
|
||||
later version.
|
||||
|
||||
OGo is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
SOGo is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
|
||||
License for more details.
|
||||
|
@ -1177,6 +1177,10 @@ static NSString *defaultUserID = @"anyone";
|
|||
if ([uid hasPrefix: @"@"])
|
||||
return [[[[context activeUser] domainDefaults] imapAclGroupIdPrefix]
|
||||
stringByAppendingString: [uid substringFromIndex: 1]];
|
||||
else if ([[[context activeUser] domainDefaults] forceExternalLoginWithEmail])
|
||||
{
|
||||
return [[[context activeUser] primaryIdentity] objectForKey: @"email"];
|
||||
}
|
||||
else
|
||||
return uid;
|
||||
}
|
||||
|
|
|
@ -140,7 +140,8 @@ SOGo_OBJC_FILES = \
|
|||
|
||||
SOGo_RESOURCE_FILES = \
|
||||
SOGoDefaults.plist \
|
||||
DAVReportMap.plist
|
||||
DAVReportMap.plist \
|
||||
CASLogoutRequestMap.plist
|
||||
|
||||
ifeq ($(saml2_config), yes)
|
||||
SOGo_HEADER_FILES += SOGoSAML2Session.h SOGoSAML2Exceptions.h
|
||||
|
|
|
@ -113,19 +113,10 @@ static NSString *rfc822Months[] = {@"", @"Jan", @"Feb", @"Mar", @"Apr",
|
|||
timeZoneShift];
|
||||
}
|
||||
|
||||
/* <<<<<<< variant A
|
||||
#define secondsOfDistantFuture 1073741823.0
|
||||
#define secondsOfDistantPast -1518491648.0
|
||||
>>>>>>> variant B */
|
||||
|
||||
#define secondsOfDistantFuture 1073741823.0
|
||||
#define secondsOfDistantPast -1073741823.0
|
||||
|
||||
/*
|
||||
####### Ancestor
|
||||
#define secondsOfDistantFuture 63113990400.0
|
||||
#define secondsOfDistantPast -63113817600.0
|
||||
======= end */
|
||||
|
||||
+ (id) distantFuture
|
||||
{
|
||||
static NSCalendarDate *date = nil;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* NSString+Utilities.m - this file is part of SOGo
|
||||
*
|
||||
* Copyright (C) 2006-2011 Inverse inc.
|
||||
* Copyright (C) 2006-2013 Inverse inc.
|
||||
*
|
||||
* Author: Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
* Ludovic Marcotte <lmarcotte@inverse.ca>
|
||||
|
@ -279,24 +279,28 @@ static int cssEscapingCount;
|
|||
|
||||
- (NSString *) jsonRepresentation
|
||||
{
|
||||
static char thisCharCode[28];
|
||||
static unichar thisCharCode[29];
|
||||
static NSString *controlCharString = nil;
|
||||
static NSCharacterSet *controlCharSet = nil;
|
||||
NSString *cleanedString;
|
||||
int i;
|
||||
int i, j;
|
||||
|
||||
if (!controlCharSet)
|
||||
{
|
||||
// Create an array of chars for all control characters between 0x00 and 0x1F,
|
||||
// apart from \t, \n, \f and \r (0x08, 0x09, 0x0A, 0x0C and 0x0D)
|
||||
for (i = 0x00; i <= 0x08; i++) {
|
||||
thisCharCode[i] = i;
|
||||
for (i = 0, j = 0x00; j < 0x08; i++, j++) {
|
||||
thisCharCode[i] = j;
|
||||
}
|
||||
thisCharCode[9] = 0x0B;
|
||||
for (i = 0x0E; i <= 0x1F; i++) {
|
||||
thisCharCode[i - 4] = i;
|
||||
thisCharCode[i++] = 0x0B;
|
||||
for (j = 0x0E; j <= 0x1F; i++, j++) {
|
||||
thisCharCode[i] = j;
|
||||
}
|
||||
controlCharString = [NSString stringWithCString: thisCharCode length: 28];
|
||||
|
||||
// Also add some unicode separators
|
||||
thisCharCode[i++] = 0x2028; // line separator
|
||||
thisCharCode[i++] = 0x2029; // paragraph separator
|
||||
controlCharString = [NSString stringWithCharacters:thisCharCode length:i];
|
||||
controlCharSet = [NSCharacterSet characterSetWithCharactersInString: controlCharString];
|
||||
[controlCharSet retain];
|
||||
}
|
||||
|
@ -304,7 +308,6 @@ static int cssEscapingCount;
|
|||
// Escape double quotes and remove control characters
|
||||
cleanedString = [[[self doubleQuotedString] componentsSeparatedByCharactersInSet: controlCharSet]
|
||||
componentsJoinedByString: @""];
|
||||
|
||||
return cleanedString;
|
||||
}
|
||||
|
||||
|
|
|
@ -51,6 +51,8 @@
|
|||
+ (SOGoCASSession *) CASSessionWithIdentifier: (NSString *) newIdentifier
|
||||
fromProxy: (BOOL) fromProxy;
|
||||
|
||||
+ (void) handleLogoutRequest: (NSString *) logoutRequest;
|
||||
|
||||
- (NSString *) identifier;
|
||||
|
||||
- (NSString *) ticket;
|
||||
|
@ -65,4 +67,13 @@
|
|||
|
||||
@end
|
||||
|
||||
@interface CASLogoutRequest : NSObject
|
||||
{
|
||||
NSString *sessionIndex;
|
||||
}
|
||||
|
||||
- (NSString *) sessionIndex;
|
||||
|
||||
@end
|
||||
|
||||
#endif /* SOGOCASSESSION_H */
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#import <Foundation/NSBundle.h>
|
||||
#import <Foundation/NSDictionary.h>
|
||||
#import <Foundation/NSURL.h>
|
||||
|
||||
|
@ -35,6 +36,11 @@
|
|||
#import <NGObjWeb/WOResponse.h>
|
||||
#import <NGExtensions/NSObject+Logs.h>
|
||||
|
||||
#import <SaxObjC/SaxObjC.h>
|
||||
#import <SaxObjC/SaxMethodCallHandler.h>
|
||||
#import <SaxObjC/SaxObjectDecoder.h>
|
||||
#import <SaxObjC/SaxXMLReaderFactory.h>
|
||||
|
||||
#import "NSDictionary+Utilities.h"
|
||||
#import "NSString+Utilities.h"
|
||||
#import "SOGoCache.h"
|
||||
|
@ -106,6 +112,41 @@
|
|||
return session;
|
||||
}
|
||||
|
||||
+ (void) handleLogoutRequest: (NSString *) logoutRequest
|
||||
{
|
||||
CASLogoutRequest *rq;
|
||||
SOGoCache *cache;
|
||||
NSBundle *bundle;
|
||||
NSString *mapFile, *sessionIndex;
|
||||
|
||||
bundle = [NSBundle bundleForClass: [self class]];
|
||||
mapFile = [bundle pathForResource: @"CASLogoutRequestMap" ofType: @"plist"];
|
||||
if (![mapFile length])
|
||||
{
|
||||
[self errorWithFormat: @"mapFile not found (CASLogoutRequest.plist)"];
|
||||
return;
|
||||
}
|
||||
|
||||
id<NSObject,SaxXMLReader> parser = nil;
|
||||
SaxObjectDecoder *sax = nil;
|
||||
parser = [[SaxXMLReaderFactory standardXMLReaderFactory]
|
||||
createXMLReaderForMimeType:@"text/xml"];
|
||||
|
||||
sax = [[SaxObjectDecoder alloc] initWithMappingAtPath: mapFile];
|
||||
[sax autorelease];
|
||||
[parser setContentHandler:sax];
|
||||
[parser setErrorHandler:sax];
|
||||
[parser parseFromSource: logoutRequest];
|
||||
|
||||
rq = [sax rootObject];
|
||||
sessionIndex = [rq sessionIndex];
|
||||
|
||||
if ([sessionIndex length])
|
||||
{
|
||||
[[SOGoCache sharedCache] removeCASSessionWithTicket: sessionIndex];
|
||||
}
|
||||
}
|
||||
|
||||
- (id) init
|
||||
{
|
||||
if ((self = [super init]))
|
||||
|
@ -381,7 +422,12 @@
|
|||
NSString *serviceURL;
|
||||
|
||||
soURL = [[WOApplication application] soURL];
|
||||
serviceURL = [soURL absoluteString];
|
||||
|
||||
/* appending 'index' to /SOGo/so/ so that callbacks made by the CAS server
|
||||
* are not greeted with a 302 generated by sope. The CAS server doesn't
|
||||
* follow redirects, and we'd end up losing the LogoutRequests
|
||||
*/
|
||||
serviceURL = [NSString stringWithFormat: @"%@index", [soURL absoluteString]];
|
||||
|
||||
params = [NSDictionary dictionaryWithObjectsAndKeys:
|
||||
ticket, @"ticket", serviceURL, @"service",
|
||||
|
@ -466,3 +512,28 @@
|
|||
}
|
||||
|
||||
@end
|
||||
|
||||
@implementation CASLogoutRequest
|
||||
|
||||
- (id) init
|
||||
{
|
||||
if ((self = [super init]))
|
||||
{
|
||||
sessionIndex = nil;
|
||||
}
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void) dealloc
|
||||
{
|
||||
[sessionIndex release];
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
- (NSString *) sessionIndex
|
||||
{
|
||||
return sessionIndex;
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* SOGoCache.h - this file is part of SOGo
|
||||
*
|
||||
* Copyright (C) 2008-2011 Inverse inc.
|
||||
* Copyright (C) 2008-2013 Inverse inc.
|
||||
*
|
||||
* Author: Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
* Ludovic Marcotte <lmarcotte@inverse.ca>
|
||||
|
@ -98,6 +98,17 @@
|
|||
forLogin: (NSString *) login;
|
||||
- (NSString *) userSettingsForLogin: (NSString *) theLogin;
|
||||
|
||||
- (void) setFailedCount: (int) theCount
|
||||
forLogin: (NSString *) theLogin;
|
||||
|
||||
- (NSDictionary *) failedCountForLogin: (NSString *) login;
|
||||
|
||||
- (void) setMessageSubmissionsCount: (int) theCount
|
||||
recipientsCount: (int) theRecipientsCount
|
||||
forLogin: (NSString *) theLogin;
|
||||
|
||||
- (NSDictionary *) messageSubmissionsCountForLogin: (NSString *) theLogin;
|
||||
|
||||
//
|
||||
// CAS support
|
||||
//
|
||||
|
@ -111,6 +122,8 @@
|
|||
- (void) setCASPGTId: (NSString *) pgtId
|
||||
forPGTIOU: (NSString *) pgtIou;
|
||||
|
||||
- (void) removeCASSessionWithTicket: (NSString *) ticket;
|
||||
|
||||
// SAML2 support
|
||||
- (NSDictionary *) saml2LoginDumpsForIdentifier: (NSString *) identifier;
|
||||
- (void) setSaml2LoginDumps: (NSDictionary *) dump
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* SOGoCache.m - this file is part of SOGo
|
||||
*
|
||||
* Copyright (C) 2008-2010 Inverse inc.
|
||||
* Copyright (C) 2008-2013 Inverse inc.
|
||||
*
|
||||
* Author: Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
* Ludovic Marcotte <lmarcotte@inverse.ca>
|
||||
|
@ -40,6 +40,8 @@
|
|||
* cas-ticket:< > value =
|
||||
* cas-pgtiou:< > value =
|
||||
* session:< > value =
|
||||
* <uid>+failedlogins value = NSDictionary instance holding the failed count and the date of the first failed authentication
|
||||
* <uid>+messagesubmissions value = NSDictionary instance holding the number of messages sent, and number of recipients
|
||||
*/
|
||||
|
||||
|
||||
|
@ -47,6 +49,7 @@
|
|||
#import <Foundation/NSData.h>
|
||||
#import <Foundation/NSDictionary.h>
|
||||
#import <Foundation/NSLock.h>
|
||||
#import <Foundation/NSValue.h>
|
||||
#import <Foundation/NSString.h>
|
||||
#import <Foundation/NSTimer.h>
|
||||
|
||||
|
@ -327,6 +330,9 @@ static memcached_st *handle = NULL;
|
|||
" no handle exists"), key];
|
||||
}
|
||||
|
||||
//
|
||||
//
|
||||
//
|
||||
- (void) setValue: (NSString *) value
|
||||
forKey: (NSString *) key
|
||||
{
|
||||
|
@ -334,6 +340,9 @@ static memcached_st *handle = NULL;
|
|||
expire: cleanupInterval];
|
||||
}
|
||||
|
||||
//
|
||||
//
|
||||
//
|
||||
- (NSString *) valueForKey: (NSString *) key
|
||||
{
|
||||
NSString *valueString;
|
||||
|
@ -372,6 +381,9 @@ static memcached_st *handle = NULL;
|
|||
return valueString;
|
||||
}
|
||||
|
||||
//
|
||||
//
|
||||
//
|
||||
- (void) removeValueForKey: (NSString *) key
|
||||
{
|
||||
NSData *keyData;
|
||||
|
@ -420,6 +432,9 @@ static memcached_st *handle = NULL;
|
|||
}
|
||||
}
|
||||
|
||||
//
|
||||
//
|
||||
//
|
||||
- (NSString *) _valuesOfType: (NSString *) theType
|
||||
forKey: (NSString *) theKey
|
||||
{
|
||||
|
@ -439,6 +454,9 @@ static memcached_st *handle = NULL;
|
|||
return valueString;
|
||||
}
|
||||
|
||||
//
|
||||
//
|
||||
//
|
||||
- (void) setUserAttributes: (NSString *) theAttributes
|
||||
forLogin: (NSString *) login
|
||||
{
|
||||
|
@ -475,6 +493,116 @@ static memcached_st *handle = NULL;
|
|||
return [self _valuesOfType: @"settings" forKey: theLogin];
|
||||
}
|
||||
|
||||
//
|
||||
// SOGo password failed counts
|
||||
//
|
||||
- (void) setFailedCount: (int) theCount
|
||||
forLogin: (NSString *) theLogin
|
||||
{
|
||||
NSMutableDictionary *d;
|
||||
NSNumber *count;
|
||||
|
||||
if (theCount)
|
||||
{
|
||||
count = [NSNumber numberWithInt: theCount];
|
||||
|
||||
d = [NSMutableDictionary dictionaryWithDictionary: [self failedCountForLogin: theLogin]];
|
||||
|
||||
if (![d objectForKey: @"InitialDate"])
|
||||
{
|
||||
[d setObject: [NSNumber numberWithUnsignedInt: [[NSCalendarDate date] timeIntervalSince1970]] forKey: @"InitialDate"];
|
||||
}
|
||||
|
||||
[d setObject: count forKey: @"FailedCount"];
|
||||
[self _cacheValues: [d jsonRepresentation]
|
||||
ofType: @"failedlogins"
|
||||
forKey: theLogin];
|
||||
}
|
||||
else
|
||||
{
|
||||
[self removeValueForKey: [NSString stringWithFormat: @"%@+failedlogins", theLogin]];
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Returns a dictionary with two keys/values
|
||||
//
|
||||
// FailedCount ->
|
||||
// InitialDate ->
|
||||
//
|
||||
- (NSDictionary *) failedCountForLogin: (NSString *) theLogin
|
||||
{
|
||||
NSDictionary *d;
|
||||
NSString *s;
|
||||
|
||||
s = [self _valuesOfType: @"failedlogins" forKey: theLogin];
|
||||
d = nil;
|
||||
|
||||
if (s)
|
||||
{
|
||||
d = [s objectFromJSONString];
|
||||
}
|
||||
|
||||
return d;
|
||||
}
|
||||
|
||||
//
|
||||
//
|
||||
//
|
||||
- (void) setMessageSubmissionsCount: (int) theCount
|
||||
recipientsCount: (int) theRecipientsCount
|
||||
forLogin: (NSString *) theLogin
|
||||
{
|
||||
NSNumber *messages_count, *recipients_count;
|
||||
NSMutableDictionary *d;
|
||||
|
||||
if (theCount)
|
||||
{
|
||||
messages_count = [NSNumber numberWithInt: theCount];
|
||||
recipients_count = [NSNumber numberWithInt: theRecipientsCount];
|
||||
|
||||
d = [NSMutableDictionary dictionaryWithDictionary: [self messageSubmissionsCountForLogin: theLogin]];
|
||||
|
||||
if (![d objectForKey: @"InitialDate"])
|
||||
{
|
||||
[d setObject: [NSNumber numberWithUnsignedInt: [[NSCalendarDate date] timeIntervalSince1970]] forKey: @"InitialDate"];
|
||||
}
|
||||
|
||||
[d setObject: messages_count forKey: @"MessagesCount"];
|
||||
[d setObject: recipients_count forKey: @"RecipientsCount"];
|
||||
|
||||
[self _cacheValues: [d jsonRepresentation]
|
||||
ofType: @"messagesubmissions"
|
||||
forKey: theLogin];
|
||||
}
|
||||
else
|
||||
{
|
||||
[self removeValueForKey: [NSString stringWithFormat: @"%@+messagesubmissions", theLogin]];
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// MessagesCount ->
|
||||
// RecipientsCount ->
|
||||
// InitialDate ->
|
||||
//
|
||||
- (NSDictionary *) messageSubmissionsCountForLogin: (NSString *) theLogin
|
||||
{
|
||||
NSDictionary *d;
|
||||
NSString *s;
|
||||
|
||||
s = [self _valuesOfType: @"messagesubmissions" forKey: theLogin];
|
||||
d = nil;
|
||||
|
||||
if (s)
|
||||
{
|
||||
d = [s objectFromJSONString];
|
||||
}
|
||||
|
||||
return d;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// CAS session support
|
||||
//
|
||||
|
@ -520,6 +648,17 @@ static memcached_st *handle = NULL;
|
|||
forKey: [NSString stringWithFormat: @"cas-pgtiou:%@", pgtIou]];
|
||||
}
|
||||
|
||||
- (void) removeCASSessionWithTicket: (NSString *) ticket
|
||||
{
|
||||
NSString *key, *session;
|
||||
if ((session = [self CASSessionWithTicket: ticket]))
|
||||
{
|
||||
key = [NSString stringWithFormat: @"cas-ticket:%@", ticket];
|
||||
[self removeValueForKey: key];
|
||||
[self debugWithFormat: @"Removed session: %@", session];
|
||||
}
|
||||
}
|
||||
|
||||
// SAML2 support
|
||||
- (NSDictionary *) saml2LoginDumpsForIdentifier: (NSString *) identifier
|
||||
{
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright (C) 2006-2010 Inverse inc.
|
||||
Copyright (C) 2006-2013 Inverse inc.
|
||||
Copyright (C) 2004-2005 SKYRIX Software AG
|
||||
|
||||
This file is part of SOGo.
|
||||
|
|
|
@ -132,7 +132,9 @@
|
|||
|
||||
if (renew)
|
||||
[session invalidateTicketForService: service];
|
||||
|
||||
password = [session ticketForService: service];
|
||||
|
||||
if ([password length] || renew)
|
||||
[session updateCache];
|
||||
}
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
|
||||
SOGoMailingMechanism = "sendmail";
|
||||
SOGoSMTPServer = "localhost";
|
||||
SOGoMailSpoolPath = "/tmp";
|
||||
SOGoMailSpoolPath = "/var/spool/sogo";
|
||||
|
||||
SOGoWebAccessEnabled = YES;
|
||||
SOGoCalendarDAVAccessEnabled = YES;
|
||||
|
|
|
@ -43,6 +43,7 @@
|
|||
- (NSString *) mailDomain;
|
||||
- (NSString *) imapServer;
|
||||
- (NSString *) sieveServer;
|
||||
- (NSString *) imapCASServiceName;
|
||||
- (NSString *) imapAclStyle;
|
||||
- (NSString *) imapAclGroupIdPrefix;
|
||||
- (NSString *) imapFolderSeparator;
|
||||
|
|
|
@ -123,6 +123,11 @@
|
|||
return [self stringForKey: @"SOGoSieveServer"];
|
||||
}
|
||||
|
||||
- (NSString *) imapCASServiceName
|
||||
{
|
||||
return [self objectForKey: @"SOGoIMAPCASServiceName"];
|
||||
}
|
||||
|
||||
#warning should be removed when we make use of imap namespace
|
||||
- (NSString *) imapAclStyle
|
||||
{
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
/* SOGoProxyAuthenticator.h - this file is part of SOGo
|
||||
*
|
||||
* Copyright (C) 2009-2011 Inverse inc.
|
||||
*
|
||||
* Author: Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
* Copyright (C) 2009-2013 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
|
||||
|
@ -32,6 +30,7 @@
|
|||
#import <NGExtensions/NSObject+Logs.h>
|
||||
|
||||
#import "SOGoPermissions.h"
|
||||
#import "SOGoSystemDefaults.h"
|
||||
#import "SOGoUser.h"
|
||||
|
||||
#import "SOGoProxyAuthenticator.h"
|
||||
|
@ -60,10 +59,16 @@
|
|||
{
|
||||
NSString *remoteUser;
|
||||
|
||||
|
||||
/* If such a header is not provided by the proxy, SOPE will attempt to
|
||||
deduce it from the "Authorization" header. */
|
||||
remoteUser = [[context request] headerForKey: @"x-webobjects-remote-user"];
|
||||
|
||||
if ([remoteUser length] == 0 && [[SOGoSystemDefaults sharedSystemDefaults] trustProxyAuthentication])
|
||||
{
|
||||
remoteUser = @"anonymous";
|
||||
}
|
||||
|
||||
return remoteUser;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
/* SOGoPublicBaseFolder.m - this file is part of SOGo
|
||||
*
|
||||
* Copyright (C) 2010 Inverse inc.
|
||||
*
|
||||
* Author: Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
* Copyright (C) 2010-2013 Inverse inc.
|
||||
*
|
||||
* This file is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* SOGoSystemDefaults.h - this file is part of SOGo
|
||||
*
|
||||
* Copyright (C) 2009-2011 Inverse inc.
|
||||
* Copyright (C) 2009-2013 Inverse inc.
|
||||
*
|
||||
* Author: Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
* Francis Lachapelle <flachapelle@inverse.ca>
|
||||
|
@ -86,6 +86,15 @@
|
|||
|
||||
- (BOOL) enablePublicAccess;
|
||||
|
||||
- (int) maximumFailedLoginCount;
|
||||
- (int) maximumFailedLoginInterval;
|
||||
- (int) failedLoginBlockInterval;
|
||||
|
||||
- (int) maximumMessageSubmissionCount;
|
||||
- (int) maximumRecipientCount;
|
||||
- (int) maximumSubmissionInterval;
|
||||
- (int) messageSubmissionBlockInterval;
|
||||
|
||||
@end
|
||||
|
||||
#endif /* SOGOSYSTEMDEFAULTS_H */
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* SOGoSystemDefaults.m - this file is part of SOGo
|
||||
*
|
||||
* Copyright (C) 2009-2012 Inverse inc.
|
||||
* Copyright (C) 2009-2013 Inverse inc.
|
||||
* Copyright (C) 2012 Jeroen Dekkers <jeroen@dekkers.ch>
|
||||
*
|
||||
* Author: Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
|
@ -513,4 +513,73 @@ _injectConfigurationFromFile (NSMutableDictionary *defaultsDict,
|
|||
return [self boolForKey: @"SOGoEnablePublicAccess"];
|
||||
}
|
||||
|
||||
//
|
||||
//
|
||||
//
|
||||
- (int) maximumFailedLoginCount
|
||||
{
|
||||
return [self integerForKey: @"SOGoMaximumFailedLoginCount"];
|
||||
}
|
||||
|
||||
- (int) maximumFailedLoginInterval
|
||||
{
|
||||
int v;
|
||||
|
||||
v = [self integerForKey: @"SOGoMaximumFailedLoginInterval"];
|
||||
|
||||
if (!v)
|
||||
v = 10;
|
||||
|
||||
return v;
|
||||
}
|
||||
|
||||
- (int) failedLoginBlockInterval
|
||||
{
|
||||
int v;
|
||||
|
||||
v = [self integerForKey: @"SOGoFailedLoginBlockInterval"];
|
||||
|
||||
if (!v)
|
||||
v = 300;
|
||||
|
||||
return v;
|
||||
}
|
||||
|
||||
//
|
||||
//
|
||||
//
|
||||
- (int) maximumMessageSubmissionCount
|
||||
{
|
||||
return [self integerForKey: @"SOGoMaximumMessageSubmissionCount"];
|
||||
}
|
||||
|
||||
- (int) maximumRecipientCount
|
||||
{
|
||||
return [self integerForKey: @"SOGoMaximumRecipientCount"];
|
||||
}
|
||||
|
||||
- (int) maximumSubmissionInterval
|
||||
{
|
||||
int v;
|
||||
|
||||
v = [self integerForKey: @"SOGoMaximumSubmissionInterval"];
|
||||
|
||||
if (!v)
|
||||
v = 30;
|
||||
|
||||
return v;
|
||||
}
|
||||
|
||||
- (int) messageSubmissionBlockInterval
|
||||
{
|
||||
int v;
|
||||
|
||||
v = [self integerForKey: @"SOGoMessageSubmissionBlockInterval"];
|
||||
|
||||
if (!v)
|
||||
v = 300;
|
||||
|
||||
return v;
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright (C) 2006-2011 Inverse inc.
|
||||
Copyright (C) 2006-2013 Inverse inc.
|
||||
Copyright (C) 2005 SKYRIX Software AG
|
||||
|
||||
This file is part of SOGo.
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* SOGoUserManager.m - this file is part of SOGo
|
||||
*
|
||||
* Copyright (C) 2007-2011 Inverse inc.
|
||||
* Copyright (C) 2007-2013 Inverse inc.
|
||||
*
|
||||
* Author: Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
* Francis Lachapelle <flachapelle@inverse.ca>
|
||||
|
@ -447,6 +447,9 @@ static Class NSNullK;
|
|||
return checkOK;
|
||||
}
|
||||
|
||||
//
|
||||
//
|
||||
//
|
||||
- (BOOL) checkLogin: (NSString *) _login
|
||||
password: (NSString *) _pwd
|
||||
domain: (NSString **) _domain
|
||||
|
@ -463,6 +466,9 @@ static Class NSNullK;
|
|||
useCache: YES];
|
||||
}
|
||||
|
||||
//
|
||||
//
|
||||
//
|
||||
- (BOOL) checkLogin: (NSString *) _login
|
||||
password: (NSString *) _pwd
|
||||
domain: (NSString **) _domain
|
||||
|
@ -471,8 +477,9 @@ static Class NSNullK;
|
|||
grace: (int *) _grace
|
||||
useCache: (BOOL) useCache
|
||||
{
|
||||
NSMutableDictionary *currentUser, *failedCount;
|
||||
NSString *dictPassword, *username, *jsonUser;
|
||||
NSMutableDictionary *currentUser;
|
||||
SOGoSystemDefaults *dd;
|
||||
BOOL checkOK;
|
||||
|
||||
// We check for cached passwords. If the entry is cached, we
|
||||
|
@ -482,6 +489,41 @@ static Class NSNullK;
|
|||
username = [NSString stringWithFormat: @"%@@%@", _login, *_domain];
|
||||
else
|
||||
username = _login;
|
||||
|
||||
failedCount = [[SOGoCache sharedCache] failedCountForLogin: username];
|
||||
dd = [SOGoSystemDefaults sharedSystemDefaults];
|
||||
|
||||
//
|
||||
// We check the fail count per user in memcache (per server). If the
|
||||
// fail count reaches X in Y minutes, we deny immediately the
|
||||
// authentications for Z minutes
|
||||
//
|
||||
if (failedCount)
|
||||
{
|
||||
unsigned int current_time, start_time, delta, block_time;
|
||||
|
||||
current_time = [[NSCalendarDate date] timeIntervalSince1970];
|
||||
start_time = [[failedCount objectForKey: @"InitialDate"] unsignedIntValue];
|
||||
delta = current_time - start_time;
|
||||
|
||||
block_time = [dd failedLoginBlockInterval];
|
||||
|
||||
if ([[failedCount objectForKey: @"FailedCount"] intValue] >= [dd maximumFailedLoginCount] &&
|
||||
delta >= [dd maximumFailedLoginInterval] &&
|
||||
delta <= block_time )
|
||||
{
|
||||
*_perr = PolicyAccountLocked;
|
||||
return NO;
|
||||
}
|
||||
|
||||
if (delta > block_time)
|
||||
{
|
||||
[[SOGoCache sharedCache] setFailedCount: 0
|
||||
forLogin: username];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
jsonUser = [[SOGoCache sharedCache] userAttributesForLogin: username];
|
||||
currentUser = [jsonUser objectFromJSONString];
|
||||
dictPassword = [currentUser objectForKey: @"password"];
|
||||
|
@ -514,7 +556,16 @@ static Class NSNullK;
|
|||
forLogin: username];
|
||||
}
|
||||
else
|
||||
{
|
||||
// If failed login "rate-limiting" is enabled, we adjust the stats
|
||||
if ([dd maximumFailedLoginCount])
|
||||
{
|
||||
[[SOGoCache sharedCache] setFailedCount: ([[failedCount objectForKey: @"FailedCount"] intValue] + 1)
|
||||
forLogin: username];
|
||||
}
|
||||
|
||||
checkOK = NO;
|
||||
}
|
||||
|
||||
// We MUST, for all LDAP sources, update the bindDN and bindPassword
|
||||
// to the user's value if bindAsCurrentUser is set to true in the
|
||||
|
@ -538,6 +589,9 @@ static Class NSNullK;
|
|||
return checkOK;
|
||||
}
|
||||
|
||||
//
|
||||
//
|
||||
//
|
||||
- (BOOL) changePasswordForLogin: (NSString *) login
|
||||
inDomain: (NSString *) domain
|
||||
oldPassword: (NSString *) oldPassword
|
||||
|
|
|
@ -269,31 +269,42 @@
|
|||
forceRenew: (BOOL) renew
|
||||
{
|
||||
NSString *authType, *password;
|
||||
SOGoSystemDefaults *sd;
|
||||
|
||||
password = [self passwordInContext: context];
|
||||
if ([password length])
|
||||
{
|
||||
authType = [[SOGoSystemDefaults sharedSystemDefaults]
|
||||
authenticationType];
|
||||
sd = [SOGoSystemDefaults sharedSystemDefaults];
|
||||
authType = [sd authenticationType];
|
||||
if ([authType isEqualToString: @"cas"])
|
||||
{
|
||||
SOGoCASSession *session;
|
||||
SOGoUser *user;
|
||||
NSString *service, *scheme;
|
||||
|
||||
session = [SOGoCASSession CASSessionWithIdentifier: password
|
||||
fromProxy: NO];
|
||||
|
||||
user = [self userInContext: context];
|
||||
// Try configured CAS service name first
|
||||
service = [[user domainDefaults] imapCASServiceName];
|
||||
if (!service)
|
||||
{
|
||||
// We must NOT assume the scheme exists
|
||||
scheme = [server scheme];
|
||||
|
||||
if (!scheme)
|
||||
scheme = @"imap";
|
||||
|
||||
service = [NSString stringWithFormat: @"%@://%@", scheme, [server host]];
|
||||
service = [NSString stringWithFormat: @"%@://%@",
|
||||
scheme, [server host]];
|
||||
}
|
||||
|
||||
if (renew)
|
||||
[session invalidateTicketForService: service];
|
||||
|
||||
password = [session ticketForService: service];
|
||||
|
||||
if ([password length] || renew)
|
||||
[session updateCache];
|
||||
}
|
||||
|
|
|
@ -0,0 +1,23 @@
|
|||
Sample HTTP request to exercise the CAS handleLogoutRequest code.
|
||||
Can be fed to sogo using nc or openssl s_client:
|
||||
nc devsogo 80 <postdata
|
||||
|
||||
|
||||
POST /SOGo/so/index HTTP/1.1
|
||||
Host: devsogo.inverse
|
||||
Content-Type: application/x-www-form-urlencoded
|
||||
Cache-Control: no-cache
|
||||
Pragma: no-cache
|
||||
User-Agent: Java/1.6.0_27
|
||||
Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
|
||||
x-webobjects-server-port: 80
|
||||
x-webobjects-server-name: devsogo.inverse
|
||||
x-webobjects-server-url: https://devsogo.inverse
|
||||
x-webobjects-server-protocol: HTTP/1.0
|
||||
X-Forwarded-For: 127.0.0.1
|
||||
X-Forwarded-Host: devsogo.inverse
|
||||
X-Forwarded-Server: sogo.example.com
|
||||
Connection: close
|
||||
Content-Length: 488
|
||||
|
||||
logoutRequest=%3Csamlp%3ALogoutRequest+xmlns%3Asamlp%3D%22urn%3Aoasis%3Anames%3Atc%3ASAML%3A2.0%3Aprotocol%22+ID%3D%22LR-235-vSfcLm3toF5lI1fithokTkBJqtAvo2JeI4X%22+Version%3D%222.0%22+IssueInstant%3D%222013-06-20T16%3A16%3A23Z%22%3E%3Csaml%3ANameID+xmlns%3Asaml%3D%22urn%3Aoasis%3Anames%3Atc%3ASAML%3A2.0%3Aassertion%22%3E%40NOT_USED%40%3C%2Fsaml%3ANameID%3E%3Csamlp%3ASessionIndex%3EST-242-MNlCHMMTJthSzx7oJEgI-cas01.example.org%3C%2Fsamlp%3ASessionIndex%3E%3C%2Fsamlp%3ALogoutRequest%3E
|
|
@ -1,8 +1,6 @@
|
|||
/* UIxFolderActions.h - this file is part of SOGo
|
||||
*
|
||||
* Copyright (C) 2007 Inverse inc.
|
||||
*
|
||||
* Author: Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
* Copyright (C) 2007-2013 Inverse inc.
|
||||
*
|
||||
* This file is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
/* UIxFolderActions.m - this file is part of SOGo
|
||||
*
|
||||
* Copyright (C) 2007-2010 Inverse inc.
|
||||
*
|
||||
* Author: Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
* Copyright (C) 2007-2013 Inverse inc.
|
||||
*
|
||||
* This file is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
Copyright (C) 2004-2005 SKYRIX Software AG
|
||||
Copyright (C) 2006-2012 Inverse inc.
|
||||
Copyright (C) 2006-2013 Inverse inc.
|
||||
|
||||
This file is part of SOGo
|
||||
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
/* UIxContactFoldersView.m - this file is part of SOGo
|
||||
*
|
||||
* Copyright (C) 2006-2010 Inverse inc.
|
||||
*
|
||||
* Author: Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
* Copyright (C) 2006-2013 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
|
||||
|
|
|
@ -105,7 +105,7 @@
|
|||
actionName = "export";
|
||||
};
|
||||
import = {
|
||||
protectedBy = "View";
|
||||
protectedBy = "Add Documents, Images, and Files";
|
||||
actionClass = "UIxContactFolderActions";
|
||||
actionName = "import";
|
||||
};
|
||||
|
|
|
@ -158,15 +158,15 @@ static NSData* _sanitizeContent(NSData *theData)
|
|||
{
|
||||
// We check if we see </head> in which case, we don't do any kind
|
||||
// of substitution there after.
|
||||
if (i < len-5)
|
||||
if (i < len-6)
|
||||
{
|
||||
if ((*bytes == '<') &&
|
||||
(*(bytes+1) == '/') &&
|
||||
(*(bytes+1) == 'h' || *(bytes+1) == 'H') &&
|
||||
(*(bytes+2) == 'e' || *(bytes+2) == 'E') &&
|
||||
(*(bytes+3) == 'a' || *(bytes+3) == 'A') &&
|
||||
(*(bytes+4) == 'd' || *(bytes+4) == 'D') &&
|
||||
(*(bytes+7) == '>'))
|
||||
(*(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;
|
||||
}
|
||||
|
||||
|
@ -189,7 +189,7 @@ static NSData* _sanitizeContent(NSData *theData)
|
|||
j = 8;
|
||||
found_delimiter = YES;
|
||||
|
||||
while (*(bytes+j) != ' ' && *(bytes+j) != '"')
|
||||
while (*(bytes+j) != ' ' && *(bytes+j) != '"' && *(bytes+j) != '\'')
|
||||
{
|
||||
j++;
|
||||
|
||||
|
|
|
@ -46,6 +46,8 @@
|
|||
#import <NGMime/NGMimeMultipartBody.h>
|
||||
#import <NGMime/NGMimeType.h>
|
||||
|
||||
#import <SOGo/SOGoCache.h>
|
||||
#import <SOGo/SOGoSystemDefaults.h>
|
||||
#import <SOGo/SOGoUserDefaults.h>
|
||||
#import <SOGo/SOGoUser.h>
|
||||
#import <SOGo/SOGoUserFolder.h>
|
||||
|
@ -659,12 +661,57 @@ static NSArray *infoKeys = nil;
|
|||
return error;
|
||||
}
|
||||
|
||||
//
|
||||
//
|
||||
//
|
||||
- (WOResponse *) sendAction
|
||||
{
|
||||
SOGoDraftObject *co;
|
||||
NSDictionary *jsonResponse;
|
||||
NSException *error;
|
||||
NSMutableArray *errorMsg;
|
||||
NSDictionary *messageSubmissions;
|
||||
SOGoSystemDefaults *dd;
|
||||
|
||||
int messages_count, recipients_count;
|
||||
|
||||
messageSubmissions = [[SOGoCache sharedCache] messageSubmissionsCountForLogin: [[context activeUser] login]];
|
||||
dd = [SOGoSystemDefaults sharedSystemDefaults];
|
||||
messages_count = recipients_count = 0;
|
||||
|
||||
if (messageSubmissions)
|
||||
{
|
||||
unsigned int current_time, start_time, delta, block_time;
|
||||
|
||||
current_time = [[NSCalendarDate date] timeIntervalSince1970];
|
||||
start_time = [[messageSubmissions objectForKey: @"InitialDate"] unsignedIntValue];
|
||||
delta = current_time - start_time;
|
||||
|
||||
block_time = [dd messageSubmissionBlockInterval];
|
||||
messages_count = [[messageSubmissions objectForKey: @"MessagesCount"] intValue];
|
||||
recipients_count = [[messageSubmissions objectForKey: @"RecipientsCount"] intValue];
|
||||
|
||||
if ((messages_count >= [dd maximumMessageSubmissionCount] || recipients_count >= [dd maximumRecipientCount]) &&
|
||||
delta >= [dd maximumSubmissionInterval] &&
|
||||
delta <= block_time )
|
||||
{
|
||||
jsonResponse = [NSDictionary dictionaryWithObjectsAndKeys:
|
||||
@"failure", @"status",
|
||||
[self labelForKey: @"Tried to send too many mails. Please wait."],
|
||||
@"message",
|
||||
nil];
|
||||
return [self responseWithStatus: 200
|
||||
andString: [jsonResponse jsonRepresentation]];
|
||||
}
|
||||
|
||||
if (delta > block_time)
|
||||
{
|
||||
[[SOGoCache sharedCache] setMessageSubmissionsCount: 0
|
||||
recipientsCount: 0
|
||||
forLogin: [[context activeUser] login]];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
co = [self clientObject];
|
||||
|
||||
|
@ -691,12 +738,24 @@ static NSArray *infoKeys = nil;
|
|||
nil];
|
||||
}
|
||||
else
|
||||
{
|
||||
jsonResponse = [NSDictionary dictionaryWithObjectsAndKeys:
|
||||
@"success", @"status",
|
||||
[co sourceFolder], @"sourceFolder",
|
||||
[NSNumber numberWithInt: [co IMAP4ID]], @"messageID",
|
||||
nil];
|
||||
|
||||
recipients_count += [[co allRecipients] count];
|
||||
messages_count += 1;
|
||||
|
||||
if ([dd maximumMessageSubmissionCount] > 0 && [dd maximumRecipientCount] > 0)
|
||||
{
|
||||
[[SOGoCache sharedCache] setMessageSubmissionsCount: messages_count
|
||||
recipientsCount: recipients_count
|
||||
forLogin: [[context activeUser] login]];
|
||||
}
|
||||
}
|
||||
|
||||
return [self responseWithStatus: 200
|
||||
andString: [jsonResponse jsonRepresentation]];
|
||||
}
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
/* UIxMailUserRightsEditor.h - this file is part of SOGo
|
||||
*
|
||||
* Copyright (C) 2007 Inverse inc.
|
||||
*
|
||||
* Author: Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
* Copyright (C) 2007-2013 Inverse inc.
|
||||
*
|
||||
* This file is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
/* UIxMailUserRightsEditor.m - this file is part of SOGo
|
||||
*
|
||||
* Copyright (C) 2007 Inverse inc.
|
||||
*
|
||||
* Author: Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
* Copyright (C) 2007-2013 Inverse inc.
|
||||
*
|
||||
* This file is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -1,14 +1,15 @@
|
|||
/*
|
||||
Copyright (C) 2004-2005 SKYRIX Software AG
|
||||
Copyright (C) 2005-2013 Inverse inc.
|
||||
|
||||
This file is part of OpenGroupware.org.
|
||||
This file is part of SOGo.
|
||||
|
||||
OGo is free software; you can redistribute it and/or modify it under
|
||||
SOGo is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU Lesser General Public License as published by the
|
||||
Free Software Foundation; either version 2, or (at your option) any
|
||||
later version.
|
||||
|
||||
OGo is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
SOGo is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
|
||||
License for more details.
|
||||
|
@ -30,6 +31,8 @@
|
|||
|
||||
#import <NGMime/NGMimeBodyPart.h>
|
||||
#import <NGMime/NGMimeMultipartBody.h>
|
||||
#import <NGMail/NGMailAddress.h>
|
||||
#import <NGMail/NGMailAddressParser.h>
|
||||
#import <NGMail/NGMimeMessage.h>
|
||||
#import <NGMail/NGMimeMessageGenerator.h>
|
||||
|
||||
|
@ -216,7 +219,7 @@ static NSString *mailETag = nil;
|
|||
{
|
||||
identityEmail = [[identities objectAtIndex: count]
|
||||
objectForKey: @"email"];
|
||||
rc = [identityEmail isEqualToString: email];
|
||||
rc = ([identityEmail caseInsensitiveCompare: email] == NSOrderedSame);
|
||||
}
|
||||
|
||||
return rc;
|
||||
|
@ -489,6 +492,7 @@ static NSString *mailETag = nil;
|
|||
|
||||
- (NSString *) shouldAskReceipt
|
||||
{
|
||||
NGMailAddress *mailAddress;
|
||||
NSDictionary *mailHeaders;
|
||||
NSString *email, *action;
|
||||
|
||||
|
@ -504,6 +508,15 @@ static NSString *mailETag = nil;
|
|||
email = [mailHeaders objectForKey: @"return-receipt-to"];
|
||||
}
|
||||
|
||||
// email here can be "foo@bar.com" or "Foo Bar <foo@bar.com>"
|
||||
// we must extract the actual email address
|
||||
mailAddress = [[NGMailAddressParser mailAddressParserWithString: email] parse];
|
||||
|
||||
if ([mailAddress isKindOfClass: [NGMailAddress class]])
|
||||
email = [mailAddress address];
|
||||
else
|
||||
email = nil;
|
||||
|
||||
if (email)
|
||||
{
|
||||
if (![self _userHasEMail: email]
|
||||
|
|
|
@ -172,6 +172,9 @@
|
|||
andJSONRepresentation: jsonError];
|
||||
}
|
||||
|
||||
//
|
||||
//
|
||||
//
|
||||
- (id <WOActionResults>) connectAction
|
||||
{
|
||||
WOResponse *response;
|
||||
|
@ -269,10 +272,13 @@
|
|||
{
|
||||
NSDictionary *redirectKeys;
|
||||
NSURL *soURL;
|
||||
NSString *serviceURL;
|
||||
|
||||
soURL = [[WOApplication application] soURL];
|
||||
// appending 'index' to /SOGo/so/. Matches serviceURL sent by _pgtUrlFromURL
|
||||
serviceURL = [NSString stringWithFormat: @"%@index", [soURL absoluteString]];
|
||||
|
||||
redirectKeys = [NSDictionary dictionaryWithObject: [soURL absoluteString]
|
||||
redirectKeys = [NSDictionary dictionaryWithObject: serviceURL
|
||||
forKey: @"service"];
|
||||
|
||||
return redirectKeys;
|
||||
|
@ -299,7 +305,7 @@
|
|||
- (id <WOActionResults>) _casDefaultAction
|
||||
{
|
||||
WOResponse *response;
|
||||
NSString *login, *newLocation, *oldLocation, *ticket;
|
||||
NSString *login, *logoutRequest, *newLocation, *oldLocation, *ticket;
|
||||
SOGoCASSession *casSession;
|
||||
SOGoWebAuthenticator *auth;
|
||||
WOCookie *casCookie, *casLocationCookie;
|
||||
|
@ -337,6 +343,18 @@
|
|||
withName: @"cas-location"];
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/* anonymous and no ticket, possibly a logout request from CAS
|
||||
* See: https://wiki.jasig.org/display/CASUM/Single+Sign+Out
|
||||
*/
|
||||
logoutRequest = [rq formValueForKey: @"logoutRequest"];
|
||||
if ([logoutRequest length])
|
||||
{
|
||||
[SOGoCASSession handleLogoutRequest: logoutRequest];
|
||||
return [self responseWithStatus: 200];
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
ticket = nil;
|
||||
|
|
|
@ -179,6 +179,8 @@
|
|||
"Reminder:" = "Reminder:";
|
||||
"General:" = "General:";
|
||||
"Reply:" = "Reply:";
|
||||
"Created by:" = "Created by:";
|
||||
|
||||
|
||||
"Target:" = "Target:";
|
||||
|
||||
|
@ -373,6 +375,9 @@
|
|||
|
||||
"Show Time as Free" = "Show Time as Free";
|
||||
|
||||
/* email notifications */
|
||||
"Send Appointment Notifications" = "Send Appointment Notifications";
|
||||
|
||||
/* validation errors */
|
||||
|
||||
validate_notitle = "No title is set, continue?";
|
||||
|
|
|
@ -179,6 +179,8 @@
|
|||
"Reminder:" = "Rappel :";
|
||||
"General:" = "Général:";
|
||||
"Reply:" = "Réponse:";
|
||||
"Created by:" = "Créé par:";
|
||||
|
||||
|
||||
"Target:" = "Destination :";
|
||||
|
||||
|
@ -373,6 +375,9 @@
|
|||
|
||||
"Show Time as Free" = "Affiché comme disponible";
|
||||
|
||||
/* email notifications */
|
||||
"Send Appointment Notifications" = "Envoyer les notifications des événements";
|
||||
|
||||
/* validation errors */
|
||||
|
||||
validate_notitle = "Le titre n'est pas rempli. Continuer quand-même ?";
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
/* UIxAppointmentEditor.h - this file is part of SOGo
|
||||
*
|
||||
* Copyright (C) 2007-2012 Inverse inc.
|
||||
*
|
||||
* Author: Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
* Copyright (C) 2007-2013 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
|
||||
|
@ -31,7 +29,7 @@
|
|||
@interface UIxAppointmentEditor : UIxComponent
|
||||
{
|
||||
iCalEvent *event;
|
||||
BOOL isAllDay, isTransparent;
|
||||
BOOL isAllDay, isTransparent, sendAppointmentNotifications;
|
||||
NSCalendarDate *aptStartDate;
|
||||
NSCalendarDate *aptEndDate;
|
||||
NSString *item;
|
||||
|
@ -50,6 +48,9 @@
|
|||
- (void) setIsTransparent: (BOOL) newIsOpaque;
|
||||
- (BOOL) isTransparent;
|
||||
|
||||
- (void) setSendAppointmentNotifications: (BOOL) theBOOL;
|
||||
- (BOOL) sendAppointmentNotifications;
|
||||
|
||||
- (void) setAptStartDate: (NSCalendarDate *) newAptStartDate;
|
||||
- (NSCalendarDate *) aptStartDate;
|
||||
|
||||
|
|
|
@ -2,9 +2,6 @@
|
|||
*
|
||||
* Copyright (C) 2007-2013 Inverse inc.
|
||||
*
|
||||
* Author: Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
* Francis Lachapelle <flachapelle@inverse.ca>
|
||||
*
|
||||
* 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)
|
||||
|
@ -51,6 +48,7 @@
|
|||
#import <SOGo/SOGoPermissions.h>
|
||||
#import <SOGo/SOGoUser.h>
|
||||
#import <SOGo/SOGoUserDefaults.h>
|
||||
#import <Appointments/iCalEntityObject+SOGo.h>
|
||||
#import <Appointments/iCalPerson+SOGo.h>
|
||||
#import <Appointments/SOGoAppointmentFolder.h>
|
||||
#import <Appointments/SOGoAppointmentObject.h>
|
||||
|
@ -75,6 +73,7 @@
|
|||
event = nil;
|
||||
isAllDay = NO;
|
||||
isTransparent = NO;
|
||||
sendAppointmentNotifications = YES;
|
||||
componentCalendar = nil;
|
||||
|
||||
user = [[self context] activeUser];
|
||||
|
@ -139,6 +138,17 @@
|
|||
isTransparent = newIsTransparent;
|
||||
}
|
||||
|
||||
- (void) setSendAppointmentNotifications: (BOOL) theBOOL
|
||||
{
|
||||
sendAppointmentNotifications = theBOOL;
|
||||
}
|
||||
|
||||
- (BOOL) sendAppointmentNotifications
|
||||
{
|
||||
return sendAppointmentNotifications;
|
||||
}
|
||||
|
||||
|
||||
- (void) setAptStartDate: (NSCalendarDate *) newAptStartDate
|
||||
{
|
||||
ASSIGN (aptStartDate, newAptStartDate);
|
||||
|
@ -279,6 +289,7 @@
|
|||
endDate
|
||||
= [startDate dateByAddingYears: 0 months: 0 days: 0
|
||||
hours: hours minutes: minutes seconds: 0];
|
||||
sendAppointmentNotifications = YES;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -297,6 +308,7 @@
|
|||
seconds:-offset];
|
||||
}
|
||||
isTransparent = ![event isOpaque];
|
||||
sendAppointmentNotifications = ([event firstChildWithTag: @"X-SOGo-Send-Appointment-Notifications"] ? NO : YES);
|
||||
}
|
||||
|
||||
[startDate setTimeZone: timeZone];
|
||||
|
@ -456,6 +468,8 @@
|
|||
NSTimeZone *timeZone;
|
||||
SOGoUserDefaults *ud;
|
||||
SOGoCalendarComponent *co;
|
||||
NSString *created_by;
|
||||
|
||||
BOOL resetAlarm;
|
||||
unsigned int snoozeAlarm;
|
||||
|
||||
|
@ -501,6 +515,8 @@
|
|||
}
|
||||
}
|
||||
|
||||
created_by = [event createdBy];
|
||||
|
||||
data = [NSDictionary dictionaryWithObjectsAndKeys:
|
||||
[componentCalendar displayName], @"calendar",
|
||||
[event tag], @"component",
|
||||
|
@ -512,6 +528,7 @@
|
|||
([event isAllDay] ? @"1": @"0"), @"isAllDay",
|
||||
[event summary], @"summary",
|
||||
[event location], @"location",
|
||||
created_by, @"created_by",
|
||||
[event comment], @"description",
|
||||
nil];
|
||||
|
||||
|
@ -541,6 +558,7 @@
|
|||
NSTimeZone *timeZone;
|
||||
SOGoUserDefaults *ud;
|
||||
signed int offset;
|
||||
id o;
|
||||
|
||||
[self event];
|
||||
[super takeValuesFromRequest: _rq inContext: _ctx];
|
||||
|
@ -594,6 +612,14 @@
|
|||
}
|
||||
|
||||
[event setTransparency: (isTransparent? @"TRANSPARENT" : @"OPAQUE")];
|
||||
|
||||
o = [event firstChildWithTag: @"X-SOGo-Send-Appointment-Notifications"];
|
||||
|
||||
if (!sendAppointmentNotifications && !o)
|
||||
[event addChild: [CardElement simpleElementWithTag: @"X-SOGo-Send-Appointment-Notifications" value: @"NO"]];
|
||||
else if (sendAppointmentNotifications && o)
|
||||
[event removeChild: o];
|
||||
|
||||
}
|
||||
|
||||
- (id) _statusChangeAction: (NSString *) newStatus
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright (C) 2006-2012 Inverse inc.
|
||||
Copyright (C) 2006-2013 Inverse inc.
|
||||
Copyright (C) 2004-2005 SKYRIX Software AG
|
||||
|
||||
This file is part of SOGo
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Copyright (C) 2006-2012 Inverse inc.
|
||||
Copyright (C) 2006-2013 Inverse inc.
|
||||
Copyright (C) 2004-2005 SKYRIX Software AG
|
||||
|
||||
This file is part of SOGo
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
/* UIxCalMainActions.h - this file is part of SOGo
|
||||
*
|
||||
* Copyright (C) 2009 Inverse inc.
|
||||
*
|
||||
* Author: Cyril Robert <crobert@inverse.ca>
|
||||
* Copyright (C) 2009-2013 Inverse inc.
|
||||
*
|
||||
* This file is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
/* UIxCalMainActions.m - this file is part of SOGo
|
||||
*
|
||||
* Copyright (C) 2009 Inverse inc.
|
||||
*
|
||||
* Author: Cyril Robert <crobert@inverse.ca>
|
||||
* Copyright (C) 2009-2013 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
|
||||
|
|
|
@ -143,6 +143,10 @@
|
|||
- (NSString *) attach;
|
||||
|
||||
- (BOOL) hasAttendees;
|
||||
- (BOOL) hasCreatedBy;
|
||||
- (NSString *) createdBy;
|
||||
- (NSString *) createdByLink;
|
||||
- (NSString *) createdByName;
|
||||
|
||||
- (NSString *) jsonAttendees;
|
||||
|
||||
|
|
|
@ -834,6 +834,41 @@ iRANGE(2);
|
|||
return organizerProfile;
|
||||
}
|
||||
|
||||
|
||||
- (BOOL) hasCreatedBy
|
||||
{
|
||||
return ([[[component firstChildWithTag: @"X-SOGo-Component-Created-By"] flattenedValuesForKey: @""] length] > 0);
|
||||
}
|
||||
|
||||
- (NSString *) createdBy
|
||||
{
|
||||
return [[component firstChildWithTag: @"X-SOGo-Component-Created-By"] flattenedValuesForKey: @""];
|
||||
}
|
||||
|
||||
- (NSString *) createdByLink
|
||||
{
|
||||
return [NSString stringWithFormat: @"mailto:%@",
|
||||
[[component firstChildWithTag: @"X-SOGo-Component-Created-By"] flattenedValuesForKey: @""]];
|
||||
}
|
||||
|
||||
- (NSString *) createdByName
|
||||
{
|
||||
NSString *login;
|
||||
SOGoUser *user;
|
||||
|
||||
login = [[SOGoUserManager sharedUserManager] getUIDForEmail: [self createdBy]];
|
||||
|
||||
if (login)
|
||||
{
|
||||
user = [SOGoUser userWithLogin: login];
|
||||
|
||||
if (user)
|
||||
return [user cn];
|
||||
}
|
||||
|
||||
return @"";
|
||||
}
|
||||
|
||||
- (NSString *) organizerName
|
||||
{
|
||||
NSDictionary *profile;
|
||||
|
@ -1834,7 +1869,7 @@ RANGE(2);
|
|||
|
||||
- (void) _handleOrganizer
|
||||
{
|
||||
NSString *owner, *login;
|
||||
NSString *owner, *login, *currentEmail;
|
||||
BOOL isOwner, hasAttendees;
|
||||
|
||||
//owner = [[self clientObject] ownerInContext: context];
|
||||
|
@ -1842,8 +1877,8 @@ RANGE(2);
|
|||
login = [[context activeUser] login];
|
||||
isOwner = [owner isEqualToString: login];
|
||||
hasAttendees = [self hasAttendees];
|
||||
currentEmail = [[[context activeUser] allEmails] objectAtIndex: 0];
|
||||
|
||||
#if 1
|
||||
if (hasAttendees)
|
||||
{
|
||||
SOGoUser *user;
|
||||
|
@ -1859,9 +1894,8 @@ RANGE(2);
|
|||
|
||||
if (!isOwner)
|
||||
{
|
||||
NSString *currentEmail, *quotedEmail;
|
||||
NSString *quotedEmail;
|
||||
|
||||
currentEmail = [[[context activeUser] allEmails] objectAtIndex: 0];
|
||||
quotedEmail = [NSString stringWithFormat: @"\"MAILTO:%@\"",
|
||||
currentEmail];
|
||||
[organizer setValue: 0 ofAttribute: @"SENT-BY"
|
||||
|
@ -1873,30 +1907,17 @@ RANGE(2);
|
|||
organizer = nil;
|
||||
}
|
||||
[component setOrganizer: organizer];
|
||||
#else
|
||||
NSString *organizerEmail;
|
||||
BOOL hasOrganizer;
|
||||
organizerEmail = [[component organizer] email];
|
||||
hasOrganizer = ([organizerEmail length] > 0);
|
||||
if (hasOrganizer)
|
||||
|
||||
// In case of a new component, if the current user isn't the owner of the calendar, we
|
||||
// add the "X-SOGo-Component-Created-By: <email address>" attribute
|
||||
if ([[self clientObject] isNew] &&
|
||||
!isOwner &&
|
||||
[currentEmail length])
|
||||
{
|
||||
if (isOwner && !hasAttendees)
|
||||
{
|
||||
ASSIGN (organizer, [iCalPerson elementWithTag: @"organizer"]);
|
||||
[component setOrganizer: organizer];
|
||||
[component addChild: [CardElement simpleElementWithTag: @"X-SOGo-Component-Created-By"
|
||||
value: currentEmail]];
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!isOwner || hasAttendees)
|
||||
{
|
||||
ASSIGN (organizer, [iCalPerson elementWithTag: @"organizer"]);
|
||||
[organizer setCn: [organizerIdentity objectForKey: @"fullName"]];
|
||||
[organizer setEmail: [organizerIdentity objectForKey: @"email"]];
|
||||
[component setOrganizer: organizer];
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
- (void) _handleCustomRRule: (iCalRecurrenceRule *) theRule
|
||||
|
|
|
@ -150,7 +150,7 @@
|
|||
actionName = "redirectForUIDs";
|
||||
};
|
||||
import = {
|
||||
protectedBy = "View";
|
||||
protectedBy = "Add Documents, Images, and Files";
|
||||
actionClass = "UIxCalFolderActions";
|
||||
actionName = "import";
|
||||
};
|
||||
|
|
|
@ -53,6 +53,13 @@
|
|||
var:checked="isTransparent"
|
||||
/> <var:string label:value="Show Time as Free"
|
||||
/></span></span></label>
|
||||
<label><span class="content">
|
||||
<span id="sendAppointmentNotifications"><input class="checkBox"
|
||||
type="checkbox" name="sendAppointmentNotifications" var:selection="sendAppointmentNotifications"
|
||||
var:checked="sendAppointmentNotifications"
|
||||
/> <var:string label:value="Send Appointment Notifications"
|
||||
/></span></span></label>
|
||||
|
||||
</var:if>
|
||||
<var:if condition="eventIsReadOnly">
|
||||
<var:if condition="isAllDay">
|
||||
|
|
|
@ -100,6 +100,7 @@
|
|||
<p><span><!-- space --></span></p>
|
||||
<p><span class="label"><var:string label:value="Calendar:" /></span> <span><!-- space --></span></p>
|
||||
<p><span class="label"><var:string label:value="Location:" /></span> <span><!-- space --></span></p>
|
||||
<p><span class="label"><var:string label:value="Created by:" /></span> <span><!-- space --></span></p>
|
||||
<p class="description"><!-- space --></p>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -73,6 +73,12 @@
|
|||
><var:string value="organizerName" /></a
|
||||
></span></label>
|
||||
</var:if>
|
||||
<var:if condition="hasCreatedBy"
|
||||
><label id="createdByLabel"><var:string label:value="Created by:"
|
||||
/><span class="content"><a var:href="createdByLink" var:email="createdBy"
|
||||
><var:string value="createdByName" /></a
|
||||
></span></label>
|
||||
</var:if>
|
||||
<!--<var:if condition="canBeOrganizer"
|
||||
><label id="organizerListLabel"><var:string label:value="Organizer:"
|
||||
/><span class="content"><var:popup list="organizerList"
|
||||
|
@ -221,6 +227,13 @@
|
|||
></span>
|
||||
</label>
|
||||
</var:if>
|
||||
<var:if condition="hasCreatedBy">
|
||||
<label id="createdByLabel"><var:string label:value="Created by:"/>
|
||||
<span class="content"><a var:href="createdBy" var:email="createdBy"
|
||||
><var:string value="createdByName" /></a
|
||||
></span>
|
||||
</label>
|
||||
</var:if>
|
||||
<var:if condition="userHasRSVP">
|
||||
<label><var:string label:value="Reply:" />
|
||||
<span class="content"><var:popup list="replyList" item="item"
|
||||
|
|
|
@ -806,12 +806,15 @@ function validateUploadForm () {
|
|||
return rc;
|
||||
}
|
||||
function uploadCompleted(response) {
|
||||
data = response.evalJSON(true);
|
||||
jQuery('#uploadCancel').show();
|
||||
var btn = jQuery('#uploadSubmit');
|
||||
btn.removeClass("disabled");
|
||||
btn.children('span').text(_('Upload'));
|
||||
var div = $("uploadResults");
|
||||
|
||||
try {
|
||||
data = response.evalJSON(true);
|
||||
|
||||
if (data.imported <= 0)
|
||||
$("uploadResultsContent").update(_("An error occured while importing contacts."));
|
||||
else if (data.imported == 0)
|
||||
|
@ -820,6 +823,9 @@ function uploadCompleted(response) {
|
|||
$("uploadResultsContent").update(_("A total of %{0} cards were imported in the addressbook.").formatted(data.imported));
|
||||
refreshCurrentFolder();
|
||||
}
|
||||
} catch (e) {
|
||||
$("uploadResultsContent").update(_("An error occured while importing contacts."));
|
||||
}
|
||||
|
||||
hideContactsImport();
|
||||
$("uploadResults").show();
|
||||
|
|
|
@ -761,6 +761,13 @@ function onViewEventCallback(http) {
|
|||
para.hide();
|
||||
|
||||
para = $(paras[3]);
|
||||
if (data["created_by"].length) {
|
||||
para.down("SPAN", 1).update(data["created_by"]);
|
||||
para.show();
|
||||
} else
|
||||
para.hide();
|
||||
|
||||
para = $(paras[4]);
|
||||
if (data["description"].length) {
|
||||
para.update(data["description"].replace(/\r?\n/g, "<BR/>"));
|
||||
para.show();
|
||||
|
@ -3006,12 +3013,15 @@ function validateUploadForm() {
|
|||
return rc;
|
||||
}
|
||||
function uploadCompleted(response) {
|
||||
data = response.evalJSON(true);
|
||||
jQuery('#uploadCancel').show();
|
||||
var btn = jQuery('#uploadSubmit');
|
||||
btn.removeClass("disabled");
|
||||
btn.children('span').text(_('Upload'));
|
||||
var div = $("uploadResults");
|
||||
|
||||
try {
|
||||
data = response.evalJSON(true);
|
||||
|
||||
if (data.imported < 0)
|
||||
$("uploadResultsContent").update(_("An error occurred while importing calendar."));
|
||||
else if (data.imported == 0)
|
||||
|
@ -3020,6 +3030,9 @@ function uploadCompleted(response) {
|
|||
$("uploadResultsContent").update(_("A total of %{0} events were imported in the calendar.").formatted(data.imported));
|
||||
refreshEventsAndDisplay();
|
||||
}
|
||||
} catch (e) {
|
||||
$("uploadResultsContent").update(_("An error occurred while importing calendar."));
|
||||
}
|
||||
|
||||
hideCalendarImport();
|
||||
$("uploadResults").show();
|
||||
|
|
|
@ -2,15 +2,17 @@
|
|||
|
||||
/*
|
||||
Copyright (C) 2005 SKYRIX Software AG
|
||||
Copyright (C) 2006-2013 Inverse inc.
|
||||
|
||||
This file is part of OpenGroupware.org.
|
||||
|
||||
OGo is free software; you can redistribute it and/or modify it under
|
||||
This file is part of SOGo.
|
||||
|
||||
SOGo is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU Lesser General Public License as published by the
|
||||
Free Software Foundation; either version 2, or (at your option) any
|
||||
later version.
|
||||
|
||||
OGo is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
SOGo is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
|
||||
License for more details.
|
||||
|
@ -527,6 +529,11 @@ function onAppointmentEditorLoad() {
|
|||
organizer.down("a").on("click", onMailTo);
|
||||
}
|
||||
|
||||
var createdBy = $("createdByLabel");
|
||||
if (createdBy && createdBy.down("a")) {
|
||||
createdBy.down("a").on("click", onMailTo);
|
||||
}
|
||||
|
||||
// Extend JSON representation of attendees
|
||||
attendees = $H(attendees);
|
||||
initializeAttendeesHref();
|
||||
|
|
|
@ -54,9 +54,13 @@ var CKBUILDER_CONFIG = {
|
|||
'scayt' : 1,
|
||||
'format' : 1,
|
||||
'justify' : 1,
|
||||
'wsc' : 1
|
||||
'wsc' : 1,
|
||||
'colordialog' : 1,
|
||||
'contextmenu' : 1,
|
||||
'blockquote' : 1
|
||||
},
|
||||
languages : {
|
||||
'ar' : 1,
|
||||
'ca' : 1,
|
||||
'cs' : 1,
|
||||
'da' : 1,
|
||||
|
@ -71,7 +75,7 @@ var CKBUILDER_CONFIG = {
|
|||
'no' : 1,
|
||||
'nb' : 1,
|
||||
'pl' : 1,
|
||||
'pt' : 1,
|
||||
'pt-br' : 1,
|
||||
'ru' : 1,
|
||||
'sk' : 1,
|
||||
'es' : 1,
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,20 +1,41 @@
|
|||
/**
|
||||
* @license Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||
* @license Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
|
||||
* For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
|
||||
CKEDITOR.editorConfig = function( config ) {
|
||||
config.toolbar = [
|
||||
{ name: 'basicstyles', items: [ 'Bold', 'Italic', 'TextColor' ] },
|
||||
{ name: 'paragraph', items: [ 'NumberedList', 'BulletedList',
|
||||
'-',
|
||||
'Blockquote', 'Outdent', 'Indent',
|
||||
'-',
|
||||
'JustifyLeft', 'JustifyCenter', 'JustifyRight' ] },
|
||||
{ name: 'links', items: [ 'Link', 'Unlink' ] },
|
||||
{ name: 'insert', items: [ 'Image' ] },
|
||||
{ name: 'editing', items: [ 'Font', 'FontSize', 'Scayt' ] }
|
||||
];
|
||||
config.toolbarGroups = [
|
||||
{ name: 'basicstyles', groups: [ 'basicstyles' ] },
|
||||
{ name: 'paragraph', groups: [ 'list', 'align' ] },
|
||||
{ name: 'basicstyles' },
|
||||
{ name: 'paragraph' },
|
||||
{ name: 'links' },
|
||||
{ name: 'insert' },
|
||||
['Font', 'FontSize'],
|
||||
{ name: 'colors' },
|
||||
['SpellChecker','Scayt']
|
||||
{ name: 'editing' }
|
||||
];
|
||||
|
||||
config.removeButtons = 'Anchor,Underline,Strike,Subscript,Superscript';
|
||||
config.removeDialogTabs = 'link:advanced';
|
||||
config.removeDialogTabs = 'link:advanced;image:advanced';
|
||||
config.enterMode = CKEDITOR.ENTER_BR;
|
||||
|
||||
// Disables the built-in words spell checker if browser provides one. Defaults to true.
|
||||
// http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-disableNativeSpellChecker
|
||||
//config.disableNativeSpellChecker = false;
|
||||
|
||||
// Whether to show the browser native context menu when the Ctrl or Meta (Mac) key is pressed on opening the context
|
||||
// menu with the right mouse button click or the Menu key. Defaults to true.
|
||||
// http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-browserContextMenuOnCtrl
|
||||
//config.browserContextMenuOnCtrl = false;
|
||||
|
||||
// If enabled, turns on SCAYT automatically after loading the editor. Defaults to false.
|
||||
// http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-scayt_autoStartup
|
||||
//config.scayt_autoStartup = true;
|
||||
};
|
||||
|
|
|
@ -97,3 +97,7 @@ pre
|
|||
white-space: pre-wrap; /* CSS 2.1 */
|
||||
word-wrap: break-word; /* IE7 */
|
||||
}
|
||||
|
||||
.marker {
|
||||
background-color: Yellow;
|
||||
}
|
||||
|
|
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
File diff suppressed because one or more lines are too long
|
@ -2,10 +2,10 @@
|
|||
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.dialog.add("paste",function(c){function g(a){var b=new CKEDITOR.dom.document(a.document),d=b.getBody(),e=b.getById("cke_actscrpt");e&&e.remove();d.setAttribute("contenteditable",!0);if(CKEDITOR.env.ie&&8>CKEDITOR.env.version)b.getWindow().on("blur",function(){b.$.selection.empty()});b.on("keydown",function(a){var a=a.data,b;switch(a.getKeystroke()){case 27:this.hide();b=1;break;case 9:case CKEDITOR.SHIFT+9:this.changeFocus(1),b=1}b&&a.preventDefault()},this);c.fire("ariaWidget",new CKEDITOR.dom.element(a.frameElement));
|
||||
b.getWindow().getFrame().removeCustomData("pendingFocus")&&d.focus()}var f=c.lang.clipboard,h=CKEDITOR.env.isCustomDomain();c.on("pasteDialogCommit",function(a){a.data&&c.fire("paste",{type:"auto",dataValue:a.data})},null,null,1E3);return{title:f.title,minWidth:CKEDITOR.env.ie&&CKEDITOR.env.quirks?370:350,minHeight:CKEDITOR.env.quirks?250:245,onShow:function(){this.parts.dialog.$.offsetHeight;this.setupContent();this.parts.title.setHtml(this.customTitle||f.title);this.customTitle=null},onLoad:function(){(CKEDITOR.env.ie7Compat||
|
||||
CKEDITOR.env.ie6Compat)&&"rtl"==c.lang.dir&&this.parts.contents.setStyle("overflow","hidden")},onOk:function(){this.commitContent()},contents:[{id:"general",label:c.lang.common.generalTab,elements:[{type:"html",id:"securityMsg",html:'<div style="white-space:normal;width:340px">'+f.securityMsg+"</div>"},{type:"html",id:"pasteMsg",html:'<div style="white-space:normal;width:340px">'+f.pasteMsg+"</div>"},{type:"html",id:"editing_area",style:"width:100%;height:100%",html:"",focus:function(){var a=this.getInputElement(),
|
||||
b=a.getFrameDocument().getBody();!b||b.isReadOnly()?a.setCustomData("pendingFocus",1):b.focus()},setup:function(){var a=this.getDialog(),b='<html dir="'+c.config.contentsLangDirection+'" lang="'+(c.config.contentsLanguage||c.langCode)+'"><head><style>body{margin:3px;height:95%}</style></head><body><script id="cke_actscrpt" type="text/javascript">window.parent.CKEDITOR.tools.callFunction('+CKEDITOR.tools.addFunction(g,a)+",this);<\/script></body></html>",d=CKEDITOR.dom.element.createFromHtml('<iframe class="cke_pasteframe" frameborder="0" allowTransparency="true" src="'+
|
||||
(CKEDITOR.env.air?"javascript:void(0)":h?"javascript:void((function(){document.open();document.domain='"+document.domain+"';document.close();})())\"":"")+'" role="region" aria-label="'+f.pasteArea+'" aria-describedby="'+a.getContentElement("general","pasteMsg").domId+'" aria-multiple="true"></iframe>');d.on("load",function(a){a.removeListener();a=d.getFrameDocument();a.write(b);c.focusManager.add(a.getBody());CKEDITOR.env.air&&g.call(this,a.getWindow().$)},a);d.setCustomData("dialog",a);a=this.getElement();
|
||||
a.setHtml("");a.append(d);if(CKEDITOR.env.ie){var e=CKEDITOR.dom.element.createFromHtml('<span tabindex="-1" style="position:absolute" role="presentation"></span>');e.on("focus",function(){d.$.contentWindow.focus()});a.append(e);this.focus=function(){e.focus();this.fire("focus")}}this.getInputElement=function(){return d};CKEDITOR.env.ie&&(a.setStyle("display","block"),a.setStyle("height",d.$.offsetHeight+2+"px"))},commit:function(){var a=this.getDialog().getParentEditor(),b=this.getInputElement().getFrameDocument().getBody(),
|
||||
d=b.getBogus(),c;d&&d.remove();c=b.getHtml();setTimeout(function(){a.fire("pasteDialogCommit",c)},0)}}]}]}});
|
||||
CKEDITOR.dialog.add("paste",function(c){function h(a){var b=new CKEDITOR.dom.document(a.document),f=b.getBody(),d=b.getById("cke_actscrpt");d&&d.remove();f.setAttribute("contenteditable",!0);if(CKEDITOR.env.ie&&8>CKEDITOR.env.version)b.getWindow().on("blur",function(){b.$.selection.empty()});b.on("keydown",function(a){var a=a.data,b;switch(a.getKeystroke()){case 27:this.hide();b=1;break;case 9:case CKEDITOR.SHIFT+9:this.changeFocus(1),b=1}b&&a.preventDefault()},this);c.fire("ariaWidget",new CKEDITOR.dom.element(a.frameElement));
|
||||
b.getWindow().getFrame().removeCustomData("pendingFocus")&&f.focus()}var e=c.lang.clipboard;c.on("pasteDialogCommit",function(a){a.data&&c.fire("paste",{type:"auto",dataValue:a.data})},null,null,1E3);return{title:e.title,minWidth:CKEDITOR.env.ie&&CKEDITOR.env.quirks?370:350,minHeight:CKEDITOR.env.quirks?250:245,onShow:function(){this.parts.dialog.$.offsetHeight;this.setupContent();this.parts.title.setHtml(this.customTitle||e.title);this.customTitle=null},onLoad:function(){(CKEDITOR.env.ie7Compat||
|
||||
CKEDITOR.env.ie6Compat)&&"rtl"==c.lang.dir&&this.parts.contents.setStyle("overflow","hidden")},onOk:function(){this.commitContent()},contents:[{id:"general",label:c.lang.common.generalTab,elements:[{type:"html",id:"securityMsg",html:'<div style="white-space:normal;width:340px">'+e.securityMsg+"</div>"},{type:"html",id:"pasteMsg",html:'<div style="white-space:normal;width:340px">'+e.pasteMsg+"</div>"},{type:"html",id:"editing_area",style:"width:100%;height:100%",html:"",focus:function(){var a=this.getInputElement(),
|
||||
b=a.getFrameDocument().getBody();!b||b.isReadOnly()?a.setCustomData("pendingFocus",1):b.focus()},setup:function(){var a=this.getDialog(),b='<html dir="'+c.config.contentsLangDirection+'" lang="'+(c.config.contentsLanguage||c.langCode)+'"><head><style>body{margin:3px;height:95%}</style></head><body><script id="cke_actscrpt" type="text/javascript">window.parent.CKEDITOR.tools.callFunction('+CKEDITOR.tools.addFunction(h,a)+",this);<\/script></body></html>",f=CKEDITOR.env.air?"javascript:void(0)":CKEDITOR.env.ie?
|
||||
"javascript:void((function(){"+encodeURIComponent("document.open();("+CKEDITOR.tools.fixDomain+")();document.close();")+'})())"':"",d=CKEDITOR.dom.element.createFromHtml('<iframe class="cke_pasteframe" frameborder="0" allowTransparency="true" src="'+f+'" role="region" aria-label="'+e.pasteArea+'" aria-describedby="'+a.getContentElement("general","pasteMsg").domId+'" aria-multiple="true"></iframe>');d.on("load",function(a){a.removeListener();a=d.getFrameDocument();a.write(b);c.focusManager.add(a.getBody());
|
||||
CKEDITOR.env.air&&h.call(this,a.getWindow().$)},a);d.setCustomData("dialog",a);a=this.getElement();a.setHtml("");a.append(d);if(CKEDITOR.env.ie){var g=CKEDITOR.dom.element.createFromHtml('<span tabindex="-1" style="position:absolute" role="presentation"></span>');g.on("focus",function(){setTimeout(function(){d.$.contentWindow.focus()})});a.append(g);this.focus=function(){g.focus();this.fire("focus")}}this.getInputElement=function(){return d};CKEDITOR.env.ie&&(a.setStyle("display","block"),a.setStyle("height",
|
||||
d.$.offsetHeight+2+"px"))},commit:function(){var a=this.getDialog().getParentEditor(),b=this.getInputElement().getFrameDocument().getBody(),c=b.getBogus(),d;c&&c.remove();d=b.getHtml();setTimeout(function(){a.fire("pasteDialogCommit",d)},0)}}]}]}});
|
|
@ -0,0 +1,13 @@
|
|||
/*
|
||||
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
|
||||
For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||
*/
|
||||
CKEDITOR.dialog.add("colordialog",function(t){function n(){f.getById(o).removeStyle("background-color");p.getContentElement("picker","selectedColor").setValue("");j&&j.removeAttribute("aria-selected");j=null}function u(a){var a=a.data.getTarget(),b;if("td"==a.getName()&&(b=a.getChild(0).getHtml()))j=a,j.setAttribute("aria-selected",!0),p.getContentElement("picker","selectedColor").setValue(b)}function y(a){for(var a=a.replace(/^#/,""),b=0,c=[];2>=b;b++)c[b]=parseInt(a.substr(2*b,2),16);return"#"+
|
||||
(165<=0.2126*c[0]+0.7152*c[1]+0.0722*c[2]?"000":"fff")}function v(a){!a.name&&(a=new CKEDITOR.event(a));var b=!/mouse/.test(a.name),c=a.data.getTarget(),e;if("td"==c.getName()&&(e=c.getChild(0).getHtml()))q(a),b?g=c:w=c,b&&(c.setStyle("border-color",y(e)),c.setStyle("border-style","dotted")),f.getById(k).setStyle("background-color",e),f.getById(l).setHtml(e)}function q(a){if(a=!/mouse/.test(a.name)&&g){var b=a.getChild(0).getHtml();a.setStyle("border-color",b);a.setStyle("border-style","solid")}!g&&
|
||||
!w&&(f.getById(k).removeStyle("background-color"),f.getById(l).setHtml(" "))}function z(a){var b=a.data,c=b.getTarget(),e=b.getKeystroke(),d="rtl"==t.lang.dir;switch(e){case 38:if(a=c.getParent().getPrevious())a=a.getChild([c.getIndex()]),a.focus();b.preventDefault();break;case 40:if(a=c.getParent().getNext())(a=a.getChild([c.getIndex()]))&&1==a.type&&a.focus();b.preventDefault();break;case 32:case 13:u(a);b.preventDefault();break;case d?37:39:if(a=c.getNext())1==a.type&&(a.focus(),b.preventDefault(!0));
|
||||
else if(a=c.getParent().getNext())if((a=a.getChild([0]))&&1==a.type)a.focus(),b.preventDefault(!0);break;case d?39:37:if(a=c.getPrevious())a.focus(),b.preventDefault(!0);else if(a=c.getParent().getPrevious())a=a.getLast(),a.focus(),b.preventDefault(!0)}}var r=CKEDITOR.dom.element,f=CKEDITOR.document,h=t.lang.colordialog,p,x={type:"html",html:" "},j,g,w,m=function(a){return CKEDITOR.tools.getNextId()+"_"+a},k=m("hicolor"),l=m("hicolortext"),o=m("selhicolor"),i;(function(){function a(a,d){for(var s=
|
||||
a;s<a+3;s++){var e=new r(i.$.insertRow(-1));e.setAttribute("role","row");for(var f=d;f<d+3;f++)for(var g=0;6>g;g++)b(e.$,"#"+c[f]+c[g]+c[s])}}function b(a,c){var b=new r(a.insertCell(-1));b.setAttribute("class","ColorCell");b.setAttribute("tabIndex",-1);b.setAttribute("role","gridcell");b.on("keydown",z);b.on("click",u);b.on("focus",v);b.on("blur",q);b.setStyle("background-color",c);b.setStyle("border","1px solid "+c);b.setStyle("width","14px");b.setStyle("height","14px");var d=m("color_table_cell");
|
||||
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}]}]}]}]}});
|
Binary file not shown.
Before Width: | Height: | Size: 8.7 KiB After Width: | Height: | Size: 12 KiB |
|
@ -18,24 +18,26 @@ this.imageElement.appendTo(this.linkElement)):this.linkEditMode&&!this.addLink&&
|
|||
"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",widths:["50%","50%"],children:[{type:"vbox",padding:1,children:[{type:"text",width:"40px",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:"40px",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",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",
|
||||
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",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",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="'+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",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=
|
||||
!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",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")||
|
||||
{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="'+
|
||||
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=
|
||||
!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",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",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",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",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",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",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",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())}}]}]}};CKEDITOR.dialog.add("image",function(c){return r(c,"image")});CKEDITOR.dialog.add("imagebutton",function(c){return r(c,"imagebutton")})})();
|
||||
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())}}]}]}};
|
||||
CKEDITOR.dialog.add("image",function(c){return r(c,"image")});CKEDITOR.dialog.add("imagebutton",function(c){return r(c,"imagebutton")})})();
|
|
@ -19,18 +19,18 @@ return false}return this.getDialog().fakeObj?true:CKEDITOR.dialog.validate.notEm
|
|||
this.setValue(a.anchor.name);(a=this.getDialog().getContentElement("info","linkType"))&&a.getValue()=="email"&&this.focus()},commit:function(a){if(!a.anchor)a.anchor={};a.anchor.name=this.getValue()}},{type:"select",id:"anchorId","default":"",label:b.anchorId,style:"width: 100%;",items:[[""]],setup:function(a){this.clear();this.add("");for(var b=0;b<a.anchors.length;b++)a.anchors[b].id&&this.add(a.anchors[b].id);a.anchor&&this.setValue(a.anchor.id)},commit:function(a){if(!a.anchor)a.anchor={};a.anchor.id=
|
||||
this.getValue()}}],setup:function(a){a.anchors.length>0?this.getElement().show():this.getElement().hide()}}]},{type:"html",id:"noAnchors",style:"text-align: center;",html:'<div role="note" tabIndex="-1">'+CKEDITOR.tools.htmlEncode(b.noAnchors)+"</div>",focus:!0,setup:function(a){a.anchors.length<1?this.getElement().show():this.getElement().hide()}}],setup:function(){this.getDialog().getContentElement("info","linkType")||this.getElement().hide()}},{type:"vbox",id:"emailOptions",padding:1,children:[{type:"text",
|
||||
id:"emailAddress",label:b.emailAddress,required:!0,validate:function(){var a=this.getDialog();return!a.getContentElement("info","linkType")||a.getValueOf("info","linkType")!="email"?true:CKEDITOR.dialog.validate.notEmpty(b.noEmail).apply(this)},setup:function(a){a.email&&this.setValue(a.email.address);(a=this.getDialog().getContentElement("info","linkType"))&&a.getValue()=="email"&&this.select()},commit:function(a){if(!a.email)a.email={};a.email.address=this.getValue()}},{type:"text",id:"emailSubject",
|
||||
label:b.emailSubject,setup:function(a){a.email&&this.setValue(a.email.subject)},commit:function(a){if(!a.email)a.email={};a.email.subject=this.getValue()}},{type:"textarea",id:"emailBody",label:b.emailBody,rows:3,"default":"",setup:function(a){a.email&&this.setValue(a.email.body)},commit:function(a){if(!a.email)a.email={};a.email.body=this.getValue()}}],setup:function(){this.getDialog().getContentElement("info","linkType")||this.getElement().hide()}}]},{id:"target",label:b.target,title:b.target,elements:[{type:"hbox",
|
||||
widths:["50%","50%"],children:[{type:"select",id:"linkTargetType",label:i.target,"default":"notSet",style:"width : 100%;",items:[[i.notSet,"notSet"],[b.targetFrame,"frame"],[b.targetPopup,"popup"],[i.targetNew,"_blank"],[i.targetTop,"_top"],[i.targetSelf,"_self"],[i.targetParent,"_parent"]],onChange:s,setup:function(a){a.target&&this.setValue(a.target.type||"notSet");s.call(this)},commit:function(a){if(!a.target)a.target={};a.target.type=this.getValue()}},{type:"text",id:"linkTargetName",label:b.targetFrameName,
|
||||
"default":"",setup:function(a){a.target&&this.setValue(a.target.name)},commit:function(a){if(!a.target)a.target={};a.target.name=this.getValue().replace(/\W/gi,"")}}]},{type:"vbox",width:"100%",align:"center",padding:2,id:"popupFeatures",children:[{type:"fieldset",label:b.popupFeatures,children:[{type:"hbox",children:[{type:"checkbox",id:"resizable",label:b.popupResizable,setup:j,commit:l},{type:"checkbox",id:"status",label:b.popupStatusBar,setup:j,commit:l}]},{type:"hbox",children:[{type:"checkbox",
|
||||
id:"location",label:b.popupLocationBar,setup:j,commit:l},{type:"checkbox",id:"toolbar",label:b.popupToolbar,setup:j,commit:l}]},{type:"hbox",children:[{type:"checkbox",id:"menubar",label:b.popupMenuBar,setup:j,commit:l},{type:"checkbox",id:"fullscreen",label:b.popupFullScreen,setup:j,commit:l}]},{type:"hbox",children:[{type:"checkbox",id:"scrollbars",label:b.popupScrollBars,setup:j,commit:l},{type:"checkbox",id:"dependent",label:b.popupDependent,setup:j,commit:l}]},{type:"hbox",children:[{type:"text",
|
||||
widths:["50%","50%"],labelLayout:"horizontal",label:i.width,id:"width",setup:j,commit:l},{type:"text",labelLayout:"horizontal",widths:["50%","50%"],label:b.popupLeft,id:"left",setup:j,commit:l}]},{type:"hbox",children:[{type:"text",labelLayout:"horizontal",widths:["50%","50%"],label:i.height,id:"height",setup:j,commit:l},{type:"text",labelLayout:"horizontal",label:b.popupTop,widths:["50%","50%"],id:"top",setup:j,commit:l}]}]}]}]},{id:"upload",label:b.upload,title:b.upload,hidden:!0,filebrowser:"uploadButton",
|
||||
elements:[{type:"file",id:"upload",label:i.upload,style:"height:40px",size:29},{type:"fileButton",id:"uploadButton",label:i.uploadSubmit,filebrowser:"info:url","for":["upload","upload"]}]},{id:"advanced",label:b.advanced,title:b.advanced,elements:[{type:"vbox",padding:1,children:[{type:"hbox",widths:["45%","35%","20%"],children:[{type:"text",id:"advId",label:b.id,setup:k,commit:m},{type:"select",id:"advLangDir",label:b.langDir,"default":"",style:"width:110px",items:[[i.notSet,""],[b.langDirLTR,"ltr"],
|
||||
[b.langDirRTL,"rtl"]],setup:k,commit:m},{type:"text",id:"advAccessKey",width:"80px",label:b.acccessKey,maxLength:1,setup:k,commit:m}]},{type:"hbox",widths:["45%","35%","20%"],children:[{type:"text",label:b.name,id:"advName",setup:k,commit:m},{type:"text",label:b.langCode,id:"advLangCode",width:"110px","default":"",setup:k,commit:m},{type:"text",label:b.tabIndex,id:"advTabIndex",width:"80px",maxLength:5,setup:k,commit:m}]}]},{type:"vbox",padding:1,children:[{type:"hbox",widths:["45%","55%"],children:[{type:"text",
|
||||
label:b.advisoryTitle,"default":"",id:"advTitle",setup:k,commit:m},{type:"text",label:b.advisoryContentType,"default":"",id:"advContentType",setup:k,commit:m}]},{type:"hbox",widths:["45%","55%"],children:[{type:"text",label:b.cssClasses,"default":"",id:"advCSSClasses",setup:k,commit:m},{type:"text",label:b.charset,"default":"",id:"advCharset",setup:k,commit:m}]},{type:"hbox",widths:["45%","55%"],children:[{type:"text",label:b.rel,"default":"",id:"advRel",setup:k,commit:m},{type:"text",label:b.styles,
|
||||
"default":"",id:"advStyles",validate:CKEDITOR.dialog.validate.inlineStyle(n.lang.common.invalidInlineStyle),setup:k,commit:m}]}]}]}],onShow:function(){var a=this.getParentEditor(),b=a.getSelection(),c=null;(c=w.getSelectedLink(a))&&c.hasAttribute("href")?b.selectElement(c):c=null;this.setupContent(I.apply(this,[a,c]))},onOk:function(){var a={},b=[],c={},d=this.getParentEditor();this.commitContent(c);switch(c.type||"url"){case "url":var e=c.url&&c.url.protocol!=void 0?c.url.protocol:"http://",i=c.url&&
|
||||
CKEDITOR.tools.trim(c.url.url)||"";a["data-cke-saved-href"]=i.indexOf("/")===0?i:e+i;break;case "anchor":e=c.anchor&&c.anchor.id;a["data-cke-saved-href"]="#"+(c.anchor&&c.anchor.name||e||"");break;case "email":var f=c.email,e=f.address;switch(o){case "":case "encode":var i=encodeURIComponent(f.subject||""),h=encodeURIComponent(f.body||""),f=[];i&&f.push("subject="+i);h&&f.push("body="+h);f=f.length?"?"+f.join("&"):"";if(o=="encode"){e=["javascript:void(location.href='mailto:'+",u(e)];f&&e.push("+'",
|
||||
r(f),"'");e.push(")")}else e=["mailto:",e,f];break;default:e=e.split("@",2);f.name=e[0];f.domain=e[1];e=["javascript:",t(f)]}a["data-cke-saved-href"]=e.join("")}if(c.target)if(c.target.type=="popup"){for(var e=["window.open(this.href, '",c.target.name||"","', '"],j=["resizable","status","location","toolbar","menubar","fullscreen","scrollbars","dependent"],i=j.length,f=function(a){c.target[a]&&j.push(a+"="+c.target[a])},h=0;h<i;h++)j[h]=j[h]+(c.target[j[h]]?"=yes":"=no");f("width");f("left");f("height");
|
||||
f("top");e.push(j.join(","),"'); return false;");a["data-cke-pa-onclick"]=e.join("");b.push("target")}else{c.target.type!="notSet"&&c.target.name?a.target=c.target.name:b.push("target");b.push("data-cke-pa-onclick","onclick")}if(c.adv){e=function(d,e){var f=c.adv[d];f?a[e]=f:b.push(e)};e("advId","id");e("advLangDir","dir");e("advAccessKey","accessKey");c.adv.advName?a.name=a["data-cke-saved-name"]=c.adv.advName:b=b.concat(["data-cke-saved-name","name"]);e("advLangCode","lang");e("advTabIndex","tabindex");
|
||||
e("advTitle","title");e("advContentType","type");e("advCSSClasses","class");e("advCharset","charset");e("advStyles","style");e("advRel","rel")}e=d.getSelection();a.href=a["data-cke-saved-href"];if(this._.selectedElement){d=this._.selectedElement;i=d.data("cke-saved-href");f=d.getHtml();d.setAttributes(a);d.removeAttributes(b);c.adv&&(c.adv.advName&&CKEDITOR.plugins.link.synAnchorSelector)&&d.addClass(d.getChildCount()?"cke_anchor":"cke_anchor_empty");if(i==f||c.type=="email"&&f.indexOf("@")!=-1)d.setHtml(c.type==
|
||||
"email"?c.email.address:a["data-cke-saved-href"]);e.selectElement(d);delete this._.selectedElement}else{e=e.getRanges(1)[0];if(e.collapsed){d=new CKEDITOR.dom.text(c.type=="email"?c.email.address:a["data-cke-saved-href"],d.document);e.insertNode(d);e.selectNodeContents(d)}d=new CKEDITOR.style({element:"a",attributes:a});d.type=CKEDITOR.STYLE_INLINE;d.applyToRange(e);e.select()}},onLoad:function(){n.config.linkShowAdvancedTab||this.hidePage("advanced");n.config.linkShowTargetTab||this.hidePage("target")},
|
||||
onFocus:function(){var a=this.getContentElement("info","linkType");if(a&&a.getValue()=="url"){a=this.getContentElement("info","url");a.select()}}}});
|
||||
label:b.emailSubject,setup:function(a){a.email&&this.setValue(a.email.subject)},commit:function(a){if(!a.email)a.email={};a.email.subject=this.getValue()}},{type:"textarea",id:"emailBody",label:b.emailBody,rows:3,"default":"",setup:function(a){a.email&&this.setValue(a.email.body)},commit:function(a){if(!a.email)a.email={};a.email.body=this.getValue()}}],setup:function(){this.getDialog().getContentElement("info","linkType")||this.getElement().hide()}}]},{id:"target",requiredContent:"a[target]",label:b.target,
|
||||
title:b.target,elements:[{type:"hbox",widths:["50%","50%"],children:[{type:"select",id:"linkTargetType",label:i.target,"default":"notSet",style:"width : 100%;",items:[[i.notSet,"notSet"],[b.targetFrame,"frame"],[b.targetPopup,"popup"],[i.targetNew,"_blank"],[i.targetTop,"_top"],[i.targetSelf,"_self"],[i.targetParent,"_parent"]],onChange:s,setup:function(a){a.target&&this.setValue(a.target.type||"notSet");s.call(this)},commit:function(a){if(!a.target)a.target={};a.target.type=this.getValue()}},{type:"text",
|
||||
id:"linkTargetName",label:b.targetFrameName,"default":"",setup:function(a){a.target&&this.setValue(a.target.name)},commit:function(a){if(!a.target)a.target={};a.target.name=this.getValue().replace(/\W/gi,"")}}]},{type:"vbox",width:"100%",align:"center",padding:2,id:"popupFeatures",children:[{type:"fieldset",label:b.popupFeatures,children:[{type:"hbox",children:[{type:"checkbox",id:"resizable",label:b.popupResizable,setup:j,commit:l},{type:"checkbox",id:"status",label:b.popupStatusBar,setup:j,commit:l}]},
|
||||
{type:"hbox",children:[{type:"checkbox",id:"location",label:b.popupLocationBar,setup:j,commit:l},{type:"checkbox",id:"toolbar",label:b.popupToolbar,setup:j,commit:l}]},{type:"hbox",children:[{type:"checkbox",id:"menubar",label:b.popupMenuBar,setup:j,commit:l},{type:"checkbox",id:"fullscreen",label:b.popupFullScreen,setup:j,commit:l}]},{type:"hbox",children:[{type:"checkbox",id:"scrollbars",label:b.popupScrollBars,setup:j,commit:l},{type:"checkbox",id:"dependent",label:b.popupDependent,setup:j,commit:l}]},
|
||||
{type:"hbox",children:[{type:"text",widths:["50%","50%"],labelLayout:"horizontal",label:i.width,id:"width",setup:j,commit:l},{type:"text",labelLayout:"horizontal",widths:["50%","50%"],label:b.popupLeft,id:"left",setup:j,commit:l}]},{type:"hbox",children:[{type:"text",labelLayout:"horizontal",widths:["50%","50%"],label:i.height,id:"height",setup:j,commit:l},{type:"text",labelLayout:"horizontal",label:b.popupTop,widths:["50%","50%"],id:"top",setup:j,commit:l}]}]}]}]},{id:"upload",label:b.upload,title:b.upload,
|
||||
hidden:!0,filebrowser:"uploadButton",elements:[{type:"file",id:"upload",label:i.upload,style:"height:40px",size:29},{type:"fileButton",id:"uploadButton",label:i.uploadSubmit,filebrowser:"info:url","for":["upload","upload"]}]},{id:"advanced",label:b.advanced,title:b.advanced,elements:[{type:"vbox",padding:1,children:[{type:"hbox",widths:["45%","35%","20%"],children:[{type:"text",id:"advId",requiredContent:"a[id]",label:b.id,setup:k,commit:m},{type:"select",id:"advLangDir",requiredContent:"a[dir]",
|
||||
label:b.langDir,"default":"",style:"width:110px",items:[[i.notSet,""],[b.langDirLTR,"ltr"],[b.langDirRTL,"rtl"]],setup:k,commit:m},{type:"text",id:"advAccessKey",requiredContent:"a[accesskey]",width:"80px",label:b.acccessKey,maxLength:1,setup:k,commit:m}]},{type:"hbox",widths:["45%","35%","20%"],children:[{type:"text",label:b.name,id:"advName",requiredContent:"a[name]",setup:k,commit:m},{type:"text",label:b.langCode,id:"advLangCode",requiredContent:"a[lang]",width:"110px","default":"",setup:k,commit:m},
|
||||
{type:"text",label:b.tabIndex,id:"advTabIndex",requiredContent:"a[tabindex]",width:"80px",maxLength:5,setup:k,commit:m}]}]},{type:"vbox",padding:1,children:[{type:"hbox",widths:["45%","55%"],children:[{type:"text",label:b.advisoryTitle,requiredContent:"a[title]","default":"",id:"advTitle",setup:k,commit:m},{type:"text",label:b.advisoryContentType,requiredContent:"a[type]","default":"",id:"advContentType",setup:k,commit:m}]},{type:"hbox",widths:["45%","55%"],children:[{type:"text",label:b.cssClasses,
|
||||
requiredContent:"a(cke-xyz)","default":"",id:"advCSSClasses",setup:k,commit:m},{type:"text",label:b.charset,requiredContent:"a[charset]","default":"",id:"advCharset",setup:k,commit:m}]},{type:"hbox",widths:["45%","55%"],children:[{type:"text",label:b.rel,requiredContent:"a[rel]","default":"",id:"advRel",setup:k,commit:m},{type:"text",label:b.styles,requiredContent:"a{cke-xyz}","default":"",id:"advStyles",validate:CKEDITOR.dialog.validate.inlineStyle(n.lang.common.invalidInlineStyle),setup:k,commit:m}]}]}]}],
|
||||
onShow:function(){var a=this.getParentEditor(),b=a.getSelection(),c=null;(c=w.getSelectedLink(a))&&c.hasAttribute("href")?b.selectElement(c):c=null;this.setupContent(I.apply(this,[a,c]))},onOk:function(){var a={},b=[],c={},d=this.getParentEditor();this.commitContent(c);switch(c.type||"url"){case "url":var e=c.url&&c.url.protocol!=void 0?c.url.protocol:"http://",i=c.url&&CKEDITOR.tools.trim(c.url.url)||"";a["data-cke-saved-href"]=i.indexOf("/")===0?i:e+i;break;case "anchor":e=c.anchor&&c.anchor.id;
|
||||
a["data-cke-saved-href"]="#"+(c.anchor&&c.anchor.name||e||"");break;case "email":var f=c.email,e=f.address;switch(o){case "":case "encode":var i=encodeURIComponent(f.subject||""),h=encodeURIComponent(f.body||""),f=[];i&&f.push("subject="+i);h&&f.push("body="+h);f=f.length?"?"+f.join("&"):"";if(o=="encode"){e=["javascript:void(location.href='mailto:'+",u(e)];f&&e.push("+'",r(f),"'");e.push(")")}else e=["mailto:",e,f];break;default:e=e.split("@",2);f.name=e[0];f.domain=e[1];e=["javascript:",t(f)]}a["data-cke-saved-href"]=
|
||||
e.join("")}if(c.target)if(c.target.type=="popup"){for(var e=["window.open(this.href, '",c.target.name||"","', '"],j=["resizable","status","location","toolbar","menubar","fullscreen","scrollbars","dependent"],i=j.length,f=function(a){c.target[a]&&j.push(a+"="+c.target[a])},h=0;h<i;h++)j[h]=j[h]+(c.target[j[h]]?"=yes":"=no");f("width");f("left");f("height");f("top");e.push(j.join(","),"'); return false;");a["data-cke-pa-onclick"]=e.join("");b.push("target")}else{c.target.type!="notSet"&&c.target.name?
|
||||
a.target=c.target.name:b.push("target");b.push("data-cke-pa-onclick","onclick")}if(c.adv){e=function(d,e){var f=c.adv[d];f?a[e]=f:b.push(e)};e("advId","id");e("advLangDir","dir");e("advAccessKey","accessKey");c.adv.advName?a.name=a["data-cke-saved-name"]=c.adv.advName:b=b.concat(["data-cke-saved-name","name"]);e("advLangCode","lang");e("advTabIndex","tabindex");e("advTitle","title");e("advContentType","type");e("advCSSClasses","class");e("advCharset","charset");e("advStyles","style");e("advRel","rel")}e=
|
||||
d.getSelection();a.href=a["data-cke-saved-href"];if(this._.selectedElement){d=this._.selectedElement;i=d.data("cke-saved-href");f=d.getHtml();d.setAttributes(a);d.removeAttributes(b);c.adv&&(c.adv.advName&&CKEDITOR.plugins.link.synAnchorSelector)&&d.addClass(d.getChildCount()?"cke_anchor":"cke_anchor_empty");if(i==f||c.type=="email"&&f.indexOf("@")!=-1)d.setHtml(c.type=="email"?c.email.address:a["data-cke-saved-href"]);e.selectElement(d);delete this._.selectedElement}else{e=e.getRanges(1)[0];if(e.collapsed){d=
|
||||
new CKEDITOR.dom.text(c.type=="email"?c.email.address:a["data-cke-saved-href"],d.document);e.insertNode(d);e.selectNodeContents(d)}d=new CKEDITOR.style({element:"a",attributes:a});d.type=CKEDITOR.STYLE_INLINE;d.applyToRange(e);e.select()}},onLoad:function(){n.config.linkShowAdvancedTab||this.hidePage("advanced");n.config.linkShowTargetTab||this.hidePage("target")},onFocus:function(){var a=this.getContentElement("info","linkType");if(a&&a.getValue()=="url"){a=this.getContentElement("info","url");a.select()}}}});
|
|
@ -4,16 +4,17 @@
|
|||
*/
|
||||
CKEDITOR.dialog.add("scaytcheck",function(j){function w(){return"undefined"!=typeof document.forms["optionsbar_"+a]?document.forms["optionsbar_"+a].options:[]}function x(b,a){if(b){var e=b.length;if(void 0==e)b.checked=b.value==a.toString();else for(var d=0;d<e;d++)b[d].checked=!1,b[d].value==a.toString()&&(b[d].checked=!0)}}function n(b){f.getById("dic_message_"+a).setHtml('<span style="color:red;">'+b+"</span>")}function o(b){f.getById("dic_message_"+a).setHtml('<span style="color:blue;">'+b+"</span>")}
|
||||
function p(b){for(var b=(""+b).split(","),a=0,e=b.length;a<e;a+=1)f.getById(b[a]).$.style.display="inline"}function q(b){for(var b=(""+b).split(","),a=0,e=b.length;a<e;a+=1)f.getById(b[a]).$.style.display="none"}function r(b){f.getById("dic_name_"+a).$.value=b}var s=!0,h,f=CKEDITOR.document,a=j.name,l=CKEDITOR.plugins.scayt.getUiTabs(j),g,t=[],u=0,m=["dic_create_"+a+",dic_restore_"+a,"dic_rename_"+a+",dic_delete_"+a],v=["mixedCase","mixedWithDigits","allCaps","ignoreDomainNames"];g=j.lang.scayt;var z=
|
||||
[{id:"options",label:g.optionsTab,elements:[{type:"html",id:"options",html:'<form name="optionsbar_'+a+'"><div class="inner_options">\t<div class="messagebox"></div>\t<div style="display:none;">\t\t<input type="checkbox" name="options" id="allCaps_'+a+'" />\t\t<label for="allCaps" id="label_allCaps_'+a+'"></label>\t</div>\t<div style="display:none;">\t\t<input name="options" type="checkbox" id="ignoreDomainNames_'+a+'" />\t\t<label for="ignoreDomainNames" id="label_ignoreDomainNames_'+a+'"></label>\t</div>\t<div style="display:none;">\t<input name="options" type="checkbox" id="mixedCase_'+
|
||||
a+'" />\t\t<label for="mixedCase" id="label_mixedCase_'+a+'"></label>\t</div>\t<div style="display:none;">\t\t<input name="options" type="checkbox" id="mixedWithDigits_'+a+'" />\t\t<label for="mixedWithDigits" id="label_mixedWithDigits_'+a+'"></label>\t</div></div></form>'}]},{id:"langs",label:g.languagesTab,elements:[{type:"html",id:"langs",html:'<form name="languagesbar_'+a+'"><div class="inner_langs">\t<div class="messagebox"></div>\t <div style="float:left;width:45%;margin-left:5px;" id="scayt_lcol_'+
|
||||
a+'" ></div> <div style="float:left;width:45%;margin-left:15px;" id="scayt_rcol_'+a+'"></div></div></form>'}]},{id:"dictionaries",label:g.dictionariesTab,elements:[{type:"html",style:"",id:"dictionaries",html:'<form name="dictionarybar_'+a+'"><div class="inner_dictionary" style="text-align:left; white-space:normal; width:320px; overflow: hidden;">\t<div style="margin:5px auto; width:80%;white-space:normal; overflow:hidden;" id="dic_message_'+a+'"> </div>\t<div style="margin:5px auto; width:80%;white-space:normal;"> <span class="cke_dialog_ui_labeled_label" >Dictionary name</span><br>\t\t<span class="cke_dialog_ui_labeled_content" >\t\t\t<div class="cke_dialog_ui_input_text">\t\t\t\t<input id="dic_name_'+
|
||||
a+'" type="text" class="cke_dialog_ui_input_text"/>\t\t</div></span></div>\t\t<div style="margin:5px auto; width:80%;white-space:normal;">\t\t\t<a style="display:none;" class="cke_dialog_ui_button" href="javascript:void(0)" id="dic_create_'+a+'">\t\t\t\t</a>\t\t\t<a style="display:none;" class="cke_dialog_ui_button" href="javascript:void(0)" id="dic_delete_'+a+'">\t\t\t\t</a>\t\t\t<a style="display:none;" class="cke_dialog_ui_button" href="javascript:void(0)" id="dic_rename_'+a+'">\t\t\t\t</a>\t\t\t<a style="display:none;" class="cke_dialog_ui_button" href="javascript:void(0)" id="dic_restore_'+
|
||||
a+'">\t\t\t\t</a>\t\t</div>\t<div style="margin:5px auto; width:95%;white-space:normal;" id="dic_info_'+a+'"></div></div></form>'}]},{id:"about",label:g.aboutTab,elements:[{type:"html",id:"about",style:"margin: 5px 5px;",html:'<div id="scayt_about_'+a+'"></div>'}]}],B={title:g.title,minWidth:360,minHeight:220,onShow:function(){var b=this;b.data=j.fire("scaytDialog",{});b.options=b.data.scayt_control.option();b.chosed_lang=b.sLang=b.data.scayt_control.sLang;if(!b.data||!b.data.scayt||!b.data.scayt_control)alert("Error loading application service"),
|
||||
b.hide();else{var a=0;s?b.data.scayt.getCaption(j.langCode||"en",function(e){0<a++||(h=e,A.apply(b),y.apply(b),s=!1)}):y.apply(b);b.selectPage(b.data.tab)}},onOk:function(){var a=this.data.scayt_control;a.option(this.options);a.setLang(this.chosed_lang);a.refresh()},onCancel:function(){var b=w(),f;for(f in b)b[f].checked=!1;b="undefined"!=typeof document.forms["languagesbar_"+a]?document.forms["languagesbar_"+a].scayt_lang:[];x(b,"")},contents:t};CKEDITOR.plugins.scayt.getScayt(j);for(g=0;g<l.length;g++)1==
|
||||
l[g]&&(t[t.length]=z[g]);1==l[2]&&(u=1);var A=function(){function b(b){var c=f.getById("dic_name_"+a).getValue();if(!c)return n(" Dictionary name should not be empty. "),!1;try{var d=b.data.getTarget().getParent(),e=/(dic_\w+)_[\w\d]+/.exec(d.getId())[1];j[e].apply(null,[d,c,m])}catch(C){n(" Dictionary error. ")}return!0}var k=this,e=k.data.scayt.getLangList(),d=["dic_create","dic_delete","dic_rename","dic_restore"],g=[],i=[],c;if(u){for(c=0;c<d.length;c++)g[c]=d[c]+"_"+a,f.getById(g[c]).setHtml('<span class="cke_dialog_ui_button">'+
|
||||
h["button_"+d[c]]+"</span>");f.getById("dic_info_"+a).setHtml(h.dic_info)}if(1==l[0])for(c in v)d="label_"+v[c],g=f.getById(d+"_"+a),"undefined"!=typeof g&&("undefined"!=typeof h[d]&&"undefined"!=typeof k.options[v[c]])&&(g.setHtml(h[d]),g.getParent().$.style.display="block");d='<p><img src="'+window.scayt.getAboutInfo().logoURL+'" /></p><p>'+h.version+window.scayt.getAboutInfo().version.toString()+"</p><p>"+h.about_throwt_copy+"</p>";f.getById("scayt_about_"+a).setHtml(d);d=function(a,b){var c=f.createElement("label");
|
||||
c.setAttribute("for","cke_option"+a);c.setHtml(b[a]);k.sLang==a&&(k.chosed_lang=a);var d=f.createElement("div"),e=CKEDITOR.dom.element.createFromHtml('<input id="cke_option'+a+'" type="radio" '+(k.sLang==a?'checked="checked"':"")+' value="'+a+'" name="scayt_lang" />');e.on("click",function(){this.$.checked=true;k.chosed_lang=a});d.append(e);d.append(c);return{lang:b[a],code:a,radio:d}};if(1==l[1]){for(c in e.rtl)i[i.length]=d(c,e.ltr);for(c in e.ltr)i[i.length]=d(c,e.ltr);i.sort(function(a,b){return b.lang>
|
||||
a.lang?-1:1});e=f.getById("scayt_lcol_"+a);d=f.getById("scayt_rcol_"+a);for(c=0;c<i.length;c++)(c<i.length/2?e:d).append(i[c].radio)}var j={dic_create:function(a,b,c){var d=c[0]+","+c[1],e=h.err_dic_create,f=h.succ_dic_create;window.scayt.createUserDictionary(b,function(a){q(d);p(c[1]);f=f.replace("%s",a.dname);o(f)},function(a){e=e.replace("%s",a.dname);n(e+"( "+(a.message||"")+")")})},dic_rename:function(a,b){var c=h.err_dic_rename||"",d=h.succ_dic_rename||"";window.scayt.renameUserDictionary(b,
|
||||
[{id:"options",label:g.optionsTab,elements:[{type:"html",id:"options",html:'<form name="optionsbar_'+a+'"><div class="inner_options">\t<div class="messagebox"></div>\t<div style="display:none;">\t\t<input type="checkbox" name="options" id="allCaps_'+a+'" />\t\t<label style = "display: inline" for="allCaps" id="label_allCaps_'+a+'"></label>\t</div>\t<div style="display:none;">\t\t<input name="options" type="checkbox" id="ignoreDomainNames_'+a+'" />\t\t<label style = "display: inline" for="ignoreDomainNames" id="label_ignoreDomainNames_'+
|
||||
a+'"></label>\t</div>\t<div style="display:none;">\t<input name="options" type="checkbox" id="mixedCase_'+a+'" />\t\t<label style = "display: inline" for="mixedCase" id="label_mixedCase_'+a+'"></label>\t</div>\t<div style="display:none;">\t\t<input name="options" type="checkbox" id="mixedWithDigits_'+a+'" />\t\t<label style = "display: inline" for="mixedWithDigits" id="label_mixedWithDigits_'+a+'"></label>\t</div></div></form>'}]},{id:"langs",label:g.languagesTab,elements:[{type:"html",id:"langs",
|
||||
html:'<form name="languagesbar_'+a+'"><div class="inner_langs">\t<div class="messagebox"></div>\t <div style="float:left;width:45%;margin-left:5px;" id="scayt_lcol_'+a+'" ></div> <div style="float:left;width:45%;margin-left:15px;" id="scayt_rcol_'+a+'"></div></div></form>'}]},{id:"dictionaries",label:g.dictionariesTab,elements:[{type:"html",style:"",id:"dictionaries",html:'<form name="dictionarybar_'+a+'"><div class="inner_dictionary" style="text-align:left; white-space:normal; width:320px; overflow: hidden;">\t<div style="margin:5px auto; width:95%;white-space:normal; overflow:hidden;" id="dic_message_'+
|
||||
a+'"> </div>\t<div style="margin:5px auto; width:95%;white-space:normal;"> <span class="cke_dialog_ui_labeled_label" >Dictionary name</span><br>\t\t<span class="cke_dialog_ui_labeled_content" >\t\t\t<div class="cke_dialog_ui_input_text">\t\t\t\t<input id="dic_name_'+a+'" type="text" class="cke_dialog_ui_input_text" style = "height: 25px; background: none; padding: 0;"/>\t\t</div></span></div>\t\t<div style="margin:5px auto; width:95%;white-space:normal;">\t\t\t<a style="display:none;" class="cke_dialog_ui_button" href="javascript:void(0)" id="dic_create_'+
|
||||
a+'">\t\t\t\t</a>\t\t\t<a style="display:none;" class="cke_dialog_ui_button" href="javascript:void(0)" id="dic_delete_'+a+'">\t\t\t\t</a>\t\t\t<a style="display:none;" class="cke_dialog_ui_button" href="javascript:void(0)" id="dic_rename_'+a+'">\t\t\t\t</a>\t\t\t<a style="display:none;" class="cke_dialog_ui_button" href="javascript:void(0)" id="dic_restore_'+a+'">\t\t\t\t</a>\t\t</div>\t<div style="margin:5px auto; width:95%;white-space:normal;" id="dic_info_'+a+'"></div></div></form>'}]},{id:"about",
|
||||
label:g.aboutTab,elements:[{type:"html",id:"about",style:"margin: 5px 5px;",html:'<div id="scayt_about_'+a+'"></div>'}]}],B={title:g.title,minWidth:360,minHeight:220,onShow:function(){var b=this;b.data=j.fire("scaytDialog",{});b.options=b.data.scayt_control.option();b.chosed_lang=b.sLang=b.data.scayt_control.sLang;if(!b.data||!b.data.scayt||!b.data.scayt_control)alert("Error loading application service"),b.hide();else{var a=0;s?b.data.scayt.getCaption(j.langCode||"en",function(e){0<a++||(h=e,A.apply(b),
|
||||
y.apply(b),s=!1)}):y.apply(b);b.selectPage(b.data.tab)}},onOk:function(){var a=this.data.scayt_control;a.option(this.options);a.setLang(this.chosed_lang);a.refresh()},onCancel:function(){var b=w(),f;for(f in b)b[f].checked=!1;b="undefined"!=typeof document.forms["languagesbar_"+a]?document.forms["languagesbar_"+a].scayt_lang:[];x(b,"")},contents:t};CKEDITOR.plugins.scayt.getScayt(j);for(g=0;g<l.length;g++)1==l[g]&&(t[t.length]=z[g]);1==l[2]&&(u=1);var A=function(){function b(b){var c=f.getById("dic_name_"+
|
||||
a).getValue();if(!c)return n(" Dictionary name should not be empty. "),!1;try{var d=b.data.getTarget().getParent(),e=/(dic_\w+)_[\w\d]+/.exec(d.getId())[1];j[e].apply(null,[d,c,m])}catch(C){n(" Dictionary error. ")}return!0}var k=this,e=k.data.scayt.getLangList(),d=["dic_create","dic_delete","dic_rename","dic_restore"],g=[],i=[],c;if(u){for(c=0;c<d.length;c++)g[c]=d[c]+"_"+a,f.getById(g[c]).setHtml('<span class="cke_dialog_ui_button">'+h["button_"+d[c]]+"</span>");f.getById("dic_info_"+a).setHtml(h.dic_info)}if(1==
|
||||
l[0])for(c in v)d="label_"+v[c],g=f.getById(d+"_"+a),"undefined"!=typeof g&&("undefined"!=typeof h[d]&&"undefined"!=typeof k.options[v[c]])&&(g.setHtml(h[d]),g.getParent().$.style.display="block");d='<p><img src="'+window.scayt.getAboutInfo().logoURL+'" /></p><p>'+h.version+window.scayt.getAboutInfo().version.toString()+"</p><p>"+h.about_throwt_copy+"</p>";f.getById("scayt_about_"+a).setHtml(d);d=function(a,b){var c=f.createElement("label");c.setAttribute("for","cke_option"+a);c.setStyle("display",
|
||||
"inline");c.setHtml(b[a]);k.sLang==a&&(k.chosed_lang=a);var d=f.createElement("div"),e=CKEDITOR.dom.element.createFromHtml('<input class = "cke_dialog_ui_radio_input" id="cke_option'+a+'" type="radio" '+(k.sLang==a?'checked="checked"':"")+' value="'+a+'" name="scayt_lang" />');e.on("click",function(){this.$.checked=true;k.chosed_lang=a});d.append(e);d.append(c);return{lang:b[a],code:a,radio:d}};if(1==l[1]){for(c in e.rtl)i[i.length]=d(c,e.ltr);for(c in e.ltr)i[i.length]=d(c,e.ltr);i.sort(function(a,
|
||||
b){return b.lang>a.lang?-1:1});e=f.getById("scayt_lcol_"+a);d=f.getById("scayt_rcol_"+a);for(c=0;c<i.length;c++)(c<i.length/2?e:d).append(i[c].radio)}var j={dic_create:function(a,b,c){var d=c[0]+","+c[1],e=h.err_dic_create,f=h.succ_dic_create;window.scayt.createUserDictionary(b,function(a){q(d);p(c[1]);f=f.replace("%s",a.dname);o(f)},function(a){e=e.replace("%s",a.dname);n(e+"( "+(a.message||"")+")")})},dic_rename:function(a,b){var c=h.err_dic_rename||"",d=h.succ_dic_rename||"";window.scayt.renameUserDictionary(b,
|
||||
function(a){d=d.replace("%s",a.dname);r(b);o(d)},function(a){c=c.replace("%s",a.dname);r(b);n(c+"( "+(a.message||"")+" )")})},dic_delete:function(a,b,c){var d=c[0]+","+c[1],e=h.err_dic_delete,f=h.succ_dic_delete;window.scayt.deleteUserDictionary(function(a){f=f.replace("%s",a.dname);q(d);p(c[0]);r("");o(f)},function(a){e=e.replace("%s",a.dname);n(e)})}};j.dic_restore=k.dic_restore||function(a,b,c){var d=c[0]+","+c[1],e=h.err_dic_restore,f=h.succ_dic_restore;window.scayt.restoreUserDictionary(b,function(a){f=
|
||||
f.replace("%s",a.dname);q(d);p(c[1]);o(f)},function(a){e=e.replace("%s",a.dname);n(e)})};i=(m[0]+","+m[1]).split(",");c=0;for(e=i.length;c<e;c+=1)if(d=f.getById(i[c]))d.on("click",b,this)},y=function(){var b=this;if(1==l[0])for(var g=w(),e=0,d=g.length;e<d;e++){var h=g[e].id,i=f.getById(h);if(i&&(g[e].checked=!1,1==b.options[h.split("_")[0]]&&(g[e].checked=!0),s))i.on("click",function(){b.options[this.getId().split("_")[0]]=this.$.checked?1:0})}1==l[1]&&(g=f.getById("cke_option"+b.sLang),x(g.$,b.sLang));
|
||||
u&&(window.scayt.getNameUserDictionary(function(b){b=b.dname;q(m[0]+","+m[1]);if(b){f.getById("dic_name_"+a).setValue(b);p(m[1])}else p(m[0])},function(){f.getById("dic_name_"+a).setValue("")}),o(""))};return B});
|
|
@ -38,9 +38,26 @@ function sendData2Master()
|
|||
catch (e) {}
|
||||
}
|
||||
|
||||
function OnMessage (event) {
|
||||
var message = event.data;
|
||||
var destination = window.parent.parent;
|
||||
destination.XDTMaster.read( [ 'end', message, 'fpm' ] ) ;
|
||||
}
|
||||
|
||||
function listenPostMessage() {
|
||||
if (window.addEventListener) { // all browsers except IE before version 9
|
||||
window.addEventListener ("message", OnMessage, false);
|
||||
}else {
|
||||
if (window.attachEvent) { // IE before version 9
|
||||
window.attachEvent("onmessage", OnMessage);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function onLoad()
|
||||
{
|
||||
interval = window.setInterval( sendData2Master, 100 );
|
||||
listenPostMessage();
|
||||
}
|
||||
|
||||
</script>
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue