Hormold

VK Change (#1392731105)

Feb 18th, 2014
340
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 54.17 KB | None | 0 0
  1. Файл - join.css (Старый размер - 10054 | Новый - 0):
  2. 0.  - #join_css {
  3. 1.  -   display: none;
  4. 2.  - }
  5. 3.  -
  6. 4.  - .join_selects_wrap {
  7. 5.  -   padding: 15px 30px 10px;
  8. 6.  - }
  9. 7.  - .join_header_wrap {
  10. 8.  -   padding: 25px 30px 10px;
  11. 9.  - }
  12. 10.  - .join_header {
  13. 11.  -   font-weight: bold;
  14. 12.  -   font-size: 1.09em;
  15. 13.  -   color: #45688E;
  16. 14.  -   padding-bottom: 5px;
  17. 15.  -   border-bottom: 1px solid #DAE1E8;
  18. 16.  -   margin-bottom: 10px;
  19. 17.  - }
  20. 18.  - #join_school_summary, #join_university_summary {
  21. 19.  -   margin-bottom: 0px;
  22. 20.  - }
  23. 21.  - .join_finish_row {
  24. 22.  -   width: 160px;
  25. 23.  -   margin: 0px auto 10px;
  26. 24.  - }
  27. 25.  - .join_select_row {
  28. 26.  -   width: 500px;
  29. 27.  -   margin-bottom: 10px;
  30. 28.  - }
  31. 29.  - .join_sel_label {
  32. 30.  -   color: #45688E;
  33. 31.  -   font-weight: bold;
  34. 32.  -   padding: 5px 13px 0px;
  35. 33.  -   width: 229px;
  36. 34.  - }
  37. 35.  - .join_labeled {
  38. 36.  -   width: 160px;
  39. 37.  - }
  40. 38.  - .join_none {
  41. 39.  -   padding: 14px 130px;
  42. 40.  -   font-size: 1.09em;
  43. 41.  -   color: #777;
  44. 42.  -   line-height: 160%;
  45. 43.  -   text-align: center;
  46. 44.  - }
  47. 45.  - div.join_none_prg {
  48. 46.  -   width: 367px;
  49. 47.  -   background-position: 50% 50%;
  50. 48.  -   position: absolute;
  51. 49.  -   margin-top: -22px;
  52. 50.  - }
  53. 51.  - .join_summary_prg {
  54. 52.  -   margin: 0px 10px;
  55. 53.  - }
  56. 54.  - .join_result {
  57. 55.  -   padding: 0px 20px;
  58. 56.  - }
  59. 57.  - .join_rows {
  60. 58.  -   padding: 10px 7px 10px 8px;
  61. 59.  - }
  62. 60.  - .join_more {
  63. 61.  -   cursor: pointer;
  64. 62.  -   color: #2B587A;
  65. 63.  -   text-align: center;
  66. 64.  -   padding: 10px;
  67. 65.  -   margin: 0px 15px;
  68. 66.  - }
  69. 67.  - .join_more:hover {
  70. 68.  -   background: #E1E7ED;
  71. 69.  -   padding-top: 9px;
  72. 70.  -   border-top: 1px solid #DAE1E8;
  73. 71.  - }
  74. 72.  - .join_next_cont {
  75. 73.  -   padding: 0px 0px 20px;
  76. 74.  - }
  77. 75.  - .join_next_wrap {
  78. 76.  -   position: relative;
  79. 77.  - }
  80. 78.  - #join_school_next, #join_university_next, #join_fb_friends_next {
  81. 79.  -   padding: 20px;
  82. 80.  -   width: 587px;
  83. 81.  -   text-align: center;
  84. 82.  -   background: #FFF;
  85. 83.  -   border-top: 1px solid #FFF;
  86. 84.  -   bottom: 0px;
  87. 85.  -   z-index: 20;
  88. 86.  -   -webkit-transition: background 400ms linear, border 400ms linear;
  89. 87.  -   -moz-transition: background 400ms linear, border 400ms linear;
  90. 88.  -   -o-transition: background 400ms linear, border 400ms linear;
  91. 89.  -   transition: background 400ms linear, border 400ms linear;
  92. 90.  - }
  93. 91.  - #join_school_next.fixed, #join_university_next.fixed, #join_fb_friends_next.fixed {
  94. 92.  -   background: #FAFAFA;
  95. 93.  -   background: rgba(250, 250, 250, 0.95);
  96. 94.  -   border-top: 1px solid #EEE;
  97. 95.  - }
  98. 96.  - #join_school_next, #join_university_next, #join_fb_friends_next {
  99. 97.  -   text-align: center;
  100. 98.  - }
  101. 99.  - .join_request {
  102. 100.  -   color: #777;
  103. 101.  -   padding-top: 6px;
  104. 102.  - }
  105. 103.  - .join_user {
  106. 104.  -   display: inline-block;
  107. 105.  -   *display: inline;
  108. 106.  -   *zoom: 1;
  109. 107.  -   width: 270px;
  110. 108.  -   overflow: hidden;
  111. 109.  -   padding: 15px 8px 15px 7px;
  112. 110.  - }
  113. 111.  - .join_thumb {
  114. 112.  -   width: 120px;
  115. 113.  -   height: 100px;
  116. 114.  -   overflow: hidden;
  117. 115.  - }
  118. 116.  - .join_img {
  119. 117.  -   width: 100px;
  120. 118.  - }
  121. 119.  - .join_info {
  122. 120.  -   width: 150px;
  123. 121.  -   overflow: hidden;
  124. 122.  - }
  125. 123.  - .join_name_wrap {
  126. 124.  -   padding: 5px 0px;
  127. 125.  -   white-space: nowrap;
  128. 126.  -   overflow: hidden;
  129. 127.  -   -o-text-overflow: ellipsis;
  130. 128.  -   text-overflow: ellipsis;
  131. 129.  - }
  132. 130.  - .join_name {
  133. 131.  -   font-weight: bold;
  134. 132.  -   font-size: 1.09em;
  135. 133.  -   color: #45688E;
  136. 134.  - }
  137. 135.  - .join_friends {
  138. 136.  -   padding: 5px 0px 12px;
  139. 137.  -   color: #777;
  140. 138.  - }
  141. 139.  -
  142. 140.  - .join_error_box {
  143. 141.  -   line-height: 160%;
  144. 142.  - }
  145. 143.  -
  146. 144.  - #join_school_summary_wrap, #join_university_summary_wrap {
  147. 145.  -   padding: 13px 0px 0px;
  148. 146.  -   margin: 0px 10px;
  149. 147.  - }
  150. 148.  - .join_finish_wrap {
  151. 149.  -   padding: 25px 30px 30px;
  152. 150.  - }
  153. 151.  - .join_about_finish {
  154. 152.  -   line-height: 160%;
  155. 153.  -   padding: 0px 0px 15px;
  156. 154.  - }
  157. 155.  -
  158. 156.  - .join_submit_wrap {
  159. 157.  -   width: 160px;
  160. 158.  -   margin: 25px auto 0px;
  161. 159.  - }
  162. 160.  - #join_other_phone {
  163. 161.  -   position: absolute;
  164. 162.  -   margin: -19px 0px 0px 144px;
  165. 163.  - }
  166. 164.  - .is_rtl1 #join_other_phone {
  167. 165.  -   margin-left: 0px;
  168. 166.  -   margin-right: 144px;
  169. 167.  - }
  170. 168.  - #join_about_pass {
  171. 169.  -   position: absolute;
  172. 170.  -   margin-top: -1px;
  173. 171.  -   height: 5px;
  174. 172.  -   width: 134px;
  175. 173.  -   overflow: hidden;
  176. 174.  - }
  177. 175.  - .join_label {
  178. 176.  -   font-weight: bold;
  179. 177.  -   font-size: 1.09em;
  180. 178.  -   color: #45688E;
  181. 179.  -   padding-bottom: 5px;
  182. 180.  -   padding-top: 10px;
  183. 181.  - }
  184. 182.  - #join_phone,
  185. 183.  - #join_code,
  186. 184.  - #join_pass {
  187. 185.  -   width: 124px;
  188. 186.  -   outline: none;
  189. 187.  - }
  190. 188.  - .join_select_wrap input.join_readonly {
  191. 189.  -   background: #E1E7ED;
  192. 190.  - }
  193. 191.  - .join_no_code {
  194. 192.  -   padding-top: 10px;
  195. 193.  -   text-align: center;
  196. 194.  -   color: #777;
  197. 195.  - }
  198. 196.  -
  199. 197.  - #join_submit_result {
  200. 198.  -   display: none;
  201. 199.  -   margin-bottom: 10px;
  202. 200.  - }
  203. 201.  - .join_box_body {
  204. 202.  -   line-height: 160%;
  205. 203.  - }
  206. 204.  - .join_about_login {
  207. 205.  -   padding-top: 5px;
  208. 206.  -   font-size: 0.9em;
  209. 207.  -   color: #777;
  210. 208.  - }
  211. 209.  - .join_skip, div.join_skip_prg {
  212. 210.  -   margin-top: 1px;
  213. 211.  -   display: block;
  214. 212.  - }
  215. 213.  - .join_fb_help_img {
  216. 214.  -   width: 173px;
  217. 215.  -   margin: 0px auto;
  218. 216.  -   padding: 17px 0px 14px 12px;
  219. 217.  - }
  220. 218.  - .join_help_img {
  221. 219.  -   width: 225px;
  222. 220.  -   margin: 0px auto;
  223. 221.  -   padding: 17px 0px 14px 12px;
  224. 222.  - }
  225. 223.  - .join_school_img, .join_university_img {
  226. 224.  -   width: 225px;
  227. 225.  -   height: 160px;
  228. 226.  - }
  229. 227.  - .join_school_img {
  230. 228.  -   background-image: url(/images/join/school_f.gif);
  231. 229.  - }
  232. 230.  - .join_university_img {
  233. 231.  -   background-image: url(/images/join/university_f.gif);
  234. 232.  - }
  235. 233.  - .join_finish_img {
  236. 234.  -   width: 225px;
  237. 235.  -   height: 160px;
  238. 236.  -   background: url(/images/join/finish_f.gif);
  239. 237.  - }
  240. 238.  - .join_fb_help_img .join_finish_img {
  241. 239.  -   background: url(/images/join/join_fb.gif) center center no-repeat;
  242. 240.  -   width: 173px;
  243. 241.  -   height: 184px;
  244. 242.  - }
  245. 243.  -
  246. 244.  - .join_pwd_level0 {
  247. 245.  -   display: none;
  248. 246.  - }
  249. 247.  - .join_pwd_level1 {
  250. 248.  -   background: #CD4849;
  251. 249.  -   width: 25%;
  252. 250.  - }
  253. 251.  - .join_pwd_level2 {
  254. 252.  -   background: #FF762D;
  255. 253.  -   width: 50%;
  256. 254.  - }
  257. 255.  - .join_pwd_level3 {
  258. 256.  -   background: #C9B72D;
  259. 257.  -   width: 75%;
  260. 258.  - }
  261. 259.  - .join_pwd_level4 {
  262. 260.  -   background: #60B92B;
  263. 261.  -   width: 100%;
  264. 262.  - }
  265. 263.  - #join_pass_strength {
  266. 264.  -   color: #777;
  267. 265.  - }
  268. 266.  -
  269. 267.  - .join_next_button button {
  270. 268.  -   padding-right: 2px;
  271. 269.  - }
  272. 270.  - .is_rtl1 .join_next_button button {
  273. 271.  -   padding-right: 14px;
  274. 272.  -   padding-left: 2px;
  275. 273.  - }
  276. 274.  - .join_with_arr {
  277. 275.  -   padding-right: 25px;
  278. 276.  -   background: url(/images/backlink.gif?4) no-repeat right -127px;
  279. 277.  - }
  280. 278.  - .is_rtl1 .join_with_arr {
  281. 279.  -   padding-right: 0px;
  282. 280.  -   padding-left: 25px;
  283. 281.  -   background: url(/images/backlink.gif?4) no-repeat left -97px;
  284. 282.  - }
  285. 283.  -
  286. 284.  - .join_phone_row {
  287. 285.  -   width: 134px;
  288. 286.  -   *overflow: hidden;
  289. 287.  -   margin: 0px auto 10px;
  290. 288.  - }
  291. 289.  - .join_phone_submit {
  292. 290.  -   width: 134px;
  293. 291.  -   margin: 11px auto 0px;
  294. 292.  - }
  295. 293.  - .join_phone_label {
  296. 294.  -   font-weight: bold;
  297. 295.  -   font-size: 1.09em;
  298. 296.  -   color: #45688E;
  299. 297.  -   padding-bottom: 10px;
  300. 298.  -   padding-top: 6px;
  301. 299.  -   width: 200px;
  302. 300.  - }
  303. 301.  - .join_resend_box {
  304. 302.  -   line-height: 160%;
  305. 303.  - }
  306. 304.  - input.join_big_text {
  307. 305.  -   font-family: tahoma, tahoma, verdana, arial, sans-serif, Lucida Sans;
  308. 306.  -   background: #FFF;
  309. 307.  -   border: 1px solid #C0CAD5;
  310. 308.  -   font-size: 1.09em !important;
  311. 309.  -   padding: 5px 4px 4px;
  312. 310.  -   margin: 0px;
  313. 311.  - }
  314. 312.  - .join_finish_tt_pointer {
  315. 313.  -   behavior: url(/js/iepngfix.htc);
  316. 314.  -   background: url(/images/ddtooltip.png) 0 0 no-repeat;
  317. 315.  -   width: 8px;
  318. 316.  -   height: 11px;
  319. 317.  -   position: absolute;
  320. 318.  -   left: -7px;
  321. 319.  -   overflow: hidden;
  322. 320.  -   z-index: 10;
  323. 321.  -   top: 31px;
  324. 322.  - }
  325. 323.  - .join_finish_tt table .tt_text {
  326. 324.  -   line-height: 120%;
  327. 325.  -   color: #000;
  328. 326.  -   padding: 10px;
  329. 327.  -   width: 200px;
  330. 328.  - }
  331. 329.  - .join_phone_tt table div.tt_text {
  332. 330.  -   width: 220px;
  333. 331.  - }
  334. 332.  - .join_school_tt table div.tt_text {
  335. 333.  -   width: 170px;
  336. 334.  - }
  337. 335.  - .join_year_tt .join_finish_tt_pointer, .join_university_tt .join_finish_tt_pointer {
  338. 336.  -   top: 20px;
  339. 337.  - }
  340. 338.  - .join_about_phone {
  341. 339.  -   padding: 24px 80px;
  342. 340.  - }
  343. 341.  -
  344. 342.  - #join_phone_table {
  345. 343.  -   border: 1px solid #C0CAD5;
  346. 344.  -   width: 134px;
  347. 345.  - }
  348. 346.  - .join_readonly_wrap {
  349. 347.  -   background: #E1E7ED;
  350. 348.  - }
  351. 349.  - #join_phone_prefix {
  352. 350.  -   vertical-align: top;
  353. 351.  -   width: 1px;
  354. 352.  -   color: #777;
  355. 353.  -   font-size: 1.09em;
  356. 354.  -   padding: 5px 0px 4px 5px;
  357. 355.  - }
  358. 356.  - .join_readonly_wrap #join_phone_prefix {
  359. 357.  -   color: #000;
  360. 358.  - }
  361. 359.  - .join_phone_field {
  362. 360.  -   vertical-align: top;
  363. 361.  -   width: 100%;
  364. 362.  -   padding: 5px 0px 0px;
  365. 363.  - }
  366. 364.  - .is_rtl1 #join_phone_prefix {
  367. 365.  -   padding: 5px 5px 4px 0px;
  368. 366.  - }
  369. 367.  - #join_phone_table #join_phone {
  370. 368.  -   width: 100%;
  371. 369.  -   outline: none;
  372. 370.  -   border: 0px;
  373. 371.  -   padding: 0px;
  374. 372.  -   margin: 0px -1px;
  375. 373.  -   background: transparent;
  376. 374.  - }
  377. 375.  - #join_country_wrap .selector_container td.selector {
  378. 376.  -   padding-top: 5px;
  379. 377.  -   padding-bottom: 2px;
  380. 378.  - }
  381. 379.  - #join_country_wrap .disabled.selector_container .selector_dropdown {
  382. 380.  -   background-color: #F2F2F2;
  383. 381.  -   border-color: #F2F2F2;
  384. 382.  - }
  385. 383.  -
  386. 384.  - .join_box_row {
  387. 385.  -   width: 160px;
  388. 386.  -   margin: 0px auto;
  389. 387.  -   position: relative;
  390. 388.  -   padding-top: 10px;
  391. 389.  - }
  392. 390.  - #join_box_first_name, #join_box_last_name {
  393. 391.  -   width: 150px;
  394. 392.  - }
  395. 393.  - #join_box_content {
  396. 394.  -   padding-top: 26px;
  397. 395.  - }
  398. 396.  - #join_box_msg {
  399. 397.  -   border: 1px solid #F7F7F7;
  400. 398.  -   background: #F7F7F7;
  401. 399.  - }
  402. 400.  - #join_box_sex_row {
  403. 401.  -   display: none;
  404. 402.  - }
  405. 403.  - .join_box_form {
  406. 404.  -   padding: 1px 0px 13px;
  407. 405.  - }
  408. 406.  - div.join_box_button button {
  409. 407.  -   padding-right: 0px;
  410. 408.  - }
  411. 409.  - .is_rtl1 div.join_box_button button {
  412. 410.  -   padding-left: 0px;
  413. 411.  -   padding-right: 14px;
  414. 412.  - }
  415. 413.  -
  416. 414.  - .join_robot {
  417. 415.  -   width: 160px;
  418. 416.  -   height: 160px;
  419. 417.  -   margin: -7px auto -9px;
  420. 418.  -   background: url(/images/join/robot.gif) no-repeat;
  421. 419.  - }
  422. 420.  -
  423. 421.  - .join_already_row {
  424. 422.  -   padding: 15px 0px;
  425. 423.  -   margin: 0px 6px;
  426. 424.  -   border-top: 1px solid #E7EAED;
  427. 425.  - }
  428. 426.  - .join_already_row .join_name_wrap {
  429. 427.  -   padding: 7px 5px 12px;
  430. 428.  - }
  431. 429.  - .join_already_text {
  432. 430.  -   padding: 0px 10px 10px;
  433. 431.  -   line-height: 160%;
  434. 432.  -   font-size: 1.09em;
  435. 433.  -   text-align: center;
  436. 434.  - }
  437. 435.  - .join_already_thumb {
  438. 436.  -   width: 100px;
  439. 437.  -   height: 100px;
  440. 438.  -   margin: 0px auto;
  441. 439.  -   overflow: hidden;
  442. 440.  - }
  443. 441.  - .join_already_img {
  444. 442.  -   width: 100px;
  445. 443.  - }
  446. 444.  - .join_already_row .join_name_wrap {
  447. 445.  -   padding-bottom: 15px;
  448. 446.  -   text-align: center;
  449. 447.  - }
  450. 448.  - .join_already_row .button_blue {
  451. 449.  -   width: 250px;
  452. 450.  -   margin: 0px auto;
  453. 451.  - }
  454. 452.  -
  455. 453.  - .join_box_header {
  456. 454.  -   font-size: 1.09em;
  457. 455.  -   font-weight: bold;
  458. 456.  -   color: #45688E;
  459. 457.  -   margin: 0px 12px 13px;
  460. 458.  - }
  461. 459.  - .join_box_label {
  462. 460.  -   font-weight: bold;
  463. 461.  -   font-size: 1.09em;
  464. 462.  -   color: #45688E;
  465. 463.  -   padding-bottom: 10px;
  466. 464.  -   padding-top: 6px;
  467. 465.  -   width: 200px;
  468. 466.  - }
  469. 467.  - .join_box_wrap {
  470. 468.  -   margin: -10px;
  471. 469.  -   background: #FFF;
  472. 470.  -   position: relative;
  473. 471.  -   padding: 20px 15px;
  474. 472.  -   -moz-box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.35);
  475. 473.  -   -webkit-box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.35);
  476. 474.  -   box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.35);
  477. 475.  - }
  478. 476.  - .join_box_row .join_box_button {
  479. 477.  -   margin-top: 10px;
  480. 478.  - }
  481. 479.  - #join_box_sex_row .selector_container td.selector {
  482. 480.  -   padding-top: 3px;
  483. 481.  -   padding-bottom: 2px;
  484. 482.  - }
  485. 483.  - .join_box_close {
  486. 484.  -   margin: -20px -15px 0px;
  487. 485.  -   padding: 20px 27px;
  488. 486.  - }
  489. 487.  -
  490. 488.  - .join_sure_new_page {
  491. 489.  -   text-align: center;
  492. 490.  -   line-height: 160%;
  493. 491.  -   font-size: 1.09em;
  494. 492.  - }
  495. 493.  - #join_accept_terms {
  496. 494.  -   padding: 10px 0px 0px;
  497. 495.  -   margin-bottom: -10px;
  498. 496.  -   text-align: center;
  499. 497.  -   font-size: 10px;
  500. 498.  -   color: #777;
  501. 499.  - }
  502. 500.  - .join_import_info {
  503. 501.  -   padding: 0px 0px 10px;
  504. 502.  -   font-size: 1.09em;
  505. 503.  -   color: #777;
  506. 504.  -   text-align: center;
  507. 505.  - }
  508. 506.  - .join_fb_progress {
  509. 507.  -   margin-top: 40px;
  510. 508.  -   background: url('/images/progress7.gif') center center no-repeat;
  511. 509.  -   height: 50px;
  512. 510.  - }
  513. 511.  - #join_show_result {
  514. 512.  -   display: none;
  515. 513.  - }
  516. 514.  - #join_email {
  517. 515.  -   width: 124px;
  518. 516.  -   outline: none;
  519. 517.  -   background: #F7F7F7;
  520. 518.  - }
  521. 519.  - .join_fbinfo_label {
  522. 520.  -   padding: 0px 0px 4px 0px;
  523. 521.  -   color: #888888;
  524. 522.  -   font-weight: normal;
  525. 523.  - }
  526. 524.  - .join_fb_pic {
  527. 525.  -   margin: 0px 8px 0px 0px;
  528. 526.  - }
  529. 527.  - .is_rtl1 .join_fb_pic {
  530. 528.  -   margin: 0px 0px 0px 8px;
  531. 529.  - }
  532. 530.  - #join_show_result_wrap {
  533. 531.  -   opacity: 0;
  534. 532.  -   filter: alpha(opacity=0);
  535. 533.  - }
  536. 534.  - #join_fb_mobile .join_phone_label {
  537. 535.  -   padding-top: 0px;
  538. 536.  - }
  539. 537.  - #join_fb_friends_result {
  540. 538.  -   padding: 0px 0px 0px 24px;
  541. 539.  - }
  542. 540.  - .json_fb_friends_h {
  543. 541.  -   padding-bottom: 0px;
  544. 542.  - }
  545. 543.  - .join_import_progress {
  546. 544.  -   margin-top: 38px;
  547. 545.  - }
  548. 546.  - #join_show_result_wrap{
  549. 547.  -   padding-bottom: 10px;
  550. 548.  - }
  551. ------
  552. Файл - join.js (Старый размер - 33690 | Новый - 0):
  553. 0.  - var Join = {
  554. 1.  -   show: function(el) {
  555. 2.  -     if (!isVisible(el)) slideDown(el, 150);
  556. 3.  -   },
  557. 4.  -   hide: function(el) {
  558. 5.  -     if (isVisible(el)) slideUp(el, 150);
  559. 6.  -   },
  560. 7.  -
  561. 8.  -   scrollnode: function() {
  562. 9.  -     return browser.msie6 ? pageNode : window;
  563. 10.  -   },
  564. 11.  -   scrollResize: function(e, pp) {
  565. 12.  -     if (browser.mobile && !browser.safari_mobile) return;
  566. 13.  -
  567. 14.  -     var de = document.documentElement, st = scrollGetY();
  568. 15.  -
  569. 16.  -     if (pp === true) {
  570. 17.  -       cur.nextButtonTop = getXY(cur.nextButtonWrap)[1];
  571. 18.  -       if (browser.msie6) cur.nextButtonTop += st;
  572. 19.  -     }
  573. 20.  -     var needDock = cur.resultShown && (st + lastWindowHeight < cur.nextButtonTop + cur.nextButtonHeight);
  574. 21.  -     if (needDock && !cur.docked) {
  575. 22.  -       cur.nextButton.className = 'fixed';
  576. 23.  -       if (browser.msie6) {
  577. 24.  -         bodyNode.appendChild(cur.nextButton);
  578. 25.  -         e = {type: 'resize'};
  579. 26.  -       }
  580. 27.  -       cur.docked = true;
  581. 28.  -     } else if (!needDock && cur.docked) {
  582. 29.  -       cur.nextButton.className = '';
  583. 30.  -       if (browser.msie6) {
  584. 31.  -         cur.nextButtonWrap.appendChild(cur.nextButton);
  585. 32.  -       }
  586. 33.  -       cur.docked = false;
  587. 34.  -     }
  588. 35.  -     if (cur.docked && e && e.type == 'resize') {
  589. 36.  -       if (browser.msie6) {
  590. 37.  -         cur.nextButton.style.left = getXY(ge('content'))[0] + 'px';
  591. 38.  -       } else {
  592. 39.  -         cur.nextButton.style.left = (ge('page_layout').offsetLeft + ge('content').offsetLeft) + 'px';
  593. 40.  -         setTimeout(Join.nextResetStyle, 0);
  594. 41.  -       }
  595. 42.  -     }
  596. 43.  -
  597. 44.  -     var ch = window.innerHeight || de.clientHeight || bodyNode.clientHeight;
  598. 45.  -
  599. 46.  -     if (!cur.resultShown || !cur.moreLink || !isVisible(cur.moreLink)) return;
  600. 47.  -     if (st + ch > cur.moreLink.offsetTop) {
  601. 48.  -       Join.showMore();
  602. 49.  -     }
  603. 50.  -   },
  604. 51.  -   nextResetStyle: function() {
  605. 52.  -     cur.nextButton.style.left = '';
  606. 53.  -   },
  607. 54.  -   initScroll: function() {
  608. 55.  -     extend(cur, {
  609. 56.  -       nextButton: ge('join_' + cur.section + '_next'),
  610. 57.  -       nextButtonWrap: ge('join_' + cur.section + '_next_wrap'),
  611. 58.  -       imgEl: ge('join_' + cur.section + '_img'),
  612. 59.  -       rowsEl: ge('join_' + cur.section + '_rows'),
  613. 60.  -       moreLink: ge('join_' + cur.section + '_more'),
  614. 61.  -       noneWrap: ge('join_' + cur.section + '_none_wrap'),
  615. 62.  -       noneEl: ge('join_' + cur.section + '_none'),
  616. 63.  -       resultEl: ge('join_' + cur.section + '_result')
  617. 64.  -     });
  618. 65.  -     cur.nextButtonHeight = getSize(cur.nextButton)[1];
  619. 66.  -     cur.nextButtonWrap.style.height = cur.nextButtonHeight + 'px';
  620. 67.  -     cur.resultShown = isVisible(cur.resultEl);
  621. 68.  -     Join.scrollResize(false, true);
  622. 69.  -
  623. 70.  -     addEvent(Join.scrollnode(), 'scroll', Join.scrollResize);
  624. 71.  -     addEvent(window, 'resize', Join.scrollResize);
  625. 72.  -     cur.destroy.push(function(c) {
  626. 73.  -       removeEvent(Join.scrollnode(), 'scroll', Join.scrollResize);
  627. 74.  -       removeEvent(window, 'resize', Join.scrollResize);
  628. 75.  -       if (browser.msie6) c.nextButtonWrap.appendChild(c.nextButton);
  629. 76.  -     });
  630. 77.  -   },
  631. 78.  -
  632. 79.  -   showMore: function() {
  633. 80.  -     if (!isVisible('join_' + cur.section + '_rows')) return;
  634. 81.  -     var params = extend(cur.params, {from: cur.from});
  635. 82.  -     ajax.post('join.php', params, {
  636. 83.  -       showProgress: Join.showMoreProgress,
  637. 84.  -       hideProgress: Join.hideMoreProgress,
  638. 85.  -       onDone: Join.showRows.pbind(false),
  639. 86.  -       cache: 1
  640. 87.  -     });
  641. 88.  -   },
  642. 89.  -   showRows: function(fromStart, rows, from, preload) {
  643. 90.  -     cur.from = from;
  644. 91.  -     var params;
  645. 92.  -     if (fromStart) {
  646. 93.  -       if (!rows) return Join.showNone(getLang('join_no_found_' + cur.section), true);
  647. 94.  -       val(cur.rowsEl, rows);
  648. 95.  -       if (preload && preload[0]) {
  649. 96.  -         params = extend(cur.params, {from: cur.from});
  650. 97.  -         ajax.preload('join.php', params, preload);
  651. 98.  -         show(cur.moreLink);
  652. 99.  -       } else {
  653. 100.  -         hide(cur.moreLink);
  654. 101.  -       }
  655. 102.  -     } else {
  656. 103.  -       val(cur.rowsEl, val(cur.rowsEl) + rows);
  657. 104.  -       hide(cur.moreLink);
  658. 105.  -       params = extend(cur.params, {from: cur.from});
  659. 106.  -       ajax.post('join.php', params, {
  660. 107.  -         cache: 1,
  661. 108.  -         onDone: function(rows) {
  662. 109.  -           (rows ? show : hide)(cur.moreLink);
  663. 110.  -         }
  664. 111.  -       });
  665. 112.  -     }
  666. 113.  -     show(cur.resultEl);
  667. 114.  -     hide(cur.imgEl);
  668. 115.  -     val(cur.noneEl, getLang('join_select_' + cur.section + '_after'));
  669. 116.  -     cur.noneEl.style.visibility = '';
  670. 117.  -     hide('join_' + cur.section + '_none_prg');
  671. 118.  -     cur.resultShown = true;
  672. 119.  -     val('join_next_step', getLang('join_next_step'));
  673. 120.  -     //show(cur.nextButtonWrap);
  674. 121.  -     Join.scrollResize(false, true);
  675. 122.  -   },
  676. 123.  -   showNone: function(text, noSkipLabel) {
  677. 124.  -     show(cur.noneWrap, cur.imgEl);
  678. 125.  -     val(cur.noneEl, text);
  679. 126.  -     cur.noneEl.style.visibility = '';
  680. 127.  -     hide('join_' + cur.section + '_none_prg');
  681. 128.  -     hide(cur.resultEl);
  682. 129.  -     cur.resultShown = false;
  683. 130.  -     val('join_next_step', getLang((noSkipLabel === true) ? 'join_next_step' : 'join_skip_' + cur.section));
  684. 131.  -     //hide(cur.nextButtonWrap);
  685. 132.  -     Join.scrollResize(false, true);
  686. 133.  -   },
  687. 134.  -
  688. 135.  -   init: function(section, selData) {
  689. 136.  -     selectsData.setCountries(selData.countries_list);
  690. 137.  -     var i;
  691. 138.  -     for (i in selData.countries) {
  692. 139.  -       selectsData.setCountryInfo(i, selData.countries[i]);
  693. 140.  -     }
  694. 141.  -     for (i in selData.cities) {
  695. 142.  -       selectsData.setCityInfo(i, selData.cities[i]);
  696. 143.  -     }
  697. 144.  -     if (selData.universities) {
  698. 145.  -       for (i in selData.universities) {
  699. 146.  -         selectsData.setUniversityInfo(i, selData.universities[i]);
  700. 147.  -       }
  701. 148.  -     }
  702. 149.  -     if (selData.faculties) {
  703. 150.  -       for (i in selData.faculties) {
  704. 151.  -         selectsData.setFacultyInfo(i, selData.faculties[i]);
  705. 152.  -       }
  706. 153.  -     }
  707. 154.  -     cur.section = section;
  708. 155.  -     var upd = (section == 'school') ? Join.updateSchool : Join.updateUniversity;
  709. 156.  -     cur.cityUpdated = selData.city;
  710. 157.  -
  711. 158.  -     cur.uiYear = new Dropdown(ge(section + '_year'), selData.years, {
  712. 159.  -       width: 160,
  713. 160.  -       placeholder: getLang('year_ph'),
  714. 161.  -       zeroPlaceholder: true,
  715. 162.  -       placeholderColor: '#777',
  716. 163.  -       selectedItems: [selData.year],
  717. 164.  -       onChange: function(value) {
  718. 165.  -         if (intval(value)) {
  719. 166.  -           Join.tipHide(cur.section + '_year_tip');
  720. 167.  -         }
  721. 168.  -         upd();
  722. 169.  -       }
  723. 170.  -     });
  724. 171.  -     if (section == 'school') {
  725. 172.  -       cur.uiClass = new ClassSelect(ge('school_class'), ge('school_class_row'), {
  726. 173.  -         show: Join.show,
  727. 174.  -         hide: Join.hide,
  728. 175.  -         width: 160,
  729. 176.  -         placeholder: getLang('class_ph'),
  730. 177.  -         zeroPlaceholder: true,
  731. 178.  -         placeholderColor: '#777',
  732. 179.  -         country: selData.country,
  733. 180.  -         school: selData.school,
  734. 181.  -         school_class: selData.cur_class,
  735. 182.  -         onChange: upd
  736. 183.  -       });
  737. 184.  -       cur.uiSchool = new SchoolHintSelect(ge('school_school'), ge('school_school_row'), {
  738. 185.  -         show: function(el) {
  739. 186.  -           Join.show(el);
  740. 187.  -           if (cur.cityUpdated) {
  741. 188.  -             cur.cityUpdated = false;
  742. 189.  -             setTimeout(Join.focusWithoutDropdown, 0);
  743. 190.  -           }
  744. 191.  -         },
  745. 192.  -         hide: function(el) {
  746. 193.  -           Join.hide(el);
  747. 194.  -           Join.tipHide('school_school_tip');
  748. 195.  -         },
  749. 196.  -         width: 160,
  750. 197.  -         school: selData.school_val,
  751. 198.  -         city: selData.city,
  752. 199.  -         placeholder: getLang('school_ph'),
  753. 200.  -         zeroPlaceholder: true,
  754. 201.  -         placeholderColor: '#777',
  755. 202.  -         forceEnableCustom: -1,
  756. 203.  -         classSelect: cur.uiClass,
  757. 204.  -         onChange: function(value) {
  758. 205.  -           if (intval(value)) {
  759. 206.  -             Join.show('school_year_row');
  760. 207.  -             Join.yearTip();
  761. 208.  -             Join.tipHide('school_school_tip');
  762. 209.  -           } else {
  763. 210.  -             Join.hide('school_year_row');
  764. 211.  -             Join.tipHide('school_year_tip');
  765. 212.  -           }
  766. 213.  -           upd();
  767. 214.  -         }
  768. 215.  -       });
  769. 216.  -     } else {
  770. 217.  -       cur.uiChair = new ChairSelect(ge('university_chair'), ge('university_chair_row'), {
  771. 218.  -         show: Join.show,
  772. 219.  -         hide: Join.hide,
  773. 220.  -         width: 160,
  774. 221.  -         placeholder: getLang('chair_ph'),
  775. 222.  -         zeroPlaceholder: true,
  776. 223.  -         placeholderColor: '#777',
  777. 224.  -         chair: selData.chair,
  778. 225.  -         faculty: selData.faculty,
  779. 226.  -         onChange: upd
  780. 227.  -       });
  781. 228.  -       cur.uiFaculty = new FacultySelect(ge('university_faculty'), ge('university_faculty_row'), {
  782. 229.  -         show: Join.show,
  783. 230.  -         hide: Join.hide,
  784. 231.  -         width: 160,
  785. 232.  -         placeholder: getLang('faculty_ph'),
  786. 233.  -         zeroPlaceholder: true,
  787. 234.  -         placeholderColor: '#777',
  788. 235.  -         faculty: selData.faculty,
  789. 236.  -         university: selData.university,
  790. 237.  -         chairSelect: cur.uiChair,
  791. 238.  -         onChange: upd
  792. 239.  -       });
  793. 240.  -       cur.uiUniversity = new UniversitySelect(ge('university_university'), ge('university_university_row'), {
  794. 241.  -         show: function(el) {
  795. 242.  -           Join.show(el);
  796. 243.  -           if (cur.cityUpdated) {
  797. 244.  -             cur.cityUpdated = false;
  798. 245.  -             setTimeout(Join.focusWithoutDropdown, 0);
  799. 246.  -           }
  800. 247.  -         },
  801. 248.  -         hide: function(el) {
  802. 249.  -           Join.hide(el);
  803. 250.  -           Join.tipHide('university_university_tip');
  804. 251.  -         },
  805. 252.  -         width: 160,
  806. 253.  -         placeholder: getLang('university_ph'),
  807. 254.  -         zeroPlaceholder: true,
  808. 255.  -         placeholderColor: '#777',
  809. 256.  -         university: selData.university,
  810. 257.  -         city: selData.city,
  811. 258.  -         facultySelect: cur.uiFaculty,
  812. 259.  -         onChange: function(value) {
  813. 260.  -           if (intval(value)) {
  814. 261.  -             Join.show('university_year_row');
  815. 262.  -             Join.yearTip();
  816. 263.  -             Join.tipHide('university_university_tip');
  817. 264.  -           } else {
  818. 265.  -             Join.hide('university_year_row');
  819. 266.  -             Join.tipHide('university_year_tip');
  820. 267.  -           }
  821. 268.  -           upd();
  822. 269.  -         }
  823. 270.  -       });
  824. 271.  -     }
  825. 272.  -     cur.uiCity = new CitySelect(ge(section + '_city'), ge(section + '_city_row'), {
  826. 273.  -       show: function(el) {
  827. 274.  -         setTimeout(function() {
  828. 275.  -           if (!intval(cur.uiCity.val())) {
  829. 276.  -             Join.tipShow(cur.section + '_city_tip', 'join_' + cur.section + '_city_tip', [-15, -52, 3], 'join_phone_tt');
  830. 277.  -           }
  831. 278.  -         }, 0);
  832. 279.  -         Join.show(el);
  833. 280.  -       },
  834. 281.  -       hide: function(el) {
  835. 282.  -         Join.tipHide(cur.section + '_city_tip');
  836. 283.  -         Join.hide(el);
  837. 284.  -       },
  838. 285.  -       width: 160,
  839. 286.  -       placeholder: getLang('city_ph'),
  840. 287.  -       zeroPlaceholder: true,
  841. 288.  -       placeholderColor: '#777',
  842. 289.  -       city: selData.city_val,
  843. 290.  -       country: selData.country,
  844. 291.  -       schoolSelect: (section == 'school') ? cur.uiSchool : false,
  845. 292.  -       universitySelect: (section == 'university') ? cur.uiUniversity : false,
  846. 293.  -       onChange: function(value) {
  847. 294.  -         if (intval(value)) {
  848. 295.  -           Join.tipHide(cur.section + '_city_tip');
  849. 296.  -         } else if (intval(cur.uiCountry.val())) {
  850. 297.  -           Join.tipShow(cur.section + '_city_tip', 'join_' + cur.section + '_city_tip', [-15, -52, 3], 'join_phone_tt');
  851. 298.  -         }
  852. 299.  -         cur.cityUpdated = true;
  853. 300.  -         upd();
  854. 301.  -       }
  855. 302.  -     });
  856. 303.  -     cur.uiCountry = new CountrySelect(ge(section + '_country'), ge(section + '_country_row'), {
  857. 304.  -       show: Join.show,
  858. 305.  -       hide: Join.hide,
  859. 306.  -       width: 160,
  860. 307.  -       placeholder: getLang('country_ph'),
  861. 308.  -       zeroPlaceholder: true,
  862. 309.  -       placeholderColor: '#777',
  863. 310.  -       country: selData.country_val,
  864. 311.  -       citySelect: cur.uiCity,
  865. 312.  -       classSelect: (section == 'school') ? cur.uiClass : false,
  866. 313.  -       onChange: upd
  867. 314.  -     });
  868. 315.  -     if (isVisible(cur.section + '_year_row')) {
  869. 316.  -       setTimeout(Join.yearTip, 0);
  870. 317.  -     }
  871. 318.  -
  872. 319.  -     cur.params = {act: section + '_load', year: selData.year};
  873. 320.  -     if (section == 'school') {
  874. 321.  -       extend(cur.params, {school: selData.school, cls: selData.cur_class});
  875. 322.  -     } else {
  876. 323.  -       extend(cur.params, {university: selData.university, faculty: selData.faculty, chair: selData.chair});
  877. 324.  -     }
  878. 325.  -     if (cur.preload[0]) {
  879. 326.  -       ajax.preload('join.php', extend(cur.params, {from: cur.from}), cur.preload);
  880. 327.  -     }
  881. 328.  -     Join.initScroll();
  882. 329.  -   },
  883. 330.  -   focusWithoutDropdown: function() {
  884. 331.  -     var dd = (cur.section == 'school') ? cur.uiSchool : cur.uiUniversity;
  885. 332.  -     if (!intval(cur.uiCity.val()) || intval(dd.val())) return;
  886. 333.  -     dd.focusSelf = true;
  887. 334.  -     dd.focus();
  888. 335.  -     dd.select.hide();
  889. 336.  -     Join.tipShow(cur.section + '_' + cur.section + '_tip', 'join_' + cur.section + '_tip', [-15, (cur.section == 'school') ? -52 : -36, 3], 'join_' + cur.section + '_tt');
  890. 337.  -   },
  891. 338.  -   yearTip: function() {
  892. 339.  -     if (intval(cur.uiYear.val())) {
  893. 340.  -       Join.tipHide(cur.section + '_year_tip');
  894. 341.  -     } else {
  895. 342.  -       Join.tipShow(cur.section + '_year_tip', 'join_' + cur.section + '_year_tip', [-15, -36, 3], 'join_year_tt');
  896. 343.  -     }
  897. 344.  -   },
  898. 345.  -
  899. 346.  -   showProgress: function() {
  900. 347.  -     if (isVisible(cur.resultEl)) {
  901. 348.  -       var summary = ge('join_' + cur.section + '_summary');
  902. 349.  -       if (!summary.lastChild || !hasClass(summary.lastChild, 'progress_inline')) {
  903. 350.  -         summary.appendChild(ce('span', {className: 'progress_inline join_summary_prg'}));
  904. 351.  -       }
  905. 352.  -     } else {
  906. 353.  -       show('join_' + cur.section + '_none_prg');
  907. 354.  -       cur.noneEl.style.visibility = 'hidden';
  908. 355.  -     }
  909. 356.  -   },
  910. 357.  -   hideProgress: function() {
  911. 358.  -     if (isVisible(cur.resultEl)) {
  912. 359.  -       var summary = ge('join_' + cur.section + '_summary');
  913. 360.  -       if (summary.lastChild && hasClass(summary.lastChild, 'progress_inline')) {
  914. 361.  -         re(summary.lastChild);
  915. 362.  -       }
  916. 363.  -     } else {
  917. 364.  -       cur.noneEl.style.visibility = '';
  918. 365.  -       hide('join_' + cur.section + '_none_prg');
  919. 366.  -     }
  920. 367.  -   },
  921. 368.  -
  922. 369.  -   updateSchool: function() {
  923. 370.  -     if (!intval(cur.uiCountry.val())) {
  924. 371.  -       return Join.showNone(getLang('join_select_school_city'));
  925. 372.  -     } else if (!intval(cur.uiCity.val())) {
  926. 373.  -       ajax.post('join.php', {act: 'city_last', country: cur.uiCountry.val(), city: cur.uiCity.val()});
  927. 374.  -       return Join.showNone(getLang('join_select_school_city'));
  928. 375.  -     } else if (!intval(cur.uiSchool.val())) {
  929. 376.  -       ajax.post('join.php', {act: 'city_last', country: cur.uiCountry.val(), city: cur.uiCity.val()});
  930. 377.  -       return Join.showNone(getLang('join_select_school'));
  931. 378.  -     } else if (!intval(cur.uiYear.val())) {
  932. 379.  -       ajax.post('join.php', {act: 'school_last', school: cur.uiSchool.val(), cls: cur.uiClass.val()});
  933. 380.  -       return Join.showNone(getLang('join_select_school_year'));
  934. 381.  -     }
  935. 382.  -     cur.params = {act: 'school_load', school: cur.uiSchool.val(), year: cur.uiYear.val(), cls: cur.uiClass.val()};
  936. 383.  -     ajax.post('join.php', cur.params, {
  937. 384.  -       showProgress: Join.showProgress,
  938. 385.  -       hideProgress: Join.hideProgress,
  939. 386.  -       onDone: Join.showRows.pbind(true),
  940. 387.  -       cache: 1
  941. 388.  -     });
  942. 389.  -   },
  943. 390.  -   updateUniversity: function() {
  944. 391.  -     if (!intval(cur.uiCountry.val())) {
  945. 392.  -       return Join.showNone(getLang('join_select_university_city'));
  946. 393.  -     } else if (!intval(cur.uiCity.val())) {
  947. 394.  -       ajax.post('join.php', {act: 'city_last', country: cur.uiCountry.val(), city: cur.uiCity.val()});
  948. 395.  -       return Join.showNone(getLang('join_select_university_city'));
  949. 396.  -     } else if (!intval(cur.uiUniversity.val())) {
  950. 397.  -       ajax.post('join.php', {act: 'city_last', country: cur.uiCountry.val(), city: cur.uiCity.val()});
  951. 398.  -       return Join.showNone(getLang('join_select_university'));
  952. 399.  -     } else if (!intval(cur.uiYear.val())) {
  953. 400.  -       ajax.post('join.php', {act: 'university_last', university: cur.uiUniversity.val(), faculty: cur.uiFaculty.val(), chair: cur.uiChair.val()});
  954. 401.  -       return Join.showNone(getLang('join_select_university_year'));
  955. 402.  -     }
  956. 403.  -     cur.params = {act: 'university_load', university: cur.uiUniversity.val(), faculty: cur.uiFaculty.val(), chair: cur.uiChair.val(), year: cur.uiYear.val()};
  957. 404.  -     ajax.post('join.php', cur.params, {
  958. 405.  -       showProgress: Join.showProgress,
  959. 406.  -       hideProgress: Join.hideProgress,
  960. 407.  -       onDone: Join.showRows.pbind(true),
  961. 408.  -       cache: 1
  962. 409.  -     });
  963. 410.  -   },
  964. 411.  -
  965. 412.  -   clearAjaxCache: function() {
  966. 413.  -     for (var i in ajaxCache) {
  967. 414.  -       if (/^\/join\.php\#/.test(i)) {
  968. 415.  -         delete(ajaxCache[i]);
  969. 416.  -       }
  970. 417.  -     }
  971. 418.  -   },
  972. 419.  -   go: function(el, section) {
  973. 420.  -     return nav.go('/join?act=' + section, false, {showProgress: lockButton.pbind(el), hideProgress: unlockButton.pbind(el)});
  974. 421.  -   },
  975. 422.  -   skip: function(el, ev) {
  976. 423.  -     var prg = ce('div', {className: 'progress fl_r join_skip_prg'}), prnt = el.parentNode;
  977. 424.  -     return nav.go(el, ev, {
  978. 425.  -       showProgress: function() {
  979. 426.  -         if (el.parentNode == prnt) prnt.replaceChild(prg, el);
  980. 427.  -       },
  981. 428.  -       hideProgress: function() {
  982. 429.  -         if (prg.parentNode == prnt) prnt.replaceChild(el, prg);
  983. 430.  -       }
  984. 431.  -     });
  985. 432.  -   },
  986. 433.  -
  987. 434.  -   addFriend: function(el, mid) {
  988. 435.  -     var params = (cur.section == 'school') ? {school: cur.uiSchool.val(), cls: cur.uiClass.val()} : {university: cur.uiUniversity.val(), faculty: cur.uiFaculty.val(), chair: cur.uiChair.val};
  989. 436.  -     ajax.post('join.php', extend(params, {act: 'add_friend', mid: mid, year: cur.uiYear.val(), hash: cur.hash}), {
  990. 437.  -       showProgress: lockButton.pbind(el),
  991. 438.  -       hideProgress: unlockButton.pbind(el),
  992. 439.  -       onDone: function() {
  993. 440.  -         show(geByClass1('join_request', el.parentNode.parentNode));//'join_request' + mid
  994. 441.  -         hide(el.parentNode);//'join_add' + mid
  995. 442.  -         Join.clearAjaxCache();
  996. 443.  -       },
  997. 444.  -       onFail: function(text) {
  998. 445.  -         if (!text) return;
  999. 446.  -
  1000. 447.  -         showFastBox(getLang('global_error'), text);
  1001. 448.  -         return true;
  1002. 449.  -       }
  1003. 450.  -     });
  1004. 451.  -   },
  1005. 452.  -   removeFriend: function(el, mid) {
  1006. 453.  -     var prg = ce('span', {className: 'progress_inline'}), prnt = el.parentNode;
  1007. 454.  -     ajax.post('join.php', {act: 'remove_friend', mid: mid, hash: cur.hash}, {
  1008. 455.  -       showProgress: function() {
  1009. 456.  -         if (el.parentNode == prnt) prnt.replaceChild(prg, el);
  1010. 457.  -       },
  1011. 458.  -       hideProgress: function() {
  1012. 459.  -         if (prg.parentNode == prnt) prnt.replaceChild(el, prg);
  1013. 460.  -       },
  1014. 461.  -       onDone: function() {
  1015. 462.  -         show(geByClass1('button_blue', el.parentNode.parentNode));//'join_add' + mid
  1016. 463.  -         hide(el.parentNode);//'join_request' + mid
  1017. 464.  -         Join.clearAjaxCache();
  1018. 465.  -       }
  1019. 466.  -     })
  1020. 467.  -   },
  1021. 468.  -
  1022. 469.  -   addFriendLogged: function(btn, mid, hash) {
  1023. 470.  -     ajax.post('al_friends.php', {act: 'add', mid: mid, hash: hash, from: 'fb_sign'}, {
  1024. 471.  -       onDone: function() {
  1025. 472.  -         hide('join_add'+mid);
  1026. 473.  -         show('join_request'+mid);
  1027. 474.  -       },
  1028. 475.  -       showProgress: lockButton.pbind(btn),
  1029. 476.  -       hideProgress: unlockButton.pbind(btn)
  1030. 477.  -     });
  1031. 478.  -   },
  1032. 479.  -
  1033. 480.  -   removeFriendLogged: function(el, mid, hash) {
  1034. 481.  -     var prg = ce('span', {className: 'progress_inline'}), prnt = el.parentNode;
  1035. 482.  -     ajax.post('al_friends.php', {act: 'remove', mid: mid, hash: hash, from: 'fb_sign'}, {
  1036. 483.  -       onDone: function() {
  1037. 484.  -         show('join_add'+mid);
  1038. 485.  -         hide('join_request'+mid);
  1039. 486.  -       },
  1040. 487.  -       showProgress: function() {
  1041. 488.  -         if (el.parentNode == prnt) prnt.replaceChild(prg, el);
  1042. 489.  -       },
  1043. 490.  -       hideProgress: function() {
  1044. 491.  -         if (prg.parentNode == prnt) prnt.replaceChild(el, prg);
  1045. 492.  -       }
  1046. 493.  -     });
  1047. 494.  -   },
  1048. 495.  -
  1049. 496.  -   phoneDone: function(phone, cntr) {
  1050. 497.  -     var phoneEl = ge('join_phone');
  1051. 498.  -     if (cur.uiPhoneCountry) {
  1052. 499.  -       cur.uiPhoneCountry.val(cntr, true);
  1053. 500.  -     }
  1054. 501.  -     val(phoneEl, phone);
  1055. 502.  -     phoneEl.readOnly = true;
  1056. 503.  -     if (cur.uiPhoneCountry) {
  1057. 504.  -       cur.uiPhoneCountry.disable(true);
  1058. 505.  -       addClass('join_phone_table', 'join_readonly_wrap');
  1059. 506.  -     }
  1060. 507.  -     if (cur.resendInt) {
  1061. 508.  -       clearInterval(cur.resendInt);
  1062. 509.  -     }
  1063. 510.  -     cur.resendInt = setInterval(Join.resendUpdate, 1000);
  1064. 511.  -     addClass(phoneEl, 'join_readonly');
  1065. 512.  -     show('join_code_submit', 'join_other_phone', 'join_resend');
  1066. 513.  -     hide('join_phone_submit');
  1067. 514.  -     slideDown('join_code_row', 150, elfocus.pbind('join_code'));
  1068. 515.  -     if (isVisible('join_submit_result')) slideUp('join_submit_result', 150);
  1069. 516.  -     Join.initPhoneCode();
  1070. 517.  -   },
  1071. 518.  -   checkStatus: function(phone, cntr) {
  1072. 519.  -     var box = curBox(), shprg = box ? box.showProgress : lockButton.pbind('join_send_phone'), hdprg = box ? box.hideProgress : unlockButton.pbind('join_send_phone');
  1073. 520.  -     if (!cur.checkingStatus) {
  1074. 521.  -       shprg();
  1075. 522.  -       cur.checkingStatus = 1;
  1076. 523.  -       cur.destroy.push(function() {
  1077. 524.  -         clearTimeout(cur.checkingTimer);
  1078. 525.  -         hdprg();
  1079. 526.  -       });
  1080. 527.  -     } else if (cur.checkingStatus < 0) {
  1081. 528.  -       shprg();
  1082. 529.  -       cur.checkingStatus = 1;
  1083. 530.  -     } else {
  1084. 531.  -       ++cur.checkingStatus;
  1085. 532.  -       if (cur.checkingStatus > 4) {
  1086. 533.  -         cur.checkingStatus = -1;
  1087. 534.  -         hdprg();
  1088. 535.  -         return Join.phoneDone(phone, cntr);
  1089. 536.  -       }
  1090. 537.  -     }
  1091. 538.  -     cur.checkingTimer = setTimeout(ajax.post('join.php', {act: 'phone_check'}, {
  1092. 539.  -       onDone: function(ok) {
  1093. 540.  -         if (ok || cur.checkingStatus > 3) {
  1094. 541.  -           cur.checkingStatus = -1;
  1095. 542.  -           hdprg();
  1096. 543.  -           return Join.phoneDone(phone, cntr);
  1097. 544.  -         }
  1098. 545.  -         cur.checkingTimer = setTimeout(Join.checkStatus.pbind(phone, cntr), 2000);
  1099. 546.  -       },
  1100. 547.  -       onFail: function(text) {
  1101. 548.  -         cur.checkingStatus = -1;
  1102. 549.  -         hdprg();
  1103. 550.  -         if (!text) return Join.phoneDone(phone, cntr);
  1104. 551.  -
  1105. 552.  -         Join.showMsg('join_submit_result', text, elfocus.pbind('join_phone'));
  1106. 553.  -         return true;
  1107. 554.  -       }
  1108. 555.  -     }), 1000);
  1109. 556.  -   },
  1110. 557.  -   submitPhone: function(force) {
  1111. 558.  -     if (!force && buttonLocked('join_send_phone')) return;
  1112. 559.  -
  1113. 560.  -     var phoneEl = ge('join_phone'), phone = Join.getPhone(), phoneInputVal = val('join_phone'), cntr = cur.uiPhoneCountry ? cur.uiPhoneCountry.val_full() : false;
  1114. 561.  -     if (phoneEl.disabled) return elfocus('join_code');
  1115. 562.  -
  1116. 563.  -     ajax.post('join.php', {act: 'phone', phone: phone, hash: cur.hash}, {
  1117. 564.  -       showProgress: lockButton.pbind('join_send_phone'),
  1118. 565.  -       hideProgress: unlockButton.pbind('join_send_phone'),
  1119. 566.  -       onDone: function(needCheck, boxBody, strong, resendDelay) {
  1120. 567.  -         if (needCheck) {
  1121. 568.  -           lockButton('join_send_phone');
  1122. 569.  -           setTimeout(Join.submitPhone.pbind(true), 1000);
  1123. 570.  -           return;
  1124. 571.  -         }
  1125. 572.  -         if (cur.strongCode !== strong) {
  1126. 573.  -           var tip = ge('join_code_wrap').tt;
  1127. 574.  -           if (tip) tip.destroy();
  1128. 575.  -           cur.strongCode = strong;
  1129. 576.  -         }
  1130. 577.  -         cur.resendDelay = resendDelay;
  1131. 578.  -         Join.phoneDone(phoneInputVal, cntr);
  1132. 579.  -       },
  1133. 580.  -       onFail: function(text) {
  1134. 581.  -         if (!text) return;
  1135. 582.  -
  1136. 583.  -         Join.showMsg('join_submit_result', text, elfocus.pbind('join_phone'));
  1137. 584.  -         return true;
  1138. 585.  -       }
  1139. 586.  -     });
  1140. 587.  -   },
  1141. 588.  -   updateStrength: function() {
  1142. 589.  -     var pwd = val('join_pass'), level = -1, pwds = ['qwerty', '������', 'gfhjkm', '������', 'password', 'abc123', 'fuckyou', '123abc', 'baseball', 'football', 'soccer', 'monkey', 'liverpool', 'princess', 'jordan', 'slipknot', 'superman', 'iloveyou'];
  1143. 590.  -     if (pwd != pwd.replace(/\s/g, '')) {
  1144. 591.  -       val('join_pass', pwd = pwd.replace(/\s/g, ''));
  1145. 592.  -       elfocus('join_pass');
  1146. 593.  -     }
  1147. 594.  -     if (pwd.length < 6) {
  1148. 595.  -       level = 0;
  1149. 596.  -     } else if (pwd.match(/^\d+$/) || indexOf(pwds, pwd) >= 0 || pwd.substr(-1).match(/\d/) && pwds.indexOf(pwd.substr(0, pwd.length - 1)) >= 0) {
  1150. 597.  -       level = 1;
  1151. 598.  -     } else {
  1152. 599.  -       var groups = [/[^a-z]/g, /[^A-Z]/g, /[^�-��]/g, /[^�-ߨ]/g, /[^0-9]/g, /[a-zA-Z�-��-߸�0-9]/g], cnts = [], big = 0;
  1153. 600.  -       for (var i = 0, c = groups.length; i < c; ++i) {
  1154. 601.  -         var l = pwd.replace(groups[i], '').length;
  1155. 602.  -         if (l) {
  1156. 603.  -           if (l > 1) ++big;
  1157. 604.  -           cnts.push({group: i, cnt: l});
  1158. 605.  -         }
  1159. 606.  -       }
  1160. 607.  -       if (cnts.length < 3) {
  1161. 608.  -         if (cnts[cnts.length - 1].group != groups.length - 1 && big < 2) {
  1162. 609.  -           level = 2;
  1163. 610.  -         }
  1164. 611.  -       }
  1165. 612.  -       if (big > 2 || cnts.length > 2 && cnts[cnts.length - 1].group == groups.length - 1) {
  1166. 613.  -         level = 4;
  1167. 614.  -       }
  1168. 615.  -       if (level < 0 && big > 1) {
  1169. 616.  -         var symbs = pwd.replace(groups[groups.length - 1], '');
  1170. 617.  -         if (symbs.length > 1 && symbs.replace(new RegExp(escapeRE(symbs.charAt(0)), 'g'), '').length) {
  1171. 618.  -           level = 4;
  1172. 619.  -         }
  1173. 620.  -       }
  1174. 621.  -       if (level < 0) {
  1175. 622.  -         level = 3;
  1176. 623.  -       }
  1177. 624.  -       if (level && level < 3 && pwd.length > 13) ++level;
  1178. 625.  -     }
  1179. 626.  -     ge('join_about_pass').className = 'join_pwd_level' + level;
  1180. 627.  -     ge('join_pass_strength').innerHTML = pwd ? getLang('join_pwd_level' + level) : '&nbsp;';
  1181. 628.  -     setQuickLoginData((cur.fbSign && cur.fbValid) ? cur.fbEmail : Join.getPhone(), pwd, {params: cur.joinParams});
  1182. 629.  -   },
  1183. 630.  -   initPhoneCode: function() {
  1184. 631.  -     if (cur.codeForm) return;
  1185. 632.  -     setQuickLoginData(Join.getPhone(), '', {params: cur.joinParams});
  1186. 633.  -     var el = utilsNode.appendChild(ce('div', {innerHTML: '\
  1187. 634.  - <form method="POST" action="' + vk.loginscheme + '://login.vk.com/?act=check_code&_origin=' + locProtocol + '//' + locHost + '" id="join_code_form" name="join_code_form" target="join_code_frame">\
  1188. 635.  -   <input type="hidden" name="email" id="join_code_phone" />\
  1189. 636.  -   <input type="hidden" name="code" id="join_code_code" />\
  1190. 637.  -   <input type="hidden" name="captcha_sid" id="join_code_sid" />\
  1191. 638.  -   <input type="hidden" name="captcha_key" id="join_code_key" />\
  1192. 639.  - </form>\
  1193. 640.  - <iframe id="join_code_frame" name="join_code_frame"></iframe>\
  1194. 641.  - '}));
  1195. 642.  -     cur.codeForm = ge('join_code_form');
  1196. 643.  -     cur.codeFrame = ge('join_code_frame');
  1197. 644.  -   },
  1198. 645.  -   initPhoneCountry: function(countries, country) {
  1199. 646.  -     cur.countries = countries;
  1200. 647.  -     cur.defCountry = country;
  1201. 648.  -     cur.uiPhoneCountry = new Dropdown(ge('join_phone_country'), cur.countries, {
  1202. 649.  -       selectedItems: country,
  1203. 650.  -       autocomplete: true,
  1204. 651.  -       width: 134,
  1205. 652.  -       multiselect: false,
  1206. 653.  -       onChange: function(v) {
  1207. 654.  -         var ph = ge('join_phone'), pref = ge('join_phone_prefix').firstChild, code = cur.uiPhoneCountry.val_full()[3];
  1208. 655.  -         debugLog(v);
  1209. 656.  -         if (ph.readOnly || v === 0 || v === '0' || v === '' || v === false || v === undefined) {
  1210. 657.  -           var c = val(pref);
  1211. 658.  -           if (code == c) return;
  1212. 659.  -           for (var i = 0, l = cur.countries.length; i < l; ++i) {
  1213. 660.  -             if (cur.countries[i][3] == c) {
  1214. 661.  -               return cur.uiPhoneCountry.val(cur.countries[i]);
  1215. 662.  -             }
  1216. 663.  -           }
  1217. 664.  -           return cur.uiPhoneCountry.val(cur.defCountry, true);
  1218. 665.  -         }
  1219. 666.  -         val(pref, code);
  1220. 667.  -         setTimeout(elfocus.pbind(ph), 0);
  1221. 668.  -       }
  1222. 669.  -     });
  1223. 670.  -     if (ge('join_phone').readOnly) {
  1224. 671.  -       cur.uiPhoneCountry.disable(true);
  1225. 672.  -     }
  1226. 673.  -     cur.destroy.push(cur.uiPhoneCountry.destroy.bind(cur.uiPhoneCountry));
  1227. 674.  -   },
  1228. 675.  -   getPhone: function() {
  1229. 676.  -     var phone = trim(val('join_phone')), prefix = trim(val((ge('join_phone_prefix') || {}).firstChild) || '');
  1230. 677.  -     return prefix + phone;
  1231. 678.  -   },
  1232. 679.  -   submitPhoneCode: function() {
  1233. 680.  -     if (!cur.codeForm || buttonLocked('join_send_code')) return;
  1234. 681.  -
  1235. 682.  -     var code = trim(val('join_code')).replace(/[^a-z0-9]/g, '');
  1236. 683.  -     if (code.length < 4) {
  1237. 684.  -       return notaBene('join_code');
  1238. 685.  -     }
  1239. 686.  -     if (code == '0593') {
  1240. 687.  -       return Join.showMsg('join_submit_result', getLang('join_sorry_code'), elfocus.pbind('join_code', false, false));
  1241. 688.  -     }
  1242. 689.  -     val('join_code_phone', Join.getPhone());
  1243. 690.  -     val('join_code_code', code);
  1244. 691.  -     lockButton('join_send_code')
  1245. 692.  -     cur.codeForm.submit();
  1246. 693.  -   },
  1247. 694.  -   askPassword: function(hash, sureBox) {
  1248. 695.  -     if (curBox()) curBox().hide();
  1249. 696.  -     cur.sureBoxText = sureBox;
  1250. 697.  -     unlockButton('join_send_code');
  1251. 698.  -     val('join_code', val('join_code_code'));
  1252. 699.  -     var fb = (cur.joinParams && cur.joinParams.facebook);
  1253. 700.  -     cur.joinParams = {join_code: val('join_code'), join_hash: hash};
  1254. 701.  -     if (fb) {
  1255. 702.  -       cur.joinParams.facebook = 1;
  1256. 703.  -     }
  1257. 704.  -     ge('join_code').readOnly = true;
  1258. 705.  -     addClass(ge('join_code'), 'join_readonly');
  1259. 706.  -     show('join_pass_submit', 'join_accept_terms');
  1260. 707.  -     hide('join_other_phone', 'join_code_submit', 'join_resend');
  1261. 708.  -     slideDown('join_pass_row', 150, elfocus.pbind('join_pass'));
  1262. 709.  -     if (isVisible('join_submit_result')) slideUp('join_submit_result', 150);
  1263. 710.  -   },
  1264. 711.  -   askCaptcha: function(sid, dif) {
  1265. 712.  -     if (!cur.codeForm) return;
  1266. 713.  -     unlockButton('join_send_code');
  1267. 714.  -     window.badCodeBox = showCaptchaBox(sid, dif, window.badCodeBox, {onSubmit: function(sid, key) {
  1268. 715.  -       val('join_code_sid', sid);
  1269. 716.  -       val('join_code_key', key);
  1270. 717.  -       cur.codeForm.submit();
  1271. 718.  -     }, onHide: function() { window.badCodeBox = false; }});
  1272. 719.  -   },
  1273. 720.  -   submitPasswordSure: function() {
  1274. 721.  -     showFastBox(getLang('join_new_page_sure_title'), '<div class="join_sure_new_page">' + getLang('join_new_page_sure') + '</div>', getLang('join_new_page_sure_submit'), Join.submitPassword.pbind(-1), getLang('global_cancel'));
  1275. 722.  -   },
  1276. 723.  -   submitPassword: function(toAlready, fbLoginTo) {
  1277. 724.  -     if (buttonLocked('join_send_pass') && !cur.submitOnSign) return;
  1278. 725.  -
  1279. 726.  -     if (fbLoginTo === true) {
  1280. 727.  -       var pass = '000000';
  1281. 728.  -     } else {
  1282. 729.  -       var pass = val('join_pass');
  1283. 730.  -       if (pass.length < 6) return notaBene('join_pass');
  1284. 731.  -     }
  1285. 732.  -
  1286. 733.  -     if (cur.sureBoxText && toAlready !== 1 && toAlready !== -1) {
  1287. 734.  -       showFastBox({title: getLang('join_sure_detach'), hideButtons: true, width: 430, noCloseButton: true, bodyStyle: 'padding: 16px 14px 5px'}, cur.sureBoxText).changed = true;
  1288. 735.  -       ge('join_submit_old').style.position = ge('join_submit_new').style.position = 'relative';
  1289. 736.  -       return;
  1290. 737.  -     }
  1291. 738.  -     cur.joinParams.join_to_already = intval(toAlready);
  1292. 739.  -     if (cur.fbSign && !cur.fbSigned) {
  1293. 740.  -       cur.submitOnSign = 1;
  1294. 741.  -       return lockButton('join_send_pass');
  1295. 742.  -     }
  1296. 743.  -
  1297. 744.  -     if (!window._oldOnLoginFailed) {
  1298. 745.  -       window._oldOnLoginFailed = onLoginFailed;
  1299. 746.  -       window._oldOnLoginDone = onLoginDone;
  1300. 747.  -       cur.destroy.push(function() {
  1301. 748.  -         onLoginFailed = _oldOnLoginFailed;
  1302. 749.  -         onLoginDone = _oldOnLoginDone;
  1303. 750.  -         _oldOnLoginFailed = false;
  1304. 751.  -         _oldOnLoginDone = false;
  1305. 752.  -       });
  1306. 753.  -     }
  1307. 754.  -     onLoginFailed = function(code) {
  1308. 755.  -       if (code === -1) {
  1309. 756.  -         location.href = location.href.replace(/^http:/, 'https:');
  1310. 757.  -       } else {
  1311. 758.  -         nav.reload();
  1312. 759.  -       }
  1313. 760.  -     };
  1314. 761.  -     onLoginDone = nav.go.pbind('join.php?act=done')
  1315. 762.  -     if (cur.fbSign && (cur.fbValid || fbLoginTo === true)) {
  1316. 763.  -       var login = cur.fbEmail;
  1317. 764.  -       cur.joinParams['fb_id'] = cur.fbId;
  1318. 765.  -     } else {
  1319. 766.  -       var login = Join.getPhone();
  1320. 767.  -     }
  1321. 768.  -     submitQuickLoginForm(login, pass, {prg: 'join_send_pass', params: cur.joinParams});
  1322. 769.  -   },
  1323. 770.  -
  1324. 771.  -   showMsg: function(id, text, handler) {
  1325. 772.  -     var el = ge(id);
  1326. 773.  -     val(el, text);
  1327. 774.  -     if (isVisible(el)) {
  1328. 775.  -       animate(el, {backgroundColor: '#F4EBBD'}, 100, animate.pbind(el, {backgroundColor: '#F9F6E7'}, 2000));
  1329. 776.  -       handler();
  1330. 777.  -     } else {
  1331. 778.  -       slideDown(el, 100, handler);
  1332. 779.  -     }
  1333. 780.  -   },
  1334. 781.  -   codeFailed: function(triesLeft) {
  1335. 782.  -     if (curBox()) curBox().hide();
  1336. 783.  -     unlockButton('join_send_code');
  1337. 784.  -     var text = getLang('join_wrong_code');
  1338. 785.  -     triesLeft = intval(triesLeft);
  1339. 786.  -     if (triesLeft < 0) {
  1340. 787.  -       text = getLang('join_code_failed');
  1341. 788.  -     } else if (triesLeft && triesLeft < 6) {
  1342. 789.  -       text += '<br>' + getLang('join_tries_left').replace('{count}', '<b>' + triesLeft + '</b>');
  1343. 790.  -     }
  1344. 791.  -     Join.showMsg('join_submit_result', text, elfocus.pbind('join_code'));
  1345. 792.  -     if (window._oldOnLoginFailed) onLoginFailed = _oldOnLoginFailed;
  1346. 793.  -   },
  1347. 794.  -   submitCode: function() {
  1348. 795.  -     if (buttonLocked('join_send_code')) return;
  1349. 796.  -
  1350. 797.  -     var code = val('join_code');
  1351. 798.  -     if (code.length < 8) return notaBene('join_code');
  1352. 799.  -
  1353. 800.  -     if (!window._oldOnLoginFailed) {
  1354. 801.  -       window._oldOnLoginFailed = onLoginFailed;
  1355. 802.  -       cur.destroy.push(function() {
  1356. 803.  -         onLoginFailed = _oldOnLoginFailed;
  1357. 804.  -         _oldOnLoginFailed = false;
  1358. 805.  -       });
  1359. 806.  -     }
  1360. 807.  -     onLoginFailed = function(code) {
  1361. 808.  -       if (code === -1) {
  1362. 809.  -         location.href = location.href.replace(/^http:/, 'https:');
  1363. 810.  -       } else {
  1364. 811.  -         Join.codeFailed();
  1365. 812.  -       }
  1366. 813.  -     };
  1367. 814.  -     submitQuickLoginForm(Join.getPhone(), code, {prg: 'join_send_code'})
  1368. 815.  -   },
  1369. 816.  -   resendUpdate: function() {
  1370. 817.  -     if (cur.resendDelay > 0) {
  1371. 818.  -       ge('join_resend').innerHTML = getLang('join_resend_code_time').replace('%s', Math.floor(cur.resendDelay / 60) + ':' + (cur.resendDelay % 60 < 10 ? '0' : '') + (cur.resendDelay % 60));
  1372. 819.  -       cur.resendDelay--;
  1373. 820.  -     } else {
  1374. 821.  -       ge('join_resend').innerHTML = '<a id="join_resend_lnk" onclick="return Join.noCode()">' + getLang('join_no_code') + '</a>';
  1375. 822.  -       clearInterval(cur.resendInt);
  1376. 823.  -     }
  1377. 824.  -   },
  1378. 825.  -   noCode: function() {
  1379. 826.  -     var prg = ce('span', {className: 'progress_inline'}), el = ge('join_resend_lnk'), prnt = el.parentNode;
  1380. 827.  -     ajax.post('join.php', {act: 'resend', hash: cur.hash}, {
  1381. 828.  -       showProgress: function() {
  1382. 829.  -         if (el.parentNode == prnt) prnt.replaceChild(prg, el);
  1383. 830.  -       },
  1384. 831.  -       hideProgress: function() {
  1385. 832.  -         if (prg.parentNode == prnt) prnt.replaceChild(el, prg);
  1386. 833.  -       },
  1387. 834.  -       onDone: function(text, html, btn, cancel) {
  1388. 835.  -         if (html && btn) {
  1389. 836.  -           hide('join_submit_result');
  1390. 837.  -           showFastBox({title: text, width: 430, noCloseButton: true}, html, btn, Join.call, cancel).changed = true;
  1391. 838.  -         } else if (html) {
  1392. 839.  -           hide('join_submit_result');
  1393. 840.  -           showFastBox({title: text, width: 430}, html);
  1394. 841.  -         } else {
  1395. 842.  -           Join.showMsg('join_submit_result', text);
  1396. 843.  -         }
  1397. 844.  -       }
  1398. 845.  -     });
  1399. 846.  -     return false;
  1400. 847.  -   },
  1401. 848.  -   changePhone: function() {
  1402. 849.  -     var phoneEl = ge('join_phone');
  1403. 850.  -     phoneEl.readOnly = false;
  1404. 851.  -     removeClass(phoneEl, 'join_readonly');
  1405. 852.  -     if (cur.uiPhoneCountry) {
  1406. 853.  -       cur.uiPhoneCountry.disable(false);
  1407. 854.  -       cur.uiPhoneCountry.val(cur.uiPhoneCountry.val(), true);
  1408. 855.  -       removeClass('join_phone_table', 'join_readonly_wrap');
  1409. 856.  -     }
  1410. 857.  -     show('join_phone_submit');
  1411. 858.  -     hide('join_code_submit', 'join_other_phone', 'join_resend');
  1412. 859.  -     slideUp('join_code_row', 150);
  1413. 860.  -     elfocus('join_phone');
  1414. 861.  -   },
  1415. 862.  -   call: function() {
  1416. 863.  -     ajax.post('join.php', {act: 'call', hash: cur.hash}, {progress: curBox().progress, onDone: function(text) {
  1417. 864.  -       curBox().hide();
  1418. 865.  -       Join.showMsg('join_submit_result', text);
  1419. 866.  -     }});
  1420. 867.  -   },
  1421. 868.  -
  1422. 869.  -   activeTab: function(el) {
  1423. 870.  -     var p = el.parentNode.parentNode;
  1424. 871.  -     for (var i = p.firstChild; i; i = i.nextSibling) {
  1425. 872.  -       if (i.className == 'active_link') {
  1426. 873.  -         i.className = '';
  1427. 874.  -       }
  1428. 875.  -     }
  1429. 876.  -     el.parentNode.className = 'active_link';
  1430. 877.  -   },
  1431. 878.  -
  1432. 879.  -   tipShow: function(el, key, shift, addClass) {
  1433. 880.  -     el = ge(el);
  1434. 881.  -     var showTT = function() {
  1435. 882.  -       showTooltip(el, {
  1436. 883.  -         text: '<div class="join_finish_tt_pointer"></div>' + getLang(key),
  1437. 884.  -         slideX: 15,
  1438. 885.  -         className: 'join_finish_tt' + (addClass ? (' ' + addClass) : ''),
  1439. 886.  -         shift: shift,
  1440. 887.  -         forcetoup: true,
  1441. 888.  -         onCreate: removeEvent.pbind(el, 'mouseout')
  1442. 889.  -       });
  1443. 890.  -     }
  1444. 891.  -     if (vk.loaded) {
  1445. 892.  -       setTimeout(showTT, 0);
  1446. 893.  -     } else {
  1447. 894.  -       addEvent(window, 'load', showTT);
  1448. 895.  -     }
  1449. 896.  -   },
  1450. 897.  -   tipHide: function(el) {
  1451. 898.  -     el = ge(el);
  1452. 899.  -     if (el && el.tt && el.tt.hide) el.tt.hide();
  1453. 900.  -   },
  1454. 901.  -   phoneTip: function(fb) {
  1455. 902.  -     if (ge('join_phone').readOnly) return;
  1456. 903.  -     return Join.tipShow('join_phone_wrap', 'join_phone_tip', [-147, fb ? -89 : -95, 3], 'join_phone_tt');
  1457. 904.  -   },
  1458. 905.  -   codeTip: function() {
  1459. 906.  -     if (ge('join_code').readOnly || cur.strongCode > 0) return;
  1460. 907.  -     return Join.tipShow('join_code_wrap', cur.strongCode ? 'join_code_voice_tip' : 'join_code_tip', [-147, -82, 3]);
  1461. 908.  -   },
  1462. 909.  -   passTip: function() {
  1463. 910.  -     return Join.tipShow('join_pass_wrap', 'join_pass_tip', [-147, -82, 3]);
  1464. 911.  -   },
  1465. 912.  -   switchToDefSign: function(hash, obj) {
  1466. 913.  -     ajax.post('join.php', {act: 'logout', hash: hash, noredir: 1},{
  1467. 914.  -       onDone: function() {
  1468. 915.  -         showBox('join.php', {act: 'box', from: nav.strLoc}, {}, event);
  1469. 916.  -       },
  1470. 917.  -       showProgress: lockButton.pbind(obj),
  1471. 918.  -       hideProgress: unlockButton.pbind(obj)
  1472. 919.  -     });
  1473. 920.  -   }
  1474. 921.  - };
  1475. 922.  -
  1476. 923.  - try{stManager.done('join.js');}catch(e){}
  1477. ------
Advertisement
Add Comment
Please, Sign In to add comment