Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Файл - ads.css (Старый размер - 39565 | Новый - 0):
- 0. - #ads_css { display: none; }
- 1. -
- 2. - /* ------- */
- 3. - /* General */
- 4. - /* ------- */
- 5. -
- 6. - ul.ads_listing {
- 7. - padding: 0 0 0 30px;
- 8. - margin: 0 0 15px 0;
- 9. - }
- 10. - ul.ads_listing li {
- 11. - list-style: square;
- 12. - color: #758EAC;
- 13. - line-height: 160%;
- 14. - }
- 15. - ul.ads_listing li span {
- 16. - color: #000000;
- 17. - }
- 18. -
- 19. - a .ads_sub_link:hover {
- 20. - text-decoration: underline;
- 21. - }
- 22. -
- 23. - .ads_h2_add {
- 24. - font-weight: normal;
- 25. - font-size: 11px;
- 26. - padding-top: 0.185em;
- 27. - }
- 28. - .font_medium .ads_h2_add {
- 29. - font-size: 12px;
- 30. - padding-top: 0.14em;
- 31. - }
- 32. -
- 33. - .ads_gradient_progress_wrap {
- 34. - height: 18px;
- 35. - margin: 0 auto;
- 36. - background: #FFFFFF;
- 37. - border: 1px solid #CCCCCC;
- 38. - }
- 39. -
- 40. - .ads_gradient_progress {
- 41. - height: 18px;
- 42. - background: #597DA3 url(/images/progress_grad.gif) repeat;
- 43. - border: 1px solid #45688E;
- 44. - margin: -1px;
- 45. - }
- 46. -
- 47. - /* ---- */
- 48. - /* Page */
- 49. - /* ---- */
- 50. -
- 51. - #ads_page_wrap2 {
- 52. - border: 1px solid #EBF0F4;
- 53. - border-top: 0;
- 54. - width: 791px;
- 55. - float: right;
- 56. - }
- 57. -
- 58. - #ads_page_wrap1 {
- 59. - border: 1px solid #DAE1E8;
- 60. - border-top: 0;
- 61. - width: 789px;
- 62. - overflow: hidden;
- 63. - }
- 64. -
- 65. - #ads_page {
- 66. - padding: 20px;
- 67. - }
- 68. - #ads_page.ads_page_no_padding {
- 69. - padding: 0;
- 70. - }
- 71. -
- 72. - #ads_page_top {
- 73. - padding-top: 10px;
- 74. - }
- 75. -
- 76. - .ads_page_extra_wide #ads_page_wrap2,
- 77. - .ads_page_extra_wide #ads_page_wrap1 {
- 78. - width: auto;
- 79. - }
- 80. -
- 81. - .ads_page_extra_wide #ads_page_wrap2 {
- 82. - float: none;
- 83. - }
- 84. -
- 85. - #ads_page_bottom_info {
- 86. - border-top: 1px solid #DAE1E8;
- 87. - background-color: #F7F7F7;
- 88. - text-align: center;
- 89. - padding: 6px 20px;
- 90. - color: #777777;
- 91. - }
- 92. -
- 93. - .ads_page_small {
- 94. - padding: 0 60px;
- 95. - }
- 96. -
- 97. - /* ----- */
- 98. - /* Title */
- 99. - /* ----- */
- 100. -
- 101. - #ads_page_title {
- 102. - background-color: #E9EDF1;
- 103. - padding: 7px 10px;
- 104. - margin: 0;
- 105. - font-weight: bold;
- 106. - color: #607387;
- 107. - line-height: 140%;
- 108. - }
- 109. -
- 110. - #ads_page_title h1 {
- 111. - font-size: 1em;
- 112. - overflow: hidden;
- 113. - padding: 0;
- 114. - margin: 0;
- 115. - }
- 116. -
- 117. - #ads_page_title h1 a {
- 118. - color: #2B587A;
- 119. - }
- 120. -
- 121. - #ads_page_title b {
- 122. - color: #AAB7C5;
- 123. - float: right;
- 124. - }
- 125. -
- 126. - /* --------------- */
- 127. - /* Main navigation */
- 128. - /* --------------- */
- 129. -
- 130. - .ads_page_extra_wide #ads_navigation {
- 131. - display: none;
- 132. - }
- 133. -
- 134. - #ads_navigation {
- 135. - width: 150px;
- 136. - padding: 12px 0 12px 0;
- 137. - word-wrap: break-word;
- 138. - }
- 139. -
- 140. - #ads_navigation .edit_button_wrap {
- 141. - padding-bottom: 10px;
- 142. - }
- 143. -
- 144. - #ads_navigation.ads_nav .nav {
- 145. - max-width: 128px;
- 146. - }
- 147. -
- 148. - #ads_navigation a:hover {
- 149. - text-decoration: none;
- 150. - }
- 151. -
- 152. - /* ------------------------------ */
- 153. - /* Main navigation - offices menu */
- 154. - /* ------------------------------ */
- 155. -
- 156. - #ads_navigation.ads_nav #ads_navigation_offices_menu.nav {
- 157. - padding-right: 2px;
- 158. - width: 137px;
- 159. - max-width: 137px;
- 160. - }
- 161. -
- 162. - #ads_navigation.ads_nav #ads_navigation_offices_menu.nav .dd_link {
- 163. - display: block;
- 164. - }
- 165. -
- 166. - #ads_navigation.ads_nav #ads_navigation_offices_menu.nav .dd_link #ads_navigation_offices_menu_text_wrap {
- 167. - display: block;
- 168. - overflow: hidden;
- 169. - white-space: nowrap;
- 170. - font-size: 0; /* Remove extra margin from inline-block */
- 171. - }
- 172. -
- 173. - #ads_navigation.ads_nav #ads_navigation_offices_menu.nav .dd_link #ads_navigation_offices_menu_text {
- 174. - display: inline-block;
- 175. - overflow: hidden;
- 176. - white-space: nowrap;
- 177. - font-size: 11px; /* Remove extra margin from inline-block */
- 178. - }
- 179. - .font_medium #ads_navigation.ads_nav #ads_navigation_offices_menu.nav .dd_link #ads_navigation_offices_menu_text {
- 180. - font-size: 12px;
- 181. - }
- 182. -
- 183. - .dd_menu.ads_navigation_dd_menu_header_wrap {
- 184. - margin: 4px 0 0 7px;
- 185. - }
- 186. -
- 187. - .dd_menu.ads_navigation_dd_menu_header_wrap .dd_menu_header {
- 188. - width: 148px;
- 189. - }
- 190. -
- 191. - .dd_menu.ads_navigation_dd_menu_header_wrap .dd_menu_header div {
- 192. - background-position: right -14px;
- 193. - *background-position: right -13px;
- 194. - }
- 195. -
- 196. - .dd_menu.ads_navigation_dd_menu_header_wrap .dd_menu_header div #ads_navigation_dd_menu_header_text {
- 197. - padding: 1px 0 1px 4px;
- 198. - display: block;
- 199. - overflow: hidden;
- 200. - white-space: nowrap;
- 201. - }
- 202. -
- 203. - .dd_menu.ads_navigation_dd_menu_header_wrap .dd_menu_body .ads_office_name_wrap {
- 204. - display: inline-block;
- 205. - overflow: hidden;
- 206. - max-width: 300px;
- 207. - vertical-align: top;
- 208. - }
- 209. -
- 210. - /* ---------------------- */
- 211. - /* Main navigation - news */
- 212. - /* ---------------------- */
- 213. -
- 214. - .ads_naviagation_news {
- 215. - padding: 20px 0 5px 11px;
- 216. - }
- 217. -
- 218. - .ads_naviagation_news .news_title {
- 219. - font-weight: bold;
- 220. - color: #2B587A;
- 221. - padding-bottom: 10px;
- 222. - }
- 223. -
- 224. - .ads_naviagation_news ul {
- 225. - padding: 0;
- 226. - margin: 0;
- 227. - list-style-type: none;
- 228. - color: #758EAC;
- 229. - }
- 230. -
- 231. - .ads_naviagation_news li {
- 232. - padding-bottom: 10px;
- 233. - }
- 234. -
- 235. - .ads_naviagation_news span {
- 236. - color: #666666;
- 237. - font-size: 0.91em;
- 238. - }
- 239. -
- 240. - #ads_navigation .ads_naviagation_news a:hover {
- 241. - text-decoration: underline;
- 242. - }
- 243. -
- 244. - /* ---------- */
- 245. - /* Navigation */
- 246. - /* ---------- */
- 247. -
- 248. - .ads_nav .nav {
- 249. - padding: 6px 11px 7px 11px;
- 250. - display: block;
- 251. - overflow: hidden;
- 252. - }
- 253. -
- 254. - .ads_nav .nav:hover {
- 255. - background-color: #E1E7ED;
- 256. - text-decoration: none;
- 257. - }
- 258. -
- 259. - .ads_nav .nav_selected,
- 260. - .ads_nav .nav_selected:hover {
- 261. - background-color: #6186AD;
- 262. - color: white;
- 263. - }
- 264. -
- 265. - .ads_nav .nav_separator {
- 266. - border-bottom: 1px solid #D3DBE1;
- 267. - height: 1px;
- 268. - overflow: hidden;
- 269. - margin: 7px 0px 8px 0;
- 270. - }
- 271. -
- 272. - .ads_nav .nav_wf {
- 273. - padding-top: 0!important;
- 274. - padding-bottom: 0!important;
- 275. - }
- 276. - .ads_nav .nav_label {
- 277. - padding: 6px 0 7px 0;
- 278. - }
- 279. - .ads_nav .nav_feature {
- 280. - margin: 3px -6px 0 0;
- 281. - padding: 3px 5px 4px;
- 282. - background-color: #E1E7ED;
- 283. - color: #65819E;
- 284. - -moz-border-radius: 2px;
- 285. - -webkit-border-radius: 2px;
- 286. - -khtml-border-radius: 2px;
- 287. - border-radius: 2px;
- 288. - font-weight: bold;
- 289. - vertical-align: top;
- 290. - }
- 291. -
- 292. - /* ---- */
- 293. - /* Tabs */
- 294. - /* ---- */
- 295. -
- 296. - .ads_tabs_filters {
- 297. - background-color: #F7F7F7;
- 298. - border-bottom: 1px solid #DAE1E8;
- 299. - padding: 10px 10px 5px 10px;
- 300. - }
- 301. - .ads_tabs_filters.separate {
- 302. - border-top: 1px solid #DAE1E8;
- 303. - }
- 304. - .ads_round_tab_wrap {
- 305. - padding: 0 5px 5px 0;
- 306. - text-align: center;
- 307. - }
- 308. - .ads_round_tab_wrap .round_tab.disabled:hover,
- 309. - .ads_round_tab_wrap .round_tab.label:hover {
- 310. - background-color: transparent;
- 311. - cursor: default;
- 312. - }
- 313. - .ads_round_tab_wrap .round_tab.label {
- 314. - color: #555555;
- 315. - }
- 316. - .ads_round_tabs_period_day .round_tab {
- 317. - width: 100px;
- 318. - }
- 319. - .ads_round_tabs_period_week .round_tab {
- 320. - width: 180px;
- 321. - }
- 322. - .ads_round_tabs_period_month .round_tab {
- 323. - width: 100px;
- 324. - }
- 325. -
- 326. - /* ----- */
- 327. - /* Table */
- 328. - /* ----- */
- 329. -
- 330. - .ads_table {
- 331. - border-collapse: collapse;
- 332. - }
- 333. - .ads_table.wide {
- 334. - width: 100%;
- 335. - }
- 336. -
- 337. - .ads_table tr.ads_table_row {
- 338. - border-left: 1px solid #E9EDF0;
- 339. - border-right: 1px solid #E9EDF0;
- 340. - }
- 341. - .ads_table tr.ads_table_row.header {
- 342. - border: 1px solid #E9EDF0;
- 343. - background-color: #E9EDF0;
- 344. - }
- 345. - .ads_table tr.ads_table_row.last {
- 346. - border-bottom: 1px solid #E9EDF0;
- 347. - }
- 348. - .ads_table tr.ads_table_row.even {
- 349. - background-color: #F5F7F7;
- 350. - }
- 351. - .ads_table tr.ads_table_row.result {
- 352. - background-color: #F0F3F5;
- 353. - }
- 354. -
- 355. - .ads_table th.ads_table_cell {
- 356. - color: #587183;
- 357. - font-weight: bold;
- 358. - }
- 359. -
- 360. - .ads_table th.ads_table_cell,
- 361. - .ads_table td.ads_table_cell {
- 362. - padding: 0 8px;
- 363. - vertical-align: middle;
- 364. - height: 32px;
- 365. - }
- 366. - .ads_table.small th.ads_table_cell,
- 367. - .ads_table.small td.ads_table_cell {
- 368. - height: 16px;
- 369. - }
- 370. -
- 371. - .ads_table th.ads_table_cell.first,
- 372. - .ads_table td.ads_table_cell.first {
- 373. - padding-left: 10px;
- 374. - }
- 375. - .ads_table th.ads_table_cell.last,
- 376. - .ads_table td.ads_table_cell.last {
- 377. - padding-right: 10px;
- 378. - }
- 379. - .ads_table.wide th.ads_table_cell.left_wide,
- 380. - .ads_table.wide td.ads_table_cell.left_wide {
- 381. - padding-left: 2px;
- 382. - }
- 383. - .ads_table.wide th.ads_table_cell.right_wide,
- 384. - .ads_table.wide td.ads_table_cell.right_wide {
- 385. - padding-right: 2px;
- 386. - }
- 387. - .ads_table.wide th.ads_table_cell.nowrap,
- 388. - .ads_table.wide td.ads_table_cell.nowrap {
- 389. - white-space: nowrap;
- 390. - }
- 391. -
- 392. - .ads_table th.ads_table_cell.sort:hover {
- 393. - background-color: #F2F4F5;
- 394. - cursor: pointer;
- 395. - }
- 396. -
- 397. - .ads_table td.ads_table_cell.shower {
- 398. - color: #587183;
- 399. - font-weight: bold;
- 400. - cursor: pointer;
- 401. - text-align: center;
- 402. - border-top: 1px solid #E9EDF0;
- 403. -
- 404. - -webkit-transition: all 200ms ease-out;
- 405. - -moz-transition: all 200ms ease-out;
- 406. - -o-transition: all 200ms ease-out;
- 407. - transition: all 200ms ease-out;
- 408. - }
- 409. - .ads_table td.ads_table_cell.shower:hover {
- 410. - background-color: #E1E7EB;
- 411. - }
- 412. -
- 413. - .ads_table td.ads_table_cell_empty {
- 414. - line-height: 200%;
- 415. - text-align: center;
- 416. - background-color: #F7F7F7;
- 417. - color: #777777;
- 418. - padding: 20px 50px;
- 419. - }
- 420. - .ads_table.small td.ads_table_cell_empty {
- 421. - padding: 5px 10px;
- 422. - }
- 423. -
- 424. - /* ------------ */
- 425. - /* Intro - main */
- 426. - /* ------------ */
- 427. -
- 428. - .ads_intro_page,
- 429. - .ads_intro_section_title {
- 430. - line-height: 160%;
- 431. - }
- 432. -
- 433. - .ads_intro_title,
- 434. - .ads_intro_section_title {
- 435. - color: #5c7b9b;
- 436. - }
- 437. -
- 438. - .ads_intro_subsection_title,
- 439. - .ads_intro_news_title {
- 440. - color: #4d7199;
- 441. - }
- 442. -
- 443. - .ads_intro_title {
- 444. - font-size: 1.3em;
- 445. - font-weight: bold;
- 446. - padding-bottom: 16px;
- 447. - }
- 448. -
- 449. - .ads_intro_section_title {
- 450. - font-size: 1.2em;
- 451. - font-weight: bold;
- 452. - padding: 8px 10px 0 10px;
- 453. - }
- 454. -
- 455. - .ads_intro_subsection_title {
- 456. - font-size: 1.2em;
- 457. - font-weight: bold;
- 458. - padding-bottom: 8px;
- 459. - }
- 460. -
- 461. - .ads_intro_news_title {
- 462. - font-size: 1.2em;
- 463. - font-weight: bold;
- 464. - border-bottom: 1px solid #dae1e8;
- 465. - display: block;
- 466. - }
- 467. - .ads_intro_news_title:hover {
- 468. - text-decoration: none;
- 469. - }
- 470. -
- 471. - .ads_intro_subsection_text {
- 472. - color: #808080;
- 473. - }
- 474. -
- 475. - .ads_intro_header_wrap2 {
- 476. - height: 380px;
- 477. - }
- 478. - .ads_intro_header_wrap1 {
- 479. - height: 280px;
- 480. - background-color: #edf1f5;
- 481. - padding: 22px 40px 0 40px;
- 482. - position: relative;
- 483. - }
- 484. -
- 485. - .ads_intro_text {
- 486. - width: 440px;
- 487. - }
- 488. -
- 489. - .ads_intro_main_image {
- 490. - background-image: url(/images/ads_intro_main.png);
- 491. - background-size: 130px 130px;
- 492. - width: 130px;
- 493. - height: 130px;
- 494. - position: absolute;
- 495. - right: 70px;
- 496. - top: 30px;
- 497. - }
- 498. - .is_2x .ads_intro_main_image {
- 499. - background-image: url(/images/ads_intro_main_2x.png);
- 500. - }
- 501. -
- 502. - .ads_intro_sections {
- 503. - margin-right: -100px;
- 504. - top: 190px;
- 505. - position: absolute;
- 506. - }
- 507. -
- 508. - .ads_intro_section_button {
- 509. - width: 188px;
- 510. - height: 162px;
- 511. - background-color: #f4f6f8;
- 512. - border: 1px solid #e1e6eb;
- 513. - border-bottom: 2px solid #dce1e6;
- 514. - display: inline-block;
- 515. - margin-right: 43px;
- 516. - -moz-border-radius: 3px;
- 517. - -webkit-border-radius: 3px;
- 518. - -khtml-border-radius: 3px;
- 519. - border-radius: 3px;
- 520. - text-align: center;
- 521. - position: relative;
- 522. - top: 0;
- 523. -
- 524. - -webkit-transition: all 200ms ease-out;
- 525. - -moz-transition: all 200ms ease-out;
- 526. - -o-transition: all 200ms ease-out;
- 527. - transition: all 200ms ease-out;
- 528. - }
- 529. - .ads_intro_section_button:hover {
- 530. - text-decoration: none;
- 531. - top: -8px;
- 532. - }
- 533. -
- 534. - .ads_intro_section_image {
- 535. - width: 95px;
- 536. - height: 82px;
- 537. - background-size: 95px auto;
- 538. - background-image: url(/images/ads_intro_icons.png);
- 539. - display: inline-block;
- 540. - margin-top: 16px;
- 541. - }
- 542. - .is_2x .ads_intro_section_image {
- 543. - background-image: url(/images/ads_intro_icons_2x.png);
- 544. - }
- 545. - .ads_intro_section_button2 .ads_intro_section_image {
- 546. - background-position: 0 -82px;
- 547. - }
- 548. - .ads_intro_section_button3 .ads_intro_section_image {
- 549. - background-position: 0 -164px;
- 550. - }
- 551. -
- 552. - .ads_intro_section_label {
- 553. - width: 60px;
- 554. - height: 60px;
- 555. - background-size: 60px auto;
- 556. - position: absolute;
- 557. - left: -2px;
- 558. - top: -2px;
- 559. - }
- 560. - .ads_intro_section_label.label_ru {
- 561. - background-image: url(/images/ads_intro_label_new_ru.png);
- 562. - }
- 563. - .is_2x .ads_intro_section_label.label_ru {
- 564. - background-image: url(/images/ads_intro_label_new_ru_2x.png);
- 565. - }
- 566. - .ads_intro_section_label.label_en {
- 567. - background-image: url(/images/ads_intro_label_new_en.png);
- 568. - }
- 569. - .is_2x .ads_intro_section_label.label_en {
- 570. - background-image: url(/images/ads_intro_label_new_en_2x.png);
- 571. - }
- 572. - .ads_intro_section_label.label_ua {
- 573. - background-image: url(/images/ads_intro_label_new_ua.png);
- 574. - }
- 575. - .is_2x .ads_intro_section_label.label_ua {
- 576. - background-image: url(/images/ads_intro_label_new_ua_2x.png);
- 577. - }
- 578. -
- 579. - .ads_intro_subsections {
- 580. - padding: 3px 25px 20px 20px;
- 581. - display: inline-block;
- 582. - vertical-align: top;
- 583. - }
- 584. - .ads_intro_subsection {
- 585. - padding: 15px 20px;
- 586. - display: block;
- 587. - width: 423px;
- 588. - }
- 589. - .ads_intro_subsection:hover {
- 590. - text-decoration: none;
- 591. - background: #f7f7f7;
- 592. - }
- 593. -
- 594. - .ads_intro_news {
- 595. - width: 200px;
- 596. - padding: 18px 0 20px 0;
- 597. - display: inline-block;
- 598. - }
- 599. - .ads_intro_news_widget_wrap {
- 600. - margin-left: -10px;
- 601. - padding-top: 8px;
- 602. - height: 240px;
- 603. - overflow: hidden;
- 604. - }
- 605. - .ads_intro_news_all {
- 606. - display: block;
- 607. - text-align: center;
- 608. - padding: 4px 0;
- 609. - }
- 610. - .ads_intro_news_all:hover {
- 611. - text-decoration: none;
- 612. - background-color: #f7f7f7;
- 613. - }
- 614. -
- 615. - /* ----------- */
- 616. - /* Intro - box */
- 617. - /* ----------- */
- 618. -
- 619. - .wk_ads_intro .wk_wiki_content {
- 620. - font-size: 1em;
- 621. - line-height: 100%;
- 622. - }
- 623. - .wk_ads_intro #wk_content {
- 624. - width: 564px;
- 625. - }
- 626. - .wk_ads_intro #wk_summary {
- 627. - width: 400px;
- 628. - }
- 629. -
- 630. - .ads_intro_box.ads_text,
- 631. - .ads_intro_box .ads_text {
- 632. - line-height: 160%;
- 633. - }
- 634. -
- 635. - .ads_intro_box.ads_text_big {
- 636. - font-size: 1.09em;
- 637. - }
- 638. -
- 639. - .ads_intro_box h4 {
- 640. - margin-bottom: 10px;
- 641. - }
- 642. - .ads_intro_box .listing {
- 643. - margin-bottom: 30px;
- 644. - }
- 645. -
- 646. - .ads_intro_box_center {
- 647. - text-align: center;
- 648. - }
- 649. -
- 650. - .ads_intro_box_targeting_image,
- 651. - .ads_intro_box_posts_image,
- 652. - .ads_intro_box_offers_image {
- 653. - background-size: 160px 160px;
- 654. - width: 160px;
- 655. - height: 160px;
- 656. - display: inline-block;
- 657. - margin: 25px 0;
- 658. - }
- 659. - .ads_intro_box_targeting_image {
- 660. - margin-top: 0;
- 661. - }
- 662. - .ads_intro_box_targeting_image {
- 663. - background-image: url(/images/ads_intro_targeting.png);
- 664. - }
- 665. - .is_2x .ads_intro_box_targeting_image {
- 666. - background-image: url(/images/ads_intro_targeting_2x.png);
- 667. - }
- 668. - .ads_intro_box_posts_image {
- 669. - background-image: url(/images/join/ads_union.png);
- 670. - }
- 671. - .is_2x .ads_intro_box_posts_image {
- 672. - background-image: url(/images/join/ads_union_2x.png);
- 673. - }
- 674. - .ads_intro_box_offers_image {
- 675. - background-image: url(/images/ads_intro_offers.png);
- 676. - }
- 677. - .is_2x .ads_intro_box_offers_image {
- 678. - background-image: url(/images/ads_intro_offers_2x.png);
- 679. - }
- 680. -
- 681. - .ads_intro_box_targeting_office {
- 682. - margin-top: 10px;
- 683. - display: inline-block;
- 684. - }
- 685. -
- 686. - /* ------ */
- 687. - /* Office */
- 688. - /* ------ */
- 689. -
- 690. - .ads_create_button_office {
- 691. - float: right;
- 692. - position: relative;
- 693. - width: 0;
- 694. - }
- 695. - .ads_create_button_office .edit_button_wrap {
- 696. - position: absolute;
- 697. - right: 0;
- 698. - }
- 699. -
- 700. - /* Other */
- 701. -
- 702. - /* --- */
- 703. - /* OLD */
- 704. - /* --- */
- 705. -
- 706. - /* From rustyle.css */
- 707. -
- 708. - /* Uses in paginated_table.js */
- 709. - .ads_lite_cb {
- 710. - background: transparent url(/images/icons/check_lt.gif) 0px 0px no-repeat;
- 711. - line-height: 0.81em;
- 712. - vertical-align: baseline;
- 713. - padding: 0px 0px 1px 20px;
- 714. - cursor: pointer;
- 715. - }
- 716. - .ads_lite_cb:hover {
- 717. - background-position: 0px -32px;
- 718. - text-decoration: none;
- 719. - }
- 720. - .ads_lite_cb.on {
- 721. - background-position: 0px -16px;
- 722. - }
- 723. - .ads_lite_cb.on:hover {
- 724. - background-position: 0px -48px;
- 725. - }
- 726. -
- 727. - .ads_mass_act_container {
- 728. - text-align: right;
- 729. - }
- 730. - .ads_mass_act_container div {
- 731. - margin-right: 8px;
- 732. - margin-bottom: 5px;
- 733. - }
- 734. - .ads_mass_act_container button {
- 735. - height: 21px;
- 736. - line-height: 0.9em;
- 737. - padding: 4px 10px 4px;
- 738. - }
- 739. - .ads_search_cell {
- 740. - width: 140px;
- 741. - }
- 742. - .ads_search_cell div.pt_search_container {
- 743. - margin: 0px -3px 5px -3px;
- 744. - }
- 745. -
- 746. - div.ads_selecting_subclasses {
- 747. - margin-bottom: 4px;
- 748. - }
- 749. -
- 750. - .dd_menu_header.ads_dd_wide.ads_dd_header_popup div {
- 751. - background: url(/images/flydead.gif) no-repeat right 6px #FFFFFF;
- 752. - padding-right: 17px;
- 753. - border: 1px solid #FFFFFF;
- 754. - color: #2B587A;
- 755. - font-weight: normal;
- 756. - text-decoration: none;
- 757. - }
- 758. -
- 759. - .dd_menu_header.ads_dd_wide div {
- 760. - background: #5e82a8 url(/images/flydead.gif) no-repeat right -12px;
- 761. - width: 106px;
- 762. - }
- 763. -
- 764. - .dd_menu_body.ads_dd_wide .dd_menu_rows a {
- 765. - height: 20px;
- 766. - }
- 767. - .dd_menu_body.ads_dd_wide .dd_menu_rows a .ads_status_image_span {
- 768. - margin: 4px 5px -2px -1px;
- 769. - }
- 770. -
- 771. - .dd_menu_header.ads_dd_wide div .ads_status_image_span {
- 772. - margin: 4px 5px -1px -1px;
- 773. - }
- 774. - .dd_menu_header.ads_dd_wide div {
- 775. - line-height: 1.45em;
- 776. - }
- 777. -
- 778. - td.paginated_table_cell.column_status_view {
- 779. - padding-left: 10px;
- 780. - }
- 781. -
- 782. - .ads_status_selector_box {
- 783. - display: block;
- 784. - margin: 0px auto;
- 785. - width: 20px;
- 786. - height: 20px;
- 787. - }
- 788. -
- 789. - .ads_status_selector_box.pnt {
- 790. - cursor: pointer;
- 791. - }
- 792. -
- 793. - .ads_status_selector_box.pnt:hover {
- 794. - background-color: #E1E7ED;
- 795. - border-radius: 3px;
- 796. - -moz-border-radius: 3px;
- 797. - }
- 798. -
- 799. - #ads_unions_content .table_label {
- 800. - min-width: 150px;
- 801. - max-width: 180px;
- 802. - color: rgb(102, 102, 102);
- 803. - padding: 0 10px 7px 0;
- 804. - vertical-align: top;
- 805. - word-wrap: break-word;
- 806. - }
- 807. - #ads_unions_content .table_value {
- 808. - padding: 0 0 7px 0;
- 809. - vertical-align: top;
- 810. - word-wrap: break-word;
- 811. - }
- 812. -
- 813. - #ads_unions_content.ad_help {
- 814. - padding: 0;
- 815. - }
- 816. -
- 817. - #ads_unions_content {
- 818. - vertical-align: top;
- 819. - }
- 820. -
- 821. - #ads_union_children,
- 822. - #ads_unions_budget,
- 823. - #ads_unions_budget_posts {
- 824. - padding-top: 20px;
- 825. - }
- 826. -
- 827. - #ads_union_children_graph {
- 828. - padding: 30px 0 15px 0;
- 829. - }
- 830. -
- 831. - #ads_union_children .row_div.control_label {
- 832. - padding-left: 0;
- 833. - }
- 834. -
- 835. - .ads_unions_box td.label {
- 836. - color: #777;
- 837. - padding: 5px 10px 5px 0px;
- 838. - text-align: right;
- 839. - }
- 840. - .ads_unions_box td.labeled {
- 841. - padding: 2px 0;
- 842. - }
- 843. - .ads_unions_box td.labeled_info {
- 844. - padding: 2px 0 2px 5px;
- 845. - }
- 846. -
- 847. - .ads_unions_box input {
- 848. - width: 150px;
- 849. - }
- 850. -
- 851. - .ads_unions_list table {
- 852. - border-collapse: collapse;
- 853. - border-left: 1px solid;
- 854. - border-right: 1px solid;
- 855. - width: 100%;
- 856. - }
- 857. -
- 858. - .ads_unions_list th,
- 859. - .ads_unions_list td {
- 860. - height: 32px;
- 861. - vertical-align: middle;
- 862. - }
- 863. -
- 864. - .ads_unions_list .checkbox_container td {
- 865. - height: 20px;
- 866. - }
- 867. -
- 868. - .ads_unions_list th {
- 869. - text-align: right;
- 870. - background-color: rgb(227, 233, 238);
- 871. - border: 1px solid;
- 872. - padding: 0;
- 873. - }
- 874. - .ads_table_header th th,
- 875. - .ads_table_header th th * {
- 876. - background-color: transparent !important;
- 877. - }
- 878. -
- 879. - .ads_unions_list th,
- 880. - .ads_unions_list th * {
- 881. - color: rgb(81, 103, 122);
- 882. - }
- 883. -
- 884. - .ads_unions_list td {
- 885. - text-align: right;
- 886. - }
- 887. -
- 888. - .ads_unions_list .column_date_view,
- 889. - .ads_unions_list .column_date_view *,
- 890. - .ads_unions_list .column_action_view,
- 891. - .ads_unions_list .column_action_view *,
- 892. - .ads_unions_list .column_access_view,
- 893. - .ads_unions_list .column_access_view *,
- 894. - .ads_unions_list .column_name_view,
- 895. - .ads_unions_list .column_name_view *,
- 896. - .ads_unions_list .column_name,
- 897. - .ads_unions_list .column_name *,
- 898. - .ads_unions_list .column_status,
- 899. - .ads_unions_list .column_status * {
- 900. - text-align: left;
- 901. - }
- 902. -
- 903. - .ads_unions_list td.column_name_view {
- 904. - max-width: 160px;
- 905. - }
- 906. -
- 907. - .ads_unions_list .table_footer td {
- 908. - background-color: rgb(246, 247, 249);
- 909. - border-top: 1px solid rgb(211, 219, 225);
- 910. - border-bottom: 1px solid rgb(211, 219, 225);
- 911. - }
- 912. -
- 913. - .ads_unions_list table,
- 914. - .ads_unions_list th,
- 915. - .ads_unions_list td {
- 916. - border-color: rgb(211, 219, 225);
- 917. - }
- 918. -
- 919. - .ads_unions_list th * {
- 920. - border: 0;
- 921. - padding: 0;
- 922. - height: auto;
- 923. - }
- 924. -
- 925. - .ads_unions_list th table {
- 926. - height: 100%;
- 927. - border: 0;
- 928. - }
- 929. -
- 930. - .ads_unions_list tr.ads_table_header th th {
- 931. - border-left: 1px solid rgb(239, 242, 245);
- 932. - white-space: nowrap;
- 933. - }
- 934. -
- 935. - .ads_unions_list tr.ads_table_header th.first_table_header,
- 936. - .ads_unions_list tr.ads_table_header th.first_table_header * {
- 937. - border-left: 0 none;
- 938. - }
- 939. -
- 940. - .ads_unions_list th th,
- 941. - .ads_unions_list td {
- 942. - padding: 0 8px;
- 943. - }
- 944. -
- 945. - .ads_unions_list th.first_table_header th,
- 946. - .ads_unions_list td.first_table_column {
- 947. - padding-left: 10px;
- 948. - }
- 949. -
- 950. - .ads_unions_list th.last_table_header th,
- 951. - .ads_unions_list td.last_table_column {
- 952. - padding-right: 10px;
- 953. - }
- 954. -
- 955. - .ads_unions_list td.even_row {
- 956. - background-color: #F0F2F4;
- 957. - }
- 958. -
- 959. - .ads_unions_table {
- 960. - margin-top: 7px;
- 961. - }
- 962. -
- 963. - .paginated_table .ads_unions_table {
- 964. - margin-top: 0px;
- 965. - }
- 966. -
- 967. - .ads_unions_list td.column_day_limit_view a,
- 968. - .ads_unions_list td.column_all_limit_view a,
- 969. - .ads_unions_list td.column_cost_per_click_view a {
- 970. - border-bottom: 1px dashed #2B587A;
- 971. - text-decoration: none;
- 972. - }
- 973. -
- 974. - tr.ads_union_empty_row td.ads_union_empty_cell {
- 975. - height: auto;
- 976. - }
- 977. -
- 978. - tr.ads_union_empty_row td.ads_union_empty_cell {
- 979. - text-align: center !important;
- 980. - color: #666666;
- 981. - line-height: 150%;
- 982. - background-color: #F7F7F7;
- 983. - padding: 15px 0;
- 984. - }
- 985. -
- 986. - .ads_unions_list_p .paginated_table_cell {
- 987. - text-align: right;
- 988. - }
- 989. -
- 990. - .ads_unions_list_p .paginated_table .paginated_table_cell.column_date_view,
- 991. - .ads_unions_list_p .paginated_table .paginated_table_cell.column_date_view *,
- 992. - .ads_unions_list_p .paginated_table .paginated_table_cell.column_action_view,
- 993. - .ads_unions_list_p .paginated_table .paginated_table_cell.column_action_view *,
- 994. - .ads_unions_list_p .paginated_table .paginated_table_cell.column_access_view,
- 995. - .ads_unions_list_p .paginated_table .paginated_table_cell.column_access_view *,
- 996. - .ads_unions_list_p .paginated_table .paginated_table_cell.column_name_view,
- 997. - .ads_unions_list_p .paginated_table .paginated_table_cell.column_name_view *,
- 998. - .ads_unions_list_p .paginated_table .paginated_table_cell.column_name,
- 999. - .ads_unions_list_p .paginated_table .paginated_table_cell.column_name *,
- 1000. - .ads_unions_list_p .paginated_table .paginated_table_cell.column_status,
- 1001. - .ads_unions_list_p .paginated_table .paginated_table_cell.column_status * {
- 1002. - text-align: left;
- 1003. - }
- 1004. -
- 1005. - .ads_unions_list_p .paginated_table .paginated_table_cell.column_name_view,
- 1006. - .ads_unions_list_p .paginated_table .paginated_table_cell.column_name_view *,
- 1007. - .ads_unions_list_p .paginated_table .paginated_table_cell.column_name,
- 1008. - .ads_unions_list_p .paginated_table .paginated_table_cell.column_name *,
- 1009. - .paginated_table .paginated_table_cell.column_client_name,
- 1010. - .paginated_table .paginated_table_cell.column_client_name *,
- 1011. - .paginated_table .paginated_table_cell.column_campaign_name,
- 1012. - .paginated_table .paginated_table_cell.column_campaign_name * {
- 1013. - white-space: normal !important;
- 1014. - }
- 1015. -
- 1016. - .ads_unions_list_p td.paginated_table_cell.column_name_view,
- 1017. - .ads_unions_list_p td.paginated_table_cell.column_name {
- 1018. - max-width: 160px;
- 1019. - overflow: visible;
- 1020. - }
- 1021. - .ads_unions_list_p td.paginated_table_cell.column_date_view {
- 1022. - min-width: 20%;
- 1023. - }
- 1024. - .ads_unions_list_p .paginated_table td.paginated_table_cell.column_day_limit_view a,
- 1025. - .ads_unions_list_p .paginated_table td.paginated_table_cell.column_all_limit_view a,
- 1026. - .ads_unions_list_p .paginated_table td.paginated_table_cell.column_cost_per_click_view a {
- 1027. - border-bottom: 1px dashed #2B587A;
- 1028. - text-decoration: none;
- 1029. - }
- 1030. -
- 1031. - .ads_unions_list_p .paginated_table td.column_video_views_count_view {
- 1032. - width: 1px;
- 1033. - }
- 1034. -
- 1035. - tr.ads_union_empty_row td.ads_union_empty_cell {
- 1036. - height: auto;
- 1037. - }
- 1038. -
- 1039. - tr.ads_union_empty_row td.ads_union_empty_cell {
- 1040. - text-align: center !important;
- 1041. - color: #666666;
- 1042. - line-height: 150%;
- 1043. - background-color: #F7F7F7;
- 1044. - padding: 15px 0;
- 1045. - }
- 1046. -
- 1047. - /* Some navigation - begin */
- 1048. -
- 1049. - #ads_graph_navigation a.nav,
- 1050. - #ads_demography_navigation a.nav {
- 1051. - padding: 6px 6px 7px 11px;
- 1052. - display: block;
- 1053. - overflow: hidden;
- 1054. - }
- 1055. - #ads_graph_navigation a.nav:hover,
- 1056. - #ads_demography_navigation a.nav:hover {
- 1057. - background-color: #DAE1E8;
- 1058. - text-decoration: none;
- 1059. - }
- 1060. - #ads_graph_navigation a.nav_selected,
- 1061. - #ads_graph_navigation a.nav_selected:hover,
- 1062. - #ads_demography_navigation a.nav_selected,
- 1063. - #ads_demography_navigation a.nav_selected:hover {
- 1064. - background-color: #6186AD;
- 1065. - color: white;
- 1066. - }
- 1067. -
- 1068. - /* Some navigation - end */
- 1069. -
- 1070. - a.ads_status_link,
- 1071. - a.ads_inline_dropdown {
- 1072. - background: none !important;
- 1073. - border-bottom: 1px dashed #2B587A;
- 1074. - padding-right: 0 !important;
- 1075. - }
- 1076. -
- 1077. - .ads_main_notice {
- 1078. - background-color: #F6F7F9;
- 1079. - border: 1px solid #D8DFEA;
- 1080. - padding: 10px;
- 1081. - margin-bottom: 15px;
- 1082. - line-height: 160%;
- 1083. - }
- 1084. -
- 1085. - .ads_notice_important {
- 1086. - background-color: #FFEFE8;
- 1087. - border-color: #E89B88;
- 1088. - }
- 1089. -
- 1090. - .ads_warning {
- 1091. - background-color: #F9F6E7;
- 1092. - border: 1px solid #D4BC4C;
- 1093. - padding: 8px 11px;
- 1094. - line-height: 160%;
- 1095. - }
- 1096. -
- 1097. - .ads_warning_light {
- 1098. - background-color: #FFFFFF;
- 1099. - border: 1px solid #B9C4DA;
- 1100. - padding: 8px 11px;
- 1101. - }
- 1102. -
- 1103. - .ads_small_info {
- 1104. - background: none repeat scroll 0 0 #F7F7F7;
- 1105. - border: 1px solid #DAE1E8;
- 1106. - font-size: 0.91em;
- 1107. - margin-top: 10px;
- 1108. - padding: 5px 10px;
- 1109. - vertical-align: top;
- 1110. - }
- 1111. -
- 1112. - #ads_change_budget_box .ads_warning {
- 1113. - margin-top: 10px;
- 1114. - }
- 1115. -
- 1116. - #ads_change_budget_box td {
- 1117. - padding: 0px;
- 1118. - }
- 1119. -
- 1120. - .ads_union_status_image {
- 1121. - background: url("/images/icons/ad_status.gif?3") no-repeat scroll left top transparent;
- 1122. - width: 5px;
- 1123. - height: 5px;
- 1124. - margin: 0 5px 1px 0;
- 1125. - display: block;
- 1126. -
- 1127. - display: -moz-inline-stack;
- 1128. - display: inline-block;
- 1129. - _overflow: hidden;
- 1130. - *zoom: 1;
- 1131. - *display: inline;
- 1132. - }
- 1133. -
- 1134. - .ads_union_status_image_on {
- 1135. - background-position: left 0;
- 1136. - }
- 1137. - .ads_union_status_image_off {
- 1138. - background-position: left -5px;
- 1139. - }
- 1140. - .ads_union_status_image_part_on {
- 1141. - background-position: left -10px;
- 1142. - }
- 1143. - .ads_union_status_image_part_off {
- 1144. - background-position: left -15px;
- 1145. - }
- 1146. - .ads_union_status_image_disapproved {
- 1147. - background-position: left -20px;
- 1148. - }
- 1149. - .ads_union_status_image_deleted {
- 1150. - background-position: left -25px;
- 1151. - }
- 1152. -
- 1153. - .ads_status_image_span {
- 1154. - background: url("/images/icons/ad_status_new.gif") no-repeat scroll left top transparent;
- 1155. - width: 11px;
- 1156. - height: 11px;
- 1157. - margin: 5px 0px 3px 2px;
- 1158. - display: block;
- 1159. -
- 1160. - display: -moz-inline-stack;
- 1161. - display: inline-block;
- 1162. - _overflow: hidden;
- 1163. - *zoom: 1;
- 1164. - *display: inline;
- 1165. - }
- 1166. -
- 1167. - .dd_menu_header.ads_dd_header_popup .ads_status_image_span.status_on,
- 1168. - .ads_status_image_span.status_on {
- 1169. - background-position: left -0px;
- 1170. - }
- 1171. - .dd_menu_header.ads_dd_header_popup .ads_status_image_span.status_off,
- 1172. - .ads_status_image_span.status_off {
- 1173. - background-position: left -170px;
- 1174. - }
- 1175. - .dd_menu_header.ads_dd_header_popup .ads_status_image_span.status_pending,
- 1176. - .ads_status_image_span.status_pending {
- 1177. - background-position: left -157px;
- 1178. - }
- 1179. - .dd_menu_header.ads_dd_header_popup .ads_status_image_span.status_off_red,
- 1180. - .ads_status_image_span.status_off_red {
- 1181. - background-position: left -128px;
- 1182. - }
- 1183. - .dd_menu_header.ads_dd_header_popup .ads_status_image_span.status_deleted,
- 1184. - .ads_status_image_span.status_deleted {
- 1185. - background-position: left -183px;
- 1186. - }
- 1187. - .dd_menu_header.ads_dd_header_popup .ads_status_image_span.status_cross,
- 1188. - .ads_status_image_span.status_cross {
- 1189. - background-position: left -141px;
- 1190. - }
- 1191. -
- 1192. - .dd_menu_header .ads_status_image_span.status_on {
- 1193. - background-position: left -16px;
- 1194. - }
- 1195. - .dd_menu_header .ads_status_image_span.status_off {
- 1196. - background-position: left -29px;
- 1197. - }
- 1198. - .dd_menu_header .ads_status_image_span.status_pending {
- 1199. - background-position: left -69px;
- 1200. - }
- 1201. - .dd_menu_header .ads_status_image_span.status_off_red {
- 1202. - background-position: left -29px;
- 1203. - }
- 1204. - .dd_menu_header .ads_status_image_span.status_deleted {
- 1205. - background-position: left -41px;
- 1206. - }
- 1207. - .dd_menu_header .ads_status_image_span.status_cross {
- 1208. - background-position: left -55px;
- 1209. - }
- 1210. -
- 1211. - .dd_menu_body.ads_dd_wide .dd_menu_rows a .ads_status_image_span.status_on {
- 1212. - background-position: left -85px;
- 1213. - }
- 1214. - .dd_menu_body.ads_dd_wide .dd_menu_rows a .ads_status_image_span.status_off {
- 1215. - background-position: left -98px;
- 1216. - }
- 1217. - .dd_menu_body.ads_dd_wide .dd_menu_rows a .ads_status_image_span.status_deleted {
- 1218. - background-position: left -111px;
- 1219. - }
- 1220. -
- 1221. - .ads_unions_list tr.ads_table_header th.paginated_table td.paginated_table_cell.column_commit_date,
- 1222. - .ads_unions_list tr.ads_table_header th.paginated_table td.paginated_table_cell.column_commit_date * {
- 1223. - border-left: 0 none;
- 1224. - }
- 1225. -
- 1226. - #ads_unions_budget * {
- 1227. - text-align: left;
- 1228. - }
- 1229. -
- 1230. - #ads_general_info_status_selector {
- 1231. - border-bottom: 1px dashed #2B587A;
- 1232. - }
- 1233. -
- 1234. - table.ads_unions_content_label {
- 1235. - border-collapse: collapse;
- 1236. - }
- 1237. -
- 1238. - #ads_unions_content .ads_export_prefs .ads_export_date_row .table_label {
- 1239. - padding-top: 4px;
- 1240. - }
- 1241. - .ads_export_prefs .table_value {
- 1242. - width: 300px;
- 1243. - }
- 1244. -
- 1245. - #ads_unions_content .export_prefs_web .summary td {
- 1246. - padding-top: 10px !important;
- 1247. - }
- 1248. -
- 1249. - .ads_export_stats .ads_unions_table th.paginated_table td.paginated_table_cell.column_checked {
- 1250. - width: 34px;
- 1251. - }
- 1252. -
- 1253. - .ads_unions_list .checkbox_container table {
- 1254. - border: 0px;
- 1255. - }
- 1256. -
- 1257. - .ads_unions_table .hovered_header,
- 1258. - .ads_unions_table .hovered_header_hover {
- 1259. - cursor: pointer;
- 1260. - }
- 1261. - .ads_unions_table .hovered_header_hover {
- 1262. - background-color: #EFF2F5;
- 1263. - }
- 1264. -
- 1265. - .ads_inline_edit_remove_value {
- 1266. - margin-left: 5px;
- 1267. - white-space: nowrap;
- 1268. - }
- 1269. -
- 1270. - .ads_inline_edit_table {
- 1271. - border-collapse: collapse;
- 1272. - }
- 1273. - table.ads_inline_edit_table td {
- 1274. - padding: 0;
- 1275. - }
- 1276. - .ads_inline_fast_error_row {
- 1277. - display: none;
- 1278. - }
- 1279. - .ads_inline_fast_error {
- 1280. - background-color: #F9F6E7;
- 1281. - border: 1px solid #D4BC4C;
- 1282. - padding: 8px 11px;
- 1283. - margin-top: 5px;
- 1284. - }
- 1285. -
- 1286. - .ads_inline_recommended_cost_text {
- 1287. - font-size: 0.91em;
- 1288. - color: #777777;
- 1289. - display: none;
- 1290. - }
- 1291. -
- 1292. - .ads_moder_comment_rules_wrap ul {
- 1293. - list-style: square outside none;
- 1294. - color: #758EAC;
- 1295. - margin: 11px 0 0 0;
- 1296. - }
- 1297. - .ads_moder_comment_rules_wrap span {
- 1298. - color: black;
- 1299. - }
- 1300. - .ads_moder_comment_rules_separator {
- 1301. - height: 11px;
- 1302. - }
- 1303. -
- 1304. - #ads_admin_box_wrapper a:hover {
- 1305. - text-decoration: underline;
- 1306. - }
- 1307. -
- 1308. - .ads_admin_table_cell {
- 1309. - border-bottom: 1px solid #DAE2E8;
- 1310. - }
- 1311. -
- 1312. - .admin_table_cell_last {
- 1313. - border-bottom: none;
- 1314. - }
- 1315. -
- 1316. - .ads_admin_box_label {
- 1317. - color: #777777;
- 1318. - text-align: right;
- 1319. - width: 125px;
- 1320. - padding-right: 10px;
- 1321. - }
- 1322. - .ads_admin_box_labeled {
- 1323. - width: 270px;
- 1324. - }
- 1325. -
- 1326. - .ads_general_info_hidden {
- 1327. - display: none;
- 1328. - }
- 1329. -
- 1330. - .ads_general_info .table_large_text {
- 1331. - width: 385px;
- 1332. - }
- 1333. -
- 1334. - #ads_unions_content h4 span {
- 1335. - font-weight: bold
- 1336. - }
- 1337. -
- 1338. - .ads_users_stats_dark {
- 1339. - background-color: #597DA3;
- 1340. - }
- 1341. -
- 1342. - .ads_users_stats_light {
- 1343. - background-color: #DAE1E8;
- 1344. - }
- 1345. -
- 1346. - .ads_users_stats_bars_title {
- 1347. - padding-bottom: 16px;
- 1348. - color: #45688E;
- 1349. - font-weight: bold;
- 1350. - }
- 1351. -
- 1352. - .ads_users_stats_bar_label {
- 1353. - height: 30px;
- 1354. - text-align: right;
- 1355. - padding-right: 16px;
- 1356. - padding-top: 2px;
- 1357. - vertical-align: top;
- 1358. - color: #45688E;
- 1359. - font-weight: bold;
- 1360. - }
- 1361. - .ads_users_stats_bar_wrap table {
- 1362. - border: 0px;
- 1363. - border-collapse: collapse;
- 1364. - }
- 1365. - .ads_users_stats_bar_wrap table td {
- 1366. - padding: 0px;
- 1367. - }
- 1368. - .ads_users_stats_bar_wrap {
- 1369. - height: 30px;
- 1370. - vertical-align: top;
- 1371. - }
- 1372. - .ads_users_stats_bar_wrap table td.ads_users_stats_bar_value {
- 1373. - padding-left: 11px;
- 1374. - }
- 1375. - .ads_users_stats_bar {
- 1376. - -moz-border-radius: 0 3px 3px 0;
- 1377. - -webkit-border-radius: 0 3px 3px 0;
- 1378. - -khtml-border-radius: 0 3px 3px 0;
- 1379. - border-radius: 0 3px 3px 0;
- 1380. - height: 17px;
- 1381. - }
- 1382. -
- 1383. - #ads_demography_wrap .summary_right .summary_tab2 {
- 1384. - background-color: transparent;
- 1385. - }
- 1386. -
- 1387. - .ads_dropdown_menu_scrollbar {
- 1388. - position: absolute;
- 1389. - z-index: 1500;
- 1390. - background-color: #000;
- 1391. -
- 1392. - opacity: 0.4;
- 1393. - -moz-opacity: 0.4;
- 1394. - filter: alpha(opacity=40);
- 1395. -
- 1396. - border-radius: 3px;
- 1397. - -webkit-border-radius: 3px;
- 1398. - -moz-border-radius: 3px;
- 1399. - -khtml-border-radius: 3px;
- 1400. - }
- 1401. - .ads_dropdown_menu_scrollbar:hover,
- 1402. - .ads_dropdown_menu_scrollbar.hovered {
- 1403. - opacity: 0.6;
- 1404. - -moz-opacity: 0.6;
- 1405. - filter: alpha(opacity=60);
- 1406. - }
- 1407. -
- 1408. - #ads_admin_box_wrapper h2 {
- 1409. - padding: 0;
- 1410. - margin: 0;
- 1411. - border: none;
- 1412. - }
- 1413. -
- 1414. - #ads_reqs_edit td.ads_req_label {
- 1415. - color: #666666;
- 1416. - text-align: right;
- 1417. - vertical-align: top;
- 1418. - padding-top: 5px;
- 1419. - }
- 1420. -
- 1421. - #ads_reqs_edit td.ads_req_right {
- 1422. - width: 100px;
- 1423. - }
- 1424. -
- 1425. - #ads_reqs_edit_form input.ads_req_edit,
- 1426. - #ads_reqs_edit_form textarea.ads_req_edit {
- 1427. - margin: 0px;
- 1428. - width: 250px;
- 1429. - }
- 1430. -
- 1431. - #ads_legal_info_box div {
- 1432. - padding: 8px 11px;
- 1433. - border: 1px solid #C0CAD5;
- 1434. - }
- 1435. -
- 1436. - /*
- 1437. - * About section
- 1438. - */
- 1439. -
- 1440. - .ads_help_section.section_wrap {
- 1441. - padding: 20px 25px 25px 26px;
- 1442. - line-height: 140%;
- 1443. - }
- 1444. -
- 1445. - .ads_help_section h4 {
- 1446. - margin-bottom: 10px;
- 1447. - }
- 1448. -
- 1449. - .ads_help_section .header {
- 1450. - font-size: 1.09em;
- 1451. - margin: 0px 0px 20px 1px;
- 1452. - border: none;
- 1453. - color: #45688E;
- 1454. - font-weight: bold;
- 1455. - }
- 1456. -
- 1457. - .ads_help_section .par_divider {
- 1458. - margin-bottom: 31px;
- 1459. - }
- 1460. -
- 1461. - .ads_help_section .emph_link {
- 1462. - margin-left: 26px;
- 1463. - }
- 1464. -
- 1465. - #unions_navigation {
- 1466. - vertical-align: top;
- 1467. - }
- 1468. -
- 1469. - #unions_navigation {
- 1470. - width: 150px;
- 1471. - padding: 12px 12px 12px 0;
- 1472. - }
- 1473. -
- 1474. - #unions_navigation .edit_button_wrap {
- 1475. - padding-bottom: 10px;
- 1476. - }
- 1477. -
- 1478. - #unions_navigation .nav_separator {
- 1479. - border-bottom: 1px solid rgb(211, 219, 225);
- 1480. - height: 1px;
- 1481. - overflow: hidden;
- 1482. - margin: 7px 0px 8px 0;
- 1483. - }
- 1484. -
- 1485. - #unions_navigation a.nav {
- 1486. - padding: 6px 6px 7px 11px;
- 1487. - display: block;
- 1488. - overflow: hidden;
- 1489. - max-width: 133px;
- 1490. - word-wrap: break-word;
- 1491. - }
- 1492. - #unions_navigation a.nav:hover {
- 1493. - background-color: #E1E7ED;
- 1494. - text-decoration: none;
- 1495. - }
- 1496. - #unions_navigation a.nav_selected,
- 1497. - #unions_navigation a.nav_selected:hover {
- 1498. - background-color: #6186AD;
- 1499. - color: white;
- 1500. - }
- 1501. -
- 1502. -
- 1503. - #unions_navigation.ads_unions_navigation_about {
- 1504. - background-color: #F7F7F7;
- 1505. - border-left: 1px solid #DAE1E8;
- 1506. - padding: 14px 10px;
- 1507. - }
- 1508. -
- 1509. - #unions_navigation.ads_unions_navigation_about .nav {
- 1510. - border-color: #F7F7F7;
- 1511. - }
- 1512. -
- 1513. - #unions_navigation.ads_unions_navigation_about .nav_selected {
- 1514. - border-color: #517295;
- 1515. - }
- 1516. -
- 1517. - .ads_unions_navigation_about .ad_box_preview {
- 1518. - border: 1px solid #DCE3E9
- 1519. - }
- 1520. -
- 1521. - #ads_contacts_form {
- 1522. - margin: 20px 0 0 0;
- 1523. - }
- 1524. - #ads_contacts_form .label_slide {
- 1525. - vertical-align: top;
- 1526. - }
- 1527. - #ads_contacts_form .label {
- 1528. - width: 100px;
- 1529. - color: #555;
- 1530. - padding: 4px 10px 0 0;
- 1531. - text-align: right;
- 1532. - vertical-align: top;
- 1533. - }
- 1534. - #ads_contacts_form .labeled {
- 1535. - padding-bottom: 10px;
- 1536. - }
- 1537. - #ads_contacts_form .row_checkbox .labeled {
- 1538. - padding-bottom: 6px;
- 1539. - }
- 1540. - #ads_contacts_form .row_checkbox_prev .labeled {
- 1541. - padding-bottom: 8px;
- 1542. - }
- 1543. - #ads_contacts_form .row_checkbox_last .labeled {
- 1544. - padding-bottom: 8px;
- 1545. - }
- 1546. - #ads_contacts_form td.label_slide {
- 1547. - overflow: hidden;
- 1548. - }
- 1549. - #ads_contacts_form div.label_slide {
- 1550. - height: 0;
- 1551. - }
- 1552. - #ads_contacts_form .checkbox_wrap {
- 1553. - margin: -5px 0;
- 1554. - }
- 1555. - #ads_contacts_form input.txt {
- 1556. - width: 242px;
- 1557. - }
- 1558. - #ads_contacts_form textarea.txt {
- 1559. - width: 242px;
- 1560. - height: 40px;
- 1561. - }
- 1562. - #ads_contacts_form textarea.txt#message {
- 1563. - height: 90px;
- 1564. - }
- 1565. - #ads_contacts_form .msg {
- 1566. - background-color: #f9f6e7;
- 1567. - border-color: #c3b988;
- 1568. - font-weight: normal;
- 1569. - }
- 1570. -
- 1571. - .ads_contacts_nonresident_message {
- 1572. - padding: 7px 0 20px 0;
- 1573. - }
- 1574. -
- 1575. - .wk_ads_intro #ads_contacts_form .label {
- 1576. - width: 140px;
- 1577. - padding-top: 9px;
- 1578. - }
- 1579. -
- 1580. - .wk_ads_intro #ads_contacts_form input.txt,
- 1581. - .wk_ads_intro #ads_contacts_form textarea.txt {
- 1582. - width: 254px;
- 1583. - height: 17px;
- 1584. - line-height: 17px;
- 1585. - padding: 5px 6px 6px 10px;
- 1586. - }
- 1587. - @-moz-document url-prefix() {
- 1588. - .wk_ads_intro #ads_contacts_form input.txt,
- 1589. - .wk_ads_intro #ads_contacts_form textarea.txt {
- 1590. - padding-left: 9px;
- 1591. - width: 255px;
- 1592. - }
- 1593. - }
- 1594. - .wk_ads_intro #ads_contacts_form textarea.txt {
- 1595. - height: 52px;
- 1596. - }
- 1597. - .wk_ads_intro #ads_contacts_form textarea.txt#message {
- 1598. - height: 90px;
- 1599. - }
- 1600. -
- 1601. - /* Multi dropdown menu - begin */
- 1602. -
- 1603. - a.ads_dd_menu_item_checkbox_on,
- 1604. - a.ads_dd_menu_item_checkbox_off {
- 1605. - padding-left: 22px !important;
- 1606. - background-image: none !important;
- 1607. - background-position: 4px 2px !important;
- 1608. - }
- 1609. - a.ads_dd_menu_item_checkbox_on {
- 1610. - background-image: url("/images/dropdead_check.gif") !important;
- 1611. - }
- 1612. -
- 1613. - /* Multi dropdown menu - end */
- 1614. -
- 1615. - .ads_paginated_table_name {
- 1616. - overflow: hidden;
- 1617. - white-space: nowrap;
- 1618. - }
- 1619. -
- 1620. - .ad_new_user td.label {
- 1621. - text-align: right;
- 1622. - padding: 6px 15px 6px 0;
- 1623. - width: 120px;
- 1624. - color: gray;
- 1625. - }
- 1626. - .ad_new_user td.labeled input {
- 1627. - width: 160px;
- 1628. - }
- 1629. -
- 1630. - #ads_page_simple .ads_reg_row {
- 1631. - height: 30px;
- 1632. - }
- 1633. - #ads_page_simple .ads_reg_label {
- 1634. - width: 231px;
- 1635. - float: left;
- 1636. - text-align: right;
- 1637. - color: #777777;
- 1638. - padding: 4px 10px 0 0;
- 1639. - }
- 1640. - #ads_page_simple .ads_reg_labeled {
- 1641. - float: left;
- 1642. - }
- 1643. - #ads_page_simple .ads_reg_labeled_input {
- 1644. - margin: 0;
- 1645. - }
- 1646. - #ads_page_simple .ads_reg_labeled input#first_name,
- 1647. - #ads_page_simple .ads_reg_labeled input#last_name,
- 1648. - #ads_page_simple .ads_reg_labeled input#regemail,
- 1649. - #ads_page_simple .ads_reg_labeled input#regpass {
- 1650. - width: 217px;
- 1651. - }
- 1652. -
- 1653. - .box_body .ads_disapproved_message {
- 1654. - line-height: 150%;
- 1655. - }
- 1656. -
- 1657. - .ads_wiki_wrap {
- 1658. - line-height: 160%;
- 1659. - }
- 1660. -
- 1661. - .ads_wiki_bonus {
- 1662. - padding-bottom: 10px;
- 1663. - }
- 1664. -
- 1665. - #ads_bonus_activation_form .ads_unions_content_label td {
- 1666. - padding: 0 0 4px 0;
- 1667. - }
- 1668. -
- 1669. - #ads_unions_content .payments_systems_container {
- 1670. - padding: 7px 102px 0 50px;
- 1671. - }
- 1672. -
- 1673. - #ads_unions_content .payments_systems_container .ps_desc_short {
- 1674. - padding-right: 120px;
- 1675. - }
- 1676. -
- 1677. - #ads_unions_content .payments_systems_container .term_info {
- 1678. - min-height: 24px;
- 1679. - }
- 1680. -
- 1681. - #ads_unions_content .payments_landing div {
- 1682. - margin-bottom: 20px;
- 1683. - }
- 1684. -
- 1685. - #ads_retargeting_groups_table {
- 1686. - margin-top: 15px;
- 1687. - }
- 1688. - #ads_retargeting_groups_table .column_action_view {
- 1689. - width: 100px;
- 1690. - white-space: nowrap;
- 1691. - }
- 1692. - #ads_retargeting_groups .ads_retargeting_controls {
- 1693. -
- 1694. - }
- 1695. - .ads_retargeting_box {
- 1696. - line-height: 160%;
- 1697. - padding: 25px 20px;
- 1698. - background-color: #F7F7F7;
- 1699. - }
- 1700. - .ads_retargeting_box_label {
- 1701. - margin-bottom: 10px;
- 1702. - color: #45668E;
- 1703. - font-size: 1.18em;
- 1704. - font-weight: bold;
- 1705. - }
- 1706. - .ads_retargeting_box_label_hint {
- 1707. - color: #98A9B7;
- 1708. - cursor: pointer;
- 1709. - }
- 1710. - .ads_retargeting_box_text {
- 1711. - margin-top: 10px;
- 1712. - color: #777;
- 1713. - }
- 1714. - .ads_retargeting_box input {
- 1715. - width: 280px;
- 1716. - }
- 1717. - #ads_retargeting_box_error {
- 1718. - margin-bottom: 10px;
- 1719. - display: none;
- 1720. - }
- 1721. - .ads_retargeting_box .box_msg {
- 1722. - margin-bottom: 10px;
- 1723. - font-weight: normal;
- 1724. - }
- 1725. - .ads_retargeting_box_notice {
- 1726. - font-size: 0.91em;
- 1727. - color: #777;
- 1728. - }
- 1729. - .ads_retargeting_box_button {
- 1730. - margin-top: 20px;
- 1731. - }
- 1732. - #ads_reatargeting_upload_notice {
- 1733. - margin-top: 20px;
- 1734. - text-align: center;
- 1735. - color: #777;
- 1736. - }
- 1737. - #ads_retargeting_type {
- 1738. - margin: 13px 0;
- 1739. - }
- 1740. - #ads_retargeting_type .radiobtn {
- 1741. - margin-right: 25px;
- 1742. - }
- 1743. - #ads_retargeting_upload_doc {
- 1744. - padding: 2px 0;
- 1745. - }
- 1746. - #ads_retargeting_upload_doc .button_blue button {
- 1747. - background: none;
- 1748. - background-color: #dfe5ed;
- 1749. - color: #627485;
- 1750. - border: none;
- 1751. - text-shadow: none;
- 1752. - padding-bottom: 7px;
- 1753. - }
- 1754. - #ads_retargeting_upload_doc .button_blue button:hover {
- 1755. - background-color: #d8dfe8;
- 1756. - color: #607282;
- 1757. - }
- 1758. - #ads_retargeting_upload_doc form {
- 1759. - text-align: left!important;
- 1760. - }
- 1761. - #retargeting_group_pixel {
- 1762. - padding: 5px 8px 6px;
- 1763. - background-color: #FFF;
- 1764. - height: 80px;
- 1765. - width: 390px;
- 1766. - line-height: 140%;
- 1767. - }
- 1768. - .ads_retargeting_box .input_back_content {
- 1769. - padding: 0;
- 1770. - }
- 1771. - .ads_retargeting_box input:focus,
- 1772. - .ads_retargeting_box textarea:focus {
- 1773. - outline: 0;
- 1774. - }
- 1775. - #ads_retargeting_domain_text {
- 1776. - font-weight: bold;
- 1777. - }
- 1778. - #ads_retargeting_domain {
- 1779. - margin-right: 5px;
- 1780. - width: 200px;
- 1781. - }
- 1782. - #ads_retargeting_domain_link {
- 1783. - padding: 6px 0 7px 0;
- 1784. - }
- 1785. - @-moz-document url-prefix() {
- 1786. - #ads_retargeting_domain_link {
- 1787. - padding: 7px 0;
- 1788. - }
- 1789. - #ads_retargeting_upload_doc {
- 1790. - padding: 3px 0;
- 1791. - }
- 1792. - }
- 1793. - .ads_retargeting_text {
- 1794. - line-height: 150%;
- 1795. - }
- 1796. - #ads_retargeting_processing_msg {
- 1797. - margin-bottom: 10px;
- 1798. - }
- 1799. - .ads_retargeting_param_saved {
- 1800. - padding-left: 10px;
- 1801. - color: #777;
- 1802. - opacity: 0;
- 1803. - }
- 1804. - .ads_upload_progress_wrap {
- 1805. - width: 200px;
- 1806. - height: 18px;
- 1807. - background: #FFF;
- 1808. - border: 1px solid #CCC;
- 1809. - }
- 1810. - .ads_upload_progress {
- 1811. - height: 18px;
- 1812. - background: #597DA3 url(/images/progress_grad.gif) repeat;
- 1813. - border: 1px solid #45688E;
- 1814. - margin: -1px;
- 1815. - }
- 1816. -
- 1817. - .ads_settings_notifacations {
- 1818. - margin: 10px 0 0 10px;
- 1819. - border-collapse: collapse;
- 1820. - }
- 1821. - .ads_settings_notifacations th,
- 1822. - .ads_settings_notifacations td {
- 1823. - padding: 0 5px;
- 1824. - text-align: center;
- 1825. - }
- 1826. - td.ads_settings_notifacations_label {
- 1827. - padding: 0 30px 0 0;
- 1828. - text-align: left;
- 1829. - }
- 1830. - .ads_settings_notifacations .checkbox_container {
- 1831. - margin: 0 auto;
- 1832. - }
- 1833. -
- 1834. - #ad_preview_top .ads_ad_box.news {
- 1835. - padding-bottom: 5px;
- 1836. - }
- 1837. -
- 1838. -
- 1839. - .ads_alt_table {
- 1840. - border-collapse: collapse;
- 1841. - width: 100%;
- 1842. - }
- 1843. - .ads_alt_table th {
- 1844. - padding: 9px 8px 11px 5px;
- 1845. - background-color: #e9edf0;
- 1846. - color: #587183;
- 1847. - font-weight: bold;
- 1848. - white-space: nowrap;
- 1849. - height: auto;
- 1850. - border: none;
- 1851. - text-align: left;
- 1852. - font-size: 1.09em;
- 1853. - }
- 1854. - .ads_alt_table th:first-child {
- 1855. - padding-left: 10px;
- 1856. - }
- 1857. - .ads_alt_table tr {
- 1858. - border-left: 1px solid #e9edf0;
- 1859. - border-right: 1px solid #e9edf0;
- 1860. - }
- 1861. - .ads_alt_table td.even_row {
- 1862. - background-color: #f5f7f7;
- 1863. - }
- 1864. - .ads_alt_table tr:first-child {
- 1865. - border-top: 1px solid #e9edf0;
- 1866. - }
- 1867. - .ads_alt_table tr:last-child {
- 1868. - border-bottom: 1px solid #e9edf0;
- 1869. - }
- 1870. - .ads_alt_table td {
- 1871. - padding: 10px 5px;
- 1872. - text-align: left;
- 1873. - vertical-align: top;
- 1874. - line-height: 160%;
- 1875. - height: auto;
- 1876. - }
- 1877. - .ads_alt_table td:first-child {
- 1878. - padding-left: 10px !important;
- 1879. - }
- 1880. - .ads_alt_table td:last-child {
- 1881. - padding-right: 10px;
- 1882. - }
- 1883. - .ads_alt_table td.not_found {
- 1884. - padding: 0px !important;
- 1885. - }
- 1886. - .ads_alt_table .grey {
- 1887. - color: #666666;
- 1888. - display: inline-block;
- 1889. - min-width: 40px;
- 1890. - margin-right: 5px;
- 1891. - }
- 1892. -
- 1893. - .ads_retargeting_menu a.ads_retargeting_menu_header,
- 1894. - .ads_retargeting_menu a.ads_retargeting_menu_header:hover {
- 1895. - background-color: #EDF1F5;
- 1896. - color: #2B587A;
- 1897. - }
- 1898. - .ads_retargeting_menu .dd_menu_body {
- 1899. - -webkit-border-radius: 2px;
- 1900. - -khtml-border-radius: 2px;
- 1901. - -moz-border-radius: 2px;
- 1902. - border-radius: 2px;
- 1903. - -webkit-box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.35);
- 1904. - -moz-box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.35);
- 1905. - box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.35);
- 1906. - border: 1px solid #B2BDCA;
- 1907. - }
- 1908. - .ads_retargeting_menu .dd_menu_header {
- 1909. - border: none;
- 1910. - }
- 1911. - .ads_retargeting_menu .dd_menu_header div {
- 1912. - display: none;
- 1913. - }
- 1914. - .ads_retargeting_menu .dd_menu_rows {
- 1915. - border: none;
- 1916. - }
- 1917. - .ads_retargeting_menu .dd_menu_rows a {
- 1918. - padding: 7px 8px 2px 8px;
- 1919. - }
- 1920. - .ads_retargeting_menu .dd_menu_shad_l,
- 1921. - .ads_retargeting_menu .dd_menu_shad_r,
- 1922. - .ads_retargeting_menu .dd_menu_shad_t,
- 1923. - .ads_retargeting_menu .dd_menu_shad_t2,
- 1924. - .ads_retargeting_menu .dd_menu_shad_b,
- 1925. - .ads_retargeting_menu .dd_menu_shad_b2 {
- 1926. - display: none;
- 1927. - }
- 1928. -
- 1929. - .ads_retargeting_tt table .tt_text {
- 1930. - color: #000;
- 1931. - line-height: 150%;
- 1932. - padding: 10px;
- 1933. - width: 295px;
- 1934. - }
- 1935. - .ads_retargeting_tt table.toup1 .bottom_pointer {
- 1936. - margin-right: 0px;
- 1937. - margin-left: 34px;
- 1938. - display: block;
- 1939. - background: url(/images/tooltip_arrow_white.gif) no-repeat;
- 1940. - }
- 1941. - .ads_retargeting_tt table.toup .top_pointer {
- 1942. - margin-right: 0px;
- 1943. - margin-left: 34px;
- 1944. - display: block;
- 1945. - bottom: -2px;
- 1946. - background: url(/images/tooltip_arrow_up.gif) no-repeat;
- 1947. - }
- ------
- Файл - ads.js (Старый размер - 93443 | Новый - 0):
- 0. - var Ads = {};
- 1. -
- 2. - Ads.init = function() {
- 3. - showBackLink();
- 4. - Ads.processNotices();
- 5. - }
- 6. -
- 7. - Ads.initOfficesMenu = function(event) {
- 8. -
- 9. - if (!window.DropdownMenu || !cur.mainNavigationOfficesItems) {
- 10. - return;
- 11. - }
- 12. -
- 13. - if (cur.navigationOficesMenu) {
- 14. - return;
- 15. - }
- 16. -
- 17. - ge('ads_navigation_offices_menu').removeAttribute('onmouseover');
- 18. -
- 19. - function hideMenu() {
- 20. - cur.navigationOficesMenu.hide();
- 21. - }
- 22. -
- 23. - var realLocation = '';
- 24. - if (location.hash.indexOf('#/') != -1 || location.hash.indexOf('#!') != -1) {
- 25. - realLocation = location.hash.replace('#/', '').replace('#!', '');
- 26. - } else {
- 27. - realLocation = location.pathname + location.search;
- 28. - }
- 29. -
- 30. - var unionId;
- 31. - var unionIdReal;
- 32. - var unionIdParam = '';
- 33. - var curItems = [];
- 34. - for (var i in cur.mainNavigationOfficesItems) {
- 35. - curItems[i] = {};
- 36. - curItems[i].onClick = hideMenu;
- 37. - for (var j in cur.mainNavigationOfficesItems[i]) {
- 38. - curItems[i][j] = cur.mainNavigationOfficesItems[i][j];
- 39. - }
- 40. - if (curItems[i].i == 'all') {
- 41. - curItems[i].h = "/ads?act=offices_list";
- 42. - } else {
- 43. - unionId = '';
- 44. - unionIdReal = intval(curItems[i].i);
- 45. - unionIdParam = '';
- 46. - if (curItems[i].i.indexOf('default') == -1) {
- 47. - unionId = unionIdReal;
- 48. - unionIdParam = "&union_id=" + unionIdReal;
- 49. - }
- 50. -
- 51. - var link = "/ads?act=office" + unionIdParam;
- 52. - if (!unionIdReal) {
- 53. - link = "/ads?act=no_office";
- 54. - } else if (cur.getOfficeLink) {
- 55. - link = cur.getOfficeLink(unionId);
- 56. - } else if (realLocation.match(/act=budget(&|$)/)) {
- 57. - link = "/ads?act=budget" + unionIdParam;
- 58. - } else if (realLocation.match(/act=export_stats(&|$)/)) {
- 59. - link = "/ads?act=export_stats" + unionIdParam;
- 60. - } else if (realLocation.match(/act=settings(&|$)/)) {
- 61. - link = "/ads?act=settings" + unionIdParam;
- 62. - }
- 63. -
- 64. - curItems[i].h = link;
- 65. - }
- 66. - }
- 67. -
- 68. - var options = {
- 69. - title: '<span id="ads_navigation_dd_menu_header_text">' + ge('ads_navigation_offices_menu_text').innerHTML + '</span>',
- 70. - containerClass: 'ads_navigation_dd_menu_header_wrap',
- 71. - target: ge('ads_navigation_offices_menu'),
- 72. - showHover: false,
- 73. - updateTarget: false,
- 74. - onSelect: function(e) {
- 75. - }
- 76. - };
- 77. - cur.navigationOficesMenu = new DropdownMenu(curItems, options);
- 78. - cur.destroy.push(function(){ cur.navigationOficesMenu.destroy(); });
- 79. - }
- 80. -
- 81. - Ads.lock = function(lockKey, onLock, onUnlock) {
- 82. - if (!cur.locks) {
- 83. - cur.locks = {};
- 84. - }
- 85. - if (cur.locks[lockKey]) {
- 86. - return false;
- 87. - }
- 88. - cur.locks[lockKey] = {onLock: onLock, onUnlock: onUnlock};
- 89. - if (isFunction(cur.locks[lockKey].onLock)) {
- 90. - cur.locks[lockKey].onLock();
- 91. - }
- 92. - return true;
- 93. - }
- 94. -
- 95. - Ads.unlock = function(lockKey) {
- 96. - if (!cur.locks) {
- 97. - cur.locks = {};
- 98. - }
- 99. - if (cur.locks[lockKey] && isFunction(cur.locks[lockKey].onUnlock)) {
- 100. - cur.locks[lockKey].onUnlock();
- 101. - }
- 102. - delete cur.locks[lockKey];
- 103. - }
- 104. -
- 105. - Ads.simpleAjax = function(url, elem) {
- 106. - if (elem) {
- 107. - var elemRect = elem.getBoundingClientRect();
- 108. - var imgTop = (elemRect.bottom - elemRect.top - 8) / 2;
- 109. - var span = ce('span', {}, {position: 'relative'})
- 110. - var img = ce('img', {src:'/images/upload.gif'}, {position: 'absolute', top: imgTop + 'px'});
- 111. - span.appendChild(img);
- 112. - elem.appendChild(span);
- 113. - }
- 114. -
- 115. - ajax.post(url, {}, {onDone: onComplete, onFail: onComplete});
- 116. - function onComplete(response) {
- 117. - if (elem) {
- 118. - elem.removeChild(span);
- 119. - }
- 120. - if (response && response.html) {
- 121. - var boxOptions = {};
- 122. - boxOptions.title = '���������';
- 123. - boxOptions.onHide = nav.reload;
- 124. - showFastBox(boxOptions, response.html);
- 125. - } else {
- 126. - nav.reload();
- 127. - }
- 128. - return true;
- 129. - }
- 130. - }
- 131. -
- 132. - Ads.escapeValue = function(value) {
- 133. - return value.replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>').replace(/"/g, '"');
- 134. - }
- 135. -
- 136. - Ads.onInputEvent = function(event, func) {
- 137. - if (event.keyCode == KEY.RETURN) {
- 138. - func();
- 139. - return false;
- 140. - }
- 141. - return true;
- 142. - }
- 143. -
- 144. - Ads.onSubLinkEvent = function(event) {
- 145. - event = normEvent(event);
- 146. - var elem = event.target
- 147. - var newLink = elem.getAttribute('href_');
- 148. - if (!newLink) {
- 149. - return;
- 150. - }
- 151. - var linkElem = elem;
- 152. - while (linkElem && linkElem.nodeName !== 'A') {
- 153. - linkElem = linkElem.parentNode;
- 154. - }
- 155. - if (!linkElem) {
- 156. - return;
- 157. - }
- 158. - if (event.type === 'mouseover') {
- 159. - elem.setAttribute('href_old', linkElem.href);
- 160. - linkElem.href = newLink;
- 161. - } else if (event.type === 'mouseout') {
- 162. - var oldLink = elem.getAttribute('href_old');
- 163. - if (oldLink) {
- 164. - linkElem.href = oldLink;
- 165. - } else {
- 166. - linkElem.removeAttribute('href');
- 167. - }
- 168. - }
- 169. - }
- 170. -
- 171. - Ads.onBoxFail = function(message) {
- 172. - if (!message) {
- 173. - message = getLang('global_unknown_error');
- 174. - }
- 175. - setTimeout(function(){
- 176. - showFastBox(getLang('ads_error_box_title'), message);
- 177. - }, 1);
- 178. - return true;
- 179. - }
- 180. -
- 181. - Ads.setLoginHandlers = function(onLoginDoneNew, onLoginFailedNew) {
- 182. - var restoreOnLoginDone = function(handler) {
- 183. - if (cur.onLoginDoneWindowOld && window.onLoginDone == handler) {
- 184. - window.onLoginDone = cur.onLoginDoneWindowOld;
- 185. - delete cur.onLoginDoneWindowOld;
- 186. - }
- 187. - }
- 188. - var restoreOnLoginFailed = function(handler) {
- 189. - if (cur.onLoginFailedWindowOld && window.onLoginFailed == handler) {
- 190. - window.onLoginFailed = cur.onLoginFailedWindowOld;
- 191. - delete cur.onLoginFailedWindowOld;
- 192. - }
- 193. - }
- 194. -
- 195. - if (onLoginDoneNew) {
- 196. - if (window.onLoginDone != onLoginDoneNew) {
- 197. - cur.onLoginDoneWindowOld = window.onLoginDone;
- 198. - window.onLoginDone = onLoginDoneNew;
- 199. - cur.destroy.push(restoreOnLoginDone.pbind(onLoginDoneNew));
- 200. - }
- 201. - } else {
- 202. - restoreOnLoginDone(window.onLoginDone);
- 203. - }
- 204. -
- 205. - if (onLoginFailedNew) {
- 206. - if (window.onLoginFailed != onLoginFailedNew) {
- 207. - cur.onLoginFailedWindowOld = window.onLoginFailed;
- 208. - window.onLoginFailed = onLoginFailedNew;
- 209. - cur.destroy.push(restoreOnLoginFailed.pbind(onLoginFailedNew));
- 210. - }
- 211. - } else {
- 212. - restoreOnLoginFailed(window.onLoginFailed);
- 213. - }
- 214. - }
- 215. -
- 216. - Ads.scrollToError = function(errorElem) {
- 217. - errorElem = ge(errorElem);
- 218. - var scrollY = scrollGetY();
- 219. - var errorY = getXY(errorElem)[1];
- 220. - if (errorY < scrollY || errorY > (scrollY + lastWindowHeight / 2)) {
- 221. - errorY -= 15;
- 222. - scrollToY(errorY);
- 223. - }
- 224. - }
- 225. -
- 226. - Ads.onFormEdit = function() {
- 227. - if (window.wkcur) {
- 228. - wkcur.noClickHide = true;
- 229. - }
- 230. - }
- 231. -
- 232. - Ads.processNotices = function() {
- 233. - var noticeElems = geByClass('ads_notice_important');
- 234. - for (var i in noticeElems) {
- 235. - animate(noticeElems[i], {backgroundColor: '#F6F7F9', borderColor: '#D8DFEA'}, 6000);
- 236. - }
- 237. - }
- 238. -
- 239. - Ads.initFixed = function(elemWrap) {
- 240. - elemWrap = ge(elemWrap);
- 241. - if (!elemWrap) return;
- 242. - var elemFixed = elemWrap.firstChild;
- 243. - if (!elemFixed) return;
- 244. -
- 245. - var inited = elemWrap.getAttribute('fixed_inited');
- 246. - var positionTop = 20;
- 247. -
- 248. - if (inited) {
- 249. - setStyle(elemWrap, {width: '', height: ''});
- 250. - setStyle(elemFixed, {position: 'static', top: 'auto', left: 'auto'});
- 251. - }
- 252. - var elemWrapSize = getSize(elemWrap);
- 253. - if (!elemWrapSize[0] || !elemWrapSize[1]) return;
- 254. - setStyle(elemWrap, {width: elemWrapSize[0] + 'px', height: elemWrapSize[1] + 'px'});
- 255. -
- 256. - elemWrap.setAttribute('fixed_inited', 1);
- 257. -
- 258. - if (!inited) {
- 259. - var scrolledNode = browser.msie6 ? pageNode : window;
- 260. - addEvent(scrolledNode, 'scroll', onScroll);
- 261. - cur.destroy.push(function() { removeEvent(scrolledNode, 'scroll', onScroll); });
- 262. - }
- 263. -
- 264. - onScroll();
- 265. -
- 266. - function onScroll() {
- 267. - var elemWrapXY = getXY(elemWrap);
- 268. - var scrollY = scrollGetY();
- 269. - if (scrollY + positionTop < elemWrapXY[1]) {
- 270. - setStyle(elemFixed, {position: 'static', top: 'auto', left: 'auto'});
- 271. - } else {
- 272. - setStyle(elemFixed, {position: 'fixed', top: positionTop, left: elemWrapXY[0]});
- 273. - }
- 274. - }
- 275. - }
- 276. -
- 277. - Ads.initIntroPage = function(widgetParamsMore) {
- 278. - var widgetParams = {}
- 279. - widgetParams.mode = 2;
- 280. - widgetParams.width = 212;
- 281. - widgetParams.height = 340;
- 282. - widgetParams.no_head = 1;
- 283. - extend(widgetParams, widgetParamsMore);
- 284. - VK.Widgets.Group('ads_intro_news_widget', widgetParams, 19542789);
- 285. - }
- 286. -
- 287. - //////////////////////////////////////////////////////////////////////
- 288. - // OLD
- 289. - //////////////////////////////////////////////////////////////////////
- 290. -
- 291. - Ads.updateUnionName = function(unionId, unionName) {
- 292. - var elemsTitle = geByClass('title_union_name_' + unionId);
- 293. - for (var i in elemsTitle) {
- 294. - elemsTitle[i].innerHTML = Ads.escapeValue(unionName);
- 295. - }
- 296. -
- 297. - var elemNavigation = ge('ads_navigation_union_' + unionId);
- 298. - if (elemNavigation) {
- 299. - unionName = replaceEntities(unionName);
- 300. - unionName = (unionName.length > 40 ? unionName.substr(0, 40) + '...' : unionName);
- 301. - elemNavigation.innerHTML = Ads.escapeValue(unionName);
- 302. - }
- 303. -
- 304. - var elemGeneralInfoHeader = ge('general_info_header_name_' + unionId);
- 305. - if (elemGeneralInfoHeader) {
- 306. - elemGeneralInfoHeader.innerHTML = Ads.escapeValue(unionName);
- 307. - }
- 308. - }
- 309. -
- 310. - Ads.openUnionsGeneralInfoBox = function(unionId, params) {
- 311. - var ajaxParams = {};
- 312. - ajaxParams.union_id = unionId;
- 313. - var showOptions = {params: params.options || {}};
- 314. - delete params.options;
- 315. - ajaxParams = extend({}, ajaxParams, params);
- 316. -
- 317. - showOptions.onFail = Ads.onBoxFail;
- 318. - showOptions.params.width = params.from_exchange ? 315: 300;
- 319. -
- 320. - showBox('/ads?act=a_unions_general_info_box', ajaxParams, showOptions);
- 321. - }
- 322. -
- 323. - Ads.openUnionCreateBox = function(unionId) {
- 324. - var ajaxParams = {}
- 325. - ajaxParams.union_id = unionId;
- 326. -
- 327. - var showOptions = {params: {}};
- 328. - showOptions.onFail = Ads.onBoxFail;
- 329. - showOptions.params.width = 250;
- 330. -
- 331. - showBox('/ads?act=a_union_create_box', ajaxParams, showOptions);
- 332. - }
- 333. -
- 334. - Ads.openDeleteUnionBox = function(unionType, unionId, hash, lock, unlock, updateStatus, newclass) {
- 335. - var boxTitle = '';
- 336. - var boxContent = '';
- 337. - switch (unionType) {
- 338. - case 'ad':
- 339. - boxTitle = getLang('ads_archive_box_ad_title');
- 340. - boxContent = getLang('ads_archive_box_ad_warning');
- 341. - break;
- 342. - case 'campaign':
- 343. - boxTitle = getLang('ads_archive_box_campaign_title');
- 344. - boxContent = getLang('ads_archive_box_campaign_warning');
- 345. - break;
- 346. - case 'client':
- 347. - boxTitle = getLang('ads_archive_box_client_title');
- 348. - boxContent = getLang('ads_archive_box_client_warning');
- 349. - break;
- 350. - }
- 351. -
- 352. - var boxOptions = {};
- 353. - boxOptions.title = boxTitle;
- 354. - boxOptions.bodyStyle = 'line-height: 160%;';
- 355. -
- 356. - cur.deleteConfirmBox = new MessageBox();
- 357. - cur.deleteConfirmBox.setOptions(boxOptions);
- 358. - cur.deleteConfirmBox.content(boxContent);
- 359. - cur.deleteConfirmBox.removeButtons();
- 360. - cur.deleteConfirmBox.addButton(getLang('box_cancel'), false, 'no');
- 361. - cur.deleteConfirmBox.addButton(getLang('ads_archive_box_action'), function() { Ads.deleteUnion(unionType, unionId, hash, lock, unlock, updateStatus, newclass); });
- 362. - cur.deleteConfirmBox.setControlsText('<img id="delete_union_progress" src="/images/upload.gif" style="top: 1px; display: none;">');
- 363. - cur.deleteConfirmBox.show();
- 364. - }
- 365. -
- 366. - Ads.deleteUnion = function(unionType, unionId, hash, lock, unlock, updateStatus, newclass) {
- 367. - if (!lockDeletion()) {
- 368. - return;
- 369. - }
- 370. -
- 371. - var ajaxParams = {};
- 372. - ajaxParams.union_id = unionId;
- 373. - ajaxParams.hash = hash;
- 374. - if (newclass) ajaxParams.newclass = 1;
- 375. -
- 376. - ajax.post('/ads?act=a_union_delete', ajaxParams, {onDone: onRequestComplete, onFail: onRequestComplete});
- 377. -
- 378. - function onRequestComplete(response) {
- 379. - unlockDeletion();
- 380. - if (!isObject(response) || response.error) {
- 381. - if (!isObject(response)) {
- 382. - showMessage(getLang('ads_error_unexpected_error_try_later'));
- 383. - } else {
- 384. - showMessage(response.error);
- 385. - }
- 386. - return true;
- 387. - }
- 388. - if (response && (response.ok || newclass == 2)) {
- 389. - var completeMessage = '';
- 390. - switch (unionType) {
- 391. - case 'ad': completeMessage = getLang('ads_archive_box_ad_complete'); break;
- 392. - case 'campaign': completeMessage = getLang('ads_archive_box_campaign_complete'); break;
- 393. - case 'client': completeMessage = getLang('ads_archive_box_client_complete'); break;
- 394. - }
- 395. - if (updateStatus) {
- 396. - if (newclass == 2) {
- 397. - updateStatus(response);
- 398. - } else {
- 399. - updateStatus(response.status, response.status_class, response.status_type, response.status_variants);
- 400. - }
- 401. - } else {
- 402. - showMessage(completeMessage, true, function() { nav.reload(); }, unionType);
- 403. - }
- 404. - }
- 405. - return true;
- 406. - }
- 407. -
- 408. - function showMessage(message, isSuccess, onHide, unionType) {
- 409. - var boxTitle = '';
- 410. - switch (unionType) {
- 411. - case 'ad': boxTitle = getLang('ads_archive_box_ad_title'); break;
- 412. - case 'campaign': boxTitle = getLang('ads_archive_box_campaign_title'); break;
- 413. - case 'client': boxTitle = getLang('ads_archive_box_client_title'); break;
- 414. - }
- 415. -
- 416. - var boxOptions = {};
- 417. - boxOptions.title = (isSuccess ? boxTitle : '������');
- 418. - boxOptions.width = 350;
- 419. - boxOptions.onHide = onHide;
- 420. - showFastBox(boxOptions, message);
- 421. - }
- 422. -
- 423. - function lockDeletion() {
- 424. - if (lock) {
- 425. - if (!lock()) {
- 426. - return false;
- 427. - }
- 428. - cur.deleteConfirmBox.hide();
- 429. - } else {
- 430. - if (cur.deleteUnionLocked) {
- 431. - return false;
- 432. - }
- 433. - cur.deleteUnionLocked = true;
- 434. - show('delete_union_progress');
- 435. - }
- 436. - return true;
- 437. - }
- 438. - function unlockDeletion() {
- 439. - if (unlock) {
- 440. - unlock()
- 441. - } else {
- 442. - cur.deleteUnionLocked = false;
- 443. - hide('delete_union_progress');
- 444. - }
- 445. - }
- 446. - }
- 447. -
- 448. - Ads.openHelpBox = function(type, unionId) {
- 449. - var ajaxParams = {}
- 450. - ajaxParams.type = type;
- 451. - ajaxParams.union_id = unionId;
- 452. -
- 453. - var showOptions = {params: {}};
- 454. - showOptions.onFail = Ads.onBoxFail;
- 455. - showOptions.cache = 1;
- 456. - showOptions.params.width = 450;
- 457. -
- 458. - showBox('/ads?act=a_help_text', ajaxParams, showOptions);
- 459. - }
- 460. -
- 461. - Ads.openCreateOfficeBox = function() {
- 462. - var ajaxParams = {};
- 463. -
- 464. - var showOptions = {params: {}};
- 465. - showOptions.onFail = Ads.onBoxFail;
- 466. - showOptions.params.width = 350;
- 467. -
- 468. - showBox('/ads?act=a_create_office_box', ajaxParams, showOptions);
- 469. - }
- 470. -
- 471. - Ads.createExportSubmitButton = function(elem, bindingId, topUnionId) {
- 472. - var postIframe = ce((browser.msie && browser.version < 9.0) ? '<iframe name="secret_iframe">' : 'iframe', {name: 'secret_iframe', id: 'secret_iframe'});
- 473. - postIframe.style.display = 'none';
- 474. - document.body.appendChild(postIframe);
- 475. - var topUnionIdParam = (topUnionId ? '&union_id=' + topUnionId : '');
- 476. - var postForm = ce('form', {method: 'post', action: '/ads?act=get_export_stats' + topUnionIdParam, target: 'secret_iframe'});
- 477. - document.body.appendChild(postForm);
- 478. - var valueNames = [
- 479. - 'group_time',
- 480. - 'group_ads',
- 481. - 'method',
- 482. - 'stats_type',
- 483. - 'from_day',
- 484. - 'from_month',
- 485. - 'from_year',
- 486. - 'to_day',
- 487. - 'to_month',
- 488. - 'to_year',
- 489. - 'Ids'
- 490. - ];
- 491. - var valueContainers = {};
- 492. - for (var i = 0; i < valueNames.length; i++) {
- 493. - var curName = valueNames[i];
- 494. - valueContainers[curName] = ce('input', {
- 495. - type: 'hidden',
- 496. - id: curName + '_container_' + bindingId,
- 497. - name: curName
- 498. - });
- 499. - postForm.appendChild(valueContainers[curName]);
- 500. - }
- 501. -
- 502. - var errorBox;
- 503. - var action = function() {
- 504. - var postData = {}, elem, day;
- 505. - elem = geByClass('grouping_time_' + bindingId)[0];
- 506. - if (!elem) return;
- 507. - valueContainers.group_time.value = elem.getIndex();
- 508. -
- 509. - elem = geByClass('grouping_ads_' + bindingId)[0];
- 510. - if (!elem) return;
- 511. - valueContainers.group_ads.value = elem.getIndex();
- 512. -
- 513. - elem = geByClass('client_choose_' + bindingId);
- 514. - if (elem.length > 0) {
- 515. - elem = elem[0];
- 516. - var curClientId = elem.getIndex();
- 517. - }
- 518. -
- 519. - elem = geByClass('export_method_' + bindingId)[0];
- 520. - if (!elem) return;
- 521. - valueContainers.method.value = elem.getIndex();
- 522. - if (valueContainers.method.value == 3/*Web-interface*/) {
- 523. - postForm.target = '';
- 524. - }
- 525. -
- 526. - elem = geByClass('stats_type_' + bindingId)[0];
- 527. - if (!elem) return;
- 528. - valueContainers.stats_type.value = elem.getIndex();
- 529. -
- 530. - day = cur.exportParamsData.start_time;
- 531. - valueContainers.from_day.value = day.day;
- 532. - valueContainers.from_month.value = day.month;
- 533. - valueContainers.from_year.value = day.year;
- 534. -
- 535. - day = cur.exportParamsData.stop_time;
- 536. - valueContainers.to_day.value = day.day;
- 537. - valueContainers.to_month.value = day.month;
- 538. - valueContainers.to_year.value = day.year;
- 539. -
- 540. - if ((new Date(valueContainers.to_year.value, valueContainers.to_month.value, valueContainers.to_day.value)) <
- 541. - (new Date(valueContainers.from_year.value, valueContainers.from_month.value, valueContainers.from_day.value))) {
- 542. - showFastBox(getLang('ads_error_box_title'), getLang('ads_error_export_stat_invalid_period'));
- 543. - return;
- 544. - }
- 545. -
- 546. - var ids = [];
- 547. -
- 548. - elem = ge('paginated_table');
- 549. - var pt = elem.tableObj;
- 550. - var selection = pt.getSelection(0);
- 551. - switch (parseInt(valueContainers.group_ads.value)) {
- 552. - case 0:
- 553. - ids.push(elem.topId);
- 554. - break;
- 555. - case 1:
- 556. - for (var j = 0; j < selection.length; j++) {
- 557. - var clId = pt.content.extra['union_id'][selection[j]];
- 558. - ids.push(clId);
- 559. - }
- 560. - break;
- 561. - case 2:
- 562. - if (curClientId == 'aca') {
- 563. - for (var p in elem.contentDep) {
- 564. - if (!isNaN(Number(p))) {
- 565. - for (var i in elem.contentDep[p].extra['union_id']) {
- 566. - ids.push(elem.contentDep[p].extra['union_id'][i]);
- 567. - }
- 568. - }
- 569. - }
- 570. - } else {
- 571. - for (var i = 0; i < selection.length; i++) {
- 572. - ids.push(pt.content.extra['union_id'][selection[i]]);
- 573. - }
- 574. - }
- 575. - break;
- 576. - case 3:
- 577. - for (var i = 0; i < selection.length; i++) {
- 578. - ids.push(pt.content.extra['union_id'][selection[i]]);
- 579. - }
- 580. - break;
- 581. - default:
- 582. - return;
- 583. - }
- 584. -
- 585. - if (ids.length == 0) {
- 586. - showFastBox(getLang('ads_error_box_title'), getLang('ads_error_export_stat_no_campaigns_selected'));
- 587. - return;
- 588. -
- 589. - }
- 590. -
- 591. - valueContainers.Ids.value = '' + ids.join(',');
- 592. -
- 593. - postForm.submit();
- 594. - };
- 595. -
- 596. - createButton(elem, action);
- 597. - }
- 598. -
- 599. - Ads.createStaticDatePicker = function(elem, bindingId, classid, defaultDate) {
- 600. - elem = ge(elem);
- 601. - if (classid) elem.className = classid + '_' + bindingId;
- 602. -
- 603. - var spanDay = ce('span', {id: elem.id + '_day'}),
- 604. - spanMonth = ce('span', {id: elem.id + '_month'});
- 605. -
- 606. - if (!cur.exportParamsData) {
- 607. - cur.exportParamsData = {};
- 608. - }
- 609. - cur.exportParamsData[classid] = defaultDate;
- 610. -
- 611. - var params = {
- 612. - mode: 'd',
- 613. - day: defaultDate.day,
- 614. - month: defaultDate.month,
- 615. - year: defaultDate.year,
- 616. - width: 124,
- 617. - pastActive: true,
- 618. - onUpdate: function(d, m) {
- 619. - if (m == 'h') {
- 620. - cur.exportParamsData[classid].day = defaultDate.day;
- 621. - cur.exportParamsData[classid].month = defaultDate.month;
- 622. - cur.exportParamsData[classid].year = defaultDate.year;
- 623. - return;
- 624. - }
- 625. - if (m == 'd') {
- 626. - cur.exportParamsData[classid].day = d.d;
- 627. - } else if (m == 'm') {
- 628. - cur.exportParamsData[classid].day = 1;
- 629. - }
- 630. - cur.exportParamsData[classid].month = d.m;
- 631. - cur.exportParamsData[classid].year = d.y;
- 632. - }
- 633. - };
- 634. -
- 635. - if (!cur.exportUi) {
- 636. - cur.exportUi = {};
- 637. - }
- 638. - cur.exportUi[classid] = new Datepicker(elem, params);
- 639. - }
- 640. -
- 641. - Ads.openInnerTable = function(id, bindingId) {
- 642. - if (!id) id = 'acl';
- 643. -
- 644. - var tab = ge('paginated_table');
- 645. -
- 646. - var newOptions;
- 647. - switch (id) {
- 648. - case 'cli':
- 649. - newOptions = tab.optionsDep['cli'];
- 650. - break;
- 651. - case 'aca':
- 652. - case 'acl':
- 653. - newOptions = tab.optionsDep['default'];
- 654. - break;
- 655. - default:
- 656. - newOptions = tab.optionsDep['cam'];
- 657. - break;
- 658. - }
- 659. -
- 660. - if (id in tab.contentDep && tab.contentDep[id]) {
- 661. - var newContent = tab.contentDep[id];
- 662. - tab.tableObj.setOptions(newOptions);
- 663. - tab.tableObj.setContent(newContent);
- 664. - tab.tableObj.applyData();
- 665. - } else {
- 666. - function onDone(data) {
- 667. - var newContent = data;
- 668. - tab.contentDep[id] = newContent;
- 669. - tab.tableObj.setOptions(newOptions);
- 670. - tab.tableObj.setContent(newContent);
- 671. - tab.tableObj.applyData();
- 672. - hide('getting_campaigns_upload');
- 673. - }
- 674. - function onFail() {
- 675. - hide('getting_campaigns_upload');
- 676. - return true;
- 677. - };
- 678. - show('getting_campaigns_upload');
- 679. - ajax.post('/ads?act=a_get_client_children', {client_id: id}, {onDone: onDone, onFail: onFail});
- 680. - }
- 681. - }
- 682. -
- 683. - Ads.createStaticDropdownMenuAds = function(elem, bindingId, values, params) {
- 684. - elem = ge(elem);
- 685. -
- 686. - if (params.classname) elem.className = params.classname + '_' + bindingId;
- 687. - elem.className = elem.className + ' dd_link';
- 688. -
- 689. - elem.valueList = values;
- 690. - elem.getValue = function() {return elem.value;}
- 691. - elem.getIndex = function() {
- 692. - if (elem.index !== undefined) return elem.index;
- 693. -
- 694. - for (var i = 0; i < elem.valueList.length; i++) {
- 695. - if (elem.valueList[i][1] == elem.value) {
- 696. - return elem.valueList[i][0];
- 697. - }
- 698. - }
- 699. - return -1;
- 700. - }
- 701. -
- 702. - if (params.classname == 'client_choose') {
- 703. - onDomReady(function() {
- 704. - hide(geByClass('client_choose_row_' + bindingId)[0]);
- 705. - });
- 706. - }
- 707. - params.updateHeader = function(i, t) {
- 708. - if (!i) i = 'aca';
- 709. - Ads.openInnerTable(i, bindingId);
- 710. - elem.index = i;
- 711. - elem.value = t;
- 712. - return t;
- 713. - }
- 714. - params.onSelect = function(value) {
- 715. - if (value === undefined) value = uiDropdown.val();
- 716. - elem.value = value;
- 717. - elem.innerHTML = value;
- 718. - };
- 719. - params.target = elem;
- 720. - params.showHover = true;
- 721. - //params.alwaysMenuToUp = true;
- 722. -
- 723. - params.onSelect(values[0][1]);
- 724. -
- 725. - elem.uiDropdown = new DropdownMenu(values, params);
- 726. - Ads.makeDDScrollable(elem.uiDropdown);
- 727. - }
- 728. -
- 729. - // threshold is height of container
- 730. - Ads.makeDDScrollable = function(dd, threshold) {
- 731. - if (!dd) return;
- 732. - if (threshold === undefined) {
- 733. - threshold = 300;
- 734. - }
- 735. -
- 736. - var uiBody = dd.body,
- 737. - uiTable = geByClass('dd_menu_rows', uiBody)[0].firstChild,
- 738. - uiTableS = getSize(uiBody),
- 739. - uiTableW = uiTableS[0],
- 740. - uiTableH = uiTableS[1] - 4, // dont understand why
- 741. - barW = 6,
- 742. - barH = Math.max(20, intval(threshold * threshold / uiTableH)),
- 743. - scrollBar = ce('div', {className: 'ads_dropdown_menu_scrollbar'}, {
- 744. - top: barH / 10,
- 745. - right: 3,
- 746. - width: barW,
- 747. - height: barH
- 748. - });
- 749. -
- 750. - if (uiTableH < threshold) {
- 751. - return;
- 752. - }
- 753. -
- 754. - setStyle(uiTable.parentNode, {
- 755. - overflowY: 'hidden',
- 756. - height: threshold
- 757. - });
- 758. - uiBody.appendChild(scrollBar);
- 759. - setStyle(uiTable, 'position', 'relative');
- 760. -
- 761. - var startY = null,
- 762. - startTop = 0,
- 763. - hoverState = 0,
- 764. - hoverTimer = null;
- 765. - var onScroll = function(e) {
- 766. - var oldTop = parseFloat(getStyle(uiTable, 'top'));
- 767. - if (isNaN(oldTop)) {
- 768. - oldTop = 0;
- 769. - }
- 770. -
- 771. - var delta = e.wheelDelta ? e.wheelDelta / 120 : -e.detail / 3;
- 772. - scrollBody(oldTop + delta * 20);
- 773. -
- 774. - if (hoverTimer) {
- 775. - clearTimeout(hoverTimer);
- 776. - } else {
- 777. - doHover(1);
- 778. - }
- 779. - hoverTimer = setTimeout(function() {
- 780. - hoverTimer = null;
- 781. - doHover(-1);
- 782. - }, 200);
- 783. -
- 784. - cancelEvent(e);
- 785. - return false;
- 786. - }
- 787. - var onMouseMove = function(e) {
- 788. - if (startY === null) return;
- 789. - var y = e.pageY;
- 790. - var localD = startY - y,
- 791. - delta = 1.0 * localD * (uiTableH - threshold) / (threshold - barH - 5);
- 792. - scrollBody(startTop + delta);
- 793. - }
- 794. - var scrollBody = function(newTop) {
- 795. - newTop = Math.min(0, newTop);
- 796. - newTop = Math.max(-uiTableH + threshold, newTop);
- 797. -
- 798. - var barTop = 3 - 1.0 * newTop / (uiTableH - threshold) * (threshold - barH - 5);
- 799. - setStyle(uiTable, 'top', newTop);
- 800. - setStyle(scrollBar, 'top', barTop);
- 801. - }
- 802. - var onDown = function(e) {
- 803. - startY = e.pageY;
- 804. - startTop = parseFloat(getStyle(uiTable, 'top'));
- 805. - if (isNaN(startTop)) startTop = 0;
- 806. -
- 807. - doHover(1);
- 808. - cancelEvent(e);
- 809. - }
- 810. - var onUp = function(e) {
- 811. - if (startY !== null) {
- 812. - doHover(-1);
- 813. - }
- 814. - startY = null;
- 815. - }
- 816. - var doHover = function(dh) {
- 817. - hoverState += dh;
- 818. - if (hoverState == 0) removeClass(scrollBar, 'hovered');
- 819. - if (hoverState == 1) addClass(scrollBar, 'hovered');
- 820. - }
- 821. -
- 822. - dd.options.onShow = function() {
- 823. - scrollBody(100000);
- 824. - }
- 825. - addEvent(uiBody, 'mousewheel DOMMouseScroll', onScroll);
- 826. - addEvent(scrollBar, 'mousedown', onDown);
- 827. - addEvent(document.body, 'mouseup dragend', onUp);
- 828. - addEvent(uiBody, 'mousemove', onMouseMove);
- 829. -
- 830. - cur.destroy.push(function() {
- 831. - removeEvent(uiBody, 'mousewheel DOMMouseScroll', onScroll);
- 832. - removeEvent(scrollBar, 'mousedown', onDown);
- 833. - removeEvent(document.body, 'mouseup dragend', onUp);
- 834. - removeEvent(uiBody, 'mousemove', onMouseMove);
- 835. - });
- 836. - }
- 837. -
- 838. - // params must be ready to go to contructor
- 839. - Ads.createStaticDropdown = function(elem, bindingId, values, params) {
- 840. - elem = ge(elem);
- 841. - if (params.classname) elem.className = params.classname + '_' + bindingId;
- 842. - elem.className = elem.className + ' dd_link';
- 843. -
- 844. - elem.valueList = values;
- 845. - elem.getValue = function() {return elem.value;}
- 846. - elem.getIndex = function() {
- 847. - if (elem.index !== undefined) return elem.index;
- 848. -
- 849. - for (var i = 0; i < elem.valueList.length; i++) {
- 850. - if (elem.valueList[i][1] == elem.value) {
- 851. - return elem.valueList[i][0];
- 852. - }
- 853. - }
- 854. - return -1;
- 855. - }
- 856. -
- 857. - if (params.classname == 'client_choose') {
- 858. - onDomReady(function() {
- 859. - hide(geByClass('client_choose_row_' + bindingId)[0]);
- 860. - });
- 861. - }
- 862. -
- 863. - params.updateHeader = function(i, t) {
- 864. - if (!i) i = 0;
- 865. - //
- 866. - // grouping_time
- 867. - //
- 868. - if (elem.className.substring(0, 'grouping_time'.length) == 'grouping_time') {
- 869. - var modes = ['d', 'm', 'h'];
- 870. - cur.exportUi['start_time'].setMode(modes[i]);
- 871. - cur.exportUi['stop_time'].setMode(modes[i]);
- 872. - } else
- 873. - //
- 874. - // client_choose
- 875. - //
- 876. - if (elem.className.substring(0, 'client_choose'.length) == 'client_choose') {
- 877. - if (!i) i = 'aca';
- 878. - Ads.openInnerTable(i, bindingId);
- 879. - } else
- 880. - //
- 881. - // grouping_ads
- 882. - //
- 883. - if (elem.className.substring(0, 'grouping_ads'.length) == 'grouping_ads') {
- 884. - var label_el;
- 885. - switch (i) {
- 886. - case 0:
- 887. - hide(geByClass('client_choose_row_' + bindingId)[0]);
- 888. - Ads.openInnerTable('acl', bindingId);
- 889. -
- 890. - label_el = ge('unions_table_label_' + bindingId);
- 891. - label_el.innerHTML = getLang('ads_export_stat_data_title_campaigns');
- 892. - break;
- 893. - case 1:
- 894. - hide(geByClass('client_choose_row_' + bindingId)[0]);
- 895. - Ads.openInnerTable('cli', bindingId);
- 896. -
- 897. - label_el = ge('unions_table_label_' + bindingId);
- 898. - label_el.innerHTML = getLang('ads_export_stat_data_title_clients');
- 899. - break;
- 900. - case 2:
- 901. - var chser = geByClass('client_choose_' + bindingId)[0];
- 902. - var dd = chser.uiDropdown;
- 903. -
- 904. - var text = dd.options.updateHeader(0, chser.valueList[0][1]);
- 905. - dd.header.innerHTML = '<div>' + text + '</div>';
- 906. - if (dd.options.target) dd.options.target.innerHTML = text;
- 907. -
- 908. - show(geByClass('client_choose_row_' + bindingId)[0]);
- 909. - Ads.openInnerTable('aca', bindingId);
- 910. -
- 911. - label_el = ge('unions_table_label_' + bindingId);
- 912. - label_el.innerHTML = getLang('ads_export_stat_data_title_campaigns');
- 913. - break;
- 914. - case 3:
- 915. - Ads.openInnerTable('cam', bindingId);
- 916. - default:
- 917. - break;
- 918. - }
- 919. - }
- 920. -
- 921. - elem.index = i;
- 922. - elem.value = t;
- 923. - return t;
- 924. - }
- 925. - params.onSelect = function(value) {
- 926. - if (value === undefined) value = uiDropdown.val();
- 927. - elem.value = value;
- 928. - elem.innerHTML = value;
- 929. - };
- 930. - params.target = elem;
- 931. - params.showHover = true;
- 932. - //params.alwaysMenuToUp = true;
- 933. -
- 934. - params.onSelect(values[0][1]);
- 935. -
- 936. - elem.uiDropdown = new DropdownMenu(values, params);
- 937. - }
- 938. -
- 939. - Ads.createInlineStaticEdit = function(editElem, bindingId, params) {
- 940. - if (!params) params = {};
- 941. - editElem = ge(editElem);
- 942. - if (params.classname) editElem.className = params.classname + '_' + bindingId;
- 943. -
- 944. - var uiTimeDay, uiTimeMonth, uiTimeYear, uiAbstractDropdown;
- 945. -
- 946. - if (!params['type'] && !params['values']) return false;
- 947. -
- 948. - var defaultValue;
- 949. - if (params['default']) {
- 950. - defaultValue = params['default'];
- 951. - }
- 952. -
- 953. - var type = params['type'] || 'dropdown';
- 954. -
- 955. - switch (type) {
- 956. - case 'dropdown':
- 957. - if (params['values'] === undefined) {
- 958. - return false;
- 959. - }
- 960. - if (defaultValue === undefined) {
- 961. - defaultValue = 0;
- 962. - }
- 963. - break;
- 964. - case 'time':
- 965. - break;
- 966. - default:
- 967. - break;
- 968. - }
- 969. -
- 970. - monthNames = [
- 971. - getLang('ads_jan'),
- 972. - getLang('ads_feb'),
- 973. - getLang('ads_mar'),
- 974. - getLang('ads_apr'),
- 975. - getLang('ads_may'),
- 976. - getLang('ads_jun'),
- 977. - getLang('ads_jul'),
- 978. - getLang('ads_aug'),
- 979. - getLang('ads_sep'),
- 980. - getLang('ads_oct'),
- 981. - getLang('ads_nov'),
- 982. - getLang('ads_dec')
- 983. - ];
- 984. - saveValue(defaultValue);
- 985. -
- 986. - function saveValue(newValue) {
- 987. - editElem.value = newValue;
- 988. -
- 989. - var newText = '';
- 990. - switch (type) {
- 991. - case 'time':
- 992. - if (newValue && newValue.day && newValue.month && newValue.year) {
- 993. - newText = newValue.day + ' ' + monthNames[newValue.month - 1] + ' ' + newValue.year;
- 994. - }
- 995. - break;
- 996. - case 'dropdown':
- 997. - if (parseInt(newValue) !== undefined) {
- 998. - newText = params['values'][parseInt(newValue)];
- 999. - } else
- 1000. - if (typeof newValue == 'string') {
- 1001. - newText = newValue;
- 1002. - } else {
- 1003. - for (var index in newValue) {
- 1004. - saveValue.call(this, newValue[index]);
- 1005. - return;
- 1006. - }
- 1007. - }
- 1008. - break;
- 1009. - default:
- 1010. - break;
- 1011. - }
- 1012. -
- 1013. - applyNewValue.call(this, newValue, newText);
- 1014. - }
- 1015. - function applyNewValue(newValue, newText) {
- 1016. - editElem.value = newValue;
- 1017. - editElem.innerHTML = newText;
- 1018. - }
- 1019. - function checkValue(value) {
- 1020. - return true;
- 1021. - }
- 1022. - function showLongError(error) {
- 1023. - showFastBox(getLang('ads_error_box_title'), error);
- 1024. - }
- 1025. - function updateTimeDays(month) {
- 1026. - uiTimeDay.setData(getDays(month));
- 1027. - }
- 1028. -
- 1029. - //
- 1030. - // Helpers
- 1031. - //
- 1032. - function getDays(month, year) {
- 1033. - var ret = [], days = [0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
- 1034. - if (!year) year = (new Date()).getFullYear();
- 1035. - if (month == 2 && year % 4 == 0) {
- 1036. - days[2] = 29
- 1037. - }
- 1038. - for (var i = 1, days = days[month]; i <= days; i++) {
- 1039. - ret.push(i);
- 1040. - }
- 1041. - return ret;
- 1042. - }
- 1043. - function getMonths() {
- 1044. - var months = [];
- 1045. - for (var i = 1; i <= 12; i++) {
- 1046. - months.push([i, monthNames[i - 1]]);
- 1047. - }
- 1048. - return months;
- 1049. - }
- 1050. - function getYears() {
- 1051. - var ret = [];
- 1052. - var curY = (new Date()).getFullYear();
- 1053. - for (var i = curY; i >= curY - 10; i--) {
- 1054. - ret.push(i);
- 1055. - }
- 1056. - return ret;
- 1057. - }
- 1058. - function getAssocFromValues(array) {
- 1059. - var res = [];
- 1060. - for (var i = 0; i < array.length; i++) {
- 1061. - res.push([i, array[i]]);
- 1062. - }
- 1063. - return res;
- 1064. - }
- 1065. -
- 1066. - //
- 1067. - // Events
- 1068. - //
- 1069. - function afterInit() {
- 1070. - var self = this;
- 1071. -
- 1072. - switch (type) {
- 1073. - case 'time':
- 1074. - uiTimeDay = new Dropdown(
- 1075. - geByClass('inline_time_day', this.contentTable)[0],
- 1076. - getDays(1),
- 1077. - {width: 45, height: 150, selectedItem: 1}
- 1078. - );
- 1079. - uiTimeMonth = new Dropdown(
- 1080. - geByClass('inline_time_month', this.contentTable)[0],
- 1081. - getMonths(),
- 1082. - {width: 80, height: 150, selectedItem: 1, onChange: function(value) { updateTimeDays.call(this, value); }}
- 1083. - );
- 1084. - uiTimeYear = new Dropdown(
- 1085. - geByClass('inline_time_year', this.contentTable)[0],
- 1086. - getYears(),
- 1087. - {width: 65, height: 150, selectedItem: (new Date()).getFullYear()}
- 1088. - );
- 1089. - break;
- 1090. -
- 1091. - case 'dropdown':
- 1092. - uiAbstractDropdown = new Dropdown(
- 1093. - geByClass('ads_inline_dropdown', this.contentTable)[0],
- 1094. - getAssocFromValues(params['values']),
- 1095. - {height: 150, selectedItem: 0}
- 1096. - );
- 1097. - break;
- 1098. -
- 1099. - default:
- 1100. - break;
- 1101. - }
- 1102. - }
- 1103. - function onBeforeShow() {
- 1104. - switch (type) {
- 1105. - case 'time':
- 1106. - if (defaultValue && defaultValue.day && defaultValue.month && defaultValue.year) {
- 1107. - uiTimeDay.val(defaultValue.day);
- 1108. - uiTimeMonth.val(defaultValue.month);
- 1109. - uiTimeYear.val(defaultValue.year);
- 1110. - } else {
- 1111. - editElem.innerHTML = "�� ������";
- 1112. - }
- 1113. - break;
- 1114. -
- 1115. - case 'dropdown':
- 1116. - uiAbstractDropdown.val(defaultValue);
- 1117. - break;
- 1118. -
- 1119. - default:
- 1120. - break;
- 1121. - }
- 1122. - }
- 1123. - function onShow() {
- 1124. - }
- 1125. - function onConfirm() {
- 1126. - var newValue;
- 1127. - if (type == 'time') {
- 1128. - newValue = {};
- 1129. - newValue.day = uiTimeDay.val();
- 1130. - newValue.month = uiTimeMonth.val();
- 1131. - newValue.year = uiTimeYear.val();
- 1132. - } else
- 1133. - if (type == 'dropdown') {
- 1134. - newValue = uiAbstractDropdown.val();
- 1135. - }
- 1136. -
- 1137. - saveValue.call(this, newValue);
- 1138. - return true;
- 1139. - }
- 1140. -
- 1141. - var options = {
- 1142. - afterInit: afterInit,
- 1143. - onBeforeShow: onBeforeShow,
- 1144. - onShow: onShow,
- 1145. - onConfirm: onConfirm
- 1146. - };
- 1147. -
- 1148. - switch (type) {
- 1149. - case 'time':
- 1150. - options.contentHTML =
- 1151. - '<tr>' +
- 1152. - '<td colspan="2">' +
- 1153. - '<table class="ads_inline_edit_table">' +
- 1154. - '<tr>' +
- 1155. - '<td style="white-space: nowrap; width: 200px;">' +
- 1156. - '<table class="ads_inline_edit_table">' +
- 1157. - '<tr>' +
- 1158. - '<td style="padding-right: 5px;"><input type="text" class="inline_time_day text" style="width: 30px;" /></td>' +
- 1159. - '<td style="padding-right: 5px;"><input type="text" class="inline_time_month text" style="width: 30px;" /></td>' +
- 1160. - '<td style="padding-right: 5px;"><input type="text" class="inline_time_year text" style="width: 30px;" /></td>' +
- 1161. - '</tr>' +
- 1162. - '</table>' +
- 1163. - '</td>' +
- 1164. - '</tr>' +
- 1165. - '</table>' +
- 1166. - '</td>' +
- 1167. - '</tr>';
- 1168. - break;
- 1169. - case 'dropdown':
- 1170. - options.contentHTML =
- 1171. - '<tr>' +
- 1172. - '<td colspan="2">' +
- 1173. - '<table class="ads_inline_edit_table" style="width: 100%;">' +
- 1174. - '<tr><td><input type="text" class="ads_inline_dropdown text" /></td></tr>' +
- 1175. - '</table>' +
- 1176. - '</td>' +
- 1177. - '</tr>';
- 1178. - break;
- 1179. - default:
- 1180. - break;
- 1181. - }
- 1182. -
- 1183. - new InlineEdit(editElem, options);
- 1184. - }
- 1185. -
- 1186. - Ads.onInlineEditClick = function(elem, callback, rown, coln) {
- 1187. - var _t = this;
- 1188. -
- 1189. - var editElem = elem,
- 1190. - progressElem = _t.content.extra.progress_elem[rown][coln],
- 1191. - unionId = _t.content.extra.union_id[rown][coln],
- 1192. - unionType = _t.content.extra.union_type[rown][coln],
- 1193. - valueType = _t.content.extra.value_type[rown][coln],
- 1194. - initValue = _t.content.extra.init_value[rown][coln],
- 1195. - hash = _t.content.extra.hash[rown][coln],
- 1196. - additionalParams = extend(_t.content.extra.additional_params[rown][coln], {
- 1197. - valCallback: function(val) {
- 1198. - callback({
- 1199. - value: val,
- 1200. - extra: {
- 1201. - init_value: val
- 1202. - }
- 1203. - });
- 1204. - }
- 1205. - });
- 1206. -
- 1207. - var ret = Ads.createInlineEdit(editElem, progressElem, unionType, unionId, valueType, initValue, hash, additionalParams);
- 1208. - ret.obj.show();
- 1209. - }
- 1210. -
- 1211. - Ads.createInlineEdit = function(editElem, progressElem, unionType, unionId, valueType, initValue, hash, additionalParams) {
- 1212. - editElem = ge(editElem);
- 1213. - progressElem = ge(progressElem);
- 1214. - var defaultValue = initValue;
- 1215. - var bad_this = this;
- 1216. -
- 1217. - var uiTimeDay, uiTimeMonth, uiTimeHour;
- 1218. -
- 1219. - var valueGeneralType;
- 1220. - switch (valueType) {
- 1221. - case 'cost_per_click':
- 1222. - valueGeneralType = 'cost_per_click';
- 1223. - break;
- 1224. - case 'day_limit':
- 1225. - case 'month_limit':
- 1226. - case 'all_limit':
- 1227. - case 'contract_limit':
- 1228. - valueGeneralType = 'limit';
- 1229. - break;
- 1230. - case 'start_time':
- 1231. - case 'stop_time':
- 1232. - valueGeneralType = 'time';
- 1233. - break;
- 1234. - default:
- 1235. - valueGeneralType = 'text';
- 1236. - break;
- 1237. - }
- 1238. -
- 1239. - function saveValue(newValue, isRemoveValue) {
- 1240. -
- 1241. - if (valueGeneralType == 'limit') {
- 1242. - if ((!isRemoveValue && defaultValue == newValue) || (isRemoveValue && defaultValue == 0)) {
- 1243. - if (isRemoveValue) {
- 1244. - this.hide();
- 1245. - }
- 1246. - return;
- 1247. - }
- 1248. - } else {
- 1249. - if (defaultValue == newValue) {
- 1250. - return;
- 1251. - }
- 1252. - }
- 1253. -
- 1254. - var unknownError = getLang('ads_error_unexpected_error_try_later');
- 1255. -
- 1256. - var params = {};
- 1257. - params.union_id = unionId;
- 1258. - params.hash = hash;
- 1259. - extend(params, additionalParams);
- 1260. -
- 1261. - if (isRemoveValue) {
- 1262. - params[valueType] = 0;
- 1263. - } else {
- 1264. - if (valueGeneralType == 'time') {
- 1265. - params[valueType + '_day'] = newValue.day;
- 1266. - params[valueType + '_month'] = newValue.month;
- 1267. - params[valueType + '_hour'] = newValue.hour;
- 1268. - } else {
- 1269. - params[valueType] = newValue;
- 1270. - }
- 1271. - }
- 1272. -
- 1273. - var self = this;
- 1274. -
- 1275. - function onAjaxComplete(response) {
- 1276. - if (isObject(response)) {
- 1277. - if (response.error) {
- 1278. - showLongError.call(self, response.error);
- 1279. - } else if (!response.not_changed) {
- 1280. - if ((valueType + '_value') in response) {
- 1281. - applyNewValue.call(self, response[valueType + '_value'], response[valueType + '_text']);
- 1282. - } else if (response[valueType + '_value_day']) {
- 1283. - var newValue = {};
- 1284. - newValue.day = response[valueType + '_value_day'];
- 1285. - newValue.month = response[valueType + '_value_month'];
- 1286. - newValue.hour = response[valueType + '_value_hour'];
- 1287. - applyNewValue.call(self, newValue, response[valueType + '_text']);
- 1288. - } else {
- 1289. - showLongError.call(self, unknownError);
- 1290. - }
- 1291. - }
- 1292. - } else {
- 1293. - showLongError.call(self, unknownError);
- 1294. - }
- 1295. -
- 1296. - hide(progressElem);
- 1297. - show(editElem);
- 1298. -
- 1299. - return true;
- 1300. - }
- 1301. - ajax.post('/ads?act=a_unions_general_info_save', params, {onDone: onAjaxComplete, onFail: onAjaxComplete});
- 1302. -
- 1303. - hide(editElem);
- 1304. - show(progressElem);
- 1305. - if (isRemoveValue) {
- 1306. - this.hide();
- 1307. - }
- 1308. - }
- 1309. - function applyNewValue(newValue, newText) {
- 1310. - if (valueType == 'name') {
- 1311. - Ads.updateUnionName(unionId, newText);
- 1312. - }
- 1313. - defaultValue = newValue;
- 1314. - if (additionalParams.valCallback) {
- 1315. - additionalParams.valCallback(newValue);
- 1316. - } else {
- 1317. - editElem.innerHTML = newText;
- 1318. - }
- 1319. - }
- 1320. - function checkValue(value) {
- 1321. - switch (valueGeneralType) {
- 1322. - case 'cost_per_click':
- 1323. - if (value == '' || value == '0' || value == 0) {
- 1324. - return (additionalParams.is_cost_per_click ? getLang('ads_error_cost_per_click_no_value') : getLang('ads_error_cost_per_views_no_value'));
- 1325. - }
- 1326. - if (!value.match(/[0-9.,]/)) {
- 1327. - return (additionalParams.is_cost_per_click ? getLang('ads_error_cost_per_click_invalid_value') : getLang('ads_error_cost_per_views_invalid_value'));
- 1328. - }
- 1329. - value = value.replace(',', '.');
- 1330. -
- 1331. - var valueFloat = parseFloat(value);
- 1332. - var suffixesAll = '';
- 1333. - suffixesAll += (additionalParams.is_cost_per_click ? '_click' : '_views');
- 1334. - suffixesAll += (additionalParams.is_exclusive_ad ? '_exclusive' : '');
- 1335. - suffixesAll += (additionalParams.is_app_admin ? '_app' : '');
- 1336. - var minValue = cur.unionsLimits['cost_per' + suffixesAll + '_min'];
- 1337. - var maxValue = cur.unionsLimits['cost_per' + suffixesAll + '_max'];
- 1338. - var minErrorLangKey = (additionalParams.is_cost_per_click ? 'ads_error_cost_per_click_min_value' : 'ads_error_cost_per_views_min_value');
- 1339. - var maxErrorLangKey = (additionalParams.is_cost_per_click ? 'ads_error_cost_per_click_max_value' : 'ads_error_cost_per_views_max_value');
- 1340. - if (valueFloat < minValue) {
- 1341. - return getLang(minErrorLangKey).replace('{money}', getLang('global_money_amount_rub', minValue));
- 1342. - }
- 1343. - if (valueFloat > maxValue) {
- 1344. - return getLang(maxErrorLangKey).replace('{money}', getLang('global_money_amount_rub', maxValue));
- 1345. - }
- 1346. -
- 1347. - if (!value.match(cur.unionsLimits.cost_per_click_pattern)) {
- 1348. - return (additionalParams.is_cost_per_click ? getLang('ads_error_cost_per_click_invalid_value') : getLang('ads_error_cost_per_views_invalid_value'));
- 1349. - }
- 1350. - return true;
- 1351. - case 'limit':
- 1352. - if (value == '' || value == '0' || value == 0) {
- 1353. - return getLang('ads_error_limit_no_value');
- 1354. - }
- 1355. - if (!value.match(/[0-9.,]/)) {
- 1356. - return getLang('ads_error_limit_invalid_value');
- 1357. - }
- 1358. - if (value.indexOf('.') != -1 || value.indexOf(',') != -1) {
- 1359. - return getLang('ads_error_limit_integer_value');
- 1360. - }
- 1361. - if (parseInt(value) < cur.unionsLimits.limit_min) {
- 1362. - return getLang('ads_error_limit_min_value').replace('{money}', getLang('global_money_amount_rub', cur.unionsLimits.limit_min));
- 1363. - }
- 1364. - if (parseInt(value) > cur.unionsLimits.limit_max) {
- 1365. - return getLang('ads_error_limit_large_value');
- 1366. - }
- 1367. - if (!value.match(cur.unionsLimits.limit_pattern)) {
- 1368. - return getLang('ads_error_limit_invalid_value');
- 1369. - }
- 1370. - return true;
- 1371. - }
- 1372. - switch (valueType) {
- 1373. - case 'name':
- 1374. - if (value == '') {
- 1375. - if (unionType == 4) { // Top union
- 1376. - // Nothing
- 1377. - } else if (unionType == 2) {
- 1378. - return getLang('ads_error_client_name_no_value');
- 1379. - } else if (unionType == 1) {
- 1380. - return getLang('ads_error_campaign_name_no_value');
- 1381. - }
- 1382. - }
- 1383. - return true;
- 1384. - }
- 1385. - if (additionalParams.server_check) {
- 1386. - return true;
- 1387. - } else {
- 1388. - return false;
- 1389. - }
- 1390. - }
- 1391. -
- 1392. - function showFastError(error) {
- 1393. - geByClass('ads_inline_fast_error', this.fastErrorRow)[0].innerHTML = error;
- 1394. - show(this.fastErrorRow);
- 1395. - }
- 1396. - function hideFastError() {
- 1397. - hide(this.fastErrorRow);
- 1398. - geByClass('ads_inline_fast_error', this.fastErrorRow)[0].innerHTML = '';
- 1399. - }
- 1400. - function showLongError(error) {
- 1401. - showFastBox(getLang('ads_error_box_title'), error);
- 1402. - }
- 1403. - function removeValue() {
- 1404. - saveValue.call(this, false, true);
- 1405. - return true;
- 1406. - }
- 1407. - function updateTimeDays(month) {
- 1408. - uiTimeDay.setData(getDays(month));
- 1409. - }
- 1410. -
- 1411. - //
- 1412. - // Helpers
- 1413. - //
- 1414. - function getDays(month) {
- 1415. - var ret = [], days = [0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
- 1416. - if (month == 2 && (new Date()).getFullYear() % 4 == 0) {
- 1417. - days[2] = 29
- 1418. - }
- 1419. - for (var i = 1, days = days[month]; i <= days; i++) {
- 1420. - ret.push(i);
- 1421. - }
- 1422. - return ret;
- 1423. - }
- 1424. - function getMonths() {
- 1425. - var months = [];
- 1426. - months.push([1, getLang('ads_jan')]);
- 1427. - months.push([2, getLang('ads_feb')]);
- 1428. - months.push([3, getLang('ads_mar')]);
- 1429. - months.push([4, getLang('ads_apr')]);
- 1430. - months.push([5, getLang('ads_may')]);
- 1431. - months.push([6, getLang('ads_jun')]);
- 1432. - months.push([7, getLang('ads_jul')]);
- 1433. - months.push([8, getLang('ads_aug')]);
- 1434. - months.push([9, getLang('ads_sep')]);
- 1435. - months.push([10, getLang('ads_oct')]);
- 1436. - months.push([11, getLang('ads_nov')]);
- 1437. - months.push([12, getLang('ads_dec')]);
- 1438. - return months;
- 1439. - }
- 1440. - function getHours() {
- 1441. - var ret = [];
- 1442. - for (var i = 0; i < 24; i++) {
- 1443. - ret.push([i, i + ':00']);
- 1444. - }
- 1445. - return ret;
- 1446. - }
- 1447. -
- 1448. - //
- 1449. - // Events
- 1450. - //
- 1451. - function afterInit() {
- 1452. - var self = this;
- 1453. -
- 1454. - if (valueGeneralType == 'limit' || valueGeneralType == 'time') {
- 1455. - this.removeValueAnchor = geByClass('ads_inline_edit_remove_value', this.contentTable)[0];
- 1456. - addEvent(this.removeValueAnchor, 'click', function() { removeValue.call(self); return false; });
- 1457. - }
- 1458. -
- 1459. - if (valueGeneralType == 'time') {
- 1460. - uiTimeDay = new Dropdown(
- 1461. - geByClass('inline_time_day', this.contentTable)[0],
- 1462. - getDays(1),
- 1463. - {width: 45, height: 150, selectedItem: 1}
- 1464. - );
- 1465. - uiTimeMonth = new Dropdown(
- 1466. - geByClass('inline_time_month', this.contentTable)[0],
- 1467. - getMonths(),
- 1468. - {width: 80, height: 150, selectedItem: 1, onChange: function(value) { updateTimeDays.call(this, value); }}
- 1469. - );
- 1470. - uiTimeHour = new Dropdown(
- 1471. - geByClass('inline_time_hour', this.contentTable)[0],
- 1472. - getHours(),
- 1473. - {width: 65, height: 150, selectedItem: 0}
- 1474. - );
- 1475. - }
- 1476. -
- 1477. - this.fastErrorRow = geByClass('ads_inline_fast_error_row', this.contentTable)[0];
- 1478. -
- 1479. - if (this.input) {
- 1480. - this.is_user_action = true;
- 1481. - addEvent(this.input, 'keyup', function(event) {
- 1482. - if (event.keyCode != 13) {
- 1483. - hideFastError.call(self);
- 1484. - }
- 1485. - }
- 1486. - );
- 1487. - }
- 1488. - }
- 1489. - function onBeforeShow() {
- 1490. - if (this.input) {
- 1491. - this.input.value = defaultValue;
- 1492. - }
- 1493. -
- 1494. - if (valueGeneralType == 'time') {
- 1495. - uiTimeDay.val(defaultValue.day);
- 1496. - uiTimeMonth.val(defaultValue.month);
- 1497. - uiTimeHour.val(defaultValue.hour);
- 1498. - }
- 1499. -
- 1500. - hideFastError.call(this);
- 1501. -
- 1502. - var self = this;
- 1503. - if (valueGeneralType == 'cost_per_click' && !this.recommended_cost_loaded) {
- 1504. - var recommendedCostProgress = geByClass('inline_recommended_cost_progress', this.contentTable)[0];
- 1505. - var recommendedCostText = geByClass('ads_inline_recommended_cost_text', this.contentTable)[0];
- 1506. -
- 1507. - function onDone(response) {
- 1508. - if (response && response.recommended_costs && response.recommended_costs.cost_text) {
- 1509. - recommendedCostText.innerHTML = response.recommended_costs.cost_text;
- 1510. - hide(recommendedCostProgress);
- 1511. - show(recommendedCostText);
- 1512. - if (!this.is_user_action && self.input.value == '0') {
- 1513. - self.input.value = response.recommended_costs.cost_value;
- 1514. - }
- 1515. - self.recommended_cost_loaded = true;
- 1516. - }
- 1517. - };
- 1518. - var ajaxParams = {ad_id: unionId};
- 1519. - ajax.post('/ads?act=a_get_recommended_cost', ajaxParams, {onDone: onDone});
- 1520. - }
- 1521. - }
- 1522. - function onShow() {
- 1523. - if (this.input) {
- 1524. - elfocus(this.input);
- 1525. - }
- 1526. - }
- 1527. - function onConfirm() {
- 1528. - var newValue;
- 1529. - if (valueGeneralType == 'time') {
- 1530. - newValue = {};
- 1531. - newValue.day = uiTimeDay.val();
- 1532. - newValue.month = uiTimeMonth.val();
- 1533. - newValue.hour = uiTimeHour.val();
- 1534. - } else {
- 1535. - newValue = this.input.value;
- 1536. -
- 1537. - var checkResult = checkValue.call(this, newValue, valueType);
- 1538. - if (typeof(checkResult) == 'string') {
- 1539. - showFastError.call(this, checkResult);
- 1540. - return false;
- 1541. - }
- 1542. - if (checkResult !== true) {
- 1543. - showFastError.call(this, getLang('ads_error_unknown_error'));
- 1544. - return false;
- 1545. - }
- 1546. - }
- 1547. -
- 1548. - saveValue.call(this, newValue, false);
- 1549. - return true;
- 1550. - }
- 1551. -
- 1552. - var options = {
- 1553. - afterInit: afterInit,
- 1554. - onBeforeShow: onBeforeShow,
- 1555. - onShow: onShow,
- 1556. - onConfirm: onConfirm
- 1557. - };
- 1558. -
- 1559. - switch (valueGeneralType) {
- 1560. - case 'cost_per_click':
- 1561. - options.contentHTML =
- 1562. - '<tr>' +
- 1563. - '<td colspan="2">' +
- 1564. - '<table class="ads_inline_edit_table" style="width: 100%;">' +
- 1565. - '<tr><td><input class="inlInput text" type="text" /></td></tr>' +
- 1566. - '<tr><td style="padding-top: 7px; height: 22px;">' +
- 1567. - '<img class="inline_recommended_cost_progress" src="/images/upload.gif" />' +
- 1568. - '<span class="ads_inline_recommended_cost_text"></span>' +
- 1569. - '<div style="width: 275px; height: 1px;"></div>' +
- 1570. - '</td></tr>' +
- 1571. - '<tr class="ads_inline_fast_error_row"><td><div class="ads_inline_fast_error"></div></td></tr>' +
- 1572. - '</table>' +
- 1573. - '</td>' +
- 1574. - '</tr>';
- 1575. - break;
- 1576. - case 'limit':
- 1577. - options.contentHTML =
- 1578. - '<tr>' +
- 1579. - '<td colspan="2">' +
- 1580. - '<table class="ads_inline_edit_table">' +
- 1581. - '<tr>' +
- 1582. - '<td><input class="inlInput text" type="text" /></td>' +
- 1583. - '<td><a class="ads_inline_edit_remove_value" href="#">' + getLang('ads_inline_edit_remove_limit') + '</a></td>' +
- 1584. - '</tr>' +
- 1585. - '<tr class="ads_inline_fast_error_row"><td colspan="2"><div class="ads_inline_fast_error"></div></td></tr>' +
- 1586. - '</table>' +
- 1587. - '</td>' +
- 1588. - '</tr>';
- 1589. - break;
- 1590. - case 'time':
- 1591. - var removeValueText;
- 1592. - switch (valueType) {
- 1593. - case 'start_time': removeValueText = getLang('ads_inline_edit_remove_start_time'); break;
- 1594. - case 'stop_time': removeValueText = getLang('ads_inline_edit_remove_stop_time'); break;
- 1595. - }
- 1596. - options.contentHTML =
- 1597. - '<tr>' +
- 1598. - '<td colspan="2">' +
- 1599. - '<table class="ads_inline_edit_table">' +
- 1600. - '<tr>' +
- 1601. - '<td style="white-space: nowrap; width: 200px;">' +
- 1602. - '<table class="ads_inline_edit_table">' +
- 1603. - '<tr>' +
- 1604. - '<td style="padding-right: 5px;"><input type="text" class="inline_time_day text" style="width: 30px;" /></td>' +
- 1605. - '<td style="padding-right: 5px;"><input type="text" class="inline_time_month text" style="width: 30px;" /></td>' +
- 1606. - '<td style="padding-right: 5px;"><input type="text" class="inline_time_hour text" style="width: 30px;" /></td>' +
- 1607. - '</tr>' +
- 1608. - '</table>' +
- 1609. - '</td>' +
- 1610. - '</tr>' +
- 1611. - '<tr><td style="padding-top: 7px;"><a class="ads_inline_edit_remove_value" style="padding-left: 0;" href="#">' + removeValueText + '</a></td></tr>' +
- 1612. - '<tr class="ads_inline_fast_error_row"><td colspan="2"><div class="ads_inline_fast_error"></div></td></tr>' +
- 1613. - '</table>' +
- 1614. - '</td>' +
- 1615. - '</tr>';
- 1616. - break;
- 1617. - case 'text':
- 1618. - options.contentHTML =
- 1619. - '<tr>' +
- 1620. - '<td colspan="2">' +
- 1621. - '<table class="ads_inline_edit_table" style="width: 100%;">' +
- 1622. - '<tr><td><input class="inlInput text" type="text" /></td></tr>' +
- 1623. - '<tr class="ads_inline_fast_error_row"><td><div class="ads_inline_fast_error"></div></td></tr>' +
- 1624. - '</table>' +
- 1625. - '</td>' +
- 1626. - '</tr>';
- 1627. - break;
- 1628. - }
- 1629. -
- 1630. - var ret = {
- 1631. - target: editElem,
- 1632. - options: options
- 1633. - };
- 1634. - if (this.getOptionsOnly) { // dirty hack.
- 1635. - return ret;
- 1636. - }
- 1637. - ret.obj = new InlineEdit(editElem, options);
- 1638. -
- 1639. - var accessFunctions = {
- 1640. - applyNewValue: applyNewValue
- 1641. - }
- 1642. -
- 1643. - if (!cur.inlineEditControls) {
- 1644. - cur.inlineEditControls = {};
- 1645. - }
- 1646. - cur.inlineEditControls[valueType + '_' + unionId] = accessFunctions;
- 1647. -
- 1648. - return ret;
- 1649. - }
- 1650. -
- 1651. - Ads.createInlineDropdownMenu = function(menuElem, boxElem, progressElem, unionId, valueType, items, initValue, hash, additionalParams) {
- 1652. - menuElem = ge(menuElem);
- 1653. - boxElem = ge(boxElem);
- 1654. - progressElem = ge(progressElem);
- 1655. - var defaultValue = initValue;
- 1656. -
- 1657. - var self;
- 1658. -
- 1659. - function saveValue(newValue) {
- 1660. -
- 1661. - if (newValue == defaultValue) {
- 1662. - return;
- 1663. - }
- 1664. -
- 1665. - var unknownError = getLang('ads_error_unexpected_error_try_later');
- 1666. -
- 1667. - var params = {};
- 1668. - params.union_id = unionId;
- 1669. - params.hash = hash;
- 1670. - extend(params, additionalParams);
- 1671. - params[valueType] = newValue;
- 1672. -
- 1673. - function onAjaxComplete(response) {
- 1674. - if (isObject(response)) {
- 1675. - if (response.error) {
- 1676. - showLongError.call(self, response.error);
- 1677. - } else if (!response.not_changed) {
- 1678. - if (response[valueType + '_value'] !== undefined) {
- 1679. - applyNewValue(response[valueType + '_value'], response[valueType + '_text']);
- 1680. - if (additionalParams.reload) {
- 1681. - nav.reload();
- 1682. - }
- 1683. - } else {
- 1684. - showLongError.call(self, unknownError);
- 1685. - }
- 1686. - }
- 1687. - } else {
- 1688. - showLongError.call(self, unknownError);
- 1689. - }
- 1690. -
- 1691. - hide(progressElem);
- 1692. - show(boxElem);
- 1693. -
- 1694. - return true;
- 1695. - }
- 1696. - ajax.post('/ads?act=a_unions_general_info_save', params, {onDone: onAjaxComplete, onFail: onAjaxComplete});
- 1697. -
- 1698. - hide(boxElem);
- 1699. - show(progressElem);
- 1700. - }
- 1701. -
- 1702. - function applyNewValue(newValue, newText) {
- 1703. - defaultValue = newValue;
- 1704. - self.setOptions({title: newText});
- 1705. - menuElem.innerHTML = newText;
- 1706. - }
- 1707. - function showLongError(error) {
- 1708. - showFastBox(getLang('ads_error_box_title'), error);
- 1709. - }
- 1710. -
- 1711. - function onMenuChange(event) {
- 1712. - var newValue = event.target.index;
- 1713. - saveValue(newValue);
- 1714. - }
- 1715. -
- 1716. - var options = {};
- 1717. - options.target = menuElem;
- 1718. - options.onSelect = onMenuChange;
- 1719. - options.showHover = false;
- 1720. - options.updateTarget = false;
- 1721. - self = new DropdownMenu(items, options);
- 1722. - }
- 1723. -
- 1724. - Ads.MultiDropdownMenu = function(items, options) {
- 1725. - var dropdownMenu;
- 1726. - var selectedItems = {};
- 1727. - var curItems = [];
- 1728. -
- 1729. - function onItemClick(e) {
- 1730. - if (e.target.className == 'ads_dd_menu_item_checkbox_on') {
- 1731. - selectedItems[e.target.index] = false;
- 1732. - e.target.className = 'ads_dd_menu_item_checkbox_off';
- 1733. - } else {
- 1734. - selectedItems[e.target.index] = true;
- 1735. - e.target.className = 'ads_dd_menu_item_checkbox_on';
- 1736. - }
- 1737. - return false;
- 1738. - }
- 1739. -
- 1740. - for (var i in items) {
- 1741. - curItems[i] = {};
- 1742. - for (var j in items[i]) {
- 1743. - curItems[i][j] = items[i][j];
- 1744. - }
- 1745. - curItems[i].onClick = onItemClick;
- 1746. - curItems[i].c = 'ads_dd_menu_item_checkbox_off';
- 1747. - selectedItems[curItems[i].i] = false;
- 1748. - }
- 1749. -
- 1750. - dropdownMenu = new DropdownMenu(curItems, options);
- 1751. - dropdownMenu.getSelectedItems = function() {
- 1752. - var selectedItemsResult = [];
- 1753. - for (var i in selectedItems) {
- 1754. - if (selectedItems[i]) {
- 1755. - selectedItemsResult.push(i);
- 1756. - }
- 1757. - }
- 1758. - return selectedItemsResult;
- 1759. - }
- 1760. -
- 1761. - return dropdownMenu;
- 1762. - }
- 1763. -
- 1764. - Ads.getCampaignsTotalLabel = function(total) {
- 1765. - var type = this._curFilter;
- 1766. - if (typeof type == 'object') type = type[0];
- 1767. - if (!this._curSearchString || this._curSearchString == '') {
- 1768. - switch (type) {
- 1769. - case 0: return getLang('ads_stopped_campaigns_total', total);
- 1770. - case 1: return getLang('ads_running_campaigns_total', total);
- 1771. - case 3: return getLang('ads_planned_campaigns_total', total);
- 1772. - case 4: return getLang('ads_archived_campaigns_total', total);
- 1773. - default: return getLang('ads_active_campaigns_total', total);
- 1774. - }
- 1775. - } else {
- 1776. - switch (type) {
- 1777. - case 0: return getLang('ads_stopped_campaigns_found', total);
- 1778. - case 1: return getLang('ads_running_campaigns_found', total);
- 1779. - case 3: return getLang('ads_planned_campaigns_found', total);
- 1780. - case 4: return getLang('ads_archived_campaigns_found', total);
- 1781. - default: return getLang('ads_active_campaigns_found', total);
- 1782. - }
- 1783. - }
- 1784. - }
- 1785. -
- 1786. - Ads.getNoCampaignsLabel = function() {
- 1787. - var type = this._curFilter;
- 1788. - if (typeof type == 'object') type = type[0];
- 1789. - if (!this._curSearchString || this._curSearchString == '') {
- 1790. - switch (type) {
- 1791. - case 0: return getLang('ads_no_stopped_campaigns');
- 1792. - case 1: return getLang('ads_no_running_campaigns');
- 1793. - case 3: return getLang('ads_no_planned_campaigns');
- 1794. - case 4: return getLang('ads_no_archived_campaigns');
- 1795. - default: return getLang('ads_no_active_campaigns');
- 1796. - }
- 1797. - } else {
- 1798. - switch (type) {
- 1799. - case 0: return getLang('ads_no_stopped_campaigns_found');
- 1800. - case 1: return getLang('ads_no_running_campaigns_found');
- 1801. - case 3: return getLang('ads_no_planned_campaigns_found');
- 1802. - case 4: return getLang('ads_no_archived_campaigns_found');
- 1803. - default: return getLang('ads_no_active_campaigns_found');
- 1804. - }
- 1805. - }
- 1806. - }
- 1807. -
- 1808. - Ads.getAdsTotalLabel = function(total) {
- 1809. - var type = this._curFilter;
- 1810. - if (typeof type == 'object') type = type[0];
- 1811. - if (!this._curSearchString || this._curSearchString == '') {
- 1812. - switch (type) {
- 1813. - case 0: return getLang('ads_stopped_ads_total', total);
- 1814. - case 1: return getLang('ads_running_ads_total', total);
- 1815. - case 3: return getLang('ads_planned_ads_total', total);
- 1816. - case 4: return getLang('ads_archived_ads_total', total);
- 1817. - default: return getLang('ads_active_ads_total', total);
- 1818. - }
- 1819. - } else {
- 1820. - switch (type) {
- 1821. - case 0: return getLang('ads_stopped_ads_found', total);
- 1822. - case 1: return getLang('ads_running_ads_found', total);
- 1823. - case 3: return getLang('ads_planned_ads_found', total);
- 1824. - case 4: return getLang('ads_archived_ads_found', total);
- 1825. - default: return getLang('ads_active_ads_found', total);
- 1826. - }
- 1827. - }
- 1828. - }
- 1829. -
- 1830. - Ads.getNoAdsLabel = function() {
- 1831. - var type = this._curFilter;
- 1832. - if (typeof type == 'object') type = type[0];
- 1833. - if (!this._curSearchString || this._curSearchString == '') {
- 1834. - switch (type) {
- 1835. - case 0: return getLang('ads_no_stopped_ads');
- 1836. - case 1: return getLang('ads_no_running_ads');
- 1837. - case 3: return getLang('ads_no_planned_ads');
- 1838. - case 4: return getLang('ads_no_archived_ads');
- 1839. - default: return getLang('ads_no_active_ads');
- 1840. - }
- 1841. - } else {
- 1842. - switch (type) {
- 1843. - case 0: return getLang('ads_no_stopped_ads_found');
- 1844. - case 1: return getLang('ads_no_running_ads_found');
- 1845. - case 3: return getLang('ads_no_planned_ads_found');
- 1846. - case 4: return getLang('ads_no_archived_ads_found');
- 1847. - default: return getLang('ads_no_active_ads_found');
- 1848. - }
- 1849. - }
- 1850. - }
- 1851. -
- 1852. - Ads.getClientsTotalLabel = function(total) {
- 1853. - var type = this._curFilter;
- 1854. - if (typeof type == 'object') type = type[0];
- 1855. - if (!this._curSearchString || this._curSearchString == '') {
- 1856. - switch (type) {
- 1857. - case 4: return getLang('ads_archived_clients_total', total);
- 1858. - default: return getLang('ads_active_clients_total', total);
- 1859. - }
- 1860. - } else {
- 1861. - switch (type) {
- 1862. - case 4: return getLang('ads_archived_clients_found', total);
- 1863. - default: return getLang('ads_active_clients_found', total);
- 1864. - }
- 1865. - }
- 1866. - }
- 1867. -
- 1868. - Ads.getNoClientsLabel = function() {
- 1869. - var type = this._curFilter;
- 1870. - if (typeof type == 'object') type = type[0];
- 1871. - if (!this._curSearchString || this._curSearchString == '') {
- 1872. - switch (type) {
- 1873. - case 4: return getLang('ads_no_archived_clients');
- 1874. - default: return getLang('ads_no_active_clients');
- 1875. - }
- 1876. - } else {
- 1877. - switch (type) {
- 1878. - case 4: return getLang('ads_no_archived_clients_found');
- 1879. - default: return getLang('ads_no_active_clients_found');
- 1880. - }
- 1881. - }
- 1882. - }
- 1883. -
- 1884. - Ads.addOfficeFormatFunctions = function(options) {
- 1885. - var arrFind = function(arr, val) {
- 1886. - var i = 0;
- 1887. - for (; i < arr.length; i++) {
- 1888. - if (arr[i] === val) {
- 1889. - return i;
- 1890. - }
- 1891. - }
- 1892. - return -1;
- 1893. - }
- 1894. -
- 1895. - var ind = arrFind(options.columnClasses, 'column_name_view');
- 1896. - options.columnFormatting[ind] = function(data, rown) {
- 1897. - if (rown == -1) return data;
- 1898. - var unionId = this.content.extra.unionId[rown];
- 1899. - return '<div class="ads_paginated_table_name"><a href="/ads?act=office&union_id=' + unionId + '">' + data + '</a></div>';
- 1900. - }
- 1901. -
- 1902. - var limitFormat = function(data, rown, coln) {
- 1903. - if (rown == -1) return data;
- 1904. - var wrap;
- 1905. - try {
- 1906. - var uid = this.content.extra.uid[rown][coln];
- 1907. - if (uid) {
- 1908. - wrap = "<img id=\"inline_edit_progress" + uid + "\" src=\"/images/upload.gif\" style=\"display: none;\" /><a id=\"inline_edit_value" + uid + "\" >{value}</a>";
- 1909. - }
- 1910. - } catch (e) {
- 1911. - // Nothing
- 1912. - }
- 1913. - if (!wrap) {
- 1914. - wrap = '{value}';
- 1915. - }
- 1916. - var value = data;
- 1917. - if (data == 0) {
- 1918. - value = getLang('ads_no_money_limit');
- 1919. - } else {
- 1920. - value = this._formatData(data, 'currency_int');
- 1921. - }
- 1922. - return wrap.replace('{value}', value);
- 1923. - }
- 1924. - ind = arrFind(options.columnClasses, 'column_day_limit_view');
- 1925. - if (ind != -1) options.columnFormatting[ind] = limitFormat;
- 1926. - ind = arrFind(options.columnClasses, 'column_month_limit_view');
- 1927. - if (ind != -1) options.columnFormatting[ind] = limitFormat;
- 1928. - ind = arrFind(options.columnClasses, 'column_all_limit_view');
- 1929. - if (ind != -1) options.columnFormatting[ind] = limitFormat;
- 1930. -
- 1931. - return options;
- 1932. - }
- 1933. -
- 1934. - Ads.createOfficePaginatedTable = function(container, options, content) {
- 1935. - var getButton = function(label, callback) {
- 1936. - var div = ce('div', {className: 'button_blue'});
- 1937. - var butt = ce('button', {innerHTML: label, onclick: callback});
- 1938. - div.appendChild(butt);
- 1939. - return div;
- 1940. - }
- 1941. -
- 1942. - var statusCol = 1;
- 1943. -
- 1944. - var selected;
- 1945. -
- 1946. - var buttons = [],
- 1947. - labels = [getLang('ads_status_do_disable'),
- 1948. - getLang('ads_status_do_enable'),
- 1949. - getLang('ads_status_do_archive')];
- 1950. -
- 1951. -
- 1952. - var changeStatus = function(val) {
- 1953. - return function() {
- 1954. - var unionIds = [],
- 1955. - hashes = [],
- 1956. - hashesDel = [],
- 1957. - enable = val; // 1 - on, 0 - off, 2 - delete
- 1958. - var i;
- 1959. - for (i in selected) {
- 1960. - unionIds.push(pt.content.extra.union_id[selected[i]][statusCol]);
- 1961. - hashes.push(pt.content.extra.hash[selected[i]][statusCol]);
- 1962. - hashesDel.push(pt.content.extra.hash_delete[selected[i]][statusCol]);
- 1963. - }
- 1964. -
- 1965. - unionIds = unionIds.join(',');
- 1966. - hashes = hashes.join(',');
- 1967. - hashesDel = hashesDel.join(',');
- 1968. -
- 1969. - if (val == 2) { // delete
- 1970. - Ads.openDeleteUnionBox(cur.tableUnionTypeForDelete, unionIds, hashesDel, lockChangeStatus, unlockChangeStatus, updateStatusInTable, 2);
- 1971. - return;
- 1972. - }
- 1973. -
- 1974. - var params = {
- 1975. - union_id: unionIds,
- 1976. - hash: hashes,
- 1977. - newclass: 1,
- 1978. - enable: val
- 1979. - };
- 1980. -
- 1981. - lockChangeStatus();
- 1982. -
- 1983. - function lockChangeStatus() {
- 1984. - lockButton(buttons[val]);
- 1985. - return true;
- 1986. - };
- 1987. - function unlockChangeStatus() {
- 1988. - unlockButton(buttons[val]);
- 1989. - }
- 1990. - function updateStatusInTable(ans) {
- 1991. - if (ans['status_class']) ans = [ans];
- 1992. -
- 1993. - var errored = 0;
- 1994. - for (var i in selected) {
- 1995. - if (!ans[i]) continue;
- 1996. - if (!ans[i]['status_class']) {
- 1997. - if (ans[i]['error'] && !errored) {
- 1998. - errored = 1;
- 1999. - showFastBox(getLang('ads_cant_start_ad_box_title'), ans[i]['error']);
- 2000. - }
- 2001. - continue;
- 2002. - }
- 2003. - pt.content.types[selected[i]] = ans[i]['status_type'];
- 2004. - pt.content.extra.status_text[selected[i]][statusCol] = ans[i]['status'];
- 2005. - pt.content.extra.status_variants[selected[i]][statusCol] = ans[i]['status_variants'];
- 2006. - pt._updateValue(selected[i], statusCol, ans[i]['status_class']);
- 2007. - }
- 2008. - updateButtons.apply(pt);
- 2009. - }
- 2010. -
- 2011. - function onRequestComplete(response) {
- 2012. - // response may be object or array
- 2013. -
- 2014. - unlockChangeStatus();
- 2015. -
- 2016. - if (!response || response.error) { // no isObject or isArray check here
- 2017. - debugLog('onFail change status');
- 2018. - var errorMessage = ((response && response.error) ? response.error : getLang('ads_error_unexpected_error_try_later'));
- 2019. - showFastBox(getLang('ads_cant_start_ad_box_title'), errorMessage);
- 2020. - return true;
- 2021. - }
- 2022. -
- 2023. - var info = '';
- 2024. - if (response && response.info) {
- 2025. - info = response.info;
- 2026. - }
- 2027. - debugLog('onDone change status, ' + info);
- 2028. -
- 2029. - updateStatusInTable(response);
- 2030. - return true;
- 2031. - }
- 2032. -
- 2033. - ajax.post('/ads?act=a_union_change_status', params, {onDone: onRequestComplete, onFail: onRequestComplete});
- 2034. - };
- 2035. - }
- 2036. -
- 2037. - var updateButtons = function() {
- 2038. - selected = this.getSelection(0, 1);
- 2039. - var i;
- 2040. - for (i in buttons) {
- 2041. - hide(buttons[i]);
- 2042. - }
- 2043. - if (selected.length == 0) {
- 2044. - } else {
- 2045. - var was = [false, false];
- 2046. - var on = {on: 1, pending: 1},
- 2047. - off = {off: 1, off_red: 1, cross: 1};
- 2048. - for (i in selected) {
- 2049. - var stat = this.content.data[selected[i]][statusCol];
- 2050. - if (on[stat]) was[0] = 1;
- 2051. - if (off[stat]) was[1] = 1;
- 2052. - }
- 2053. - if (was[0]) show(buttons[0]);
- 2054. - if (was[1]) show(buttons[1]);
- 2055. - show(buttons[2]);
- 2056. - }
- 2057. - }
- 2058. -
- 2059. - options.onCheckboxPick = updateButtons;
- 2060. - options.onRefresh = updateButtons;
- 2061. -
- 2062. - options = Ads.addOfficeFormatFunctions(options);
- 2063. -
- 2064. - var i;
- 2065. - for (i = 0; i < 3; i++) {
- 2066. - buttons[i] = getButton(labels[i], changeStatus(i));
- 2067. - }
- 2068. -
- 2069. - var pt = new PaginatedTable(container, options, content);
- 2070. - // pt.getData('/ads?act=a_unions_table&union_id=1000157403&period_key=20111018&sort_key=default_r&offset={offset}&limit={limit}');
- 2071. -
- 2072. - // mass actions
- 2073. - var container = ge('pt_' + pt.globalNum + '_mass_act_default_container');
- 2074. - if (container) {
- 2075. - addClass(container, 'ads_mass_act_container');
- 2076. - container.appendChild(buttons[1]);
- 2077. - container.appendChild(buttons[0]);
- 2078. - container.appendChild(buttons[2]);
- 2079. - for (i in buttons) {
- 2080. - hide(buttons[i]);
- 2081. - }
- 2082. - show(container);
- 2083. - }
- 2084. -
- 2085. - // selecting subclasses
- 2086. - var selectSubclass = function(classes) {
- 2087. - return function() {
- 2088. - var corr = 1;
- 2089. - for (i = 0; i < pt.tableSize; i++) {
- 2090. - if (i < pt.curFrom || i > pt.curTo) continue;
- 2091. - var j = pt.permutation[i];
- 2092. - var curClass = pt.content.data[j][statusCol];
- 2093. - corr &= ((pt.selection[j] == 1) == (classes[curClass] == 1));
- 2094. - }
- 2095. - var checked = 1 ^ corr;
- 2096. - for (i = 0; i < pt.tableSize; i++) {
- 2097. - if (i < pt.curFrom || i > pt.curTo) continue;
- 2098. - var j = pt.permutation[i];
- 2099. - var curClass = pt.content.data[j][statusCol];
- 2100. - var curToggle = classes[curClass] ? checked : 0;
- 2101. - var el = ge('cb_row_' + j + '_' + pt.globalNum);
- 2102. - if (el) {
- 2103. - window[curToggle ? 'addClass' : 'removeClass'](el, 'on');
- 2104. - }
- 2105. - pt.toggleCheckbox(false, j, curToggle);
- 2106. - }
- 2107. - };
- 2108. - }
- 2109. - container = ge('select_all_link');
- 2110. - if (container) {
- 2111. - container.onclick = selectSubclass({on: 1, off: 1, off_red: 1, cross: 1, pending: 1});
- 2112. - }
- 2113. - container = ge('select_running_link');
- 2114. - if (container) {
- 2115. - container.onclick = selectSubclass({on: 1});
- 2116. - }
- 2117. - container = ge('select_stopped_link');
- 2118. - if (container) {
- 2119. - container.onclick = selectSubclass({off: 1, off_red: 1, cross: 1});
- 2120. - }
- 2121. - }
- 2122. -
- 2123. - Ads.onStatusHover = function(elem, callback, rown, coln) {
- 2124. - var _t = this;
- 2125. - var options = {
- 2126. - status: {type: this.content.data[rown][coln], title: this.content.extra.status_text[rown][coln]},
- 2127. - items: this.content.extra.status_variants[rown][coln],
- 2128. - popupTime: -1,
- 2129. - onSelect: function(event) { // copypasted
- 2130. - var index = event.target.index,
- 2131. - unionId = _t.content.extra.union_id[rown][coln],
- 2132. - hash = _t.content.extra.hash[rown][coln],
- 2133. - hashDelete = _t.content.extra.hash_delete[rown][coln];
- 2134. -
- 2135. - if (index == 'archived') {
- 2136. - setTimeout(function(){
- 2137. - Ads.openDeleteUnionBox(cur.tableUnionTypeForDelete, unionId, hashDelete, lockChangeStatus, unlockChangeStatus, updateStatusInTable, 1);
- 2138. - }, 1);
- 2139. - return;
- 2140. - }
- 2141. -
- 2142. - var params = {};
- 2143. - params.union_id = unionId;
- 2144. - params.hash = hash;
- 2145. - params.newclass = 1;
- 2146. -
- 2147. - params.enable = ((index == 'on') ? 1 : 0);
- 2148. -
- 2149. - lockChangeStatus();
- 2150. -
- 2151. - function lockChangeStatus() {
- 2152. - var selectorBox = ge('union_' + unionId + '_status_selector_box');
- 2153. - var progress = ge('union_' + unionId + '_status_progress');
- 2154. - hide(selectorBox);
- 2155. - show(progress);
- 2156. - return true;
- 2157. - };
- 2158. - function unlockChangeStatus() {
- 2159. - var selectorBox = ge('union_' + unionId + '_status_selector_box');
- 2160. - var progress = ge('union_' + unionId + '_status_progress');
- 2161. - hide(progress)
- 2162. - show(selectorBox);
- 2163. - }
- 2164. - function updateStatusInTable(status, status_class, status_type, status_variants) {
- 2165. - if (!status && !status_class) return;
- 2166. -
- 2167. - var ret = {
- 2168. - value: status_class,
- 2169. - extra: {
- 2170. - status_text: status,
- 2171. - status_variants: status_variants
- 2172. - },
- 2173. - type: status_type
- 2174. - };
- 2175. -
- 2176. - if (status_class == 'deleted') {
- 2177. - ret.listeners = false;
- 2178. - ret.extra.link_class = '';
- 2179. - }
- 2180. - callback(ret);
- 2181. - }
- 2182. -
- 2183. - function onRequestComplete(response) {
- 2184. - unlockChangeStatus();
- 2185. -
- 2186. - if (!isObject(response) || response.error) {
- 2187. - debugLog('onFail change status');
- 2188. - var errorMessage = (isObject(response) ? response.error : getLang('ads_error_unexpected_error_try_later'));
- 2189. - showFastBox(getLang('ads_cant_start_ad_box_title'), errorMessage);
- 2190. - return true;
- 2191. - }
- 2192. -
- 2193. - var info = '';
- 2194. - if (response && response.info) {
- 2195. - info = response.info;
- 2196. - }
- 2197. - debugLog('onDone change status, ' + info);
- 2198. -
- 2199. - updateStatusInTable(response.status, response.status_class, response.status_type, response.status_variants);
- 2200. - return true;
- 2201. - }
- 2202. -
- 2203. - ajax.post('/ads?act=a_union_change_status', params, {onDone: onRequestComplete, onFail: onRequestComplete});
- 2204. - }
- 2205. - };
- 2206. -
- 2207. - var sdd;
- 2208. - if (!cur._statusDropdown) {
- 2209. - var handler = elem.getAttribute('onclick');
- 2210. - sdd = cur._statusDropdown = Ads.statusDropdown(elem, options);
- 2211. - elem.setAttribute('onclick', handler);
- 2212. - elem.onclick = function(){eval(handler);};
- 2213. - } else {
- 2214. - sdd = cur._statusDropdown;
- 2215. - sdd.hideHeader();
- 2216. - clearTimeout(sdd.timer);
- 2217. - sdd.setContainer(elem);
- 2218. - sdd.setStatus(options.status);
- 2219. - sdd.setItems(options.items);
- 2220. - sdd.setHandler(options.onSelect);
- 2221. - }
- 2222. -
- 2223. - sdd.onOver();
- 2224. - }
- 2225. -
- 2226. - Ads.statusDropdown = function(container, options) {
- 2227. - container = ge(container);
- 2228. - if (!container) return false;
- 2229. -
- 2230. - options = extend({
- 2231. - popupTime: 200, // -1 means 'always show entire body'
- 2232. - status: {type: 'off', title: 'Disabled'},
- 2233. - onSelect: function() {}
- 2234. - }, options);
- 2235. -
- 2236. - var compareTypes = function(type1, type2) {
- 2237. - var same = {
- 2238. - on: {
- 2239. - on: 1,
- 2240. - pending: 1
- 2241. - },
- 2242. - off: {
- 2243. - off: 1,
- 2244. - off_red: 1,
- 2245. - cross: 1
- 2246. - },
- 2247. - archived: {
- 2248. - deleted: 1
- 2249. - }
- 2250. - };
- 2251. - if (!same[type1]) return 0;
- 2252. - return same[type1][type2] || 0;
- 2253. - }
- 2254. -
- 2255. - var items = clone(options.items);
- 2256. - for (var i in items) {
- 2257. - if (compareTypes(items[i]['i'], options.status.type)) {
- 2258. - delete items[i];
- 2259. - }
- 2260. - }
- 2261. -
- 2262. - var imgSpanFake = {className: geByClass('ads_status_image_span', container)[0].className};
- 2263. - var imgSpanHTML = '<span class="' + imgSpanFake.className + '"></span>';
- 2264. -
- 2265. - var deltaTop = 0, deltaLeft = 0;
- 2266. - if (browser.opera) deltaTop += -1;
- 2267. - if (browser.mozilla) deltaTop += -1;
- 2268. - if (browser.msie) { deltaTop += -1; deltaLeft += 1; }
- 2269. -
- 2270. - var dd = new DropdownMenu(items, {
- 2271. - title: imgSpanHTML + options.status.title,
- 2272. - target: container,
- 2273. - onSelect: options.onSelect,
- 2274. - showHover: false,
- 2275. - updateTarget: false,
- 2276. - offsetTop: -2 + deltaTop,
- 2277. - offsetLeft: -1 + deltaLeft
- 2278. - });
- 2279. - dd.hide();
- 2280. - addClass(dd.header, 'ads_dd_wide');
- 2281. - addClass(dd.body, 'ads_dd_wide');
- 2282. -
- 2283. - var showTimer, hideTimer;
- 2284. - var overListener = function() {
- 2285. - if (hideTimer) {
- 2286. - clearTimeout(hideTimer);
- 2287. - hideTimer = false;
- 2288. - }
- 2289. - if (options.popupTime == -1) {
- 2290. - dd.show();
- 2291. - return true;
- 2292. - }
- 2293. - showTimer = setTimeout(function() {
- 2294. - showTimer = false;
- 2295. - ret.showHeader();
- 2296. - }, options.popupTime);
- 2297. - };
- 2298. - var outListenerSoft = function() {
- 2299. - if (showTimer) {
- 2300. - clearTimeout(showTimer);
- 2301. - showTimer = false;
- 2302. - } else {
- 2303. - hideTimer = setTimeout(function() {
- 2304. - hideTimer = false;
- 2305. - ret.hideHeader();
- 2306. - }, 500);
- 2307. - }
- 2308. - };
- 2309. - var outListenerHard = function() {
- 2310. - hideTimer = setTimeout(function() {
- 2311. - hideTimer = false;
- 2312. - ret.hideHeader();
- 2313. - }, 500);
- 2314. - };
- 2315. -
- 2316. - if (options.popupTime != -1) {
- 2317. - addEvent(dd.header, 'click', function() {removeClass(dd.header, 'ads_dd_header_popup');});
- 2318. - addEvent(container, 'click', function() {ret.showBody();});
- 2319. -
- 2320. - addEvent(container, 'mouseover', overListener);
- 2321. - addEvent(container, 'mouseout', outListenerSoft);
- 2322. - addEvent(dd.header, 'mouseover', overListener);
- 2323. - addEvent(dd.header, 'mouseout', outListenerHard);
- 2324. - addEvent(dd.body, 'mouseover', overListener);
- 2325. - addEvent(dd.body, 'mouseout', outListenerHard);
- 2326. - }
- 2327. -
- 2328. - var clearTimers = function() {
- 2329. - if (showTimer) {
- 2330. - clearTimeout(showTimer);
- 2331. - showTimer = false;
- 2332. - }
- 2333. - if (hideTimer) {
- 2334. - clearTimeout(hideTimer);
- 2335. - hideTimer = false;
- 2336. - }
- 2337. - }
- 2338. -
- 2339. - var ret = {
- 2340. - getStatus: function() {
- 2341. - return options.status;
- 2342. - },
- 2343. - setStatus: function(status) {
- 2344. - removeClass(imgSpanFake, 'status_' + options.status.type);
- 2345. - options.status = status;
- 2346. - addClass(imgSpanFake, 'status_' + options.status.type);
- 2347. - dd.setOptions({title: '<span class="' + imgSpanFake.className + '"></span>' + options.status.title});
- 2348. - },
- 2349. - setContainer: function(newContainer) {
- 2350. - if (!newContainer) return false;
- 2351. - clearTimers();
- 2352. - if (options.popupTime != -1) {
- 2353. - removeEvent(container, 'mouseover', overListener);
- 2354. - removeEvent(container, 'mouseout', outListenerSoft);
- 2355. - removeEvent(dd.header, 'mouseover', overListener);
- 2356. - removeEvent(dd.header, 'mouseout', outListenerHard);
- 2357. - removeEvent(dd.body, 'mouseover', overListener);
- 2358. - removeEvent(dd.body, 'mouseout', outListenerHard);
- 2359. - }
- 2360. - container = newContainer;
- 2361. - dd.setOptions({target: container});
- 2362. - dd.moveToTarget();
- 2363. - if (options.popupTime != -1) {
- 2364. - addEvent(container, 'mouseover', overListener);
- 2365. - addEvent(container, 'mouseout', outListenerSoft);
- 2366. - addEvent(dd.header, 'mouseover', overListener);
- 2367. - addEvent(dd.header, 'mouseout', outListenerHard);
- 2368. - addEvent(dd.body, 'mouseover', overListener);
- 2369. - addEvent(dd.body, 'mouseout', outListenerHard);
- 2370. - }
- 2371. - },
- 2372. - setItems: function(newItems) {
- 2373. - var items = clone(newItems);
- 2374. - for (var i in items) {
- 2375. - if (compareTypes(items[i]['i'], options.status.type)) {
- 2376. - delete items[i];
- 2377. - }
- 2378. - }
- 2379. - dd.setData(items);
- 2380. - },
- 2381. - setHandler: function(handler) {
- 2382. - dd.setOptions({onSelect: handler});
- 2383. - },
- 2384. - showHeader: function() {
- 2385. - if (!dd.visible) {
- 2386. - addClass(dd.header, 'ads_dd_header_popup');
- 2387. - }
- 2388. - dd.moveToTarget();
- 2389. - show(dd.header);
- 2390. - },
- 2391. - hideHeader: function() {
- 2392. - dd.hide();
- 2393. - hide(dd.header);
- 2394. - removeClass(dd.header, 'ads_dd_header_popup');
- 2395. - },
- 2396. - showBody: function() {
- 2397. - removeClass(dd.header, 'ads_dd_header_popup');
- 2398. - dd.show();
- 2399. - },
- 2400. - hideBody: function() {
- 2401. - dd.hide();
- 2402. - },
- 2403. - onOver: overListener,
- 2404. - onOut: outListenerHard
- 2405. - };
- 2406. -
- 2407. - return ret;
- 2408. - }
- 2409. -
- 2410. - Ads.changeDemographyView = function(name, unionId, updateOnly) {
- 2411. -
- 2412. - // Change navigation
- 2413. - var navCur = ge('ads_demography_navigation_tab_' + name);
- 2414. - if (!navCur) {
- 2415. - return;
- 2416. - }
- 2417. - navCur = navCur.parentNode;
- 2418. - var navCurSelected = hasClass(navCur, 'summary_tab_sel');
- 2419. - if (navCurSelected && !updateOnly || !navCurSelected && updateOnly) {
- 2420. - return;
- 2421. - }
- 2422. - var navElems = [
- 2423. - ge('ads_demography_navigation_tab_bars_all').parentNode,
- 2424. - ge('ads_demography_navigation_tab_graphs').parentNode
- 2425. - ];
- 2426. - for (var i in navElems) {
- 2427. - var navElem = navElems[i];
- 2428. - addClass(navElem, 'summary_tab');
- 2429. - removeClass(navElem, 'summary_tab_sel');
- 2430. - }
- 2431. - addClass(navCur, 'summary_tab_sel');
- 2432. - removeClass(navCur, 'summary_tab');
- 2433. -
- 2434. - // Change graph
- 2435. - var bars1 = ge('ads_demography_bars_all_wrap1');
- 2436. - var bars2 = ge('ads_demography_bars_all_wrap2');
- 2437. - var graphs1 = ge('ads_demography_graphs_wrap1');
- 2438. - var graphs2 = ge('ads_demography_graphs_wrap2');
- 2439. -
- 2440. - if (name === 'bars_all') {
- 2441. - setStyle(bars1, {visibility: 'visible', height: getSize(bars2)[1] + 'px'})
- 2442. - setStyle(bars2, {top: '0'})
- 2443. - setStyle(graphs1, {visibility: 'hidden', height: '0'});
- 2444. - } else if (name === 'graphs') {
- 2445. - if (!Ads.loadDemography(unionId)) {
- 2446. - return;
- 2447. - }
- 2448. -
- 2449. - !cur.graphUsersStatsSexEmpty && cur.pageGraphs['ads_graph_users_stats_day_sex'].loadGraph(intval(cur.lastDemographySourceOffset));
- 2450. - !cur.graphUsersStatsAgeEmpty && cur.pageGraphs['ads_graph_users_stats_day_age'].loadGraph(intval(cur.lastDemographySourceOffset) * 3 + intval(cur.lastDemographyAgeOffset));
- 2451. - !cur.graphUsersStatsCitiesEmpty && cur.pageGraphs['ads_graph_users_stats_day_cities'].loadGraph(intval(cur.lastDemographySourceOffset));
- 2452. -
- 2453. - setStyle(graphs2, {width: getSize(graphs1)[0] + 'px'});
- 2454. - setStyle(graphs1, {visibility: 'visible', height: getSize(graphs2)[1] + 'px'});
- 2455. - setStyle(bars1, {visibility: 'hidden', height: '0'});
- 2456. - setStyle(bars2, {position: 'absolute', top: '-100000px'});
- 2457. - }
- 2458. - }
- 2459. -
- 2460. - Ads.changeDemographySource = function(name) {
- 2461. -
- 2462. - // Change navigation
- 2463. - var clicksSideNav = ge('ads_demography_navigation_clicks');
- 2464. - var viewsSideNav = ge('ads_demography_navigation_views');
- 2465. - var clicksTabNav = ge('ads_demography_navigation_tab_clicks');
- 2466. - var viewsTabNav = ge('ads_demography_navigation_tab_views');
- 2467. - if (clicksTabNav) {
- 2468. - clicksTabNav = clicksTabNav.parentNode;
- 2469. - viewsTabNav = viewsTabNav.parentNode;
- 2470. - }
- 2471. - if (name == 'clicks') {
- 2472. - if (clicksSideNav) {
- 2473. - if (hasClass(clicksSideNav, 'nav_selected')) {
- 2474. - return;
- 2475. - }
- 2476. - addClass(clicksSideNav, 'nav_selected');
- 2477. - removeClass(viewsSideNav, 'nav_selected');
- 2478. - }
- 2479. - if (clicksTabNav) {
- 2480. - if (hasClass(clicksTabNav, 'summary_tab_sel')) {
- 2481. - return;
- 2482. - }
- 2483. - addClass(clicksTabNav, 'summary_tab_sel');
- 2484. - addClass(viewsTabNav, 'summary_tab');
- 2485. - removeClass(clicksTabNav, 'summary_tab');
- 2486. - removeClass(viewsTabNav, 'summary_tab_sel');
- 2487. - }
- 2488. - } else {
- 2489. - if (clicksSideNav) {
- 2490. - if (hasClass(viewsSideNav, 'nav_selected')) {
- 2491. - return;
- 2492. - }
- 2493. - addClass(viewsSideNav, 'nav_selected');
- 2494. - removeClass(clicksSideNav, 'nav_selected');
- 2495. - }
- 2496. - if (clicksTabNav) {
- 2497. - if (hasClass(viewsTabNav, 'summary_tab_sel')) {
- 2498. - return;
- 2499. - }
- 2500. - addClass(viewsTabNav, 'summary_tab_sel');
- 2501. - addClass(clicksTabNav, 'summary_tab');
- 2502. - removeClass(viewsTabNav, 'summary_tab');
- 2503. - removeClass(clicksTabNav, 'summary_tab_sel');
- 2504. - }
- 2505. - }
- 2506. -
- 2507. - // Change graph
- 2508. - if (name == 'clicks') {
- 2509. - cur.lastDemographySourceOffset = 0;
- 2510. - if (cur.isDemographySvg) {
- 2511. - each(geByClass('ads_demography_bars_clicks'), function(i, el) { el.style.visibility = 'visible'; el.style.position = 'relative'; });
- 2512. - each(geByClass('ads_demography_bars_views'), function(i, el) { el.style.visibility = 'hidden'; el.style.position = 'absolute'; });
- 2513. - } else {
- 2514. - each(geByClass('ads_demography_bars_clicks'), show);
- 2515. - each(geByClass('ads_demography_bars_views'), hide);
- 2516. - }
- 2517. - try { cur.pageGraphs['ads_graph_users_stats_day_sex'].loadGraph(intval(cur.lastDemographySourceOffset)); } catch(e) {}
- 2518. - try { cur.pageGraphs['ads_graph_users_stats_day_age'].loadGraph(intval(cur.lastDemographySourceOffset) * 3 + intval(cur.lastDemographyAgeOffset)); } catch(e) {}
- 2519. - try { cur.pageGraphs['ads_graph_users_stats_day_cities'].loadGraph(intval(cur.lastDemographySourceOffset)); } catch(e) {}
- 2520. - } else {
- 2521. - cur.lastDemographySourceOffset = 1;
- 2522. - if (cur.isDemographySvg) {
- 2523. - each(geByClass('ads_demography_bars_views'), function(i, el) { el.style.visibility = 'visible'; el.style.position = 'relative'; });
- 2524. - each(geByClass('ads_demography_bars_clicks'), function(i, el) { el.style.visibility = 'hidden'; el.style.position = 'absolute'; });
- 2525. - } else {
- 2526. - each(geByClass('ads_demography_bars_views'), show);
- 2527. - each(geByClass('ads_demography_bars_clicks'), hide);
- 2528. - }
- 2529. - try { cur.pageGraphs['ads_graph_users_stats_day_sex'].loadGraph(intval(cur.lastDemographySourceOffset)); } catch(e) {}
- 2530. - try { cur.pageGraphs['ads_graph_users_stats_day_age'].loadGraph(intval(cur.lastDemographySourceOffset) * 3 + intval(cur.lastDemographyAgeOffset)); } catch(e) {}
- 2531. - try { cur.pageGraphs['ads_graph_users_stats_day_cities'].loadGraph(intval(cur.lastDemographySourceOffset)); } catch(e) {}
- 2532. - }
- 2533. - }
- 2534. -
- 2535. - Ads.changeDemographyAge = function(name) {
- 2536. - // Change navigation
- 2537. - var allNav = ge('ads_demography_navigation_tab_age_all').parentNode;
- 2538. - var femaleNav = ge('ads_demography_navigation_tab_age_female').parentNode;
- 2539. - var maleNav = ge('ads_demography_navigation_tab_age_male').parentNode;
- 2540. - switch (name) {
- 2541. - case 'all':
- 2542. - if (hasClass(allNav, 'summary_tab_sel')) {
- 2543. - return;
- 2544. - }
- 2545. - addClass(allNav, 'summary_tab_sel');
- 2546. - addClass(femaleNav, 'summary_tab');
- 2547. - addClass(maleNav, 'summary_tab');
- 2548. - removeClass(allNav, 'summary_tab');
- 2549. - removeClass(femaleNav, 'summary_tab_sel');
- 2550. - removeClass(maleNav, 'summary_tab_sel');
- 2551. - break;
- 2552. - case 'female':
- 2553. - if (hasClass(femaleNav, 'summary_tab_sel')) {
- 2554. - return;
- 2555. - }
- 2556. - addClass(femaleNav, 'summary_tab_sel');
- 2557. - addClass(allNav, 'summary_tab');
- 2558. - addClass(maleNav, 'summary_tab');
- 2559. - removeClass(femaleNav, 'summary_tab');
- 2560. - removeClass(allNav, 'summary_tab_sel');
- 2561. - removeClass(maleNav, 'summary_tab_sel');
- 2562. - break;
- 2563. - case 'male':
- 2564. - if (hasClass(maleNav, 'summary_tab_sel')) {
- 2565. - return;
- 2566. - }
- 2567. - addClass(maleNav, 'summary_tab_sel');
- 2568. - addClass(allNav, 'summary_tab');
- 2569. - addClass(femaleNav, 'summary_tab');
- 2570. - removeClass(maleNav, 'summary_tab');
- 2571. - removeClass(allNav, 'summary_tab_sel');
- 2572. - removeClass(femaleNav, 'summary_tab_sel');
- 2573. - break;
- 2574. - default:
- 2575. - return;
- 2576. - }
- 2577. -
- 2578. - // Change graph
- 2579. - switch (name) {
- 2580. - case 'all': cur.lastDemographyAgeOffset = 0; break;
- 2581. - case 'female': cur.lastDemographyAgeOffset = 1; break;
- 2582. - case 'male': cur.lastDemographyAgeOffset = 2; break;
- 2583. - default: return;
- 2584. - }
- 2585. - try { cur.pageGraphs['ads_graph_users_stats_day_age'].loadGraph(intval(cur.lastDemographySourceOffset) * 3 + intval(cur.lastDemographyAgeOffset)); } catch(e) {}
- 2586. - }
- 2587. -
- 2588. - Ads.loadDemography = function(unionId) {
- 2589. - if (!cur.demographyDelayed) {
- 2590. - return true;
- 2591. - }
- 2592. - if (!Ads.lock('load_demography', lock, unlock)) {
- 2593. - return false;
- 2594. - }
- 2595. -
- 2596. - var ajaxParams = {};
- 2597. - ajaxParams.union_id = unionId;
- 2598. -
- 2599. - ajax.post('/ads?act=a_users_stats', ajaxParams, {onDone: onComplete, onFail: onComplete});
- 2600. -
- 2601. - function lock() {
- 2602. - setStyle('ads_demography_navigation_tab_progress', {visibility: 'visible'});
- 2603. - }
- 2604. - function unlock() {
- 2605. - setStyle('ads_demography_navigation_tab_progress', {visibility: 'hidden'});
- 2606. - }
- 2607. - function onComplete(response) {
- 2608. - Ads.unlock('load_demography');
- 2609. - if (response && response.graphs_html && response.graphs_js) {
- 2610. - cur.demographyDelayed = false;
- 2611. - ge('ads_demography_graphs_wrap2').innerHTML = response.graphs_html;
- 2612. - eval(response.graphs_js);
- 2613. - Ads.changeDemographyView('graphs', unionId, true);
- 2614. - }
- 2615. - return true;
- 2616. - }
- 2617. -
- 2618. - return false;
- 2619. - }
- 2620. -
- 2621. - Ads.showEditAdminBox = function(event, unionId, userId, userEmail, isRemove) {
- 2622. - if (event && (event.which > 1 || event.button > 1 || event.ctrlKey)) {
- 2623. - return;
- 2624. - }
- 2625. -
- 2626. - userId = intval(userId);
- 2627. -
- 2628. - if (!userId && !userEmail) {
- 2629. - var userLink = ge('ads_user_link').getValue();
- 2630. - if (!userLink) {
- 2631. - showFastBox(getLang('ads_error_box_title'), getLang('ads_edit_admin_no_user_link'));
- 2632. - return;
- 2633. - }
- 2634. - }
- 2635. -
- 2636. - if (isRemove) {
- 2637. - cur.editAdminBoxTitle = getLang('ads_edit_admin_box_title_remove');
- 2638. - } else {
- 2639. - if (userId || userEmail) {
- 2640. - cur.editAdminBoxTitle = getLang('ads_edit_admin_box_title_edit');
- 2641. - } else {
- 2642. - cur.editAdminBoxTitle = getLang('ads_edit_admin_box_title_add');
- 2643. - }
- 2644. - }
- 2645. -
- 2646. - var ajaxParams = {};
- 2647. - ajaxParams.union_id = unionId;
- 2648. - if (isRemove) {
- 2649. - ajaxParams.action = 'remove';
- 2650. - } else {
- 2651. - ajaxParams.action = 'edit';
- 2652. - }
- 2653. - if (userId) {
- 2654. - ajaxParams.user_link = userId;
- 2655. - } else if (userEmail) {
- 2656. - ajaxParams.user_link = userEmail;
- 2657. - } else {
- 2658. - ajaxParams.user_link = userLink;
- 2659. - }
- 2660. -
- 2661. - var showOptions = {params: {}};
- 2662. - showOptions.onFail = Ads.onBoxFail;
- 2663. - showOptions.params.width = 440;
- 2664. -
- 2665. - showBox('/ads?act=a_edit_admin_box', ajaxParams, showOptions);
- 2666. -
- 2667. - return false;
- 2668. - }
- 2669. -
- 2670. - Ads.showRetargetingGroupActions = function(el, groupId) {
- 2671. - cur.options.groupId = groupId;
- 2672. - cur.uiRetargetingActions.setOptions({target: el});
- 2673. - cur.uiRetargetingActions.show();
- 2674. - }
- 2675. -
- 2676. - Ads.showRetargetingGroupBox = function(act, addParams) {
- 2677. - var ajaxParams = {};
- 2678. - ajaxParams.union_id = cur.options.unionId;
- 2679. - if (cur.options.groupId) {
- 2680. - ajaxParams.group_id = cur.options.groupId;
- 2681. - }
- 2682. - if (addParams) {
- 2683. - ajaxParams = extend(ajaxParams, addParams);
- 2684. - }
- 2685. -
- 2686. - var showOptions = {params: {}};
- 2687. - showOptions.onFail = Ads.onBoxFail;
- 2688. - showOptions.params = {width: 450, dark: true, hideButtons: true, bodyStyle: 'padding: 0;'};
- 2689. -
- 2690. - showBox('/ads?act=a_retargeting_group_'+act+'_box', ajaxParams, showOptions);
- 2691. -
- 2692. - return true;
- 2693. - }
- 2694. -
- 2695. - Ads.saveRetargetingGroupParam = function(id, v) {
- 2696. - var el = ge('ads_retargeting_'+id);
- 2697. - if (el) {
- 2698. - v = trim(val(el));
- 2699. - } else if (!el && v === undefined) {
- 2700. - return;
- 2701. - }
- 2702. - hide(ads_retargeting_box_error);
- 2703. -
- 2704. - ajax.post('/ads', {act: 'a_retargeting_save_params', union_id: cur.options.unionId, group_id: cur.options.groupId, type: id, value: v, hash: cur.options.saveHash}, {
- 2705. - onDone: function(value) {
- 2706. - val('union_' + cur.options.groupId + '_' + id, value);
- 2707. - cur.paramsTOs = cur.paramsTOs || {};
- 2708. - var labelEl = ge('ads_retargeting_'+id+'_saved');
- 2709. - if (labelEl) {
- 2710. - Ads.toggleRetargetingInput(id, false);
- 2711. -
- 2712. - setStyle(labelEl, 'opacity', 1);
- 2713. - clearTimeout(cur.paramsTOs[id]);
- 2714. - cur.paramsTOs[id] = setTimeout(function () {
- 2715. - animate(labelEl, {opacity: 0}, 1000);
- 2716. - }, 3000);
- 2717. - } else {
- 2718. - curBox().hide();
- 2719. - }
- 2720. - },
- 2721. - onFail: function(msg) {
- 2722. - ge('ads_retargeting_box_error').innerHTML = msg;
- 2723. - show(ads_retargeting_box_error);
- 2724. - return true;
- 2725. - },
- 2726. - showProgress: function() {
- 2727. - var el = ge('ads_retargeting_save_'+id);
- 2728. - if (el && el.tagName == 'BUTTON') {
- 2729. - lockButton(el);
- 2730. - }
- 2731. - },
- 2732. - hideProgress: function() {
- 2733. - var el = ge('ads_retargeting_save_'+id);
- 2734. - if (el && el.tagName == 'BUTTON') {
- 2735. - unlockButton(el);
- 2736. - }
- 2737. - }
- 2738. - });
- 2739. -
- 2740. - return true;
- 2741. - }
- 2742. -
- 2743. - Ads.deleteRetargetingGroup = function() {
- 2744. - if (!cur.options.unionId || !cur.options.groupId) {
- 2745. - return false;
- 2746. - }
- 2747. -
- 2748. - cur.uiRetargetingActions.hide();
- 2749. - var box = showFastBox(getLang('ads_retargeting_del_confirm_title'), getLang('ads_retargeting_del_confirm_message'), getLang('box_yes'), function() {
- 2750. - ajax.post('/ads', {act: 'a_del_retargeting_group', union_id: cur.options.unionId, group_id: cur.options.groupId, hash: cur.options.del_hash}, {
- 2751. - onDone: function(html) {
- 2752. - ge('ads_retargeting_groups_table').innerHTML = html;
- 2753. - curBox().hide();
- 2754. - },
- 2755. - showProgress: box.showProgress,
- 2756. - hideProgress: box.hideProgress
- 2757. - });
- 2758. - }, getLang('box_no'));
- 2759. -
- 2760. - return false;
- 2761. - }
- 2762. -
- 2763. - Ads.toggleRetargetingInput = function(id, show) {
- 2764. - var link = ge('ads_retargeting_'+id+'_link'), input = ge('ads_retargeting_'+id);
- 2765. - if (!link || !input) return false;
- 2766. - if (!show && isVisible(link)) return false;
- 2767. - toggle(link, !show);
- 2768. - toggle(ge('ads_retargeting_'+id+'_input'), show);
- 2769. - if (show) {
- 2770. - input.select();
- 2771. - if (!cur.values) cur.values = {};
- 2772. - cur.values[id] = input.value;
- 2773. - }
- 2774. - return false;
- 2775. - },
- 2776. - Ads.retargetingInputChanged = function(id) {
- 2777. - var new_val = trim(ge('ads_retargeting_'+id).value);
- 2778. - var new_val_s = new_val;
- 2779. - if (id == 'domain' && !new_val) {
- 2780. - new_val_s = getLang('ads_retargeting_domain_not_set');
- 2781. - } else if (!new_val) {
- 2782. - return;
- 2783. - }
- 2784. - ge('ads_retargeting_'+id+'_text').innerHTML = new_val_s;
- 2785. - ge('ads_retargeting_'+id).value = new_val;
- 2786. - if (cur.values[id] != new_val) {
- 2787. - Ads.saveRetargetingGroupParam(id);
- 2788. - cur.values[id] = new_val;
- 2789. - } else {
- 2790. - Ads.toggleRetargetingInput(id, false);
- 2791. - }
- 2792. - },
- 2793. -
- 2794. - Ads.initContacts = function(selectData, ajaxParams, isBig) {
- 2795. -
- 2796. - if (cur.contacts && cur.contacts.destroy) {
- 2797. - cur.contacts.destroy();
- 2798. - }
- 2799. -
- 2800. - var destroy = [];
- 2801. -
- 2802. - cur.contacts = {};
- 2803. - cur.contacts.ajaxParams = ajaxParams;
- 2804. -
- 2805. - cur.contacts.destroy = function() {
- 2806. - for (var i in destroy) {
- 2807. - destroy[i]();
- 2808. - }
- 2809. - destroy = [];
- 2810. - }
- 2811. - cur.destroy.push(function() { cur.contacts.destroy(); });
- 2812. -
- 2813. - var interestingEvents = 'keydown keyup keypress change paste cut drop input blur';
- 2814. -
- 2815. - var uiWidth = 250 + (isBig ? 22 : 0);
- 2816. -
- 2817. - var uiCountry = null;
- 2818. - var uiCity = null;
- 2819. -
- 2820. - ge('country').removeAttribute('autocomplete');
- 2821. - uiCountry = new Dropdown(ge('country'), selectData.countries, {
- 2822. - selectedItem: [selectData.country_val],
- 2823. -
- 2824. - big: isBig,
- 2825. - width: uiWidth,
- 2826. - multiselect: false,
- 2827. -
- 2828. - onChange: function(value) {
- 2829. - Ads.onFormEdit();
- 2830. - if (value == 1) {
- 2831. - hide('ads_contacts_form_nonresident', 'cis_msg');
- 2832. - show('ads_contacts_form_rus');
- 2833. - } else if (value > 1) {
- 2834. - hide('ads_contacts_form_rus');
- 2835. - show('ads_contacts_form_nonresident');
- 2836. - if (value < 4) show('cis_msg');
- 2837. - else hide('cis_msg');
- 2838. - }
- 2839. - if (value == -1) {
- 2840. - getAllCountries();
- 2841. - return;
- 2842. - } else if (value > 3) {
- 2843. - hide('city_row');
- 2844. - return;
- 2845. - }
- 2846. - uiCity.clear();
- 2847. - uiCity.setURL('/select_ajax.php?act=a_get_cities&country=' + value);
- 2848. - selectsData.getCountryInfo(value, 1, function(response) {
- 2849. - var new_options = {
- 2850. - defaultItems: response.cities,
- 2851. - dropdown: true
- 2852. - };
- 2853. - uiCity.setOptions(new_options);
- 2854. - if (selectData.country == value) {
- 2855. - uiCity.selectItem(selectData.city_val);
- 2856. - }
- 2857. - });
- 2858. - show(ge('city_row'));
- 2859. - }
- 2860. - });
- 2861. - destroy.push(function(){ uiCountry.destroy(); });
- 2862. -
- 2863. - ge('city').removeAttribute('autocomplete');
- 2864. - uiCity = new Selector(ge('city'), '/select_ajax.php?act=a_get_cities&country='+selectData.country, {
- 2865. - defaultItems: selectData.cities,
- 2866. - selectedItems: [selectData.city_val],
- 2867. -
- 2868. - big: isBig,
- 2869. - width: uiWidth,
- 2870. - multiselect: false,
- 2871. - dropdown: true,
- 2872. -
- 2873. - placeholder: getLang('select_city_not_selected'),
- 2874. - introText: getLang('select_city_select'),
- 2875. - noResult: getLang('select_city_not_found'),
- 2876. - otherCity: getLang('select_city_other_city'),
- 2877. -
- 2878. - onChange: function(value) {
- 2879. - Ads.onFormEdit();
- 2880. - }
- 2881. - });
- 2882. - destroy.push(function(){ uiCity.destroy(); });
- 2883. -
- 2884. - var uiAgency = new Checkbox(ge('agency'), {
- 2885. - checked: 1,
- 2886. - width: uiWidth,
- 2887. - label: getLang('ads_help_contacts_agency'),
- 2888. -
- 2889. - onChange: function(value) {
- 2890. - Ads.onFormEdit();
- 2891. - if (value == 1) {
- 2892. - slideDown(ge("agency_fields"), 200);
- 2893. - } else {
- 2894. - if (isVisible('agency_fields')) {
- 2895. - slideUp(ge("agency_fields"), 200);
- 2896. - }
- 2897. - }
- 2898. - }
- 2899. - });
- 2900. - destroy.push(function(){ uiAgency.destroy(); });
- 2901. -
- 2902. - var uiDating = new Checkbox(ge('dating'), {
- 2903. - checked: 0,
- 2904. - width: uiWidth,
- 2905. - label: getLang('ads_help_contacts_dating'),
- 2906. -
- 2907. - onChange: function(value) {
- 2908. - Ads.onFormEdit();
- 2909. - }
- 2910. - });
- 2911. - destroy.push(function(){ uiDating.destroy(); });
- 2912. -
- 2913. - var uiMedicine = new Checkbox(ge('medicine'), {
- 2914. - checked: 0,
- 2915. - width: uiWidth,
- 2916. - label: getLang('ads_help_contacts_medicine'),
- 2917. -
- 2918. - onChange: function(value) {
- 2919. - Ads.onFormEdit();
- 2920. - }
- 2921. - });
- 2922. - destroy.push(function(){ uiMedicine.destroy(); });
- 2923. -
- 2924. - ge('budget').removeAttribute('autocomplete');
- 2925. - var uiBudget = new Dropdown(ge('budget'), selectData.budget, {
- 2926. - selectedItems: '0',
- 2927. - big: isBig,
- 2928. - width: uiWidth,
- 2929. - zeroPlaceholder: true,
- 2930. - multiselect: false,
- 2931. -
- 2932. - onChange: function(value) {
- 2933. - Ads.onFormEdit();
- 2934. - }
- 2935. - });
- 2936. - destroy.push(function(){ uiBudget.destroy(); });
- 2937. -
- 2938. - ge('budget_nr').removeAttribute('autocomplete');
- 2939. - var uiBudgetNr = new Dropdown(ge('budget_nr'), selectData.budget, {
- 2940. - selectedItems: '0',
- 2941. - big: isBig,
- 2942. - width: uiWidth,
- 2943. - zeroPlaceholder: true,
- 2944. - multiselect: false,
- 2945. -
- 2946. - onChange: function(value) {
- 2947. - Ads.onFormEdit();
- 2948. - }
- 2949. - });
- 2950. - destroy.push(function(){ uiBudgetNr.destroy(); });
- 2951. -
- 2952. - if (selectData.offices) {
- 2953. - ge('office').removeAttribute('autocomplete');
- 2954. - var uiOffice = new Dropdown(ge('office'), selectData.offices, {
- 2955. - selectedItems: selectData.office,
- 2956. - big: isBig,
- 2957. - width: uiWidth,
- 2958. - multiselect: false,
- 2959. -
- 2960. - onChange: function(value) {
- 2961. - Ads.onFormEdit();
- 2962. - }
- 2963. - });
- 2964. - destroy.push(function(){ uiOffice.destroy(); });
- 2965. - }
- 2966. -
- 2967. - addEvent(ge('organisation'), interestingEvents, Ads.onFormEdit);
- 2968. - destroy.push(function(){ cleanElems(ge('organisation')); });
- 2969. - addEvent(ge('contact'), interestingEvents, Ads.onFormEdit);
- 2970. - destroy.push(function(){ cleanElems(ge('contact')); });
- 2971. - addEvent(ge('email'), interestingEvents, Ads.onFormEdit);
- 2972. - destroy.push(function(){ cleanElems(ge('email')); });
- 2973. - addEvent(ge('phone'), interestingEvents, Ads.onFormEdit);
- 2974. - destroy.push(function(){ cleanElems(ge('phone')); });
- 2975. - addEvent(ge('message'), interestingEvents, Ads.onFormEdit);
- 2976. - destroy.push(function(){ cleanElems(ge('message')); });
- 2977. - addEvent(ge('organisation_nr'), interestingEvents, Ads.onFormEdit);
- 2978. - destroy.push(function(){ cleanElems(ge('organisation_nr')); });
- 2979. - addEvent(ge('contact_nr'), interestingEvents, Ads.onFormEdit);
- 2980. - destroy.push(function(){ cleanElems(ge('contact_nr')); });
- 2981. - addEvent(ge('requisites_nr'), interestingEvents, Ads.onFormEdit);
- 2982. - destroy.push(function(){ cleanElems(ge('requisites_nr')); });
- 2983. - addEvent(ge('email_nr'), interestingEvents, Ads.onFormEdit);
- 2984. - destroy.push(function(){ cleanElems(ge('email_nr')); });
- 2985. - addEvent(ge('phone_nr'), interestingEvents, Ads.onFormEdit);
- 2986. - destroy.push(function(){ cleanElems(ge('phone_nr')); });
- 2987. - addEvent(ge('clients_nr'), interestingEvents, Ads.onFormEdit);
- 2988. - destroy.push(function(){ cleanElems(ge('clients_nr')); });
- 2989. - addEvent(ge('message_nr'), interestingEvents, Ads.onFormEdit);
- 2990. - destroy.push(function(){ cleanElems(ge('message_nr')); });
- 2991. -
- 2992. - function getAllCountries() {
- 2993. - function onDone(response) {
- 2994. - if (response && isArray(response.countries)) {
- 2995. - response.countries.splice(0, 1);
- 2996. - uiCountry.setData(response.countries);
- 2997. - uiCountry.val('');
- 2998. - uiCity.clear();
- 2999. - uiCity.setOptions({defaultItems: []});
- 3000. - }
- 3001. - }
- 3002. - ajax.post('/ads?act=a_get_countries', {}, {onDone: onDone});
- 3003. - }
- 3004. - }
- 3005. -
- 3006. - Ads.sendContactsForm = function(button) {
- 3007. - if (!Ads.lock('sendContactsForm', onLock, onUnlock)) {
- 3008. - return false;
- 3009. - }
- 3010. -
- 3011. - var ajaxParams = extend({}, cur.contacts.ajaxParams);
- 3012. - ajaxParams.country = ge('country').value;
- 3013. - ajaxParams.city = ge('city').value;
- 3014. - ajaxParams.agency = ge('agency').value;
- 3015. - ajaxParams.dating = ge('dating').value;
- 3016. - ajaxParams.medicine = ge('medicine').value;
- 3017. - ajaxParams = extend(ajaxParams, serializeForm(ge(ajaxParams.country == 1 ? 'ads_contacts_form_rus' : 'ads_contacts_form_nonresident')));
- 3018. -
- 3019. - ajax.post('/ads?act=a_send_contacts', ajaxParams, {onDone: onDone, onFail: onDone});
- 3020. -
- 3021. - function onDone(response) {
- 3022. - Ads.unlock('sendContactsForm');
- 3023. - if (!response || !response.result) {
- 3024. - if (!response || !response.msg) {
- 3025. - tryErrorBox(getLang('ads_error_unexpected_error_try_later'));
- 3026. - } else {
- 3027. - tryErrorBox(response.msg);
- 3028. - }
- 3029. - return true;
- 3030. - }
- 3031. - ge('ads_contacts_form').innerHTML = response.msg;
- 3032. - }
- 3033. - function tryErrorBox(message) {
- 3034. - showFastBox(getLang('global_error'), message);
- 3035. - }
- 3036. - function onLock() {
- 3037. - lockButton(button);
- 3038. - }
- 3039. - function onUnlock() {
- 3040. - unlockButton(button);
- 3041. - }
- 3042. - }
- 3043. -
- 3044. - try{stManager.done('ads.js');}catch(e){}
- ------
- Файл - ads_edit.css (Старый размер - 13463 | Новый - 0):
- 0. - #ads_edit_css { display: none; }
- 1. -
- 2. - /* -------------- */
- 3. - /* Edit ad - main */
- 4. - /* -------------- */
- 5. -
- 6. - .ads_edit_page_wrap1 {
- 7. - }
- 8. - .ads_edit_page_wrap2 {
- 9. - }
- 10. - .ads_edit_page_wrap3 {
- 11. - background-color: #F9F9F9;
- 12. - padding: 20px;
- 13. - }
- 14. -
- 15. - #ads_page .error {
- 16. - margin-bottom: 20px;
- 17. - }
- 18. -
- 19. - .ads_edit_panel_edit {
- 20. - width: 540px;
- 21. - }
- 22. -
- 23. - .ads_edit_panel_link_object_wrap {
- 24. - padding-top: 20px;
- 25. - padding-bottom: 5px;
- 26. - }
- 27. -
- 28. - .ads_edit_table {
- 29. - border: 0px;
- 30. - border-collapse: collapse;
- 31. - }
- 32. -
- 33. - .ads_edit_label,
- 34. - .ads_edit_value {
- 35. - padding: 0 0 10px 0;
- 36. - vertical-align: top;
- 37. - }
- 38. -
- 39. - .ads_edit_label {
- 40. - width: 190px;
- 41. - text-align: right;
- 42. - padding-right: 10px;
- 43. - color: #666666;
- 44. - }
- 45. -
- 46. - .ads_edit_label_input_ui {
- 47. - padding-top: 8px;
- 48. - }
- 49. - @-moz-document url-prefix() {
- 50. - .ads_edit_label_input_ui {
- 51. - padding-top: 7px;
- 52. - }
- 53. - }
- 54. -
- 55. - .ads_edit_label_input {
- 56. - padding-top: 8px;
- 57. - }
- 58. - @-moz-document url-prefix() {
- 59. - .ads_edit_label_input {
- 60. - padding-top: 7px;
- 61. - }
- 62. - }
- 63. -
- 64. - .ads_edit_label_checkbox {
- 65. - padding-top: 3px;
- 66. - }
- 67. - @-moz-document url-prefix() {
- 68. - .ads_edit_label_checkbox {
- 69. - padding-top: 2px;
- 70. - }
- 71. - }
- 72. -
- 73. - .ads_edit_label_radiobutton {
- 74. - padding-top: 6px;
- 75. - }
- 76. -
- 77. - .ads_edit_label_textarea {
- 78. - padding-top: 8px;
- 79. - }
- 80. - @-moz-document url-prefix() {
- 81. - .ads_edit_label_textarea {
- 82. - }
- 83. - padding-top: 7px;
- 84. - }
- 85. -
- 86. - .ads_edit_value .text {
- 87. - width: 310px;
- 88. - height: 17px;
- 89. - line-height: 17px;
- 90. - padding: 5px 6px 6px 10px;
- 91. - }
- 92. - @-moz-document url-prefix() {
- 93. - .ads_edit_value .text {
- 94. - padding-left: 9px;
- 95. - width: 311px;
- 96. - }
- 97. - }
- 98. - .ads_edit_value .ads_edit_value_range .text {
- 99. - width: 142px;
- 100. - }
- 101. -
- 102. - .listing.ads_edit_help_listing {
- 103. - margin-bottom: 0;
- 104. - }
- 105. -
- 106. - .ads_edit_value_range_from,
- 107. - .ads_edit_value_range_sep,
- 108. - .ads_edit_value_range_to {
- 109. - }
- 110. -
- 111. - .ads_edit_value_range_sep {
- 112. - width: 10px;
- 113. - }
- 114. -
- 115. - .ads_edit_value_checkbox_wrap {
- 116. - height: 20px
- 117. - }
- 118. - .ads_edit_value_checkbox_wrap2 {
- 119. - padding: 1px 0;
- 120. - }
- 121. - .ads_edit_value_checkbox_wrap3 {
- 122. - margin: -6px 0;
- 123. - }
- 124. -
- 125. - .ads_edit_value_tip {
- 126. - font-size: 0.9em;
- 127. - color: #777777;
- 128. - width: 250px;
- 129. - padding-top: 5px;
- 130. - }
- 131. -
- 132. - .ads_edit_separator_big {
- 133. - border-bottom: 1px solid #DAE2E8;
- 134. - height: 1px;
- 135. - margin: 10px 0 20px 0;
- 136. - }
- 137. -
- 138. - .ads_edit_value_header {
- 139. - color: #45688E;
- 140. - font-size: 1.18em;
- 141. - font-weight: bold;
- 142. - padding-bottom: 5px;
- 143. - }
- 144. -
- 145. - /* ---------------- */
- 146. - /* Edit ad - common */
- 147. - /* ---------------- */
- 148. -
- 149. - .ads_edit_ad_row_header_radiobutton td {
- 150. - padding-bottom: 4px;
- 151. - }
- 152. - #ads_edit_ad_row_targeting_header td,
- 153. - #ads_edit_ad_row_targeting_header .ads_edit_value_header {
- 154. - padding-bottom: 0;
- 155. - }
- 156. -
- 157. - .ads_param_title_remain_wrap,
- 158. - .ads_param_description_remain_wrap,
- 159. - #ads_targeting_criterion_tags_remain {
- 160. - font-size: 0.9em;
- 161. - color: #777777;
- 162. - padding-top: 6px;
- 163. - }
- 164. -
- 165. - #ads_param_category_more {
- 166. - font-size: 0.9em;
- 167. - padding-top: 6px;
- 168. - }
- 169. -
- 170. - /* ------------ */
- 171. - /* Edit ad - ad */
- 172. - /* ------------ */
- 173. -
- 174. - .ads_edit_ad_view_wrap {
- 175. - text-align: center;
- 176. - padding-right: 50px;
- 177. - }
- 178. - .ads_edit_ad_view_wrap.news {
- 179. - padding-right: 0;
- 180. - }
- 181. -
- 182. - .ads_edit_panel_preview .ads_ad_box.news {
- 183. - padding: 10px;
- 184. - }
- 185. -
- 186. - .ads_edit_panel_preview .ads_ad_box_border {
- 187. - border-width: 1px;
- 188. - background-color: white;
- 189. - }
- 190. -
- 191. - .ads_ad_play.empty {
- 192. - background-image: url(/images/ad_video_empty.png);
- 193. - }
- 194. - .is_2x .ads_ad_play.empty {
- 195. - background-image: url(/images/ad_video_empty_2x.png);
- 196. - }
- 197. -
- 198. - .ads_edit_ad_view_controls {
- 199. - padding-top: 5px;
- 200. - }
- 201. -
- 202. - /* ------------------ */
- 203. - /* Edit ad - audience */
- 204. - /* ------------------ */
- 205. -
- 206. - #ads_edit_audience {
- 207. - padding: 20px;
- 208. - background-color: #EDF0F2;
- 209. - width: 160px;
- 210. - }
- 211. - #ads_edit_audience_title,
- 212. - #ads_edit_recommended_cost_title {
- 213. - color: #36638E;
- 214. - font-size: 1.09em;
- 215. - font-weight: bold;
- 216. - padding-bottom: 5px;
- 217. - }
- 218. - #ads_edit_recommended_cost_title {
- 219. - padding-top: 15px;
- 220. - }
- 221. -
- 222. - #ads_edit_audience_title,
- 223. - #ads_edit_audience_title_text {
- 224. - position: relative;
- 225. - }
- 226. - #ads_edit_audience_progress {
- 227. - display: none;
- 228. - position: absolute;
- 229. - top: 4px;
- 230. - right: 0;
- 231. - }
- 232. -
- 233. - /* -------------- */
- 234. - /* Edit ad - link */
- 235. - /* -------------- */
- 236. -
- 237. - .ads_edit_link_type_item {
- 238. - height: 60px;
- 239. - width: 328px;
- 240. - position: relative;
- 241. - }
- 242. - .ads_edit_link_type_item:hover {
- 243. - background-color: #E6E9ED;
- 244. - }
- 245. - .ads_edit_link_type_item.selected,
- 246. - .ads_edit_link_type_item.selected.disabled,
- 247. - .ads_edit_link_type_item.selected.disabled:hover {
- 248. - background-color: #6186AD;
- 249. - opacity: 1;
- 250. - }
- 251. - .ads_edit_link_type_item:hover {
- 252. - cursor: pointer;
- 253. - }
- 254. - .ads_edit_link_type_item.disabled,
- 255. - .ads_edit_link_type_item.disabled:hover {
- 256. - background-color: transparent;
- 257. - cursor: auto;
- 258. - opacity: 0.5;
- 259. - }
- 260. -
- 261. - .ads_edit_link_type_item_title,
- 262. - .ads_edit_link_type_item_description {
- 263. - padding-left: 66px;
- 264. - }
- 265. - .ads_edit_link_type_item_title {
- 266. - font-size: 1.09em;
- 267. - font-weight: bold;
- 268. - padding-top: 14px;
- 269. - }
- 270. - .ads_edit_link_type_item_description {
- 271. - padding-top: 4px;
- 272. - }
- 273. - .ads_edit_link_type_item .ads_edit_link_type_item_title,
- 274. - .ads_edit_link_type_item.disabled .ads_edit_link_type_item_title,
- 275. - .ads_edit_link_type_item.disabled:hover .ads_edit_link_type_item_title {
- 276. - color: #4E6E90;
- 277. - }
- 278. - .ads_edit_link_type_item .ads_edit_link_type_item_description,
- 279. - .ads_edit_link_type_item.disabled .ads_edit_link_type_item_description,
- 280. - .ads_edit_link_type_item.disabled:hover .ads_edit_link_type_item_description {
- 281. - color: #798087;
- 282. - }
- 283. - .ads_edit_link_type_item:hover .ads_edit_link_type_item_description {
- 284. - color: #79828C;
- 285. - }
- 286. - .ads_edit_link_type_item.selected .ads_edit_link_type_item_title,
- 287. - .ads_edit_link_type_item.selected.disabled .ads_edit_link_type_item_title,
- 288. - .ads_edit_link_type_item.selected.disabled:hover .ads_edit_link_type_item_title {
- 289. - color: white;
- 290. - }
- 291. - .ads_edit_link_type_item.selected .ads_edit_link_type_item_description,
- 292. - .ads_edit_link_type_item.selected.disabled .ads_edit_link_type_item_description,
- 293. - .ads_edit_link_type_item.selected.disabled:hover .ads_edit_link_type_item_description {
- 294. - color: #D3E0EE;
- 295. - }
- 296. -
- 297. - .ads_edit_link_type_item_image {
- 298. - position: absolute;
- 299. - top: 11px;
- 300. - left: 16px;
- 301. - width: 38px;
- 302. - height: 38px;
- 303. - background-size: 38px auto;
- 304. - }
- 305. - .ads_edit_link_type_item .ads_edit_link_type_item_image {
- 306. - background-image: url(/images/ads_link_type_icons.png);
- 307. - }
- 308. - .is_2x .ads_edit_link_type_item .ads_edit_link_type_item_image {
- 309. - background-image: url(/images/ads_link_type_icons_2x.png);
- 310. - }
- 311. - .ads_edit_link_type_item.selected .ads_edit_link_type_item_image {
- 312. - background-image: url(/images/ads_link_type_inv_icons.png);
- 313. - }
- 314. - .is_2x .ads_edit_link_type_item.selected .ads_edit_link_type_item_image {
- 315. - background-image: url(/images/ads_link_type_inv_icons_2x.png);
- 316. - }
- 317. - #ads_param_link_type_community .ads_edit_link_type_item_image {
- 318. - background-position: 0 0;
- 319. - }
- 320. - #ads_param_link_type_app_vk .ads_edit_link_type_item_image {
- 321. - background-position: 0 -38px;
- 322. - }
- 323. - #ads_param_link_type_market .ads_edit_link_type_item_image {
- 324. - background: none;
- 325. - }
- 326. - #ads_param_link_type_video .ads_edit_link_type_item_image {
- 327. - background-position: 0 -76px;
- 328. - }
- 329. - #ads_param_link_type_app_mobile .ads_edit_link_type_item_image {
- 330. - background-position: 0 -114px;
- 331. - }
- 332. - #ads_param_link_type_link .ads_edit_link_type_item_image {
- 333. - background-position: 0 -152px;
- 334. - }
- 335. -
- 336. - #ads_param_upload_video_wrap {
- 337. - padding-top: 10px;
- 338. - }
- 339. - .ads_edit_value_header_video {
- 340. - padding-bottom: 15px;
- 341. - }
- 342. -
- 343. - a.ads_edit_link_go {
- 344. - border-bottom: 1px dashed #A7B7C9;
- 345. - padding-right: 8px;
- 346. - background: url(/images/wikiextarr.gif) no-repeat right 4px;
- 347. - }
- 348. - a.ads_edit_link_go:hover {
- 349. - text-decoration: none;
- 350. - border-bottom: 1px solid #A7B7C9;
- 351. - }
- 352. -
- 353. - #ads_param_link_id_go_wrap,
- 354. - #ads_param_link_url_go_wrap,
- 355. - #ads_param_link_video_go_wrap {
- 356. - width: 1px;
- 357. - padding: 7px 0 0 10px;
- 358. - }
- 359. - #ads_param_link_video_go_wrap {
- 360. - padding-top: 5px;
- 361. - }
- 362. -
- 363. - #ads_param_link_domain_progress_wrap {
- 364. - width: 1px;
- 365. - }
- 366. - #ads_param_link_domain_progress {
- 367. - padding: 11px 0 0 5px;
- 368. - }
- 369. -
- 370. - /* -------------- */
- 371. - /* Edit ad - view */
- 372. - /* -------------- */
- 373. -
- 374. - .ads_edit_ad_format_type_new {
- 375. - font-size: 0.91em;
- 376. - font-weight: bold;
- 377. - position: relative;
- 378. - top: -5px;
- 379. - }
- 380. -
- 381. - #ads_param_title {
- 382. - height: 34px;
- 383. - }
- 384. - #ads_param_description {
- 385. - height: 68px;
- 386. - }
- 387. - #ads_param_title,
- 388. - #ads_param_description {
- 389. - overflow: hidden;
- 390. - resize: none;
- 391. - }
- 392. -
- 393. - #ads_edit_ad_row_additional .ads_edit_value_checkbox_wrap {
- 394. - height: 26px;
- 395. - }
- 396. -
- 397. - #ads_edit_ad_row_upload_photo .ads_edit_value {
- 398. - padding-bottom: 13px;
- 399. - }
- 400. -
- 401. - /* ------------------ */
- 402. - /* Edit ad - behavior */
- 403. - /* ------------------ */
- 404. -
- 405. - .ads_edit_value_cost_type_wrap {
- 406. - height: 54px;
- 407. - }
- 408. -
- 409. - .ads_param_cost_per_click_currency_wrap {
- 410. - padding: 8px 0 0 10px;
- 411. - }
- 412. - @-moz-document url-prefix() {
- 413. - .ads_param_cost_per_click_currency_wrap {
- 414. - padding-top: 7px;
- 415. - }
- 416. - }
- 417. -
- 418. - .text#ads_param_cost_per_click {
- 419. - width: 50px;
- 420. - }
- 421. -
- 422. - #ads_param_cost_per_click_recommended {
- 423. - color: #777777;
- 424. - font-size: 0.9em;
- 425. - padding-top: 8px;
- 426. - }
- 427. -
- 428. - .ads_edit_value_campaign_type_wrap {
- 429. - padding-bottom: 10px;
- 430. - }
- 431. -
- 432. - #ads_param_campaign_name_wrap {
- 433. - min-height: 22px;
- 434. - }
- 435. -
- 436. - /* ------------------ */
- 437. - /* Edit ad - controls */
- 438. - /* ------------------ */
- 439. -
- 440. - .ads_edit_value_terms {
- 441. - line-height: 160%;
- 442. - }
- 443. -
- 444. - #ads_edit_controls_buttons_row .button_blue,
- 445. - #ads_edit_link_object_buttons_row .button_blue {
- 446. - margin-right: 10px;
- 447. - }
- 448. -
- 449. - /* ------------------- */
- 450. - /* Edit ad - targeting */
- 451. - /* ------------------- */
- 452. -
- 453. - .ads_edit_targeting_group_hider_title {
- 454. - color: #555555;
- 455. - font-size: 1.09em;
- 456. - cursor: pointer;
- 457. - font-weight: bold;
- 458. - padding: 5px 0 5px 20px;
- 459. - margin-left: -21px;
- 460. - }
- 461. - .ads_edit_targeting_group_hider_title.on {
- 462. - background: url(/images/filterset_on.gif) no-repeat 1px 9px;
- 463. - background-size: 9px 7px;
- 464. - }
- 465. - .is_2x .ads_edit_targeting_group_hider_title.on {
- 466. - background-image: url(/images/filterset_on_2x.png);
- 467. - }
- 468. - .ads_edit_targeting_group_hider_title.off {
- 469. - background: url(/images/filterset_off.gif) no-repeat 2px 8px;
- 470. - background-size: 7px 9px;
- 471. - }
- 472. - .is_2x .ads_edit_targeting_group_hider_title.off {
- 473. - background-image: url(/images/filterset_off_2x.png);
- 474. - }
- 475. - .ads_edit_targeting_group_hider_info {
- 476. - color: #909090;
- 477. - cursor: pointer;
- 478. - }
- 479. - .ads_edit_value.ads_edit_targeting_group_hider {
- 480. - padding-top: 7px;
- 481. - padding-bottom: 12px;
- 482. - }
- 483. - #ads_edit_targeting_group_demography_hider.ads_edit_value.ads_edit_targeting_group_hider,
- 484. - #ads_edit_targeting_group_graduation_hider.ads_edit_value.ads_edit_targeting_group_hider {
- 485. - padding-bottom: 6px;
- 486. - }
- 487. - #ads_edit_targeting_group_interests_hider.ads_edit_value.ads_edit_targeting_group_hider,
- 488. - #ads_edit_targeting_group_additional_hider.ads_edit_value.ads_edit_targeting_group_hider {
- 489. - padding-top: 13px;
- 490. - }
- 491. - .ads_edit_targeting_group {
- 492. - }
- 493. -
- 494. - .ads_edit_value_birthday_today {
- 495. - padding-right: 5px;
- 496. - }
- 497. -
- 498. - #ads_edit_criterion_row_birthday .ads_edit_label,
- 499. - #ads_edit_criterion_row_birthday .ads_edit_value {
- 500. - padding-bottom: 8px;
- 501. - }
- 502. -
- 503. - #ads_targeting_criterion_tags {
- 504. - height: 52px;
- 505. - min-height: 52px;
- 506. - resize: vertical;
- 507. - }
- 508. -
- 509. - /* -------- */
- 510. - /* Tooltips */
- 511. - /* -------- */
- 512. -
- 513. - .ads_edit_tt.tt .tt_text {
- 514. - padding: 0;
- 515. - }
- 516. -
- 517. - .ads_edit_tt_text {
- 518. - padding: 10px;
- 519. - width: 281px;
- 520. - color: black;
- 521. - line-height: 150%;
- 522. - }
- 523. -
- 524. - .ads_edit_tt_pointer {
- 525. - background: url(/images/ddtooltip.png) no-repeat 0 0;
- 526. - background-size: 16px 11px;
- 527. - width: 8px;
- 528. - height: 11px;
- 529. - position: absolute;
- 530. - left: -7px;
- 531. - top: 38px;
- 532. - overflow: hidden;
- 533. - z-index: 10;
- 534. - }
- 535. - .is_2x .ads_edit_tt_pointer {
- 536. - background-image: url(/images/ddtooltip_2x.png);
- 537. - }
- 538. -
- 539. - .ads_edit_tt_pointer.ads_edit_tt_pointer_category1_id {
- 540. - top: 24px;
- 541. - }
- 542. -
- 543. - .ads_edit_tt_pointer.ads_edit_tt_pointer_views_limit_flag {
- 544. - top: 19px;
- 545. - }
- 546. -
- 547. - .ads_edit_tt_pointer.ads_edit_tt_pointer_travellers {
- 548. - top: 36px;
- 549. - }
- 550. -
- 551. - .ads_edit_tt_pointer.ads_edit_tt_pointer_positions {
- 552. - top: 24px;
- 553. - }
- 554. -
- 555. - .ads_edit_tt_pointer.ads_edit_tt_pointer_pays_money {
- 556. - top: 24px;
- 557. - }
- 558. -
- 559. - .ads_edit_tt_pointer.ads_edit_tt_pointer_tags {
- 560. - top: 57px;
- 561. - }
- 562. -
- 563. - .ads_edit_tt_pointer.ads_edit_tt_pointer_domain {
- 564. - top: 38px;
- 565. - }
- 566. -
- 567. - .ads_edit_tt_pointer.ads_edit_tt_pointer_expiration {
- 568. - top: 32px;
- 569. - }
- 570. -
- 571. - /* -------- */
- 572. - /* Last ads */
- 573. - /* -------- */
- 574. -
- 575. - #ads_edit_last_ads_search {
- 576. - background: url(/images/magglass.png) no-repeat 5px 6px #FFFFFF;
- 577. - background-size: 11px 11px;
- 578. - padding: 5px 0 5px 21px;
- 579. - width: 100%;
- 580. - }
- 581. - .is_2x #ads_edit_last_ads_search {
- 582. - background-image: url(/images/magglass_2x.png);
- 583. - }
- 584. -
- 585. - .ads_edit_last_ads_search_wrap1 {
- 586. - padding: 10px;
- 587. - border-bottom: solid 1px #CAD0D6;
- 588. - background-color: #F7F7F7;
- 589. - }
- 590. -
- 591. - .ads_edit_last_ads_search_wrap2 {
- 592. - margin-right: 22px;
- 593. - }
- 594. -
- 595. - #ads_edit_last_ads_content {
- 596. - height: 400px;
- 597. - padding: 20px 0 0 20px;
- 598. - overflow-y: scroll;
- 599. - }
- 600. -
- 601. - #ads_edit_last_ads_no_result {
- 602. - display: none;
- 603. - padding-top: 150px;
- 604. - font-size: 1.09em;
- 605. - text-align: center;
- 606. - color: #777777;
- 607. - }
- 608. -
- 609. - .ads_edit_last_ads_ad_wrap {
- 610. - padding-right: 20px;
- 611. - }
- 612. -
- 613. - /* ------ */
- 614. - /* Upload */
- 615. - /* ------ */
- 616. -
- 617. - .ads_edit_upload_uploader {
- 618. - text-align: center;
- 619. - }
- 620. -
- 621. - .ads_edit_upload_progress_wrap1 {
- 622. - width: 250px;
- 623. - }
- 624. -
- 625. - /* -------------- */
- 626. - /* Upload - photo */
- 627. - /* -------------- */
- 628. -
- 629. - .ads_edit_upload_photo_box .error {
- 630. - margin-bottom: 8px;
- 631. - }
- 632. -
- 633. - /* ------------------- */
- 634. - /* Upload - crop photo */
- 635. - /* ------------------- */
- 636. -
- 637. - .ads_edit_crop_photo_box .error {
- 638. - margin-bottom: 8px;
- 639. - }
- 640. -
- 641. - .ads_edit_crop_photo_box .info_msg {
- 642. - margin-bottom: 15px;
- 643. - }
- 644. -
- 645. - .ads_edit_crop_photo_ad.fl_l {
- 646. - padding-top: 15px;
- 647. - }
- 648. -
- 649. - .ads_edit_crop_photo_ad .ads_ad_box_border.repeat_ver.news {
- 650. - border-width: 0;
- 651. - }
- 652. -
- 653. - .ads_edit_crop_photo_ad .ads_ad_play {
- 654. - cursor: move;
- 655. - }
- 656. -
- 657. - #ads_edit_crop_photo_big {
- 658. - vertical-align: top;
- 659. - }
- 660. -
- 661. - #ads_edit_crop_photo_small_wrap {
- 662. - margin: 0 auto;
- 663. - }
- 664. -
- 665. - /* -------------- */
- 666. - /* Upload - video */
- 667. - /* -------------- */
- 668. -
- 669. - .ads_edit_upload_video_box .error {
- 670. - margin-bottom: 10px;
- 671. - }
- 672. -
- 673. - #ads_edit_upload_video_info {
- 674. - margin-top: 15px;
- 675. - }
- 676. -
- 677. - #ads_edit_upload_video_external_wrap {
- 678. - padding: 0 30px;
- 679. - }
- 680. -
- 681. - #ads_edit_upload_video_external_link_wrap {
- 682. - margin-right: 12px;
- 683. - }
- 684. -
- 685. - #ads_edit_upload_video_external_link {
- 686. - padding: 5px;
- 687. - width: 100%;
- 688. - }
- 689. -
- 690. - #ads_edit_upload_video_external_error {
- 691. - padding-top: 5px;
- 692. - color: #777777;
- 693. - }
- ------
Advertisement
Add Comment
Please, Sign In to add comment