index.html 43 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639
  1. <!DOCTYPE html>
  2. <html lang="en" manifest="cache.manifest">
  3. <head>
  4. <title>CardDavMATE</title>
  5. <meta http-equiv="cache-control" content="no-cache" />
  6. <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
  7. <meta name="apple-mobile-web-app-capable" content="yes" />
  8. <meta http-equiv="X-UA-Compatible" content="IE=edge" />
  9. <!--
  10. CardDavMATE - the open source CardDAV Web Client
  11. Copyright (C) 2011-2015
  12. Jan Mate <jan.mate@inf-it.com>
  13. Andrej Lezo <andrej.lezo@inf-it.com>
  14. Matej Mihalik <matej.mihalik@inf-it.com>
  15. This program is free software: you can redistribute it and/or modify
  16. it under the terms of the GNU Affero General Public License as
  17. published by the Free Software Foundation, either version 3 of the
  18. License, or (at your option) any later version.
  19. This program is distributed in the hope that it will be useful,
  20. but WITHOUT ANY WARRANTY; without even the implied warranty of
  21. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  22. GNU Affero General Public License for more details.
  23. You should have received a copy of the GNU Affero General Public License
  24. along with this program. If not, see <http://www.gnu.org/licenses/>.
  25. -->
  26. <link rel="stylesheet" href="css/jquery-ui.custom.css" type="text/css" />
  27. <link rel="stylesheet" href="css/jquery.tagsinput.css" type="text/css" />
  28. <link rel="stylesheet" href="css/spectrum.custom.css" type="text/css" />
  29. <link rel="stylesheet" href="css/default.css" type="text/css" />
  30. <script src="cache_handler.js" type="text/javascript"></script>
  31. <script src="lib/jquery-2.1.4.min.js" type="text/javascript"></script>
  32. <script src="lib/jquery.browser.js" type="text/javascript"></script>
  33. <script src="lib/jquery.autosize.js" type="text/javascript"></script>
  34. <script src="lib/jquery-ui-1.11.4.custom.js" type="text/javascript"></script>
  35. <script src="lib/jquery.quicksearch.js" type="text/javascript"></script>
  36. <script src="lib/jquery.placeholder-1.1.9.js" type="text/javascript"></script>
  37. <script src="lib/jshash-2.2_sha256.js" type="text/javascript"></script>
  38. <script src="lib/jquery.tagsinput.js" type="text/javascript"></script>
  39. <script src="lib/spectrum.js" type="text/javascript"></script>
  40. <script src="config.js" type="text/javascript"></script>
  41. <script src="common.js" type="text/javascript"></script>
  42. <script src="webdav_protocol.js" type="text/javascript"></script>
  43. <script src="localization.js" type="text/javascript"></script>
  44. <script src="interface.js" type="text/javascript"></script>
  45. <script src="vcard_rfc_regex.js" type="text/javascript"></script>
  46. <script src="resource.js" type="text/javascript"></script>
  47. <script src="addressbook.js" type="text/javascript"></script>
  48. <script src="data_process.js" type="text/javascript"></script>
  49. <script src="main.js" type="text/javascript"></script>
  50. </head>
  51. <body>
  52. <div id="cacheDialog">
  53. <div id="cacheDialogText">newer version detected!</div>
  54. <div id="cacheDialogButtonWrapper">
  55. <input id="cacheDialogButton" type="button" value="refresh" onclick="window.location.reload()"/>
  56. </div>
  57. </div>
  58. <div id="MainLoader">
  59. <div id="MainLoaderInner" class="loaderInfo">Loading ...</div>
  60. <div class="loader"></div>
  61. </div>
  62. <div id="LoginPage" style="opacity: 1; display:none">
  63. <div class="window">
  64. <div id="Login">
  65. <form onsubmit="event.preventDefault(); login();">
  66. <table>
  67. <tr>
  68. <td data-size="login_logo"><img data-type="system_logo" src="" alt="Logo" /></td>
  69. </tr>
  70. <tr>
  71. <td data-size="login_input"><input data-type="system_username" type="text" name="username" class="fs" placeholder="Login" /></td>
  72. </tr>
  73. <tr>
  74. <td data-size="login_input"><input data-type="system_password" type="password" name="password" class="fs" placeholder="Password" /></td>
  75. </tr>
  76. <tr>
  77. <td data-size="login">
  78. <select data-type="language" onchange="if($(this).val()!=''){globalInterfaceLanguage=$(this).find('option').filter(':selected').attr('data-type');resetSettings();if(isAvaible('CalDavZAP') && !isCalDAVLoaded)localizeCalDAV();if(isAvaible('CardDavMATE') && !isCardDAVLoaded)localizeCardDAV();if(isAvaible('Settings') && !isSettingsLoaded)localizeSettings();if(isAvaible('Projects') && !isProjectsLoaded)localizeProjects();}">
  79. <option data-type=""> </option>
  80. </select>
  81. </td>
  82. </tr>
  83. <tr>
  84. <td><img data-type="system_login" alt="login" title="login" src="images/login.svg" onclick="if(event.shiftKey) ignoreServerSettings=true; $(this).closest('form').find('[type=\'submit\']').click();" /></td>
  85. </tr>
  86. <tr style="display:none">
  87. <td><input type="submit" /></td>
  88. </tr>
  89. </table>
  90. </form>
  91. </div>
  92. <div id="login_message" style="display: none;"></div>
  93. <div id="LoginLoader">
  94. <div class="loader"></div>
  95. </div>
  96. </div>
  97. <div class="footer">This is SOFTWARE!!!</div>
  98. </div>
  99. <div class="integration_d">
  100. <div id="intCarddav" title="addressbook" onclick="checkForApplication('CardDavMATE');">
  101. <img class="int_error" src="images/error_badge.svg" alt="error" />
  102. </div>
  103. <div class="intBlank"></div>
  104. <div id="intRefresh" title="refresh" onclick="reloadResources();"></div>
  105. <div class="intBlank"></div>
  106. <div id="intLogout" title="logout" onclick="logout();"></div>
  107. </div>
  108. <div class="System" id="SystemCardDavMATE">
  109. <div class="update_d" style="display: none;">
  110. <div class="update_h"></div>
  111. </div>
  112. <div class="resourcesCardDAV_d">
  113. <div data-type="resourcesCardDAV_txt" class="resourcesCardDAV_h">Resources</div>
  114. <img id="showUnloadedAddressbooks" src="images/delegation.svg" alt="Subscribe" title="Subscribe" onclick="showUnloadedCardDAVCollections();" />
  115. <input id="Logout" style="display: none;" data-url="" class="system_l" type="image" src="images/logout.svg" alt="Logout" title="Logout" onclick="logout();" />
  116. <input id="loadUnloadedAddressbooks" type="button" value="save" onclick="loadAdditionalCardDAVCollections()" style="margin-top:4px;margin-left:6px;" />
  117. <input id="loadUnloadedAddressbooksCancel" type="button" value="cancel" onclick="cancelUnloadedCardDAVCollections();" style="margin-top:4px;margin-right:6px;float:right;" />
  118. </div>
  119. <div class="collection_d">
  120. <input id="ResourceCardDAVToggle" type="image" src="images/resources.svg" alt="Show/Hide Resources" />
  121. <input id="AddContact" disabled="disabled" data-account-uid="" data-url="" data-filter-url="" data-color="" class="collection_a element_no_display" type="image" src="images/new_item.svg" alt="Add Contact" title="Add Contact" onclick="
  122. if($('#vCardEditor').attr('data-editor-state')!='edit')
  123. {
  124. $('#ResourceCardDAVListOverlay').fadeTo(globalEditorFadeAnimation, 0.6);
  125. $('#ABListOverlay').fadeTo(globalEditorFadeAnimation, 0.6);
  126. globalRefABListTable.find('.ablist_item.ablist_item_selected').removeClass('ablist_item_selected');
  127. globalAddressbookList.loadContactByVcard('BEGIN:VCARD\r\nVERSION:3.0\r\n'+(typeof globalGroupContactsByCompanies!='undefined' && globalGroupContactsByCompanies===true ? 'X-ABShowAs:company\r\n' : '')+'FN:\r\nN:;;;;\r\nEND:VCARD\r\n', this.getAttribute('data-color'), true, 'add');
  128. $('#vCardEditor').attr('data-editor-state','edit');
  129. $('#vCardEditor').attr({'data-account-uid': this.getAttribute('data-account-uid'), 'data-url': this.getAttribute('data-url')});
  130. $('#vCardEditor').find('[data-type=cancel]').attr('data-id', globalAddressbookList.getLoadedContactUID());
  131. // todo: move to the processEditor* ?
  132. if(typeof globalContactsExtEditorProcess =='function')
  133. $('#vCardEditor').find('[data-type=org]').focus();
  134. else
  135. $('#vCardEditor').find('[data-type=given]').focus();
  136. $('#ABContact').scrollTop(0);
  137. }" />
  138. </div>
  139. <div class="contact_d">
  140. <div data-type="contact_txt" class="contact_h">Contact</div>
  141. </div>
  142. <div id="ResourceCardDAVList">
  143. <div id="ResourceCardDAVListTemplate" style="display: none;">
  144. <div class="resourceCardDAV_header"><input type="checkbox"></div>
  145. <div class="resourceCardDAV_item">
  146. <div class="resourceCardDAV"><div class="resourceCardDAVColor"></div><input type="text" class="colorPicker"/><input type="checkbox" data-ind="false"></div>
  147. <div class="contact_group">
  148. <div class="group" style="display: none;"><div class="resourceCardDAVGroupColor"></div><input type="checkbox"></div>
  149. </div>
  150. </div>
  151. </div>
  152. </div>
  153. <div id="ResourceCardDAVListOverlay"></div>
  154. <div id="AddressbookOverlay">
  155. <div class="loaderInfo">Addressbooking ...</div>
  156. <div class="loader"></div>
  157. </div>
  158. <div id="SearchBox">
  159. <img data-type="invalid" style="position: inline; margin-top: 0px; margin-top: 4px; margin-left: 8px; vertical-align: top;" src="images/search.svg" alt="invalid" />
  160. <div class="container">
  161. <input data-type="search" type="text" placeholder="Search" size="45" value="" />
  162. </div>
  163. <img data-type="reset" style="display: none; position: absolute; margin-top: 5px; right: 9px; vertical-align: top; cursor: pointer;" src="images/reset_b.svg" alt="reset" onclick="$('#ABInMessage').height(0);hideNotVisibleMessage();if(globalQs!=null){$('[data-type=search]').val(''); globalQs.search('');}" />
  164. </div>
  165. <div id="ABList">
  166. <table id="ABListTable">
  167. <colgroup>
  168. <col class="ablist_column_color" />
  169. </colgroup>
  170. <tbody>
  171. <tr class="ablist_table_header">
  172. <th></th>
  173. </tr>
  174. <tr class="ablist_table_container">
  175. <td>
  176. <div class="ablist_table_wrapper">
  177. <table id="ABListTableInner">
  178. <colgroup>
  179. <col class="ablist_column_color" />
  180. </colgroup>
  181. <tbody>
  182. <tr class="ablist_header" style="display: none;">
  183. <td></td>
  184. </tr>
  185. <tr class="ablist_item" style="display: none;">
  186. <td class="ablist_item_color"></td>
  187. </tr>
  188. </tbody>
  189. </table>
  190. </div>
  191. </td>
  192. </tr>
  193. </tbody>
  194. </table>
  195. </div>
  196. <div id="ABListOverlay"></div>
  197. <div id="ABContactColor"></div>
  198. <div id="ABMessage">
  199. <div id="ABMessageText"></div>
  200. </div>
  201. <div id="ABContact">
  202. <div id="vCardTemplate">
  203. <div id="ABInMessage">
  204. <div id="ABInMessageText">
  205. </div>
  206. </div>
  207. <div id="ABInMessageEditBox" >
  208. <div id="ABInMessageTextEditBox">
  209. </div>
  210. </div>
  211. <div id="EditorBox" style="display: none;">
  212. <table id="vCardEditor" data-url="" data-etag="" data-editor-state="show">
  213. <tr>
  214. <td class="opw zero_height">
  215. </td>
  216. <td class="opw zero_height">
  217. </td>
  218. <td class="type zero_height">
  219. </td>
  220. <td colspan="2" class="zero_height">
  221. </td>
  222. </tr>
  223. <tr>
  224. <td colspan="5" class="clean">
  225. <table style="margin-bottom:10px">
  226. <tr>
  227. <td data-attr-name="PHOTO" rowspan="10" class="photo_box">
  228. <div class="photo_div">
  229. <canvas id="photo" data-type="photo" class="photo photo_user photo_blank" onclick="if($(this).parent().find('#photo_drag').css('display')!='none'){if(event.shiftKey){showPhotoBox(event);}else{$('#upload_file').trigger('click');}}">Photo</canvas>
  230. <img id="photo_drag" data-type="photo_drag" class="photo_drag" style="position: absolute; left: 0px; top: 0px; display: none; pointer-events: none;" src="images/drag.svg" alt="" /><img id="reset_img" data-type="reset_img" style="position: absolute; top: 10px; left: 140px; vertical-align: top; cursor: pointer; display: none;" src="images/reset_b.svg" alt="remove" onclick="vCard.tplM['contentline_PHOTO'][0]=null; $('#upload_file, #photoURL, #photoURLHidden').val('');$(this).css('display', 'none'); $('#photo').addClass('photo_blank'); var canvasElement=$('#photo').get(0); canvasElement.getContext('2d').clearRect(0,0,canvasElement.width,canvasElement.height);">
  231. <div style="width: 0px !important; height: 0px !important; overflow: hidden !important; top: -20px !important; left: -20px !important;"><input type="file" id="upload_file" name="upload_file" accept="image/*" /></div>
  232. </div>
  233. <div id="photoArrow"></div>
  234. <div id="photoBox">
  235. <h1>remote image url</h1>
  236. <div id="photoBoxContent">
  237. <form onsubmit="return false;">
  238. <input type="text" id="photoURL" autocomplete="off" />
  239. <img data-type="invalid" style="position: inline; margin-top: 1px; margin-left: -22px; display: none; vertical-align: top;" src="images/error_b.svg" alt="invalid">
  240. <input type="hidden" id="photoURLHidden" autocomplete="off" />
  241. <input type="submit" id="photoBoxButton" value="OK" />
  242. </form>
  243. </div>
  244. </div>
  245. </td>
  246. </tr>
  247. <tr data-type="DEST">
  248. <td colspan="4" data-size="full"><span><select data-type="xfull_type" data-attr-name="_DEST_"></select></span></td>
  249. </tr>
  250. <tr>
  251. <td style="padding-top: 1px;" colspan="2"><input data-type="given" type="text" class="hs" placeholder="FirstName" value="" /></td>
  252. <td style="padding-top: 1px;" colspan="2"><input data-type="family" type="text" class="hs" placeholder="LastName" value="" /></td>
  253. </tr>
  254. <tr>
  255. <td colspan="2"><input data-type="middle" type="text" class="hs" placeholder="MiddleName" value="" /></td>
  256. <td data-attr-name="NICKNAME" colspan="2"><input data-type="nickname" type="text" class="hs" placeholder="NickName" value="" /></td>
  257. </tr>
  258. <tr>
  259. <td><input data-type="prefix" type="text" style="width:94px" placeholder="Prefix" value="" /></td>
  260. <td><input data-type="suffix" type="text" style="width:95px" placeholder="Suffix" value="" /></td>
  261. <td data-attr-name="BDAY" colspan="2">
  262. <input data-type="date_bday" type="text" class="hs" placeholder="BirthDay" value="" /><img data-type="invalid" style="position: inline; margin-top: 1px; margin-left: -20px; display: none; vertical-align: top;" src="images/error_b.svg" alt="invalid" />
  263. </td>
  264. </tr>
  265. <tr>
  266. <td data-attr-name="X-PHONETIC-FIRST-NAME" colspan="2">
  267. <input data-type="ph_firstname" type="text" class="hs" placeholder="PhoneticFirstName" value="" />
  268. </td>
  269. <td data-attr-name="X-PHONETIC-LAST-NAME" colspan="2">
  270. <input data-type="ph_lastname" type="text" class="hs" placeholder="PhoneticLastName" value="" />
  271. </td>
  272. </tr>
  273. <tr data-attr-name="TITLE">
  274. <td colspan="4"><input data-type="title" type="text" class="fs" placeholder="JobTitle" value="" /></td>
  275. </tr>
  276. <tr data-attr-name="ORG">
  277. <td colspan="4"><input data-type="org" type="text" class="fs" placeholder="Company" size="45" value="" /></td>
  278. </tr>
  279. <tr data-attr-name="ORG">
  280. <td colspan="4"><input data-type="department" type="text" class="fs" placeholder="Department" size="45" value="" /></td>
  281. </tr>
  282. <tr data-attr-name="X-Flags" class="heightfix">
  283. <td data-attr-name="X-ABShowAs" class="heightfix" colspan="2">
  284. <label class="element_grayed">
  285. <input data-type="isorg" type="checkbox" onclick="$('#photo').toggleClass('photo_user photo_company');" /><span data-type="company_contact">Company Contact</span>
  286. </label>
  287. </td>
  288. <td data-attr-name="X-BOOLEAN" class="heightfix" colspan="2">
  289. </td>
  290. </tr>
  291. </table>
  292. </td>
  293. </tr>
  294. <tr data-attr-name="TEL">
  295. <td data-type="phone_txt" colspan="5" class="attr_desc">Phone</td>
  296. </tr>
  297. <tr data-attr-name="TEL" data-type="%phone" data-id="0">
  298. <td data-type="%del"><input class="op" type="image" src="images/op_del.svg" alt="-" /></td>
  299. <td data-type="%add"><input class="op" type="image" src="images/op_add.svg" alt="+" /></td>
  300. <td data-size="small">
  301. <select data-type="phone_type" onchange="if($(':selected', this).attr('data-type')==':custom') {$(this).parent().find('span[data-type=custom_span]').css('display','inline'); $(this).parent().find('[data-type=custom_value]').focus().trigger('change')} else $(this).parent().find('span[data-type=custom_span]').css('display','none');">
  302. <option data-type="work">work</option>
  303. <option data-type="home">home</option>
  304. <option data-type="cell">mobile</option>
  305. <option data-type="cell,work">work mobile</option>
  306. <option data-type="cell,home">home mobile</option>
  307. <option data-type="main">main</option>
  308. <option data-type="pager">pager</option>
  309. <option data-type="fax">fax</option>
  310. <option data-type="fax,work">work fax</option>
  311. <option data-type="fax,home">home fax</option>
  312. <option data-type="iphone">iPhone</option>
  313. <option data-type="other">other</option>
  314. <option data-type=":custom">» custom</option>
  315. </select><span data-type="custom_span" style="position: relative; margin-left: -134px; margin-top: 0px; vertical-align: top; display: none; z-index: 1;"><input data-type="custom_value" type="text" class="ss" placeholder="custom" value="" /><img data-type="invalid" style="z-index: 2; margin-top: 1px; margin-left: -16px; vertical-align: top; display: none;" src="images/error_b.svg" alt="invalid" /></span>
  316. </td>
  317. <td colspan="2" onmouseover="if(globalSettings.urihandlertel.value!=null && $(this).find('input[data-type=value]').prop('readonly') && $(this).find('input[type=image]').css('visibility')=='hidden') $(this).find('input[type=image]').css('visibility','')" onmouseout="$(this).find('input[type=image]').css('visibility','hidden');">
  318. <input data-type="value" type="text" class="fs" placeholder="Phone" value="" /><input data-type="value_handler" style="position: inline; margin-left: -17px; visibility: hidden; vertical-align: top;" type="image" src="images/arrow.svg" alt=">" onclick="if(globalSettings.urihandlertel.value!=null) { parent.location=globalSettings.urihandlertel.value+$(this).parent().find('input[data-type=value]').val(); $(this).css('visibility','hidden');}" /><img data-type="invalid" style="position: inline; margin-top: 1px; margin-left: -20px; display: none; vertical-align: top;" src="images/error_b.svg" alt="invalid" />
  319. </td>
  320. </tr>
  321. <tr data-attr-name="EMAIL">
  322. <td data-type="email_txt" colspan="5" class="attr_desc">Email</td>
  323. </tr>
  324. <tr data-attr-name="EMAIL" data-type="%email" data-id="0">
  325. <td data-type="%del"><input class="op" type="image" src="images/op_del.svg" alt="-" /></td>
  326. <td data-type="%add"><input class="op" type="image" src="images/op_add.svg" alt="+" /></td>
  327. <td data-size="small">
  328. <select data-type="email_type" onchange="if($(':selected', this).attr('data-type')==':custom') {$(this).parent().find('span[data-type=custom_span]').css('display','inline'); $(this).parent().find('[data-type=custom_value]').focus().trigger('change')} else $(this).parent().find('span[data-type=custom_span]').css('display','none');">
  329. <option data-type="internet,work">work</option>
  330. <option data-type="home,internet">home</option>
  331. <option data-type=":mobileme:,internet">mobileMe</option>
  332. <option data-type=":_$!<other>!$_:,internet">other</option>
  333. <option data-type=":custom">» custom</option>
  334. </select><span data-type="custom_span" style="position: relative; margin-left: -134px; margin-top: 0px; vertical-align: top; display: none; z-index: 1;"><input data-type="custom_value" type="text" class="ss" placeholder="custom" value="" /><img data-type="invalid" style="z-index: 2; margin-top: 1px; margin-left: -16px; vertical-align: top; display: none;" src="images/error_b.svg" alt="invalid" /></span>
  335. </td>
  336. <td colspan="2" onmouseover="if(globalSettings.urihandleremail.value!=null && $(this).find('input[data-type=value]').prop('readonly') && $(this).find('input[type=image]').css('visibility')=='hidden') $(this).find('input[type=image]').css('visibility','')" onmouseout="$(this).find('input[type=image]').css('visibility','hidden');">
  337. <input data-type="value" type="text" class="fs" placeholder="Email" value="" /><input data-type="value_handler" style="position: inline; margin-left: -17px; visibility: hidden; vertical-align: top;" type="image" src="images/arrow.svg" alt=">" onclick="if(globalSettings.urihandleremail.value!=null) { parent.location=globalSettings.urihandleremail.value+$(this).parent().find('input[data-type=value]').val(); $(this).css('visibility','hidden');}" /><img data-type="invalid" style="position: inline; margin-top: 1px; margin-left: -20px; display: none; vertical-align: top;" src="images/error_b.svg" alt="invalid" />
  338. </td>
  339. </tr>
  340. <tr data-attr-name="URL">
  341. <td data-type="url_txt" colspan="5" class="attr_desc">URL</td>
  342. </tr>
  343. <tr data-attr-name="URL" data-type="%url" data-id="0">
  344. <td data-type="%del"><input class="op" type="image" src="images/op_del.svg" alt="-" /></td>
  345. <td data-type="%add"><input class="op" type="image" src="images/op_add.svg" alt="+" /></td>
  346. <td data-size="small">
  347. <select data-type="url_type" onchange="if($(':selected', this).attr('data-type')==':custom') {$(this).parent().find('span[data-type=custom_span]').css('display','inline'); $(this).parent().find('[data-type=custom_value]').focus().trigger('change')} else $(this).parent().find('span[data-type=custom_span]').css('display','none');">
  348. <option data-type="work">work</option>
  349. <option data-type="home">home</option>
  350. <option data-type=":_$!<homepage>!$_:">homePage</option>
  351. <option data-type=":_$!<other>!$_:">other</option>
  352. <option data-type=":custom">» custom</option>
  353. </select><span data-type="custom_span" style="position: relative; margin-left: -134px; margin-top: 0px; vertical-align: top; display: none; z-index: 1;"><input data-type="custom_value" type="text" class="ss" placeholder="custom" value="" /><img data-type="invalid" style="z-index: 2; margin-top: 1px; margin-left: -16px; vertical-align: top; display: none;" src="images/error_b.svg" alt="invalid" /></span>
  354. </td>
  355. <td colspan="2" onmouseover="if(globalSettings.urihandlerurl.value!=null && $(this).find('input[data-type=value]').prop('readonly') && $(this).find('input[data-type=value]').val()!='' && $(this).find('input[type=image]').css('visibility')=='hidden') $(this).find('input[type=image]').css('visibility','')" onmouseout="$(this).find('input[type=image]').css('visibility','hidden');">
  356. <input data-type="value" type="text" class="fs" placeholder="URL" value="" /><input data-type="value_handler" style="position: inline; margin-left: -17px; visibility: hidden; vertical-align: top;" type="image" src="images/arrow.svg" alt=">" onclick="if(globalSettings.urihandlerurl.value!=null){var value=$(this).parent().find('input[data-type=value]').val(); if(value.match(RegExp('^[a-z0-9]+:','i'))==null) value=globalSettings.urihandlerurl.value+value; window.open(value); $(this).css('visibility','hidden');}" /><img data-type="invalid" style="position: inline; margin-top: 1px; margin-left: -20px; display: none; vertical-align: top;" src="images/error_b.svg" alt="invalid" />
  357. </td>
  358. </tr>
  359. <tr data-attr-name="X-ABRELATEDNAMES">
  360. <td data-type="related_txt" colspan="5" class="attr_desc">Related</td>
  361. </tr>
  362. <tr data-attr-name="X-ABRELATEDNAMES" data-type="%person" data-id="0">
  363. <td data-type="%del"><input class="op" type="image" src="images/op_del.svg" alt="-" /></td>
  364. <td data-type="%add"><input class="op" type="image" src="images/op_add.svg" alt="+" /></td>
  365. <td data-size="small">
  366. <select data-type="person_type" onchange="if($(':selected', this).attr('data-type')==':custom') {$(this).parent().find('span[data-type=custom_span]').css('display','inline'); $(this).parent().find('[data-type=custom_value]').focus().trigger('change')} else $(this).parent().find('span[data-type=custom_span]').css('display','none');">
  367. <option data-type=":_$!<manager>!$_:">manager</option>
  368. <option data-type=":_$!<assistant>!$_:">assistant</option>
  369. <option data-type=":_$!<father>!$_:">father</option>
  370. <option data-type=":_$!<mother>!$_:">mother</option>
  371. <option data-type=":_$!<parent>!$_:">parent</option>
  372. <option data-type=":_$!<brother>!$_:">brother</option>
  373. <option data-type=":_$!<sister>!$_:">sister</option>
  374. <option data-type=":_$!<child>!$_:">child</option>
  375. <option data-type=":_$!<friend>!$_:">friend</option>
  376. <option data-type=":_$!<spouse>!$_:">spouse</option>
  377. <option data-type=":_$!<partner>!$_:">partner</option>
  378. <option data-type=":_$!<other>!$_:">other</option>
  379. <option data-type=":custom">» custom</option>
  380. </select><span data-type="custom_span" style="position: relative; margin-left: -134px; margin-top: 0px; vertical-align: top; display: none; z-index: 1;"><input data-type="custom_value" type="text" class="ss" placeholder="custom" value="" /><img data-type="invalid" style="z-index: 2; margin-top: 1px; margin-left: -16px; vertical-align: top; display: none;" src="images/error_b.svg" alt="invalid" /></span>
  381. </td>
  382. <td colspan="2"><input data-type="value" type="text" class="fs" placeholder="Name" value="" /></td>
  383. </tr>
  384. <tr data-attr-name="IMPP">
  385. <td data-type="im_txt" colspan="5" class="attr_desc">IM</td>
  386. </tr>
  387. <tr data-attr-name="IMPP" data-type="%im" data-id="0">
  388. <td data-type="%del"><input class="op" type="image" src="images/op_del.svg" alt="-" /></td>
  389. <td data-type="%add"><input class="op" type="image" src="images/op_add.svg" alt="+" /></td>
  390. <td data-size="small">
  391. <select data-type="im_type" onchange="if($(':selected', this).attr('data-type')==':custom') {$(this).parent().find('span[data-type=custom_span]').css('display','inline'); $(this).parent().find('[data-type=custom_value]').focus().trigger('change')} else $(this).parent().find('span[data-type=custom_span]').css('display','none');">
  392. <option data-type="work">work</option>
  393. <option data-type="home">home</option>
  394. <option data-type=":mobileme:">mobileMe</option>
  395. <option data-type=":_$!<other>!$_:">other</option>
  396. <option data-type=":custom">» custom</option>
  397. </select><span data-type="custom_span" style="position: relative; margin-left: -134px; margin-top: 0px; vertical-align: top; display: none; z-index: 1;"><input data-type="custom_value" type="text" class="ss" placeholder="custom" value="" /><img data-type="invalid" style="z-index: 2; margin-top: 1px; margin-left: -16px; vertical-align: top; display: none;" src="images/error_b.svg" alt="invalid" /></span>
  398. </td>
  399. <td><input data-type="value" type="text" class="ms" placeholder="UserID" value="" /></td>
  400. <td data-size="small" style="width: 139px; /* FF hack */">
  401. <select data-type="im_service_type" onchange="if($(':selected', this).attr('data-type')==':custom') {$(this).parent().find('span[data-type=custom_span]').css('display','inline'); $(this).parent().find('[data-type=custom_value]').focus().trigger('change')} else $(this).parent().find('span[data-type=custom_span]').css('display','none');">
  402. <option data-type="aim">AIM</option>
  403. <option data-type="icq">ICQ</option>
  404. <option data-type="irc">IRC</option>
  405. <option data-type="jabber">Jabber</option>
  406. <option data-type="msn">MSN</option>
  407. <option data-type="yahoo">Yahoo</option>
  408. <option data-type="facebook">Facebook</option>
  409. <option data-type="gadugadu">GaduGadu</option>
  410. <option data-type="googletalk">GoogleTalk</option>
  411. <option data-type="qq">QQ</option>
  412. <option data-type="skype">Skype</option>
  413. <option data-type=":custom">» custom</option>
  414. </select><span data-type="custom_span" style="position: relative; margin-left: -134px; margin-top: 0px; vertical-align: top; display: none; z-index: 1;"><input data-type="custom_value" type="text" class="ss" placeholder="custom" value="" /><img data-type="invalid" style="z-index: 2; margin-top: 1px; margin-left: -16px; vertical-align: top; display: none;" src="images/error_b.svg" alt="invalid" /></span>
  415. </td>
  416. </tr>
  417. <tr data-attr-name="X-SOCIALPROFILE">
  418. <td data-type="profile_txt" colspan="5" class="attr_desc">Profile</td>
  419. </tr>
  420. <tr data-attr-name="X-SOCIALPROFILE" data-type="%profile" data-id="0">
  421. <td data-type="%del"><input class="op" type="image" src="images/op_del.svg" alt="-" /></td>
  422. <td data-type="%add"><input class="op" type="image" src="images/op_add.svg" alt="+" /></td>
  423. <td data-size="small">
  424. <select data-type="profile_type" onchange="if($(':selected', this).attr('data-type')==':custom') {$(this).parent().find('span[data-type=custom_span]').css('display','inline'); $(this).parent().find('[data-type=custom_value]').focus().trigger('change')} else $(this).parent().find('span[data-type=custom_span]').css('display','none');">
  425. <option data-type="twitter">twitter</option>
  426. <option data-type="facebook">facebook</option>
  427. <option data-type="flickr">flickr</option>
  428. <option data-type="linkedin">linkedin</option>
  429. <option data-type="myspace">myspace</option>
  430. <option data-type="sinaweibo">sina weibo</option>
  431. <option data-type=":custom">» custom</option>
  432. </select><span data-type="custom_span" style="position: relative; margin-left: -134px; margin-top: 0px; vertical-align: top; display: none; z-index: 1;"><input data-type="custom_value" type="text" class="ss" placeholder="custom" value="" /><img data-type="invalid" style="z-index: 2; margin-top: 1px; margin-left: -16px; vertical-align: top; display: none;" src="images/error_b.svg" alt="invalid" /></span>
  433. </td>
  434. <td colspan="2" onmouseover="if(globalSettings.urihandlerprofile.value[$(this).parent().find('[data-type=profile_type] option').filter(':selected').attr('data-type')]!=undefined && globalSettings.urihandlerprofile.value[$(this).parent().find('[data-type=profile_type] option').filter(':selected').attr('data-type')]!=null && $(this).find('input[data-type=value]').prop('readonly') && $(this).find('input[type=image]').css('visibility')=='hidden') $(this).find('input[type=image]').css('visibility','')" onmouseout="$(this).find('input[type=image]').css('visibility','hidden');">
  435. <input data-type="value" type="text" class="fs" placeholder="UserName" value="" /><input data-type="value_handler" style="position: inline; margin-left: -17px; visibility: hidden; vertical-align: top;" type="image" src="images/arrow.svg" alt=">" onclick="if(globalSettings.urihandlerprofile.value[$(this).parent().parent().find('[data-type=profile_type] option').filter(':selected').attr('data-type')]!=undefined && globalSettings.urihandlerprofile.value[$(this).parent().parent().find('[data-type=profile_type] option').filter(':selected').attr('data-type')]!=null)
  436. {var type=$(this).parent().parent().find('[data-type=profile_type] option').filter(':selected').attr('data-type'), value=$(this).parent().find('input[data-type=value]').val(); if(type=='twitter') value=value.replace(/^@/,''); window.open(globalSettings.urihandlerprofile.value[type].replace('%u', value)); $(this).css('visibility','hidden');}" />
  437. </td>
  438. </tr>
  439. <tr data-attr-name="X-ABDATE">
  440. <td data-type="dates_txt" colspan="5" class="attr_desc">Dates</td>
  441. </tr>
  442. <tr data-attr-name="X-ABDATE" data-type="%date" data-id="0">
  443. <td data-type="%del"><input class="op" type="image" src="images/op_del.svg" alt="-" /></td>
  444. <td data-type="%add"><input class="op" type="image" src="images/op_add.svg" alt="+" /></td>
  445. <td data-size="small">
  446. <select data-type="date_type" onchange="if($(':selected', this).attr('data-type')==':custom') {$(this).parent().find('span[data-type=custom_span]').css('display','inline'); $(this).parent().find('[data-type=custom_value]').focus().trigger('change')} else $(this).parent().find('span[data-type=custom_span]').css('display','none');">
  447. <option data-type=":_$!<anniversary>!$_:">anniversary</option>
  448. <option data-type=":_$!<other>!$_:">other</option>
  449. <option data-type=":custom">» custom</option>
  450. </select><span data-type="custom_span" style="position: relative; margin-left: -134px; margin-top: 0px; vertical-align: top; display: none; z-index: 1;"><input data-type="custom_value" type="text" class="ss" placeholder="custom" value="" /><img data-type="invalid" style="z-index: 2; margin-top: 1px; margin-left: -16px; vertical-align: top; display: none;" src="images/error_b.svg" alt="invalid" /></span>
  451. </td>
  452. <td colspan="2"><input data-type="date_value" type="text" class="fs" placeholder="Name" value="" /><img data-type="invalid" style="position: inline; margin-top: 1px; margin-left: -20px; display: none; vertical-align: top;" src="images/error_b.svg" alt="invalid" /></td>
  453. </tr>
  454. <tr data-attr-name="ADR">
  455. <td data-type="address_txt" colspan="5" class="attr_desc">Address</td>
  456. </tr>
  457. <tr data-attr-name="ADR" data-type="%address" data-id="0">
  458. <td data-type="%del"><input class="op" type="image" src="images/op_del.svg" alt="-" /></td>
  459. <td data-type="%add"><input class="op" type="image" src="images/op_add.svg" alt="+" /></td>
  460. <td data-size="small">
  461. <select data-type="address_type" onchange="if($(':selected', this).attr('data-type')==':custom') {$(this).parent().find('span[data-type=custom_span]').css('display','inline'); $(this).parent().find('[data-type=custom_value]').focus().trigger('change')} else $(this).parent().find('span[data-type=custom_span]').css('display','none');">
  462. <option data-type="work">work</option>
  463. <option data-type="home">home</option>
  464. <option data-type=":_$!<other>!$_:">other</option>
  465. <option data-type=":custom">» custom</option>
  466. </select><span data-type="custom_span" style="position: relative; margin-left: -134px; margin-top: 0px; vertical-align: top; display: none; z-index: 1;"><input data-type="custom_value" type="text" class="ss" placeholder="custom" value="" /><img data-type="invalid" style="z-index: 2; margin-top: 1px; margin-left: -16px; vertical-align: top; display: none;" src="images/error_b.svg" alt="invalid" /></span>
  467. </td>
  468. <td colspan="2" class="clean">
  469. <table>
  470. <tr data-type="container">
  471. <td data-addr-fid="0" colspan="2">
  472. <input data-type="value" data-addr-field="" type="text" class="fs" placeholder="" value="" /><img data-type="invalid" style="position: inline; margin-top: 1px; margin-left: -20px; display: none; vertical-align: top;" src="images/error_b.svg" alt="invalid" />
  473. </td>
  474. </tr>
  475. <tr data-type="container">
  476. <td data-addr-fid="1" colspan="2" data-size="full">
  477. </td>
  478. </tr>
  479. <tr data-type="container">
  480. <td data-addr-fid="2" colspan="2">
  481. <input data-type="value" data-addr-field="" type="text" class="fs" placeholder="" value="" /><img data-type="invalid" style="position: inline; margin-top: 1px; margin-left: -20px; display: none; vertical-align: top;" src="images/error_b.svg" alt="invalid" />
  482. </td>
  483. </tr>
  484. <tr data-type="container">
  485. <td data-addr-fid="3" colspan="2">
  486. <input data-type="value" data-addr-field="" type="text" class="fs" placeholder="" value="" /><img data-type="invalid" style="position: inline; margin-top: 1px; margin-left: -20px; display: none; vertical-align: top;" src="images/error_b.svg" alt="invalid" />
  487. </td>
  488. </tr>
  489. <tr data-type="container">
  490. <td data-addr-fid="4" colspan="2">
  491. <input data-type="value" data-addr-field="" type="text" class="fs" placeholder="" value="" /><img data-type="invalid" style="position: inline; margin-top: 1px; margin-left: -20px; display: none; vertical-align: top;" src="images/error_b.svg" alt="invalid" />
  492. </td>
  493. </tr>
  494. <tr data-type="container">
  495. <td data-addr-fid="5">
  496. <input data-type="value" data-addr-field="" type="text" class="hs" placeholder="" value="" /><img data-type="invalid" style="position: inline; margin-top: 1px; margin-left: -20px; display: none; vertical-align: top;" src="images/error_b.svg" alt="invalid" />
  497. </td>
  498. <td data-addr-fid="6" style="width:195px;">
  499. <input data-type="value" data-addr-field="" type="text" class="hs" placeholder="" value="" /><img data-type="invalid" style="position: inline; margin-top: 1px; margin-left: -20px; display: none; vertical-align: top;" src="images/error_b.svg" alt="invalid" />
  500. </td>
  501. </tr>
  502. <tr data-type="container">
  503. <td data-addr-fid="7">
  504. <input data-type="value" data-addr-field="" type="text" class="hs" placeholder="" value="" /><img data-type="invalid" style="position: inline; margin-top: 1px; margin-left: -20px; display: none; vertical-align: top;" src="images/error_b.svg" alt="invalid" />
  505. </td>
  506. <td data-addr-fid="8" data-size="half">
  507. </td>
  508. </tr>
  509. <tr data-type="container">
  510. <td data-addr-fid="9" colspan="2">
  511. <input data-type="value" data-addr-field="" type="text" class="fs" placeholder="" value="" /><img data-type="invalid" style="position: inline; margin-top: 1px; margin-left: -20px; display: none; vertical-align: top;" src="images/error_b.svg" alt="invalid" />
  512. </td>
  513. </tr>
  514. <tr data-type="container">
  515. <td data-addr-fid="10" colspan="2">
  516. <input data-type="value" data-addr-field="" type="text" class="fs" placeholder="" value="" /><img data-type="invalid" style="position: inline; margin-top: 1px; margin-left: -20px; display: none; vertical-align: top;" src="images/error_b.svg" alt="invalid" />
  517. </td>
  518. </tr>
  519. <tr data-type="container">
  520. <td data-addr-fid="11" colspan="2" data-size="full">
  521. <span data-type="%country_container">
  522. <select data-addr-field="country" data-type="country_type">
  523. <option data-type="" data-full-name=""> </option>
  524. </select>
  525. </span>
  526. </td>
  527. </tr>
  528. <tr data-type="container">
  529. <td data-addr-fid="12" colspan="2">
  530. <input data-type="value" data-addr-field="" type="text" class="fs" placeholder="" value="" /><img data-type="invalid" style="position: inline; margin-top: 1px; margin-left: -20px; display: none; vertical-align: top;" src="images/error_b.svg" alt="invalid" />
  531. </td>
  532. </tr>
  533. </table>
  534. </td>
  535. </tr>
  536. <tr data-attr-name="CATEGORIES">
  537. <td data-type="categories_txt" colspan="5" class="attr_desc">Categories</td>
  538. </tr>
  539. <tr data-attr-name="CATEGORIES" data-type="%categories" data-id="0">
  540. <td></td>
  541. <td></td>
  542. <td colspan="3">
  543. <input data-type="value" class="fs" name="tags" id="tags" value="" />
  544. </td>
  545. </tr>
  546. <tr data-attr-name="NOTE">
  547. <td data-type="note_txt" colspan="5" class="attr_desc">Note</td>
  548. </tr>
  549. <tr data-attr-name="NOTE" data-type="%note" data-id="0">
  550. <td></td>
  551. <td></td>
  552. <td colspan="3">
  553. <textarea data-type="value" class="ms" placeholder="NoteText"></textarea>
  554. </td>
  555. </tr>
  556. <tr>
  557. <td colspan="5" class="buttons">
  558. <input data-type="add_contact" type="button" value="Add Contact" onclick="
  559. $('#ResourceCardDAVListOverlay').fadeTo(globalEditorFadeAnimation, 0.6);
  560. $('#ABListOverlay').fadeTo(globalEditorFadeAnimation, 0.6);
  561. var tmp_account_uid=$('#vCardEditor').attr('data-account-uid');
  562. var tmp_data_url=$('#vCardEditor').attr('data-url').replace(new RegExp('[^/]+$'), '');
  563. var tmp_data_id=$('#vCardEditor').find('[data-type=cancel]').attr('data-id');
  564. var tmp_background_color=$('#ABContactColor').css('background-color');
  565. globalRefABListTable.find('.ablist_item.ablist_item_selected').removeClass('ablist_item_selected');
  566. $('#ABContactColor').css('background-color', tmp_background_color);
  567. globalAddressbookList.loadContactByVcard('BEGIN:VCARD\r\nVERSION:3.0\r\nORG:'+vcardEscapeValue($('#vCardEditor').find('[data-type=org]').val())+';'+vcardEscapeValue($('#vCardEditor').find('[data-type=department]').val())+'\r\nFN:\r\nN:;;;;\r\nEND:VCARD\r\n', tmp_background_color, false, 'add');
  568. $('#vCardEditor').attr('data-editor-state','edit');
  569. $('#vCardEditor').attr('data-account-uid', tmp_account_uid);
  570. $('#vCardEditor').attr('data-url', tmp_data_url);
  571. $('#vCardEditor').find('[data-type=cancel]').attr('data-id', tmp_data_id);
  572. $('#vCardEditor').find('[data-type=given]').focus();
  573. $('#ABContact').scrollTop(0);
  574. checkContactFormScrollBar();
  575. " />
  576. <input data-type="edit" type="button" value="Edit" onclick="
  577. // OK ale treba optimalizovat selectory
  578. $('#ResourceCardDAVListOverlay').fadeTo(globalEditorFadeAnimation, 0.6);
  579. $('#ABListOverlay').fadeTo(globalEditorFadeAnimation, 0.6);
  580. processEditorElements($('#vCardEditor'), 'show', null, $('#vCardEditor').find('[data-type=isorg]').prop('checked'));
  581. $('#vCardEditor').find('[data-disabled]').prop('disabled',true);
  582. $('#vCardEditor').find('[data-type=given]').focus();
  583. $('#ABContact').scrollTop(0);
  584. checkContactFormScrollBar();
  585. " />
  586. <input data-type="save" type="button" value="Save" onclick="
  587. if($('#vCardEditor').find('img[data-type=invalid]').is(':visible'))
  588. {
  589. show_editor_message('in', 'message_error', localization[globalInterfaceLanguage].errUnableSaveInvalidData, globalHideInfoMessageAfter);
  590. return false;
  591. }
  592. else
  593. {
  594. $('#ResourceCardDAVListOverlay').fadeTo(globalEditorFadeAnimation, 0.6);
  595. $('#ABListOverlay').fadeTo(globalEditorFadeAnimation,0.6);
  596. globalRefAddContact.prop('disabled',true);
  597. $('#ABContactOverlay').fadeTo(globalEditorFadeAnimation,1,function(){
  598. dataToVcard($('#vCardEditor').attr('data-account-uid'), $('#vCardEditor').attr('data-url'), globalRefAddContact.attr('data-filter-url'), $('#vCardEditor').attr('data-etag'))
  599. })
  600. }
  601. " />
  602. <input data-type="cancel" type="button" value="Cancel" data-id="" onclick="
  603. $('#ResourceCardDAVListOverlay').fadeOut(globalEditorFadeAnimation);
  604. $('#ABListOverlay').fadeOut(globalEditorFadeAnimation);
  605. globalAddressbookList.loadContactByUID(this.getAttribute('data-id'));
  606. " />
  607. <input data-type="delete_from_group" type="button" value="Delete from Group" onclick="
  608. $('#ResourceCardDAVListOverlay').fadeTo(globalEditorFadeAnimation,0.6); $('#ABListOverlay').fadeTo(globalEditorFadeAnimation,0.6); globalRefAddContact.prop('disabled',true); $('#ABContactOverlay').fadeTo(globalEditorFadeAnimation,1,function(){
  609. lockAndPerformToCollection({accountUID: $('#vCardEditor').attr('data-account-uid'), uid: $('#vCardEditor').attr('data-url')}, globalRefAddContact.attr('data-filter-url'), 'DELETE_FROM_GROUP');
  610. });
  611. " />
  612. <input data-type="delete" type="button" value="Delete" onclick="
  613. $('#ResourceCardDAVListOverlay').fadeTo(globalEditorFadeAnimation,0.6); $('#ABListOverlay').fadeTo(globalEditorFadeAnimation,0.6); globalRefAddContact.prop('disabled',true); $('#ABContactOverlay').fadeTo(globalEditorFadeAnimation,1,function(){
  614. lockAndPerformToCollection({accountUID: $('#vCardEditor').attr('data-account-uid'), uid: $('#vCardEditor').attr('data-url')}, globalRefAddContact.attr('data-filter-url'), 'DELETE');
  615. });
  616. " />
  617. </td>
  618. </tr>
  619. </table>
  620. </div>
  621. </div>
  622. </div>
  623. <div id="ABContactOverlay">
  624. <div class="half">
  625. <div class="loader"></div>
  626. </div>
  627. </div>
  628. </div>
  629. </body>
  630. </html>