config.js 39 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032
  1. /*
  2. CardDavMATE - the open source CardDAV Web Client
  3. Copyright (C) 2011-2015
  4. Jan Mate <jan.mate@inf-it.com>
  5. Andrej Lezo <andrej.lezo@inf-it.com>
  6. Matej Mihalik <matej.mihalik@inf-it.com>
  7. This program is free software: you can redistribute it and/or modify
  8. it under the terms of the GNU Affero General Public License as
  9. published by the Free Software Foundation, either version 3 of the
  10. License, or (at your option) any later version.
  11. This program is distributed in the hope that it will be useful,
  12. but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. GNU Affero General Public License for more details.
  15. You should have received a copy of the GNU Affero General Public License
  16. along with this program. If not, see <http://www.gnu.org/licenses/>.
  17. */
  18. // NOTE: see readme.txt before you start to configure this client!
  19. // NOTE: do not forget to execute the cache_update.sh script every time you
  20. // update this configuration file or any other files (otherwise your browser
  21. // will use the previous version of files stored in HTML5 cache). Alternatively
  22. // you can update the cache.manifest manually - edit the second line beginning
  23. // with "#V 20" to anything else (this file simple needs "some" change)
  24. // Supported setup types (use ONE of them):
  25. // a.) globalAccountSettings => username and password is hardcoded
  26. // in config.js, automatic login without the login screen
  27. // - advantages: fast login process = no username/password is required
  28. // - disadvantages: username/password is visible in your config.js, so
  29. // this type of setup is recommended ONLY for intranet/home users
  30. // b.) globalNetworkCheckSettings => standard setup with login screen
  31. // - advantages: username/password is required (no visible
  32. // username/password in config.js)
  33. // - disadvantages: if a user enters wrong username/password then
  34. // the browser will show authentication popup window (it is NOT
  35. // possible to disable it in JavaScript; see the next option)
  36. // c.) globalNetworkAccountSettings => advanced setup with login screen
  37. // - advantages: no authentication popup if you enter wrong username/
  38. // password, dynamic XML configuration generator (you can generate
  39. // different configurations for your users /by modifying the "auth"
  40. // module configuration or the PHP code itself/)
  41. // - disadvantages: requires PHP >= 5.3 and additional configuration,
  42. // only basic http authentication is supported => always use https!
  43. //
  44. //
  45. // What is a "principal URL"? => Check you server documentation!
  46. // - "principal URL" is NOT "collection URL"
  47. // - this client automatically detects collections for "principal URL"
  48. // - PROPER "principal URL" looks like:
  49. // https://server.com:8443/principals/users/USER/
  50. // https://server.com:8443/caldav.php/USER/
  51. // - INVALID principal URL looks like:
  52. // https://server.com:8443/principals/users/USER/collection/
  53. // => this is a collection URL
  54. // https://server.com:8443/caldav.php/USER/collection/
  55. // => this is a collection URL
  56. // https://server.com:8443/principals/users/USER
  57. // => missing trailing '/'
  58. // https://server.com:8443/caldav.php/USER
  59. // => missing trailing '/'
  60. // /caldav.php/USER/
  61. // => relative URL instead of full URL
  62. //
  63. //
  64. // List of properties used in globalAccountSettings, globalNetworkCheckSettings
  65. // and globalNetworkAccountSettings variables (+ in the "auth" module):
  66. // - href
  67. // Depending on the setup type set the value to:
  68. // a.) globalAccountSettings: full "principal URL"
  69. // b.) globalNetworkCheckSettings: "principal URL" WITHOUT the "USER/" part
  70. // c.) globalNetworkAccountSettings: "full URL" to the "auth" directory
  71. // This property is supported in:
  72. // globalAccountSettings
  73. // globalNetworkCheckSettings
  74. // globalNetworkAccountSettings
  75. // - userAuth
  76. // - userName
  77. // Set the username you want to login.
  78. // - userPassword
  79. // Set the password for the given username.
  80. // This property is supported in:
  81. // globalAccountSettings
  82. // - timeOut
  83. // This option sets the timeout for jQuery .ajax call (in miliseconds).
  84. // Example:
  85. // timeOut: 90000
  86. // This property is supported in:
  87. // globalAccountSettings
  88. // globalNetworkCheckSettings
  89. // globalNetworkAccountSettings
  90. // - lockTimeOut
  91. // NOTE: used only if server supports LOCK requests
  92. // This option sets the LOCK timeout value if resource locking
  93. // is used (in miliseconds).
  94. // Example:
  95. // lockTimeOut: 10000
  96. // This property is supported in:
  97. // globalAccountSettings
  98. // globalNetworkCheckSettings
  99. // globalNetworkAccountSettings (available in auth module only)
  100. // - checkContentType
  101. // This option enables a content-type checking for server response.
  102. // If enabled then only objects with proper content-type are inserted
  103. // into the interface.
  104. // If you cannot see data in the interface you may try to disable it (useful
  105. // if your server returns wrong value in "propstat/prop/getcontenttype").
  106. // If undefined then content-type checking is enabled.
  107. // Examples:
  108. // checkContentType: true
  109. // checkContentType: false
  110. // This property is supported in:
  111. // globalAccountSettings
  112. // globalNetworkCheckSettings
  113. // globalNetworkAccountSettings (available in auth module only)
  114. // - settingsAccount
  115. // NOTE: server support for custom DAV properties is REQUIRED!
  116. // This option sets the account where the client properties such as:
  117. // loaded collections, enabled collections, ... are saved during
  118. // the logout and resource/collection synchronisation
  119. // NOTE: set it to true ONLY for ONE account!
  120. // Examples:
  121. // settingsAccount: true
  122. // settingsAccount: false
  123. // This property is supported in:
  124. // globalAccountSettings
  125. // globalNetworkCheckSettings
  126. // globalNetworkAccountSettings (available in auth module only)
  127. // - delegation
  128. // NOTE: server support for this functionality is REQUIRED!
  129. // This option allows you to load delegated (shared) collections.
  130. // If set to true (default) then delegation functionality is enabled,
  131. // and the interface allows you to load delegated collections.
  132. // If false then delegation functionality is completely disabled.
  133. // Examples:
  134. // delegation: true
  135. // delegation: false
  136. // This property is supported in:
  137. // globalAccountSettings
  138. // globalNetworkCheckSettings
  139. // globalNetworkAccountSettings (available in auth module only)
  140. // - additionalResources
  141. // This options sets the list of additional resources (e.g. shared resources
  142. // accessible by all users). If the server supports delegation (see
  143. // the delegation option above) there is no reason to use this option!
  144. // Supported values:
  145. // - array of URL encoded resource names (not collections), such as:
  146. // 'company'
  147. // 'shared_resource'
  148. // If empty (default) or undefined then shared resources are not loaded
  149. // using this option, but may be loaded using the delegation option.
  150. // Examples:
  151. // additionalResources=[]
  152. // additionalResources=['public', 'shared_resource']
  153. // This property is supported in:
  154. // globalNetworkCheckSettings
  155. // - hrefLabel
  156. // This option sets the server name in the resource header (useful if
  157. // you want to see custom resource header above the collections).
  158. // You can use the following variables in the value:
  159. // %H = full hostname (including the port number)
  160. // %h = full hostname (without the port number)
  161. // %D = full domain name
  162. // %d = only the first and second level domain
  163. // %P = principal name
  164. // %p = principal name without the @domain.com part (if present)
  165. // %U = logged user name
  166. // %u = logged user name without the @domain.com part (if present)
  167. // If undefined, empty or or null then '%d/%p [%u]' is used.
  168. // Examples:
  169. // hrefLabel: '%d/%p [%u]'
  170. // hrefLabel: '%D/%u'
  171. // This property is supported in:
  172. // globalAccountSettings
  173. // globalNetworkCheckSettings
  174. // globalNetworkAccountSettings (available in auth module only)
  175. // - forceReadOnly
  176. // This option sets the list of collections as "read-only".
  177. // Supported values:
  178. // - true
  179. // all collections will be "read-only"
  180. // - array of URL encoded
  181. // - collections, such as:
  182. // '/caldav.php/user/calendar/'
  183. // '/caldav.php/user%40domain.com/calendar/'
  184. // - regexes, such as:
  185. // new RegExp('^/caldav.php/user/calendar[0-9]/$', 'i')
  186. // specifies the list of collections marked as "read-only"
  187. // If null (default) or undefined then server detected privileges are used.
  188. // Examples:
  189. // forceReadOnly: null
  190. // forceReadOnly: true
  191. // forceReadOnly: ['/caldav.php/user/calendar/',
  192. // '/caldav.php/user/calendar2/']
  193. // forceReadOnly: [new RegExp('^/.*/user/calendar[0-9]/$', 'i')]
  194. // This property is supported in:
  195. // globalAccountSettings
  196. // globalNetworkCheckSettings
  197. // globalNetworkAccountSettings (available in auth module only, with
  198. // different syntax for regexes)
  199. // Special options not present in configuration examples:
  200. // NOTE: use ONLY if you know what are you doing!
  201. // - crossDomain
  202. // This option sets the crossDomain for jQuery .ajax call. If null (default)
  203. // then the value is autodetected /and the result is shown in the console/
  204. // - withCredentials
  205. // This option sets the withCredentials for jQuery .ajax call. The default
  206. // value is false and there is NO REASON to change it to true!
  207. // NOTE: if true, Access-Control-Allow-Origin "*" (CORS header) not works!
  208. // globalAccountSettings
  209. // Use this option if you want to use automatic login (without a login
  210. // screen) with hardcoded username/password in config.js. Otherwise use
  211. // globalNetworkCheckSettings or globalNetworkAccountSettings (see below).
  212. // NOTE: if this option is used the value must be an array of object(s).
  213. // List of properties used in globalAccountSettings variable:
  214. // - href
  215. // Set this option to the full "principal URL".
  216. // NOTE: the last character in the value must be '/'
  217. // - userAuth
  218. // - userName
  219. // Set the username you want to login.
  220. // - userPassword
  221. // Set the password for the given username.
  222. // NOTE: for description of other properties see comments at the beginning
  223. // of this file.
  224. // NOTE: for minimal/fast setup you need to set only the href and userAuth
  225. // options. It is safe/recommended to keep the remaining options unchanged!
  226. // Example:
  227. //var globalAccountSettings=[
  228. // {
  229. // href: 'https://server1.com:8443/caldav.php/USERNAME1/',
  230. // userAuth:
  231. // {
  232. // userName: 'USERNAME1',
  233. // userPassword: 'PASSWORD1'
  234. // },
  235. // timeOut: 90000,
  236. // lockTimeOut: 10000,
  237. // checkContentType: true,
  238. // settingsAccount: true,
  239. // delegation: true,
  240. // hrefLabel: null,
  241. // forceReadOnly: null
  242. // },
  243. // {
  244. // href: 'https://server2.com:8443/caldav.php/USERNAME2/',
  245. // ...
  246. // ...
  247. // }
  248. //];
  249. // globalNetworkCheckSettings
  250. // Use this option if you want to use standard login screen without
  251. // hardcoded username/password in config.js (used by globalAccountSettings).
  252. // NOTE: if this option is used the value must be an object.
  253. // List of properties used in globalAccountSettings variable:
  254. // - href
  255. // Set this option to the "principal URL" WITHOUT the "USERNAME/"
  256. // part (this options uses the username from the login screen).
  257. // NOTE: the last character in the value must be '/'
  258. // NOTE: for description of other properties see comments at the beginning
  259. // of this file.
  260. // NOTE: for minimal/fast setup you need to set only the href option. It is
  261. // safe/recommended to keep the remaining options unchanged!
  262. // Example href values:
  263. // OS X server http example (see misc/readme_osx.txt for server setup):
  264. // href: 'http://osx.server.com:8008/principals/users/'
  265. // OS X server https example (see misc/readme_osx.txt for server setup):
  266. // href: 'https://osx.server.com:8443/principals/users/'
  267. // Cyrus server https example:
  268. // href: 'https://cyrus.server.com/dav/principals/user/'
  269. // Example:
  270. // Davical example which automatically detects the protocol, server name,
  271. // port, ... (client installed into Davical "htdocs" subdirectory;
  272. // works "out of the box", no additional setup required):
  273. var globalNetworkCheckSettings={
  274. href: location.protocol+'//'+location.hostname+
  275. (location.port ? ':'+location.port: '')+
  276. location.pathname.replace(RegExp('/+[^/]+/*(index\.html)?$'),'')+
  277. '/caldav.php/',
  278. timeOut: 90000,
  279. lockTimeOut: 10000,
  280. checkContentType: true,
  281. settingsAccount: true,
  282. delegation: true,
  283. additionalResources: [],
  284. hrefLabel: null,
  285. forceReadOnly: null
  286. }
  287. // globalNetworkAccountSettings
  288. // Try this option ONLY if you have working setup using
  289. // globalNetworkCheckSettings and want to fix the authentication popup
  290. // window problem (if invalid username/password is entered)!
  291. // If you use this option then your browser sends username/password to the PHP
  292. // "auth" module ("auth" directory) instead of the DAV server itself.
  293. // The "auth" module then validates your username/password against your server,
  294. // and if the authentication is successful, then it sends back a configuration
  295. // XML (requires additional configuration). The resulting XML is handled
  296. // IDENTICALLY as the globalAccountSettings configuration option.
  297. // NOTE: for the "auth" module configuration see readme.txt!
  298. // NOTE: this option invokes a login screen and disallows access until
  299. // the client gets correct XML configuration file from the server!
  300. // List of properties used in globalNetworkAccountSettings variable:
  301. // - href
  302. // Set this option to the "full URL" of the "auth" directory
  303. // NOTE: the last character in the value must be '/'
  304. // NOTE: for description of other properties see comments at the beginning
  305. // of this file.
  306. // Example href values:
  307. // href: 'https://server.com/client/auth/'
  308. // Example:
  309. // Use this configuration if the "auth" module is located in the client
  310. // installation subdirectory (default):
  311. //var globalNetworkAccountSettings={
  312. // href: location.protocol+'//'+location.hostname+
  313. // (location.port ? ':'+location.port : '')+
  314. // location.pathname.replace(RegExp('index\.html$'),'')+
  315. // 'auth/',
  316. // timeOut: 30000
  317. //};
  318. // globalUseJqueryAuth
  319. // Use jQuery .ajax() auth or custom header for HTTP basic auth (default).
  320. // Set this option to true if your server uses digest auth (note: you may
  321. // experience auth popups on some browsers).
  322. // If undefined (or empty), custom header for HTTP basic auth is used.
  323. // Example:
  324. //var globalUseJqueryAuth=false;
  325. // globalBackgroundSync
  326. // Enable background synchronization even if the browser window/tab has no
  327. // focus.
  328. // If false, synchronization is performed only if the browser window/tab
  329. // is focused. If undefined or not false, then background sync is enabled.
  330. // Example:
  331. var globalBackgroundSync=true;
  332. // globalSyncResourcesInterval
  333. // This option defines how often (in miliseconds) are resources/collections
  334. // asynchronously synchronized.
  335. // Example:
  336. var globalSyncResourcesInterval=120000;
  337. // globalEnableRefresh
  338. // This option enables or disables the manual synchronization button in
  339. // the interface. If this option is enabled then users can perform server
  340. // synchronization manually. Enabling this option may cause high server
  341. // load (even DDOS) if users will try to manually synchronize data too
  342. // often (instead of waiting for the automatic synchronization).
  343. // If undefined or false, the synchronization button is disabled.
  344. // NOTE: enable this option only if you really know what are you doing!
  345. // Example:
  346. var globalEnableRefresh=false;
  347. // globalEnableKbNavigation
  348. // Enable basic keyboard navigation using arrow keys?
  349. // If undefined or not false, keyboard navigation is enabled.
  350. // Example:
  351. var globalEnableKbNavigation=true;
  352. // globalSettingsType
  353. // Where to store user settings such as: active view, enabled/selected
  354. // collections, ... (the client store them into DAV property on the server).
  355. // NOTE: not all servers support storing DAV properties (some servers support
  356. // only subset /or none/ of these URLs).
  357. // Supported values:
  358. // - 'principal-URL', '', null or undefined (default) => settings are stored
  359. // to principal-URL (recommended for most servers)
  360. // - 'addressbook-home-set' => settings are are stored to addressbook-home-set
  361. // Example:
  362. //var globalSettingsType='';
  363. // globalCrossServerSettingsURL
  364. // Settings such as enabled/selected collections are stored on the server
  365. // (see the previous option) in form of full URL
  366. // (e.g.: https://user@server:port/principal/collection/), but even if this
  367. // approach is "correct" (you can use the same principal URL with multiple
  368. // different logins, ...) it causes a problem if your server is accessible
  369. // from multiple URLs (e.g. http://server/ and https://server/). If you want
  370. // to store only the "principal/collection/" part of the URL (instead of the
  371. // full URL) then enable this option.
  372. // Example:
  373. //var globalCrossServerSettingsURL=false;
  374. // globalInterfaceLanguage
  375. // Default interface language (note: this option is case sensitive):
  376. // cs_CZ (Čeština [Czech])
  377. // da_DK (Dansk [Danish]; thanks Niels Bo Andersen)
  378. // de_DE (Deutsch [German]; thanks Marten Gajda and Thomas Scheel)
  379. // en_US (English [English/US])
  380. // es_ES (Español [Spanish]; thanks Damián Vila)
  381. // fr_FR (Français [French]; thanks John Fischer)
  382. // it_IT (Italiano [Italian]; thanks Luca Ferrario)
  383. // ja_JP (日本語 [Japan]; thanks Muimu Nakayama)
  384. // hu_HU (Magyar [Hungarian])
  385. // nl_NL (Nederlands [Dutch]; thanks Johan Vromans)
  386. // sk_SK (Slovenčina [Slovak])
  387. // tr_TR (Türkçe [Turkish]; thanks Selcuk Pultar)
  388. // ru_RU (Русский [Russian]; thanks Александр Симонов)
  389. // uk_UA (Українська [Ukrainian]; thanks Serge Yakimchuck)
  390. // zh_CN (中国 [Chinese]; thanks Fandy)
  391. // Example:
  392. var globalInterfaceLanguage='en_US';
  393. // globalInterfaceCustomLanguages
  394. // If defined and not empty then only languages listed here are shown
  395. // at the login screen, otherwise (default) all languages are shown
  396. // NOTE: values in the array must refer to an existing localization
  397. // (see the option above)
  398. // Example:
  399. // globalInterfaceCustomLanguages=['en_US', 'sk_SK'];
  400. var globalInterfaceCustomLanguages=[];
  401. // globalSortAlphabet
  402. // Use JavaScript localeCompare() or custom alphabet for data sorting.
  403. // Custom alphabet is used by default because JavaScript localeCompare()
  404. // not supports collation and often returns "wrong" result. If set to null
  405. // then localeCompare() is used.
  406. // Example:
  407. // var globalSortAlphabet=null;
  408. var globalSortAlphabet=' 0123456789'+
  409. 'AÀÁÂÄÆÃÅĀBCÇĆČDĎEÈÉÊËĒĖĘĚFGĞHIÌÍÎİÏĪĮJKLŁĹĽMNŃÑŇOÒÓÔÖŐŒØÕŌ'+
  410. 'PQRŔŘSŚŠȘșŞşẞTŤȚțŢţUÙÚÛÜŰŮŪVWXYÝŸZŹŻŽ'+
  411. 'aàáâäæãåābcçćčdďeèéêëēėęěfgğhiìíîïīįıjklłĺľmnńñňoòóôöőœøõō'+
  412. 'pqrŕřsśšßtťuùúûüűůūvwxyýÿzźżžАБВГҐДЕЄЖЗИІЇЙКЛМНОПРСТУФХЦЧШЩЮЯ'+
  413. 'Ьабвгґдеєжзиіїйклмнопрстуфхцчшщюяь';
  414. // globalSearchTransformAlphabet
  415. // To support search without diacritics (e.g. search for 'd' will find: 'Ď', 'ď')
  416. // it is required to define something like "character equivalence".
  417. // key = regex text, value = search character
  418. // Example:
  419. var globalSearchTransformAlphabet={
  420. '[ÀàÁáÂâÄäÆæÃãÅåĀā]': 'a', '[ÇçĆćČč]': 'c', '[Ďď]': 'd',
  421. '[ÈèÉéÊêËëĒēĖėĘęĚě]': 'e', '[Ğğ]': 'g', '[ÌìÍíÎîİıÏïĪīĮį]': 'i',
  422. '[ŁłĹ弾]': 'l', '[ŃńÑñŇň]': 'n', '[ÒòÓóÔôÖöŐőŒœØøÕõŌō]': 'o',
  423. '[ŔŕŘř]': 'r', '[ŚśŠšȘșŞşẞß]': 's', '[ŤťȚțŢţ]': 't',
  424. '[ÙùÚúÛûÜüŰűŮůŪū]': 'u', '[ÝýŸÿ]': 'y', '[ŹźŻżŽž]': 'z'
  425. };
  426. // globalResourceAlphabetSorting
  427. // If more than one resource (server account) is configured, sort the
  428. // resources alphabetically?
  429. // Example:
  430. var globalResourceAlphabetSorting=true;
  431. // globalNewVersionNotifyUsers
  432. // Update notification will be shown only to users with login names defined
  433. // in this array.
  434. // If undefined (or empty), update notifications will be shown to all users.
  435. // Example:
  436. // globalNewVersionNotifyUsers=['admin', 'peter'];
  437. var globalNewVersionNotifyUsers=[];
  438. // globalDatepickerFormat
  439. // Set the datepicker format (see
  440. // http://docs.jquery.com/UI/Datepicker/formatDate for valid values).
  441. // NOTE: date format is predefined for each localization - use this option
  442. // ONLY if you want to use custom date format (instead of the localization
  443. // predefined one).
  444. // Example:
  445. //var globalDatepickerFormat='dd.mm.yy';
  446. // globalDatepickerFirstDayOfWeek
  447. // Set the datepicker first day of the week: Sunday is 0, Monday is 1, etc.
  448. // Example:
  449. var globalDatepickerFirstDayOfWeek=1;
  450. // globalHideInfoMessageAfter
  451. // How long are information messages (such as: success, error) displayed
  452. // (in miliseconds).
  453. // Example:
  454. var globalHideInfoMessageAfter=1800;
  455. // globalEditorFadeAnimation
  456. // Set the editor fade in/out animation duration when editing or saving data
  457. // (in miliseconds).
  458. // Example:
  459. var globalEditorFadeAnimation=666;
  460. // globalLoadedAddressbookCollections
  461. // This option sets the list of addressbook collections (down)loaded after
  462. // login. If empty then all addressbook collections for the currently logged
  463. // user are loaded.
  464. // NOTE: settings stored on the server (see settingsAccount) overwrite this
  465. // option.
  466. // Example:
  467. var globalLoadedAddressbookCollections=[];
  468. // globalActiveAddressbookCollections
  469. // This options sets the list of addressbook collections checked (enabled
  470. // checkbox => data visible in the interface) by default after login.
  471. // If empty then all loaded addressbook collections for the currently logged
  472. // user are checked.
  473. // NOTE: only already (down)loaded collections can be checked (see
  474. // the globalLoadedAddressbookCollections option).
  475. // NOTE: settings stored on the server (see settingsAccount) overwrite this
  476. // option.
  477. // Example:
  478. var globalActiveAddressbookCollections=[];
  479. // globalAddressbookSelected
  480. // This option sets which addressbook collection will be pre-selected
  481. // (if you create a new contact) by default after login.
  482. // The value must be URL encoded path to an addressbook collection,
  483. // for example: 'USER/addressbook/'
  484. // If empty or undefined then the first available addressbook collection
  485. // is selected automatically.
  486. // NOTE: only already (down)loaded collections can be pre-selected (see
  487. // the globalLoadedAddressbookCollections option).
  488. // NOTE: settings stored on the server (see settingsAccount) overwrite this
  489. // option.
  490. // Example:
  491. //var globalAddressbookSelected='';
  492. // globalCompatibility
  493. // This options is reserved for various compatibility settings.
  494. // NOTE: if this option is used the value must be an object.
  495. // Currently there is only one supported option:
  496. // - anniversaryOutputFormat
  497. // Different clients use different (and incompatible) approach
  498. // to store anniversary date in vCards. Apple stores this attribute as:
  499. // itemX.X-ABDATE;TYPE=pref:2000-01-01\r\n
  500. // itemX.X-ABLabel:_$!<Anniversary>!$_\r\n'
  501. // other clients store this attribute as:
  502. // X-ANNIVERSARY:2000-01-01\r\n
  503. // Choose 'apple' or 'other' (lower case) for your 3rd party client
  504. // compatibility. You can chose both: ['apple', 'other'], but it may
  505. // cause many problems in the future, for example: duplicate anniversary
  506. // dates, invalid/old anniversary date in your clients, ...)
  507. // Examples:
  508. // anniversaryOutputFormat: ['other']
  509. // anniversaryOutputFormat: ['apple', 'other']
  510. // Example:
  511. var globalCompatibility={anniversaryOutputFormat: ['apple']};
  512. // globalUriHandler{Tel,Email,Url,Profile}
  513. // These options set the URI handlers for TEL, EMAIL, URL and X-SOCIALPROFILE
  514. // vCard attributes. Set them to null (or comment out) to disable.
  515. // NOTE: for globalUriHandlerTel is recommended to use 'tel:', 'callto:'
  516. // or 'skype:'. The globalUriHandlerUrl value is used only if no URI handler
  517. // is defined in the URL.
  518. // NOTE: it is safe to keep these values unchanged!
  519. // Example:
  520. var globalUriHandlerTel='tel:';
  521. var globalUriHandlerEmail='mailto:';
  522. var globalUriHandlerUrl='http://';
  523. var globalUriHandlerProfile={
  524. 'twitter': 'http://twitter.com/%u',
  525. 'facebook': 'http://www.facebook.com/%u',
  526. 'flickr': 'http://www.flickr.com/photos/%u',
  527. 'linkedin': 'http://www.linkedin.com/in/%u',
  528. 'myspace': 'http://www.myspace.com/%u',
  529. 'sinaweibo': 'http://weibo.com/n/%u'
  530. };
  531. // globalDefaultAddressCountry
  532. // This option sets the default country for new address fields.
  533. // See common.js or use the following command to get the list of
  534. // all supported country codes (defined in common.js):
  535. // grep -E "'[a-z]{2}':\s+\[" common.js | sed -Ee 's#^\s+|\s+\[\s+# #g'
  536. // Example:
  537. var globalDefaultAddressCountry='us';
  538. // globalAddressCountryEquivalence
  539. // This option sets the processing of the country field specified
  540. // in the vCard ADR attribute.
  541. // By default the address field in vCard looks like:
  542. // ADR;TYPE=WORK:;;1 Waters Edge;Baytown;LA;30314;USA\r\n
  543. // what cause a problem, because the country field is a plain
  544. // text and can contain any value, e.g.:
  545. // USA
  546. // United States of America
  547. // US
  548. // and because the address format can be completely different for
  549. // each country, e.g.:
  550. // China address example:
  551. // [China]
  552. // [Province] [City]
  553. // [Street]
  554. // [Postal]
  555. // Japan address example:
  556. // [Postal]
  557. // [Prefecture] [County/City]
  558. // [Further Divisions]
  559. // [Japan]
  560. // the client needs to correctly detect the country from the ADR
  561. // attribute. Apple solved this problem by using:
  562. // item1.ADR;TYPE=WORK:;;1 Waters Edge;Baytown;LA;30314;USA\r\n
  563. // item1.X-ABADR:us\r\n
  564. // where the second "related" attribute defines the country code
  565. // for the ADR attribute. This client uses the same approach, but
  566. // if the vCard is created by 3rd party clients and the X-ABADR
  567. // is missing, it is possible to define additional "rules" for
  568. // country matching. These rules are specied by the country code
  569. // (for full list of country codes see the comment for pre previous
  570. // option) and a case insensitive regular expression (which matches
  571. // the plain text value in the country field).
  572. // NOTE: if X-ABADR is not present and the country not matches any
  573. // country defined in this option, then globalDefaultAddressCountry
  574. // is used by default.
  575. // Example:
  576. var globalAddressCountryEquivalence=[
  577. {country: 'de', regex: '^\\W*Deutschland\\W*$'},
  578. {country: 'sk', regex: '^\\W*Slovensko\\W*$'}
  579. ];
  580. // globalAddressCountryFavorites
  581. // This option defines the list of countries which are shown at the top
  582. // of the country list in the interface (for full list of country codes
  583. // see the comment for pre globalDefaultAddressCountry option).
  584. // Example:
  585. // var globalAddressCountryFavorites=['de','sk'];
  586. var globalAddressCountryFavorites=[];
  587. // globalAddrColorPropertyXmlns
  588. // This options sets the namespace used for storing the "addressbook-color"
  589. // property by the client.
  590. // If true, undefined (or empty) "http://inf-it.com/ns/ab/" is used.
  591. // If false, then the addressbook color modification functionality
  592. // is completely disabled, and addressbook colors in the interface are
  593. // generated automatically.
  594. // Example:
  595. //var globalAddrColorPropertyXmlns=true;
  596. // globalContactStoreFN
  597. // This option specifies how the FN (formatted name) is stored into vCard.
  598. // The value for this options must be an array of strings, that can contain
  599. // the following variables:
  600. // prefix
  601. // last
  602. // middle
  603. // first
  604. // suffix
  605. // The string element of the array can contain any other characters (usually
  606. // space or colon). Elements are added into FN only if the there is
  607. // a variable match, for example if:
  608. // last='Lastname'
  609. // first='Firstname'
  610. // middle='' (empty)
  611. // and this option is set to:
  612. // ['last', ' middle', ' first'] (space in the second and third element)
  613. // the resulting value for FN will be: 'Lastname Firstname' and not
  614. // 'Lastname Firstname' (two spaces), because the middle name is empty (so
  615. // the second element is completely ignored /not added into FN/).
  616. // NOTE: this attribute is NOT used by this client, and it is also NOT
  617. // possible to directly edit it in the interface.
  618. // Examples:
  619. // var globalContactStoreFN=[' last', ' middle', ' first'];
  620. // var globalContactStoreFN=['last', ', middle', ' ,first'];
  621. var globalContactStoreFN=['prefix',' last',' middle',' first',' suffix'];
  622. // globalGroupContactsByCompanies
  623. // This options specifies how contacts are grouped in the interface.
  624. // By default the interface looks like (very simple example):
  625. // A
  626. // Adams Adam
  627. // Anderson Peter
  628. // B
  629. // Brown John
  630. // Baker Josh
  631. // if grouped by company/deparment the result is:
  632. // Company A [Department X]
  633. // Adams Adam
  634. // Brown John
  635. // Company B [Department Y]
  636. // Anderson Peter
  637. // Baker Josh
  638. // If this option is set to true contacts are grouped by company/department,
  639. // otherwise (default) contacts are grouped by letters of the alphabet.
  640. // If undefined or not true, grouping by alphabet letters is used.
  641. // NOTE: see also the globalCollectionDisplay option below.
  642. var globalGroupContactsByCompanies=false;
  643. // globalCollectionDisplay
  644. // This options specifies how data columns in the contact list are displayed.
  645. //
  646. // NOTE: columns are displayed ONLY if there is enought horizontal place in
  647. // the browser window (e.g. if you define 5 columns here, but your browser
  648. // window is not wide enough, you will see only first 3 columns instead of 5).
  649. //
  650. // NOTE: see the globalContactDataMinVisiblePercentage option which defines the
  651. // width for columns.
  652. //
  653. // The value must be an array of columns, where each column is represented by
  654. // an object with the following properties:
  655. // label => the value of this option is a string used as column header
  656. // You can use the following localized variables in the label string:
  657. // - {Name}
  658. // - {FirstName}
  659. // - {LastName}
  660. // - {MiddleName}
  661. // - {NickName}
  662. // - {Prefix}
  663. // - {Suffix}
  664. // - {BirthDay}
  665. // - {PhoneticLastName}
  666. // - {PhoneticFirstName}
  667. // - {JobTitle}
  668. // - {Company}
  669. // - {Department}
  670. // - {Categories}
  671. // - {NoteText}
  672. // - {Address}, {AddressWork}, {AddressHome}, {AddressOther}
  673. // - {Phone}, {PhoneWork}, {PhoneHome}, {PhoneCell}, {PhoneMain},
  674. // {PhonePager}, {PhoneFax}, {PhoneIphone}, {PhoneOther}
  675. // - {Email}, {EmailWork}, {EmailHome}, {EmailMobileme}, {EmailOther}
  676. // - {URL}, {URLWork}, {URLHome}, {URLHomepage}, {URLOther}
  677. // - {Dates}, {DatesAnniversary}, {DatesOther}
  678. // - {Related}, {RelatedManager}, {RelatedAssistant}, {RelatedFather},
  679. // {RelatedMother}, {RelatedParent}, {RelatedBrother}, {RelatedSister},
  680. // {RelatedChild}, {RelatedFriend}, {RelatedSpouse}, {RelatedPartner},
  681. // {RelatedOther}
  682. // - {Profile}, {ProfileTwitter}, {ProfileFacebook}, {ProfileFlickr},
  683. // {ProfileLinkedin}, {ProfileMyspace}, {ProfileSinaweibo}
  684. // - {IM}, {IMWork}, {IMHome}, {IMMobileme}, {IMOther}, {IMAim}, {IMIcq},
  685. // {IMIrc}, {IMJabber}, {IMMsn}, {IMYahoo}, {IMFacebook}, {IMGadugadu},
  686. // {IMGoogletalk}, {IMQq}, {IMSkype}
  687. // value => the value of this option is an array of format strings, or
  688. // an object with the following properties:
  689. // - company (used for company contacts)
  690. // - personal (used for user contacts)
  691. // where the value of these properties is an array of format strings used
  692. // for company or user contacts (you can have different values in the same
  693. // column for personal and company contacts).
  694. // You can use the following simple variables in the format string:
  695. // - {FirstName}
  696. // - {LastName}
  697. // - {MiddleName}
  698. // - {NickName}
  699. // - {Prefix}
  700. // - {Suffix}
  701. // - {BirthDay}
  702. // - {PhoneticLastName}
  703. // - {PhoneticFirstName}
  704. // - {JobTitle}
  705. // - {Company}
  706. // - {Department}
  707. // - {Categories}
  708. // - {NoteText}
  709. // You can also use parametrized variables, where the parameter is enclosed
  710. // in square bracket. Paramatrized variables are useful to extract data
  711. // such as home phone {Phone[type=home]}, extract the second phone number
  712. // {Phone[:1]} (zero based indexing) or extract the third home phone number
  713. // {Phone[type=home][:2]} from the vCard.
  714. // NOTE: if the parametrized variable matches multiple items, e.g.:
  715. // {Phone[type=work]} (if the contact has multiple work phones) then the
  716. // first one is used!
  717. //
  718. // The following parametrized variables are supported (note: you can use
  719. // all of them also without parameters /the first one will be used/):
  720. // - {Address[type=XXX]} or {Address[:NUM]} or {Address[type=XXX][:NUM]}
  721. // where supported values for XXX are:
  722. // - work
  723. // - home
  724. // - other
  725. // - any other custom value
  726. // - {Phone[type=XXX]} or {Phone[:NUM]} or {Phone[type=XXX][:NUM]}
  727. // where supported values for XXX are:
  728. // - work
  729. // - home
  730. // - cell
  731. // - main
  732. // - pager
  733. // - fax
  734. // - iphone
  735. // - other
  736. // - any other custom value
  737. // - {Email[type=XXX]} or {Email[:NUM]} or {Email[type=XXX][:NUM]}
  738. // where supported values for XXX are:
  739. // - work
  740. // - home
  741. // - mobileme
  742. // - other
  743. // - any other custom value
  744. // - {URL[type=XXX]} or {URL[:NUM]} or {URL[type=XXX][:NUM]}
  745. // where supported values for XXX are:
  746. // - work
  747. // - home
  748. // - homepage
  749. // - other
  750. // - any other custom value
  751. // - {Dates[type=XXX]} or {Dates[:NUM]} or {Dates[type=XXX][:NUM]}
  752. // where supported values for XXX are:
  753. // - anniversary
  754. // - other
  755. // - any other custom value
  756. // - {Related[type=XXX]} or {Related[:NUM]} or {Related[type=XXX][:NUM]}
  757. // where supported values for XXX are:
  758. // - manager
  759. // - assistant
  760. // - father
  761. // - mother
  762. // - parent
  763. // - brother
  764. // - sister
  765. // - child
  766. // - friend
  767. // - spouse
  768. // - partner
  769. // - other
  770. // - any other custom value
  771. // - {Profile[type=XXX]} or {Profile[:NUM]} or {Profile[type=XXX][:NUM]}
  772. // where supported values for XXX are:
  773. // - twitter
  774. // - facebook
  775. // - flickr
  776. // - linkedin
  777. // - myspace
  778. // - sinaweibo
  779. // - any other custom value
  780. // - {IM[type=XXX]} or {IM[service-type=YYY]} or {IM[:NUM]}
  781. // where supported values for XXX are:
  782. // - work
  783. // - home
  784. // - mobileme
  785. // - other
  786. // - any other custom value
  787. // and supported values for YYY are:
  788. // - aim
  789. // - icq
  790. // - irc
  791. // - jabber
  792. // - msn
  793. // - yahoo
  794. // - facebook
  795. // - gadugadu
  796. // - googletalk
  797. // - qq
  798. // - skype
  799. // - any other custom value
  800. //
  801. // NOTE: if you want to use the "any other custom value" option (for XXX
  802. // or YYY above) you MUST double escape the following characters:
  803. // =[]{}\
  804. // for example:
  805. // - for profile type "=XXX=" use: '{Profile[type=\\=XXX\\=]}'
  806. // - for profile type "\XXX\" use: '{Profile[type=\\\\XXX\\\\]}'
  807. //
  808. // NOTE: if you want to use curly brackets in the format string you must
  809. // double escape it, e.g.: ['{Company}', '\\{{Department}\\}']
  810. //
  811. // The format string (for the value option) is an array to allow full
  812. // customization of the interface. For example if:
  813. // value: ['{LastName} {MiddleName} {FirstName}']
  814. // and the person has no middle name, then the result in the column
  815. // will be (without quotes):
  816. // "Parker Peter" (note: two space characters)
  817. // but if you use:
  818. // value: ['{LastName}', ' {MiddleName}', ' {FirstName}']
  819. // then the result will be (without quotes):
  820. // "Parker Peter" (note: only one space character)
  821. // The reason is that only those elements of the array are appended
  822. // into the result where non-empty substitution was performed (so the
  823. // ' {MiddleName}' element in this case is ignored, because the person
  824. // in the example above has no /more precisely has empty/ middle name).
  825. //
  826. // Examples:
  827. // To specify two columns (named "Company" and "Department / LastName"),
  828. // where the first will display the company name, and the second will display
  829. // department for company contacts (with "Dep -" prefix), and lastname for
  830. // personal contacts (with "Name -" prefix) use:
  831. // var globalCollectionDisplay=[
  832. // {
  833. // label: 'Company',
  834. // value: ['{Company}']
  835. // },
  836. // {
  837. // label: 'Department / LastName',
  838. // value: {
  839. // company: ['Dep - {Department}'],
  840. // personal: ['Name - {LastName}']
  841. // }
  842. // }
  843. // ];
  844. // To specify 3 columns (named "Categories", "URL" and "IM"), where the first
  845. // will display categories, second will display the third work URL, and third
  846. // will display ICQ IM use:
  847. // var globalCollectionDisplay=[
  848. // {
  849. // label: 'Categories',
  850. // value: ['{Categories}']
  851. // },
  852. // {
  853. // label: 'URL',
  854. // value: ['{URL[type=WORK][:2]}']
  855. // },
  856. // {
  857. // label: 'IM',
  858. // value: ['{IM[service-type=ICQ]}']
  859. // }
  860. // ];
  861. //
  862. // Recommended settings if globalGroupContactsByCompanies
  863. // is set to false:
  864. // var globalCollectionDisplay=[
  865. // {
  866. // label: '{Name}',
  867. // value: ['{LastName}', ' {MiddleName}', ' {FirstName}']
  868. // },
  869. // {
  870. // label: '{Company} [{Department}]',
  871. // value: ['{Company}', ' [{Department}]']
  872. // },
  873. // {
  874. // label: '{JobTitle}',
  875. // value: ['{JobTitle}']
  876. // },
  877. // {
  878. // label: '{Email}',
  879. // value: ['{Email[:0]}']
  880. // },
  881. // {
  882. // label: '{Phone} 1',
  883. // value: ['{Phone[:0]}']
  884. // },
  885. // {
  886. // label: '{Phone} 2',
  887. // value: ['{Phone[:1]}']
  888. // },
  889. // {
  890. // label: '{NoteText}',
  891. // value: ['{NoteText}']
  892. // }
  893. // ];
  894. //
  895. // Recommended settings if globalGroupContactsByCompanies
  896. // is set to true:
  897. // var globalCollectionDisplay=[
  898. // {
  899. // label: '{Name}',
  900. // value: {
  901. // personal: ['{LastName}', ' {MiddleName}', ' {FirstName}'],
  902. // company: ['{Company}', ' [{Department}]']
  903. // }
  904. // },
  905. // {
  906. // label: '{JobTitle}',
  907. // value: ['{JobTitle}']
  908. // },
  909. // {
  910. // label: '{Email}',
  911. // value: ['{Email[:0]}']
  912. // },
  913. // {
  914. // label: '{Phone} 1',
  915. // value: ['{Phone[:0]}']
  916. // },
  917. // {
  918. // label: '{Phone} 2',
  919. // value: ['{Phone[:1]}']
  920. // },
  921. // {
  922. // label: '{NoteText}',
  923. // value: ['{NoteText}']
  924. // }
  925. // ];
  926. //
  927. // NOTE: if left undefined, the recommended settings will be used.
  928. // globalCollectionSort
  929. // This options sets the ordering of contacts in the interface. In general
  930. // contacts are ordered alphabetically by an internal "sort string" which
  931. // is created for each contact. Here you can specify how this internal string
  932. // is created. The value is a simple array holding only the values from the
  933. // value property defined in the globalCollectionDisplay option.
  934. // If undefined, the definition from globalCollectionDisplay is used.
  935. // Example:
  936. // var globalCollectionSort = [
  937. // ['{LastName}'],
  938. // ['{FirstName}'],
  939. // ['{MiddleName}'],
  940. // {
  941. // company: ['{Categories}'],
  942. // personal: ['{Company}']
  943. // }
  944. // ];
  945. // globalContactDataMinVisiblePercentage
  946. // This option defines how the width for columns are computed. If you set
  947. // it to 1 then 100% of all data in the column will be visible (the column
  948. // width is determined by the longest string in the column). If you set it
  949. // to 0.95 then 95% of data will fit into the column width, and the remaining
  950. // 5% will be truncated (" ...").
  951. // Example:
  952. var globalContactDataMinVisiblePercentage=0.95;