Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Файл - privacy.js (Старый размер - 40185 | Новый - 0):
- 0. - var Privacy = {
- 1. - flistBox: function (box, friendsData, selectedFriends, rowTemplate, saveLang, hash) {
- 2. - cur.flistTpl = rowTemplate;
- 3. - if (selectedFriends.length === 0) selectedFriends = {};
- 4. -
- 5. - cur.flistList = cur.flistFriends = friendsData;
- 6. - cur.flistSelected = selectedFriends;
- 7. -
- 8. - cur.flistIndex = new vkIndexer(friendsData, function(obj) {
- 9. - return obj[1]+' '+obj[4];
- 10. - });
- 11. -
- 12. - box.removeButtons();
- 13. -
- 14. - if (cur.flistTooltip) {
- 15. - if (cur.flistTooltipRight) {
- 16. - var hintLeft = '<td class="priv_h_arrow_td" style="vertical-align: top;"><div class="priv_h_arrow" style="margin-top: 50px;"><img src="/images/ddtooltip'+(window.devicePixelRatio >= 2 ? '_2x' : '')+'.png" width="16" height="11" class="priv_h_arrow_img png" /></div></td>';
- 17. - var hintRight = '';
- 18. - } else {
- 19. - var hintRight = '<td class="priv_h_arrow_td" style="vertical-align: top;"><div class="priv_h_arrow_l" style="margin-top: 50px;"><img src="/images/ddtooltip'+(window.devicePixelRatio >= 2 ? '_2x' : '')+'.png" width="16" height="11" class="priv_h_arrow_img png" /></div></td>';
- 20. - var hintLeft = '';
- 21. - }
- 22. -
- 23. -
- 24. - var ttHelper = ge('flist_helper');
- 25. - ttHelper.appendChild(ce('div', {
- 26. - innerHTML: '<table cellspacing="0" cellpadding="0">\
- 27. - <tr class="priv_h_top_sh">\
- 28. - <td></td>\
- 29. - <td colspan="5"><div class="priv_h_bottom2"></div></td>\
- 30. - </tr>\
- 31. - <tr class="priv_h_top_sh">\
- 32. - <td></td>\
- 33. - <td class="priv_h_side_td2"><div class="priv_h_side"></div></td>\
- 34. - <td colspan="3"><div class="priv_h_bottom"></div></td>\
- 35. - <td class="priv_h_side_td2"><div class="priv_h_side"></div></td>\
- 36. - </tr>\
- 37. - <tr>\
- 38. - '+hintLeft+'\
- 39. - <td class="priv_h_side_td2"><div class="priv_h_side"></div></td>\
- 40. - <td class="priv_h_side_td"><div class="priv_h_side"></div></td>\
- 41. - <td><div class="priv_h_rows flist_info_text" style="width: 179px;">'+cur.flistTooltip+'</div></td>\
- 42. - <td class="priv_h_side_td"><div class="priv_h_side"></div></td>\
- 43. - <td class="priv_h_side_td2"><div class="priv_h_side"></div></td>\
- 44. - '+hintRight+'\
- 45. - </tr>\
- 46. - <tr class="priv_h_bottom_sh">\
- 47. - <td></td>\
- 48. - <td class="priv_h_side_td2"><div class="priv_h_side"></div></td>\
- 49. - <td colspan="3"><div class="priv_h_bottom"></div></td>\
- 50. - <td class="priv_h_side_td2"><div class="priv_h_side"></div></td>\
- 51. - </tr>\
- 52. - <tr class="priv_h_bottom_sh">\
- 53. - <td></td>\
- 54. - <td colspan="5"><div class="priv_h_bottom2"></div></td>\
- 55. - </tr>\
- 56. - </table>'
- 57. - }));
- 58. - if (cur.flistTooltipRight) {
- 59. - ttHelper.style.marginLeft = '510px';
- 60. - animate(ttHelper, {opacity: 1, marginLeft: 538}, 200);
- 61. - } else {
- 62. - animate(ttHelper, {opacity: 1, marginLeft: -228}, 200);
- 63. - }
- 64. - } else {
- 65. - box.addButton(getLang('global_cancel'), function () {
- 66. - box.hide();
- 67. - }, 'no');
- 68. - }
- 69. - box.addButton(saveLang || getLang('global_save'), function () {
- 70. - var listName = ge('flist_list_name');
- 71. - var listStr = false;
- 72. - if (isVisible(listName)) {
- 73. - listStr = listName.value;
- 74. - if (!listStr) {
- 75. - return notaBene(listName);
- 76. - }
- 77. - placeholderSetup(listName, {back: true});
- 78. - elfocus(listName, 0, listName.value.length);
- 79. - }
- 80. - var list = {}, ids = [];
- 81. - each (friendsData, function () {
- 82. - if (cur.flistSelected[this[0]]) {
- 83. - list[this[0]] = this;
- 84. - ids.push(this[0]);
- 85. - }
- 86. - });
- 87. - if (cur.flistFriendsPrivacy) {
- 88. - ajax.post('al_settings.php', {act: 'hide_friends', hash: hash, ids: ids.join(',')}, {
- 89. - onDone: function(control, rules) {
- 90. - showDoneBox(cur.flistFriendsPrivacyText);
- 91. - box.hide();
- 92. - },
- 93. - showProgress: box.showProgress,
- 94. - hiderogress: box.hideProgress
- 95. - });
- 96. - showDoneBox(cur.flistFriendsPrivacyText, {out: 4000});
- 97. - if (cur.flistNavReload) setTimeout(function() {nav.reload();}, 2000);
- 98. - return;
- 99. - }
- 100. -
- 101. - if (cur.onFlistSave) {
- 102. - cur.onFlistSave(ids, list, hash, listStr);
- 103. - }
- 104. -
- 105. - if (!box.leaveOnSave) {
- 106. - box.hide();
- 107. - }
- 108. - });
- 109. -
- 110. - var rInner = ge('flist_right_inner');
- 111. - var rCol = ge('flist_right_col');
- 112. - var rHeight = getSize(rInner)[1];
- 113. - var rColHeight = getSize(rCol)[1];
- 114. - cur.flistScrollbar = new Scrollbar('flist_scroll_wrap', {
- 115. - nomargin: true,
- 116. - right: vk.rtl ? 'auto' : 0,
- 117. - left: !vk.rtl ? 'auto' : 0,
- 118. - more: Privacy.flistMore,
- 119. - onScroll: function(delta) {
- 120. - rCol.scrollTop -= delta;
- 121. - },
- 122. - wheelObj: ge('flist_cont')
- 123. - });
- 124. -
- 125. - cur.flistAllCont = ge('flist_all_list');
- 126. - cur.flistSelCont = ge('flist_sel_list');
- 127. - cur.flistSearchEl = ge('flist_search');
- 128. -
- 129. - if (cur.flistLimit && cur.flistSelectedCnt >= (cur.flistLimit - 1)) {
- 130. - Privacy.flistFull();
- 131. - }
- 132. -
- 133. - if (cur.flistCountStr && cur.flistSelectedCnt > 0) {
- 134. - ge('flist_sel_summary').innerHTML = langNumeric(cur.flistSelectedCnt, cur.flistCountStr);
- 135. - }
- 136. -
- 137. -
- 138. - return false;
- 139. - },
- 140. - flistMore: function() {
- 141. - var lim = cur.flistShown + 60;
- 142. - while(cur.flistShown < lim && Privacy.flistShowOne(cur.flistList[cur.flistShown + 1])) {
- 143. - ++cur.flistShown;
- 144. - }
- 145. - setTimeout(function() {
- 146. - cur.flistScrollbar.update();
- 147. - }, 10);
- 148. - },
- 149. - flistShowOne: function(u, ins) {
- 150. - if (!u) return false;
- 151. - if (ge('flist_sel_cell' + u[0])) {
- 152. - return true;
- 153. - }
- 154. - if (ge('flist_cell' + u[0])) {
- 155. - show(ge('flist_cell' + u[0]));
- 156. - return true;
- 157. - }
- 158. - var uname = u[1];
- 159. - if (cur.flistSelection) {
- 160. - uname = uname.replace(cur.flistSelection.re, cur.flistSelection.val);
- 161. - }
- 162. - var row = ce('div', {id: 'flist_cell' + u[0], innerHTML: cur.flistTpl.replace('%id%', u[0]).replace('%name%', uname).replace('%photo%', u[2])});
- 163. - if (ins) {
- 164. - cur.flistAllCont.insertBefore(row, cur.flistAllCont.firstChild);
- 165. - } else {
- 166. - cur.flistAllCont.appendChild(row);
- 167. - }
- 168. - return true;
- 169. - },
- 170. - flistSelect: function(id, obj, event) {
- 171. - var el = ge('flist_cell'+id);
- 172. - var cont = obj.parentNode;
- 173. - if (cont.id.slice(0, 9) == 'flist_sel') {
- 174. - re(cont);
- 175. - if (el) {
- 176. - show(el);
- 177. - } else {
- 178. - for (var i in cur.flistList) {
- 179. - if (cur.flistList[i][0] == id) {
- 180. - Privacy.flistShowOne(cur.flistList[i], true);
- 181. - break;
- 182. - }
- 183. - }
- 184. - }
- 185. - cur.flistSelectedCnt--;
- 186. - if (cur.flistSelectedCnt == 0) {
- 187. - show('flist_info');
- 188. - }
- 189. - if (cur.flistLimit && cur.flistSelectedCnt == (cur.flistLimit - 1)) {
- 190. - removeClass(cur.flistAllCont, 'flist_full');
- 191. - }
- 192. - curBox().changed = true;
- 193. - delete cur.flistSelected[id];
- 194. - } else {
- 195. - if (cur.flistLimit && cur.flistSelectedCnt >= cur.flistLimit) {
- 196. - Privacy.flistFull(event || window.event);
- 197. - return false;
- 198. - }
- 199. - var html = val(el);
- 200. - hide(el);
- 201. - cur.flistSelCont.insertBefore(ce('div', {
- 202. - id: 'flist_sel_cell'+id,
- 203. - innerHTML: html
- 204. - }), cur.flistSelCont.firstChild);
- 205. - if (Privacy.flistShowOne(cur.flistList[cur.flistShown + 1])) {
- 206. - ++cur.flistShown;
- 207. - }
- 208. - if (cur.flistSelectedCnt == 0) {
- 209. - hide('flist_info');
- 210. - }
- 211. - cur.flistSelectedCnt++;
- 212. - if (cur.flistLimit && cur.flistSelectedCnt >= cur.flistLimit) {
- 213. - Privacy.flistFull(event || window.event);
- 214. - }
- 215. - cur.flistSelected[id] = true;
- 216. - if (cur.flistSearchStr) {
- 217. - Privacy.flistSearch(false);
- 218. - }
- 219. - }
- 220. - if (cur.flistCountStr) {
- 221. - val('flist_sel_summary', cur.flistSelectedCnt > 0 ? langNumeric(cur.flistSelectedCnt, cur.flistCountStr) : cur.flistNoSelStr);
- 222. - }
- 223. - cur.flistScrollbar.update();
- 224. - return false;
- 225. - },
- 226. - flistFull: function(tooltipEvent) {
- 227. - if (tooltipEvent) {
- 228. - var tt = showTooltip(bodyNode, {
- 229. - text: cur.limitTooltip,
- 230. - className: 'flist_max_size_tt',
- 231. - slideX: -15,
- 232. - shift: [-tooltipEvent.pageX - 5, -tooltipEvent.pageY - 5, 300],
- 233. - nohide: 1,
- 234. - hasover: 1,
- 235. - toup: 1
- 236. - });
- 237. - setTimeout(function() {
- 238. - tooltips.hide(bodyNode);
- 239. - }, 2000);
- 240. - }
- 241. - addClass(cur.flistAllCont, 'flist_full');
- 242. - },
- 243. - flistSearch: function(obj, event) {
- 244. - if (event && event.keyCode < 41 && event.keyCode > 15) {
- 245. - if (event.keyCode == 27) {
- 246. - if (obj.value) {
- 247. - cancelEvent(event);
- 248. - }
- 249. - obj = false;
- 250. - } else {
- 251. - return;
- 252. - }
- 253. - }
- 254. - setTimeout(function() {
- 255. - var str = obj ? obj.value : '';
- 256. - cur.flistSearchStr = str;
- 257. - if (str) {
- 258. - cur.flistList = cur.flistIndex.search(str);
- 259. - cur.flistSelection = {
- 260. - re: new RegExp('('+str.replace(cur.flistIndex.delimiter, '|').replace(/[\/\\\(\)\[\]\{\}\*,]/g, '').replace(/^\||\|$/g, '')+')', 'gi'),
- 261. - val: '<em>$1</em>'
- 262. - };
- 263. - show('flist_search_reset');
- 264. - cur.flistScrollbar.scrollTop(0);
- 265. - } else {
- 266. - cur.flistList = cur.flistFriends;
- 267. - cur.flistSelection = false;
- 268. - hide('flist_search_reset');
- 269. - val(cur.flistSearchEl, '');
- 270. - }
- 271. -
- 272. - if (cur.flistList.length) {
- 273. - cur.flistAllCont.innerHTML = '';
- 274. - cur.flistShown = -1;
- 275. - Privacy.flistMore();
- 276. - } else {
- 277. -
- 278. - }
- 279. - }, 0);
- 280. - },
- 281. - hideFriends: function(key, obj) {
- 282. - var checked = cur.privacy[key][2];
- 283. - showBox('al_friends.php', {act: 'select_friends_box', from: 'friends_privacy', Checked: checked.join(',')}, {stat: ['privacy.js', 'privacy.css', 'indexer.js']});
- 284. - cur.onFlistSave = function(ids, list, hash) {
- 285. - ajax.post('al_settings.php', {act: 'hide_friends', hash: hash, ids: ids.join(',')}, {
- 286. - onDone: function(control, rules) {
- 287. - ge('privacy_'+key+'_hide').innerHTML = control;
- 288. - cur.privacy[key] = rules;
- 289. - if (cur.onPrivacyChanged) cur.onPrivacyChanged(key);
- 290. - }
- 291. - });
- 292. - }
- 293. - },
- 294. -
- 295. - customType: 4,
- 296. - someType: 5,
- 297. - listsType: 6,
- 298. - update: function(key) {
- 299. - var el = ge('privacy_edit_' + key), p = cur.privacy[key], v = p[0];
- 300. - var types = cur.privacy[key + '_types'] || cur.privacy._types;
- 301. - var lists = cur.privacy[key + '_lists'] || cur.privacy._lists || {};
- 302. -
- 303. - if (el) {
- 304. - ge('privacy_header').innerHTML = el.innerHTML = types[v];
- 305. - if (el.nextSibling) {
- 306. - if (v == Privacy.listsType) {
- 307. - var str = [];
- 308. - for (var i in p[2]) {
- 309. - var cat_id = -p[2][i], color = (cat_id - 1) % 8 + 1;
- 310. - str.push('<span class="group' + color + '">' + lists[cat_id] + '</span>');
- 311. - }
- 312. - el.nextSibling.innerHTML = (str.length ? ': ' : '') + str.join(', ');
- 313. - } else {
- 314. - el.nextSibling.innerHTML = '';
- 315. - }
- 316. - }
- 317. - }
- 318. -
- 319. - if (cur.onPrivacyChanged) cur.onPrivacyChanged(key);
- 320. - },
- 321. - someSaved: function(key, ids, list, plain) {
- 322. - cur.privacy[key] = [Privacy.someType, 0, ids, []];
- 323. -
- 324. - var count = ids.length, str = [];
- 325. - for (var i = 0; i < count && i < 5; ++i) {
- 326. - var id = ids[i], mem = plain ? list[i] : list[id], shortname = mem[4].replace(/'/g, '');
- 327. - str.push('<a href="/' + (shortname ? shortname : ('id' + id)) + '" onclick="return nav.go(this, event)">' + mem[1] + '</a>');
- 328. - }
- 329. - str = str.join(', ');
- 330. - if (count > 5) {
- 331. - str += ' ' + getLang('privacy_N_friends_some', count - 5);
- 332. - }
- 333. -
- 334. - var el = ge('privacy_edit_' + key);
- 335. - var types = cur.privacy[key + '_types'] || cur.privacy._types;
- 336. - el.innerHTML = types[Privacy.someType];
- 337. - el.nextSibling.innerHTML = ': ' + str;
- 338. -
- 339. - if (cur.onPrivacyChanged) cur.onPrivacyChanged(key);
- 340. - },
- 341. - customSaved: function(key, np, plus, minus) {
- 342. - cur.privacy[key] = np;
- 343. - if (np[1] == 1 && !np[3].length || np[0] == Privacy.listsType) {
- 344. - Privacy.update(key);
- 345. - } else if (np[0] == Privacy.someType) {
- 346. - Privacy.someSaved(key, np[2], plus, true);
- 347. - } else { // save here
- 348. - var el = ge('privacy_edit_' + key);
- 349. - var types = cur.privacy[key + '_types'] || cur.privacy._types;
- 350. - var lists = cur.privacy[key + '_lists'] || cur.privacy._lists || {};
- 351. -
- 352. - if (key == 'hidden_friends') { // hack for hidden friends
- 353. - types = cur.privacy._types;
- 354. - }
- 355. -
- 356. - var label = types[Privacy.listsType], str = '';
- 357. - if (np[1] == 1) {
- 358. - label = types[np[2][0]];
- 359. - } else {
- 360. - str = [];
- 361. - var count = plus.length, hasUser = false;
- 362. - for (var i = 0; i < count && i < 5; ++i) {
- 363. - var mem = plus[i], id = mem[0];
- 364. - if (id > 0) {
- 365. - var shortname = mem[4].replace(/'/g, '');
- 366. - hasUser = true;
- 367. - str.push('<a href="/' + (shortname ? shortname : ('id' + id)) + '" onclick="return nav.go(this, event)">' + mem[5] + '</a>');
- 368. - } else {
- 369. - var cat_id = -id, color = (cat_id - 1) % 8 + 1;
- 370. - str.push('<span class="group' + color + '">' + lists[cat_id] + '</span>');
- 371. - }
- 372. - }
- 373. - if (hasUser) {
- 374. - label = types[Privacy.someType];
- 375. - }
- 376. - str = ': ' + str.join(', ');
- 377. - if (count > 5) {
- 378. - str += ' ' + getLang('privacy_N_friends_some', count - 5);
- 379. - }
- 380. - }
- 381. - if (minus.length) {
- 382. - var count = minus.length, mstr = [];
- 383. - for (var i = 0; i < count && i < 5; ++i) {
- 384. - var mem = minus[i], id = mem[0];
- 385. - if (id > 0) {
- 386. - var shortname = mem[4].replace(/'/g, '');
- 387. - mstr.push('<a href="/' + (shortname ? shortname : ('id' + id)) + '" onclick="return nav.go(this, event)">' + mem[6] + '</a>');
- 388. - } else {
- 389. - var cat_id = -id, color = (cat_id - 1) % 8 + 1;
- 390. - mstr.push('<span class="group' + color + '">' + lists[cat_id] + '</span>');
- 391. - }
- 392. - }
- 393. - str += ', ' + getLang('global_privacy_except') + ' ' + mstr.join(', ');
- 394. - if (count > 5) {
- 395. - str += ' ' + getLang('privacy_N_friends_more', count - 5);
- 396. - }
- 397. - }
- 398. - el.innerHTML = label;
- 399. - el.nextSibling.innerHTML = str;
- 400. -
- 401. - if (cur.onPrivacyChanged) cur.onPrivacyChanged(key);
- 402. - }
- 403. - },
- 404. - choose: function(ev, val, list) {
- 405. - var key = cur.privSel, p = cur.privacy[key], noselect = (cur.privacy._noselect || key == 'chat_actions');
- 406. - if (noselect) {
- 407. - if (cur.onPrivacyChanged) cur.onPrivacyChanged(key, val, list);
- 408. - Privacy.qhide();
- 409. - return cancelEvent(ev);
- 410. - }
- 411. - if (val == Privacy.customType) {
- 412. - var type, plus, minus = [];
- 413. - if (p[0] == Privacy.customType) {
- 414. - type = p[1];
- 415. - plus = p[2];
- 416. - minus = p[3];
- 417. - } else if (p[0] == Privacy.someType || p[0] == Privacy.listsType) {
- 418. - type = 0;
- 419. - plus = p[2];
- 420. - } else {
- 421. - type = 1;
- 422. - plus = p[2];
- 423. - }
- 424. - cur.onCprivSave = Privacy.customSaved.pbind(key);
- 425. - return showBox('al_friends.php', {act: 'custom_privacy_box', type: type, plus: plus.join(','), minus: minus.join(','), opt: cur.privacy.custom_box_type ? cur.privacy.custom_box_type : (key == 'apps_invite' || key == 'videocalls' ? 'fronly' : '')}, {stat: ['ui_controls.js', 'ui_controls.css']});
- 426. - } else if (val == Privacy.someType) {
- 427. - var checked = (p[0] == Privacy.someType || p[0] == Privacy.complexType && p[1] == 0) ? p[2].join(',') : '';
- 428. - cur.onFlistSave = function (ids, list) {
- 429. - Privacy.someSaved(key, ids, list);
- 430. - }
- 431. - return showTabbedBox('al_friends.php', {act: 'select_friends_box', Checked: checked}, {stat: ['ui_controls.js']});
- 432. - } else if (val == Privacy.listsType) {
- 433. - var el = ge('privacy_l_item' + list);
- 434. - if (el.className == 'l_item_sel') {
- 435. - el.className = 'l_item';
- 436. - var ind = indexOf(p[2], -list);
- 437. - if (ind != -1) {
- 438. - p[2].splice(ind, 1);
- 439. - }
- 440. - if (!p[2].length && key != 'updates') { // sorry, dirty hack
- 441. - cur.privacy[key] = [0, 1, [0], []];
- 442. - }
- 443. - } else {
- 444. - el.className = 'l_item_sel';
- 445. - if (p[0] != val) {
- 446. - p = cur.privacy[key] = [val, 0, [], []];
- 447. - }
- 448. - p[2].push(-list);
- 449. - }
- 450. - Privacy.update(key);
- 451. - return cancelEvent(ev);
- 452. - }
- 453. - cur.privacy[key] = [val, 1, [val], []];
- 454. - Privacy.update(key);
- 455. - Privacy.qhide();
- 456. - },
- 457. - select: function(val, force) {
- 458. - if (!force && val === cur.privSelIndex) return;
- 459. - if (cur.privSelIndex !== false) {
- 460. - var el = ge('privacy_item' + cur.privSelIndex);
- 461. - if (el) el.className = 'item';
- 462. - if (cur.privSelIndex == Privacy.listsType && cur.privacy[cur.privSel][0] != Privacy.listsType) {
- 463. - if (Privacy.toup) {
- 464. - hide(el.previousSibling);
- 465. - setStyle(cur.privEl, {top: cur.privFromY - getSize(cur.privEl)[1]});
- 466. - } else {
- 467. - hide(el.nextSibling);
- 468. - }
- 469. - }
- 470. - }
- 471. - cur.privSelIndex = val;
- 472. - var el = ge('privacy_item' + cur.privSelIndex), add = (cur.privSelIndex == Privacy.someType) ? '_plus' : '';
- 473. - if (el.nextSibling && el.nextSibling.id == 'privacy_item' + Privacy.listsType && isVisible(el.nextSibling.nextSibling)) {
- 474. - el.className = 'last item_sel' + add;
- 475. - } else {
- 476. - if (val == Privacy.listsType) {
- 477. - if (Privacy.toup) {
- 478. - show(el.previousSibling);
- 479. - setStyle(cur.privEl, {top: cur.privFromY - getSize(cur.privEl)[1]});
- 480. - } else {
- 481. - show(el.nextSibling);
- 482. - }
- 483. - } else {
- 484. - el.className = 'item_sel' + add;
- 485. - }
- 486. - }
- 487. - },
- 488. - unselect: function(val) {
- 489. - if (val != cur.privSelIndex) return;
- 490. - ge('privacy_item' + val).className = 'item';
- 491. - cur.privSelIndex = false;
- 492. - },
- 493. - hide: function(timeout) {
- 494. - if (timeout > 0) {
- 495. - cur.hidePrivacyTimer = setTimeout(Privacy.hide.pbind(0), timeout);
- 496. - return;
- 497. - }
- 498. - clearTimeout(cur.hidePrivacyTimer);
- 499. - if (timeout == -1) {
- 500. - hide(cur.privEl, cur.privHelper);
- 501. - } else if (isVisible) {
- 502. - fadeOut(cur.privEl, 200);
- 503. - if (cur.privHelper) {
- 504. - fadeOut(cur.privHelper, 200);
- 505. - }
- 506. - }
- 507. - cur.privSel = cur.privSelIndex = false;
- 508. - removeEvent(document, 'click', Privacy.qhide);
- 509. - },
- 510. - show: function(el, ev, key, delta) {
- 511. - var p = cur.privacy[key], noselect = (key.indexOf('actions') != -1);
- 512. - if (!p) return;
- 513. -
- 514. - if (!cur.privEl) {
- 515. - if (cur.privEl = ge('privacy_dropdown')) {
- 516. - cur.privRows = cur.privEl.firstChild.rows[1].cells[1].firstChild;
- 517. - }
- 518. - }
- 519. - if (!cur.privEl) {
- 520. - cur.privEl = bodyNode.appendChild(ce('div', {id: 'privacy_dropdown', innerHTML: '\
- 521. - <table cellspacing="0" cellpadding="0">\
- 522. - <tr class="top_sh">\
- 523. - <td colspan="3">\
- 524. - <div class="bottom2"></div><div class="bottom"></div>\
- 525. - </td>\
- 526. - <tr>\
- 527. - <td class="side"><div></div></td>\
- 528. - <td><div class="rows"></div></td>\
- 529. - <td class="side"><div></div></td>\
- 530. - </tr>\
- 531. - <tr class="bottom_sh">\
- 532. - <td colspan="3">\
- 533. - <div class="bottom"></div><div class="bottom2"></div>\
- 534. - </td>\
- 535. - </tr>\
- 536. - </table>'}));
- 537. - cur.privRows = cur.privEl.firstChild.rows[1].cells[1].firstChild;
- 538. - addEvent(cur.privEl, 'mouseout', Privacy.hide.pbind(500));
- 539. - addEvent(cur.privEl, 'mouseover', function() { clearTimeout(cur.hidePrivacyTimer); });
- 540. - }
- 541. - setTimeout(addEvent.pbind(document, 'click', Privacy.qhide), 1);
- 542. -
- 543. - var types = cur.privacy[key + '_types'] || cur.privacy._types;
- 544. - var lists = cur.privacy[key + '_lists'] || cur.privacy._lists || {};
- 545. - var hidden = cur.privacy[key + '_hidden'] || cur.privacy._hidden || {};
- 546. - var fontSize = getStyle(el, 'fontSize') || vk.fs;
- 547. - setStyle(cur.privRows, {fontSize: fontSize});
- 548. -
- 549. - cur.privSelIndex = p[0];
- 550. - if (hidden[cur.privSelIndex]) { cur.privSelIndex = 0; }
- 551. -
- 552. - var html = [], sel, handlers, hasLists = false;
- 553. - for (var i in lists) {
- 554. - hasLists = true; break;
- 555. - }
- 556. - html.push('<div class="header" onclick="Privacy.hide(-1)"><div id="privacy_header">' + el.innerHTML + '</div></div>');
- 557. - html.push('<div class="body">');
- 558. - for (var i in types) {
- 559. - if (hidden[i]) { continue; }
- 560. - sel = (i == cur.privSelIndex && i != Privacy.listsType) ? '_sel' : '';
- 561. - handlers = 'onmouseover="Privacy.select(\'' + i + '\')" onclick="Privacy.choose(event, \'' + i + '\')"';
- 562. - if (i == Privacy.listsType) {
- 563. - if (!hasLists) {
- 564. - continue;
- 565. - }
- 566. - } else {
- 567. - handlers += ' onmouseout="Privacy.unselect(\'' + i + '\')"';
- 568. - }
- 569. - if (sel && i == Privacy.someType) {
- 570. - sel += '_plus';
- 571. - }
- 572. - html.push('<div class="item' + sel + '" id="privacy_item' + i + '" ' + handlers + '>' + types[i] + '</div>');
- 573. - }
- 574. - if (types[Privacy.listsType] && hasLists) {
- 575. - var hideLists = (cur.privSelIndex != Privacy.listsType);
- 576. - html.push('<div id="privacy_lists">');
- 577. - html.push('<div class="l_header" onclick="return cancelEvent(event)"><div>' + types[Privacy.listsType] + '</div></div>');
- 578. - for (var i in lists) {
- 579. - var sel = hideLists ? '' : (inArray(-i, p[2]) ? '_sel' : '');
- 580. - html.push('<div class="l_item' + sel + '" id="privacy_l_item' + i + '" onclick="Privacy.choose(event, ' + Privacy.listsType + ', ' + i + ')"><div class="privacy_item_icon"></div>' + lists[i] + '</div>');
- 581. - }
- 582. - html.push('</div>');
- 583. - }
- 584. - html.push('</div>');
- 585. - cur.privRows.innerHTML = html.join('');
- 586. - cur.privSel = key;
- 587. -
- 588. - var helpText = cur.privacy[key + '_help'], hsz = [0, 0], hw = cur.privacy[key + '_help_w'];
- 589. - if (helpText) {
- 590. - if (!cur.privHelper) {
- 591. - if (cur.privHelper = ge('privacy_helper')) {
- 592. - cur.privHelp = cur.privHelper.firstChild.rows[2].cells[3].firstChild;
- 593. - }
- 594. - }
- 595. - if (!cur.privHelper) {
- 596. - cur.privHelper = bodyNode.appendChild(ce('div', {id: 'privacy_helper', innerHTML: '\
- 597. - <table cellspacing="0" cellpadding="0">\
- 598. - <tr class="priv_h_top_sh">\
- 599. - <td></td>\
- 600. - <td colspan="5"><div class="priv_h_bottom2"></div></td>\
- 601. - </tr>\
- 602. - <tr class="priv_h_top_sh">\
- 603. - <td></td>\
- 604. - <td class="priv_h_side_td2"><div class="priv_h_side"></div></td>\
- 605. - <td colspan="3"><div class="priv_h_bottom"></div></td>\
- 606. - <td class="priv_h_side_td2"><div class="priv_h_side"></div></td>\
- 607. - </tr>\
- 608. - <tr>\
- 609. - <td class="priv_h_arrow_td"><div class="priv_h_arrow"><img src="/images/ddtooltip'+(window.devicePixelRatio >= 2 ? '_2x' : '')+'.png" width="16" height="11" class="priv_h_arrow_img png" /></div></td>\
- 610. - <td class="priv_h_side_td2"><div class="priv_h_side"></div></td>\
- 611. - <td class="priv_h_side_td"><div class="priv_h_side"></div></td>\
- 612. - <td><div class="priv_h_rows"' + (hw ? ' style="width: ' + hw + 'px"' : '') + '></div></td>\
- 613. - <td class="priv_h_side_td"><div class="priv_h_side"></div></td>\
- 614. - <td class="priv_h_side_td2"><div class="priv_h_side"></div></td>\
- 615. - </tr>\
- 616. - <tr class="priv_h_bottom_sh">\
- 617. - <td></td>\
- 618. - <td class="priv_h_side_td2"><div class="priv_h_side"></div></td>\
- 619. - <td colspan="3"><div class="priv_h_bottom"></div></td>\
- 620. - <td class="priv_h_side_td2"><div class="priv_h_side"></div></td>\
- 621. - </tr>\
- 622. - <tr class="priv_h_bottom_sh">\
- 623. - <td></td>\
- 624. - <td colspan="5"><div class="priv_h_bottom2"></div></td>\
- 625. - </tr>\
- 626. - </table>'}));
- 627. - cur.privHelp = cur.privHelper.firstChild.rows[2].cells[3].firstChild;
- 628. - addEvent(cur.privHelper, 'mouseout', Privacy.hide.pbind(500));
- 629. - addEvent(cur.privHelper, 'mouseover', function() { clearTimeout(cur.hidePrivacyTimer); });
- 630. - }
- 631. - cur.privHelp.innerHTML = helpText;
- 632. -
- 633. - var tw = data(cur.privHelper, 'tween');
- 634. - if (tw) tw.stop(true);
- 635. - //show(cur.privHelper);
- 636. -
- 637. - var hsz = getSize(cur.privHelper);
- 638. - }
- 639. - var tw = data(cur.privEl, 'tween');
- 640. - if (tw) tw.stop(true);
- 641. - show(cur.privEl);
- 642. -
- 643. - var isFixed = false, pel = el;
- 644. - while (pel) {
- 645. - if (getStyle(pel, 'position') == 'fixed') {
- 646. - isFixed = true;
- 647. - break;
- 648. - }
- 649. - pel = pel.offsetParent;
- 650. - }
- 651. - cur.privEl.className = 'privacy_dropdown_' + key;
- 652. - if (isFixed) {
- 653. - addClass(cur.privEl, 'fixed');
- 654. - setStyle(cur.privEl, {position: ''});
- 655. - addClass(cur.privHelper, 'fixed');
- 656. - setStyle(cur.privHelper, {position: ''});
- 657. - } else {
- 658. - removeClass(cur.privEl, 'fixed');
- 659. - setStyle(cur.privEl, {position: 'absolute'});
- 660. - removeClass(cur.privHelper, 'fixed');
- 661. - setStyle(cur.privHelper, {position: 'absolute'});
- 662. - }
- 663. -
- 664. - var sz = getSize(cur.privEl), h = Math.max(sz[1], hsz[1])
- 665. - if (types[Privacy.listsType] && hideLists) {
- 666. - hide('privacy_lists');
- 667. - }
- 668. -
- 669. - if (delta === undefined) {
- 670. - delta = isFixed ? [0, 0] : [-1, -1];
- 671. - }
- 672. - var xy = getXY(el, isFixed), dx = 7 + delta[0], dy = 3 + delta[1];
- 673. - if ((browser.msie || browser.opera) && !isFixed) {
- 674. - dx += 1;
- 675. - dy += 1;
- 676. - }
- 677. -
- 678. - var y = xy[1] - dy - ((browser.msie6 || isFixed) ? 0 : scrollNode.scrollTop);
- 679. - Privacy.toup = false;
- 680. - if (y - h > 0) {
- 681. - if (y + h > lastWindowHeight) {
- 682. - Privacy.toup = true;
- 683. -
- 684. - var r = cur.privRows;
- 685. - r.appendChild(r.firstChild);
- 686. -
- 687. - var b = r.firstChild;
- 688. - for (var e = b.firstChild, t = false; e.nextSibling && e.nextSibling != t; e = b.firstChild) {
- 689. - if (t) {
- 690. - t = b.insertBefore(e, t);
- 691. - } else {
- 692. - t = b.appendChild(e);
- 693. - }
- 694. - }
- 695. -
- 696. - var l = b.firstChild;
- 697. - if (l.id == 'privacy_lists') {
- 698. - for (var e = l.firstChild, t = false; e.nextSibling && e.nextSibling != t; e = l.firstChild) {
- 699. - if (t) {
- 700. - t = l.insertBefore(e, t);
- 701. - } else {
- 702. - t = l.appendChild(e);
- 703. - }
- 704. - }
- 705. - }
- 706. - sz = getSize(cur.privEl);
- 707. - }
- 708. - }
- 709. -
- 710. - if (vk.rtl) {
- 711. - var sz1 = getSize(el);
- 712. - xy[0] -= sz[0] - sz1[0];
- 713. - dx = -8;
- 714. - }
- 715. -
- 716. - bodyNode.appendChild(cur.privEl);
- 717. - if (Privacy.toup) {
- 718. - cur.privEl.firstChild.className = 'to_up';
- 719. - dy -= 1;
- 720. - cur.privFromY = xy[1] + getSize(cur.privRows.lastChild)[1] - dy;
- 721. - setStyle(cur.privEl, {left: xy[0] - dx, top: cur.privFromY - sz[1]});
- 722. - } else {
- 723. - cur.privEl.firstChild.className = '';
- 724. - setStyle(cur.privEl, {left: xy[0] - dx, top: xy[1] - dy});
- 725. - }
- 726. -
- 727. - if (helpText) {
- 728. - var hx = (xy[0] - dx) + (vk.rtl ? (-hsz[0]) : sz[0]), hy = 0;
- 729. - if (Privacy.toup) {
- 730. - cur.privHelper.firstChild.className = 'to_up';
- 731. - hy = cur.privFromY - hsz[1];
- 732. - } else {
- 733. - cur.privHelper.firstChild.className = '';
- 734. - hy = xy[1] - dy;
- 735. - }
- 736. - setStyle(cur.privHelper, {left: hx + 15, top: hy});
- 737. - animate(cur.privHelper, {opacity: 1, left: hx}, 200);
- 738. - } else {
- 739. - hide(cur.privHelper);
- 740. - }
- 741. -
- 742. - return cancelEvent(ev);
- 743. - },
- 744. - getValue: function(key) {
- 745. - var p = cur.privacy[key], res = [];
- 746. - if (p[0] < Privacy.customType) {
- 747. - res = [p[0]];
- 748. - } else if (p[0] == Privacy.someType) {
- 749. - res = [4, p[2].join(',')];
- 750. - } else if (p[0] == Privacy.listsType) {
- 751. - var l = [];
- 752. - for (var i in p[2]) {
- 753. - l.push(-p[2][i]);
- 754. - }
- 755. - res = [5, l.join(',')];
- 756. - } else {
- 757. - res = [-1, p[1], p[2].join(','), p[3].join(',')];
- 758. - }
- 759. - return res.join('_');
- 760. - }
- 761. - }
- 762. -
- 763. - Privacy.qhide = Privacy.hide.pbind(-1);
- 764. -
- 765. - function OList (box, owners, selected, options) {
- 766. - if (selected.length === 0) selected = {};
- 767. - options = options || {};
- 768. - // this.indexer = new Indexer(owners); // Requires ui_controls for indexer
- 769. - this.indexer = new vkIndexer(owners, options.getName ? options.getName : function(owner) {
- 770. - return owner[1];
- 771. - });
- 772. - this.owners = owners;
- 773. - this.tpl = options.tpl;
- 774. - this.rsTpl = options.rsTpl;
- 775. - this.idIndex = options.idIndex || 0;
- 776. - this.selected = selected;
- 777. - this.getUnsorted = options.getUnsorted;
- 778. - this.unsortedIndex = options.unsortedIndex || 0;
- 779. - this.box = box;
- 780. - this.nofocus = options.nofocus;
- 781. - if (options.onTabUpdate) {
- 782. - this.onTabUpdate = options.onTabUpdate;
- 783. - }
- 784. -
- 785. - box.removeButtons();
- 786. - box.addButton(getLang('global_cancel'), function () {
- 787. - if (cur.onOListCancel && cur.onOListCancel(options.ret || {}) === false) {
- 788. - return;
- 789. - }
- 790. - box.hide(200);
- 791. - }, 'no');
- 792. - box.addButton(options['save_lang'] || getLang('global_save'), function () {
- 793. - var list = {}, ids = [], inv = [];
- 794. - each (owners, function () {
- 795. - if (!self.invertedSelection && self.selected[this[self.idIndex]] || self.invertedSelection && !self.selected[this[self.idIndex]]) {
- 796. - list[this[self.idIndex]] = this;
- 797. - ids.push(this[self.idIndex]);
- 798. - } else {
- 799. - inv.push(this[self.idIndex])
- 800. - }
- 801. - });
- 802. - if (cur.onOListSave(ids, inv, list, options.ret || {}) !== false) {
- 803. - box.hide(200);
- 804. - }
- 805. - });
- 806. - if (options['box_options']) {
- 807. - box.setOptions(options['box_options']);
- 808. - }
- 809. -
- 810. - var self = this;
- 811. - var tabsEl = geByClass1('summary_tabs', box.bodyNode);
- 812. - var actionsWrap = geByClass1('olist_actions', box.bodyNode, 'div');
- 813. - var selButton = geByTag1('button', box.bodyNode);
- 814. - this.scrolNode = geByClass1('privacy_olist', box.bodyNode);
- 815. - this.moreEl = geByClass1('olist_more', box.bodyNode, 'a');
- 816. - this.olistEl = geByClass1('olist', box.bodyNode, 'div');
- 817. - this.selCnt = intval(val('olist_selected'));
- 818. - this.sel = options.sel || 0;
- 819. - this.noSelMsg = options.noSelMsg || getLang('friends_no_user_selected');
- 820. - this.invertedSelection = false;
- 821. -
- 822. - var filter = this.filter = geByClass1('olist_filter', box.bodyNode, 'input');
- 823. - var filterWrap = filter.parentNode;
- 824. - placeholderSetup(filter, {back: 1});
- 825. - if (!options.nofocus) {
- 826. - setTimeout(elfocus.pbind(filter), 100);
- 827. - }
- 828. -
- 829. - if (this.moreEl) {
- 830. - if (!isVisible(this.moreEl)) {
- 831. - re(this.moreEl);
- 832. - show(this.moreEl);
- 833. - } else {
- 834. - this.moreEl.onclick = function (event) {
- 835. - self.renderList('', 60);
- 836. - return cancelEvent(event);
- 837. - }
- 838. - }
- 839. - }
- 840. -
- 841. - var actMenuOptions = [], selMenuOptions = [], selTitle = '';
- 842. - each (options.actions_menu, function () {
- 843. - var menuItem = {i: this[0], l: this[1]};
- 844. - if (!this[0]) {
- 845. - menuItem.onMouseOver = function () {
- 846. - self.olistSelectMenu.options.target = this;
- 847. - self.olistSelectMenu.moveToTarget();
- 848. - setStyle(self.olistSelectMenu.header, {width: getSize(this)[0]});
- 849. - setStyle(self.olistSelectMenu.rows, {minWidth: getSize(this)[0]});
- 850. - if (browser.msie) {
- 851. - setStyle(self.olistSelectMenu.rows, {width: getSize(this)[0] + 20});
- 852. - }
- 853. - self.olistSelectMenu.show();
- 854. - }
- 855. - menuItem.onClick = function () {return false;}
- 856. - selTitle = this[1];
- 857. - }
- 858. - actMenuOptions.push(menuItem);
- 859. - });
- 860. - each (options.selection_menu, function () {
- 861. - var menuItem = {i: this[0], l: this[1]};
- 862. - selMenuOptions.push(menuItem);
- 863. - });
- 864. - this.olistActionsMenu = new DropdownMenu(actMenuOptions, {
- 865. - target: selButton,
- 866. - containerClass: 'dd_menu_olist_act',
- 867. - title: '<span class="olist_dd_over"></span>',
- 868. - updateTarget: false,
- 869. - offsetLeft: 0,
- 870. - offsetTop: 0,
- 871. - showHover: false,
- 872. - fadeSpeed: 0,
- 873. - onSelect: this.selMenuOnSelect.bind(this)
- 874. - });
- 875. -
- 876. - this.olistSelectMenu = new DropdownMenu(selMenuOptions, {
- 877. - parentMenu: this.olistActionsMenu,
- 878. - showHover: false,
- 879. - updateTarget: false,
- 880. - title: selTitle,
- 881. - offsetLeft: 0,
- 882. - offsetTop: 1,
- 883. - fadeSpeed: 0,
- 884. - containerClass: 'dd_menu_nested dd_menu_olist_sel',
- 885. - onSelect: this.selMenuOnSelect.bind(this)
- 886. - });
- 887. -
- 888. - addEvent(filter, 'keyup', function (e) {
- 889. - self.renderList(clean(val(this)));
- 890. - });
- 891. - addEvent(this.olistEl, 'click mouseover mouseout', this.onMouseEvent.bind(this));
- 892. - addEvent(this.scrolNode, 'scroll', this.onScroll.bind(this));
- 893. -
- 894. - if (options.ignored) {
- 895. - // this.ignoredIndexer = new Indexer(options.ignored);
- 896. - this.ignoredIndexer = new vkIndexer(options.ignored, options.getName ? options.getName : function(owner) {
- 897. - return owner[1];
- 898. - });
- 899. - this.ignoredOwners = options.ignored;
- 900. - this.ignoredTpl = options.ignored_tpl;
- 901. - this.ignoredSelected = {};
- 902. - this.ignoredCnt = options.ignored.length;
- 903. - }
- 904. -
- 905. - (cur.onOListTabChange = function (tab) {
- 906. - self.sel = tab;
- 907. - toggle(tabsEl, tab != 2);
- 908. - if (tab == 2) {
- 909. - if (filterWrap.nextSibling != tabsEl) {
- 910. - tabsEl.parentNode.insertBefore(filterWrap, tabsEl);
- 911. - }
- 912. - } else {
- 913. - if (filterWrap.parentNode != actionsWrap) {
- 914. - actionsWrap.appendChild(filterWrap);
- 915. - }
- 916. - }
- 917. - toggleClass(filterWrap, 'fl_l', tab != 2);
- 918. - toggleClass(actionsWrap, 'olist_ignored_actions', tab == 2);
- 919. - toggleClass(self.olistEl, 'olist_ignored', tab == 2);
- 920. - if (options.ignored) {
- 921. - box.setControlsText(tab == 2 ? options.ignored_return_link : options.ignored_link.replace('%s', self.ignoredCnt));
- 922. - }
- 923. - self.renderList(val(filter), 0, tab);
- 924. - if (!options.nofocus) {
- 925. - setTimeout(elfocus.pbind(filter), 100);
- 926. - }
- 927. - })(self.sel);
- 928. -
- 929. - }
- 930. - extend(OList.prototype, {
- 931. - onScroll: function () {
- 932. - if (!this.moreEl || !this.moreEl.offsetTop || !this.moreEl.onclick) {
- 933. - return;
- 934. - }
- 935. - var y = this.moreEl.offsetTop,
- 936. - sh = this.scrolNode.scrollHeight,
- 937. - st = this.scrolNode.scrollTop,
- 938. - h = this.scrolNode.offsetHeight || this.scrolNode.clientHeight;
- 939. -
- 940. - if (st + h + 100 >= y) {
- 941. - this.moreEl.onclick();
- 942. - }
- 943. - },
- 944. - onMouseEvent: function (event) {
- 945. - var target = event.originalTarget || event.target;
- 946. - while (target && target != bodyNode && (!target.className || target.className.indexOf('olist_item_wrap') == -1)) {
- 947. - target = target.parentNode;
- 948. - }
- 949. - if (!target || target == bodyNode) return;
- 950. - if (hasClass(target, 'olist_item_loading')) {
- 951. - return cancelEvent(event);
- 952. - }
- 953. - if (event.type == 'mouseover' || event.type == 'mouseout') {
- 954. - if (!hasClass(target, 'olist_item_wrap_on'))
- 955. - target.className = 'olist_item_wrap' + (event.type == 'mouseover' ? '_over' : '');
- 956. - } else {
- 957. - if (checkEvent(event)) return true;
- 958. - this.box.changed = true;
- 959. - var id = target.id.match(/-?\d+/)[0];
- 960. - if (this.sel == 2) {
- 961. - this.ignoreOnClick(target, id);
- 962. - } else {
- 963. - var checked = !this.invertedSelection && this.selected[id] || this.invertedSelection && !this.selected[id];
- 964. - target.className = !checked ? 'olist_item_wrap_on' : 'olist_item_wrap_over';
- 965. - this.selected[id] = !checked || this.invertedSelection;
- 966. - this.selCnt += !checked || this.invertedSelection ? 1 : -1;
- 967. - this.selTabUpdate();
- 968. - }
- 969. - if (!this.nofocus && this.scrolNode.scrollTop < 50) {
- 970. - var filter = this.filter;
- 971. - setTimeout(function () {
- 972. - elfocus(filter);
- 973. - if (val(filter).length) {
- 974. - filter.select();
- 975. - }
- 976. - }, 100);
- 977. - }
- 978. -
- 979. - return cancelEvent(event);
- 980. - }
- 981. - },
- 982. - selMenuOnSelect: function (event) {
- 983. - this.olistActionsMenu.hide(false);
- 984. - this.olistSelectMenu.hide(false);
- 985. - var k = event.target.index,
- 986. - selCnt = this.selCnt,
- 987. - selected = this.selected;
- 988. -
- 989. - if (!event.ctrlKey && !event.metaKey && !event.shiftKey) {
- 990. - selected = {};
- 991. - selCnt = 0;
- 992. - }
- 993. -
- 994. - switch (k) {
- 995. - case -1:
- 996. - selected = {};
- 997. - selCnt = 0;
- 998. - each (this.owners, function () {
- 999. - selected[this[0]] = 1;
- 1000. - selCnt++;
- 1001. - });
- 1002. - break;
- 1003. -
- 1004. - case -2: // None
- 1005. - selected = {};
- 1006. - selCnt = 0;
- 1007. - break;
- 1008. -
- 1009. - case -3:
- 1010. - each (this.owners, function () {
- 1011. - if (this[0] > 0 && !selected[this[0]]) {
- 1012. - selected[this[0]] = 1;
- 1013. - selCnt++;
- 1014. - }
- 1015. - });
- 1016. - break;
- 1017. -
- 1018. - case -4:
- 1019. - each (this.owners, function () {
- 1020. - if (this[0] < 0 && !selected[this[0]]) {
- 1021. - selected[this[0]] = 1;
- 1022. - selCnt++;
- 1023. - }
- 1024. - });
- 1025. - break;
- 1026. -
- 1027. - default:
- 1028. - var mask = (1 << k);
- 1029. - each (this.owners, function () {
- 1030. - if ((this[4] & mask) && !selected[this[0]]) {
- 1031. - selected[this[0]] = 1;
- 1032. - selCnt++;
- 1033. - }
- 1034. - });
- 1035. - }
- 1036. -
- 1037. - this.selCnt = selCnt;
- 1038. - this.selected = selected;
- 1039. - this.selTabUpdate();
- 1040. - this.renderList();
- 1041. - return false;
- 1042. - },
- 1043. - selTabUpdate: function () {
- 1044. - var cnt1 = this.selCnt, cnt2 = this.owners.length - cnt1;
- 1045. - val('olist_selected', cnt1);
- 1046. - val('olist_unselected', cnt2);
- 1047. - toggle('olist_selected', cnt1 > 0);
- 1048. - toggle('olist_unselected', cnt2 > 0);
- 1049. - if (this.onTabUpdate) {
- 1050. - this.onTabUpdate();
- 1051. - }
- 1052. - },
- 1053. - ignoreOnClick: function (target, id) {
- 1054. - var self = this,
- 1055. - hash = false;
- 1056. -
- 1057. - var checked = !this.invertedSelection && this.ignoredSelected[id] || this.invertedSelection && !this.ignoredSelected[id];
- 1058. - each (this.ignoredOwners, function () {
- 1059. - if (this[0] == id) {
- 1060. - hash = this[4];
- 1061. - return false;
- 1062. - }
- 1063. - });
- 1064. - ajax.post('/al_feed.php?misc', {act: checked ? 'a_ignore_owner' : 'a_unignore_owner', owner_id: id, hash: hash}, {
- 1065. - onDone: function () {
- 1066. - target.className = !checked ? 'olist_item_wrap_on' : 'olist_item_wrap_over';
- 1067. - self.ignoredSelected[id] = !checked || self.invertedSelection;
- 1068. - self.ignoredCnt += !checked || self.invertedSelection ? -1 : 1;
- 1069. - val('olist_blacklisted', self.ignoredCnt);
- 1070. - toggle('olist_blacklisted', self.ignoredCnt);
- 1071. - },
- 1072. - showProgress: function () {
- 1073. - addClass(target, 'olist_item_loading');
- 1074. - },
- 1075. - hideProgress: function () {
- 1076. - removeClass(target, 'olist_item_loading');
- 1077. - }
- 1078. - });
- 1079. - },
- 1080. - renderList: function (pattern, offset, sel) {
- 1081. - offset = offset || 0;
- 1082. - sel = sel || this.sel;
- 1083. - var slice, selected, tpl,
- 1084. - limit = offset ? 60 : 120,
- 1085. - self = this;
- 1086. -
- 1087. - if (pattern) {
- 1088. - pattern = pattern.replace(/\u2013|\u2014/g, '-');
- 1089. - }
- 1090. - if (sel == 2) {
- 1091. - slice = pattern ? this.ignoredIndexer.search(pattern) : this.ignoredOwners;
- 1092. - selected = this.ignoredSelected;
- 1093. - tpl = self.ignoredTpl;
- 1094. - } else {
- 1095. - slice = pattern ? this.indexer.search(pattern) : this.owners;
- 1096. - if (self.unsortedIndex == sel && self.getUnsorted) {
- 1097. - slice = self.getUnsorted(slice);
- 1098. - }
- 1099. - selected = this.selected;
- 1100. - var inverted = self.invertedSelection ? !(this.sel < 0) : (this.sel < 0);
- 1101. - tpl = self.tpl;
- 1102. - if (sel && self.unsortedIndex != sel) {
- 1103. - var sel_slice = [];
- 1104. - each (slice, function () {
- 1105. - var id = this[self.idIndex];
- 1106. - if (!inverted && selected[id] || inverted && !selected[id]) {
- 1107. - sel_slice.push(this);
- 1108. - if (sel_slice.length > offset + limit) {
- 1109. - return false;
- 1110. - }
- 1111. - }
- 1112. - });
- 1113. - slice = sel_slice;
- 1114. - }
- 1115. - }
- 1116. - var total = slice.length;
- 1117. - slice = slice.slice(offset, offset + limit);
- 1118. - var html = [];
- 1119. - if (pattern) {
- 1120. - var term = escapeRE(pattern), termRus = parseLatin(pattern);
- 1121. - if (termRus != null) {
- 1122. - term = term + '|' + escapeRE(termRus);
- 1123. - }
- 1124. - var regexp = new RegExp('(?![^&;]+;)(?!<[^<>]*)((\\(*)(' + term + '))(?![^<>]*>)(?![^&;]+;)', 'gi');
- 1125. - }
- 1126. - var rsTpl = self.rsTpl ? self.rsTpl : function(obj, pattern, invertedSelection, selected, regexp) {
- 1127. - var checked = !invertedSelection && selected[obj[0]] || invertedSelection && !selected[obj[0]];
- 1128. - var label = obj[1];
- 1129. - if (pattern) {
- 1130. - label = pattern.indexOf(' ') == -1 ? label.split(' ') : [label];
- 1131. - var tmp = '';
- 1132. - for (var i in label) {
- 1133. - tmp += (i > 0 ? ' ' : '') + label[i].replace(regexp, '$2<em>$3</em>');
- 1134. - }
- 1135. - label = tmp;
- 1136. - }
- 1137. - return {
- 1138. - id: obj[0],
- 1139. - name: label,
- 1140. - photo: obj[2],
- 1141. - classname: checked ? ' olist_item_wrap_on' : '',
- 1142. - link: obj[3] || (obj[0] > 0 ? ('id' + obj[0]) : ('club' + (-obj[0])))
- 1143. - };
- 1144. - }
- 1145. - each (slice, function () {
- 1146. - html.push(rs(tpl, rsTpl(this, pattern, self.invertedSelection, selected, regexp)));
- 1147. - });
- 1148. - if (!offset && !html.length) {
- 1149. - html.push('<div class="olist_empty">' + (pattern ? getLang('global_search_not_found').replace('{search}', clean(pattern)) : self.noSelMsg) + '</div>');
- 1150. - }
- 1151. - re(this.moreEl);
- 1152. - html = html.join(' ');
- 1153. -
- 1154. - if (!offset) {
- 1155. - val(this.olistEl, html);
- 1156. - } else {
- 1157. - this.olistEl.appendChild(cf(html));
- 1158. - }
- 1159. - if (total > offset + limit) {
- 1160. - this.olistEl.appendChild(this.moreEl);
- 1161. - this.moreEl.onclick = function (event) {
- 1162. - self.renderList(pattern, offset + limit);
- 1163. - return cancelEvent(event);
- 1164. - }
- 1165. - }
- 1166. - if (self.box && self.box.scroll) {
- 1167. - self.box.scroll.update(false, true);
- 1168. - }
- 1169. - }
- 1170. - });
- 1171. -
- 1172. - try{jsDispatcher.triggerOnload('privacy.js');}catch(e){}
- 1173. - try{stManager.done('privacy.js');}catch(e){}
- ------
- Файл - settings.js (Старый размер - 42660 | Новый - 40759):
- 23. - savePrivacyDone: function(id) {
- 24. - var pe = ge(id), el = domPN(pe);
- 25. - if (!pe) return;
- 26. -
- 27. - for (; el && el.tagName != 'TR';) el = domPN(el);
- 28. - if (!el) return;
- 29. -
- 30. - for (; el && !hasClass(domFC(el), 'settings_privacy_h');) el = domPS(el);
- 31. - if (!el) return;
- 32. -
- 33. - el = geByClass1('settings_privacy_saved', el);
- 34. - if (!el) return;
- 35. -
- 36. - var y = getXY(el)[1], f = animate.pbind(el, {opacity: 1}, 200, animate.pbind(el, {opacity: 0}, 2000));
- 37. - if (scrollGetY() > y - 20) {
- 38. - scrollToY(y - 20, 200);
- 39. - setTimeout(f, 200);
- 40. - } else {
- 41. - f();
- 42. - }
- 43. - },
- 44. - savePrivacyKey: function(key) {
- 45. - if (key == 'friends') {
- 46. - Settings.savePrivacyDone('privacy_friends_hide');
- 47. - return;
- 48. - }
- 49. - var url, params = {key: key, val: Privacy.getValue(key), hash: cur.options.hash};
- 50. - if (key == 'search_access' || key == 'updates') {
- 51. - if (key == 'updates') {
- 52. - var val = Privacy.getValue(key);
- 53. - if (val.substr(0,1) != '0') {
- 54. - var items = val.substr(2);
- 55. - if (!items.length) {
- 56. - ge('privacy_header').innerHTML = ge('privacy_edit_updates').innerHTML = getLang('settings_updates_no_news');
- 57. - }
- 58. - }
- 59. - }
- 60. - url = 'al_settings.php';
- 61. - params.act = 'a_save_special';
- 62. - } else {
- 63. - url = 'al_friends.php';
- 64. - params.act = 'save_privacy';
- 65. - }
- 66. -
- 67. - clearTimeout(cur['privacy_timer_' + key]);
- 68. - cur['privacy_timer_' + key] = setTimeout(ajax.post.pbind(url, params, {
- 69. - onDone: Settings.savePrivacyDone.pbind('privacy_edit_' + key)
- 70. - }), 500);
- 71. - },
- 82. - scrollToTop(200);
- 87. - cur.onPrivacyChanged = Settings.savePrivacyKey;
- 88. + cur.onPrivacyChanged = function (key) {
- 89. + if (key != 'updates') return;
- 90. + var val = Privacy.getValue(key);
- 91. + if (val.substr(0,1) != '0') {
- 92. + var items = val.substr(2);
- 93. + if (!items.length) {
- 94. + ge('privacy_header').innerHTML = ge('privacy_edit_updates').innerHTML = getLang('settings_updates_no_news');
- 95. + }
- 96. + }
- 97. + }
- 579. - if (hasClass(ge('settings_' + id), 'disabled')) return;
- 580. -
- 724. - if (newPwd.match(/\s/)) {
- 725. - Settings.showError(getLang('settings_pwd_bad'), 'pwd');
- 726. - notaBene('settings_new_pwd');
- 727. - if (tt) setTimeout(tt.show, 10);
- 728. - return;
- 729. - }
- 963. - }
- 964. - box = curBox();
- 965. - if (box) {
- 966. - box.hideProgress();
- 967. - box.setControlsText(getLang('setting_all_sessions_reset'));
- 969. + var div = ge('activityCtrl');
- 970. + div.innerHTML = getLang('setting_all_sessions_reset');
- 971. + div.style.margin = '0';
- 972. + addClass(div, 'dld');
- 997. - curBox().showProgress();
- 998. + ge('activityCtrl').innerHTML = '<img src="/images/upload.gif"/>';
- 1012. - });
- 1013. - },
- 1014. - disabledPrivacy: function() {
- 1015. - var el = geByClass1('settings_privacy_add_replies_view', ge('content'));
- 1016. - if (el) showTooltip(el, {
- 1017. - black: true,
- 1018. - hasover: 1,
- 1019. - className: 'settings_comments_disabled_tt',
- 1020. - shift: [160, 3, 3],
- 1021. - text: getLang('settings_comments_disabled_tt').replace('{link}', '<a href="/settings?f=cposts" onclick="return nav.go(this, event, {nocur: true})">').replace('{/link}', '</a>')
- ------
- Файл - settings.css (Старый размер - 14885 | Новый - 0):
- 0. - #settings_css {
- 1. - display: none;
- 2. - }
- 3. -
- 4. - .settings_privacy {
- 5. - background: #F7F7F7;
- 6. - padding: 7px 30px 30px;
- 7. - }
- 8. - .settings_privacy_row {
- 9. - padding: 12px 12px 0;
- 10. - width: 298px;
- 11. - vertical-align: top;
- 12. - }
- 13. - .settings_privacy_disabled {
- 14. - color: #999;
- 15. - }
- 16. - .settings_privacy_saved {
- 17. - color: #999;
- 18. - opacity: 0;
- 19. - font-size: 11px;
- 20. - font-weight: normal;
- 21. - }
- 22. - .settings_privacy_row_submit {
- 23. - padding: 22px 12px 10px;
- 24. - }
- 25. - .settings_privacy_control {
- 26. - position: relative;
- 27. - padding-top: 11px;
- 28. - border: 1px solid #F7F7F7;
- 29. - }
- 30. - .settings_view_as_text {
- 31. - border-top: 1px solid #DAE1E8;
- 32. - line-height: 140%;
- 33. - padding: 10px 100px;
- 34. - background: #FFF;
- 35. - }
- 36. - .settings_privacy_save {
- 37. - padding: 25px 0 15px;
- 38. - }
- 39. - #settings_privacy_result, #settings_result {
- 40. - display: none;
- 41. - background: #F7F7F7;
- 42. - padding: 15px 15px 0;
- 43. - }
- 44. - #settings_save_msg {
- 45. - line-height: 160%;
- 46. - background: #F4EBBD;
- 47. - }
- 48. -
- 49. - #settings_save_error {
- 50. - line-height: 160%;
- 51. - text-align: left;
- 52. - }
- 53. -
- 54. -
- 55. - #privacy_l_item101 .privacy_item_icon,
- 56. - #privacy_l_item102 .privacy_item_icon,
- 57. - #privacy_l_item103 .privacy_item_icon,
- 58. - #privacy_l_item104 .privacy_item_icon,
- 59. - #privacy_l_item105 .privacy_item_icon,
- 60. - #privacy_l_item106 .privacy_item_icon,
- 61. - #privacy_l_item107 .privacy_item_icon,
- 62. - #privacy_l_item108 .privacy_item_icon,
- 63. - #privacy_l_item109 .privacy_item_icon,
- 64. - #privacy_l_item110 .privacy_item_icon {
- 65. - background-image: url(/images/icons/mono_iconset.gif?8);
- 66. - float: right;
- 67. - background-position: left 0;
- 68. - background-repeat: no-repeat;
- 69. - width: 11px;
- 70. - height: 11px;
- 71. - margin-top: 1px;
- 72. - *position: relative;
- 73. - }
- 74. - #privacy_l_item101 .privacy_item_icon { background-position: 0 -30px; }
- 75. - #privacy_l_item102 .privacy_item_icon { background-position: 0 -75px; }
- 76. - #privacy_l_item103 .privacy_item_icon { background-position: 0 -148px; }
- 77. - #privacy_l_item104 .privacy_item_icon { background-position: 0 -192px; }
- 78. - #privacy_l_item105 .privacy_item_icon { background-position: 0 -15px; }
- 79. - #privacy_l_item106 .privacy_item_icon { background-position: 0 -88px; }
- 80. - #privacy_l_item107 .privacy_item_icon { background-position: 0 -164px; }
- 81. - #privacy_l_item108 .privacy_item_icon { background-position: 0 -264px; }
- 82. - #privacy_l_item109 .privacy_item_icon { background-position: 0 0px; }
- 83. - #privacy_l_item110 .privacy_item_icon { background-position: 0 -222px; }
- 84. -
- 85. - /* Blacklist */
- 86. - #settings_bl_bar {
- 87. - padding: 10px;
- 88. - background: #F7F7F7;
- 89. - border-bottom: 1px solid #DAE1E8;
- 90. - }
- 91. - #settings_bl_search {
- 92. - margin: 0;
- 93. - padding: 5px 4px 4px 20px;
- 94. - width: 402px;
- 95. - height: 14px;
- 96. - line-height: 1.27em;
- 97. - background: #FFF url(/images/magglass.png) no-repeat 5px 6px;
- 98. - }
- 99. - #search_bl_submit {
- 100. - padding-left: 8px;
- 101. - padding-right: 8px;
- 102. - width: 168px;
- 103. - text-align: center;
- 104. - }
- 105. - #settings_bl_list_wrap {
- 106. - padding: 0 10px;
- 107. - }
- 108. - #settings_bl_result {
- 109. - padding: 15px 5px 5px;
- 110. - display: none;
- 111. - }
- 112. - #settings_bl_msg {
- 113. - line-height: 160%;
- 114. - background: #F4EBBD;
- 115. - }
- 116. - .settings_bl_row {
- 117. - padding: 10px;
- 118. - height: 25px;
- 119. - overflow: hidden;
- 120. - border-bottom: 1px solid #DAE2E8;
- 121. - }
- 122. - .settings_bl_row:last-child {
- 123. - border-bottom: 0;
- 124. - }
- 125. - img.settings_bl_photo {
- 126. - width: 25px;
- 127. - height: 25px;
- 128. - }
- 129. - .settings_bl_name {
- 130. - padding: 5px 0 0 10px;
- 131. - font-weight: bold;
- 132. - max-width: 400px;
- 133. - overflow: hidden;
- 134. - white-space: nowrap;
- 135. - text-overflow: ellipsis;
- 136. - -o-text-overflow: ellipsis;
- 137. - }
- 138. - .settings_bl_label {
- 139. - font-weight: normal;
- 140. - color: #777;
- 141. - padding-left: 2px;
- 142. - display: none;
- 143. - }
- 144. - .settings_bl_action {
- 145. - padding-top: 5px;
- 146. - }
- 147. - #settings_bl_noempty {
- 148. - min-height: 256px;
- 149. - }
- 150. - #settings_bl_empty {
- 151. - font-size: 1.09em;
- 152. - padding: 100px 30px;
- 153. - text-align: center;
- 154. - color: #777;
- 155. - }
- 156. -
- 157. - #settings_panel {
- 158. - background: #F7F7F7;
- 159. - padding: 10px 0 0 0;
- 160. - }
- 161. - #settings_panel .msg {
- 162. - margin: 0 10px;
- 163. - border:1px solid #B9C4DA;
- 164. - line-height: 160%;
- 165. - font-weight: normal;
- 166. - background-color:#FFF;
- 167. - }
- 168. - #settings_panel .settings_section .msg {
- 169. - margin: 0;
- 170. - }
- 171. - .settings_section {
- 172. - margin: 0 0 25px 113px;
- 173. - width: 400px;
- 174. - }
- 175. - .setbal_section {
- 176. - margin: 0 auto 25px;
- 177. - width: 380px;
- 178. - line-height: 160%;
- 179. - }
- 180. - .settings_privacy_h {
- 181. - padding: 15px 20px 0;
- 182. - }
- 183. - .settings_section h2,
- 184. - .settings_privacy_header,
- 185. - .setbal_section h2 {
- 186. - margin: 10px 0 15px 0;
- 187. - font-weight: bold;
- 188. - font-size: 1.09em;
- 189. - color: #36638E;
- 190. - border-color: #B9C4DA;
- 191. - }
- 192. - .settings_privacy_header {
- 193. - margin-bottom: 5px;
- 194. - }
- 195. - .settings_section h4 {
- 196. - padding: 12px 0 0 0;
- 197. - border: none;
- 198. - }
- 199. - .settings_section .settings_privacy_row {
- 200. - width: 166px;
- 201. - }
- 202. - .settings_section .settings_privacy_buttons {
- 203. - padding-top: 15px;
- 204. - }
- 205. - .settings_section .settings_privacy_input {
- 206. - padding-top: 8px;
- 207. - }
- 208. - .settings_privacy_text {
- 209. - padding-top: 12px;
- 210. - }
- 211. - .settings_section_notice {
- 212. - padding: 20px 0 0 2px;
- 213. - line-height: 160%;
- 214. - }
- 215. - .settings_buttons {
- 216. - margin-left: 255px;
- 217. - padding-top: 10px;
- 218. - }
- 219. - .settings_buttons_center {
- 220. - text-align: center;
- 221. - padding-top: 10px;
- 222. - }
- 223. - .settings_section .settings_buttons {
- 224. - margin-left: 140px;
- 225. - }
- 226. - .notify_settings .settings_privacy_row {
- 227. - width: 140px;
- 228. - }
- 229. - .settings_privacy_control .checkbox {
- 230. - margin-top: -1px;
- 231. - }
- 232. - #settings_panel .frow {
- 233. - padding-top: 15px;
- 234. - }
- 235. - #settings_panel .label {
- 236. - padding: 5px 15px 3px 0;
- 237. - color: #555;
- 238. - width: 125px;
- 239. - clear: both;
- 240. - }
- 241. - #settings_panel .labeled {
- 242. - width: 260px;
- 243. - padding: 2px 0 3px 0;
- 244. - }
- 245. - #settings_panel .labeled input {
- 246. - width: 142px;
- 247. - }
- 248. - #settings_panel .labeled small {
- 249. - color: #777;
- 250. - }
- 251. - #settings_panel .labeled_text {
- 252. - padding: 5px 0 3px 0;
- 253. - }
- 254. - input#pin {
- 255. - width: 100px;
- 256. - }
- 257. - #lj_data {
- 258. - padding-top: 10px;
- 259. - }
- 260. - #settings_panel .settings_section #lj_data .msg {
- 261. - margin-bottom: 10px;
- 262. - padding: 7px;
- 263. - }
- 264. - #lj_data .msg div {
- 265. - padding-top: 5px;
- 266. - }
- 267. - #lj_data .msg img {
- 268. - margin: 3px 7px;
- 269. - width: 44px;
- 270. - height: 44px;
- 271. - }
- 272. - #lj_error {
- 273. - padding: 10px 0px 10px 140px;
- 274. - color: #800;
- 275. - }
- 276. - #cancel_lj_data {
- 277. - margin-left: 7px;
- 278. - }
- 279. - .export_clear {
- 280. - padding-top: 5px;
- 281. - }
- 282. -
- 283. - /* General settings */
- 284. - .settings_row_wrap {
- 285. - padding-bottom: 10px;
- 286. - }
- 287. - .settings_label {
- 288. - padding: 5px 15px 3px 0;
- 289. - color: #555;
- 290. - width: 125px;
- 291. - }
- 292. - .setbal_label {
- 293. - color: #777;
- 294. - width: 135px;
- 295. - padding: 15px 15px 3px;
- 296. - }
- 297. - .settings_row_button_wrap {
- 298. - padding-left: 140px;
- 299. - }
- 300. - .setbal_row_button_wrap {
- 301. - padding: 13px 165px 0px;
- 302. - }
- 303. - .settings_labeled_text {
- 304. - width: 250px;
- 305. - padding-top: 5px;
- 306. - }
- 307. - .setbal_labeled_text {
- 308. - width: 180px;
- 309. - padding-top: 15px;
- 310. - }
- 311. - .settings_hidden {
- 312. - font-size: 0.9em;
- 313. - color: #777;
- 314. - padding-top: 1px;
- 315. - }
- 316. - #settings_services {
- 317. - padding-top: 10px;
- 318. - }
- 319. - .settings_service_row {
- 320. - padding-bottom: 6px;
- 321. - }
- 322. - .settings_service_row .settings_label,
- 323. - #settings_microblog .settings_label,
- 324. - #settings_appearance .settings_label {
- 325. - color: #777;
- 326. - padding: 0 15px 0 0;
- 327. - height: 15px;
- 328. - }
- 329. - .settings_all_services {
- 330. - padding: 4px 0 0 140px;
- 331. - }
- 332. -
- 333. - #settings_microblog,
- 334. - #settings_appearance {
- 335. - width: 450px;
- 336. - }
- 337. - .settings_microblog_row,
- 338. - .settings_appearance_row {
- 339. - padding-bottom: 10px;
- 340. - }
- 341. - #settings_no_replies_wrap {
- 342. - padding-bottom: 0;
- 343. - }
- 344. -
- 345. - #settings_old_pwd,
- 346. - #settings_new_pwd,
- 347. - #settings_confirm_pwd,
- 348. - #settings_new_mail,
- 349. - #settings_new_phone {
- 350. - width: 142px;
- 351. - }
- 352. -
- 353. - #settings_addr_table {
- 354. - background: #FFF;
- 355. - border: 1px solid #C0CAD5;
- 356. - }
- 357. - .settings_edit_addr_label {
- 358. - color: #777;
- 359. - padding: 3px 0px 3px 3px;
- 360. - }
- 361. - #settings_addr {
- 362. - border: 0;
- 363. - padding: 3px 3px 3px 0;
- 364. - width: 146px;
- 365. - outline: 0;
- 366. - }
- 367. - #settings_address_submit_wrap {
- 368. - overflow: hidden;
- 369. - position: relative;
- 370. - }
- 371. - #settings_addr_disabler,
- 372. - #settdbx_disabler {
- 373. - display: none;
- 374. - width: 400px;
- 375. - background: #FFF;
- 376. - opacity: 0.4;
- 377. - filter: alpha(opacity=40);
- 378. - position: absolute;
- 379. - height: 25px;
- 380. - z-index: 10;
- 381. - margin: 0 auto;
- 382. - }
- 383. -
- 384. - .settings_https_tt table .tt_text {
- 385. - line-height: 160%;
- 386. - width: 280px;
- 387. - padding: 10px;
- 388. - color: #000;
- 389. - }
- 390. -
- 391. - .settings_about_tt table .tt_text {
- 392. - color: #000;
- 393. - padding: 10px;
- 394. - width: 315px;
- 395. - }
- 396. -
- 397. - .settings_about_tt table.toup1 .bottom_pointer,
- 398. - .settings_https_tt table.toup1 .bottom_pointer {
- 399. - margin-right: 0px;
- 400. - margin-left: 64px;
- 401. - display: block;
- 402. - background: url(/images/tooltip_arrow_white.gif) no-repeat;
- 403. - }
- 404. - .settings_about_tt table.toup .top_pointer,
- 405. - .settings_https_tt table.toup .top_pointer {
- 406. - margin-right: 0px;
- 407. - margin-left: 64px;
- 408. - display: block;
- 409. - bottom: -2px;
- 410. - background: url(/images/tooltip_arrow_up.gif) no-repeat;
- 411. - }
- 412. - .settings_side_pwd_tt table .tt_text {
- 413. - line-height: 120%;
- 414. - color: #000;
- 415. - padding: 10px;
- 416. - width: 280px;
- 417. - }
- 418. - .settings_side_email_tt table .tt_text {
- 419. - line-height: 120%;
- 420. - color: #000;
- 421. - padding: 10px;
- 422. - width: 190px;
- 423. - }
- 424. -
- 425. - .settings_password_hint {
- 426. - width: 280px;
- 427. - list-style: url(/images/bullet.gif) outside;
- 428. - padding: 0 0 0 15px;
- 429. - margin: 0;
- 430. - }
- 431. - .settings_side_tt_pointer {
- 432. - background: url(/images/ddtooltip.png) 0 0 no-repeat;
- 433. - width: 8px;
- 434. - height: 11px;
- 435. - position: absolute;
- 436. - left: -7px;
- 437. - top: 40px;
- 438. - overflow: hidden;
- 439. - z-index: 10;
- 440. - }
- 441. - .settings_pwd_pointer {
- 442. - top: 35px;
- 443. - }
- 444. - #settings_pwd_tt_place,
- 445. - #settdbx_addr_tt_place {
- 446. - width: 1px;
- 447. - height: 1px;
- 448. - }
- 449. - .settings_email_pointer {
- 450. - top: 35px;
- 451. - }
- 452. - #settings_last_activity_wrap {
- 453. - padding-bottom: 10px;
- 454. - }
- 455. -
- 456. - #settings_address_check {
- 457. - width: 120px;
- 458. - text-align: center;
- 459. - height: 15px;
- 460. - padding: 6px 0;
- 461. - }
- 462. - #settings_address_progress {
- 463. - margin: 4px auto;
- 464. - }
- 465. - #settings_address_result {
- 466. - padding: 0 10px;
- 467. - }
- 468. - #settings_save_error {
- 469. - margin-bottom: 15px;
- 470. - }
- 471. - #settings_error_pwd div.error {
- 472. - padding: 8px 9px;
- 473. - }
- 474. - #settings_phone_request {
- 475. - margin-bottom: 8px!important;
- 476. - }
- 477. -
- 478. - #activity_history_box .info_msg {
- 479. - border: 0;
- 480. - padding: 16px 20px;
- 481. - background-color: #EEF0F2;
- 482. - }
- 483. - table.history {
- 484. - padding: 10px 20px 20px;
- 485. - width: 100%;
- 486. - border: none;
- 487. - }
- 488. - table.history tr th {
- 489. - color: #36638E;
- 490. - font-size: 1.09em;
- 491. - }
- 492. - table.history tr td, table.history tr th {
- 493. - padding: 10px 0;
- 494. - }
- 495. - table.history tr.old_session {
- 496. - color: #999;
- 497. - }
- 498. - table.history .cur_session {
- 499. - padding-left: 10px;
- 500. - color: #999;
- 501. - }
- 502. - .history_ip {
- 503. - color: #999;
- 504. - }
- 505. - .settings_box_container .label {
- 506. - padding: 5px 15px 3px 0;
- 507. - width: 95px;
- 508. - clear: both;
- 509. - }
- 510. - .settings_box_container .labeled {
- 511. - width: 260px;
- 512. - padding: 2px 0 3px 0;
- 513. - }
- 514. - .settings_box_container .labeled input {
- 515. - width: 160px;
- 516. - }
- 517. - .settings_box_container .labeled span {
- 518. - padding-top: 5px;
- 519. - display: block;
- 520. - color: #555;
- 521. - }
- 522. - #email_bind_error {
- 523. - margin-bottom: 16px;
- 524. - display: none;
- 525. - line-height: 160%;
- 526. - text-align: left;
- 527. - }
- 528. -
- 529. - #settings_deact_reasons {
- 530. - padding: 0px 10px;
- 531. - }
- 532. - .settings_deact_friends {
- 533. - margin: 5px 0px 15px;
- 534. - }
- 535. - .settings_deact_header {
- 536. - font-size: 1.09em;
- 537. - margin-bottom: 19px;
- 538. - }
- 539. - .settings_deact_page {
- 540. - padding: 30px 50px;
- 541. - }
- 542. - .settings_reason {
- 543. - padding: 1px 0px;
- 544. - }
- 545. - .settings_reason_desc {
- 546. - /*padding-bottom: 15px;
- 547. - color: #777777;*/
- 548. - display: none;
- 549. - }
- 550. - .settings_reason_text {
- 551. - width: 360px;
- 552. - margin-top: 5px;
- 553. - height: 33px;
- 554. - }
- 555. - .settings_deact_opts {
- 556. - /*border-top: 1px solid #E8EBEE;*/
- 557. - padding: 0px 10px 10px;
- 558. - margin-top: 3px;
- 559. - }
- 560. - .settings_deact_checkbox {
- 561. - margin: 5px 15px;
- 562. - }
- 563. - .settings_restore_cont {
- 564. - padding: 40px 60px;
- 565. - }
- 566. - .settings_restore_cont h4 {
- 567. - font-size: 1.09em;
- 568. - }
- 569. - .settings_restore_desc {
- 570. - padding: 10px 0px 20px 0px;
- 571. - }
- 572. - .setting_checkbox_label {
- 573. - padding: 5px 0px 0px 0px;
- 574. - }
- 575. - #settings_email_saved {
- 576. - padding: 6px 6px 0px;
- 577. - color: #888888;
- 578. - }
- 579. -
- 580. - #settings_new_phone_list {
- 581. - color: #000;
- 582. - padding-top: 10px;
- 583. - }
- 584. -
- 585. - #settings_name_moved_row {
- 586. - overflow: hidden;
- 587. - }
- 588. - .settings_name_moved_wrap {
- 589. - margin: 0 0 0 140px;
- 590. - }
- 591. - .settings_name_moved {
- 592. - line-height: 160%;
- 593. - margin-bottom: 8px;
- 594. - }
- 595. -
- 596. - #settings_status_default,
- 597. - #settings_show_fullinfo,
- 598. - #settings_no_wall_replies {
- 599. - width: 240px;
- 600. - }
- 601. -
- 602. - #settings_email_msg .msg {
- 603. - margin-bottom: 15px!important;
- 604. - }
- 605. -
- 606. - /* Domain box */
- 607. - .settdbx_wrap {
- 608. - font-size: 12px;
- 609. - }
- 610. - .settdbx_info_wrap {
- 611. - padding: 20px 30px 0;
- 612. - }
- 613. - .settdbx_header {
- 614. - border: 0;
- 615. - padding: 0;
- 616. - margin-bottom: 15px;
- 617. - font-size: 13px;
- 618. - }
- 619. - .settdbx_info {
- 620. - line-height: 140%;
- 621. - }
- 622. - .settdbx_image {
- 623. - background: url(/images/join/address.png) no-repeat 0 0;
- 624. - width: 160px;
- 625. - height: 160px;
- 626. - margin: 20px auto 15px;
- 627. - }
- 628. -
- 629. - .settdbx_edit {
- 630. - background: #F2F2F2;
- 631. - padding: 20px;
- 632. - }
- 633. - .settdbx_field_wrap {
- 634. - margin: 0 auto 10px;
- 635. - width: 230px;
- 636. - }
- 637. - #settdbx_addr_table {
- 638. - background: #FFF;
- 639. - border: 1px solid #C0CAD5;
- 640. - }
- 641. - .settdbx_edit_addr_label {
- 642. - color: #777;
- 643. - padding: 4px 0px 3px 3px;
- 644. - }
- 645. - #settdbx_addr {
- 646. - border: 0;
- 647. - padding: 3px 2px 3px 0;
- 648. - width: 142px;
- 649. - margin: 0px -1px;
- 650. - outline: 0;
- 651. - }
- 652. - .settdbx_submit_wrap {
- 653. - text-align: center;
- 654. - }
- 655. -
- 656. - .settdbx_side_addr_tt table .tt_text {
- 657. - line-height: 120%;
- 658. - color: #000;
- 659. - padding: 10px;
- 660. - width: 150px;
- 661. - font-size: 12px;
- 662. - }
- 663. - .settdbx_side_addr_pointer {
- 664. - top: 47px;
- 665. - }
- 666. - .settdbx_advices_header {
- 667. - font-weight: bold;
- 668. - margin-bottom: 7px;
- 669. - }
- 670. - #settdbx_advices {
- 671. - margin: 0 auto;
- 672. - }
- 673. - .settdbx_advices_wrap {
- 674. - margin-top: 18px;
- 675. - }
- 676. - #settdbx_advices .listing {
- 677. - margin: 0 0 0;
- 678. - padding-left: 25px;
- 679. - }
- 680. -
- 681. - .settings_notice {
- 682. - line-height: 160%;
- 683. - padding-bottom: 15px;
- 684. - }
- 685. -
- 686. - .settings_error_msg {
- 687. - line-height: 160%;
- 688. - }
- 689. -
- 690. - .settings_votes_history_wrap {
- 691. - border-top: 1px solid #DAE1E8;
- 692. - border-bottom: 1px solid #DAE1E8;
- 693. - padding: 5px 20px;
- 694. - background: #FFF;
- 695. - }
- 696. - #settings_votes_history {
- 697. - width: 100%;
- 698. - }
- 699. - #settings_votes_history tr td {
- 700. - padding: 8px 0;
- 701. - border-bottom: 1px solid #DAE1E8;
- 702. - }
- 703. - .settings_history_photo {
- 704. - width: 48px;
- 705. - }
- 706. - .settings_history_photo img {
- 707. - display: block;
- 708. - -moz-border-radius: 2px;
- 709. - -webkit-border-radius: 2px;
- 710. - border-radius: 2px;
- 711. - }
- 712. - .settings_history_thumb {
- 713. - width: 32px;
- 714. - height: 32px;
- 715. - background: #DFE4EB url(/images/icons/payments_s.gif) no-repeat 1px 1px;
- 716. - -moz-border-radius: 2px;
- 717. - -webkit-border-radius: 2px;
- 718. - border-radius: 2px;
- 719. - }
- 720. - .settings_history_thumb_cards {
- 721. - background-position: 1px -33px !important;
- 722. - }
- 723. - .settings_history_thumb_payment_system {
- 724. - background-position: 1px -67px !important;
- 725. - }
- 726. - .settings_history_thumb_terminal {
- 727. - background-position: 1px -101px !important;
- 728. - }
- 729. - .settings_history_thumb_gifts {
- 730. - background-position: 1px -135px !important;
- 731. - }
- 732. - .settings_history_thumb_offers {
- 733. - background-position: 1px -167px !important;
- 734. - }
- 735. - .settings_history_title {
- 736. - width: 300px;
- 737. - }
- 738. - .settings_history_amount {
- 739. - font-weight: bold;
- 740. - color: #777;
- 741. - }
- 742. - .settings_votes_income .settings_history_amount {
- 743. - color: #333;
- 744. - }
- 745. - .settings_history_date {
- 746. - text-align: right;
- 747. - color: #777;
- 748. - }
- 749. - .settings_votes_history_next {
- 750. - padding-bottom: 5px;
- 751. - text-align: center;
- 752. - }
- 753. - .settings_votes_history_next a {
- 754. - padding: 10px;
- 755. - display: block;
- 756. - }
- 757. - .settings_votes_history_next a:hover {
- 758. - background-color: #E9EDF1;
- 759. - text-decoration: none;
- 760. - }
- 761. - .settings_votes_history_next img {
- 762. - padding: 12px 0 11px 0;
- 763. - }
- 764. - #settings_votes_history tr.settings_votes_history_last td {
- 765. - border-bottom: none;
- 766. - }
- 767. - .settings_emoji_time {
- 768. - color: #888888;
- 769. - margin-top: 6px;
- 770. - padding-left: 20px;
- 771. - }
- 772. - .settings_close {
- 773. - padding: 16px 20px 0px;
- 774. - }
- 775. - .settings_emoji_header {
- 776. - padding: 16px 20px 10px;
- 777. - font-size: 1.18em;
- 778. - color: #45688E;
- 779. - font-weight: bold;
- 780. - }
- 781. - .settings_emoji_cont {
- 782. - padding: 0px 20px 20px 20px;
- 783. - text-align: left;
- 784. - }
- 785. - .settings_emoji_buttons {
- 786. - text-align: center;
- 787. - margin-top: 20px;
- 788. - }
- 789. - .settings_emoji_screen {
- 790. - -webkit-border-radius: 5px;
- 791. - -moz-border-radius: 5px;
- 792. - border-radius: 5px;
- 793. - margin: 4px;
- 794. - margin-bottom: 15px;
- 795. - }
- 796. - .settings_emoji_active_btn {
- 797. - margin: 0px 6px;
- 798. - }
- ------
Advertisement
Add Comment
Please, Sign In to add comment