config.js 39 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038
  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: 'https://dav.hammerle.me:5232/',
  275. timeOut: 90000,
  276. lockTimeOut: 10000,
  277. checkContentType: true,
  278. settingsAccount: false,
  279. delegation: true,
  280. additionalResources: ['family'],
  281. hrefLabel: null,
  282. forceReadOnly: null
  283. }
  284. // globalNetworkAccountSettings
  285. // Try this option ONLY if you have working setup using
  286. // globalNetworkCheckSettings and want to fix the authentication popup
  287. // window problem (if invalid username/password is entered)!
  288. // If you use this option then your browser sends username/password to the PHP
  289. // "auth" module ("auth" directory) instead of the DAV server itself.
  290. // The "auth" module then validates your username/password against your server,
  291. // and if the authentication is successful, then it sends back a configuration
  292. // XML (requires additional configuration). The resulting XML is handled
  293. // IDENTICALLY as the globalAccountSettings configuration option.
  294. // NOTE: for the "auth" module configuration see readme.txt!
  295. // NOTE: this option invokes a login screen and disallows access until
  296. // the client gets correct XML configuration file from the server!
  297. // List of properties used in globalNetworkAccountSettings variable:
  298. // - href
  299. // Set this option to the "full URL" of the "auth" directory
  300. // NOTE: the last character in the value must be '/'
  301. // NOTE: for description of other properties see comments at the beginning
  302. // of this file.
  303. // Example href values:
  304. // href: 'https://server.com/client/auth/'
  305. // Example:
  306. // Use this configuration if the "auth" module is located in the client
  307. // installation subdirectory (default):
  308. //var globalNetworkAccountSettings={
  309. // href: location.protocol+'//'+location.hostname+
  310. // (location.port ? ':'+location.port : '')+
  311. // location.pathname.replace(RegExp('index\.html$'),'')+
  312. // 'auth/',
  313. // timeOut: 30000
  314. //};
  315. // globalUseJqueryAuth
  316. // Use jQuery .ajax() auth or custom header for HTTP basic auth (default).
  317. // Set this option to true if your server uses digest auth (note: you may
  318. // experience auth popups on some browsers).
  319. // If undefined (or empty), custom header for HTTP basic auth is used.
  320. // Example:
  321. //var globalUseJqueryAuth=false;
  322. // globalBackgroundSync
  323. // Enable background synchronization even if the browser window/tab has no
  324. // focus.
  325. // If false, synchronization is performed only if the browser window/tab
  326. // is focused. If undefined or not false, then background sync is enabled.
  327. // Example:
  328. var globalBackgroundSync=true;
  329. // globalSyncResourcesInterval
  330. // This option defines how often (in miliseconds) are resources/collections
  331. // asynchronously synchronized.
  332. // Example:
  333. var globalSyncResourcesInterval=120000;
  334. // globalEnableRefresh
  335. // This option enables or disables the manual synchronization button in
  336. // the interface. If this option is enabled then users can perform server
  337. // synchronization manually. Enabling this option may cause high server
  338. // load (even DDOS) if users will try to manually synchronize data too
  339. // often (instead of waiting for the automatic synchronization).
  340. // If undefined or false, the synchronization button is disabled.
  341. // NOTE: enable this option only if you really know what are you doing!
  342. // Example:
  343. var globalEnableRefresh=false;
  344. // globalEnableKbNavigation
  345. // Enable basic keyboard navigation using arrow keys?
  346. // If undefined or not false, keyboard navigation is enabled.
  347. // Example:
  348. var globalEnableKbNavigation=true;
  349. // globalSettingsType
  350. // Where to store user settings such as: active view, enabled/selected
  351. // collections, ... (the client store them into DAV property on the server).
  352. // NOTE: not all servers support storing DAV properties (some servers support
  353. // only subset /or none/ of these URLs).
  354. // Supported values:
  355. // - 'principal-URL', '', null or undefined (default) => settings are stored
  356. // to principal-URL (recommended for most servers)
  357. // - 'addressbook-home-set' => settings are are stored to addressbook-home-set
  358. // Example:
  359. //var globalSettingsType='';
  360. // globalCrossServerSettingsURL
  361. // Settings such as enabled/selected collections are stored on the server
  362. // (see the previous option) in form of full URL
  363. // (e.g.: https://user@server:port/principal/collection/), but even if this
  364. // approach is "correct" (you can use the same principal URL with multiple
  365. // different logins, ...) it causes a problem if your server is accessible
  366. // from multiple URLs (e.g. http://server/ and https://server/). If you want
  367. // to store only the "principal/collection/" part of the URL (instead of the
  368. // full URL) then enable this option.
  369. // Example:
  370. //var globalCrossServerSettingsURL=false;
  371. // globalInterfaceLanguage
  372. // Default interface language (note: this option is case sensitive):
  373. // cs_CZ (Čeština [Czech])
  374. // da_DK (Dansk [Danish]; thanks Niels Bo Andersen)
  375. // de_DE (Deutsch [German]; thanks Marten Gajda and Thomas Scheel)
  376. // en_US (English [English/US])
  377. // es_ES (Español [Spanish]; thanks Damián Vila)
  378. // fr_FR (Français [French]; thanks John Fischer)
  379. // it_IT (Italiano [Italian]; thanks Luca Ferrario)
  380. // ja_JP (日本語 [Japan]; thanks Muimu Nakayama)
  381. // hu_HU (Magyar [Hungarian])
  382. // nl_NL (Nederlands [Dutch]; thanks Johan Vromans)
  383. // sk_SK (Slovenčina [Slovak])
  384. // tr_TR (Türkçe [Turkish]; thanks Selcuk Pultar)
  385. // ru_RU (Русский [Russian]; thanks Александр Симонов)
  386. // uk_UA (Українська [Ukrainian]; thanks Serge Yakimchuck)
  387. // zh_CN (中国 [Chinese]; thanks Fandy)
  388. // Example:
  389. var globalInterfaceLanguage='en_US';
  390. // globalInterfaceCustomLanguages
  391. // If defined and not empty then only languages listed here are shown
  392. // at the login screen, otherwise (default) all languages are shown
  393. // NOTE: values in the array must refer to an existing localization
  394. // (see the option above)
  395. // Example:
  396. // globalInterfaceCustomLanguages=['en_US', 'sk_SK'];
  397. var globalInterfaceCustomLanguages=[];
  398. // globalSortAlphabet
  399. // Use JavaScript localeCompare() or custom alphabet for data sorting.
  400. // Custom alphabet is used by default because JavaScript localeCompare()
  401. // not supports collation and often returns "wrong" result. If set to null
  402. // then localeCompare() is used.
  403. // Example:
  404. // var globalSortAlphabet=null;
  405. var globalSortAlphabet=' 0123456789'+
  406. 'AÀÁÂÄÆÃÅĀBCÇĆČDĎEÈÉÊËĒĖĘĚFGĞHIÌÍÎİÏĪĮJKLŁĹĽMNŃÑŇOÒÓÔÖŐŒØÕŌ'+
  407. 'PQRŔŘSŚŠȘșŞşẞTŤȚțŢţUÙÚÛÜŰŮŪVWXYÝŸZŹŻŽ'+
  408. 'aàáâäæãåābcçćčdďeèéêëēėęěfgğhiìíîïīįıjklłĺľmnńñňoòóôöőœøõō'+
  409. 'pqrŕřsśšßtťuùúûüűůūvwxyýÿzźżžАБВГҐДЕЄЖЗИІЇЙКЛМНОПРСТУФХЦЧШЩЮЯ'+
  410. 'Ьабвгґдеєжзиіїйклмнопрстуфхцчшщюяь';
  411. // globalSearchTransformAlphabet
  412. // To support search without diacritics (e.g. search for 'd' will find: 'Ď', 'ď')
  413. // it is required to define something like "character equivalence".
  414. // key = regex text, value = search character
  415. // Example:
  416. var globalSearchTransformAlphabet={
  417. '[ÀàÁáÂâÄäÆæÃãÅåĀā]': 'a', '[ÇçĆćČč]': 'c', '[Ďď]': 'd',
  418. '[ÈèÉéÊêËëĒēĖėĘęĚě]': 'e', '[Ğğ]': 'g', '[ÌìÍíÎîİıÏïĪīĮį]': 'i',
  419. '[ŁłĹ弾]': 'l', '[ŃńÑñŇň]': 'n', '[ÒòÓóÔôÖöŐőŒœØøÕõŌō]': 'o',
  420. '[ŔŕŘř]': 'r', '[ŚśŠšȘșŞşẞß]': 's', '[ŤťȚțŢţ]': 't',
  421. '[ÙùÚúÛûÜüŰűŮůŪū]': 'u', '[ÝýŸÿ]': 'y', '[ŹźŻżŽž]': 'z'
  422. };
  423. // globalResourceAlphabetSorting
  424. // If more than one resource (server account) is configured, sort the
  425. // resources alphabetically?
  426. // Example:
  427. var globalResourceAlphabetSorting=true;
  428. // globalNewVersionNotifyUsers
  429. // Update notification will be shown only to users with login names defined
  430. // in this array.
  431. // If undefined (or empty), update notifications will be shown to all users.
  432. // Example:
  433. // globalNewVersionNotifyUsers=['admin', 'peter'];
  434. var globalNewVersionNotifyUsers=[];
  435. // globalDatepickerFormat
  436. // Set the datepicker format (see
  437. // http://docs.jquery.com/UI/Datepicker/formatDate for valid values).
  438. // NOTE: date format is predefined for each localization - use this option
  439. // ONLY if you want to use custom date format (instead of the localization
  440. // predefined one).
  441. // Example:
  442. //var globalDatepickerFormat='dd.mm.yy';
  443. // globalDatepickerFirstDayOfWeek
  444. // Set the datepicker first day of the week: Sunday is 0, Monday is 1, etc.
  445. // Example:
  446. var globalDatepickerFirstDayOfWeek=1;
  447. // globalHideInfoMessageAfter
  448. // How long are information messages (such as: success, error) displayed
  449. // (in miliseconds).
  450. // Example:
  451. var globalHideInfoMessageAfter=1800;
  452. // globalEditorFadeAnimation
  453. // Set the editor fade in/out animation duration when editing or saving data
  454. // (in miliseconds).
  455. // Example:
  456. var globalEditorFadeAnimation=666;
  457. // globalLoadedAddressbookCollections
  458. // This option sets the list of addressbook collections (down)loaded after
  459. // login. If empty then all addressbook collections for the currently logged
  460. // user are loaded.
  461. // NOTE: settings stored on the server (see settingsAccount) overwrite this
  462. // option.
  463. // Example:
  464. var globalLoadedAddressbookCollections=[];
  465. // globalActiveAddressbookCollections
  466. // This options sets the list of addressbook collections checked (enabled
  467. // checkbox => data visible in the interface) by default after login.
  468. // If empty then all loaded addressbook collections for the currently logged
  469. // user are checked.
  470. // NOTE: only already (down)loaded collections can be checked (see
  471. // the globalLoadedAddressbookCollections option).
  472. // NOTE: settings stored on the server (see settingsAccount) overwrite this
  473. // option.
  474. // Example:
  475. var globalActiveAddressbookCollections=[];
  476. // globalAddressbookSelected
  477. // This option sets which addressbook collection will be pre-selected
  478. // (if you create a new contact) by default after login.
  479. // The value must be URL encoded path to an addressbook collection,
  480. // for example: 'USER/addressbook/'
  481. // If empty or undefined then the first available addressbook collection
  482. // is selected automatically.
  483. // NOTE: only already (down)loaded collections can be pre-selected (see
  484. // the globalLoadedAddressbookCollections option).
  485. // NOTE: settings stored on the server (see settingsAccount) overwrite this
  486. // option.
  487. // Example:
  488. //var globalAddressbookSelected='';
  489. // globalCompatibility
  490. // This options is reserved for various compatibility settings.
  491. // NOTE: if this option is used the value must be an object.
  492. // Currently there is only one supported option:
  493. // - anniversaryOutputFormat
  494. // Different clients use different (and incompatible) approach
  495. // to store anniversary date in vCards. Apple stores this attribute as:
  496. // itemX.X-ABDATE;TYPE=pref:2000-01-01\r\n
  497. // itemX.X-ABLabel:_$!<Anniversary>!$_\r\n'
  498. // other clients store this attribute as:
  499. // X-ANNIVERSARY:2000-01-01\r\n
  500. // Choose 'apple' or 'other' (lower case) for your 3rd party client
  501. // compatibility. You can chose both: ['apple', 'other'], but it may
  502. // cause many problems in the future, for example: duplicate anniversary
  503. // dates, invalid/old anniversary date in your clients, ...)
  504. // Examples:
  505. // anniversaryOutputFormat: ['other']
  506. // anniversaryOutputFormat: ['apple', 'other']
  507. // Example:
  508. var globalCompatibility={anniversaryOutputFormat: ['apple']};
  509. // globalUriHandler{Tel,Email,Url,Profile}
  510. // These options set the URI handlers for TEL, EMAIL, URL and X-SOCIALPROFILE
  511. // vCard attributes. Set them to null (or comment out) to disable.
  512. // NOTE: for globalUriHandlerTel is recommended to use 'tel:', 'callto:'
  513. // or 'skype:'. The globalUriHandlerUrl value is used only if no URI handler
  514. // is defined in the URL.
  515. // NOTE: it is safe to keep these values unchanged!
  516. // Example:
  517. var globalUriHandlerTel='tel:';
  518. var globalUriHandlerEmail='mailto:';
  519. var globalUriHandlerUrl='http://';
  520. var globalUriHandlerProfile={
  521. 'twitter': 'http://twitter.com/%u',
  522. 'facebook': 'http://www.facebook.com/%u',
  523. 'flickr': 'http://www.flickr.com/photos/%u',
  524. 'linkedin': 'http://www.linkedin.com/in/%u',
  525. 'myspace': 'http://www.myspace.com/%u',
  526. 'sinaweibo': 'http://weibo.com/n/%u'
  527. };
  528. // globalDefaultAddressCountry
  529. // This option sets the default country for new address fields.
  530. // See common.js or use the following command to get the list of
  531. // all supported country codes (defined in common.js):
  532. // grep -E "'[a-z]{2}':\s+\[" common.js | sed -Ee 's#^\s+|\s+\[\s+# #g'
  533. // Example:
  534. var globalDefaultAddressCountry='at';
  535. // globalAddressCountryEquivalence
  536. // This option sets the processing of the country field specified
  537. // in the vCard ADR attribute.
  538. // By default the address field in vCard looks like:
  539. // ADR;TYPE=WORK:;;1 Waters Edge;Baytown;LA;30314;USA\r\n
  540. // what cause a problem, because the country field is a plain
  541. // text and can contain any value, e.g.:
  542. // USA
  543. // United States of America
  544. // US
  545. // and because the address format can be completely different for
  546. // each country, e.g.:
  547. // China address example:
  548. // [China]
  549. // [Province] [City]
  550. // [Street]
  551. // [Postal]
  552. // Japan address example:
  553. // [Postal]
  554. // [Prefecture] [County/City]
  555. // [Further Divisions]
  556. // [Japan]
  557. // the client needs to correctly detect the country from the ADR
  558. // attribute. Apple solved this problem by using:
  559. // item1.ADR;TYPE=WORK:;;1 Waters Edge;Baytown;LA;30314;USA\r\n
  560. // item1.X-ABADR:us\r\n
  561. // where the second "related" attribute defines the country code
  562. // for the ADR attribute. This client uses the same approach, but
  563. // if the vCard is created by 3rd party clients and the X-ABADR
  564. // is missing, it is possible to define additional "rules" for
  565. // country matching. These rules are specied by the country code
  566. // (for full list of country codes see the comment for pre previous
  567. // option) and a case insensitive regular expression (which matches
  568. // the plain text value in the country field).
  569. // NOTE: if X-ABADR is not present and the country not matches any
  570. // country defined in this option, then globalDefaultAddressCountry
  571. // is used by default.
  572. // Example:
  573. var globalAddressCountryEquivalence=[
  574. {country: 'de', regex: '^\\W*Deutschland\\W*$'},
  575. {country: 'sk', regex: '^\\W*Slovensko\\W*$'}
  576. ];
  577. // globalAddressCountryFavorites
  578. // This option defines the list of countries which are shown at the top
  579. // of the country list in the interface (for full list of country codes
  580. // see the comment for pre globalDefaultAddressCountry option).
  581. // Example:
  582. // var globalAddressCountryFavorites=['de','sk'];
  583. var globalAddressCountryFavorites=[];
  584. // globalAddrColorPropertyXmlns
  585. // This options sets the namespace used for storing the "addressbook-color"
  586. // property by the client.
  587. // If true, undefined (or empty) "http://inf-it.com/ns/ab/" is used.
  588. // If false, then the addressbook color modification functionality
  589. // is completely disabled, and addressbook colors in the interface are
  590. // generated automatically.
  591. // Example:
  592. //var globalAddrColorPropertyXmlns=true;
  593. // globalContactStoreFN
  594. // This option specifies how the FN (formatted name) is stored into vCard.
  595. // The value for this options must be an array of strings, that can contain
  596. // the following variables:
  597. // prefix
  598. // last
  599. // middle
  600. // first
  601. // suffix
  602. // The string element of the array can contain any other characters (usually
  603. // space or colon). Elements are added into FN only if the there is
  604. // a variable match, for example if:
  605. // last='Lastname'
  606. // first='Firstname'
  607. // middle='' (empty)
  608. // and this option is set to:
  609. // ['last', ' middle', ' first'] (space in the second and third element)
  610. // the resulting value for FN will be: 'Lastname Firstname' and not
  611. // 'Lastname Firstname' (two spaces), because the middle name is empty (so
  612. // the second element is completely ignored /not added into FN/).
  613. // NOTE: this attribute is NOT used by this client, and it is also NOT
  614. // possible to directly edit it in the interface.
  615. // Examples:
  616. // var globalContactStoreFN=[' last', ' middle', ' first'];
  617. // var globalContactStoreFN=['last', ', middle', ' ,first'];
  618. var globalContactStoreFN=['prefix',' first',' middle',' last',' suffix'];
  619. // globalGroupContactsByCompanies
  620. // This options specifies how contacts are grouped in the interface.
  621. // By default the interface looks like (very simple example):
  622. // A
  623. // Adams Adam
  624. // Anderson Peter
  625. // B
  626. // Brown John
  627. // Baker Josh
  628. // if grouped by company/deparment the result is:
  629. // Company A [Department X]
  630. // Adams Adam
  631. // Brown John
  632. // Company B [Department Y]
  633. // Anderson Peter
  634. // Baker Josh
  635. // If this option is set to true contacts are grouped by company/department,
  636. // otherwise (default) contacts are grouped by letters of the alphabet.
  637. // If undefined or not true, grouping by alphabet letters is used.
  638. // NOTE: see also the globalCollectionDisplay option below.
  639. var globalGroupContactsByCompanies=false;
  640. // globalCollectionDisplay
  641. // This options specifies how data columns in the contact list are displayed.
  642. //
  643. // NOTE: columns are displayed ONLY if there is enought horizontal place in
  644. // the browser window (e.g. if you define 5 columns here, but your browser
  645. // window is not wide enough, you will see only first 3 columns instead of 5).
  646. //
  647. // NOTE: see the globalContactDataMinVisiblePercentage option which defines the
  648. // width for columns.
  649. //
  650. // The value must be an array of columns, where each column is represented by
  651. // an object with the following properties:
  652. // label => the value of this option is a string used as column header
  653. // You can use the following localized variables in the label string:
  654. // - {Name}
  655. // - {FirstName}
  656. // - {LastName}
  657. // - {MiddleName}
  658. // - {NickName}
  659. // - {Prefix}
  660. // - {Suffix}
  661. // - {BirthDay}
  662. // - {PhoneticLastName}
  663. // - {PhoneticFirstName}
  664. // - {JobTitle}
  665. // - {Company}
  666. // - {Department}
  667. // - {Categories}
  668. // - {NoteText}
  669. // - {Address}, {AddressWork}, {AddressHome}, {AddressOther}
  670. // - {Phone}, {PhoneWork}, {PhoneHome}, {PhoneCell}, {PhoneMain},
  671. // {PhonePager}, {PhoneFax}, {PhoneIphone}, {PhoneOther}
  672. // - {Email}, {EmailWork}, {EmailHome}, {EmailMobileme}, {EmailOther}
  673. // - {URL}, {URLWork}, {URLHome}, {URLHomepage}, {URLOther}
  674. // - {Dates}, {DatesAnniversary}, {DatesOther}
  675. // - {Related}, {RelatedManager}, {RelatedAssistant}, {RelatedFather},
  676. // {RelatedMother}, {RelatedParent}, {RelatedBrother}, {RelatedSister},
  677. // {RelatedChild}, {RelatedFriend}, {RelatedSpouse}, {RelatedPartner},
  678. // {RelatedOther}
  679. // - {Profile}, {ProfileTwitter}, {ProfileFacebook}, {ProfileFlickr},
  680. // {ProfileLinkedin}, {ProfileMyspace}, {ProfileSinaweibo}
  681. // - {IM}, {IMWork}, {IMHome}, {IMMobileme}, {IMOther}, {IMAim}, {IMIcq},
  682. // {IMIrc}, {IMJabber}, {IMMsn}, {IMYahoo}, {IMFacebook}, {IMGadugadu},
  683. // {IMGoogletalk}, {IMQq}, {IMSkype}
  684. // value => the value of this option is an array of format strings, or
  685. // an object with the following properties:
  686. // - company (used for company contacts)
  687. // - personal (used for user contacts)
  688. // where the value of these properties is an array of format strings used
  689. // for company or user contacts (you can have different values in the same
  690. // column for personal and company contacts).
  691. // You can use the following simple variables in the format string:
  692. // - {FirstName}
  693. // - {LastName}
  694. // - {MiddleName}
  695. // - {NickName}
  696. // - {Prefix}
  697. // - {Suffix}
  698. // - {BirthDay}
  699. // - {PhoneticLastName}
  700. // - {PhoneticFirstName}
  701. // - {JobTitle}
  702. // - {Company}
  703. // - {Department}
  704. // - {Categories}
  705. // - {NoteText}
  706. // You can also use parametrized variables, where the parameter is enclosed
  707. // in square bracket. Paramatrized variables are useful to extract data
  708. // such as home phone {Phone[type=home]}, extract the second phone number
  709. // {Phone[:1]} (zero based indexing) or extract the third home phone number
  710. // {Phone[type=home][:2]} from the vCard.
  711. // NOTE: if the parametrized variable matches multiple items, e.g.:
  712. // {Phone[type=work]} (if the contact has multiple work phones) then the
  713. // first one is used!
  714. //
  715. // The following parametrized variables are supported (note: you can use
  716. // all of them also without parameters /the first one will be used/):
  717. // - {Address[type=XXX]} or {Address[:NUM]} or {Address[type=XXX][:NUM]}
  718. // where supported values for XXX are:
  719. // - work
  720. // - home
  721. // - other
  722. // - any other custom value
  723. // - {Phone[type=XXX]} or {Phone[:NUM]} or {Phone[type=XXX][:NUM]}
  724. // where supported values for XXX are:
  725. // - work
  726. // - home
  727. // - cell
  728. // - main
  729. // - pager
  730. // - fax
  731. // - iphone
  732. // - other
  733. // - any other custom value
  734. // - {Email[type=XXX]} or {Email[:NUM]} or {Email[type=XXX][:NUM]}
  735. // where supported values for XXX are:
  736. // - work
  737. // - home
  738. // - mobileme
  739. // - other
  740. // - any other custom value
  741. // - {URL[type=XXX]} or {URL[:NUM]} or {URL[type=XXX][:NUM]}
  742. // where supported values for XXX are:
  743. // - work
  744. // - home
  745. // - homepage
  746. // - other
  747. // - any other custom value
  748. // - {Dates[type=XXX]} or {Dates[:NUM]} or {Dates[type=XXX][:NUM]}
  749. // where supported values for XXX are:
  750. // - anniversary
  751. // - other
  752. // - any other custom value
  753. // - {Related[type=XXX]} or {Related[:NUM]} or {Related[type=XXX][:NUM]}
  754. // where supported values for XXX are:
  755. // - manager
  756. // - assistant
  757. // - father
  758. // - mother
  759. // - parent
  760. // - brother
  761. // - sister
  762. // - child
  763. // - friend
  764. // - spouse
  765. // - partner
  766. // - other
  767. // - any other custom value
  768. // - {Profile[type=XXX]} or {Profile[:NUM]} or {Profile[type=XXX][:NUM]}
  769. // where supported values for XXX are:
  770. // - twitter
  771. // - facebook
  772. // - flickr
  773. // - linkedin
  774. // - myspace
  775. // - sinaweibo
  776. // - any other custom value
  777. // - {IM[type=XXX]} or {IM[service-type=YYY]} or {IM[:NUM]}
  778. // where supported values for XXX are:
  779. // - work
  780. // - home
  781. // - mobileme
  782. // - other
  783. // - any other custom value
  784. // and supported values for YYY are:
  785. // - aim
  786. // - icq
  787. // - irc
  788. // - jabber
  789. // - msn
  790. // - yahoo
  791. // - facebook
  792. // - gadugadu
  793. // - googletalk
  794. // - qq
  795. // - skype
  796. // - any other custom value
  797. //
  798. // NOTE: if you want to use the "any other custom value" option (for XXX
  799. // or YYY above) you MUST double escape the following characters:
  800. // =[]{}\
  801. // for example:
  802. // - for profile type "=XXX=" use: '{Profile[type=\\=XXX\\=]}'
  803. // - for profile type "\XXX\" use: '{Profile[type=\\\\XXX\\\\]}'
  804. //
  805. // NOTE: if you want to use curly brackets in the format string you must
  806. // double escape it, e.g.: ['{Company}', '\\{{Department}\\}']
  807. //
  808. // The format string (for the value option) is an array to allow full
  809. // customization of the interface. For example if:
  810. // value: ['{LastName} {MiddleName} {FirstName}']
  811. // and the person has no middle name, then the result in the column
  812. // will be (without quotes):
  813. // "Parker Peter" (note: two space characters)
  814. // but if you use:
  815. // value: ['{LastName}', ' {MiddleName}', ' {FirstName}']
  816. // then the result will be (without quotes):
  817. // "Parker Peter" (note: only one space character)
  818. // The reason is that only those elements of the array are appended
  819. // into the result where non-empty substitution was performed (so the
  820. // ' {MiddleName}' element in this case is ignored, because the person
  821. // in the example above has no /more precisely has empty/ middle name).
  822. //
  823. // Examples:
  824. // To specify two columns (named "Company" and "Department / LastName"),
  825. // where the first will display the company name, and the second will display
  826. // department for company contacts (with "Dep -" prefix), and lastname for
  827. // personal contacts (with "Name -" prefix) use:
  828. // var globalCollectionDisplay=[
  829. // {
  830. // label: 'Company',
  831. // value: ['{Company}']
  832. // },
  833. // {
  834. // label: 'Department / LastName',
  835. // value: {
  836. // company: ['Dep - {Department}'],
  837. // personal: ['Name - {LastName}']
  838. // }
  839. // }
  840. // ];
  841. // To specify 3 columns (named "Categories", "URL" and "IM"), where the first
  842. // will display categories, second will display the third work URL, and third
  843. // will display ICQ IM use:
  844. // var globalCollectionDisplay=[
  845. // {
  846. // label: 'Categories',
  847. // value: ['{Categories}']
  848. // },
  849. // {
  850. // label: 'URL',
  851. // value: ['{URL[type=WORK][:2]}']
  852. // },
  853. // {
  854. // label: 'IM',
  855. // value: ['{IM[service-type=ICQ]}']
  856. // }
  857. // ];
  858. //
  859. // Recommended settings if globalGroupContactsByCompanies
  860. // is set to false:
  861. // var globalCollectionDisplay=[
  862. // {
  863. // label: '{Name}',
  864. // value: ['{LastName}', ' {MiddleName}', ' {FirstName}']
  865. // },
  866. // {
  867. // label: '{Company} [{Department}]',
  868. // value: ['{Company}', ' [{Department}]']
  869. // },
  870. // {
  871. // label: '{JobTitle}',
  872. // value: ['{JobTitle}']
  873. // },
  874. // {
  875. // label: '{Email}',
  876. // value: ['{Email[:0]}']
  877. // },
  878. // {
  879. // label: '{Phone} 1',
  880. // value: ['{Phone[:0]}']
  881. // },
  882. // {
  883. // label: '{Phone} 2',
  884. // value: ['{Phone[:1]}']
  885. // },
  886. // {
  887. // label: '{NoteText}',
  888. // value: ['{NoteText}']
  889. // }
  890. // ];
  891. //
  892. // Recommended settings if globalGroupContactsByCompanies
  893. // is set to true:
  894. // var globalCollectionDisplay=[
  895. // {
  896. // label: '{Name}',
  897. // value: {
  898. // personal: ['{LastName}', ' {MiddleName}', ' {FirstName}'],
  899. // company: ['{Company}', ' [{Department}]']
  900. // }
  901. // },
  902. // {
  903. // label: '{JobTitle}',
  904. // value: ['{JobTitle}']
  905. // },
  906. // {
  907. // label: '{Email}',
  908. // value: ['{Email[:0]}']
  909. // },
  910. // {
  911. // label: '{Phone} 1',
  912. // value: ['{Phone[:0]}']
  913. // },
  914. // {
  915. // label: '{Phone} 2',
  916. // value: ['{Phone[:1]}']
  917. // },
  918. // {
  919. // label: '{NoteText}',
  920. // value: ['{NoteText}']
  921. // }
  922. // ];
  923. //
  924. // NOTE: if left undefined, the recommended settings will be used.
  925. var globalCollectionDisplay=[
  926. {label: '{Name}',
  927. value: {
  928. personal: ['{LastName}', ' {FirstName}', ' {MiddleName}'],
  929. company: ['{Company}', ' / {Department}', ' / {JobTitle}']}},
  930. {label: '{Phone}', value: ['{Phone}']},
  931. {label: '{Email}', value: ['{Email}']},
  932. {label: '{BirthDay}', value: ['{Birthday}']}
  933. ];
  934. // globalCollectionSort
  935. // This options sets the ordering of contacts in the interface. In general
  936. // contacts are ordered alphabetically by an internal "sort string" which
  937. // is created for each contact. Here you can specify how this internal string
  938. // is created. The value is a simple array holding only the values from the
  939. // value property defined in the globalCollectionDisplay option.
  940. // If undefined, the definition from globalCollectionDisplay is used.
  941. // Example:
  942. // var globalCollectionSort = [
  943. // ['{LastName}'],
  944. // ['{FirstName}'],
  945. // ['{MiddleName}'],
  946. // {
  947. // company: ['{Categories}'],
  948. // personal: ['{Company}']
  949. // }
  950. // ];
  951. // globalContactDataMinVisiblePercentage
  952. // This option defines how the width for columns are computed. If you set
  953. // it to 1 then 100% of all data in the column will be visible (the column
  954. // width is determined by the longest string in the column). If you set it
  955. // to 0.95 then 95% of data will fit into the column width, and the remaining
  956. // 5% will be truncated (" ...").
  957. // Example:
  958. var globalContactDataMinVisiblePercentage=0.95;