Hormold

VK Change (#1389781804)

Jan 15th, 2014
214
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 63.52 KB | None | 0 0
  1. Файл - groups.css (Старый размер - 14703 | Новый - 0):
  2. 0.  - #groups_css {
  3. 1.  -   display: none;
  4. 2.  - }
  5. 3.  -
  6. 4.  - #group .narrow_column .module_body {
  7. 5.  -   border-left: 1px solid #F1F1F1;
  8. 6.  - }
  9. 7.  - #group .narrow_column .audios_module .module_body {
  10. 8.  -   padding: 8px 0px 8px 8px;
  11. 9.  - }
  12. 10.  - #group {
  13. 11.  -   padding: 10px 10px 0px;
  14. 12.  - }
  15. 13.  - #group h4.simple .top_header {
  16. 14.  -   width: 395px;
  17. 15.  -   height: 1.23em;
  18. 16.  -   white-space: nowrap;
  19. 17.  -   overflow: hidden;
  20. 18.  -   -o-text-overflow: ellipsis;
  21. 19.  -   text-overflow: ellipsis;
  22. 20.  -   text-overflow: ellipsis-word;
  23. 21.  - }
  24. 22.  -
  25. 23.  - .group_info {
  26. 24.  -   padding: 7px 6px 10px;
  27. 25.  -   line-height: 150%;
  28. 26.  - }
  29. 27.  - .group_info_private {
  30. 28.  -   padding-top: 5px;
  31. 29.  -   color: #777;
  32. 30.  - }
  33. 31.  - .group_info .label {
  34. 32.  -   width: 120px;
  35. 33.  -   color: #777;
  36. 34.  -   padding: 3px 0px 0px;
  37. 35.  - }
  38. 36.  - .group_info .labeled {
  39. 37.  -   width: 265px;
  40. 38.  -   overflow: hidden;
  41. 39.  -   padding: 3px 0px 0px;
  42. 40.  - }
  43. 41.  - .group_row_labeled {
  44. 42.  -   padding: 0px 0px 2px;
  45. 43.  - }
  46. 44.  - #page_avatar.group_no_avatar {
  47. 45.  -   padding: 175px 10px 15px;
  48. 46.  -   text-align: center;
  49. 47.  -   background: #EEF2F6 url(/images/no_photo.png) no-repeat 45px 55px;
  50. 48.  - }
  51. 49.  -
  52. 50.  - #group_photos .module_body {
  53. 51.  -   padding: 0px 0px 10px;
  54. 52.  - }
  55. 53.  - #group_photos.module.empty .module_body {
  56. 54.  -   border-bottom: none;
  57. 55.  -   padding: 0px;
  58. 56.  - }
  59. 57.  - #group_photos.module.empty .module_body .empty_wrap {
  60. 58.  -   padding: 20px 0px;
  61. 59.  - }
  62. 60.  - .group_photos_wrap {
  63. 61.  -   margin: 5px -1px 0px;
  64. 62.  - }
  65. 63.  - #group_photos .profile_sized_photos {
  66. 64.  -   margin: 0;
  67. 65.  - }
  68. 66.  - .group_photos_wrap .profile_wide_sized_photos,
  69. 67.  - .page_wide_no_narrow .profile_sized_photos {
  70. 68.  -   display: none;
  71. 69.  - }
  72. 70.  - .page_wide_no_narrow .group_photos_wrap .profile_wide_sized_photos {
  73. 71.  -   display: block;
  74. 72.  - }
  75. 73.  - .group_photos_table, .group_photos_table a img {
  76. 74.  -   margin: 0px auto;
  77. 75.  - }
  78. 76.  - .profile_wide_sized_photos a.page_post_thumb_wrap {
  79. 77.  -   margin-right: 6px;
  80. 78.  - }
  81. 79.  - .group_photos_table a {
  82. 80.  -   display: block;
  83. 81.  -   width: 75px;
  84. 82.  -   height: 57px;
  85. 83.  -   background: #F1F1F1;
  86. 84.  -   text-align: center;
  87. 85.  -   overflow: hidden;
  88. 86.  -   margin: 0px 3px 0px 2px;
  89. 87.  - }
  90. 88.  - #group_photos_upload {
  91. 89.  -   background: #eff1f3;
  92. 90.  -   padding: 17px;
  93. 91.  -   text-align: center;
  94. 92.  -   color: #738392;
  95. 93.  -   line-height: 16px;
  96. 94.  -   display: block;
  97. 95.  - }
  98. 96.  - a#group_photos_upload:hover,
  99. 97.  - #group_photos_upload.hover {
  100. 98.  -   background: #e9edf1;
  101. 99.  -   text-decoration: none;
  102. 100.  - }
  103. 101.  - .group_photos_upload_label {
  104. 102.  -   background: url('/images/camera.gif') left 1px no-repeat;
  105. 103.  -   padding: 4px 0px 4px 35px;
  106. 104.  - }
  107. 105.  -
  108. 106.  - .group_wiki_wrap {
  109. 107.  -   padding-bottom: 10px;
  110. 108.  -   overflow: hidden;
  111. 109.  - }
  112. 110.  - .group_wiki_hider {
  113. 111.  -   padding: 8px 0 8px 125px;
  114. 112.  -   border-top: 1px solid #FFF;
  115. 113.  -   display: block;
  116. 114.  - }
  117. 115.  - .group_wiki_hider span {
  118. 116.  -   padding: 0px 8px;
  119. 117.  -   color: #2B587A;
  120. 118.  -   visibility: hidden;
  121. 119.  - }
  122. 120.  - .group_wiki_hider span:hover {
  123. 121.  -   text-decoration: underline;
  124. 122.  - }
  125. 123.  - .group_wiki_hider:hover {
  126. 124.  -   text-decoration: none;
  127. 125.  -   background: #E9EDF1;
  128. 126.  - }
  129. 127.  - .group_wiki_hider:hover span {
  130. 128.  -   visibility: visible;
  131. 129.  - }
  132. 130.  - #group .group_wiki_wrap .wk_text {
  133. 131.  -   display: none;
  134. 132.  -   padding: 10px 8px;
  135. 133.  -   width: 370px;
  136. 134.  -   word-wrap: break-word;
  137. 135.  -   line-height:150%;
  138. 136.  - }
  139. 137.  - .groups_edit_board_row {
  140. 138.  -   padding: 5px 0px;
  141. 139.  - }
  142. 140.  - .groups_edit_board_label {
  143. 141.  -   padding: 5px 10px 0px;
  144. 142.  -   width: 200px;
  145. 143.  -   color: #777;
  146. 144.  - }
  147. 145.  - .groups_edit_board_labeled {
  148. 146.  -   width: 160px;
  149. 147.  - }
  150. 148.  -
  151. 149.  - #group_voting .module_body {
  152. 150.  -   padding-bottom: 11px;
  153. 151.  - }
  154. 152.  - #group_voting .header_bottom {
  155. 153.  -   padding: 3px 9px;
  156. 154.  - }
  157. 155.  - .group_voting_title {
  158. 156.  -   font-weight: bold;
  159. 157.  -   color: #45688E;
  160. 158.  -   padding: 0px 6px 3px;
  161. 159.  -   margin: 13px 8px 4px;
  162. 160.  -   border-bottom: 1px solid #E7EAED;
  163. 161.  - }
  164. 162.  - .group_voting_row_wrap {
  165. 163.  -   width: 100%;
  166. 164.  -   padding: 0px 5px;
  167. 165.  - }
  168. 166.  - .group_voting_row {
  169. 167.  -   background: #F1F1F1;
  170. 168.  -   width: 100%;
  171. 169.  - }
  172. 170.  - .group_voting_row_desc {
  173. 171.  -   padding: 1px 7px 3px;
  174. 172.  - }
  175. 173.  - .group_voting_text {
  176. 174.  -   padding: 6px 7px 4px;
  177. 175.  - }
  178. 176.  - .group_voting_percent {
  179. 177.  -   background: #E1E7ED;
  180. 178.  -   border: solid #D8DFE5;
  181. 179.  -   border-width: 1px 1px 0px 0px;
  182. 180.  -   height: 13px;
  183. 181.  - }
  184. 182.  - .group_voting_table {
  185. 183.  -   padding: 0px 8px;
  186. 184.  - }
  187. 185.  - .group_voting_table .radiobtn {
  188. 186.  -   padding: 12px 6px;
  189. 187.  -   border-top: 1px solid #E7EAED;
  190. 188.  - }
  191. 189.  - .group_voting_table .radiobtn.first {
  192. 190.  -   padding-top: 8px;
  193. 191.  -   border-top: 0px;
  194. 192.  - }
  195. 193.  - #group_voting_msg {
  196. 194.  -   margin: 10px 14px 0px;
  197. 195.  - }
  198. 196.  - .group_voting_actions {
  199. 197.  -   font-weight: normal;
  200. 198.  - }
  201. 199.  -
  202. 200.  - #group_like_module, .group_block_module {
  203. 201.  -   margin: 0px 0px 10px;
  204. 202.  -   padding: 11px 10px 10px;
  205. 203.  -   background: #F1F1F1;
  206. 204.  -   line-height: 160%;
  207. 205.  - }
  208. 206.  - .group_block_module {
  209. 207.  -   margin: 10px 0px 0px;
  210. 208.  - }
  211. 209.  - .group_like_desc {
  212. 210.  -   padding-bottom: 10px;
  213. 211.  - }
  214. 212.  - .group_like_enter_desc {
  215. 213.  -   padding-top: 10px;
  216. 214.  -   text-align: center;
  217. 215.  -   color: #777;
  218. 216.  - }
  219. 217.  - .group_share_wrap {
  220. 218.  -   padding-top: 1px;
  221. 219.  - }
  222. 220.  - .group_button_wrap {
  223. 221.  -   padding-bottom: 10px;
  224. 222.  - }
  225. 223.  - .group_button_action {
  226. 224.  -   text-align: center;
  227. 225.  - }
  228. 226.  - .group_button_action .progress {
  229. 227.  -   margin: 0px auto;
  230. 228.  - }
  231. 229.  -
  232. 230.  - #group_block_comment_wrap {
  233. 231.  -   padding-top: 10px;
  234. 232.  - }
  235. 233.  - #group_block_comment,
  236. 234.  - #group_block_public_comment,
  237. 235.  - #group_block_admin_comment {
  238. 236.  -   width: 396px;
  239. 237.  -   height: 40px;
  240. 238.  -   padding: 5px;
  241. 239.  -   vertical-align: top;
  242. 240.  - }
  243. 241.  - div.group_block_button,
  244. 242.  - div.group_block_button.dark_box_btn {
  245. 243.  -   margin-top: 26px;
  246. 244.  - }
  247. 245.  - #group_block_reason_wrap,
  248. 246.  - #group_block_duration_wrap {
  249. 247.  -   height: 30px;
  250. 248.  - }
  251. 249.  - .group_block_day,
  252. 250.  - .group_block_month {
  253. 251.  -   padding-left: 5px;
  254. 252.  - }
  255. 253.  - .is_rtl1 .group_block_day,
  256. 254.  - .is_rtl1 .group_block_month {
  257. 255.  -   padding-left: 0;
  258. 256.  -   padding-right: 5px;
  259. 257.  - }
  260. 258.  - #group_block_subreason_wrap {
  261. 259.  -   height: 30px;
  262. 260.  -   padding: 10px 0 0;
  263. 261.  - }
  264. 262.  - #group_block_warning,
  265. 263.  - #group_block_public_preview,
  266. 264.  - #group_block_admin_preview {
  267. 265.  -   padding-bottom: 10px;
  268. 266.  - }
  269. 267.  - #group_block_public_comment_preview,
  270. 268.  - #group_block_admin_comment_preview {
  271. 269.  -   padding-bottom: 10px;
  272. 270.  -   display: none;
  273. 271.  - }
  274. 272.  -
  275. 273.  -
  276. 274.  - .page_actions a.group_block_mem {
  277. 275.  -   display: inline;
  278. 276.  -   padding: 0px;
  279. 277.  -   background: none;
  280. 278.  - }
  281. 279.  - .page_actions a.group_block_mem:hover {
  282. 280.  -   text-decoration: underline;
  283. 281.  -   background: none;
  284. 282.  - }
  285. 283.  -
  286. 284.  - .group_abuse_made {
  287. 285.  -   padding: 4px 6px;
  288. 286.  -   color: #777;
  289. 287.  - }
  290. 288.  -
  291. 289.  - .groups_donate {
  292. 290.  -   margin: 5px 0px;
  293. 291.  -   background: #F7F7F7;
  294. 292.  -   border: solid #DAE1E8;
  295. 293.  -   border-width: 1px 0px;
  296. 294.  -   padding: 7px;
  297. 295.  - }
  298. 296.  - #groups_donate_options {
  299. 297.  -   display: none;
  300. 298.  -   padding-bottom: 5px;
  301. 299.  - }
  302. 300.  - #groups_donate_options .radiobtn {
  303. 301.  -   padding: 3px 5px;
  304. 302.  - }
  305. 303.  - #groups_donate_button {
  306. 304.  -   display: none;
  307. 305.  - }
  308. 306.  - #groups_donate_other {
  309. 307.  -   display: none;
  310. 308.  -   padding: 0px 5px 7px;
  311. 309.  - }
  312. 310.  - #groups_donate_other_val {
  313. 311.  -   width: 70px;
  314. 312.  - }
  315. 313.  - #groups_donate_other_add {
  316. 314.  -   padding: 0px 5px;
  317. 315.  - }
  318. 316.  - .groups_no_donations {
  319. 317.  -   padding: 30px 10px;
  320. 318.  -   text-align: center;
  321. 319.  -   color: #777;
  322. 320.  - }
  323. 321.  - .summary_wrap.groups_donators_summary {
  324. 322.  -   padding: 0px;
  325. 323.  -   margin: 0px 5px 10px;
  326. 324.  - }
  327. 325.  - #groups_donators_wrap {
  328. 326.  -   padding: 7px 5px 0px;
  329. 327.  -   overflow: hidden;
  330. 328.  -   height: 360px;
  331. 329.  - }
  332. 330.  -
  333. 331.  - div.gl_message {
  334. 332.  -   margin: 10px 10px 0px;
  335. 333.  - }
  336. 334.  - .groups_list_search {
  337. 335.  -   background: #F7F7F7;
  338. 336.  -   border-bottom: 1px solid #DAE1E8;
  339. 337.  -   padding: 10px;
  340. 338.  - }
  341. 339.  - #groups_list_search {
  342. 340.  -   padding: 5px 40px 6px 20px;
  343. 341.  -   background: url(/images/magglass.png) no-repeat scroll 5px 6px white;
  344. 342.  -   height: 13px;
  345. 343.  -   width: 320px;
  346. 344.  -   outline: none;
  347. 345.  - }
  348. 346.  - #groups_list_search::-ms-clear {
  349. 347.  -   display: none;
  350. 348.  - }
  351. 349.  -
  352. 350.  - .groups_list {
  353. 351.  -   padding: 0px 10px;
  354. 352.  - }
  355. 353.  - .group_list_row {
  356. 354.  -   border-bottom: 1px solid #EDEDED;
  357. 355.  -   padding: 10px 0;
  358. 356.  -   background: #FFFFFF;
  359. 357.  - }
  360. 358.  - .group_list_row:last-child {
  361. 359.  -   border-bottom: 0px;
  362. 360.  - }
  363. 361.  - .group_row_blockinv {
  364. 362.  -   white-space: nowrap;
  365. 363.  -   overflow: hidden;
  366. 364.  -   -o-text-overflow: ellipsis;
  367. 365.  -   text-overflow: ellipsis;
  368. 366.  -   padding-top: 10px;
  369. 367.  - }
  370. 368.  - .group_row_photo {
  371. 369.  -   height: 100px;
  372. 370.  -   overflow: hidden;
  373. 371.  -   width: 100px;
  374. 372.  - }
  375. 373.  - .group_row_info {
  376. 374.  -   padding-left: 10px;
  377. 375.  -   width: 485px;
  378. 376.  -   overflow: hidden;
  379. 377.  -   color: #777777;
  380. 378.  - }
  381. 379.  - .group_inv_info {
  382. 380.  -   padding: 0px 0px 0px 15px;
  383. 381.  -   width: 480px;
  384. 382.  -   overflow: hidden;
  385. 383.  - }
  386. 384.  - .group_row_label {
  387. 385.  -   color: #777;
  388. 386.  -   width: 70px;
  389. 387.  -   padding: 0 10px;
  390. 388.  - }
  391. 389.  - .group_row_labeled, .group_row_status_wrap {
  392. 390.  -   margin-bottom: 3px;
  393. 391.  -   width: 405px;
  394. 392.  - }
  395. 393.  - .group_row_status_wrap {
  396. 394.  -   color: #777;
  397. 395.  -   padding: 5px 0;
  398. 396.  - }
  399. 397.  - .group_row_actions {
  400. 398.  -   padding: 0 5px;
  401. 399.  - }
  402. 400.  - .group_row_actions {
  403. 401.  -   padding: 0px;
  404. 402.  - }
  405. 403.  - .groups_no_list {
  406. 404.  -   border: 0;
  407. 405.  -   background: #FFF;
  408. 406.  -   color: #777;
  409. 407.  -   font-size: 1.18em;
  410. 408.  -   margin: 0 0 3px;
  411. 409.  -   padding: 80px 0;
  412. 410.  -   text-align: center;
  413. 411.  -   overflow: hidden;
  414. 412.  -   text-overflow: ellipsis;
  415. 413.  - }
  416. 414.  - .groups_more_link {
  417. 415.  -   display: block;
  418. 416.  -   padding: 10px 0px;
  419. 417.  -   margin: 0px 10px 10px;
  420. 418.  -   border-top: 1px solid #DAE1E8;
  421. 419.  -   text-align: center;
  422. 420.  - }
  423. 421.  - .groups_more_link:hover {
  424. 422.  -   background: #E1E7ED;
  425. 423.  -   text-decoration: none;
  426. 424.  - }
  427. 425.  - .group_friends_in_gr {
  428. 426.  -   padding-top: 6px;
  429. 427.  -   margin: 0px -2px;
  430. 428.  - }
  431. 429.  - .group_friend_in_gr {
  432. 430.  -   height: 32px;
  433. 431.  -   overflow: hidden;
  434. 432.  -   padding: 0px 2px;
  435. 433.  - }
  436. 434.  - .group_row_buttons {
  437. 435.  -   margin: 8px -3px 0px -2px;
  438. 436.  - }
  439. 437.  - .group_row_button {
  440. 438.  -   margin: 0px 3px 0px 2px;
  441. 439.  - }
  442. 440.  -
  443. 441.  - .group_friend_in_img {
  444. 442.  -   width: 32px;
  445. 443.  - }
  446. 444.  - .groups_create_box {
  447. 445.  -   padding: 3px 0px 1px;
  448. 446.  -   width: 370px;
  449. 447.  - }
  450. 448.  - .groups_create_header {
  451. 449.  -   color: #36638E;
  452. 450.  -   font-size: 1.09em;
  453. 451.  -   font-weight: bold;
  454. 452.  -   margin: 11px 0px 5px;
  455. 453.  - }
  456. 454.  - .groups_create_section {
  457. 455.  -   padding: 9px 1px 2px;
  458. 456.  - }
  459. 457.  - .groups_create_section .radiobtn div {
  460. 458.  -   width: 18px;
  461. 459.  - }
  462. 460.  - .groups_create_about {
  463. 461.  -   color: #777;
  464. 462.  -   padding: 2px 23px 0px;
  465. 463.  - }
  466. 464.  - #group_create_title, #group_create_desc {
  467. 465.  -   width: 360px;
  468. 466.  - }
  469. 467.  - .groups_about_public {
  470. 468.  -   font-size: 0.9em;
  471. 469.  -   color: #777;
  472. 470.  -   padding-top: 10px;
  473. 471.  - }
  474. 472.  - .groups_search_focused .group_row_highlight {
  475. 473.  -   background: #E1E7ED;
  476. 474.  -   border-bottom: 1px solid #DAE1E8;
  477. 475.  -   padding: 0px 1px 0px;
  478. 476.  -   margin: 0px -1px;
  479. 477.  -   *padding: 0px;
  480. 478.  -   *margin: 0px;
  481. 479.  - }
  482. 480.  - .group_full_private {
  483. 481.  -   font-size: 1.09em;
  484. 482.  -   padding: 140px 20px 200px;
  485. 483.  -   text-align: center;
  486. 484.  -   width: 567px;
  487. 485.  - }
  488. 486.  -
  489. 487.  - .public_contacts_list {
  490. 488.  -   padding: 7px 5px 5px;
  491. 489.  -   overflow-y: scroll;
  492. 490.  -   overflow-x: hidden;
  493. 491.  -   height: 298px;
  494. 492.  -   width: 455px;
  495. 493.  - }
  496. 494.  - .public_contacts_list_header {
  497. 495.  -   border-bottom: 1px solid rgb(218, 225, 232);
  498. 496.  -   margin: 0pt 5px 4px;
  499. 497.  -   padding: 5px 0pt 2px;
  500. 498.  -   width: 430px;
  501. 499.  - }
  502. 500.  - .public_contacts_list .row {
  503. 501.  -   padding: 6px;
  504. 502.  -   width: 50px;
  505. 503.  - }
  506. 504.  - .public_contacts_list .info {
  507. 505.  -   padding: 6px 5px;
  508. 506.  -   width: 240px;
  509. 507.  - }
  510. 508.  - .public_contacts_list .info_wide {
  511. 509.  -   padding: 6px 5px;
  512. 510.  -   width: 350px;
  513. 511.  - }
  514. 512.  - .public_contacts_list .actions {
  515. 513.  -   width: 120px;
  516. 514.  -   padding: 8px 0;
  517. 515.  - }
  518. 516.  - .public_contacts_list .edit_actions {
  519. 517.  -   width: 120px;
  520. 518.  - }
  521. 519.  - .public_contacts_list .name a {
  522. 520.  -   font-size: 1.09em;
  523. 521.  -   color: #2B587A;
  524. 522.  -   font-weight: bold;
  525. 523.  -   padding-bottom: 5px;
  526. 524.  - }
  527. 525.  - .public_contacts_list .name span {
  528. 526.  -   font-weight: bold;
  529. 527.  -   font-size: 1.09em;
  530. 528.  -   padding-bottom: 5px;
  531. 529.  -   color: #777777;
  532. 530.  - }
  533. 531.  - .public_contacts_list .image {
  534. 532.  -   height: 50px;
  535. 533.  -   width: 50px;
  536. 534.  -   overflow: hidden;
  537. 535.  - }
  538. 536.  - .public_contacts_list h2 {
  539. 537.  -   border: 0;
  540. 538.  - }
  541. 539.  - .public_contacts_list .cell {
  542. 540.  -   width: 435px;
  543. 541.  -   border-bottom: 1px solid #E6EAED;
  544. 542.  - }
  545. 543.  - .public_contacts_list .desc {
  546. 544.  -   padding: 4px 2px 0;
  547. 545.  - }
  548. 546.  - .public_contacts_list .extra_info {
  549. 547.  -   padding: 4px 2px 0;
  550. 548.  -   color: #777777;
  551. 549.  -   line-height: 150%;
  552. 550.  - }
  553. 551.  - .public_contacts_list .extra_info a {
  554. 552.  -   color: #777777;
  555. 553.  - }
  556. 554.  - .public_contacts_list .extra_info span {
  557. 555.  -   background: url(/images/icons/info_icons.gif) no-repeat 0 0;
  558. 556.  -   padding: 0 8px 0 13px;
  559. 557.  - }
  560. 558.  - .public_contacts_list .extra_info .info_phone {
  561. 559.  -   background-position: 0 -18px;
  562. 560.  -   padding-left: 9px;
  563. 561.  - }
  564. 562.  - .public_no_contacts {
  565. 563.  -   padding: 145px 5px 5px;
  566. 564.  -   height: 140px;
  567. 565.  -   text-align: center;
  568. 566.  -   font-size: 1.09em;
  569. 567.  -   color:gray;
  570. 568.  - }
  571. 569.  -
  572. 570.  -
  573. 571.  - #group_like_module .like_link_state {
  574. 572.  -   width: 180px;
  575. 573.  - }
  576. 574.  - #group_like_module #group_subscribe.like_link_state {
  577. 575.  -   padding: 6px 0px 8px;
  578. 576.  - }
  579. 577.  - #group_like_module .like_link_state .subscribe_button_wrap {
  580. 578.  -   padding: 3px 30px 14px;
  581. 579.  - }
  582. 580.  - #group_like_module .like_link_state .desc {
  583. 581.  -   padding-bottom: 13px;
  584. 582.  - }
  585. 583.  - #group_like_module .like_link_state .desc .share_event_link {
  586. 584.  -   padding-top: 1px;
  587. 585.  - }
  588. 586.  - #group_like_module .group_friends_count {
  589. 587.  -   text-align: center;
  590. 588.  - }
  591. 589.  - #group_decline_past_event, #group_restore_past_event {
  592. 590.  -   padding-top: 8px;
  593. 591.  - }
  594. 592.  - .group_event_took_place {
  595. 593.  -   padding-bottom: 5px;
  596. 594.  - }
  597. 595.  - .group_user_invited {
  598. 596.  -   padding: 2px 0 11px;
  599. 597.  -   text-align: center;
  600. 598.  - }
  601. 599.  -
  602. 600.  -
  603. 601.  - #public_contact_memlink_tip {
  604. 602.  -   color: #777;
  605. 603.  -   padding: 3px 0;
  606. 604.  -   font-size: 0.9em;
  607. 605.  - }
  608. 606.  - .public_edit_contact_info h2 {
  609. 607.  -   margin: 0 0 10px 10px;
  610. 608.  - }
  611. 609.  - .public_edit_contact_info .label {
  612. 610.  -   padding: 3px 10px 2px;
  613. 611.  -   width: 70px;
  614. 612.  -   clear: both;
  615. 613.  -   color: #777;
  616. 614.  - }
  617. 615.  - .public_edit_contact_info .labeled_text {
  618. 616.  -   padding: 3px 0px 10px;
  619. 617.  -   width: 190px;
  620. 618.  - }
  621. 619.  - .public_edit_contact_info .labeled {
  622. 620.  -   padding: 0px 0px 5px;
  623. 621.  -   width: 190px;
  624. 622.  -   overflow: hidden;
  625. 623.  - }
  626. 624.  - .public_edit_contact_info .labeled .text {
  627. 625.  -   width: 182px;
  628. 626.  - }
  629. 627.  -
  630. 628.  - .gle_block {
  631. 629.  -   width: 190px;
  632. 630.  -   overflow: hidden;
  633. 631.  -   padding: 10px 0px;
  634. 632.  - }
  635. 633.  - .gle_table {
  636. 634.  -   width: 190px;
  637. 635.  - }
  638. 636.  - .gle_td {
  639. 637.  -   vertical-align: top;
  640. 638.  - }
  641. 639.  - .gle_thumb {
  642. 640.  -   display: block;
  643. 641.  -   width: 50px;
  644. 642.  -   height: 50px;
  645. 643.  -   overflow: hidden;
  646. 644.  - }
  647. 645.  - .gle_img {
  648. 646.  -   width: 50px;
  649. 647.  -   vertical-align: top;
  650. 648.  - }
  651. 649.  - .gle_row {
  652. 650.  -   padding: 1px 0px 2px;
  653. 651.  -   margin: 0px 8px;
  654. 652.  -   width: 124px;
  655. 653.  -   white-space: nowrap;
  656. 654.  -   height: 13px;
  657. 655.  -   overflow: hidden;
  658. 656.  -   -o-text-overflow: ellipsis;
  659. 657.  -   text-overflow: ellipsis;
  660. 658.  - }
  661. 659.  - .gle_date, .gle_place {
  662. 660.  -   color: #777;
  663. 661.  - }
  664. 662.  - .gl_events_msg_hide {
  665. 663.  -   padding: 15px 0px 3px;
  666. 664.  - }
  667. 665.  - div.gl_summary_short {
  668. 666.  -   padding: 13px 0px 0px;
  669. 667.  -   margin: 0px 10px;
  670. 668.  - }
  671. 669.  - .gle_list {
  672. 670.  -   padding: 0px 10px;
  673. 671.  - }
  674. 672.  - #gle_list_more_lnk {
  675. 673.  -   display: block;
  676. 674.  -   background: #EFF1F3;
  677. 675.  -   margin: 0px 10px 10px;
  678. 676.  -   padding: 10px;
  679. 677.  -   text-align: center;
  680. 678.  -   color: #738392;
  681. 679.  - }
  682. 680.  - #gle_list_more_lnk:hover {
  683. 681.  -   background: #E9EDF1;
  684. 682.  -   text-decoration: none;
  685. 683.  - }
  686. 684.  - #gle_list_more {
  687. 685.  -   display: none;
  688. 686.  - }
  689. 687.  -
  690. 688.  - .group_share_club {
  691. 689.  -   text-decoration: none;
  692. 690.  -   width: 11px;
  693. 691.  -   height: 13px;
  694. 692.  -   background: url(/images/icons/mono_iconset.gif?8) no-repeat 0px -192px;
  695. 693.  -   cursor: pointer;
  696. 694.  -   margin: 3px 5px 0px;
  697. 695.  - }
  698. 696.  - #group_share_progress, #group_unshare_progress {
  699. 697.  -   height: 17px;
  700. 698.  - }
  701. 699.  - .groups_list_search_summary {
  702. 700.  -   padding: 8px 0px 0px;
  703. 701.  - }
  704. 702.  - .groups_list_last_row {
  705. 703.  -   border-bottom: none;
  706. 704.  - }
  707. 705.  - #groups_loading {
  708. 706.  -   background: url('/images/upload.gif') center center no-repeat;
  709. 707.  -   width: 32px;
  710. 708.  -   height: 9px;
  711. 709.  -   margin: 7px 0px 0px 342px;
  712. 710.  -   z-index: 95;
  713. 711.  -   position: absolute;
  714. 712.  -   display: none;
  715. 713.  - }
  716. 714.  - #groups_reset_search {
  717. 715.  -   margin: 1px 0px 0px 356px;
  718. 716.  -   display: none;
  719. 717.  -   cursor: pointer;
  720. 718.  -   background: transparent url(/images/icons/input_clear.gif) 6px 6px no-repeat;
  721. 719.  -   padding: 2px;
  722. 720.  -   width: 19px;
  723. 721.  -   height: 19px;
  724. 722.  -   opacity: 0.6;
  725. 723.  -   filter: alpha(opacity=60);
  726. 724.  -   position: absolute;
  727. 725.  -   z-index: 95;
  728. 726.  - }
  729. 727.  - #groups_list_search_cont {
  730. 728.  -   display: none;
  731. 729.  - }
  732. 730.  - .groups_row_type {
  733. 731.  -   color: #777;
  734. 732.  -   /*margin-left: 8px;*/
  735. 733.  -   display: block;
  736. 734.  -   padding-top: 4px;
  737. 735.  - }
  738. 736.  - .groups_inv_more {
  739. 737.  -   display: none;
  740. 738.  - }
  741. 739.  - .groups_inv_showmore {
  742. 740.  -   display: block;
  743. 741.  -   padding: 10px 0px;
  744. 742.  -   margin: 0px;
  745. 743.  -   border-top: 1px solid #DAE1E8;
  746. 744.  -   text-align: center;
  747. 745.  - }
  748. 746.  - .groups_inv_showmore:hover {
  749. 747.  -   background: #E1E7ED;
  750. 748.  -   text-decoration: none;
  751. 749.  - }
  752. 750.  - .gle_invites_list {
  753. 751.  -   padding: 0px 10px;
  754. 752.  - }
  755. 753.  - .groups_inv_last_row {
  756. 754.  -   border-bottom: none;
  757. 755.  -   padding-bottom: 0px;
  758. 756.  - }
  759. 757.  - .groups_inv_info {
  760. 758.  -   width: 540px;
  761. 759.  -   padding-left: 10px;
  762. 760.  - }
  763. 761.  - .groups_inv_info_l {
  764. 762.  -   color: #777777;
  765. 763.  -   margin-left: 8px;
  766. 764.  - }
  767. 765.  - .groups_inv_cont {
  768. 766.  -   background: #F7F7F7;
  769. 767.  -   padding: 10px;
  770. 768.  -   margin: 8px 0px 0px 0px;
  771. 769.  - }
  772. 770.  - .groups_row_inv_info {
  773. 771.  -   padding-left: 10px;
  774. 772.  -   width: 410px;
  775. 773.  - }
  776. 774.  - .group_inv_status {
  777. 775.  -   margin-top: 2px;
  778. 776.  -   color: #777777;
  779. 777.  - }
  780. 778.  - .groups_acted_text {
  781. 779.  -   padding: 0px 0px 4px;
  782. 780.  - }
  783. 781.  - .gle_summary_progress {
  784. 782.  -   display: none;
  785. 783.  - }
  786. 784.  - #gle_invites_more {
  787. 785.  -   display: none;
  788. 786.  - }
  789. 787.  - .group_inv_event_time {
  790. 788.  -   padding: 2px 0px 4px;
  791. 789.  - }
  792. 790.  - .groups_row_img {
  793. 791.  -   width: 100px;
  794. 792.  - }
  795. 793.  - .gle_invites_actions {
  796. 794.  -   margin: 0px 0px 14px;
  797. 795.  -   text-align: center;
  798. 796.  -   background: #F7F7F7;
  799. 797.  -   padding: 8px;
  800. 798.  - }
  801. 799.  -
  802. 800.  - div.gtop_message {
  803. 801.  -   margin: 0 0 10px 0;
  804. 802.  -   padding: 8px 13px;
  805. 803.  -   border: none;
  806. 804.  -   background-color: #F0F2F5;
  807. 805.  - }
  808. 806.  - .gtop_mesage_buttons {
  809. 807.  -   padding: 10px 0px 3px;
  810. 808.  - }
  811. 809.  - .gtop_mesage_buttons a {
  812. 810.  -   margin: 6px 0 0 20px;
  813. 811.  - }
  814. ------
  815. Файл - groups_list.js (Старый размер - 35578 | Новый - 0):
  816. 0.  - var GroupsList = {
  817. 1.  -   rand: function() {
  818. 2.  -     return Math.floor(Math.random() * 10000);
  819. 3.  -   },
  820. 4.  -   enter: function(el, gid, hash, act, past) {
  821. 5.  -     if (cur.invSwitching) {
  822. 6.  -       setTimeout(GroupsList.enter.pbind(el, gid, hash, act, past), 100);
  823. 7.  -       return false;
  824. 8.  -     }
  825. 9.  -     var sp, hp, tab = cur.scrollList.tab;
  826. 10.  -
  827. 11.  -     if (el.tagName.toLowerCase() != 'button') {
  828. 12.  -       if (!el.backhtml) {
  829. 13.  -         el.backhtml = el.innerHTML;
  830. 14.  -       }
  831. 15.  -       sp = function() {
  832. 16.  -         var w = getSize(el)[0];
  833. 17.  -         el.innerHTML = '<span class="progress_inline"></span>';
  834. 18.  -         setStyle(el, {width: w - 30});
  835. 19.  -       }
  836. 20.  -       hp = function() {
  837. 21.  -         el.innerHTML = el.backhtml;
  838. 22.  -       }
  839. 23.  -     } else {
  840. 24.  -       sp = lockButton.pbind(el);
  841. 25.  -       hp = unlockButton.pbind(el);
  842. 26.  -     }
  843. 27.  -
  844. 28.  -     var key = GroupsList.rand(), value = GroupsList.rand();
  845. 29.  -     cur.scrollList[key] = value;
  846. 30.  -
  847. 31.  -     var context = (cur.scrollList.tab == 'groups') ? '2' : '1';
  848. 32.  -
  849. 33.  -     var shown = false;
  850. 34.  -     cur.invSwitching = true;
  851. 35.  -     if (GroupsList.switchInvite(gid, (act == 'decline' && !past))) {
  852. 36.  -       shown = true;
  853. 37.  -       sp = false;
  854. 38.  -       hp = false;
  855. 39.  -     }
  856. 40.  -
  857. 41.  -     ajax.post('al_groups.php', {
  858. 42.  -       act: 'enter',
  859. 43.  -       gid: gid,
  860. 44.  -       hash: hash,
  861. 45.  -       context: context + (act ? '_' + act : ''),
  862. 46.  -       inv_shown: cur.scrollList.invShown
  863. 47.  -     }, {
  864. 48.  -       onDone: function(newRow, added) {
  865. 49.  -         cur.invSwitching = false;
  866. 50.  -         if (!cur.scrollList || cur.scrollList[key] != value) return;
  867. 51.  -
  868. 52.  -         var list = cur.scrollList.lists[tab], newStatus = past ? 5 : 1;
  869. 53.  -         if (act == 'unsure') {
  870. 54.  -           newStatus = past ? 5 : 3;
  871. 55.  -         } else if (act == 'decline') {
  872. 56.  -           newStatus = past ? -3 : -1;
  873. 57.  -         } else if (act == 'undecided') {
  874. 58.  -           newStatus = 4;
  875. 59.  -         }
  876. 60.  -         if (!list || list == 'loading' || list == 'update') {
  877. 61.  -           cur.scrollList.processed[tab][gid] = newStatus;
  878. 62.  -         } else {
  879. 63.  -           for (var i = 0, count = list.length; i < count; ++i) {
  880. 64.  -             if (list[i][2] == gid) {
  881. 65.  -               list[i][1] = newStatus;
  882. 66.  -             }
  883. 67.  -           }
  884. 68.  -         }
  885. 69.  -
  886. 70.  -         var row = ge('gl_' + tab + gid);
  887. 71.  -
  888. 72.  -         GroupsList.addInvite(newRow, added, act);
  889. 73.  -
  890. 74.  -         var rowEl = geByClass1('group_list_row', ge('groups_list_content'));
  891. 75.  -         if (rowEl && rowEl.id == 'gl_' + tab + gid) {
  892. 76.  -           setStyle(rowEl, {backgroundColor: '#FEFAE4'});
  893. 77.  -           animate(rowEl, {backgroundColor: '#FFF'}, 2000);
  894. 78.  -         }
  895. 79.  -
  896. 80.  -         if (shown) {
  897. 81.  -           if (cur.switchedInvite && act == 'decline' && !past) {
  898. 82.  -             var switchedHtml = getLang('groups_event_left') + ' <a onclick="GroupsList.spam(this.parentNode, ' + gid + ', \'' + hash + '\', cur.switchedInvite)">' + getLang('its_spam') + '</a>';
  899. 83.  -             if (ge('clubinv' + gid)) switchedHtml += '<div class="group_row_blockinv"><a onclick="GroupsList.spam(domPN(domPN(this)), ' + gid + ', \'' + hash + '\', cur.switchedInvite, 1)">' + getLang('groups_block_clubinv').replace('{club}', '<b>' + val(domPS(ge('clubinv' + gid))) + '</b>') + '</a></div>';
  900. 84.  -             cur.switchedInvite.innerHTML = switchedHtml;
  901. 85.  -           }
  902. 86.  -           return;
  903. 87.  -         }
  904. 88.  -
  905. 89.  -         if (!row) return;
  906. 90.  -
  907. 91.  -         var status = geByClass1('group_row_status', row), actions = geByClass1('group_row_actions', row), old = status.basehtml;
  908. 92.  -         var actOld = actions.basehtml;
  909. 93.  -         status.basehtml = status.innerHTML;
  910. 94.  -         actions.basehtml = actions.innerHTML;
  911. 95.  -         if (act == 'undecided') {
  912. 96.  -           actions.innerHTML = actOld || '';
  913. 97.  -           status.innerHTML = old || '\
  914. 98.  - <div class="group_row_buttons">\
  915. 99.  -   <div class="group_row_button button_blue fl_l">\
  916. 100.  -     <button onclick="GroupsList.enter(this, ' + gid + ', \'' + hash + '\', \'join\')">' + getLang('groups_event_go_btn') + '</button>\
  917. 101.  -   </div>\
  918. 102.  -   <div class="group_row_button button_blue fl_l">\
  919. 103.  -     <button onclick="GroupsList.enter(this, ' + gid + ', \'' + hash + '\', \'unsure\')">' + getLang('groups_event_maybe_btn') + '</button>\
  920. 104.  -   </div>\
  921. 105.  -   <div class="group_row_button button_cancel fl_l">\
  922. 106.  -     <div class="button" onclick="GroupsList.enter(this, ' + gid + ', \'' + hash + '\', \'decline\')">' + getLang('groups_event_cant_btn') + '</div>\
  923. 107.  -   </div>\
  924. 108.  - </div>';
  925. 109.  -         } else if (act) {
  926. 110.  -           if (past) {
  927. 111.  -             var statHTML = getLang('groups_was_on_event');
  928. 112.  -             if (act == 'decline') {
  929. 113.  -               actions.innerHTML = '<a onclick="GroupsList.enter(this.parentNode, ' + gid + ', \'' + hash + '\', \'join\', true)">' + getLang('groups_return_event') + '</a>';
  930. 114.  -             } else {
  931. 115.  -               actions.innerHTML = '<a onclick="GroupsList.enter(this.parentNode, ' + gid + ', \'' + hash + '\', \'decline\', true)">' + getLang('groups_remove_event') + '</a>';
  932. 116.  -             }
  933. 117.  -           } else {
  934. 118.  -             var acts = '<a onclick="GroupsList.enter(this.parentNode, ' + gid + ', \'' + hash + '\', \'undecided\')">' + getLang('groups_event_change') + '</a>';
  935. 119.  -             if (act == 'unsure') {
  936. 120.  -               var statHTML = getLang('groups_unsure_event');
  937. 121.  -             } else if (act == 'decline') {
  938. 122.  -               var statHTML = getLang('groups_event_left');
  939. 123.  -               acts += '<span class="divider">|</span><a onclick="GroupsList.spam(this.parentNode, ' + gid + ', \'' + hash + '\')">' + getLang('its_spam') + '</a>';
  940. 124.  -               if (ge('clubinv' + gid)) acts += '<div class="group_row_blockinv"><a onclick="GroupsList.spam(domPN(domPN(this)), ' + gid + ', \'' + hash + '\', false, 1)">' + getLang('groups_block_clubinv').replace('{club}', '<b>' + val(domPS(ge('clubinv' + gid))) + '</b>') + '</a></div>';
  941. 125.  -             } else {
  942. 126.  -               var statHTML = getLang('groups_you_in_event');
  943. 127.  -             }
  944. 128.  -             actions.innerHTML = acts;
  945. 129.  -           }
  946. 130.  -           status.innerHTML = '<div class="groups_acted_text">'+statHTML+'</div>';
  947. 131.  -           cur.lst = status;
  948. 132.  -         } else {
  949. 133.  -           status.innerHTML = '<div class="groups_acted_text">'+getLang('groups_group_enter_message')+'</div>';
  950. 134.  -           actions.innerHTML = '<a onclick="GroupsList.cancel(this.parentNode, ' + gid + ', \'' + hash + '\')">' + getLang('global_cancel') + '</a>';
  951. 135.  -         }
  952. 136.  -
  953. 137.  -         if (tab == 'inv') {
  954. 138.  -           var row = ge('gl_groups'+ gid);
  955. 139.  -           if (row) {
  956. 140.  -             var statusOne = geByClass1('group_row_status', row), actionsOne = geByClass1('group_row_actions', row);
  957. 141.  -             statusOne.innerHTML = status.innerHTML;
  958. 142.  -             actionsOne.innerHTML = actions.innerHTML;
  959. 143.  -           }
  960. 144.  -         }
  961. 145.  -         if (act == 'join' || act == 'unsure') {
  962. 146.  -           GroupsList.updateEventsList(gid);
  963. 147.  -         } else if (act == 'undecided') {
  964. 148.  -           GroupsList.updateEventsList(false);
  965. 149.  -         }
  966. 150.  -         /*var list = cur.scrollList.lists[tab];
  967. 151.  -         if (act == 'join' || act == 'unsure' || act == 'decline') {
  968. 152.  -           GroupsList.updateEventsList();
  969. 153.  -           for(var i in list) {
  970. 154.  -             if (list[i][2] == gid) {
  971. 155.  -               cur['gid_restore_el'+gid] = [list.splice(i, 1), i];
  972. 156.  -             }
  973. 157.  -           }
  974. 158.  -         } else if (act == 'undecided' && cur['gid_restore_el'+gid]) {
  975. 159.  -           list.splice(cur['gid_restore_el'+gid][1], 0, cur['gid_restore_el'+gid][0][0]);
  976. 160.  -         }*/
  977. 161.  -       },
  978. 162.  -       onFail: function(text) {
  979. 163.  -         if (text) {
  980. 164.  -           setTimeout(showFastBox(getLang('global_error'), text).hide, 3000);
  981. 165.  -           return true;
  982. 166.  -         }
  983. 167.  -       },
  984. 168.  -       showProgress: sp, hideProgress: hp
  985. 169.  -     });
  986. 170.  -   },
  987. 171.  -
  988. 172.  -   addInvite: function(newRow, added, act) {
  989. 173.  -     if (newRow) {
  990. 174.  -       var moreCont = ge('gle_invites_more');
  991. 175.  -       moreCont.appendChild(se(newRow));
  992. 176.  -       cur.scrollList.invShown += 1;
  993. 177.  -       if (cur.scrollList.invSwitchGid) {
  994. 178.  -         GroupsList.switchInvite(cur.scrollList.invSwitchGid);
  995. 179.  -         cur.scrollList.invSwitchGid = false;
  996. 180.  -       }
  997. 181.  -     }
  998. 182.  -
  999. 183.  -     if (added && cur.scrollList.lists.groups) {
  1000. 184.  -       var l = cur.scrollList.lists.groups;
  1001. 185.  -       if (act == 'join' || act == 'unsure') {;
  1002. 186.  -         l.push(added);
  1003. 187.  -       } else if (!act) {
  1004. 188.  -         l.unshift(added); // add to the start
  1005. 189.  -       } else if (act == 'undecided') {
  1006. 190.  -         for (var i in l) {
  1007. 191.  -           if (l[i][2] == added[2]) {
  1008. 192.  -             l.splice(i, 1)
  1009. 193.  -           }
  1010. 194.  -         }
  1011. 195.  -       }
  1012. 196.  -       cur.scrollList.cache['groups'] = {all: []};
  1013. 197.  -       var c = cur.scrollList.cache['groups'];
  1014. 198.  -       for (var i in l) {
  1015. 199.  -         c.all.push(i);
  1016. 200.  -       }
  1017. 201.  -       cur.scrollList.index['groups'] = new vkIndexer(c.all, function(obj) {
  1018. 202.  -         return l[obj][0];
  1019. 203.  -       });
  1020. 204.  -       GroupsList.showMore(true);
  1021. 205.  -     }
  1022. 206.  -   },
  1023. 207.  -
  1024. 208.  -   switchInvite: function(gid, prepareActs) {
  1025. 209.  -     var tab = cur.scrollList.tab;
  1026. 210.  -     if (tab != 'groups') {
  1027. 211.  -       return false;
  1028. 212.  -     }
  1029. 213.  -
  1030. 214.  -     var row = ge('gl_' + tab + gid);
  1031. 215.  -
  1032. 216.  -     var moreCont = ge('gle_invites_more');
  1033. 217.  -     var newRows = moreCont.childNodes;
  1034. 218.  -     if (!newRows.length) {
  1035. 219.  -       if (cur.scrollList.invShown < cur.scrollList.invCount) {
  1036. 220.  -         cur.scrollList.invSwitchGid = gid;
  1037. 221.  -         return true;
  1038. 222.  -       }
  1039. 223.  -       return false;
  1040. 224.  -     }
  1041. 225.  -     var newRow = newRows[0];
  1042. 226.  -
  1043. 227.  -     if (!newRow) {
  1044. 228.  -       return false;
  1045. 229.  -     }
  1046. 230.  -
  1047. 231.  -     if (cur.switchedInvite) {
  1048. 232.  -       slideUp(cur.switchedInvite);
  1049. 233.  -     }
  1050. 234.  -     if (prepareActs) {
  1051. 235.  -       cur.switchedInvite = ce('div', {className: 'gle_invites_actions', innerHTML: '<div class="progress_inline"></div>'});
  1052. 236.  -       newRow.insertBefore(cur.switchedInvite, newRow.firstChild)
  1053. 237.  -     }
  1054. 238.  -
  1055. 239.  -     cur.scrollList.invShown -= 1;
  1056. 240.  -     cur.scrollList.invCount -= 1;
  1057. 241.  -
  1058. 242.  -     var cont = row.parentNode;
  1059. 243.  -     var size = getSize(cont);
  1060. 244.  -     setStyle(newRow, {opacity: 0, overflow: 'hidden', height: 1, position: 'absolute'});
  1061. 245.  -     cont.appendChild(newRow);
  1062. 246.  -     animate(newRow, {marginTop: -size[1], opacity: 1, height: size[1]}, 200, function() {
  1063. 247.  -       hide(row);
  1064. 248.  -       setStyle(newRow, {marginTop: 0, position: 'static', height: 'auto'});
  1065. 249.  -     });
  1066. 250.  -
  1067. 251.  -     if (cur.scrollList.invCount) {
  1068. 252.  -       ge('gle_inv_summary').innerHTML = langNumeric(cur.scrollList.invCount, cur.scrollList.summaries.inv);
  1069. 253.  -     } else {
  1070. 254.  -       ge('gle_inv_summary').innerHTML = cur.scrollList.summaries.invEmpty;
  1071. 255.  -     }
  1072. 256.  -     return true;
  1073. 257.  -   },
  1074. 258.  -
  1075. 259.  -   leave: function(el, gid, hash, pp) {
  1076. 260.  -     if (cur.invSwitching) {
  1077. 261.  -       setTimeout(GroupsList.leave.pbind(el, gid, hash, pp), 100);
  1078. 262.  -       return false;
  1079. 263.  -     }
  1080. 264.  -     var sp, hp, tab = cur.scrollList.tab;
  1081. 265.  -
  1082. 266.  -     if (el.firstChild && el.firstChild.className == 'progress_inline') return;
  1083. 267.  -     sp = function() {
  1084. 268.  -       var w = getSize(el)[0];
  1085. 269.  -       el.oldhtml = el.innerHTML;
  1086. 270.  -       el.innerHTML = '<span class="progress_inline"></span>';
  1087. 271.  -       setStyle(el, {width: w - 30});
  1088. 272.  -     }
  1089. 273.  -     hp = function() {
  1090. 274.  -       el.innerHTML = el.oldhtml;
  1091. 275.  -     }
  1092. 276.  -
  1093. 277.  -     var key = GroupsList.rand(), value = GroupsList.rand();
  1094. 278.  -     cur.scrollList[key] = value;
  1095. 279.  -
  1096. 280.  -     var shown = false;
  1097. 281.  -     cur.invSwitching = true;
  1098. 282.  -     if (GroupsList.switchInvite(gid, true)) {
  1099. 283.  -       shown = true;
  1100. 284.  -       sp = false;
  1101. 285.  -       hp = false;
  1102. 286.  -     }
  1103. 287.  -
  1104. 288.  -     var context = (cur.scrollList.tab == 'groups') ? '2' : '1';
  1105. 289.  -
  1106. 290.  -     ajax.post('al_groups.php', {
  1107. 291.  -       act: 'leave',
  1108. 292.  -       gid: gid,
  1109. 293.  -       hash: hash,
  1110. 294.  -       context: context,
  1111. 295.  -       inv_shown: cur.scrollList.invShown
  1112. 296.  -     }, {
  1113. 297.  -       onDone: function(newRow) {
  1114. 298.  -         cur.invSwitching = false;
  1115. 299.  -         if (!cur.scrollList || cur.scrollList[key] != value) return;
  1116. 300.  -
  1117. 301.  -         var list = cur.scrollList.lists[tab];
  1118. 302.  -         if (!list || list == 'loading' || list == 'update') {
  1119. 303.  -           cur.scrollList.processed[tab][gid] = -1;
  1120. 304.  -         } else {
  1121. 305.  -           for (var i = 0, count = list.length; i < count; ++i) {
  1122. 306.  -             if (list[i][2] == gid) {
  1123. 307.  -               list[i][1] = -1;
  1124. 308.  -             }
  1125. 309.  -           }
  1126. 310.  -         }
  1127. 311.  -
  1128. 312.  -         var row = ge('gl_' + tab + gid);
  1129. 313.  -         if (!row) return;
  1130. 314.  -
  1131. 315.  -         var acts = '<a onclick="GroupsList.cancel(this.parentNode, ' + gid + ', \'' + hash + '\')">' + getLang('global_cancel') + '</a><span class="divider">|</span><a onclick="GroupsList.spam(this.parentNode, ' + gid + ', \'' + hash + '\')">' + getLang('its_spam') + '</a>';
  1132. 316.  -
  1133. 317.  -         var text = '';
  1134. 318.  -         if (tab == 'groups') {
  1135. 319.  -           text = getLang(pp ? 'public_you_unsubscribed' : 'groups_group_left');
  1136. 320.  -         } else {
  1137. 321.  -           text = getLang('groups_group_deny_message');
  1138. 322.  -         }
  1139. 323.  -
  1140. 324.  -         GroupsList.addInvite(newRow, false, false);
  1141. 325.  -
  1142. 326.  -         if (shown) {
  1143. 327.  -           if (cur.switchedInvite) {
  1144. 328.  -             cur.switchedInvite.innerHTML = text+' <a onclick="GroupsList.spam(this.parentNode, ' + gid + ', \'' + hash + '\', cur.switchedInvite)">' + getLang('its_spam') + '</a>';
  1145. 329.  -           }
  1146. 330.  -           return;
  1147. 331.  -         }
  1148. 332.  -
  1149. 333.  -         var status = geByClass1('group_row_status', row), actions = geByClass1('group_row_actions', row);
  1150. 334.  -         status.basehtml = status.innerHTML;
  1151. 335.  -         actions.basehtml = actions.innerHTML;
  1152. 336.  -         status.innerHTML = text;
  1153. 337.  -         actions.innerHTML = acts;
  1154. 338.  -       },
  1155. 339.  -       showProgress: sp, hideProgress: hp
  1156. 340.  -     });
  1157. 341.  -   },
  1158. 342.  -   rejectAll: function(el, hash) {
  1159. 343.  -     var box = showFastBox(getLang('global_warning'), getLang('groups_sure_reject_all'), getLang('groups_members_application_decline'), function() {
  1160. 344.  -       ajax.post('al_groups.php', {act: 'reject_all', hash: hash}, {progress: box.progress});
  1161. 345.  -     }, getLang('global_cancel'));
  1162. 346.  -   },
  1163. 347.  -   spam: function(el, gid, hash, applyCont, block) {
  1164. 348.  -     var sp, hp, tab = cur.scrollList.tab;
  1165. 349.  -
  1166. 350.  -     if (el.firstChild && el.firstChild.className == 'progress_inline') return;
  1167. 351.  -     sp = function() {
  1168. 352.  -       el.oldhtml = el.innerHTML;
  1169. 353.  -       el.innerHTML = '<span class="progress_inline"></span>';
  1170. 354.  -     }
  1171. 355.  -     hp = function() {
  1172. 356.  -       el.innerHTML = el.oldhtml;
  1173. 357.  -     }
  1174. 358.  -
  1175. 359.  -     var key = GroupsList.rand(), value = GroupsList.rand();
  1176. 360.  -     cur.scrollList[key] = value;
  1177. 361.  -
  1178. 362.  -     ajax.post('al_groups.php', {act: 'spam', gid: gid, hash: hash, context: 1, block: block}, {
  1179. 363.  -       onDone: function(respText) {
  1180. 364.  -         if (!cur.scrollList || cur.scrollList[key] != value) return;
  1181. 365.  -         if (block > 0) {
  1182. 366.  -           respText = respText.replace('{club}', '<b>' + val(domPS(ge('clubinv' + gid))) + '</b>');
  1183. 367.  -         }
  1184. 368.  -         if (applyCont) {
  1185. 369.  -           if (block < 0) {
  1186. 370.  -             applyCont.innerHTML = applyCont.basehtml;
  1187. 371.  -           } else {
  1188. 372.  -             applyCont.basehtml = applyCont.innerHTML;
  1189. 373.  -             var applyContText = respText;
  1190. 374.  -             if (block > 0) {
  1191. 375.  -               respText += '<div class="group_row_blockinv"><a onclick="GroupsList.spam(domPN(domPN(this)), ' + gid + ', \'' + hash + '\', cur.switchedInvite, -1)">' + getLang('global_cancel') + '</div>';
  1192. 376.  -             } else if (ge('clubinv' + gid)) {
  1193. 377.  -               respText += '<div class="group_row_blockinv"><a onclick="GroupsList.spam(domPN(domPN(this)), ' + gid + ', \'' + hash + '\', cur.switchedInvite, 1)">' + getLang('groups_block_clubinv').replace('{club}', '<b>' + val(domPS(ge('clubinv' + gid))) + '</b>') + '</a></div>'
  1194. 378.  -             }
  1195. 379.  -             applyCont.innerHTML = respText;
  1196. 380.  -           }
  1197. 381.  -         }
  1198. 382.  -
  1199. 383.  -         if (!block) {
  1200. 384.  -           var list = cur.scrollList.lists[tab];
  1201. 385.  -           if (!list || list == 'loading' || list == 'update') {
  1202. 386.  -             cur.scrollList.processed[tab][gid] = -2;
  1203. 387.  -           } else {
  1204. 388.  -             for (var i = 0, count = list.length; i < count; ++i) {
  1205. 389.  -               if (list[i][2] == gid) {
  1206. 390.  -                 list[i][1] = -2;
  1207. 391.  -               }
  1208. 392.  -             }
  1209. 393.  -           }
  1210. 394.  -         }
  1211. 395.  -
  1212. 396.  -         var row = ge('gl_' + tab + gid);
  1213. 397.  -         if (!row) return;
  1214. 398.  -
  1215. 399.  -         var status = geByClass1('group_row_status', row), actions = geByClass1('group_row_actions', row);
  1216. 400.  -         if (block < 0) {
  1217. 401.  -           status.innerHTML = status.blockhtml;
  1218. 402.  -           actions.innerHTML = actions.blockhtml;
  1219. 403.  -         } else {
  1220. 404.  -           if (block) {
  1221. 405.  -             status.blockhtml = status.innerHTML;
  1222. 406.  -             actions.blockhtml = actions.innerHTML;
  1223. 407.  -             status.innerHTML = '<div class="group_row_blockinv">' + respText + '</div>';
  1224. 408.  -             actions.innerHTML = '<div class="group_row_blockinv"><a onclick="GroupsList.spam(domPN(domPN(this)), ' + gid + ', \'' + hash + '\', false, -1)">' + getLang('global_cancel') + '</a></div>';
  1225. 409.  -           } else {
  1226. 410.  -             status.basehtml = status.innerHTML;
  1227. 411.  -             actions.basehtml = actions.innerHTML;
  1228. 412.  -             status.innerHTML = getLang('groups_ajax_inv_declined_spam');
  1229. 413.  -             actions.innerHTML = '';
  1230. 414.  -           }
  1231. 415.  -         }
  1232. 416.  -       },
  1233. 417.  -       showProgress: sp, hideProgress: hp
  1234. 418.  -     });
  1235. 419.  -   },
  1236. 420.  -   cancel: function(el, gid, hash) {
  1237. 421.  -     var sp, hp, tab = cur.scrollList.tab;
  1238. 422.  -
  1239. 423.  -     if (el.firstChild && el.firstChild.className == 'progress_inline') return;
  1240. 424.  -     sp = function() {
  1241. 425.  -       el.oldhtml = el.innerHTML;
  1242. 426.  -       el.innerHTML = '<span class="progress_inline"></span>';
  1243. 427.  -     }
  1244. 428.  -     hp = function() {
  1245. 429.  -       el.innerHTML = el.oldhtml;
  1246. 430.  -     }
  1247. 431.  -
  1248. 432.  -     var key = GroupsList.rand(), value = GroupsList.rand();
  1249. 433.  -     cur.scrollList[key] = value;
  1250. 434.  -
  1251. 435.  -     ajax.post('al_groups.php', {act: 'cancel', gid: gid, hash: hash, context: 1}, {
  1252. 436.  -       onDone: function() {
  1253. 437.  -         if (!cur.scrollList || cur.scrollList[key] != value) return;
  1254. 438.  -
  1255. 439.  -         var list = cur.scrollList.lists[tab], elem = false;
  1256. 440.  -         if (!list || list == 'loading' || list == 'update') {
  1257. 441.  -           cur.scrollList.processed[tab][gid] = 0;
  1258. 442.  -         } else {
  1259. 443.  -           for (var i in list) {
  1260. 444.  -             if (list[i][2] == gid) {
  1261. 445.  -               list.splice(i, 1)
  1262. 446.  -             }
  1263. 447.  -           }
  1264. 448.  -           cur.scrollList.cache['groups'] = {all: []};
  1265. 449.  -           var c = cur.scrollList.cache['groups'];
  1266. 450.  -           for (var i in list) {
  1267. 451.  -             c.all.push(i);
  1268. 452.  -           }
  1269. 453.  -           cur.scrollList.index[tab] = new vkIndexer(c.all, function(obj) {
  1270. 454.  -             return list[obj][0];
  1271. 455.  -           });
  1272. 456.  -         }
  1273. 457.  -         /*} else {
  1274. 458.  -           for (var i = 0, count = list.length; i < count; ++i) {
  1275. 459.  -             if (list[i][2] == gid) {
  1276. 460.  -               list[i][1] = 0;
  1277. 461.  -               elem = list[i];
  1278. 462.  -               break;
  1279. 463.  -             }
  1280. 464.  -           }
  1281. 465.  -         }*/
  1282. 466.  -
  1283. 467.  -         var row = ge('gl_' + tab + gid);
  1284. 468.  -         if (!row) return;
  1285. 469.  -
  1286. 470.  -         if (elem) {
  1287. 471.  -           var name = elem[0], q = trim(cur.scrollList.query.value);
  1288. 472.  -           if (q) {
  1289. 473.  -             var highlight = GroupsList.getHighlight(q);
  1290. 474.  -             name = name.replace(highlight.re, highlight.val);
  1291. 475.  -           }
  1292. 476.  -           var newRow = (cur.scrollList.genRow(elem, name)) ? cur.scrollList.genInvRow(elem, name) : cur.scrollList.genRow(elem, name);
  1293. 477.  -           row.parentNode.replaceChild(ce('div', {innerHTML: newRow}).firstChild, row);
  1294. 478.  -         } else {
  1295. 479.  -           var status = geByClass1('group_row_status', row), actions = geByClass1('group_row_actions', row);
  1296. 480.  -           status.innerHTML = status.basehtml;
  1297. 481.  -           actions.innerHTML = actions.basehtml;
  1298. 482.  -         }
  1299. 483.  -       },
  1300. 484.  -       showProgress: sp, hideProgress: hp
  1301. 485.  -     });
  1302. 486.  -   },
  1303. 487.  -
  1304. 488.  -   scrollCheck: function() {
  1305. 489.  -     if (browser.mobile) return;
  1306. 490.  -     var lnk = ge(cur.scrollList.prefix + cur.scrollList.tab + '_more');
  1307. 491.  -     if (!isVisible(lnk)) {
  1308. 492.  -       return;
  1309. 493.  -     }
  1310. 494.  -
  1311. 495.  -     var docEl = document.documentElement;
  1312. 496.  -     var ch = window.innerHeight || docEl.clientHeight || bodyNode.clientHeight;
  1313. 497.  -     var st = scrollGetY();
  1314. 498.  -
  1315. 499.  -     if (st + ch > lnk.offsetTop || (cur.searchOffset && st + 2*ch > lnk.offsetTop)) {
  1316. 500.  -       GroupsList.showMore();
  1317. 501.  -     }
  1318. 502.  -   },
  1319. 503.  -   initScroll: function() {
  1320. 504.  -     addEvent((browser.msie6 ? pageNode : window), 'scroll', GroupsList.scrollCheck);
  1321. 505.  -     addEvent(window, 'resize', GroupsList.scrollCheck);
  1322. 506.  -   },
  1323. 507.  -
  1324. 508.  -   locNav: function(changed, oldLoc, newLoc) {
  1325. 509.  -     var changedTab = changed.tab, tab = changedTab || 'groups';
  1326. 510.  -     delete(changed.tab);
  1327. 511.  -     if (!isEmpty(changed) || changedTab === undefined) return;
  1328. 512.  -
  1329. 513.  -     ge('groups_tab_' + cur.scrollList.tab).className = '';
  1330. 514.  -     hide('groups_list_tab_' + cur.scrollList.tab);
  1331. 515.  -     cur.scrollList.tab = tab;
  1332. 516.  -     show('groups_list_tab_' + tab);
  1333. 517.  -     var tabEl = ge('groups_tab_' + tab);
  1334. 518.  -     tabEl.className = 'active_link';
  1335. 519.  -     show(tabEl);
  1336. 520.  -
  1337. 521.  -     if (cur.scrollList.events) {
  1338. 522.  -       toggle(cur.scrollList.events, tab == 'groups' && ge('gle_list_cont').innerHTML);
  1339. 523.  -       cur.scrollList.eventsShow = false;
  1340. 524.  -       if (isVisible(cur.scrollList.eventsMore)) {
  1341. 525.  -         hide(cur.scrollList.eventsMore);
  1342. 526.  -         show(cur.scrollList.eventsMoreLnk);
  1343. 527.  -       }
  1344. 528.  -     }
  1345. 529.  -     if (cur.scrollList.invites) {
  1346. 530.  -       toggle(cur.scrollList.invites, tab == 'groups');
  1347. 531.  -     }
  1348. 532.  -     if (cur.scrollList.invites || cur.scrollList.events && ge('gle_list_cont').innerHTML) {
  1349. 533.  -       ((tab == 'groups') ? addClass : removeClass)(cur.scrollList.summary.parentNode, 'gl_summary_short');
  1350. 534.  -     }
  1351. 535.  -
  1352. 536.  -     toggle('gl_about_events', (tab == 'groups' || tab == 'inv'));
  1353. 537.  -
  1354. 538.  -     nav.setLoc(newLoc);
  1355. 539.  -     ge('groups_list_search').setValue('');
  1356. 540.  -     setTimeout(elfocus.pbind('groups_list_search'), 0);
  1357. 541.  -
  1358. 542.  -     cur.scrollList.summary.innerHTML = cur.scrollList.summaries[tab];
  1359. 543.  -     cur.scrollList.offset = ge('groups_list_' + tab).childNodes.length;
  1360. 544.  -
  1361. 545.  -     GroupsList.showMore(true);
  1362. 546.  -
  1363. 547.  -     return false;
  1364. 548.  -   },
  1365. 549.  -
  1366. 550.  -   init: function(opts) {
  1367. 551.  -     placeholderSetup('groups_list_search', {back: true});
  1368. 552.  -     setTimeout(elfocus.pbind('groups_list_search'), 0);
  1369. 553.  -     extend(cur, {
  1370. 554.  -       module: 'groups_list',
  1371. 555.  -       _back: {
  1372. 556.  -         text: getLang('groups_back_to_list'),
  1373. 557.  -         show: [GroupsList.initScroll],
  1374. 558.  -         hide: [function() {
  1375. 559.  -           removeEvent((browser.msie6 ? pageNode : window), 'scroll', GroupsList.scrollCheck);
  1376. 560.  -           removeEvent(window, 'resize', GroupsList.scrollCheck);
  1377. 561.  -         }]
  1378. 562.  -       },
  1379. 563.  -
  1380. 564.  -       scrollList: {
  1381. 565.  -         tab: opts.tab,
  1382. 566.  -
  1383. 567.  -         url: 'al_groups.php',
  1384. 568.  -         params: {act: 'get_list', mid: opts.mid},
  1385. 569.  -         prefix: 'groups_list_',
  1386. 570.  -         query: ge('groups_list_search'),
  1387. 571.  -         summary: ge('groups_list_summary'),
  1388. 572.  -         events: ge('gle_list_wrap'),
  1389. 573.  -         eventsMore: ge('gle_list_more'),
  1390. 574.  -         eventsMoreLnk: ge('gle_list_more_lnk'),
  1391. 575.  -         invites: ge('gle_invites_wrap'),
  1392. 576.  -         searchCont: ge('groups_list_search_cont'),
  1393. 577.  -
  1394. 578.  -         perpage: 20,
  1395. 579.  -         offset: ge('groups_list_' + opts.tab).childNodes.length,
  1396. 580.  -
  1397. 581.  -         lists: {},
  1398. 582.  -         cache: {},
  1399. 583.  -         index: {},
  1400. 584.  -         processed: {'groups': {}, 'admin': {}, 'inv': {}},
  1401. 585.  -         filtered: {},
  1402. 586.  -         queries: {},
  1403. 587.  -         summaries: opts.summaries,
  1404. 588.  -
  1405. 589.  -         genEmpty: opts.genEmpty,
  1406. 590.  -         genRow: opts.genRow,
  1407. 591.  -         genEvent: opts.genEvent,
  1408. 592.  -         genInvRow: opts.genInvRow,
  1409. 593.  -         genSummary: opts.genSummary,
  1410. 594.  -         genGroupsSummary: opts.genGroupsSummary,
  1411. 595.  -         invShown: opts.invShown,
  1412. 596.  -         invCount: opts.invCount
  1413. 597.  -       },
  1414. 598.  -       filter: opts.filter
  1415. 599.  -     });
  1416. 600.  -
  1417. 601.  -     cur.nav.push(GroupsList.locNav);
  1418. 602.  -
  1419. 603.  -     setTimeout(GroupsList.load, 0);
  1420. 604.  -     if (vk.version) {
  1421. 605.  -       addEvent(window, 'load', GroupsList.initScroll);
  1422. 606.  -     } else {
  1423. 607.  -       GroupsList.initScroll();
  1424. 608.  -     }
  1425. 609.  -   },
  1426. 610.  -   load: function(force, forceTab) {
  1427. 611.  -     var tab = forceTab || cur.scrollList.tab;
  1428. 612.  -     if (cur.scrollList.lists[tab]) return;
  1429. 613.  -
  1430. 614.  -     var key = GroupsList.rand(), value = GroupsList.rand();
  1431. 615.  -     cur.scrollList[key] = value;
  1432. 616.  -
  1433. 617.  -     cur.scrollList.lists[tab] = 'loading';
  1434. 618.  -     ajax.post(cur.scrollList.url, extend(cur.scrollList.params, {tab: tab}), {onDone: function(result) {
  1435. 619.  -       if (!cur.scrollList || cur.scrollList[key] != value) return;
  1436. 620.  -
  1437. 621.  -       var upd = (cur.scrollList.lists[tab] == 'update');
  1438. 622.  -       if (!upd && cur.scrollList.lists[tab] != 'loading') return;
  1439. 623.  -
  1440. 624.  -       cur.scrollList.cache[tab] = {all: []};
  1441. 625.  -       var processed = cur.scrollList.processed[tab], gid;
  1442. 626.  -       for (var i = 0, count = result.length; i < count; ++i) {
  1443. 627.  -         res = processed[result[i][2]];
  1444. 628.  -         if (res) {
  1445. 629.  -           result[i][1] = res;
  1446. 630.  -         }
  1447. 631.  -         cur.scrollList.cache[tab].all.push(i);
  1448. 632.  -       }
  1449. 633.  -       cur.scrollList.lists[tab] = result;
  1450. 634.  -
  1451. 635.  -       var callback = upd ? function() {
  1452. 636.  -         if (cur.scrollList && cur.scrollList[key] == value && cur.scrollList.tab == tab) {
  1453. 637.  -           GroupsList.showMore(force);
  1454. 638.  -         }
  1455. 639.  -       } : function() {};
  1456. 640.  -
  1457. 641.  -       cur.scrollList.index[tab] = new vkIndexer(cur.scrollList.cache[tab].all, function(obj) {
  1458. 642.  -         return cur.scrollList.lists[tab][obj][0];
  1459. 643.  -       }, callback);
  1460. 644.  -
  1461. 645.  -       if (cur.scrollList.eventsShow) {
  1462. 646.  -         GroupsList.eventsMore();
  1463. 647.  -       }
  1464. 648.  -     }, local: 1});
  1465. 649.  -   },
  1466. 650.  -
  1467. 651.  -   htmlencode: function(str) {
  1468. 652.  -     var res = [];
  1469. 653.  -     for (var i = 0, l = str.length; i < l; ++i) {
  1470. 654.  -       var c = str.charCodeAt(i);
  1471. 655.  -       if (c == 33 || c == 39 || (c > 127 && c < 1040) || c > 1103) {
  1472. 656.  -         res.push('&#' + c + ';');
  1473. 657.  -       } else if (c == 36) {
  1474. 658.  -         res.push('&#0' + c + ';');
  1475. 659.  -       } else {
  1476. 660.  -         c = str.charAt(i);
  1477. 661.  -         switch (c) {
  1478. 662.  -           case '>': res.push('&gt;'); break;
  1479. 663.  -           case '<': res.push('&lt;'); break;
  1480. 664.  -           case '"': res.push('&quot;'); break;
  1481. 665.  -           case '&': res.push('&amp;'); break;
  1482. 666.  -           default:  res.push(c); break;
  1483. 667.  -         }
  1484. 668.  -       }
  1485. 669.  -     }
  1486. 670.  -     return res.join('');
  1487. 671.  -   },
  1488. 672.  -   getHighlight: function(q) {
  1489. 673.  -     var indxr = cur.scrollList.index[cur.scrollList.tab], delimiter = indxr.delimiter, trimmer = indxr.trimmer;
  1490. 674.  -
  1491. 675.  -     q += ' ' + (parseLatin(q) || '');
  1492. 676.  -     q = escapeRE(q).replace(/&/g, '&amp;');
  1493. 677.  -     q = q.replace(trimmer, '').replace(delimiter, '|');
  1494. 678.  -     return {
  1495. 679.  -       re: new RegExp('(' + q + ')', 'gi'),
  1496. 680.  -       val: '<span class="group_row_highlight">$1</span>'
  1497. 681.  -     }
  1498. 682.  -   },
  1499. 683.  -   updateEvents: function() {
  1500. 684.  -     if (!ge('gle_list_cont').innerHTML && !cur.scrollList.invites || cur.scrollList.tab != 'groups') return;
  1501. 685.  -     toggle(cur.scrollList.events, !cur.scrollList.query.value && ge('gle_list_cont').innerHTML);
  1502. 686.  -     cur.scrollList.eventsShow = false;
  1503. 687.  -     if (isVisible(cur.scrollList.eventsMore)) {
  1504. 688.  -       hide(cur.scrollList.eventsMore);
  1505. 689.  -       show(cur.scrollList.eventsMoreLnk);
  1506. 690.  -     }
  1507. 691.  -     if (cur.scrollList.invites) {
  1508. 692.  -       toggle(cur.scrollList.invites, !cur.scrollList.query.value);
  1509. 693.  -     }
  1510. 694.  -     (!cur.scrollList.query.value ? addClass : removeClass)(cur.scrollList.summary.parentNode, 'gl_summary_short');
  1511. 695.  -   },
  1512. 696.  -   updateEventsList: function(addedGid) {
  1513. 697.  -     ajax.post('groups', {act: 'update_events'}, {
  1514. 698.  -       onDone: function(html, more) {
  1515. 699.  -         var gleCont = ge('gle_list_cont');
  1516. 700.  -         val(gleCont, html);
  1517. 701.  -         toggle(cur.scrollList.events, !!html);
  1518. 702.  -         hide(cur.scrollList.eventsMore);
  1519. 703.  -         val(cur.scrollList.eventsMore, '');
  1520. 704.  -         val(cur.scrollList.eventsMoreLnk, more || '');
  1521. 705.  -         toggle(cur.scrollList.eventsMoreLnk, !!more);
  1522. 706.  -         cur.scrollList.eventsShow = false;
  1523. 707.  -         if (addedGid) {
  1524. 708.  -           var addedRow = ge('gle_block_'+addedGid);
  1525. 709.  -           if (addedRow) {
  1526. 710.  -             setStyle(addedRow, {backgroundColor: '#FEFAE4'});
  1527. 711.  -             animate(addedRow, {backgroundColor: '#FFF'}, 2000);
  1528. 712.  -           }
  1529. 713.  -         }
  1530. 714.  -       }
  1531. 715.  -     })
  1532. 716.  -   },
  1533. 717.  -   eventsMore: function() {
  1534. 718.  -     var list = cur.scrollList.lists['groups'];
  1535. 719.  -     if (!list || list == 'loading' || list == 'update') {
  1536. 720.  -       cur.scrollList.eventsShow = true;
  1537. 721.  -       return;
  1538. 722.  -     }
  1539. 723.  -
  1540. 724.  -     hide(cur.scrollList.eventsMoreLnk);
  1541. 725.  -     if (val(cur.scrollList.eventsMore)) {
  1542. 726.  -       show(cur.scrollList.eventsMore);
  1543. 727.  -     } else {
  1544. 728.  -       var res = {}, shown = {}, dates = {}, list = [], html = [];
  1545. 729.  -       each(ge('gle_list_cont').childNodes, function(k, v) {
  1546. 730.  -         var id = intval(((v || {}).id || '').replace(/^gle_block_/, ''));
  1547. 731.  -         if (id) shown[id] = true;
  1548. 732.  -       });
  1549. 733.  -       each(cur.scrollList.lists['groups'], function(k, v) {
  1550. 734.  -         var gid = intval(v[2]);
  1551. 735.  -         if (!v[11] || shown[gid]) return;
  1552. 736.  -         list.push(gid);
  1553. 737.  -         res[gid] = cur.scrollList.genEvent(v);
  1554. 738.  -         dates[gid] = intval(v[11].split('<*>')[0]);
  1555. 739.  -       });
  1556. 740.  -       list.sort(function(gid1, gid2) {
  1557. 741.  -         return (dates[gid1] < dates[gid2]) ? -1 : ((dates[gid2] < dates[gid1]) ? 1 : 0);
  1558. 742.  -       });
  1559. 743.  -       each(list, function(k, v) {
  1560. 744.  -         html.push(res[v]);
  1561. 745.  -       });
  1562. 746.  -       if (html.length) {
  1563. 747.  -         val(cur.scrollList.eventsMore, html.join(''));
  1564. 748.  -         show(cur.scrollList.eventsMore);
  1565. 749.  -       }
  1566. 750.  -     }
  1567. 751.  -   },
  1568. 752.  -   showMore: function(force) {
  1569. 753.  -     var tab = cur.scrollList.tab, list = cur.scrollList.lists[tab];
  1570. 754.  -     if (!list || list == 'loading' || list == 'update') {
  1571. 755.  -       if (!list) GroupsList.load(force);
  1572. 756.  -       cur.scrollList.lists[tab] = 'update';
  1573. 757.  -       return;
  1574. 758.  -     }
  1575. 759.  -
  1576. 760.  -     var tab = cur.scrollList.tab, list = cur.scrollList.cache[tab].all;
  1577. 761.  -
  1578. 762.  -     var q = trim(cur.scrollList.query.value);
  1579. 763.  -     cur.searchStr = q;
  1580. 764.  -     if (!cur.loadingShown) {
  1581. 765.  -       if (q) {
  1582. 766.  -         show('groups_reset_search');
  1583. 767.  -       } else {
  1584. 768.  -         hide('groups_reset_search');
  1585. 769.  -       }
  1586. 770.  -     }
  1587. 771.  -
  1588. 772.  -     if (cur.scrollList.queries[tab] === undefined) {
  1589. 773.  -       cur.scrollList.queries[tab] = '';
  1590. 774.  -     }
  1591. 775.  -     var refresh = (force || q != cur.scrollList.queries[tab]);
  1592. 776.  -     if (!refresh && force === false) return;
  1593. 777.  -
  1594. 778.  -     cur.scrollList.queries[tab] = q;
  1595. 779.  -
  1596. 780.  -     var highlight = false;
  1597. 781.  -     if (q) {
  1598. 782.  -       list = cur.scrollList.cache[tab]['_' + q];
  1599. 783.  -       if (list === undefined) {
  1600. 784.  -         var tmp = cur.scrollList.index[tab].search(q), mp = {};
  1601. 785.  -         list = [];
  1602. 786.  -         for (var i = 0, l = tmp.length; i < l; ++i) {
  1603. 787.  -           if (!mp[tmp[i]]) {
  1604. 788.  -             mp[tmp[i]] = true;
  1605. 789.  -             list.push(tmp[i]);
  1606. 790.  -           }
  1607. 791.  -         }
  1608. 792.  -         list.sort(function(a,b){return a-b;});
  1609. 793.  -         cur.scrollList.cache[tab]['_' + q] = list;
  1610. 794.  -       }
  1611. 795.  -       highlight = GroupsList.getHighlight(q);
  1612. 796.  -     }
  1613. 797.  -
  1614. 798.  -     var len = list.length;
  1615. 799.  -
  1616. 800.  -     var cont = ge(cur.scrollList.prefix + tab), more = ge(cur.scrollList.prefix + tab + '_more');
  1617. 801.  -     if (!len) {
  1618. 802.  -       if (q && tab == 'groups') {
  1619. 803.  -         if (refresh) {
  1620. 804.  -           GroupsList.serverSearch(cont, q, true);
  1621. 805.  -           hide(more);
  1622. 806.  -         } else if (cur.searchOffset) {
  1623. 807.  -           GroupsList.serverSearchMore(cont, q);
  1624. 808.  -         }
  1625. 809.  -       } else {
  1626. 810.  -         q = cur.scrollList.query.value;
  1627. 811.  -         cont.innerHTML = cur.scrollList.genEmpty(q);
  1628. 812.  -         cur.scrollList.summary.innerHTML = q ? cur.scrollList.genSummary(len) : cur.scrollList.summaries[tab];
  1629. 813.  -         hide(more);
  1630. 814.  -         hide(cur.scrollList.searchCont);
  1631. 815.  -         cur.searchOffset = 0;
  1632. 816.  -       }
  1633. 817.  -       return;
  1634. 818.  -     } else if (tab == 'groups' && cur.scrollList.params.mid == vk.id) {
  1635. 819.  -       cur.scrollList.summary.innerHTML = cur.scrollList.genGroupsSummary(len);
  1636. 820.  -     } else {
  1637. 821.  -       cur.scrollList.summary.innerHTML = q ? cur.scrollList.genSummary(len) : cur.scrollList.summaries[tab];
  1638. 822.  -     }
  1639. 823.  -
  1640. 824.  -     var start = refresh ? 0 : cur.scrollList.offset, end = Math.min(len, start + cur.scrollList.perpage);
  1641. 825.  -     var html = [];
  1642. 826.  -
  1643. 827.  -     for (var i = start; i < end; ++i) {
  1644. 828.  -       var row = cur.scrollList.lists[tab][list[i]];
  1645. 829.  -       if (!row) continue;
  1646. 830.  -       var name = row[0];
  1647. 831.  -       if (highlight) {
  1648. 832.  -         name = name.replace(highlight.re, highlight.val);
  1649. 833.  -       }
  1650. 834.  -       if (cur.scrollList.tab == 'inv') {
  1651. 835.  -         html.push(cur.scrollList.genInvRow(row, name));
  1652. 836.  -       } else {
  1653. 837.  -         html.push(cur.scrollList.genRow(row, name));
  1654. 838.  -       }
  1655. 839.  -     }
  1656. 840.  -
  1657. 841.  -     if (!q && (!start || refresh)) {
  1658. 842.  -       hide(cur.scrollList.searchCont);
  1659. 843.  -       cur.searchOffset = 0;
  1660. 844.  -     }
  1661. 845.  -
  1662. 846.  -     if (refresh) {
  1663. 847.  -       cont.innerHTML = html.join('');
  1664. 848.  -       cur.searchOffset = false;
  1665. 849.  -       if (list.length < 10 && q && tab == 'groups') {
  1666. 850.  -         var exclude = [];
  1667. 851.  -         for (var i in list) {
  1668. 852.  -           var el = cur.scrollList.lists[tab][list[i]];
  1669. 853.  -           exclude.push(el[2]);
  1670. 854.  -         }
  1671. 855.  -         GroupsList.serverSearch(cont, q, false, exclude);
  1672. 856.  -       } else {
  1673. 857.  -         hide(cur.scrollList.searchCont);
  1674. 858.  -         cur.searchOffset = 0;
  1675. 859.  -       }
  1676. 860.  -     } else {
  1677. 861.  -       cont.innerHTML += html.join('');
  1678. 862.  -       if (cur.searchOffset) {
  1679. 863.  -         GroupsList.serverSearchMore(cont, q);
  1680. 864.  -       }
  1681. 865.  -     }
  1682. 866.  -     cur.scrollList.offset = end;
  1683. 867.  -
  1684. 868.  -     if (!cur.searchOffset) {
  1685. 869.  -       (end < len ? show : hide)(more);
  1686. 870.  -     }
  1687. 871.  -   },
  1688. 872.  -
  1689. 873.  -   serverSearchMore: function(cont, q) {
  1690. 874.  -     if (cur.searchLoadingMore) return;
  1691. 875.  -     cur.searchLoadingMore = 1;
  1692. 876.  -     var more = ge(cur.scrollList.prefix + cur.scrollList.tab + '_more');
  1693. 877.  -     var back = more.innerHTML;
  1694. 878.  -     ajax.post('al_groups.php', {
  1695. 879.  -       act: 'server_search',
  1696. 880.  -       q: q,
  1697. 881.  -       offset: cur.searchOffset,
  1698. 882.  -       exclude: cur.searchExclude.join(',')
  1699. 883.  -     }, {
  1700. 884.  -       onDone: function(count, rows, finish) {
  1701. 885.  -         cur.searchLoadingMore = 0;
  1702. 886.  -         if (count) {
  1703. 887.  -           cur.searchOffset += count;
  1704. 888.  -           cur.scrollList.searchCont.appendChild(cf(rows));
  1705. 889.  -         } else {
  1706. 890.  -           cur.searchOffset = 0;
  1707. 891.  -         }
  1708. 892.  -         (finish ? hide : show)(cur.scrollList.prefix + cur.scrollList.tab + '_more');
  1709. 893.  -         debugLog((finish ? 'hide' : 'show'));
  1710. 894.  -       },
  1711. 895.  -       onFail: function() {
  1712. 896.  -         cur.searchLoadingMore = 0;
  1713. 897.  -       },
  1714. 898.  -       showProgress: function() {
  1715. 899.  -         more.innerHTML = '<img src="/images/upload.gif" />';
  1716. 900.  -       },
  1717. 901.  -       hideProgress: function() {
  1718. 902.  -         more.innerHTML = back;
  1719. 903.  -       }
  1720. 904.  -     })
  1721. 905.  -   },
  1722. 906.  -
  1723. 907.  -   serverSearch: function(cont, q, emptyLocal, exclude) {
  1724. 908.  -     if (cur.scrollList.tab != 'groups') {
  1725. 909.  -       return false;
  1726. 910.  -     }
  1727. 911.  -     clearTimeout(cur.searchTimeout);
  1728. 912.  -     cur.searchTimeout = setTimeout(function() {
  1729. 913.  -       if (cur.searchStr != q) return;
  1730. 914.  -       cur.searchExclude = exclude || [];
  1731. 915.  -       ajax.post('al_groups.php', {
  1732. 916.  -         act: 'server_search',
  1733. 917.  -         q: q,
  1734. 918.  -         empty: emptyLocal ? 1 : 0,
  1735. 919.  -         exclude: cur.searchExclude.join(',')
  1736. 920.  -       }, {
  1737. 921.  -         onDone: function(count, rows, summary, finish) {
  1738. 922.  -           if (cur.searchStr != q) return;
  1739. 923.  -           if (count) {
  1740. 924.  -             var last = geByClass('group_list_row', cont).pop();
  1741. 925.  -             if (last) {
  1742. 926.  -               addClass(last, 'groups_list_last_row');
  1743. 927.  -             }
  1744. 928.  -             cur.scrollList.searchCont.innerHTML = rows;
  1745. 929.  -             show(cur.scrollList.searchCont);
  1746. 930.  -             if (emptyLocal) {
  1747. 931.  -               cur.scrollList.summary.innerHTML = summary;
  1748. 932.  -               cont.innerHTML = '';
  1749. 933.  -             }
  1750. 934.  -             if (!finish) {
  1751. 935.  -               show(cur.scrollList.prefix + cur.scrollList.tab + '_more');
  1752. 936.  -             }
  1753. 937.  -           } else {
  1754. 938.  -             cur.scrollList.searchCont.innerHTML = '';
  1755. 939.  -             hide(cur.scrollList.searchCont);
  1756. 940.  -             if (emptyLocal) {
  1757. 941.  -               cont.innerHTML = cur.scrollList.genEmpty(q);
  1758. 942.  -               cur.scrollList.summary.innerHTML = cur.scrollList.genSummary(0);
  1759. 943.  -             }
  1760. 944.  -           }
  1761. 945.  -           cur.searchOffset = count;
  1762. 946.  -         },
  1763. 947.  -         showProgress: GroupsList.showLoading,
  1764. 948.  -         hideProgress: GroupsList.hideLoading
  1765. 949.  -       })
  1766. 950.  -     }, 300);
  1767. 951.  -   },
  1768. 952.  -
  1769. 953.  -   resetSearch: function() {
  1770. 954.  -     val(cur.scrollList.query, '');
  1771. 955.  -     GroupsList.showMore(true);
  1772. 956.  -     GroupsList.updateEvents();
  1773. 957.  -   },
  1774. 958.  -
  1775. 959.  -   showLoading: function() {
  1776. 960.  -     cur.loadingShown = 1;
  1777. 961.  -     show('groups_loading');
  1778. 962.  -     hide('groups_reset_search');
  1779. 963.  -   },
  1780. 964.  -
  1781. 965.  -   hideLoading: function() {
  1782. 966.  -     cur.loadingShown = 0;
  1783. 967.  -     hide('groups_loading');
  1784. 968.  -     if (cur.scrollList.query.value) {
  1785. 969.  -       show('groups_reset_search');
  1786. 970.  -     }
  1787. 971.  -   },
  1788. 972.  -
  1789. 973.  -   goToSearch: function() {
  1790. 974.  -     var q = trim(cur.scrollList.query.value);
  1791. 975.  -     nav.go('search?c%5Bq%5D='+encodeURIComponent(q)+'&c%5Bsection%5D=communities');
  1792. 976.  -   },
  1793. 977.  -
  1794. 978.  -   showInvites: function(obj) {
  1795. 979.  -     removeClass(obj.previousSibling, 'groups_list_last_row');
  1796. 980.  -     hide(obj);
  1797. 981.  -     show(obj.nextSibling);
  1798. 982.  -   },
  1799. 983.  -
  1800. 984.  -   ttShow: function(obj, text) {
  1801. 985.  -     var showsp = 200;
  1802. 986.  -     if (cur.groupMemTT && cur.groupMemTT != obj && window.tooltips) {
  1803. 987.  -       tooltips.hideAll();
  1804. 988.  -       cur.groupMemTT = false;
  1805. 989.  -       showsp = 0;
  1806. 990.  -     }
  1807. 991.  -     cur.groupMemTT = obj;
  1808. 992.  -     return showTooltip(obj, {
  1809. 993.  -       center: 1,
  1810. 994.  -       black: 1,
  1811. 995.  -       showsp: showsp,
  1812. 996.  -       shift: [0, 2, 10],
  1813. 997.  -       text: text
  1814. 998.  -     });
  1815. 999.  -   },
  1816. 1000.  -
  1817. 1001.  -   showMapBox: function(place, zoom, link) {
  1818. 1002.  -     if (window.showZeroZoneBox && showZeroZoneBox('places', function() {
  1819. 1003.  -       GroupsList.showMapBox(place, zoom, link);
  1820. 1004.  -     })) { return; }
  1821. 1005.  -
  1822. 1006.  -     showTabbedBox('places.php', {act: 'a_get_place_box', id: place}, {stat: ['places.css', 'map.css', 'maps.js', 'ui_controls.css', 'ui_controls.js']});
  1823. 1007.  -   },
  1824. 1008.  -
  1825. 1009.  -   feedbanGroup: function(el, gid, hash) {
  1826. 1010.  -     var oid = -gid;
  1827. 1011.  -     ajax.post('al_fans.php', {act: 'feedtgl', oid: oid, hash: hash}, {
  1828. 1012.  -       onDone: function(val, str) {
  1829. 1013.  -         el.innerHTML = str;
  1830. 1014.  -         if (!cur.scrollList.lists || !cur.scrollList.lists.groups) {
  1831. 1015.  -           return;
  1832. 1016.  -         }
  1833. 1017.  -         var lst = cur.scrollList.lists.groups;
  1834. 1018.  -         if (lst && lst.length) {
  1835. 1019.  -           for (var i = 0, l = lst.length; i < l; ++i) {
  1836. 1020.  -             if (lst[i][2] == gid) {
  1837. 1021.  -               cur.scrollList.lists.groups[i][12] = val;
  1838. 1022.  -               break;
  1839. 1023.  -             }
  1840. 1024.  -           }
  1841. 1025.  -         }
  1842. 1026.  -       },
  1843. 1027.  -       showProgress: function() {
  1844. 1028.  -         el.innerHTML = '<span class="progress_inline"></span>';
  1845. 1029.  -       }
  1846. 1030.  -     });
  1847. 1031.  -   }
  1848. 1032.  - }
  1849. 1033.  -
  1850. 1034.  - try{stManager.done('groups_list.js');}catch(e){}
  1851. ------
Advertisement
Add Comment
Please, Sign In to add comment