Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Файл - join.css (Старый размер - 10054 | Новый - 0):
- 0. - #join_css {
- 1. - display: none;
- 2. - }
- 3. -
- 4. - .join_selects_wrap {
- 5. - padding: 15px 30px 10px;
- 6. - }
- 7. - .join_header_wrap {
- 8. - padding: 25px 30px 10px;
- 9. - }
- 10. - .join_header {
- 11. - font-weight: bold;
- 12. - font-size: 1.09em;
- 13. - color: #45688E;
- 14. - padding-bottom: 5px;
- 15. - border-bottom: 1px solid #DAE1E8;
- 16. - margin-bottom: 10px;
- 17. - }
- 18. - #join_school_summary, #join_university_summary {
- 19. - margin-bottom: 0px;
- 20. - }
- 21. - .join_finish_row {
- 22. - width: 160px;
- 23. - margin: 0px auto 10px;
- 24. - }
- 25. - .join_select_row {
- 26. - width: 500px;
- 27. - margin-bottom: 10px;
- 28. - }
- 29. - .join_sel_label {
- 30. - color: #45688E;
- 31. - font-weight: bold;
- 32. - padding: 5px 13px 0px;
- 33. - width: 229px;
- 34. - }
- 35. - .join_labeled {
- 36. - width: 160px;
- 37. - }
- 38. - .join_none {
- 39. - padding: 14px 130px;
- 40. - font-size: 1.09em;
- 41. - color: #777;
- 42. - line-height: 160%;
- 43. - text-align: center;
- 44. - }
- 45. - div.join_none_prg {
- 46. - width: 367px;
- 47. - background-position: 50% 50%;
- 48. - position: absolute;
- 49. - margin-top: -22px;
- 50. - }
- 51. - .join_summary_prg {
- 52. - margin: 0px 10px;
- 53. - }
- 54. - .join_result {
- 55. - padding: 0px 20px;
- 56. - }
- 57. - .join_rows {
- 58. - padding: 10px 7px 10px 8px;
- 59. - }
- 60. - .join_more {
- 61. - cursor: pointer;
- 62. - color: #2B587A;
- 63. - text-align: center;
- 64. - padding: 10px;
- 65. - margin: 0px 15px;
- 66. - }
- 67. - .join_more:hover {
- 68. - background: #E1E7ED;
- 69. - padding-top: 9px;
- 70. - border-top: 1px solid #DAE1E8;
- 71. - }
- 72. - .join_next_cont {
- 73. - padding: 0px 0px 20px;
- 74. - }
- 75. - .join_next_wrap {
- 76. - position: relative;
- 77. - }
- 78. - #join_school_next, #join_university_next, #join_fb_friends_next {
- 79. - padding: 20px;
- 80. - width: 587px;
- 81. - text-align: center;
- 82. - background: #FFF;
- 83. - border-top: 1px solid #FFF;
- 84. - bottom: 0px;
- 85. - z-index: 20;
- 86. - -webkit-transition: background 400ms linear, border 400ms linear;
- 87. - -moz-transition: background 400ms linear, border 400ms linear;
- 88. - -o-transition: background 400ms linear, border 400ms linear;
- 89. - transition: background 400ms linear, border 400ms linear;
- 90. - }
- 91. - #join_school_next.fixed, #join_university_next.fixed, #join_fb_friends_next.fixed {
- 92. - background: #FAFAFA;
- 93. - background: rgba(250, 250, 250, 0.95);
- 94. - border-top: 1px solid #EEE;
- 95. - }
- 96. - #join_school_next, #join_university_next, #join_fb_friends_next {
- 97. - text-align: center;
- 98. - }
- 99. - .join_request {
- 100. - color: #777;
- 101. - padding-top: 6px;
- 102. - }
- 103. - .join_user {
- 104. - display: inline-block;
- 105. - *display: inline;
- 106. - *zoom: 1;
- 107. - width: 270px;
- 108. - overflow: hidden;
- 109. - padding: 15px 8px 15px 7px;
- 110. - }
- 111. - .join_thumb {
- 112. - width: 120px;
- 113. - height: 100px;
- 114. - overflow: hidden;
- 115. - }
- 116. - .join_img {
- 117. - width: 100px;
- 118. - }
- 119. - .join_info {
- 120. - width: 150px;
- 121. - overflow: hidden;
- 122. - }
- 123. - .join_name_wrap {
- 124. - padding: 5px 0px;
- 125. - white-space: nowrap;
- 126. - overflow: hidden;
- 127. - -o-text-overflow: ellipsis;
- 128. - text-overflow: ellipsis;
- 129. - }
- 130. - .join_name {
- 131. - font-weight: bold;
- 132. - font-size: 1.09em;
- 133. - color: #45688E;
- 134. - }
- 135. - .join_friends {
- 136. - padding: 5px 0px 12px;
- 137. - color: #777;
- 138. - }
- 139. -
- 140. - .join_error_box {
- 141. - line-height: 160%;
- 142. - }
- 143. -
- 144. - #join_school_summary_wrap, #join_university_summary_wrap {
- 145. - padding: 13px 0px 0px;
- 146. - margin: 0px 10px;
- 147. - }
- 148. - .join_finish_wrap {
- 149. - padding: 25px 30px 30px;
- 150. - }
- 151. - .join_about_finish {
- 152. - line-height: 160%;
- 153. - padding: 0px 0px 15px;
- 154. - }
- 155. -
- 156. - .join_submit_wrap {
- 157. - width: 160px;
- 158. - margin: 25px auto 0px;
- 159. - }
- 160. - #join_other_phone {
- 161. - position: absolute;
- 162. - margin: -19px 0px 0px 144px;
- 163. - }
- 164. - .is_rtl1 #join_other_phone {
- 165. - margin-left: 0px;
- 166. - margin-right: 144px;
- 167. - }
- 168. - #join_about_pass {
- 169. - position: absolute;
- 170. - margin-top: -1px;
- 171. - height: 5px;
- 172. - width: 134px;
- 173. - overflow: hidden;
- 174. - }
- 175. - .join_label {
- 176. - font-weight: bold;
- 177. - font-size: 1.09em;
- 178. - color: #45688E;
- 179. - padding-bottom: 5px;
- 180. - padding-top: 10px;
- 181. - }
- 182. - #join_phone,
- 183. - #join_code,
- 184. - #join_pass {
- 185. - width: 124px;
- 186. - outline: none;
- 187. - }
- 188. - .join_select_wrap input.join_readonly {
- 189. - background: #E1E7ED;
- 190. - }
- 191. - .join_no_code {
- 192. - padding-top: 10px;
- 193. - text-align: center;
- 194. - color: #777;
- 195. - }
- 196. -
- 197. - #join_submit_result {
- 198. - display: none;
- 199. - margin-bottom: 10px;
- 200. - }
- 201. - .join_box_body {
- 202. - line-height: 160%;
- 203. - }
- 204. - .join_about_login {
- 205. - padding-top: 5px;
- 206. - font-size: 0.9em;
- 207. - color: #777;
- 208. - }
- 209. - .join_skip, div.join_skip_prg {
- 210. - margin-top: 1px;
- 211. - display: block;
- 212. - }
- 213. - .join_fb_help_img {
- 214. - width: 173px;
- 215. - margin: 0px auto;
- 216. - padding: 17px 0px 14px 12px;
- 217. - }
- 218. - .join_help_img {
- 219. - width: 225px;
- 220. - margin: 0px auto;
- 221. - padding: 17px 0px 14px 12px;
- 222. - }
- 223. - .join_school_img, .join_university_img {
- 224. - width: 225px;
- 225. - height: 160px;
- 226. - }
- 227. - .join_school_img {
- 228. - background-image: url(/images/join/school_f.gif);
- 229. - }
- 230. - .join_university_img {
- 231. - background-image: url(/images/join/university_f.gif);
- 232. - }
- 233. - .join_finish_img {
- 234. - width: 225px;
- 235. - height: 160px;
- 236. - background: url(/images/join/finish_f.gif);
- 237. - }
- 238. - .join_fb_help_img .join_finish_img {
- 239. - background: url(/images/join/join_fb.gif) center center no-repeat;
- 240. - width: 173px;
- 241. - height: 184px;
- 242. - }
- 243. -
- 244. - .join_pwd_level0 {
- 245. - display: none;
- 246. - }
- 247. - .join_pwd_level1 {
- 248. - background: #CD4849;
- 249. - width: 25%;
- 250. - }
- 251. - .join_pwd_level2 {
- 252. - background: #FF762D;
- 253. - width: 50%;
- 254. - }
- 255. - .join_pwd_level3 {
- 256. - background: #C9B72D;
- 257. - width: 75%;
- 258. - }
- 259. - .join_pwd_level4 {
- 260. - background: #60B92B;
- 261. - width: 100%;
- 262. - }
- 263. - #join_pass_strength {
- 264. - color: #777;
- 265. - }
- 266. -
- 267. - .join_next_button button {
- 268. - padding-right: 2px;
- 269. - }
- 270. - .is_rtl1 .join_next_button button {
- 271. - padding-right: 14px;
- 272. - padding-left: 2px;
- 273. - }
- 274. - .join_with_arr {
- 275. - padding-right: 25px;
- 276. - background: url(/images/backlink.gif?4) no-repeat right -127px;
- 277. - }
- 278. - .is_rtl1 .join_with_arr {
- 279. - padding-right: 0px;
- 280. - padding-left: 25px;
- 281. - background: url(/images/backlink.gif?4) no-repeat left -97px;
- 282. - }
- 283. -
- 284. - .join_phone_row {
- 285. - width: 134px;
- 286. - *overflow: hidden;
- 287. - margin: 0px auto 10px;
- 288. - }
- 289. - .join_phone_submit {
- 290. - width: 134px;
- 291. - margin: 11px auto 0px;
- 292. - }
- 293. - .join_phone_label {
- 294. - font-weight: bold;
- 295. - font-size: 1.09em;
- 296. - color: #45688E;
- 297. - padding-bottom: 10px;
- 298. - padding-top: 6px;
- 299. - width: 200px;
- 300. - }
- 301. - .join_resend_box {
- 302. - line-height: 160%;
- 303. - }
- 304. - input.join_big_text {
- 305. - font-family: tahoma, tahoma, verdana, arial, sans-serif, Lucida Sans;
- 306. - background: #FFF;
- 307. - border: 1px solid #C0CAD5;
- 308. - font-size: 1.09em !important;
- 309. - padding: 5px 4px 4px;
- 310. - margin: 0px;
- 311. - }
- 312. - .join_finish_tt_pointer {
- 313. - behavior: url(/js/iepngfix.htc);
- 314. - background: url(/images/ddtooltip.png) 0 0 no-repeat;
- 315. - width: 8px;
- 316. - height: 11px;
- 317. - position: absolute;
- 318. - left: -7px;
- 319. - overflow: hidden;
- 320. - z-index: 10;
- 321. - top: 31px;
- 322. - }
- 323. - .join_finish_tt table .tt_text {
- 324. - line-height: 120%;
- 325. - color: #000;
- 326. - padding: 10px;
- 327. - width: 200px;
- 328. - }
- 329. - .join_phone_tt table div.tt_text {
- 330. - width: 220px;
- 331. - }
- 332. - .join_school_tt table div.tt_text {
- 333. - width: 170px;
- 334. - }
- 335. - .join_year_tt .join_finish_tt_pointer, .join_university_tt .join_finish_tt_pointer {
- 336. - top: 20px;
- 337. - }
- 338. - .join_about_phone {
- 339. - padding: 24px 80px;
- 340. - }
- 341. -
- 342. - #join_phone_table {
- 343. - border: 1px solid #C0CAD5;
- 344. - width: 134px;
- 345. - }
- 346. - .join_readonly_wrap {
- 347. - background: #E1E7ED;
- 348. - }
- 349. - #join_phone_prefix {
- 350. - vertical-align: top;
- 351. - width: 1px;
- 352. - color: #777;
- 353. - font-size: 1.09em;
- 354. - padding: 5px 0px 4px 5px;
- 355. - }
- 356. - .join_readonly_wrap #join_phone_prefix {
- 357. - color: #000;
- 358. - }
- 359. - .join_phone_field {
- 360. - vertical-align: top;
- 361. - width: 100%;
- 362. - padding: 5px 0px 0px;
- 363. - }
- 364. - .is_rtl1 #join_phone_prefix {
- 365. - padding: 5px 5px 4px 0px;
- 366. - }
- 367. - #join_phone_table #join_phone {
- 368. - width: 100%;
- 369. - outline: none;
- 370. - border: 0px;
- 371. - padding: 0px;
- 372. - margin: 0px -1px;
- 373. - background: transparent;
- 374. - }
- 375. - #join_country_wrap .selector_container td.selector {
- 376. - padding-top: 5px;
- 377. - padding-bottom: 2px;
- 378. - }
- 379. - #join_country_wrap .disabled.selector_container .selector_dropdown {
- 380. - background-color: #F2F2F2;
- 381. - border-color: #F2F2F2;
- 382. - }
- 383. -
- 384. - .join_box_row {
- 385. - width: 160px;
- 386. - margin: 0px auto;
- 387. - position: relative;
- 388. - padding-top: 10px;
- 389. - }
- 390. - #join_box_first_name, #join_box_last_name {
- 391. - width: 150px;
- 392. - }
- 393. - #join_box_content {
- 394. - padding-top: 26px;
- 395. - }
- 396. - #join_box_msg {
- 397. - border: 1px solid #F7F7F7;
- 398. - background: #F7F7F7;
- 399. - }
- 400. - #join_box_sex_row {
- 401. - display: none;
- 402. - }
- 403. - .join_box_form {
- 404. - padding: 1px 0px 13px;
- 405. - }
- 406. - div.join_box_button button {
- 407. - padding-right: 0px;
- 408. - }
- 409. - .is_rtl1 div.join_box_button button {
- 410. - padding-left: 0px;
- 411. - padding-right: 14px;
- 412. - }
- 413. -
- 414. - .join_robot {
- 415. - width: 160px;
- 416. - height: 160px;
- 417. - margin: -7px auto -9px;
- 418. - background: url(/images/join/robot.gif) no-repeat;
- 419. - }
- 420. -
- 421. - .join_already_row {
- 422. - padding: 15px 0px;
- 423. - margin: 0px 6px;
- 424. - border-top: 1px solid #E7EAED;
- 425. - }
- 426. - .join_already_row .join_name_wrap {
- 427. - padding: 7px 5px 12px;
- 428. - }
- 429. - .join_already_text {
- 430. - padding: 0px 10px 10px;
- 431. - line-height: 160%;
- 432. - font-size: 1.09em;
- 433. - text-align: center;
- 434. - }
- 435. - .join_already_thumb {
- 436. - width: 100px;
- 437. - height: 100px;
- 438. - margin: 0px auto;
- 439. - overflow: hidden;
- 440. - }
- 441. - .join_already_img {
- 442. - width: 100px;
- 443. - }
- 444. - .join_already_row .join_name_wrap {
- 445. - padding-bottom: 15px;
- 446. - text-align: center;
- 447. - }
- 448. - .join_already_row .button_blue {
- 449. - width: 250px;
- 450. - margin: 0px auto;
- 451. - }
- 452. -
- 453. - .join_box_header {
- 454. - font-size: 1.09em;
- 455. - font-weight: bold;
- 456. - color: #45688E;
- 457. - margin: 0px 12px 13px;
- 458. - }
- 459. - .join_box_label {
- 460. - font-weight: bold;
- 461. - font-size: 1.09em;
- 462. - color: #45688E;
- 463. - padding-bottom: 10px;
- 464. - padding-top: 6px;
- 465. - width: 200px;
- 466. - }
- 467. - .join_box_wrap {
- 468. - margin: -10px;
- 469. - background: #FFF;
- 470. - position: relative;
- 471. - padding: 20px 15px;
- 472. - -moz-box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.35);
- 473. - -webkit-box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.35);
- 474. - box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.35);
- 475. - }
- 476. - .join_box_row .join_box_button {
- 477. - margin-top: 10px;
- 478. - }
- 479. - #join_box_sex_row .selector_container td.selector {
- 480. - padding-top: 3px;
- 481. - padding-bottom: 2px;
- 482. - }
- 483. - .join_box_close {
- 484. - margin: -20px -15px 0px;
- 485. - padding: 20px 27px;
- 486. - }
- 487. -
- 488. - .join_sure_new_page {
- 489. - text-align: center;
- 490. - line-height: 160%;
- 491. - font-size: 1.09em;
- 492. - }
- 493. - #join_accept_terms {
- 494. - padding: 10px 0px 0px;
- 495. - margin-bottom: -10px;
- 496. - text-align: center;
- 497. - font-size: 10px;
- 498. - color: #777;
- 499. - }
- 500. - .join_import_info {
- 501. - padding: 0px 0px 10px;
- 502. - font-size: 1.09em;
- 503. - color: #777;
- 504. - text-align: center;
- 505. - }
- 506. - .join_fb_progress {
- 507. - margin-top: 40px;
- 508. - background: url('/images/progress7.gif') center center no-repeat;
- 509. - height: 50px;
- 510. - }
- 511. - #join_show_result {
- 512. - display: none;
- 513. - }
- 514. - #join_email {
- 515. - width: 124px;
- 516. - outline: none;
- 517. - background: #F7F7F7;
- 518. - }
- 519. - .join_fbinfo_label {
- 520. - padding: 0px 0px 4px 0px;
- 521. - color: #888888;
- 522. - font-weight: normal;
- 523. - }
- 524. - .join_fb_pic {
- 525. - margin: 0px 8px 0px 0px;
- 526. - }
- 527. - .is_rtl1 .join_fb_pic {
- 528. - margin: 0px 0px 0px 8px;
- 529. - }
- 530. - #join_show_result_wrap {
- 531. - opacity: 0;
- 532. - filter: alpha(opacity=0);
- 533. - }
- 534. - #join_fb_mobile .join_phone_label {
- 535. - padding-top: 0px;
- 536. - }
- 537. - #join_fb_friends_result {
- 538. - padding: 0px 0px 0px 24px;
- 539. - }
- 540. - .json_fb_friends_h {
- 541. - padding-bottom: 0px;
- 542. - }
- 543. - .join_import_progress {
- 544. - margin-top: 38px;
- 545. - }
- 546. - #join_show_result_wrap{
- 547. - padding-bottom: 10px;
- 548. - }
- ------
- Файл - join.js (Старый размер - 33690 | Новый - 0):
- 0. - var Join = {
- 1. - show: function(el) {
- 2. - if (!isVisible(el)) slideDown(el, 150);
- 3. - },
- 4. - hide: function(el) {
- 5. - if (isVisible(el)) slideUp(el, 150);
- 6. - },
- 7. -
- 8. - scrollnode: function() {
- 9. - return browser.msie6 ? pageNode : window;
- 10. - },
- 11. - scrollResize: function(e, pp) {
- 12. - if (browser.mobile && !browser.safari_mobile) return;
- 13. -
- 14. - var de = document.documentElement, st = scrollGetY();
- 15. -
- 16. - if (pp === true) {
- 17. - cur.nextButtonTop = getXY(cur.nextButtonWrap)[1];
- 18. - if (browser.msie6) cur.nextButtonTop += st;
- 19. - }
- 20. - var needDock = cur.resultShown && (st + lastWindowHeight < cur.nextButtonTop + cur.nextButtonHeight);
- 21. - if (needDock && !cur.docked) {
- 22. - cur.nextButton.className = 'fixed';
- 23. - if (browser.msie6) {
- 24. - bodyNode.appendChild(cur.nextButton);
- 25. - e = {type: 'resize'};
- 26. - }
- 27. - cur.docked = true;
- 28. - } else if (!needDock && cur.docked) {
- 29. - cur.nextButton.className = '';
- 30. - if (browser.msie6) {
- 31. - cur.nextButtonWrap.appendChild(cur.nextButton);
- 32. - }
- 33. - cur.docked = false;
- 34. - }
- 35. - if (cur.docked && e && e.type == 'resize') {
- 36. - if (browser.msie6) {
- 37. - cur.nextButton.style.left = getXY(ge('content'))[0] + 'px';
- 38. - } else {
- 39. - cur.nextButton.style.left = (ge('page_layout').offsetLeft + ge('content').offsetLeft) + 'px';
- 40. - setTimeout(Join.nextResetStyle, 0);
- 41. - }
- 42. - }
- 43. -
- 44. - var ch = window.innerHeight || de.clientHeight || bodyNode.clientHeight;
- 45. -
- 46. - if (!cur.resultShown || !cur.moreLink || !isVisible(cur.moreLink)) return;
- 47. - if (st + ch > cur.moreLink.offsetTop) {
- 48. - Join.showMore();
- 49. - }
- 50. - },
- 51. - nextResetStyle: function() {
- 52. - cur.nextButton.style.left = '';
- 53. - },
- 54. - initScroll: function() {
- 55. - extend(cur, {
- 56. - nextButton: ge('join_' + cur.section + '_next'),
- 57. - nextButtonWrap: ge('join_' + cur.section + '_next_wrap'),
- 58. - imgEl: ge('join_' + cur.section + '_img'),
- 59. - rowsEl: ge('join_' + cur.section + '_rows'),
- 60. - moreLink: ge('join_' + cur.section + '_more'),
- 61. - noneWrap: ge('join_' + cur.section + '_none_wrap'),
- 62. - noneEl: ge('join_' + cur.section + '_none'),
- 63. - resultEl: ge('join_' + cur.section + '_result')
- 64. - });
- 65. - cur.nextButtonHeight = getSize(cur.nextButton)[1];
- 66. - cur.nextButtonWrap.style.height = cur.nextButtonHeight + 'px';
- 67. - cur.resultShown = isVisible(cur.resultEl);
- 68. - Join.scrollResize(false, true);
- 69. -
- 70. - addEvent(Join.scrollnode(), 'scroll', Join.scrollResize);
- 71. - addEvent(window, 'resize', Join.scrollResize);
- 72. - cur.destroy.push(function(c) {
- 73. - removeEvent(Join.scrollnode(), 'scroll', Join.scrollResize);
- 74. - removeEvent(window, 'resize', Join.scrollResize);
- 75. - if (browser.msie6) c.nextButtonWrap.appendChild(c.nextButton);
- 76. - });
- 77. - },
- 78. -
- 79. - showMore: function() {
- 80. - if (!isVisible('join_' + cur.section + '_rows')) return;
- 81. - var params = extend(cur.params, {from: cur.from});
- 82. - ajax.post('join.php', params, {
- 83. - showProgress: Join.showMoreProgress,
- 84. - hideProgress: Join.hideMoreProgress,
- 85. - onDone: Join.showRows.pbind(false),
- 86. - cache: 1
- 87. - });
- 88. - },
- 89. - showRows: function(fromStart, rows, from, preload) {
- 90. - cur.from = from;
- 91. - var params;
- 92. - if (fromStart) {
- 93. - if (!rows) return Join.showNone(getLang('join_no_found_' + cur.section), true);
- 94. - val(cur.rowsEl, rows);
- 95. - if (preload && preload[0]) {
- 96. - params = extend(cur.params, {from: cur.from});
- 97. - ajax.preload('join.php', params, preload);
- 98. - show(cur.moreLink);
- 99. - } else {
- 100. - hide(cur.moreLink);
- 101. - }
- 102. - } else {
- 103. - val(cur.rowsEl, val(cur.rowsEl) + rows);
- 104. - hide(cur.moreLink);
- 105. - params = extend(cur.params, {from: cur.from});
- 106. - ajax.post('join.php', params, {
- 107. - cache: 1,
- 108. - onDone: function(rows) {
- 109. - (rows ? show : hide)(cur.moreLink);
- 110. - }
- 111. - });
- 112. - }
- 113. - show(cur.resultEl);
- 114. - hide(cur.imgEl);
- 115. - val(cur.noneEl, getLang('join_select_' + cur.section + '_after'));
- 116. - cur.noneEl.style.visibility = '';
- 117. - hide('join_' + cur.section + '_none_prg');
- 118. - cur.resultShown = true;
- 119. - val('join_next_step', getLang('join_next_step'));
- 120. - //show(cur.nextButtonWrap);
- 121. - Join.scrollResize(false, true);
- 122. - },
- 123. - showNone: function(text, noSkipLabel) {
- 124. - show(cur.noneWrap, cur.imgEl);
- 125. - val(cur.noneEl, text);
- 126. - cur.noneEl.style.visibility = '';
- 127. - hide('join_' + cur.section + '_none_prg');
- 128. - hide(cur.resultEl);
- 129. - cur.resultShown = false;
- 130. - val('join_next_step', getLang((noSkipLabel === true) ? 'join_next_step' : 'join_skip_' + cur.section));
- 131. - //hide(cur.nextButtonWrap);
- 132. - Join.scrollResize(false, true);
- 133. - },
- 134. -
- 135. - init: function(section, selData) {
- 136. - selectsData.setCountries(selData.countries_list);
- 137. - var i;
- 138. - for (i in selData.countries) {
- 139. - selectsData.setCountryInfo(i, selData.countries[i]);
- 140. - }
- 141. - for (i in selData.cities) {
- 142. - selectsData.setCityInfo(i, selData.cities[i]);
- 143. - }
- 144. - if (selData.universities) {
- 145. - for (i in selData.universities) {
- 146. - selectsData.setUniversityInfo(i, selData.universities[i]);
- 147. - }
- 148. - }
- 149. - if (selData.faculties) {
- 150. - for (i in selData.faculties) {
- 151. - selectsData.setFacultyInfo(i, selData.faculties[i]);
- 152. - }
- 153. - }
- 154. - cur.section = section;
- 155. - var upd = (section == 'school') ? Join.updateSchool : Join.updateUniversity;
- 156. - cur.cityUpdated = selData.city;
- 157. -
- 158. - cur.uiYear = new Dropdown(ge(section + '_year'), selData.years, {
- 159. - width: 160,
- 160. - placeholder: getLang('year_ph'),
- 161. - zeroPlaceholder: true,
- 162. - placeholderColor: '#777',
- 163. - selectedItems: [selData.year],
- 164. - onChange: function(value) {
- 165. - if (intval(value)) {
- 166. - Join.tipHide(cur.section + '_year_tip');
- 167. - }
- 168. - upd();
- 169. - }
- 170. - });
- 171. - if (section == 'school') {
- 172. - cur.uiClass = new ClassSelect(ge('school_class'), ge('school_class_row'), {
- 173. - show: Join.show,
- 174. - hide: Join.hide,
- 175. - width: 160,
- 176. - placeholder: getLang('class_ph'),
- 177. - zeroPlaceholder: true,
- 178. - placeholderColor: '#777',
- 179. - country: selData.country,
- 180. - school: selData.school,
- 181. - school_class: selData.cur_class,
- 182. - onChange: upd
- 183. - });
- 184. - cur.uiSchool = new SchoolHintSelect(ge('school_school'), ge('school_school_row'), {
- 185. - show: function(el) {
- 186. - Join.show(el);
- 187. - if (cur.cityUpdated) {
- 188. - cur.cityUpdated = false;
- 189. - setTimeout(Join.focusWithoutDropdown, 0);
- 190. - }
- 191. - },
- 192. - hide: function(el) {
- 193. - Join.hide(el);
- 194. - Join.tipHide('school_school_tip');
- 195. - },
- 196. - width: 160,
- 197. - school: selData.school_val,
- 198. - city: selData.city,
- 199. - placeholder: getLang('school_ph'),
- 200. - zeroPlaceholder: true,
- 201. - placeholderColor: '#777',
- 202. - forceEnableCustom: -1,
- 203. - classSelect: cur.uiClass,
- 204. - onChange: function(value) {
- 205. - if (intval(value)) {
- 206. - Join.show('school_year_row');
- 207. - Join.yearTip();
- 208. - Join.tipHide('school_school_tip');
- 209. - } else {
- 210. - Join.hide('school_year_row');
- 211. - Join.tipHide('school_year_tip');
- 212. - }
- 213. - upd();
- 214. - }
- 215. - });
- 216. - } else {
- 217. - cur.uiChair = new ChairSelect(ge('university_chair'), ge('university_chair_row'), {
- 218. - show: Join.show,
- 219. - hide: Join.hide,
- 220. - width: 160,
- 221. - placeholder: getLang('chair_ph'),
- 222. - zeroPlaceholder: true,
- 223. - placeholderColor: '#777',
- 224. - chair: selData.chair,
- 225. - faculty: selData.faculty,
- 226. - onChange: upd
- 227. - });
- 228. - cur.uiFaculty = new FacultySelect(ge('university_faculty'), ge('university_faculty_row'), {
- 229. - show: Join.show,
- 230. - hide: Join.hide,
- 231. - width: 160,
- 232. - placeholder: getLang('faculty_ph'),
- 233. - zeroPlaceholder: true,
- 234. - placeholderColor: '#777',
- 235. - faculty: selData.faculty,
- 236. - university: selData.university,
- 237. - chairSelect: cur.uiChair,
- 238. - onChange: upd
- 239. - });
- 240. - cur.uiUniversity = new UniversitySelect(ge('university_university'), ge('university_university_row'), {
- 241. - show: function(el) {
- 242. - Join.show(el);
- 243. - if (cur.cityUpdated) {
- 244. - cur.cityUpdated = false;
- 245. - setTimeout(Join.focusWithoutDropdown, 0);
- 246. - }
- 247. - },
- 248. - hide: function(el) {
- 249. - Join.hide(el);
- 250. - Join.tipHide('university_university_tip');
- 251. - },
- 252. - width: 160,
- 253. - placeholder: getLang('university_ph'),
- 254. - zeroPlaceholder: true,
- 255. - placeholderColor: '#777',
- 256. - university: selData.university,
- 257. - city: selData.city,
- 258. - facultySelect: cur.uiFaculty,
- 259. - onChange: function(value) {
- 260. - if (intval(value)) {
- 261. - Join.show('university_year_row');
- 262. - Join.yearTip();
- 263. - Join.tipHide('university_university_tip');
- 264. - } else {
- 265. - Join.hide('university_year_row');
- 266. - Join.tipHide('university_year_tip');
- 267. - }
- 268. - upd();
- 269. - }
- 270. - });
- 271. - }
- 272. - cur.uiCity = new CitySelect(ge(section + '_city'), ge(section + '_city_row'), {
- 273. - show: function(el) {
- 274. - setTimeout(function() {
- 275. - if (!intval(cur.uiCity.val())) {
- 276. - Join.tipShow(cur.section + '_city_tip', 'join_' + cur.section + '_city_tip', [-15, -52, 3], 'join_phone_tt');
- 277. - }
- 278. - }, 0);
- 279. - Join.show(el);
- 280. - },
- 281. - hide: function(el) {
- 282. - Join.tipHide(cur.section + '_city_tip');
- 283. - Join.hide(el);
- 284. - },
- 285. - width: 160,
- 286. - placeholder: getLang('city_ph'),
- 287. - zeroPlaceholder: true,
- 288. - placeholderColor: '#777',
- 289. - city: selData.city_val,
- 290. - country: selData.country,
- 291. - schoolSelect: (section == 'school') ? cur.uiSchool : false,
- 292. - universitySelect: (section == 'university') ? cur.uiUniversity : false,
- 293. - onChange: function(value) {
- 294. - if (intval(value)) {
- 295. - Join.tipHide(cur.section + '_city_tip');
- 296. - } else if (intval(cur.uiCountry.val())) {
- 297. - Join.tipShow(cur.section + '_city_tip', 'join_' + cur.section + '_city_tip', [-15, -52, 3], 'join_phone_tt');
- 298. - }
- 299. - cur.cityUpdated = true;
- 300. - upd();
- 301. - }
- 302. - });
- 303. - cur.uiCountry = new CountrySelect(ge(section + '_country'), ge(section + '_country_row'), {
- 304. - show: Join.show,
- 305. - hide: Join.hide,
- 306. - width: 160,
- 307. - placeholder: getLang('country_ph'),
- 308. - zeroPlaceholder: true,
- 309. - placeholderColor: '#777',
- 310. - country: selData.country_val,
- 311. - citySelect: cur.uiCity,
- 312. - classSelect: (section == 'school') ? cur.uiClass : false,
- 313. - onChange: upd
- 314. - });
- 315. - if (isVisible(cur.section + '_year_row')) {
- 316. - setTimeout(Join.yearTip, 0);
- 317. - }
- 318. -
- 319. - cur.params = {act: section + '_load', year: selData.year};
- 320. - if (section == 'school') {
- 321. - extend(cur.params, {school: selData.school, cls: selData.cur_class});
- 322. - } else {
- 323. - extend(cur.params, {university: selData.university, faculty: selData.faculty, chair: selData.chair});
- 324. - }
- 325. - if (cur.preload[0]) {
- 326. - ajax.preload('join.php', extend(cur.params, {from: cur.from}), cur.preload);
- 327. - }
- 328. - Join.initScroll();
- 329. - },
- 330. - focusWithoutDropdown: function() {
- 331. - var dd = (cur.section == 'school') ? cur.uiSchool : cur.uiUniversity;
- 332. - if (!intval(cur.uiCity.val()) || intval(dd.val())) return;
- 333. - dd.focusSelf = true;
- 334. - dd.focus();
- 335. - dd.select.hide();
- 336. - Join.tipShow(cur.section + '_' + cur.section + '_tip', 'join_' + cur.section + '_tip', [-15, (cur.section == 'school') ? -52 : -36, 3], 'join_' + cur.section + '_tt');
- 337. - },
- 338. - yearTip: function() {
- 339. - if (intval(cur.uiYear.val())) {
- 340. - Join.tipHide(cur.section + '_year_tip');
- 341. - } else {
- 342. - Join.tipShow(cur.section + '_year_tip', 'join_' + cur.section + '_year_tip', [-15, -36, 3], 'join_year_tt');
- 343. - }
- 344. - },
- 345. -
- 346. - showProgress: function() {
- 347. - if (isVisible(cur.resultEl)) {
- 348. - var summary = ge('join_' + cur.section + '_summary');
- 349. - if (!summary.lastChild || !hasClass(summary.lastChild, 'progress_inline')) {
- 350. - summary.appendChild(ce('span', {className: 'progress_inline join_summary_prg'}));
- 351. - }
- 352. - } else {
- 353. - show('join_' + cur.section + '_none_prg');
- 354. - cur.noneEl.style.visibility = 'hidden';
- 355. - }
- 356. - },
- 357. - hideProgress: function() {
- 358. - if (isVisible(cur.resultEl)) {
- 359. - var summary = ge('join_' + cur.section + '_summary');
- 360. - if (summary.lastChild && hasClass(summary.lastChild, 'progress_inline')) {
- 361. - re(summary.lastChild);
- 362. - }
- 363. - } else {
- 364. - cur.noneEl.style.visibility = '';
- 365. - hide('join_' + cur.section + '_none_prg');
- 366. - }
- 367. - },
- 368. -
- 369. - updateSchool: function() {
- 370. - if (!intval(cur.uiCountry.val())) {
- 371. - return Join.showNone(getLang('join_select_school_city'));
- 372. - } else if (!intval(cur.uiCity.val())) {
- 373. - ajax.post('join.php', {act: 'city_last', country: cur.uiCountry.val(), city: cur.uiCity.val()});
- 374. - return Join.showNone(getLang('join_select_school_city'));
- 375. - } else if (!intval(cur.uiSchool.val())) {
- 376. - ajax.post('join.php', {act: 'city_last', country: cur.uiCountry.val(), city: cur.uiCity.val()});
- 377. - return Join.showNone(getLang('join_select_school'));
- 378. - } else if (!intval(cur.uiYear.val())) {
- 379. - ajax.post('join.php', {act: 'school_last', school: cur.uiSchool.val(), cls: cur.uiClass.val()});
- 380. - return Join.showNone(getLang('join_select_school_year'));
- 381. - }
- 382. - cur.params = {act: 'school_load', school: cur.uiSchool.val(), year: cur.uiYear.val(), cls: cur.uiClass.val()};
- 383. - ajax.post('join.php', cur.params, {
- 384. - showProgress: Join.showProgress,
- 385. - hideProgress: Join.hideProgress,
- 386. - onDone: Join.showRows.pbind(true),
- 387. - cache: 1
- 388. - });
- 389. - },
- 390. - updateUniversity: function() {
- 391. - if (!intval(cur.uiCountry.val())) {
- 392. - return Join.showNone(getLang('join_select_university_city'));
- 393. - } else if (!intval(cur.uiCity.val())) {
- 394. - ajax.post('join.php', {act: 'city_last', country: cur.uiCountry.val(), city: cur.uiCity.val()});
- 395. - return Join.showNone(getLang('join_select_university_city'));
- 396. - } else if (!intval(cur.uiUniversity.val())) {
- 397. - ajax.post('join.php', {act: 'city_last', country: cur.uiCountry.val(), city: cur.uiCity.val()});
- 398. - return Join.showNone(getLang('join_select_university'));
- 399. - } else if (!intval(cur.uiYear.val())) {
- 400. - ajax.post('join.php', {act: 'university_last', university: cur.uiUniversity.val(), faculty: cur.uiFaculty.val(), chair: cur.uiChair.val()});
- 401. - return Join.showNone(getLang('join_select_university_year'));
- 402. - }
- 403. - cur.params = {act: 'university_load', university: cur.uiUniversity.val(), faculty: cur.uiFaculty.val(), chair: cur.uiChair.val(), year: cur.uiYear.val()};
- 404. - ajax.post('join.php', cur.params, {
- 405. - showProgress: Join.showProgress,
- 406. - hideProgress: Join.hideProgress,
- 407. - onDone: Join.showRows.pbind(true),
- 408. - cache: 1
- 409. - });
- 410. - },
- 411. -
- 412. - clearAjaxCache: function() {
- 413. - for (var i in ajaxCache) {
- 414. - if (/^\/join\.php\#/.test(i)) {
- 415. - delete(ajaxCache[i]);
- 416. - }
- 417. - }
- 418. - },
- 419. - go: function(el, section) {
- 420. - return nav.go('/join?act=' + section, false, {showProgress: lockButton.pbind(el), hideProgress: unlockButton.pbind(el)});
- 421. - },
- 422. - skip: function(el, ev) {
- 423. - var prg = ce('div', {className: 'progress fl_r join_skip_prg'}), prnt = el.parentNode;
- 424. - return nav.go(el, ev, {
- 425. - showProgress: function() {
- 426. - if (el.parentNode == prnt) prnt.replaceChild(prg, el);
- 427. - },
- 428. - hideProgress: function() {
- 429. - if (prg.parentNode == prnt) prnt.replaceChild(el, prg);
- 430. - }
- 431. - });
- 432. - },
- 433. -
- 434. - addFriend: function(el, mid) {
- 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};
- 436. - ajax.post('join.php', extend(params, {act: 'add_friend', mid: mid, year: cur.uiYear.val(), hash: cur.hash}), {
- 437. - showProgress: lockButton.pbind(el),
- 438. - hideProgress: unlockButton.pbind(el),
- 439. - onDone: function() {
- 440. - show(geByClass1('join_request', el.parentNode.parentNode));//'join_request' + mid
- 441. - hide(el.parentNode);//'join_add' + mid
- 442. - Join.clearAjaxCache();
- 443. - },
- 444. - onFail: function(text) {
- 445. - if (!text) return;
- 446. -
- 447. - showFastBox(getLang('global_error'), text);
- 448. - return true;
- 449. - }
- 450. - });
- 451. - },
- 452. - removeFriend: function(el, mid) {
- 453. - var prg = ce('span', {className: 'progress_inline'}), prnt = el.parentNode;
- 454. - ajax.post('join.php', {act: 'remove_friend', mid: mid, hash: cur.hash}, {
- 455. - showProgress: function() {
- 456. - if (el.parentNode == prnt) prnt.replaceChild(prg, el);
- 457. - },
- 458. - hideProgress: function() {
- 459. - if (prg.parentNode == prnt) prnt.replaceChild(el, prg);
- 460. - },
- 461. - onDone: function() {
- 462. - show(geByClass1('button_blue', el.parentNode.parentNode));//'join_add' + mid
- 463. - hide(el.parentNode);//'join_request' + mid
- 464. - Join.clearAjaxCache();
- 465. - }
- 466. - })
- 467. - },
- 468. -
- 469. - addFriendLogged: function(btn, mid, hash) {
- 470. - ajax.post('al_friends.php', {act: 'add', mid: mid, hash: hash, from: 'fb_sign'}, {
- 471. - onDone: function() {
- 472. - hide('join_add'+mid);
- 473. - show('join_request'+mid);
- 474. - },
- 475. - showProgress: lockButton.pbind(btn),
- 476. - hideProgress: unlockButton.pbind(btn)
- 477. - });
- 478. - },
- 479. -
- 480. - removeFriendLogged: function(el, mid, hash) {
- 481. - var prg = ce('span', {className: 'progress_inline'}), prnt = el.parentNode;
- 482. - ajax.post('al_friends.php', {act: 'remove', mid: mid, hash: hash, from: 'fb_sign'}, {
- 483. - onDone: function() {
- 484. - show('join_add'+mid);
- 485. - hide('join_request'+mid);
- 486. - },
- 487. - showProgress: function() {
- 488. - if (el.parentNode == prnt) prnt.replaceChild(prg, el);
- 489. - },
- 490. - hideProgress: function() {
- 491. - if (prg.parentNode == prnt) prnt.replaceChild(el, prg);
- 492. - }
- 493. - });
- 494. - },
- 495. -
- 496. - phoneDone: function(phone, cntr) {
- 497. - var phoneEl = ge('join_phone');
- 498. - if (cur.uiPhoneCountry) {
- 499. - cur.uiPhoneCountry.val(cntr, true);
- 500. - }
- 501. - val(phoneEl, phone);
- 502. - phoneEl.readOnly = true;
- 503. - if (cur.uiPhoneCountry) {
- 504. - cur.uiPhoneCountry.disable(true);
- 505. - addClass('join_phone_table', 'join_readonly_wrap');
- 506. - }
- 507. - if (cur.resendInt) {
- 508. - clearInterval(cur.resendInt);
- 509. - }
- 510. - cur.resendInt = setInterval(Join.resendUpdate, 1000);
- 511. - addClass(phoneEl, 'join_readonly');
- 512. - show('join_code_submit', 'join_other_phone', 'join_resend');
- 513. - hide('join_phone_submit');
- 514. - slideDown('join_code_row', 150, elfocus.pbind('join_code'));
- 515. - if (isVisible('join_submit_result')) slideUp('join_submit_result', 150);
- 516. - Join.initPhoneCode();
- 517. - },
- 518. - checkStatus: function(phone, cntr) {
- 519. - var box = curBox(), shprg = box ? box.showProgress : lockButton.pbind('join_send_phone'), hdprg = box ? box.hideProgress : unlockButton.pbind('join_send_phone');
- 520. - if (!cur.checkingStatus) {
- 521. - shprg();
- 522. - cur.checkingStatus = 1;
- 523. - cur.destroy.push(function() {
- 524. - clearTimeout(cur.checkingTimer);
- 525. - hdprg();
- 526. - });
- 527. - } else if (cur.checkingStatus < 0) {
- 528. - shprg();
- 529. - cur.checkingStatus = 1;
- 530. - } else {
- 531. - ++cur.checkingStatus;
- 532. - if (cur.checkingStatus > 4) {
- 533. - cur.checkingStatus = -1;
- 534. - hdprg();
- 535. - return Join.phoneDone(phone, cntr);
- 536. - }
- 537. - }
- 538. - cur.checkingTimer = setTimeout(ajax.post('join.php', {act: 'phone_check'}, {
- 539. - onDone: function(ok) {
- 540. - if (ok || cur.checkingStatus > 3) {
- 541. - cur.checkingStatus = -1;
- 542. - hdprg();
- 543. - return Join.phoneDone(phone, cntr);
- 544. - }
- 545. - cur.checkingTimer = setTimeout(Join.checkStatus.pbind(phone, cntr), 2000);
- 546. - },
- 547. - onFail: function(text) {
- 548. - cur.checkingStatus = -1;
- 549. - hdprg();
- 550. - if (!text) return Join.phoneDone(phone, cntr);
- 551. -
- 552. - Join.showMsg('join_submit_result', text, elfocus.pbind('join_phone'));
- 553. - return true;
- 554. - }
- 555. - }), 1000);
- 556. - },
- 557. - submitPhone: function(force) {
- 558. - if (!force && buttonLocked('join_send_phone')) return;
- 559. -
- 560. - var phoneEl = ge('join_phone'), phone = Join.getPhone(), phoneInputVal = val('join_phone'), cntr = cur.uiPhoneCountry ? cur.uiPhoneCountry.val_full() : false;
- 561. - if (phoneEl.disabled) return elfocus('join_code');
- 562. -
- 563. - ajax.post('join.php', {act: 'phone', phone: phone, hash: cur.hash}, {
- 564. - showProgress: lockButton.pbind('join_send_phone'),
- 565. - hideProgress: unlockButton.pbind('join_send_phone'),
- 566. - onDone: function(needCheck, boxBody, strong, resendDelay) {
- 567. - if (needCheck) {
- 568. - lockButton('join_send_phone');
- 569. - setTimeout(Join.submitPhone.pbind(true), 1000);
- 570. - return;
- 571. - }
- 572. - if (cur.strongCode !== strong) {
- 573. - var tip = ge('join_code_wrap').tt;
- 574. - if (tip) tip.destroy();
- 575. - cur.strongCode = strong;
- 576. - }
- 577. - cur.resendDelay = resendDelay;
- 578. - Join.phoneDone(phoneInputVal, cntr);
- 579. - },
- 580. - onFail: function(text) {
- 581. - if (!text) return;
- 582. -
- 583. - Join.showMsg('join_submit_result', text, elfocus.pbind('join_phone'));
- 584. - return true;
- 585. - }
- 586. - });
- 587. - },
- 588. - updateStrength: function() {
- 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'];
- 590. - if (pwd != pwd.replace(/\s/g, '')) {
- 591. - val('join_pass', pwd = pwd.replace(/\s/g, ''));
- 592. - elfocus('join_pass');
- 593. - }
- 594. - if (pwd.length < 6) {
- 595. - level = 0;
- 596. - } else if (pwd.match(/^\d+$/) || indexOf(pwds, pwd) >= 0 || pwd.substr(-1).match(/\d/) && pwds.indexOf(pwd.substr(0, pwd.length - 1)) >= 0) {
- 597. - level = 1;
- 598. - } else {
- 599. - var groups = [/[^a-z]/g, /[^A-Z]/g, /[^�-��]/g, /[^�-ߨ]/g, /[^0-9]/g, /[a-zA-Z�-��-߸�0-9]/g], cnts = [], big = 0;
- 600. - for (var i = 0, c = groups.length; i < c; ++i) {
- 601. - var l = pwd.replace(groups[i], '').length;
- 602. - if (l) {
- 603. - if (l > 1) ++big;
- 604. - cnts.push({group: i, cnt: l});
- 605. - }
- 606. - }
- 607. - if (cnts.length < 3) {
- 608. - if (cnts[cnts.length - 1].group != groups.length - 1 && big < 2) {
- 609. - level = 2;
- 610. - }
- 611. - }
- 612. - if (big > 2 || cnts.length > 2 && cnts[cnts.length - 1].group == groups.length - 1) {
- 613. - level = 4;
- 614. - }
- 615. - if (level < 0 && big > 1) {
- 616. - var symbs = pwd.replace(groups[groups.length - 1], '');
- 617. - if (symbs.length > 1 && symbs.replace(new RegExp(escapeRE(symbs.charAt(0)), 'g'), '').length) {
- 618. - level = 4;
- 619. - }
- 620. - }
- 621. - if (level < 0) {
- 622. - level = 3;
- 623. - }
- 624. - if (level && level < 3 && pwd.length > 13) ++level;
- 625. - }
- 626. - ge('join_about_pass').className = 'join_pwd_level' + level;
- 627. - ge('join_pass_strength').innerHTML = pwd ? getLang('join_pwd_level' + level) : ' ';
- 628. - setQuickLoginData((cur.fbSign && cur.fbValid) ? cur.fbEmail : Join.getPhone(), pwd, {params: cur.joinParams});
- 629. - },
- 630. - initPhoneCode: function() {
- 631. - if (cur.codeForm) return;
- 632. - setQuickLoginData(Join.getPhone(), '', {params: cur.joinParams});
- 633. - var el = utilsNode.appendChild(ce('div', {innerHTML: '\
- 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">\
- 635. - <input type="hidden" name="email" id="join_code_phone" />\
- 636. - <input type="hidden" name="code" id="join_code_code" />\
- 637. - <input type="hidden" name="captcha_sid" id="join_code_sid" />\
- 638. - <input type="hidden" name="captcha_key" id="join_code_key" />\
- 639. - </form>\
- 640. - <iframe id="join_code_frame" name="join_code_frame"></iframe>\
- 641. - '}));
- 642. - cur.codeForm = ge('join_code_form');
- 643. - cur.codeFrame = ge('join_code_frame');
- 644. - },
- 645. - initPhoneCountry: function(countries, country) {
- 646. - cur.countries = countries;
- 647. - cur.defCountry = country;
- 648. - cur.uiPhoneCountry = new Dropdown(ge('join_phone_country'), cur.countries, {
- 649. - selectedItems: country,
- 650. - autocomplete: true,
- 651. - width: 134,
- 652. - multiselect: false,
- 653. - onChange: function(v) {
- 654. - var ph = ge('join_phone'), pref = ge('join_phone_prefix').firstChild, code = cur.uiPhoneCountry.val_full()[3];
- 655. - debugLog(v);
- 656. - if (ph.readOnly || v === 0 || v === '0' || v === '' || v === false || v === undefined) {
- 657. - var c = val(pref);
- 658. - if (code == c) return;
- 659. - for (var i = 0, l = cur.countries.length; i < l; ++i) {
- 660. - if (cur.countries[i][3] == c) {
- 661. - return cur.uiPhoneCountry.val(cur.countries[i]);
- 662. - }
- 663. - }
- 664. - return cur.uiPhoneCountry.val(cur.defCountry, true);
- 665. - }
- 666. - val(pref, code);
- 667. - setTimeout(elfocus.pbind(ph), 0);
- 668. - }
- 669. - });
- 670. - if (ge('join_phone').readOnly) {
- 671. - cur.uiPhoneCountry.disable(true);
- 672. - }
- 673. - cur.destroy.push(cur.uiPhoneCountry.destroy.bind(cur.uiPhoneCountry));
- 674. - },
- 675. - getPhone: function() {
- 676. - var phone = trim(val('join_phone')), prefix = trim(val((ge('join_phone_prefix') || {}).firstChild) || '');
- 677. - return prefix + phone;
- 678. - },
- 679. - submitPhoneCode: function() {
- 680. - if (!cur.codeForm || buttonLocked('join_send_code')) return;
- 681. -
- 682. - var code = trim(val('join_code')).replace(/[^a-z0-9]/g, '');
- 683. - if (code.length < 4) {
- 684. - return notaBene('join_code');
- 685. - }
- 686. - if (code == '0593') {
- 687. - return Join.showMsg('join_submit_result', getLang('join_sorry_code'), elfocus.pbind('join_code', false, false));
- 688. - }
- 689. - val('join_code_phone', Join.getPhone());
- 690. - val('join_code_code', code);
- 691. - lockButton('join_send_code')
- 692. - cur.codeForm.submit();
- 693. - },
- 694. - askPassword: function(hash, sureBox) {
- 695. - if (curBox()) curBox().hide();
- 696. - cur.sureBoxText = sureBox;
- 697. - unlockButton('join_send_code');
- 698. - val('join_code', val('join_code_code'));
- 699. - var fb = (cur.joinParams && cur.joinParams.facebook);
- 700. - cur.joinParams = {join_code: val('join_code'), join_hash: hash};
- 701. - if (fb) {
- 702. - cur.joinParams.facebook = 1;
- 703. - }
- 704. - ge('join_code').readOnly = true;
- 705. - addClass(ge('join_code'), 'join_readonly');
- 706. - show('join_pass_submit', 'join_accept_terms');
- 707. - hide('join_other_phone', 'join_code_submit', 'join_resend');
- 708. - slideDown('join_pass_row', 150, elfocus.pbind('join_pass'));
- 709. - if (isVisible('join_submit_result')) slideUp('join_submit_result', 150);
- 710. - },
- 711. - askCaptcha: function(sid, dif) {
- 712. - if (!cur.codeForm) return;
- 713. - unlockButton('join_send_code');
- 714. - window.badCodeBox = showCaptchaBox(sid, dif, window.badCodeBox, {onSubmit: function(sid, key) {
- 715. - val('join_code_sid', sid);
- 716. - val('join_code_key', key);
- 717. - cur.codeForm.submit();
- 718. - }, onHide: function() { window.badCodeBox = false; }});
- 719. - },
- 720. - submitPasswordSure: function() {
- 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'));
- 722. - },
- 723. - submitPassword: function(toAlready, fbLoginTo) {
- 724. - if (buttonLocked('join_send_pass') && !cur.submitOnSign) return;
- 725. -
- 726. - if (fbLoginTo === true) {
- 727. - var pass = '000000';
- 728. - } else {
- 729. - var pass = val('join_pass');
- 730. - if (pass.length < 6) return notaBene('join_pass');
- 731. - }
- 732. -
- 733. - if (cur.sureBoxText && toAlready !== 1 && toAlready !== -1) {
- 734. - showFastBox({title: getLang('join_sure_detach'), hideButtons: true, width: 430, noCloseButton: true, bodyStyle: 'padding: 16px 14px 5px'}, cur.sureBoxText).changed = true;
- 735. - ge('join_submit_old').style.position = ge('join_submit_new').style.position = 'relative';
- 736. - return;
- 737. - }
- 738. - cur.joinParams.join_to_already = intval(toAlready);
- 739. - if (cur.fbSign && !cur.fbSigned) {
- 740. - cur.submitOnSign = 1;
- 741. - return lockButton('join_send_pass');
- 742. - }
- 743. -
- 744. - if (!window._oldOnLoginFailed) {
- 745. - window._oldOnLoginFailed = onLoginFailed;
- 746. - window._oldOnLoginDone = onLoginDone;
- 747. - cur.destroy.push(function() {
- 748. - onLoginFailed = _oldOnLoginFailed;
- 749. - onLoginDone = _oldOnLoginDone;
- 750. - _oldOnLoginFailed = false;
- 751. - _oldOnLoginDone = false;
- 752. - });
- 753. - }
- 754. - onLoginFailed = function(code) {
- 755. - if (code === -1) {
- 756. - location.href = location.href.replace(/^http:/, 'https:');
- 757. - } else {
- 758. - nav.reload();
- 759. - }
- 760. - };
- 761. - onLoginDone = nav.go.pbind('join.php?act=done')
- 762. - if (cur.fbSign && (cur.fbValid || fbLoginTo === true)) {
- 763. - var login = cur.fbEmail;
- 764. - cur.joinParams['fb_id'] = cur.fbId;
- 765. - } else {
- 766. - var login = Join.getPhone();
- 767. - }
- 768. - submitQuickLoginForm(login, pass, {prg: 'join_send_pass', params: cur.joinParams});
- 769. - },
- 770. -
- 771. - showMsg: function(id, text, handler) {
- 772. - var el = ge(id);
- 773. - val(el, text);
- 774. - if (isVisible(el)) {
- 775. - animate(el, {backgroundColor: '#F4EBBD'}, 100, animate.pbind(el, {backgroundColor: '#F9F6E7'}, 2000));
- 776. - handler();
- 777. - } else {
- 778. - slideDown(el, 100, handler);
- 779. - }
- 780. - },
- 781. - codeFailed: function(triesLeft) {
- 782. - if (curBox()) curBox().hide();
- 783. - unlockButton('join_send_code');
- 784. - var text = getLang('join_wrong_code');
- 785. - triesLeft = intval(triesLeft);
- 786. - if (triesLeft < 0) {
- 787. - text = getLang('join_code_failed');
- 788. - } else if (triesLeft && triesLeft < 6) {
- 789. - text += '<br>' + getLang('join_tries_left').replace('{count}', '<b>' + triesLeft + '</b>');
- 790. - }
- 791. - Join.showMsg('join_submit_result', text, elfocus.pbind('join_code'));
- 792. - if (window._oldOnLoginFailed) onLoginFailed = _oldOnLoginFailed;
- 793. - },
- 794. - submitCode: function() {
- 795. - if (buttonLocked('join_send_code')) return;
- 796. -
- 797. - var code = val('join_code');
- 798. - if (code.length < 8) return notaBene('join_code');
- 799. -
- 800. - if (!window._oldOnLoginFailed) {
- 801. - window._oldOnLoginFailed = onLoginFailed;
- 802. - cur.destroy.push(function() {
- 803. - onLoginFailed = _oldOnLoginFailed;
- 804. - _oldOnLoginFailed = false;
- 805. - });
- 806. - }
- 807. - onLoginFailed = function(code) {
- 808. - if (code === -1) {
- 809. - location.href = location.href.replace(/^http:/, 'https:');
- 810. - } else {
- 811. - Join.codeFailed();
- 812. - }
- 813. - };
- 814. - submitQuickLoginForm(Join.getPhone(), code, {prg: 'join_send_code'})
- 815. - },
- 816. - resendUpdate: function() {
- 817. - if (cur.resendDelay > 0) {
- 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));
- 819. - cur.resendDelay--;
- 820. - } else {
- 821. - ge('join_resend').innerHTML = '<a id="join_resend_lnk" onclick="return Join.noCode()">' + getLang('join_no_code') + '</a>';
- 822. - clearInterval(cur.resendInt);
- 823. - }
- 824. - },
- 825. - noCode: function() {
- 826. - var prg = ce('span', {className: 'progress_inline'}), el = ge('join_resend_lnk'), prnt = el.parentNode;
- 827. - ajax.post('join.php', {act: 'resend', hash: cur.hash}, {
- 828. - showProgress: function() {
- 829. - if (el.parentNode == prnt) prnt.replaceChild(prg, el);
- 830. - },
- 831. - hideProgress: function() {
- 832. - if (prg.parentNode == prnt) prnt.replaceChild(el, prg);
- 833. - },
- 834. - onDone: function(text, html, btn, cancel) {
- 835. - if (html && btn) {
- 836. - hide('join_submit_result');
- 837. - showFastBox({title: text, width: 430, noCloseButton: true}, html, btn, Join.call, cancel).changed = true;
- 838. - } else if (html) {
- 839. - hide('join_submit_result');
- 840. - showFastBox({title: text, width: 430}, html);
- 841. - } else {
- 842. - Join.showMsg('join_submit_result', text);
- 843. - }
- 844. - }
- 845. - });
- 846. - return false;
- 847. - },
- 848. - changePhone: function() {
- 849. - var phoneEl = ge('join_phone');
- 850. - phoneEl.readOnly = false;
- 851. - removeClass(phoneEl, 'join_readonly');
- 852. - if (cur.uiPhoneCountry) {
- 853. - cur.uiPhoneCountry.disable(false);
- 854. - cur.uiPhoneCountry.val(cur.uiPhoneCountry.val(), true);
- 855. - removeClass('join_phone_table', 'join_readonly_wrap');
- 856. - }
- 857. - show('join_phone_submit');
- 858. - hide('join_code_submit', 'join_other_phone', 'join_resend');
- 859. - slideUp('join_code_row', 150);
- 860. - elfocus('join_phone');
- 861. - },
- 862. - call: function() {
- 863. - ajax.post('join.php', {act: 'call', hash: cur.hash}, {progress: curBox().progress, onDone: function(text) {
- 864. - curBox().hide();
- 865. - Join.showMsg('join_submit_result', text);
- 866. - }});
- 867. - },
- 868. -
- 869. - activeTab: function(el) {
- 870. - var p = el.parentNode.parentNode;
- 871. - for (var i = p.firstChild; i; i = i.nextSibling) {
- 872. - if (i.className == 'active_link') {
- 873. - i.className = '';
- 874. - }
- 875. - }
- 876. - el.parentNode.className = 'active_link';
- 877. - },
- 878. -
- 879. - tipShow: function(el, key, shift, addClass) {
- 880. - el = ge(el);
- 881. - var showTT = function() {
- 882. - showTooltip(el, {
- 883. - text: '<div class="join_finish_tt_pointer"></div>' + getLang(key),
- 884. - slideX: 15,
- 885. - className: 'join_finish_tt' + (addClass ? (' ' + addClass) : ''),
- 886. - shift: shift,
- 887. - forcetoup: true,
- 888. - onCreate: removeEvent.pbind(el, 'mouseout')
- 889. - });
- 890. - }
- 891. - if (vk.loaded) {
- 892. - setTimeout(showTT, 0);
- 893. - } else {
- 894. - addEvent(window, 'load', showTT);
- 895. - }
- 896. - },
- 897. - tipHide: function(el) {
- 898. - el = ge(el);
- 899. - if (el && el.tt && el.tt.hide) el.tt.hide();
- 900. - },
- 901. - phoneTip: function(fb) {
- 902. - if (ge('join_phone').readOnly) return;
- 903. - return Join.tipShow('join_phone_wrap', 'join_phone_tip', [-147, fb ? -89 : -95, 3], 'join_phone_tt');
- 904. - },
- 905. - codeTip: function() {
- 906. - if (ge('join_code').readOnly || cur.strongCode > 0) return;
- 907. - return Join.tipShow('join_code_wrap', cur.strongCode ? 'join_code_voice_tip' : 'join_code_tip', [-147, -82, 3]);
- 908. - },
- 909. - passTip: function() {
- 910. - return Join.tipShow('join_pass_wrap', 'join_pass_tip', [-147, -82, 3]);
- 911. - },
- 912. - switchToDefSign: function(hash, obj) {
- 913. - ajax.post('join.php', {act: 'logout', hash: hash, noredir: 1},{
- 914. - onDone: function() {
- 915. - showBox('join.php', {act: 'box', from: nav.strLoc}, {}, event);
- 916. - },
- 917. - showProgress: lockButton.pbind(obj),
- 918. - hideProgress: unlockButton.pbind(obj)
- 919. - });
- 920. - }
- 921. - };
- 922. -
- 923. - try{stManager.done('join.js');}catch(e){}
- ------
Advertisement
Add Comment
Please, Sign In to add comment