Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Файл - gifts.css (Старый размер - 11239 | Новый - 0):
- 0. - #gifts_css {
- 1. - display: none;
- 2. - }
- 3. -
- 4. - #gifts_box {
- 5. - position: relative;
- 6. - margin: -3px 0px 0;
- 7. - overflow: auto;
- 8. - width: 642px;
- 9. - padding: 5px 5px 20px;
- 10. - }
- 11. - .gifts_section {
- 12. - position: relative;
- 13. - margin: -3px 0px 0px;
- 14. - overflow: auto;
- 15. - padding: 10px 5px 23px 7px;
- 16. - }
- 17. - .gift_cell {
- 18. - height: 96px;
- 19. - width: 96px;
- 20. - padding: 4px;
- 21. - position: relative;
- 22. - }
- 23. - #gift_price {
- 24. - background: #D0D8E0;
- 25. - background: rgba(208, 216, 224, 0.8);
- 26. - border-radius: 3px;
- 27. - padding: 1px 4px 2px;
- 28. - margin: 0 12px;
- 29. - color: #45688E;
- 30. - font-size: 1em;
- 31. - font-weight: bold;
- 32. - position: absolute;
- 33. - left: 0;
- 34. - right: 0;
- 35. - bottom: 0;
- 36. - text-align: center;
- 37. - display: none;
- 38. - z-index: 99;
- 39. - }
- 40. - .gift_free {
- 41. - background: #D0D8E0;
- 42. - background: rgba(208, 216, 224, 0.8);
- 43. - border-radius: 3px;
- 44. - padding: 3px 4px 4px;
- 45. - margin: 0 12px;
- 46. - color: #45688E;
- 47. - font-size: 1em;
- 48. - font-weight: bold;
- 49. - position: absolute;
- 50. - left: 0;
- 51. - right: 0;
- 52. - bottom: 0;
- 53. - text-align: center;
- 54. - z-index: 99;
- 55. - }
- 56. - #gift_privacy {
- 57. - padding: 10px 0 0;
- 58. - color: #666;
- 59. - }
- 60. - .gifts_section img,
- 61. - #gifts_box img {
- 62. - display: block;
- 63. - }
- 64. - #gift_price_str {
- 65. - display: block;
- 66. - margin: 2px 0px;
- 67. - }
- 68. - #gifts_box b.rbottom {
- 69. - background: white;
- 70. - display: block;
- 71. - }
- 72. - #gifts_box b.rbottom b {
- 73. - background: #F2E9BA;
- 74. - display: block;
- 75. - height: 1px;
- 76. - overflow: hidden;
- 77. - }
- 78. - #gifts_box b.rbottom b.r {
- 79. - height: 1px;
- 80. - margin: 0px 1px;
- 81. - }
- 82. - #gifts_box a.gold {
- 83. - background: url(/images/gift_gold_bg.gif) no-repeat;
- 84. - }
- 85. - .gift_cell .gift_img {
- 86. - -webkit-transition: opacity .2s;
- 87. - -moz-transition: opacity .2s;
- 88. - -o-transition: opacity .2s;
- 89. - transition: opacity .2s;
- 90. - }
- 91. - .gift_cell:hover .gift_img {
- 92. - opacity: .8;
- 93. - }
- 94. - .gift_cell:hover .gift_free {
- 95. - display: none;
- 96. - }
- 97. - #select_gift a.gold:hover {
- 98. - background: url(/images/gift_bg.gif) no-repeat;
- 99. - background-color: transparent;
- 100. - text-decoration: none;
- 101. - }
- 102. - #gifts_box a.unactive:hover {
- 103. - opacity: 1;
- 104. - filter:alpha(opacity=100);
- 105. - }
- 106. - #gifts_box a.active {
- 107. - background: url(/images/gift_bg.gif) no-repeat;
- 108. - }
- 109. - .gift_loader {
- 110. - height: 256px;
- 111. - text-align: center;
- 112. - margin-bottom: 4px;
- 113. - }
- 114. - .gift_loader img {
- 115. - margin: 0 auto;
- 116. - }
- 117. - .gift_label {
- 118. - width: 130px;
- 119. - color: #666;
- 120. - text-align: right;
- 121. - padding-top: 8px;
- 122. - }
- 123. - .gift_labeled {
- 124. - width: 250px;
- 125. - padding: 4px 10px 0;
- 126. - }
- 127. - .gift_labeled textarea {
- 128. - margin-top: 1px;
- 129. - }
- 130. - #g_money_to_votes {
- 131. - display: none;
- 132. - background-color: #F9F6E7;
- 133. - border: 1px solid #D4BC4C;
- 134. - padding: 8px 11px;
- 135. - text-align: center;
- 136. - }
- 137. - #gift_message .input_text {
- 138. - width: 222px;
- 139. - display:block
- 140. - }
- 141. - .gft_send #text_box_warn {
- 142. - color: #777;
- 143. - padding: 20px 0px 0px;
- 144. - display: none;
- 145. - }
- 146. - #gift_tip {
- 147. - text-align: center;
- 148. - padding-top:6px;
- 149. - line-height:140%;
- 150. - display:none;
- 151. - }
- 152. -
- 153. - /* Wishlist */
- 154. - #page {
- 155. - background-color: #F7F7F7;
- 156. - padding: 10px;
- 157. - height: 50px;
- 158. - border-bottom: 1px solid #DAE2E8;
- 159. - }
- 160. - .add_wish_row {
- 161. - clear: both;
- 162. - width: 400px;
- 163. - margin: 0px auto;
- 164. - }
- 165. - .box_body #cont_wrapper {
- 166. - background-color: #FFF;
- 167. - clear: left;
- 168. - overflow-x: hidden;
- 169. - overflow-y: auto;
- 170. - }
- 171. - .box_body .cont {
- 172. - width: 500px;
- 173. - margin: 0px auto;
- 174. - }
- 175. - .box_body .image_cont {
- 176. - padding: 3px;
- 177. - width: 96px;
- 178. - height: 96px;
- 179. - float: left;
- 180. - margin: 3px 10px 3px 0px;
- 181. - background: #FFF url(/images/upload.gif) no-repeat 50% 50%;
- 182. - }
- 183. - .box_body .image_cont img {
- 184. - margin: 0px;
- 185. - padding: 0px;
- 186. - border: 0px;
- 187. - }
- 188. - .box_body .item_description {
- 189. - padding: 7px 4px 4px;
- 190. - color: #000;
- 191. - }
- 192. - .box_body .item_name {
- 193. - padding: 7px 4px 4px;
- 194. - font-weight: bold;
- 195. - color: #36638E;
- 196. - }
- 197. - .box_body .item_details {
- 198. - padding: 0px 4px;
- 199. - font-size: 0.9em;
- 200. - color: #666;
- 201. - }
- 202. - .box_body #wish_publish {
- 203. - margin-left: 160px;
- 204. - position: relative;
- 205. - }
- 206. -
- 207. - .gifts_right_link {
- 208. - display: none;
- 209. - }
- 210. - #gifts_rows,
- 211. - .gifts_box_rows {
- 212. - padding: 0px 15px;
- 213. - }
- 214. - .gift_row {
- 215. - padding: 15px 0px 10px;
- 216. - border-bottom: 1px solid #DAE1E8;
- 217. - }
- 218. - .gift_row:last-child {
- 219. - border-bottom: 0px;
- 220. - }
- 221. - .gifts_box_rows .gift_row:last-child {
- 222. - padding-bottom: 15px;
- 223. - }
- 224. - .gift_thumb_td {
- 225. - vertical-align: top;
- 226. - width: 65px;
- 227. - }
- 228. - .gift_thumb {
- 229. - width: 65px;
- 230. - height: 50px;
- 231. - overflow: hidden;
- 232. - }
- 233. - .gift_info_td {
- 234. - vertical-align: top;
- 235. - width: 100%;
- 236. - }
- 237. - .gift_name {
- 238. - font-weight: bold;
- 239. - color: #45688E;
- 240. - }
- 241. - .gift_anonim {
- 242. - font-weight: normal;
- 243. - }
- 244. - .gift_text {
- 245. - padding: 10px 0px 20px;
- 246. - line-height: 160%;
- 247. - text-align: center;
- 248. - width: 466px;
- 249. - overflow: hidden;
- 250. - word-wrap: break-word;
- 251. - }
- 252. - .gift_wrap {
- 253. - width: 256px;
- 254. - margin: 25px 0px 0px 105px;
- 255. - height: 256px;
- 256. - overflow: hidden;
- 257. - }
- 258. - .gift_tip {
- 259. - width: 338px;
- 260. - border: 1px solid #DAE1E8;
- 261. - background: #F7F7F7;
- 262. - padding: 10px;
- 263. - margin: 10px 53px;
- 264. - line-height: 160%;
- 265. - text-align: center;
- 266. - }
- 267. - .gift_bottom {
- 268. - color: #999;
- 269. - height: 13px;
- 270. - }
- 271. - .gift_prg {
- 272. - margin: 0px 10px;
- 273. - }
- 274. - .gift_privacy {
- 275. - color: #999;
- 276. - margin: 0px 15px;
- 277. - }
- 278. - #gifts_no_content {
- 279. - padding: 100px 50px;
- 280. - text-align: center;
- 281. - font-size: 1.09em;
- 282. - color: #777;
- 283. - line-height: 160%;
- 284. - }
- 285. - #gifts_load_more {
- 286. - margin: 0px 15px 15px;
- 287. - }
- 288. - .gift_deleted {
- 289. - color: #777;
- 290. - padding: 18px 65px;
- 291. - }
- 292. -
- 293. - #gs_rows {
- 294. - padding: 7px 7px 20px;
- 295. - }
- 296. - .gift_friend_gift {
- 297. - width: 96px;
- 298. - height: 96px;
- 299. - }
- 300. - .gift_many {
- 301. - display: block;
- 302. - padding: 20px 0px;
- 303. - }
- 304. - .gs_img {
- 305. - width: 96px;
- 306. - height: 96px;
- 307. - vertical-align: top;
- 308. - -webkit-transition: opacity .2s;
- 309. - -moz-transition: opacity .2s;
- 310. - -o-transition: opacity .2s;
- 311. - transition: opacity .2s;
- 312. - }
- 313. - .gs_btm {
- 314. - background: #D0D8E0;
- 315. - background: rgba(208, 216, 224, 0.8);
- 316. - border-radius: 3px;
- 317. - padding: 1px 4px 2px;
- 318. - margin: 0 12px;
- 319. - color: #45688E;
- 320. - font-size: 1em;
- 321. - font-weight: bold;
- 322. - position: absolute;
- 323. - left: 0;
- 324. - right: 0;
- 325. - bottom: 0;
- 326. - text-align: center;
- 327. - display: none;
- 328. - z-index: 499;
- 329. - }
- 330. - .gs_price {
- 331. - margin: 2px 0px 2px 0px;
- 332. - }
- 333. - .gs_btm1 {
- 334. - display: block;
- 335. - background: #FFF;
- 336. - }
- 337. - .gs_btm2 {
- 338. - display: block;
- 339. - height: 1px;
- 340. - overflow: hidden;
- 341. - background: #F2E9BA;
- 342. - margin: 0 1px;
- 343. - }
- 344. - .gs_row {
- 345. - display: inline-block;
- 346. - *display: inline;
- 347. - zoom: 1;
- 348. - width: 96px;
- 349. - height: 96px;
- 350. - padding: 4px 2px;
- 351. - margin: 1px;
- 352. - border-radius: 2px;
- 353. - position: relative;
- 354. - }
- 355. - .gs_row:hover .gs_btm {
- 356. - display: block;
- 357. - }
- 358. - .gs_row:hover .gs_img {
- 359. - opacity: .8;
- 360. - }
- 361. - .gs_row:hover .gift_free {
- 362. - display: none;
- 363. - }
- 364. - .gs_privacy {
- 365. - padding: 7px 0 0;
- 366. - color: #666;
- 367. - }
- 368. - .gs_check {
- 369. - position: absolute;
- 370. - z-index: 399;
- 371. - margin: 1px 82px;
- 372. - width: 12px;
- 373. - height: 14px;
- 374. - background: url(/images/check_dark.gif);
- 375. - display: none;
- 376. - }
- 377. - .gs_active .gs_check {
- 378. - display: block;
- 379. - }
- 380. - .gs_box_wrap {
- 381. - text-align: center;
- 382. - padding: 1px;
- 383. - padding-bottom: 10px;
- 384. - }
- 385. - .gs_box_img {
- 386. - width: 256px;
- 387. - height: 256px;
- 388. - vertical-align: top;
- 389. - }
- 390. - .gs_box_label {
- 391. - padding: 13px 10px 0px;
- 392. - width: 130px;
- 393. - color: #777;
- 394. - }
- 395. - .gs_box_labeled {
- 396. - padding-top: 10px;
- 397. - width: 236px;
- 398. - }
- 399. - .gs_box_privacy {
- 400. - padding: 9px 6px 0px;
- 401. - width: 236px;
- 402. - }
- 403. - #gs_msg,
- 404. - #gift_text {
- 405. - width: 356px;
- 406. - height: 50px;
- 407. - }
- 408. - #gift_text {
- 409. - width: 364px;
- 410. - }
- 411. - #gs_warn {
- 412. - display: none;
- 413. - color: #777;
- 414. - padding: 20px 0px 0px;
- 415. - }
- 416. - .gft_send {
- 417. - padding: 0px 25px;
- 418. - }
- 419. - #gft_box_to {
- 420. - padding-top: 0px;
- 421. - }
- 422. - .gft_box_text_wrap {
- 423. - margin-bottom: 5px;
- 424. - }
- 425. - .gft_box_label {
- 426. - color: #45688E;
- 427. - line-height: 1.27em;
- 428. - margin: 0px;
- 429. - padding: 20px 0px 9px;
- 430. - font-size: 1.09em;
- 431. - font-weight: bold;
- 432. - }
- 433. -
- 434. -
- 435. - /* section tabs */
- 436. - .gifts_subtab1 {
- 437. - -moz-border-radius: 2px;
- 438. - border-radius: 2px;
- 439. - cursor: pointer;
- 440. - margin: 0 5px 0 0;
- 441. - color: #45688E;
- 442. - }
- 443. - .gifts_subtab1:hover {
- 444. - background-color: #E1E7ED;
- 445. - }
- 446. -
- 447. - .gifts_subtab1.active {
- 448. - background-color: #597DA3;
- 449. - color: white;
- 450. - cursor: default;
- 451. - }
- 452. - .gifts_subtab2 {
- 453. - padding: 3px 8px 4px;
- 454. - font-weight: bold;
- 455. - }
- 456. - .gifts_profile_block {
- 457. - background: #FFF;
- 458. - text-align: center;
- 459. - overflow: hidden;
- 460. - }
- 461. - .gifts_profile_cont {
- 462. - position: relative;
- 463. - }
- 464. - .gifts_profile_list_wrap {
- 465. - overflow: hidden;
- 466. - height: 288px;
- 467. - }
- 468. - .gifts_profile_list {
- 469. - position: static;
- 470. - width: 400px;
- 471. - height: auto;
- 472. - padding: 9px 15px 9px 11px;
- 473. - }
- 474. - .gifts_profile_cont .list_shadow {
- 475. - position: absolute;
- 476. - width: 100%;
- 477. - height: 6px;
- 478. - background-color: white;
- 479. - box-shadow: 0 0 3px white;
- 480. - }
- 481. - .gifts_profile_cont .shadow_top {
- 482. - top: 0;
- 483. - box-shadow: 0 1px 3px white;
- 484. - }
- 485. - .gifts_profile_cont .shadow_bottom {
- 486. - bottom: 0;
- 487. - box-shadow: 0 -1px 3px white;
- 488. - }
- 489. - .gifts_profile_send {
- 490. - position: relative;
- 491. - width: 168px;
- 492. - height: 288px;
- 493. - background: #F1F1F1;
- 494. - border-left: #dae1e8 1px solid;
- 495. - }
- 496. - .gift_profile_cell {
- 497. - height: 48px;
- 498. - width: 48px;
- 499. - padding: 3px 1px;
- 500. - -moz-border-radius: 2px;
- 501. - border-radius: 2px;
- 502. - -moz-transition: background .1s;
- 503. - -webkit-transition: background .1s;
- 504. - -o-transition: background .1s;
- 505. - transition: background .1s;
- 506. - }
- 507. - .gift_profile_cell:hover {
- 508. - background: #E1E7ED;
- 509. - -moz-transition-duration: 0;
- 510. - -webkit-transition-duration: 0;
- 511. - -o-transition-duration: 0;
- 512. - transition-duration: 0;
- 513. - }
- 514. - .gifts_profile_header {
- 515. - font-size: 1.09em;
- 516. - font-weight: bold;
- 517. - color: #45688E;
- 518. - padding: 12px 0 0;
- 519. - }
- 520. - .gifts_profile_price {
- 521. - font-size: 0.9em;
- 522. - color: #666;
- 523. - padding: 4px 0 2px;
- 524. - }
- 525. - .gifts_profile_gift {
- 526. - padding: 12px 0 9px;
- 527. - height: 96px;
- 528. - }
- 529. - .gifts_profile_gift img.animated {
- 530. - position: absolute;
- 531. - left: 0;
- 532. - right: 0;
- 533. - margin: 0 auto;
- 534. - }
- 535. - .gifts_profile_send .checkbox {
- 536. - text-align: left;
- 537. - padding: 8px 12px;
- 538. - font-size: 0.9em;
- 539. - color: #666;
- 540. - }
- 541. - .gifts_profile_message {
- 542. - padding: 0 12px;
- 543. - }
- 544. - #gifts_message {
- 545. - width: 136px;
- 546. - height: 35px;
- 547. - vertical-align: top;
- 548. - resize: none;
- 549. - margin: 2px 0px;
- 550. - outline: none;
- 551. - }
- 552. - #gifts_buttons {
- 553. - padding-top: 4px;
- 554. - }
- 555. - #gifts_submit {
- 556. - width: 144px;
- 557. - }
- 558. -
- 559. - /* scrollbars */
- 560. - .gifts_scrollbar_cont {
- 561. - width: 7px;
- 562. - height: 100%;
- 563. - margin-top: 3px;
- 564. - position: absolute;
- 565. - z-index: 500;
- 566. - }
- 567. - .gifts_scrollbar_inner {
- 568. - background: #DAE1E8;
- 569. - width: 6px;
- 570. - height: 26px;
- 571. - margin-left: -1px;
- 572. - -webkit-border-radius: 3px;
- 573. - -moz-border-radius: 3px;
- 574. - border-radius: 3px;
- 575. - cursor: pointer;
- 576. - }
- 577. - .gifts_scrollbar_inner:hover,
- 578. - .gifts_scrollbar_hovered {
- 579. - background: #BEC8D3;
- 580. - }
- 581. - .gifts_scrollbar_top {
- 582. - position: absolute;
- 583. - height: 3px;
- 584. - margin-top: -1px;
- 585. - background: #555555;
- 586. - opacity: 0.12;
- 587. - filter: alpha(opacity=12);
- 588. - display: none;
- 589. - }
- 590. - .gifts_scrollbar_bottom {
- 591. - position: absolute;
- 592. - height: 3px;
- 593. - margin-top: -2px;
- 594. - background: #555555;
- 595. - opacity: 0.12;
- 596. - filter: alpha(opacity=12);
- 597. - }
- 598. - .gs_bonus_info {
- 599. - background: #F1F1F1;
- 600. - padding: 10px 10px;
- 601. - margin: 4px 10px 12px;
- 602. - }
- 603. - .gs_box_close {
- 604. - padding: 16px 20px 0px;
- 605. - }
- 606. - .gs_box_header {
- 607. - padding: 16px 0px 10px 0px;
- 608. - }
- 609. - .gs_box_header_f {
- 610. - font-size: 1.18em;
- 611. - color: #45688E;
- 612. - font-weight: bold;
- 613. - }
- 614. - #gsw_inp {
- 615. - width: 382px;
- 616. - font-size: 1em;
- 617. - font-family: Tahoma, Verdana, Arial, Sans-Serif, Lucida Sans;
- 618. - }
- 619. - .tb_tabs_wrap .gifts_add_lnk {
- 620. - padding: 11px 5px 9px;
- 621. - color: #899BA9;
- 622. - }
- 623. - #gifts_do_send_wrap {
- 624. - padding: 16px 14px;
- 625. - }
- 626. - #gifts_packages_wrap {
- 627. - display: none;
- 628. - padding: 16px 39px;
- 629. - }
- 630. - #gifts_packages_wrap .radiobtn {
- 631. - margin: 0 0 12px 5px;
- 632. - }
- 633. - #gifts_packages_wrap .radiobtn b {
- 634. - color: #36638E;
- 635. - font-size: 1.09em;
- 636. - }
- 637. - #gifts_packages_wrap .radiobtn span {
- 638. - color: #777;
- 639. - line-height: 20px;
- 640. - }
- 641. - #gifts_packages_wrap .radiobtn.disabled {
- 642. - opacity: 0.7;
- 643. - filter: alpha(opacity=70);
- 644. - }
- 645. - #gifts_packages_wrap .gifts_packages_options {
- 646. - margin: 0 auto;
- 647. - width: 240px;
- 648. - }
- 649. - #gifts_packages_wrap h2 {
- 650. - margin: 10px 0 20px 0;
- 651. - }
- 652. - #gifts_packages_wrap .error {
- 653. - margin: 0 -10px 15px -10px;
- 654. - }
- 655. - #gifts_packages_descr {
- 656. - margin: 20px 0 10px 0;
- 657. - color: #777;
- 658. - text-align: center;;
- 659. - }
- 660. - #gift_footer_balance_str {
- 661. - color: #777;
- 662. - }
- 663. -
- ------
- Файл - gifts.js (Старый размер - 11643 | Новый - 0):
- 0. - var Gifts = {
- 1. - initGifts: function(opts, preload) {
- 2. - extend(cur, {
- 3. - pgStart: opts.start,
- 4. - pgOffset: opts.offset,
- 5. - pgCount: opts.count,
- 6. - pgPerPage: opts.perpage,
- 7. - pgCont: ge('gifts_rows'),
- 8. - pgMore: ge('gifts_load_more'),
- 9. - pgPages: ge('gifts_pages'),
- 10. - pgMorePrg: ge('gifts_more_progress'),
- 11. - pgPreload: preload,
- 12. - pgHref: '/gifts' + opts.mid + '?' + (opts.sent ? 'act=sent&' : '') + 'offset=',
- 13. - pgParams: opts.sent ? {act: 'sent'} : {},
- 14. - pgUrl: '/gifts' + opts.mid,
- 15. -
- 16. - mid: opts.mid,
- 17. - hash: opts.hash
- 18. - });
- 19. - Pagination.init();
- 20. - cur.destroy.push(Pagination.deinit);
- 21. - },
- 22. - deleteGift: function(el, gift, giftData, opts) {
- 23. - opts = opts || {};
- 24. - ajax.post('al_gifts.php', {act: 'delete', mid: opts.mid, gift: giftData, hash: opts.hash}, {onDone: function(text) {
- 25. - var p = ge('gift' + gift);
- 26. - if (!p) return;
- 27. - if (p.firstChild.nextSibling) {
- 28. - p.firstChild.nextSibling.innerHTML = text;
- 29. - } else {
- 30. - p.appendChild(ce('div', {className: 'gift_deleted', innerHTML: text}));
- 31. - hide(p.firstChild);
- 32. - if (window.Pagination && !curBox()) Pagination.recache(-1);
- 33. - }
- 34. - }, showProgress: function() {
- 35. - hide(el);
- 36. - show(el.parentNode.nextSibling);
- 37. - }, hideProgress: function() {
- 38. - hide(el.parentNode.nextSibling);
- 39. - show(el);
- 40. - }});
- 41. - },
- 42. - restoreGift: function(el, gift, giftData, opts) {
- 43. - opts = opts || {};
- 44. - ajax.post('al_gifts.php', {act: 'restore', mid: opts.mid, gift: giftData, hash: opts.hash}, {onDone: function() {
- 45. - var p = ge('gift' + gift);
- 46. - if (!p || !p.firstChild.nextSibling) return;
- 47. - re(p.firstChild.nextSibling);
- 48. - show(p.firstChild);
- 49. - }});
- 50. - },
- 51. - onReceiverChange: function() {
- 52. - var dd = cur.wdd && cur.wdd['gft_box_dd'];
- 53. - if (cur.giftsLeft) {
- 54. - var selected = 0, all = dd.selected;
- 55. - for (var i in all) {
- 56. - var d = (all[i][0] > 0) ? 1 : all[i][6];
- 57. - if (selected + d > cur.giftsLeft) {
- 58. - setTimeout(WideDropdown.deselect.pbind('gft_box_dd', all[i][0], false), 0);
- 59. - return false;
- 60. - } else {
- 61. - selected += d;
- 62. - }
- 63. - }
- 64. - }
- 65. -
- 66. - cur.sel = [];
- 67. - for (var i in dd.selected) {
- 68. - cur.sel.push(dd.selected[i]);
- 69. - }
- 70. - if (!cur.sel.length) {
- 71. - delete(cur.sel);
- 72. - }
- 73. - val('gft_box_to', getLang((cur.sel && cur.sel.length > 1) ? 'gifts_receivers' : 'gifts_receiver').replace(':', ''));
- 74. - },
- 75. - selectGift: function(num, votes, bonus, tip, left) {
- 76. - cur.gift = num;
- 77. - cur.giftsLeft = left;
- 78. - var box = showFastBox({
- 79. - title: false,
- 80. - width: 444,
- 81. - bodyStyle: 'border: 0px; padding: 0px;',
- 82. - onShow: function() {
- 83. - addClass(boxLayerBG, 'bg_dark');
- 84. - cur._noEscHide = true;
- 85. - },
- 86. - onClean: function() {
- 87. - if (window.WideDropdown) WideDropdown.deinit('gft_box_dd');
- 88. - cur._noEscHide = false;
- 89. - }
- 90. - }, '\
- 91. - <a class="fl_r tb_close" onclick="curBox().hide()">' + getLang('global_close') + '</a>\
- 92. - <div class="tb_title">' + getLang('gifts_send_gift') + '</div>\
- 93. - <div id="gifts_do_send_wrap">\
- 94. - ' + (left > 0 ? '<div class="info_msg" style="margin-bottom: 10px;">' + getLang('gifts_free_send_left', left) + '</div>' : '') + '\
- 95. - <div class="gs_box_wrap">\
- 96. - <img class="gs_box_img" src="images/gifts/256/' + num + '.jpg" />\
- 97. - </div>\
- 98. - <div class="gft_send">\
- 99. - <div class="gft_box_label" id="gft_box_to">' + getLang('gifts_receiver').replace(':', '') + '</div>\
- 100. - <div class="wdd clear_fix" id="gft_box_dd">\
- 101. - <div class="fl_r wdd_arr"></div>\
- 102. - <input type="text" class="wdd_text fl_l" placeholder="' + clean(getLang('gifts_choose_recipients')) + '" id="gft_box_inp" onfocus="this.focused=1" onblur="this.focused=\'\'" />\
- 103. - <br class="clear" />\
- 104. - </div>\
- 105. - <div class="fl_r" id="gs_warn"></div>\
- 106. - <div class="gft_box_label">' + getLang('gifts_your_message').replace(':', '') + '</div>\
- 107. - <div class="gft_box_text_wrap">\
- 108. - <textarea id="gs_msg" onchange="cur.giftCurrentMessage = this.value;" onkeydown="onCtrlEnter(event, Gifts.sendGift)" onkeyup="checkTextLength(cur.maxLen, this, \'gs_warn\', false, true)"></textarea>\
- 109. - </div>\
- 110. - <div class="gs_privacy">\
- 111. - <div class="checkbox' + (cur.giftCurrentPrivacy ? ' on' : '') + '" id="gift_receiver_only" onclick="checkbox(this); cur.giftCurrentPrivacy = isChecked(this);">\
- 112. - <div></div>' + getLang('gifts_receiver_only') + '\
- 113. - </div>\
- 114. - </div>\
- 115. - </div>\
- 116. - ' + (bonus > 0 ? '<div class="gs_bonus">' + getLang('gifts_rate_increase').replace('{gifts_count}', getLang(bonus, 'gifts_X_votes')) + '</div>' : '') + '\
- 117. - ' + (tip ? '<div class="gs_tip">' + tip + '</div>' : '') + '\
- 118. - </div>\
- 119. - ', getLang('box_send'), Gifts.sendGift, getLang('global_cancel'));
- 120. - setStyle(domNS(box.bodyNode), {border: '0px'});
- 121. -
- 122. - if (WideDropdown.init('gft_box_dd', {
- 123. - defaultItems: cur.users,
- 124. - items: cur.users,
- 125. - noResult: getLang('gifts_nobody_found'),
- 126. - introText: getLang('gifts_start_typing_recipient'),
- 127. - maxItems: cur.giftsLimit ? cur.giftsLimit : 100,
- 128. - onChange: function(act) {
- 129. - if (act == 1 && !inArray(cur.section, ['valentines', 'love', 'friends', 'birthday'])) { // added
- 130. - setTimeout(WideDropdown.focus.pbind('gft_box_dd'), 0);
- 131. - }
- 132. - setTimeout(Gifts.onReceiverChange, 0);
- 133. - },
- 134. - itemMark: function(item) {
- 135. - return intval(item[5]) ? 1 : 0;
- 136. - }
- 137. - })) {
- 138. - if (cur.sel) {
- 139. - for (var i in cur.sel) {
- 140. - WideDropdown.select('gft_box_dd', false, cur.sel[i]);
- 141. - }
- 142. - }
- 143. - }
- 144. -
- 145. - box.setControlsText(' ');
- 146. - Gifts.onReceiverChange();
- 147. - box.changed = true;
- 148. - autosizeSetup('gs_msg', {minHeight: 50, maxHeight: 150});
- 149. - if (!cur.sel || isArray(cur.sel) && !cur.sel.length) {
- 150. - WideDropdown.focus('gft_box_dd');
- 151. - } else {
- 152. - elfocus('gs_msg');
- 153. - }
- 154. - },
- 155. - sendGift: function() {
- 156. - var mids = [], dd = cur.wdd && cur.wdd['gft_box_dd'], sel = dd.selected;
- 157. - for (var i in sel) {
- 158. - if (typeof(sel[i][4]) == 'string' && sel[i][4] != '' && sel[i][4] != 'none') {
- 159. - mids.push(sel[i][4]);
- 160. - } else {
- 161. - mids.push(sel[i][0]);
- 162. - }
- 163. - }
- 164. - mids = mids.join(',');
- 165. - if (!mids) {
- 166. - return WideDropdown.focus('gft_box_dd');
- 167. - }
- 168. - var sendBtn = geByClass1('button_blue', curBox().bodyNode.nextSibling).firstChild;
- 169. - ajax.post('al_gifts.php', {
- 170. - act: 'do_send',
- 171. - text: ge('gs_msg').value,//(isVisible('gs_msg_wrap') ? ge('gs_msg').value : ''),
- 172. - mids: mids,
- 173. - number: cur.gift,
- 174. - type: isChecked('gift_receiver_only') ? 1 : 0,
- 175. - hash: cur.hash
- 176. - }, {
- 177. - onDone: function(data, text) {
- 178. - cur.giftCurrentMessage = '';
- 179. - updateMoney(data);
- 180. - curBox().hide();
- 181. - showDoneBox(text, {out: 1500})
- 182. - if (cur.giftsLeft) nav.reload();
- 183. - },
- 184. - showProgress: lockButton.pbind(sendBtn),
- 185. - hideProgress: unlockButton.pbind(sendBtn)
- 186. - });
- 187. - },
- 188. - initGiftsBox: function(box, opts) {
- 189. - box.setOptions({width: 620, bodyStyle: 'margin-top: 50px; padding: 0px', onShow: function() {
- 190. - if (cur.gftbxWasScroll) {
- 191. - boxLayerWrap.scrollTop = cur.gftbxWasScroll;
- 192. - cur.gftbxWasScroll = false;
- 193. - }
- 194. - addClass(boxLayerBG, 'bg_dark');
- 195. - }});
- 196. - if (opts.lang) {
- 197. - cur.lang = extend(cur.lang || {}, opts.lang);
- 198. - }
- 199. -
- 200. - if (cur.lSTL) re(cur.lSTL);
- 201. - if (cur.gftbxAddLnk) re(cur.gftbxAddLnk);
- 202. - extend(cur, {
- 203. - gftbxOffsets: cur.gftbxOffsets || {},
- 204. - gftbxPhCache: cur.gftbxPhCache || {},
- 205. - gftbxPhShown: cur.gftbxPhShown || {},
- 206. -
- 207. - gftbxAutoload: true,
- 208. - gftbxWasScroll: false,
- 209. - // gftbxHash: opts.hash,
- 210. - gftbxMid: opts.mid,
- 211. - gftbxId: box.tbId,
- 212. - gftbxAddLnk: ge('tb_'+box.tbId+'_prg').parentNode.insertBefore(se('<div class="gifts_add_lnk fl_r"><a href="/gifts?act=send" onclick="return (window.Profile ? Profile.showGiftBox(cur.oid, event) : nav.go(this, event));">' + getLang('gifts_send_gift') + '</a></div>'), ge('tb_'+box.tbId+'_prg')),
- 213. -
- 214. - lSTL: boxLayerWrap.appendChild(ce('div', {id: 'layer_stl', innerHTML: '<div id="layer_stl_bg" class="fixed"></div><div id="layer_stl_cl"></div><nobr id="layer_stl_text" class="fixed">' + getLang('global_to_top') + '</nobr>', el: box.bodyNode, onclick: cancelEvent, onmousedown: Gifts.lSTLDown, sc: Gifts.onGiftsScroll})),
- 215. - lSTLShown: 0,
- 216. - lSTLWas: 0,
- 217. - lSTLWasSet: 0
- 218. - });
- 219. - cur.gftbxOffsets[opts.tab] = opts.offset;
- 220. -
- 221. - ajax.preload('al_gifts.php', {
- 222. - act: 'box',
- 223. - tab: opts.tab,
- 224. - mid: opts.mid,
- 225. - offset: opts.offset
- 226. - }, opts.preload);
- 227. -
- 228. - if (!box.tbDeinit) {
- 229. - box.tbDeinit = function() {
- 230. - cur.gftbxMid = cur.gftbxOffsets = cur.gftbxPhShown = false;
- 231. - re(cur.lSTL);
- 232. - removeEvent(boxLayerWrap, 'scroll', Gifts.onGiftsScroll);
- 233. - }
- 234. - addEvent(boxLayerWrap, 'scroll', Gifts.onGiftsScroll);
- 235. - }
- 236. -
- 237. - if (cur.gftbxLoaded) cur.gftbxLoaded();
- 238. - onBodyResize();
- 239. - Gifts.onGiftsScroll();
- 240. - },
- 241. - moreGifts: function() {
- 242. - var t = curBox().tbCur;
- 243. - if (isVisible('gifts_more_prg' + t)) return;
- 244. - ajax.post('al_gifts.php', {act: 'box', tab: t, mid: cur.gftbxMid, offset: cur.gftbxOffsets[t]}, {
- 245. - onDone: function(rows, newOffset, needMore) {
- 246. - var el = ce('div', {innerHTML: rows}), cnt = ge('gifts_rows' + t);
- 247. - if (!cnt) return;
- 248. -
- 249. - for (var e = domFC(el); e; e = domFC(el)) {
- 250. - cnt.appendChild(e);
- 251. - }
- 252. - cur.gftbxOffsets[t] = newOffset;
- 253. - if (needMore) {
- 254. - Gifts.preloadGifts();
- 255. - } else {
- 256. - hide('gifts_more_link' + t);
- 257. - }
- 258. - }, showProgress: function() {
- 259. - hide('gifts_more_link' + t);
- 260. - show('gifts_more_prg' + t);
- 261. - }, hideProgress: function() {
- 262. - show('gifts_more_link' + t);
- 263. - hide('gifts_more_prg' + t);
- 264. - }, cache: 1
- 265. - });
- 266. - cur.gftbxAutoload = true;
- 267. - },
- 268. - preloadGifts: function() {
- 269. - var t = curBox().tbCur;
- 270. - ajax.post('al_gifts.php', {act: 'box', tab: t, mid: cur.gftbxMid, offset: cur.gftbxOffsets[t]}, {
- 271. - cache: 1
- 272. - });
- 273. - },
- 274. - lSTLDown: function(e) {
- 275. - e = e || window.event;
- 276. - if (checkEvent(e)) return;
- 277. -
- 278. - if (!__afterFocus) {
- 279. - var to = 0, st = boxLayerWrap.scrollTop;
- 280. - if (cur.lSTLWasSet && cur.lSTLWas) {
- 281. - to = cur.lSTLWas;
- 282. - cur.lSTLWas = 0;
- 283. - } else {
- 284. - cur.lSTLWas = st;
- 285. - }
- 286. - boxLayerWrap.scrollTop = to;
- 287. - }
- 288. - return cancelEvent(e);
- 289. - },
- 290. - onGiftsScroll: function() {
- 291. - var st = boxLayerWrap.scrollTop, mx = 200, vis = cur.lSTLWas || (st > mx), o = 0;
- 292. - cur.lSTL.style.marginTop = st + 'px';
- 293. - if (!vis) {
- 294. - if (cur.lSTLShown !== 0) {
- 295. - hide(cur.lSTL);
- 296. - cur.lSTLShown = 0;
- 297. - }
- 298. - } else {
- 299. - if (cur.lSTLShown !== 1) {
- 300. - show(cur.lSTL);
- 301. - cur.lSTLShown = 1;
- 302. - }
- 303. - if (cur.lSTLWas && st > 500) {
- 304. - cur.lSTLWas = 0;
- 305. - }
- 306. - if (st > mx) {
- 307. - o = (st - mx) / mx;
- 308. - if (cur.lSTLWasSet) {
- 309. - cur.lSTLWasSet = 0;
- 310. - val(domLC(cur.lSTL), getLang('global_to_top'));
- 311. - removeClass(domLC(cur.lSTL), 'down');
- 312. - }
- 313. - } else {
- 314. - o = (mx - st) / mx;
- 315. - if (cur.lSTLWas) {
- 316. - if (!cur.lSTLWasSet) {
- 317. - cur.lSTLWasSet = 1;
- 318. - val(domLC(cur.lSTL), '');
- 319. - addClass(domLC(cur.lSTL), 'down');
- 320. - }
- 321. - }
- 322. - }
- 323. - }
- 324. - setStyle(cur.lSTL, {opacity: Math.min(Math.max(o, 0), 1)});
- 325. - if (!cur.gftbxAutoload) return;
- 326. - var bt = lastWindowHeight, objMore = ge('gifts_more_link' + curBox().tbCur);
- 327. - if (isVisible(objMore) && (bt > getXY(objMore, true)[1])) {
- 328. - objMore.click();
- 329. - }
- 330. - }
- 331. - }
- 332. -
- 333. - try{stManager.done('gifts.js');}catch(e){}
- ------
Advertisement
Add Comment
Please, Sign In to add comment