Hormold

VK Change (#1393578907)

Feb 28th, 2014
903
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 190.31 KB | None | 0 0
  1. Файл - ads.css (Старый размер - 39565 | Новый - 0):
  2. 0.  - #ads_css { display: none; }
  3. 1.  -
  4. 2.  - /* ------- */
  5. 3.  - /* General */
  6. 4.  - /* ------- */
  7. 5.  -
  8. 6.  - ul.ads_listing {
  9. 7.  -   padding: 0 0 0 30px;
  10. 8.  -   margin: 0 0 15px 0;
  11. 9.  - }
  12. 10.  - ul.ads_listing li {
  13. 11.  -   list-style: square;
  14. 12.  -   color: #758EAC;
  15. 13.  -   line-height: 160%;
  16. 14.  - }
  17. 15.  - ul.ads_listing li span {
  18. 16.  -   color: #000000;
  19. 17.  - }
  20. 18.  -
  21. 19.  - a .ads_sub_link:hover {
  22. 20.  -   text-decoration: underline;
  23. 21.  - }
  24. 22.  -
  25. 23.  - .ads_h2_add {
  26. 24.  -   font-weight: normal;
  27. 25.  -   font-size: 11px;
  28. 26.  -   padding-top: 0.185em;
  29. 27.  - }
  30. 28.  - .font_medium .ads_h2_add {
  31. 29.  -   font-size: 12px;
  32. 30.  -   padding-top: 0.14em;
  33. 31.  - }
  34. 32.  -
  35. 33.  - .ads_gradient_progress_wrap {
  36. 34.  -   height: 18px;
  37. 35.  -   margin: 0 auto;
  38. 36.  -   background: #FFFFFF;
  39. 37.  -   border: 1px solid #CCCCCC;
  40. 38.  - }
  41. 39.  -
  42. 40.  - .ads_gradient_progress {
  43. 41.  -   height: 18px;
  44. 42.  -   background: #597DA3 url(/images/progress_grad.gif) repeat;
  45. 43.  -   border: 1px solid #45688E;
  46. 44.  -   margin: -1px;
  47. 45.  - }
  48. 46.  -
  49. 47.  - /* ---- */
  50. 48.  - /* Page */
  51. 49.  - /* ---- */
  52. 50.  -
  53. 51.  - #ads_page_wrap2 {
  54. 52.  -   border: 1px solid #EBF0F4;
  55. 53.  -   border-top: 0;
  56. 54.  -   width: 791px;
  57. 55.  -   float: right;
  58. 56.  - }
  59. 57.  -
  60. 58.  - #ads_page_wrap1 {
  61. 59.  -   border: 1px solid #DAE1E8;
  62. 60.  -   border-top: 0;
  63. 61.  -   width: 789px;
  64. 62.  -   overflow: hidden;
  65. 63.  - }
  66. 64.  -
  67. 65.  - #ads_page {
  68. 66.  -   padding: 20px;
  69. 67.  - }
  70. 68.  - #ads_page.ads_page_no_padding {
  71. 69.  -   padding: 0;
  72. 70.  - }
  73. 71.  -
  74. 72.  - #ads_page_top {
  75. 73.  -   padding-top: 10px;
  76. 74.  - }
  77. 75.  -
  78. 76.  - .ads_page_extra_wide #ads_page_wrap2,
  79. 77.  - .ads_page_extra_wide #ads_page_wrap1 {
  80. 78.  -   width: auto;
  81. 79.  - }
  82. 80.  -
  83. 81.  - .ads_page_extra_wide #ads_page_wrap2 {
  84. 82.  -   float: none;
  85. 83.  - }
  86. 84.  -
  87. 85.  - #ads_page_bottom_info {
  88. 86.  -   border-top: 1px solid #DAE1E8;
  89. 87.  -   background-color: #F7F7F7;
  90. 88.  -   text-align: center;
  91. 89.  -   padding: 6px 20px;
  92. 90.  -   color: #777777;
  93. 91.  - }
  94. 92.  -
  95. 93.  - .ads_page_small {
  96. 94.  -   padding: 0 60px;
  97. 95.  - }
  98. 96.  -
  99. 97.  - /* ----- */
  100. 98.  - /* Title */
  101. 99.  - /* ----- */
  102. 100.  -
  103. 101.  - #ads_page_title {
  104. 102.  -   background-color: #E9EDF1;
  105. 103.  -   padding: 7px 10px;
  106. 104.  -   margin: 0;
  107. 105.  -   font-weight: bold;
  108. 106.  -   color: #607387;
  109. 107.  -   line-height: 140%;
  110. 108.  - }
  111. 109.  -
  112. 110.  - #ads_page_title h1 {
  113. 111.  -   font-size: 1em;
  114. 112.  -   overflow: hidden;
  115. 113.  -   padding: 0;
  116. 114.  -   margin: 0;
  117. 115.  - }
  118. 116.  -
  119. 117.  - #ads_page_title h1 a {
  120. 118.  -   color: #2B587A;
  121. 119.  - }
  122. 120.  -
  123. 121.  - #ads_page_title b {
  124. 122.  -   color: #AAB7C5;
  125. 123.  -   float: right;
  126. 124.  - }
  127. 125.  -
  128. 126.  - /* --------------- */
  129. 127.  - /* Main navigation */
  130. 128.  - /* --------------- */
  131. 129.  -
  132. 130.  - .ads_page_extra_wide #ads_navigation {
  133. 131.  -   display: none;
  134. 132.  - }
  135. 133.  -
  136. 134.  - #ads_navigation {
  137. 135.  -   width: 150px;
  138. 136.  -   padding: 12px 0 12px 0;
  139. 137.  -   word-wrap: break-word;
  140. 138.  - }
  141. 139.  -
  142. 140.  - #ads_navigation .edit_button_wrap {
  143. 141.  -   padding-bottom: 10px;
  144. 142.  - }
  145. 143.  -
  146. 144.  - #ads_navigation.ads_nav .nav {
  147. 145.  -   max-width: 128px;
  148. 146.  - }
  149. 147.  -
  150. 148.  - #ads_navigation a:hover {
  151. 149.  -   text-decoration: none;
  152. 150.  - }
  153. 151.  -
  154. 152.  - /* ------------------------------ */
  155. 153.  - /* Main navigation - offices menu */
  156. 154.  - /* ------------------------------ */
  157. 155.  -
  158. 156.  - #ads_navigation.ads_nav #ads_navigation_offices_menu.nav {
  159. 157.  -   padding-right: 2px;
  160. 158.  -   width: 137px;
  161. 159.  -   max-width: 137px;
  162. 160.  - }
  163. 161.  -
  164. 162.  - #ads_navigation.ads_nav #ads_navigation_offices_menu.nav .dd_link {
  165. 163.  -   display: block;
  166. 164.  - }
  167. 165.  -
  168. 166.  - #ads_navigation.ads_nav #ads_navigation_offices_menu.nav .dd_link #ads_navigation_offices_menu_text_wrap {
  169. 167.  -   display: block;
  170. 168.  -   overflow: hidden;
  171. 169.  -   white-space: nowrap;
  172. 170.  -   font-size: 0; /* Remove extra margin from inline-block */
  173. 171.  - }
  174. 172.  -
  175. 173.  - #ads_navigation.ads_nav #ads_navigation_offices_menu.nav .dd_link #ads_navigation_offices_menu_text {
  176. 174.  -   display: inline-block;
  177. 175.  -   overflow: hidden;
  178. 176.  -   white-space: nowrap;
  179. 177.  -   font-size: 11px; /* Remove extra margin from inline-block */
  180. 178.  - }
  181. 179.  - .font_medium #ads_navigation.ads_nav #ads_navigation_offices_menu.nav .dd_link #ads_navigation_offices_menu_text {
  182. 180.  -   font-size: 12px;
  183. 181.  - }
  184. 182.  -
  185. 183.  - .dd_menu.ads_navigation_dd_menu_header_wrap {
  186. 184.  -   margin: 4px 0 0 7px;
  187. 185.  - }
  188. 186.  -
  189. 187.  - .dd_menu.ads_navigation_dd_menu_header_wrap .dd_menu_header {
  190. 188.  -   width: 148px;
  191. 189.  - }
  192. 190.  -
  193. 191.  - .dd_menu.ads_navigation_dd_menu_header_wrap .dd_menu_header div {
  194. 192.  -   background-position: right -14px;
  195. 193.  -   *background-position: right -13px;
  196. 194.  - }
  197. 195.  -
  198. 196.  - .dd_menu.ads_navigation_dd_menu_header_wrap .dd_menu_header div #ads_navigation_dd_menu_header_text {
  199. 197.  -   padding: 1px 0 1px 4px;
  200. 198.  -   display: block;
  201. 199.  -   overflow: hidden;
  202. 200.  -   white-space: nowrap;
  203. 201.  - }
  204. 202.  -
  205. 203.  - .dd_menu.ads_navigation_dd_menu_header_wrap .dd_menu_body .ads_office_name_wrap {
  206. 204.  -   display: inline-block;
  207. 205.  -   overflow: hidden;
  208. 206.  -   max-width: 300px;
  209. 207.  -   vertical-align: top;
  210. 208.  - }
  211. 209.  -
  212. 210.  - /* ---------------------- */
  213. 211.  - /* Main navigation - news */
  214. 212.  - /* ---------------------- */
  215. 213.  -
  216. 214.  - .ads_naviagation_news {
  217. 215.  -   padding: 20px 0 5px 11px;
  218. 216.  - }
  219. 217.  -
  220. 218.  - .ads_naviagation_news .news_title {
  221. 219.  -   font-weight: bold;
  222. 220.  -   color: #2B587A;
  223. 221.  -   padding-bottom: 10px;
  224. 222.  - }
  225. 223.  -
  226. 224.  - .ads_naviagation_news ul {
  227. 225.  -   padding: 0;
  228. 226.  -   margin: 0;
  229. 227.  -   list-style-type: none;
  230. 228.  -   color: #758EAC;
  231. 229.  - }
  232. 230.  -
  233. 231.  - .ads_naviagation_news li {
  234. 232.  -   padding-bottom: 10px;
  235. 233.  - }
  236. 234.  -
  237. 235.  - .ads_naviagation_news span {
  238. 236.  -   color: #666666;
  239. 237.  -   font-size: 0.91em;
  240. 238.  - }
  241. 239.  -
  242. 240.  - #ads_navigation .ads_naviagation_news a:hover {
  243. 241.  -   text-decoration: underline;
  244. 242.  - }
  245. 243.  -
  246. 244.  - /* ---------- */
  247. 245.  - /* Navigation */
  248. 246.  - /* ---------- */
  249. 247.  -
  250. 248.  - .ads_nav .nav {
  251. 249.  -   padding: 6px 11px 7px 11px;
  252. 250.  -   display: block;
  253. 251.  -   overflow: hidden;
  254. 252.  - }
  255. 253.  -
  256. 254.  - .ads_nav .nav:hover {
  257. 255.  -   background-color: #E1E7ED;
  258. 256.  -   text-decoration: none;
  259. 257.  - }
  260. 258.  -
  261. 259.  - .ads_nav .nav_selected,
  262. 260.  - .ads_nav .nav_selected:hover {
  263. 261.  -   background-color: #6186AD;
  264. 262.  -   color: white;
  265. 263.  - }
  266. 264.  -
  267. 265.  - .ads_nav .nav_separator {
  268. 266.  -   border-bottom: 1px solid #D3DBE1;
  269. 267.  -   height: 1px;
  270. 268.  -   overflow: hidden;
  271. 269.  -   margin: 7px 0px 8px 0;
  272. 270.  - }
  273. 271.  -
  274. 272.  - .ads_nav .nav_wf {
  275. 273.  -   padding-top: 0!important;
  276. 274.  -   padding-bottom: 0!important;
  277. 275.  - }
  278. 276.  - .ads_nav .nav_label {
  279. 277.  -   padding: 6px 0 7px 0;
  280. 278.  - }
  281. 279.  - .ads_nav .nav_feature {
  282. 280.  -   margin: 3px -6px 0 0;
  283. 281.  -   padding: 3px 5px 4px;
  284. 282.  -   background-color: #E1E7ED;
  285. 283.  -   color: #65819E;
  286. 284.  -   -moz-border-radius: 2px;
  287. 285.  -   -webkit-border-radius: 2px;
  288. 286.  -   -khtml-border-radius: 2px;
  289. 287.  -   border-radius: 2px;
  290. 288.  -   font-weight: bold;
  291. 289.  -   vertical-align: top;
  292. 290.  - }
  293. 291.  -
  294. 292.  - /* ---- */
  295. 293.  - /* Tabs */
  296. 294.  - /* ---- */
  297. 295.  -
  298. 296.  - .ads_tabs_filters {
  299. 297.  -   background-color: #F7F7F7;
  300. 298.  -   border-bottom: 1px solid #DAE1E8;
  301. 299.  -   padding: 10px 10px 5px 10px;
  302. 300.  - }
  303. 301.  - .ads_tabs_filters.separate {
  304. 302.  -   border-top: 1px solid #DAE1E8;
  305. 303.  - }
  306. 304.  - .ads_round_tab_wrap {
  307. 305.  -   padding: 0 5px 5px 0;
  308. 306.  -   text-align: center;
  309. 307.  - }
  310. 308.  - .ads_round_tab_wrap .round_tab.disabled:hover,
  311. 309.  - .ads_round_tab_wrap .round_tab.label:hover {
  312. 310.  -   background-color: transparent;
  313. 311.  -   cursor: default;
  314. 312.  - }
  315. 313.  - .ads_round_tab_wrap .round_tab.label {
  316. 314.  -   color: #555555;
  317. 315.  - }
  318. 316.  - .ads_round_tabs_period_day .round_tab {
  319. 317.  -   width: 100px;
  320. 318.  - }
  321. 319.  - .ads_round_tabs_period_week .round_tab {
  322. 320.  -   width: 180px;
  323. 321.  - }
  324. 322.  - .ads_round_tabs_period_month .round_tab {
  325. 323.  -   width: 100px;
  326. 324.  - }
  327. 325.  -
  328. 326.  - /* ----- */
  329. 327.  - /* Table */
  330. 328.  - /* ----- */
  331. 329.  -
  332. 330.  - .ads_table {
  333. 331.  -   border-collapse: collapse;
  334. 332.  - }
  335. 333.  - .ads_table.wide {
  336. 334.  -   width: 100%;
  337. 335.  - }
  338. 336.  -
  339. 337.  - .ads_table tr.ads_table_row {
  340. 338.  -   border-left: 1px solid #E9EDF0;
  341. 339.  -   border-right: 1px solid #E9EDF0;
  342. 340.  - }
  343. 341.  - .ads_table tr.ads_table_row.header {
  344. 342.  -   border: 1px solid #E9EDF0;
  345. 343.  -   background-color: #E9EDF0;
  346. 344.  - }
  347. 345.  - .ads_table tr.ads_table_row.last {
  348. 346.  -   border-bottom: 1px solid #E9EDF0;
  349. 347.  - }
  350. 348.  - .ads_table tr.ads_table_row.even {
  351. 349.  -   background-color: #F5F7F7;
  352. 350.  - }
  353. 351.  - .ads_table tr.ads_table_row.result {
  354. 352.  -   background-color: #F0F3F5;
  355. 353.  - }
  356. 354.  -
  357. 355.  - .ads_table th.ads_table_cell {
  358. 356.  -   color: #587183;
  359. 357.  -   font-weight: bold;
  360. 358.  - }
  361. 359.  -
  362. 360.  - .ads_table th.ads_table_cell,
  363. 361.  - .ads_table td.ads_table_cell {
  364. 362.  -   padding: 0 8px;
  365. 363.  -   vertical-align: middle;
  366. 364.  -   height: 32px;
  367. 365.  - }
  368. 366.  - .ads_table.small th.ads_table_cell,
  369. 367.  - .ads_table.small td.ads_table_cell {
  370. 368.  -   height: 16px;
  371. 369.  - }
  372. 370.  -
  373. 371.  - .ads_table th.ads_table_cell.first,
  374. 372.  - .ads_table td.ads_table_cell.first {
  375. 373.  -   padding-left: 10px;
  376. 374.  - }
  377. 375.  - .ads_table th.ads_table_cell.last,
  378. 376.  - .ads_table td.ads_table_cell.last {
  379. 377.  -   padding-right: 10px;
  380. 378.  - }
  381. 379.  - .ads_table.wide th.ads_table_cell.left_wide,
  382. 380.  - .ads_table.wide td.ads_table_cell.left_wide {
  383. 381.  -   padding-left: 2px;
  384. 382.  - }
  385. 383.  - .ads_table.wide th.ads_table_cell.right_wide,
  386. 384.  - .ads_table.wide td.ads_table_cell.right_wide {
  387. 385.  -   padding-right: 2px;
  388. 386.  - }
  389. 387.  - .ads_table.wide th.ads_table_cell.nowrap,
  390. 388.  - .ads_table.wide td.ads_table_cell.nowrap {
  391. 389.  -   white-space: nowrap;
  392. 390.  - }
  393. 391.  -
  394. 392.  - .ads_table th.ads_table_cell.sort:hover {
  395. 393.  -   background-color: #F2F4F5;
  396. 394.  -   cursor: pointer;
  397. 395.  - }
  398. 396.  -
  399. 397.  - .ads_table td.ads_table_cell.shower {
  400. 398.  -   color: #587183;
  401. 399.  -   font-weight: bold;
  402. 400.  -   cursor: pointer;
  403. 401.  -   text-align: center;
  404. 402.  -   border-top: 1px solid #E9EDF0;
  405. 403.  -
  406. 404.  -   -webkit-transition: all 200ms ease-out;
  407. 405.  -   -moz-transition: all 200ms ease-out;
  408. 406.  -   -o-transition: all 200ms ease-out;
  409. 407.  -   transition: all 200ms ease-out;
  410. 408.  - }
  411. 409.  - .ads_table td.ads_table_cell.shower:hover {
  412. 410.  -   background-color: #E1E7EB;
  413. 411.  - }
  414. 412.  -
  415. 413.  - .ads_table td.ads_table_cell_empty {
  416. 414.  -   line-height: 200%;
  417. 415.  -   text-align: center;
  418. 416.  -   background-color: #F7F7F7;
  419. 417.  -   color: #777777;
  420. 418.  -   padding: 20px 50px;
  421. 419.  - }
  422. 420.  - .ads_table.small td.ads_table_cell_empty {
  423. 421.  -   padding: 5px 10px;
  424. 422.  - }
  425. 423.  -
  426. 424.  - /* ------------ */
  427. 425.  - /* Intro - main */
  428. 426.  - /* ------------ */
  429. 427.  -
  430. 428.  - .ads_intro_page,
  431. 429.  - .ads_intro_section_title {
  432. 430.  -   line-height: 160%;
  433. 431.  - }
  434. 432.  -
  435. 433.  - .ads_intro_title,
  436. 434.  - .ads_intro_section_title {
  437. 435.  -   color: #5c7b9b;
  438. 436.  - }
  439. 437.  -
  440. 438.  - .ads_intro_subsection_title,
  441. 439.  - .ads_intro_news_title {
  442. 440.  -   color: #4d7199;
  443. 441.  - }
  444. 442.  -
  445. 443.  - .ads_intro_title {
  446. 444.  -   font-size: 1.3em;
  447. 445.  -   font-weight: bold;
  448. 446.  -   padding-bottom: 16px;
  449. 447.  - }
  450. 448.  -
  451. 449.  - .ads_intro_section_title {
  452. 450.  -   font-size: 1.2em;
  453. 451.  -   font-weight: bold;
  454. 452.  -   padding: 8px 10px 0 10px;
  455. 453.  - }
  456. 454.  -
  457. 455.  - .ads_intro_subsection_title {
  458. 456.  -   font-size: 1.2em;
  459. 457.  -   font-weight: bold;
  460. 458.  -   padding-bottom: 8px;
  461. 459.  - }
  462. 460.  -
  463. 461.  - .ads_intro_news_title {
  464. 462.  -   font-size: 1.2em;
  465. 463.  -   font-weight: bold;
  466. 464.  -   border-bottom: 1px solid #dae1e8;
  467. 465.  -   display: block;
  468. 466.  - }
  469. 467.  - .ads_intro_news_title:hover {
  470. 468.  -   text-decoration: none;
  471. 469.  - }
  472. 470.  -
  473. 471.  - .ads_intro_subsection_text {
  474. 472.  -   color: #808080;
  475. 473.  - }
  476. 474.  -
  477. 475.  - .ads_intro_header_wrap2 {
  478. 476.  -   height: 380px;
  479. 477.  - }
  480. 478.  - .ads_intro_header_wrap1 {
  481. 479.  -   height: 280px;
  482. 480.  -   background-color: #edf1f5;
  483. 481.  -   padding: 22px 40px 0 40px;
  484. 482.  -   position: relative;
  485. 483.  - }
  486. 484.  -
  487. 485.  - .ads_intro_text {
  488. 486.  -   width: 440px;
  489. 487.  - }
  490. 488.  -
  491. 489.  - .ads_intro_main_image {
  492. 490.  -   background-image: url(/images/ads_intro_main.png);
  493. 491.  -   background-size: 130px 130px;
  494. 492.  -   width: 130px;
  495. 493.  -   height: 130px;
  496. 494.  -   position: absolute;
  497. 495.  -   right: 70px;
  498. 496.  -   top: 30px;
  499. 497.  - }
  500. 498.  - .is_2x .ads_intro_main_image {
  501. 499.  -   background-image: url(/images/ads_intro_main_2x.png);
  502. 500.  - }
  503. 501.  -
  504. 502.  - .ads_intro_sections {
  505. 503.  -   margin-right: -100px;
  506. 504.  -   top: 190px;
  507. 505.  -   position: absolute;
  508. 506.  - }
  509. 507.  -
  510. 508.  - .ads_intro_section_button {
  511. 509.  -   width: 188px;
  512. 510.  -   height: 162px;
  513. 511.  -   background-color: #f4f6f8;
  514. 512.  -   border: 1px solid #e1e6eb;
  515. 513.  -   border-bottom: 2px solid #dce1e6;
  516. 514.  -   display: inline-block;
  517. 515.  -   margin-right: 43px;
  518. 516.  -   -moz-border-radius: 3px;
  519. 517.  -   -webkit-border-radius: 3px;
  520. 518.  -   -khtml-border-radius: 3px;
  521. 519.  -   border-radius: 3px;
  522. 520.  -   text-align: center;
  523. 521.  -   position: relative;
  524. 522.  -   top: 0;
  525. 523.  -
  526. 524.  -   -webkit-transition: all 200ms ease-out;
  527. 525.  -   -moz-transition: all 200ms ease-out;
  528. 526.  -   -o-transition: all 200ms ease-out;
  529. 527.  -   transition: all 200ms ease-out;
  530. 528.  - }
  531. 529.  - .ads_intro_section_button:hover {
  532. 530.  -   text-decoration: none;
  533. 531.  -   top: -8px;
  534. 532.  - }
  535. 533.  -
  536. 534.  - .ads_intro_section_image {
  537. 535.  -   width: 95px;
  538. 536.  -   height: 82px;
  539. 537.  -   background-size: 95px auto;
  540. 538.  -   background-image: url(/images/ads_intro_icons.png);
  541. 539.  -   display: inline-block;
  542. 540.  -   margin-top: 16px;
  543. 541.  - }
  544. 542.  - .is_2x .ads_intro_section_image {
  545. 543.  -   background-image: url(/images/ads_intro_icons_2x.png);
  546. 544.  - }
  547. 545.  - .ads_intro_section_button2 .ads_intro_section_image {
  548. 546.  -   background-position: 0 -82px;
  549. 547.  - }
  550. 548.  - .ads_intro_section_button3 .ads_intro_section_image {
  551. 549.  -   background-position: 0 -164px;
  552. 550.  - }
  553. 551.  -
  554. 552.  - .ads_intro_section_label {
  555. 553.  -   width: 60px;
  556. 554.  -   height: 60px;
  557. 555.  -   background-size: 60px auto;
  558. 556.  -   position: absolute;
  559. 557.  -   left: -2px;
  560. 558.  -   top: -2px;
  561. 559.  - }
  562. 560.  - .ads_intro_section_label.label_ru {
  563. 561.  -   background-image: url(/images/ads_intro_label_new_ru.png);
  564. 562.  - }
  565. 563.  - .is_2x .ads_intro_section_label.label_ru {
  566. 564.  -   background-image: url(/images/ads_intro_label_new_ru_2x.png);
  567. 565.  - }
  568. 566.  - .ads_intro_section_label.label_en {
  569. 567.  -   background-image: url(/images/ads_intro_label_new_en.png);
  570. 568.  - }
  571. 569.  - .is_2x .ads_intro_section_label.label_en {
  572. 570.  -   background-image: url(/images/ads_intro_label_new_en_2x.png);
  573. 571.  - }
  574. 572.  - .ads_intro_section_label.label_ua {
  575. 573.  -   background-image: url(/images/ads_intro_label_new_ua.png);
  576. 574.  - }
  577. 575.  - .is_2x .ads_intro_section_label.label_ua {
  578. 576.  -   background-image: url(/images/ads_intro_label_new_ua_2x.png);
  579. 577.  - }
  580. 578.  -
  581. 579.  - .ads_intro_subsections {
  582. 580.  -   padding: 3px 25px 20px 20px;
  583. 581.  -   display: inline-block;
  584. 582.  -   vertical-align: top;
  585. 583.  - }
  586. 584.  - .ads_intro_subsection {
  587. 585.  -   padding: 15px 20px;
  588. 586.  -   display: block;
  589. 587.  -   width: 423px;
  590. 588.  - }
  591. 589.  - .ads_intro_subsection:hover {
  592. 590.  -   text-decoration: none;
  593. 591.  -   background: #f7f7f7;
  594. 592.  - }
  595. 593.  -
  596. 594.  - .ads_intro_news {
  597. 595.  -   width: 200px;
  598. 596.  -   padding: 18px 0 20px 0;
  599. 597.  -   display: inline-block;
  600. 598.  - }
  601. 599.  - .ads_intro_news_widget_wrap {
  602. 600.  -   margin-left: -10px;
  603. 601.  -   padding-top: 8px;
  604. 602.  -   height: 240px;
  605. 603.  -   overflow: hidden;
  606. 604.  - }
  607. 605.  - .ads_intro_news_all {
  608. 606.  -   display: block;
  609. 607.  -   text-align: center;
  610. 608.  -   padding: 4px 0;
  611. 609.  - }
  612. 610.  - .ads_intro_news_all:hover {
  613. 611.  -   text-decoration: none;
  614. 612.  -   background-color: #f7f7f7;
  615. 613.  - }
  616. 614.  -
  617. 615.  - /* ----------- */
  618. 616.  - /* Intro - box */
  619. 617.  - /* ----------- */
  620. 618.  -
  621. 619.  - .wk_ads_intro .wk_wiki_content {
  622. 620.  -   font-size: 1em;
  623. 621.  -   line-height: 100%;
  624. 622.  - }
  625. 623.  - .wk_ads_intro #wk_content {
  626. 624.  -   width: 564px;
  627. 625.  - }
  628. 626.  - .wk_ads_intro #wk_summary {
  629. 627.  -   width: 400px;
  630. 628.  - }
  631. 629.  -
  632. 630.  - .ads_intro_box.ads_text,
  633. 631.  - .ads_intro_box .ads_text {
  634. 632.  -   line-height: 160%;
  635. 633.  - }
  636. 634.  -
  637. 635.  - .ads_intro_box.ads_text_big {
  638. 636.  -   font-size: 1.09em;
  639. 637.  - }
  640. 638.  -
  641. 639.  - .ads_intro_box h4 {
  642. 640.  -   margin-bottom: 10px;
  643. 641.  - }
  644. 642.  - .ads_intro_box .listing {
  645. 643.  -   margin-bottom: 30px;
  646. 644.  - }
  647. 645.  -
  648. 646.  - .ads_intro_box_center {
  649. 647.  -   text-align: center;
  650. 648.  - }
  651. 649.  -
  652. 650.  - .ads_intro_box_targeting_image,
  653. 651.  - .ads_intro_box_posts_image,
  654. 652.  - .ads_intro_box_offers_image {
  655. 653.  -   background-size: 160px 160px;
  656. 654.  -   width: 160px;
  657. 655.  -   height: 160px;
  658. 656.  -   display: inline-block;
  659. 657.  -   margin: 25px 0;
  660. 658.  - }
  661. 659.  - .ads_intro_box_targeting_image {
  662. 660.  -   margin-top: 0;
  663. 661.  - }
  664. 662.  - .ads_intro_box_targeting_image {
  665. 663.  -   background-image: url(/images/ads_intro_targeting.png);
  666. 664.  - }
  667. 665.  - .is_2x .ads_intro_box_targeting_image {
  668. 666.  -   background-image: url(/images/ads_intro_targeting_2x.png);
  669. 667.  - }
  670. 668.  - .ads_intro_box_posts_image {
  671. 669.  -   background-image: url(/images/join/ads_union.png);
  672. 670.  - }
  673. 671.  - .is_2x .ads_intro_box_posts_image {
  674. 672.  -   background-image: url(/images/join/ads_union_2x.png);
  675. 673.  - }
  676. 674.  - .ads_intro_box_offers_image {
  677. 675.  -   background-image: url(/images/ads_intro_offers.png);
  678. 676.  - }
  679. 677.  - .is_2x .ads_intro_box_offers_image {
  680. 678.  -   background-image: url(/images/ads_intro_offers_2x.png);
  681. 679.  - }
  682. 680.  -
  683. 681.  - .ads_intro_box_targeting_office {
  684. 682.  -   margin-top: 10px;
  685. 683.  -   display: inline-block;
  686. 684.  - }
  687. 685.  -
  688. 686.  - /* ------ */
  689. 687.  - /* Office */
  690. 688.  - /* ------ */
  691. 689.  -
  692. 690.  - .ads_create_button_office {
  693. 691.  -   float: right;
  694. 692.  -   position: relative;
  695. 693.  -   width: 0;
  696. 694.  - }
  697. 695.  - .ads_create_button_office .edit_button_wrap {
  698. 696.  -   position: absolute;
  699. 697.  -   right: 0;
  700. 698.  - }
  701. 699.  -
  702. 700.  - /* Other */
  703. 701.  -
  704. 702.  - /* --- */
  705. 703.  - /* OLD */
  706. 704.  - /* --- */
  707. 705.  -
  708. 706.  - /* From rustyle.css */
  709. 707.  -
  710. 708.  - /* Uses in paginated_table.js */
  711. 709.  - .ads_lite_cb {
  712. 710.  -   background: transparent url(/images/icons/check_lt.gif) 0px 0px no-repeat;
  713. 711.  -   line-height: 0.81em;
  714. 712.  -   vertical-align: baseline;
  715. 713.  -   padding: 0px 0px 1px 20px;
  716. 714.  -   cursor: pointer;
  717. 715.  - }
  718. 716.  - .ads_lite_cb:hover {
  719. 717.  -   background-position: 0px -32px;
  720. 718.  -   text-decoration: none;
  721. 719.  - }
  722. 720.  - .ads_lite_cb.on {
  723. 721.  -   background-position: 0px -16px;
  724. 722.  - }
  725. 723.  - .ads_lite_cb.on:hover {
  726. 724.  -   background-position: 0px -48px;
  727. 725.  - }
  728. 726.  -
  729. 727.  - .ads_mass_act_container {
  730. 728.  -   text-align: right;
  731. 729.  - }
  732. 730.  - .ads_mass_act_container div {
  733. 731.  -   margin-right: 8px;
  734. 732.  -   margin-bottom: 5px;
  735. 733.  - }
  736. 734.  - .ads_mass_act_container button {
  737. 735.  -   height: 21px;
  738. 736.  -   line-height: 0.9em;
  739. 737.  -   padding: 4px 10px 4px;
  740. 738.  - }
  741. 739.  - .ads_search_cell {
  742. 740.  -   width: 140px;
  743. 741.  - }
  744. 742.  - .ads_search_cell div.pt_search_container {
  745. 743.  -   margin: 0px -3px 5px -3px;
  746. 744.  - }
  747. 745.  -
  748. 746.  - div.ads_selecting_subclasses {
  749. 747.  -   margin-bottom: 4px;
  750. 748.  - }
  751. 749.  -
  752. 750.  - .dd_menu_header.ads_dd_wide.ads_dd_header_popup div {
  753. 751.  -   background: url(/images/flydead.gif) no-repeat right 6px #FFFFFF;
  754. 752.  -   padding-right: 17px;
  755. 753.  -   border: 1px solid #FFFFFF;
  756. 754.  -   color: #2B587A;
  757. 755.  -   font-weight: normal;
  758. 756.  -   text-decoration: none;
  759. 757.  - }
  760. 758.  -
  761. 759.  - .dd_menu_header.ads_dd_wide div {
  762. 760.  -   background: #5e82a8 url(/images/flydead.gif) no-repeat right -12px;
  763. 761.  -   width: 106px;
  764. 762.  - }
  765. 763.  -
  766. 764.  - .dd_menu_body.ads_dd_wide .dd_menu_rows a {
  767. 765.  -   height: 20px;
  768. 766.  - }
  769. 767.  - .dd_menu_body.ads_dd_wide .dd_menu_rows a .ads_status_image_span {
  770. 768.  -   margin: 4px 5px -2px -1px;
  771. 769.  - }
  772. 770.  -
  773. 771.  - .dd_menu_header.ads_dd_wide div .ads_status_image_span {
  774. 772.  -   margin: 4px 5px -1px -1px;
  775. 773.  - }
  776. 774.  - .dd_menu_header.ads_dd_wide div {
  777. 775.  -   line-height: 1.45em;
  778. 776.  - }
  779. 777.  -
  780. 778.  - td.paginated_table_cell.column_status_view {
  781. 779.  -   padding-left: 10px;
  782. 780.  - }
  783. 781.  -
  784. 782.  - .ads_status_selector_box {
  785. 783.  -   display: block;
  786. 784.  -   margin: 0px auto;
  787. 785.  -   width: 20px;
  788. 786.  -   height: 20px;
  789. 787.  - }
  790. 788.  -
  791. 789.  - .ads_status_selector_box.pnt {
  792. 790.  -   cursor: pointer;
  793. 791.  - }
  794. 792.  -
  795. 793.  - .ads_status_selector_box.pnt:hover {
  796. 794.  -   background-color: #E1E7ED;
  797. 795.  -   border-radius: 3px;
  798. 796.  -   -moz-border-radius: 3px;
  799. 797.  - }
  800. 798.  -
  801. 799.  - #ads_unions_content .table_label {
  802. 800.  -   min-width: 150px;
  803. 801.  -   max-width: 180px;
  804. 802.  -   color: rgb(102, 102, 102);
  805. 803.  -   padding: 0 10px 7px 0;
  806. 804.  -   vertical-align: top;
  807. 805.  -   word-wrap: break-word;
  808. 806.  - }
  809. 807.  - #ads_unions_content .table_value {
  810. 808.  -   padding: 0 0 7px 0;
  811. 809.  -   vertical-align: top;
  812. 810.  -   word-wrap: break-word;
  813. 811.  - }
  814. 812.  -
  815. 813.  - #ads_unions_content.ad_help {
  816. 814.  -   padding: 0;
  817. 815.  - }
  818. 816.  -
  819. 817.  - #ads_unions_content {
  820. 818.  -   vertical-align: top;
  821. 819.  - }
  822. 820.  -
  823. 821.  - #ads_union_children,
  824. 822.  - #ads_unions_budget,
  825. 823.  - #ads_unions_budget_posts {
  826. 824.  -   padding-top: 20px;
  827. 825.  - }
  828. 826.  -
  829. 827.  - #ads_union_children_graph {
  830. 828.  -   padding: 30px 0 15px 0;
  831. 829.  - }
  832. 830.  -
  833. 831.  - #ads_union_children .row_div.control_label {
  834. 832.  -   padding-left: 0;
  835. 833.  - }
  836. 834.  -
  837. 835.  - .ads_unions_box td.label {
  838. 836.  -   color: #777;
  839. 837.  -   padding: 5px 10px 5px 0px;
  840. 838.  -   text-align: right;
  841. 839.  - }
  842. 840.  - .ads_unions_box td.labeled {
  843. 841.  -   padding: 2px 0;
  844. 842.  - }
  845. 843.  - .ads_unions_box td.labeled_info {
  846. 844.  -   padding: 2px 0 2px 5px;
  847. 845.  - }
  848. 846.  -
  849. 847.  - .ads_unions_box input {
  850. 848.  -   width: 150px;
  851. 849.  - }
  852. 850.  -
  853. 851.  - .ads_unions_list table {
  854. 852.  -   border-collapse: collapse;
  855. 853.  -   border-left: 1px solid;
  856. 854.  -   border-right: 1px solid;
  857. 855.  -   width: 100%;
  858. 856.  - }
  859. 857.  -
  860. 858.  - .ads_unions_list th,
  861. 859.  - .ads_unions_list td {
  862. 860.  -   height: 32px;
  863. 861.  -   vertical-align: middle;
  864. 862.  - }
  865. 863.  -
  866. 864.  - .ads_unions_list .checkbox_container td {
  867. 865.  -   height: 20px;
  868. 866.  - }
  869. 867.  -
  870. 868.  - .ads_unions_list th {
  871. 869.  -   text-align: right;
  872. 870.  -   background-color: rgb(227, 233, 238);
  873. 871.  -   border: 1px solid;
  874. 872.  -   padding: 0;
  875. 873.  - }
  876. 874.  - .ads_table_header th th,
  877. 875.  - .ads_table_header th th * {
  878. 876.  -   background-color: transparent !important;
  879. 877.  - }
  880. 878.  -
  881. 879.  - .ads_unions_list th,
  882. 880.  - .ads_unions_list th * {
  883. 881.  -   color: rgb(81, 103, 122);
  884. 882.  - }
  885. 883.  -
  886. 884.  - .ads_unions_list td {
  887. 885.  -   text-align: right;
  888. 886.  - }
  889. 887.  -
  890. 888.  - .ads_unions_list .column_date_view,
  891. 889.  - .ads_unions_list .column_date_view *,
  892. 890.  - .ads_unions_list .column_action_view,
  893. 891.  - .ads_unions_list .column_action_view *,
  894. 892.  - .ads_unions_list .column_access_view,
  895. 893.  - .ads_unions_list .column_access_view *,
  896. 894.  - .ads_unions_list .column_name_view,
  897. 895.  - .ads_unions_list .column_name_view *,
  898. 896.  - .ads_unions_list .column_name,
  899. 897.  - .ads_unions_list .column_name *,
  900. 898.  - .ads_unions_list .column_status,
  901. 899.  - .ads_unions_list .column_status * {
  902. 900.  -   text-align: left;
  903. 901.  - }
  904. 902.  -
  905. 903.  - .ads_unions_list td.column_name_view {
  906. 904.  -   max-width: 160px;
  907. 905.  - }
  908. 906.  -
  909. 907.  - .ads_unions_list .table_footer td {
  910. 908.  -   background-color: rgb(246, 247, 249);
  911. 909.  -   border-top: 1px solid rgb(211, 219, 225);
  912. 910.  -   border-bottom: 1px solid rgb(211, 219, 225);
  913. 911.  - }
  914. 912.  -
  915. 913.  - .ads_unions_list table,
  916. 914.  - .ads_unions_list th,
  917. 915.  - .ads_unions_list td {
  918. 916.  -   border-color: rgb(211, 219, 225);
  919. 917.  - }
  920. 918.  -
  921. 919.  - .ads_unions_list th * {
  922. 920.  -   border: 0;
  923. 921.  -   padding: 0;
  924. 922.  -   height: auto;
  925. 923.  - }
  926. 924.  -
  927. 925.  - .ads_unions_list th table {
  928. 926.  -   height: 100%;
  929. 927.  -   border: 0;
  930. 928.  - }
  931. 929.  -
  932. 930.  - .ads_unions_list tr.ads_table_header th th {
  933. 931.  -   border-left: 1px solid rgb(239, 242, 245);
  934. 932.  -   white-space: nowrap;
  935. 933.  - }
  936. 934.  -
  937. 935.  - .ads_unions_list tr.ads_table_header th.first_table_header,
  938. 936.  - .ads_unions_list tr.ads_table_header th.first_table_header * {
  939. 937.  -   border-left: 0 none;
  940. 938.  - }
  941. 939.  -
  942. 940.  - .ads_unions_list th th,
  943. 941.  - .ads_unions_list td {
  944. 942.  -   padding: 0 8px;
  945. 943.  - }
  946. 944.  -
  947. 945.  - .ads_unions_list th.first_table_header th,
  948. 946.  - .ads_unions_list td.first_table_column {
  949. 947.  -   padding-left: 10px;
  950. 948.  - }
  951. 949.  -
  952. 950.  - .ads_unions_list th.last_table_header th,
  953. 951.  - .ads_unions_list td.last_table_column {
  954. 952.  -   padding-right: 10px;
  955. 953.  - }
  956. 954.  -
  957. 955.  - .ads_unions_list td.even_row {
  958. 956.  -   background-color: #F0F2F4;
  959. 957.  - }
  960. 958.  -
  961. 959.  - .ads_unions_table {
  962. 960.  -   margin-top: 7px;
  963. 961.  - }
  964. 962.  -
  965. 963.  - .paginated_table .ads_unions_table {
  966. 964.  -   margin-top: 0px;
  967. 965.  - }
  968. 966.  -
  969. 967.  - .ads_unions_list td.column_day_limit_view a,
  970. 968.  - .ads_unions_list td.column_all_limit_view a,
  971. 969.  - .ads_unions_list td.column_cost_per_click_view a {
  972. 970.  -   border-bottom: 1px dashed #2B587A;
  973. 971.  -   text-decoration: none;
  974. 972.  - }
  975. 973.  -
  976. 974.  - tr.ads_union_empty_row td.ads_union_empty_cell {
  977. 975.  -   height: auto;
  978. 976.  - }
  979. 977.  -
  980. 978.  - tr.ads_union_empty_row td.ads_union_empty_cell {
  981. 979.  -   text-align: center !important;
  982. 980.  -   color: #666666;
  983. 981.  -   line-height: 150%;
  984. 982.  -   background-color: #F7F7F7;
  985. 983.  -   padding: 15px 0;
  986. 984.  - }
  987. 985.  -
  988. 986.  - .ads_unions_list_p .paginated_table_cell {
  989. 987.  -   text-align: right;
  990. 988.  - }
  991. 989.  -
  992. 990.  - .ads_unions_list_p .paginated_table .paginated_table_cell.column_date_view,
  993. 991.  - .ads_unions_list_p .paginated_table .paginated_table_cell.column_date_view *,
  994. 992.  - .ads_unions_list_p .paginated_table .paginated_table_cell.column_action_view,
  995. 993.  - .ads_unions_list_p .paginated_table .paginated_table_cell.column_action_view *,
  996. 994.  - .ads_unions_list_p .paginated_table .paginated_table_cell.column_access_view,
  997. 995.  - .ads_unions_list_p .paginated_table .paginated_table_cell.column_access_view *,
  998. 996.  - .ads_unions_list_p .paginated_table .paginated_table_cell.column_name_view,
  999. 997.  - .ads_unions_list_p .paginated_table .paginated_table_cell.column_name_view *,
  1000. 998.  - .ads_unions_list_p .paginated_table .paginated_table_cell.column_name,
  1001. 999.  - .ads_unions_list_p .paginated_table .paginated_table_cell.column_name *,
  1002. 1000.  - .ads_unions_list_p .paginated_table .paginated_table_cell.column_status,
  1003. 1001.  - .ads_unions_list_p .paginated_table .paginated_table_cell.column_status * {
  1004. 1002.  -   text-align: left;
  1005. 1003.  - }
  1006. 1004.  -
  1007. 1005.  - .ads_unions_list_p .paginated_table .paginated_table_cell.column_name_view,
  1008. 1006.  - .ads_unions_list_p .paginated_table .paginated_table_cell.column_name_view *,
  1009. 1007.  - .ads_unions_list_p .paginated_table .paginated_table_cell.column_name,
  1010. 1008.  - .ads_unions_list_p .paginated_table .paginated_table_cell.column_name *,
  1011. 1009.  - .paginated_table .paginated_table_cell.column_client_name,
  1012. 1010.  - .paginated_table .paginated_table_cell.column_client_name *,
  1013. 1011.  - .paginated_table .paginated_table_cell.column_campaign_name,
  1014. 1012.  - .paginated_table .paginated_table_cell.column_campaign_name * {
  1015. 1013.  -   white-space: normal !important;
  1016. 1014.  - }
  1017. 1015.  -
  1018. 1016.  - .ads_unions_list_p td.paginated_table_cell.column_name_view,
  1019. 1017.  - .ads_unions_list_p td.paginated_table_cell.column_name {
  1020. 1018.  -   max-width: 160px;
  1021. 1019.  -   overflow: visible;
  1022. 1020.  - }
  1023. 1021.  - .ads_unions_list_p td.paginated_table_cell.column_date_view {
  1024. 1022.  -   min-width: 20%;
  1025. 1023.  - }
  1026. 1024.  - .ads_unions_list_p .paginated_table td.paginated_table_cell.column_day_limit_view a,
  1027. 1025.  - .ads_unions_list_p .paginated_table td.paginated_table_cell.column_all_limit_view a,
  1028. 1026.  - .ads_unions_list_p .paginated_table td.paginated_table_cell.column_cost_per_click_view a {
  1029. 1027.  -   border-bottom: 1px dashed #2B587A;
  1030. 1028.  -   text-decoration: none;
  1031. 1029.  - }
  1032. 1030.  -
  1033. 1031.  - .ads_unions_list_p .paginated_table td.column_video_views_count_view {
  1034. 1032.  -   width: 1px;
  1035. 1033.  - }
  1036. 1034.  -
  1037. 1035.  - tr.ads_union_empty_row td.ads_union_empty_cell {
  1038. 1036.  -   height: auto;
  1039. 1037.  - }
  1040. 1038.  -
  1041. 1039.  - tr.ads_union_empty_row td.ads_union_empty_cell {
  1042. 1040.  -   text-align: center !important;
  1043. 1041.  -   color: #666666;
  1044. 1042.  -   line-height: 150%;
  1045. 1043.  -   background-color: #F7F7F7;
  1046. 1044.  -   padding: 15px 0;
  1047. 1045.  - }
  1048. 1046.  -
  1049. 1047.  - /* Some navigation - begin */
  1050. 1048.  -
  1051. 1049.  - #ads_graph_navigation a.nav,
  1052. 1050.  - #ads_demography_navigation a.nav {
  1053. 1051.  -   padding: 6px 6px 7px 11px;
  1054. 1052.  -   display: block;
  1055. 1053.  -   overflow: hidden;
  1056. 1054.  - }
  1057. 1055.  - #ads_graph_navigation a.nav:hover,
  1058. 1056.  - #ads_demography_navigation a.nav:hover {
  1059. 1057.  -   background-color: #DAE1E8;
  1060. 1058.  -   text-decoration: none;
  1061. 1059.  - }
  1062. 1060.  - #ads_graph_navigation a.nav_selected,
  1063. 1061.  - #ads_graph_navigation a.nav_selected:hover,
  1064. 1062.  - #ads_demography_navigation a.nav_selected,
  1065. 1063.  - #ads_demography_navigation a.nav_selected:hover {
  1066. 1064.  -   background-color: #6186AD;
  1067. 1065.  -   color: white;
  1068. 1066.  - }
  1069. 1067.  -
  1070. 1068.  - /* Some navigation - end */
  1071. 1069.  -
  1072. 1070.  - a.ads_status_link,
  1073. 1071.  - a.ads_inline_dropdown {
  1074. 1072.  -   background: none !important;
  1075. 1073.  -   border-bottom: 1px dashed #2B587A;
  1076. 1074.  -   padding-right: 0 !important;
  1077. 1075.  - }
  1078. 1076.  -
  1079. 1077.  - .ads_main_notice {
  1080. 1078.  -   background-color: #F6F7F9;
  1081. 1079.  -   border: 1px solid #D8DFEA;
  1082. 1080.  -   padding: 10px;
  1083. 1081.  -   margin-bottom: 15px;
  1084. 1082.  -   line-height: 160%;
  1085. 1083.  - }
  1086. 1084.  -
  1087. 1085.  - .ads_notice_important {
  1088. 1086.  -   background-color: #FFEFE8;
  1089. 1087.  -   border-color: #E89B88;
  1090. 1088.  - }
  1091. 1089.  -
  1092. 1090.  - .ads_warning {
  1093. 1091.  -   background-color: #F9F6E7;
  1094. 1092.  -   border: 1px solid #D4BC4C;
  1095. 1093.  -   padding: 8px 11px;
  1096. 1094.  -   line-height: 160%;
  1097. 1095.  - }
  1098. 1096.  -
  1099. 1097.  - .ads_warning_light {
  1100. 1098.  -   background-color: #FFFFFF;
  1101. 1099.  -   border: 1px solid #B9C4DA;
  1102. 1100.  -   padding: 8px 11px;
  1103. 1101.  - }
  1104. 1102.  -
  1105. 1103.  - .ads_small_info {
  1106. 1104.  -   background: none repeat scroll 0 0 #F7F7F7;
  1107. 1105.  -   border: 1px solid #DAE1E8;
  1108. 1106.  -   font-size: 0.91em;
  1109. 1107.  -   margin-top: 10px;
  1110. 1108.  -   padding: 5px 10px;
  1111. 1109.  -   vertical-align: top;
  1112. 1110.  - }
  1113. 1111.  -
  1114. 1112.  - #ads_change_budget_box .ads_warning {
  1115. 1113.  -   margin-top: 10px;
  1116. 1114.  - }
  1117. 1115.  -
  1118. 1116.  - #ads_change_budget_box td {
  1119. 1117.  -   padding: 0px;
  1120. 1118.  - }
  1121. 1119.  -
  1122. 1120.  - .ads_union_status_image {
  1123. 1121.  -   background: url("/images/icons/ad_status.gif?3") no-repeat scroll left top transparent;
  1124. 1122.  -   width: 5px;
  1125. 1123.  -   height: 5px;
  1126. 1124.  -   margin: 0 5px 1px 0;
  1127. 1125.  -   display: block;
  1128. 1126.  -
  1129. 1127.  -   display:   -moz-inline-stack;
  1130. 1128.  -   display:   inline-block;
  1131. 1129.  -   _overflow: hidden;
  1132. 1130.  -   *zoom:     1;
  1133. 1131.  -   *display:  inline;
  1134. 1132.  - }
  1135. 1133.  -
  1136. 1134.  - .ads_union_status_image_on {
  1137. 1135.  -   background-position: left 0;
  1138. 1136.  - }
  1139. 1137.  - .ads_union_status_image_off {
  1140. 1138.  -   background-position: left -5px;
  1141. 1139.  - }
  1142. 1140.  - .ads_union_status_image_part_on {
  1143. 1141.  -   background-position: left -10px;
  1144. 1142.  - }
  1145. 1143.  - .ads_union_status_image_part_off {
  1146. 1144.  -   background-position: left -15px;
  1147. 1145.  - }
  1148. 1146.  - .ads_union_status_image_disapproved {
  1149. 1147.  -   background-position: left -20px;
  1150. 1148.  - }
  1151. 1149.  - .ads_union_status_image_deleted {
  1152. 1150.  -   background-position: left -25px;
  1153. 1151.  - }
  1154. 1152.  -
  1155. 1153.  - .ads_status_image_span {
  1156. 1154.  -   background: url("/images/icons/ad_status_new.gif") no-repeat scroll left top transparent;
  1157. 1155.  -   width: 11px;
  1158. 1156.  -   height: 11px;
  1159. 1157.  -   margin: 5px 0px 3px 2px;
  1160. 1158.  -   display: block;
  1161. 1159.  -
  1162. 1160.  -   display:   -moz-inline-stack;
  1163. 1161.  -   display:   inline-block;
  1164. 1162.  -   _overflow: hidden;
  1165. 1163.  -   *zoom:     1;
  1166. 1164.  -   *display:  inline;
  1167. 1165.  - }
  1168. 1166.  -
  1169. 1167.  - .dd_menu_header.ads_dd_header_popup .ads_status_image_span.status_on,
  1170. 1168.  - .ads_status_image_span.status_on {
  1171. 1169.  -   background-position: left -0px;
  1172. 1170.  - }
  1173. 1171.  - .dd_menu_header.ads_dd_header_popup .ads_status_image_span.status_off,
  1174. 1172.  - .ads_status_image_span.status_off {
  1175. 1173.  -   background-position: left -170px;
  1176. 1174.  - }
  1177. 1175.  - .dd_menu_header.ads_dd_header_popup .ads_status_image_span.status_pending,
  1178. 1176.  - .ads_status_image_span.status_pending {
  1179. 1177.  -   background-position: left -157px;
  1180. 1178.  - }
  1181. 1179.  - .dd_menu_header.ads_dd_header_popup .ads_status_image_span.status_off_red,
  1182. 1180.  - .ads_status_image_span.status_off_red {
  1183. 1181.  -   background-position: left -128px;
  1184. 1182.  - }
  1185. 1183.  - .dd_menu_header.ads_dd_header_popup .ads_status_image_span.status_deleted,
  1186. 1184.  - .ads_status_image_span.status_deleted {
  1187. 1185.  -   background-position: left -183px;
  1188. 1186.  - }
  1189. 1187.  - .dd_menu_header.ads_dd_header_popup .ads_status_image_span.status_cross,
  1190. 1188.  - .ads_status_image_span.status_cross {
  1191. 1189.  -   background-position: left -141px;
  1192. 1190.  - }
  1193. 1191.  -
  1194. 1192.  - .dd_menu_header .ads_status_image_span.status_on {
  1195. 1193.  -   background-position: left -16px;
  1196. 1194.  - }
  1197. 1195.  - .dd_menu_header .ads_status_image_span.status_off {
  1198. 1196.  -   background-position: left -29px;
  1199. 1197.  - }
  1200. 1198.  - .dd_menu_header .ads_status_image_span.status_pending {
  1201. 1199.  -   background-position: left -69px;
  1202. 1200.  - }
  1203. 1201.  - .dd_menu_header .ads_status_image_span.status_off_red {
  1204. 1202.  -   background-position: left -29px;
  1205. 1203.  - }
  1206. 1204.  - .dd_menu_header .ads_status_image_span.status_deleted {
  1207. 1205.  -   background-position: left -41px;
  1208. 1206.  - }
  1209. 1207.  - .dd_menu_header .ads_status_image_span.status_cross {
  1210. 1208.  -   background-position: left -55px;
  1211. 1209.  - }
  1212. 1210.  -
  1213. 1211.  - .dd_menu_body.ads_dd_wide .dd_menu_rows a .ads_status_image_span.status_on {
  1214. 1212.  -   background-position: left -85px;
  1215. 1213.  - }
  1216. 1214.  - .dd_menu_body.ads_dd_wide .dd_menu_rows a .ads_status_image_span.status_off {
  1217. 1215.  -   background-position: left -98px;
  1218. 1216.  - }
  1219. 1217.  - .dd_menu_body.ads_dd_wide .dd_menu_rows a .ads_status_image_span.status_deleted {
  1220. 1218.  -   background-position: left -111px;
  1221. 1219.  - }
  1222. 1220.  -
  1223. 1221.  - .ads_unions_list tr.ads_table_header th.paginated_table td.paginated_table_cell.column_commit_date,
  1224. 1222.  - .ads_unions_list tr.ads_table_header th.paginated_table td.paginated_table_cell.column_commit_date * {
  1225. 1223.  -   border-left: 0 none;
  1226. 1224.  - }
  1227. 1225.  -
  1228. 1226.  - #ads_unions_budget * {
  1229. 1227.  -   text-align: left;
  1230. 1228.  - }
  1231. 1229.  -
  1232. 1230.  - #ads_general_info_status_selector {
  1233. 1231.  -   border-bottom: 1px dashed #2B587A;
  1234. 1232.  - }
  1235. 1233.  -
  1236. 1234.  - table.ads_unions_content_label {
  1237. 1235.  -   border-collapse: collapse;
  1238. 1236.  - }
  1239. 1237.  -
  1240. 1238.  - #ads_unions_content .ads_export_prefs .ads_export_date_row .table_label {
  1241. 1239.  -   padding-top: 4px;
  1242. 1240.  - }
  1243. 1241.  - .ads_export_prefs .table_value {
  1244. 1242.  -   width: 300px;
  1245. 1243.  - }
  1246. 1244.  -
  1247. 1245.  - #ads_unions_content .export_prefs_web .summary td {
  1248. 1246.  -   padding-top: 10px !important;
  1249. 1247.  - }
  1250. 1248.  -
  1251. 1249.  - .ads_export_stats .ads_unions_table th.paginated_table td.paginated_table_cell.column_checked {
  1252. 1250.  -   width: 34px;
  1253. 1251.  - }
  1254. 1252.  -
  1255. 1253.  - .ads_unions_list .checkbox_container table {
  1256. 1254.  -   border: 0px;
  1257. 1255.  - }
  1258. 1256.  -
  1259. 1257.  - .ads_unions_table .hovered_header,
  1260. 1258.  - .ads_unions_table .hovered_header_hover {
  1261. 1259.  -   cursor: pointer;
  1262. 1260.  - }
  1263. 1261.  - .ads_unions_table .hovered_header_hover {
  1264. 1262.  -   background-color: #EFF2F5;
  1265. 1263.  - }
  1266. 1264.  -
  1267. 1265.  - .ads_inline_edit_remove_value {
  1268. 1266.  -   margin-left: 5px;
  1269. 1267.  -   white-space: nowrap;
  1270. 1268.  - }
  1271. 1269.  -
  1272. 1270.  - .ads_inline_edit_table {
  1273. 1271.  -   border-collapse: collapse;
  1274. 1272.  - }
  1275. 1273.  - table.ads_inline_edit_table td {
  1276. 1274.  -   padding: 0;
  1277. 1275.  - }
  1278. 1276.  - .ads_inline_fast_error_row {
  1279. 1277.  -   display: none;
  1280. 1278.  - }
  1281. 1279.  - .ads_inline_fast_error {
  1282. 1280.  -   background-color: #F9F6E7;
  1283. 1281.  -   border: 1px solid #D4BC4C;
  1284. 1282.  -   padding: 8px 11px;
  1285. 1283.  -   margin-top: 5px;
  1286. 1284.  - }
  1287. 1285.  -
  1288. 1286.  - .ads_inline_recommended_cost_text {
  1289. 1287.  -   font-size: 0.91em;
  1290. 1288.  -   color: #777777;
  1291. 1289.  -   display: none;
  1292. 1290.  - }
  1293. 1291.  -
  1294. 1292.  - .ads_moder_comment_rules_wrap ul {
  1295. 1293.  -   list-style: square outside none;
  1296. 1294.  -   color: #758EAC;
  1297. 1295.  -   margin: 11px 0 0 0;
  1298. 1296.  - }
  1299. 1297.  - .ads_moder_comment_rules_wrap span {
  1300. 1298.  -   color: black;
  1301. 1299.  - }
  1302. 1300.  - .ads_moder_comment_rules_separator {
  1303. 1301.  -   height: 11px;
  1304. 1302.  - }
  1305. 1303.  -
  1306. 1304.  - #ads_admin_box_wrapper a:hover {
  1307. 1305.  -   text-decoration: underline;
  1308. 1306.  - }
  1309. 1307.  -
  1310. 1308.  - .ads_admin_table_cell {
  1311. 1309.  -   border-bottom: 1px solid #DAE2E8;
  1312. 1310.  - }
  1313. 1311.  -
  1314. 1312.  - .admin_table_cell_last {
  1315. 1313.  -   border-bottom: none;
  1316. 1314.  - }
  1317. 1315.  -
  1318. 1316.  - .ads_admin_box_label {
  1319. 1317.  -   color: #777777;
  1320. 1318.  -   text-align: right;
  1321. 1319.  -   width: 125px;
  1322. 1320.  -   padding-right: 10px;
  1323. 1321.  - }
  1324. 1322.  - .ads_admin_box_labeled {
  1325. 1323.  -   width: 270px;
  1326. 1324.  - }
  1327. 1325.  -
  1328. 1326.  - .ads_general_info_hidden {
  1329. 1327.  -   display: none;
  1330. 1328.  - }
  1331. 1329.  -
  1332. 1330.  - .ads_general_info .table_large_text {
  1333. 1331.  -   width: 385px;
  1334. 1332.  - }
  1335. 1333.  -
  1336. 1334.  - #ads_unions_content h4 span {
  1337. 1335.  -   font-weight: bold
  1338. 1336.  - }
  1339. 1337.  -
  1340. 1338.  - .ads_users_stats_dark {
  1341. 1339.  -   background-color: #597DA3;
  1342. 1340.  - }
  1343. 1341.  -
  1344. 1342.  - .ads_users_stats_light {
  1345. 1343.  -   background-color: #DAE1E8;
  1346. 1344.  - }
  1347. 1345.  -
  1348. 1346.  - .ads_users_stats_bars_title {
  1349. 1347.  -   padding-bottom: 16px;
  1350. 1348.  -   color: #45688E;
  1351. 1349.  -   font-weight: bold;
  1352. 1350.  - }
  1353. 1351.  -
  1354. 1352.  - .ads_users_stats_bar_label {
  1355. 1353.  -   height: 30px;
  1356. 1354.  -   text-align: right;
  1357. 1355.  -   padding-right: 16px;
  1358. 1356.  -   padding-top: 2px;
  1359. 1357.  -   vertical-align: top;
  1360. 1358.  -   color: #45688E;
  1361. 1359.  -   font-weight: bold;
  1362. 1360.  - }
  1363. 1361.  - .ads_users_stats_bar_wrap table {
  1364. 1362.  -   border: 0px;
  1365. 1363.  -   border-collapse: collapse;
  1366. 1364.  - }
  1367. 1365.  - .ads_users_stats_bar_wrap table td {
  1368. 1366.  -   padding: 0px;
  1369. 1367.  - }
  1370. 1368.  - .ads_users_stats_bar_wrap {
  1371. 1369.  -   height: 30px;
  1372. 1370.  -   vertical-align: top;
  1373. 1371.  - }
  1374. 1372.  - .ads_users_stats_bar_wrap table td.ads_users_stats_bar_value {
  1375. 1373.  -   padding-left: 11px;
  1376. 1374.  - }
  1377. 1375.  - .ads_users_stats_bar {
  1378. 1376.  -   -moz-border-radius: 0 3px 3px 0;
  1379. 1377.  -   -webkit-border-radius: 0 3px 3px 0;
  1380. 1378.  -   -khtml-border-radius: 0 3px 3px 0;
  1381. 1379.  -   border-radius: 0 3px 3px 0;
  1382. 1380.  -   height: 17px;
  1383. 1381.  - }
  1384. 1382.  -
  1385. 1383.  - #ads_demography_wrap .summary_right .summary_tab2 {
  1386. 1384.  -   background-color: transparent;
  1387. 1385.  - }
  1388. 1386.  -
  1389. 1387.  - .ads_dropdown_menu_scrollbar {
  1390. 1388.  -   position: absolute;
  1391. 1389.  -   z-index: 1500;
  1392. 1390.  -   background-color: #000;
  1393. 1391.  -
  1394. 1392.  -   opacity: 0.4;
  1395. 1393.  -   -moz-opacity: 0.4;
  1396. 1394.  -   filter: alpha(opacity=40);
  1397. 1395.  -
  1398. 1396.  -   border-radius: 3px;
  1399. 1397.  -   -webkit-border-radius: 3px;
  1400. 1398.  -   -moz-border-radius: 3px;
  1401. 1399.  -   -khtml-border-radius: 3px;
  1402. 1400.  - }
  1403. 1401.  - .ads_dropdown_menu_scrollbar:hover,
  1404. 1402.  - .ads_dropdown_menu_scrollbar.hovered {
  1405. 1403.  -   opacity: 0.6;
  1406. 1404.  -   -moz-opacity: 0.6;
  1407. 1405.  -   filter: alpha(opacity=60);
  1408. 1406.  - }
  1409. 1407.  -
  1410. 1408.  - #ads_admin_box_wrapper h2 {
  1411. 1409.  -   padding: 0;
  1412. 1410.  -   margin: 0;
  1413. 1411.  -   border: none;
  1414. 1412.  - }
  1415. 1413.  -
  1416. 1414.  - #ads_reqs_edit td.ads_req_label {
  1417. 1415.  -   color: #666666;
  1418. 1416.  -   text-align: right;
  1419. 1417.  -   vertical-align: top;
  1420. 1418.  -   padding-top: 5px;
  1421. 1419.  - }
  1422. 1420.  -
  1423. 1421.  - #ads_reqs_edit td.ads_req_right {
  1424. 1422.  -   width: 100px;
  1425. 1423.  - }
  1426. 1424.  -
  1427. 1425.  - #ads_reqs_edit_form input.ads_req_edit,
  1428. 1426.  - #ads_reqs_edit_form textarea.ads_req_edit {
  1429. 1427.  -   margin: 0px;
  1430. 1428.  -   width: 250px;
  1431. 1429.  - }
  1432. 1430.  -
  1433. 1431.  - #ads_legal_info_box div {
  1434. 1432.  -   padding: 8px 11px;
  1435. 1433.  -   border: 1px solid #C0CAD5;
  1436. 1434.  - }
  1437. 1435.  -
  1438. 1436.  - /*
  1439. 1437.  -  *   About section
  1440. 1438.  -  */
  1441. 1439.  -
  1442. 1440.  - .ads_help_section.section_wrap {
  1443. 1441.  -   padding: 20px 25px 25px 26px;
  1444. 1442.  -   line-height: 140%;
  1445. 1443.  - }
  1446. 1444.  -
  1447. 1445.  - .ads_help_section h4 {
  1448. 1446.  -   margin-bottom: 10px;
  1449. 1447.  - }
  1450. 1448.  -
  1451. 1449.  - .ads_help_section .header {
  1452. 1450.  -   font-size: 1.09em;
  1453. 1451.  -   margin: 0px 0px 20px 1px;
  1454. 1452.  -   border: none;
  1455. 1453.  -   color: #45688E;
  1456. 1454.  -   font-weight: bold;
  1457. 1455.  - }
  1458. 1456.  -
  1459. 1457.  - .ads_help_section .par_divider {
  1460. 1458.  -   margin-bottom: 31px;
  1461. 1459.  - }
  1462. 1460.  -
  1463. 1461.  - .ads_help_section .emph_link {
  1464. 1462.  -   margin-left: 26px;
  1465. 1463.  - }
  1466. 1464.  -
  1467. 1465.  - #unions_navigation {
  1468. 1466.  -   vertical-align: top;
  1469. 1467.  - }
  1470. 1468.  -
  1471. 1469.  - #unions_navigation {
  1472. 1470.  -   width: 150px;
  1473. 1471.  -   padding: 12px 12px 12px 0;
  1474. 1472.  - }
  1475. 1473.  -
  1476. 1474.  - #unions_navigation .edit_button_wrap {
  1477. 1475.  -   padding-bottom: 10px;
  1478. 1476.  - }
  1479. 1477.  -
  1480. 1478.  - #unions_navigation .nav_separator {
  1481. 1479.  -   border-bottom: 1px solid rgb(211, 219, 225);
  1482. 1480.  -   height: 1px;
  1483. 1481.  -   overflow: hidden;
  1484. 1482.  -   margin: 7px 0px 8px 0;
  1485. 1483.  - }
  1486. 1484.  -
  1487. 1485.  - #unions_navigation a.nav {
  1488. 1486.  -   padding: 6px 6px 7px 11px;
  1489. 1487.  -   display: block;
  1490. 1488.  -   overflow: hidden;
  1491. 1489.  -   max-width: 133px;
  1492. 1490.  -   word-wrap: break-word;
  1493. 1491.  - }
  1494. 1492.  - #unions_navigation a.nav:hover {
  1495. 1493.  -   background-color: #E1E7ED;
  1496. 1494.  -   text-decoration: none;
  1497. 1495.  - }
  1498. 1496.  - #unions_navigation a.nav_selected,
  1499. 1497.  - #unions_navigation a.nav_selected:hover {
  1500. 1498.  -   background-color: #6186AD;
  1501. 1499.  -   color: white;
  1502. 1500.  - }
  1503. 1501.  -
  1504. 1502.  -
  1505. 1503.  - #unions_navigation.ads_unions_navigation_about {
  1506. 1504.  -   background-color: #F7F7F7;
  1507. 1505.  -   border-left: 1px solid #DAE1E8;
  1508. 1506.  -   padding: 14px 10px;
  1509. 1507.  - }
  1510. 1508.  -
  1511. 1509.  - #unions_navigation.ads_unions_navigation_about .nav {
  1512. 1510.  -   border-color: #F7F7F7;
  1513. 1511.  - }
  1514. 1512.  -
  1515. 1513.  - #unions_navigation.ads_unions_navigation_about .nav_selected {
  1516. 1514.  -   border-color: #517295;
  1517. 1515.  - }
  1518. 1516.  -
  1519. 1517.  - .ads_unions_navigation_about .ad_box_preview {
  1520. 1518.  -   border: 1px solid #DCE3E9
  1521. 1519.  - }
  1522. 1520.  -
  1523. 1521.  - #ads_contacts_form {
  1524. 1522.  -   margin: 20px 0 0 0;
  1525. 1523.  - }
  1526. 1524.  - #ads_contacts_form .label_slide {
  1527. 1525.  -   vertical-align: top;
  1528. 1526.  - }
  1529. 1527.  - #ads_contacts_form .label {
  1530. 1528.  -   width: 100px;
  1531. 1529.  -   color: #555;
  1532. 1530.  -   padding: 4px 10px 0 0;
  1533. 1531.  -   text-align: right;
  1534. 1532.  -   vertical-align: top;
  1535. 1533.  - }
  1536. 1534.  - #ads_contacts_form .labeled {
  1537. 1535.  -   padding-bottom: 10px;
  1538. 1536.  - }
  1539. 1537.  - #ads_contacts_form .row_checkbox .labeled {
  1540. 1538.  -   padding-bottom: 6px;
  1541. 1539.  - }
  1542. 1540.  - #ads_contacts_form .row_checkbox_prev .labeled {
  1543. 1541.  -   padding-bottom: 8px;
  1544. 1542.  - }
  1545. 1543.  - #ads_contacts_form .row_checkbox_last .labeled {
  1546. 1544.  -   padding-bottom: 8px;
  1547. 1545.  - }
  1548. 1546.  - #ads_contacts_form td.label_slide {
  1549. 1547.  -   overflow: hidden;
  1550. 1548.  - }
  1551. 1549.  - #ads_contacts_form div.label_slide {
  1552. 1550.  -   height: 0;
  1553. 1551.  - }
  1554. 1552.  - #ads_contacts_form .checkbox_wrap {
  1555. 1553.  -   margin: -5px 0;
  1556. 1554.  - }
  1557. 1555.  - #ads_contacts_form input.txt {
  1558. 1556.  -   width: 242px;
  1559. 1557.  - }
  1560. 1558.  - #ads_contacts_form textarea.txt {
  1561. 1559.  -   width: 242px;
  1562. 1560.  -   height: 40px;
  1563. 1561.  - }
  1564. 1562.  - #ads_contacts_form textarea.txt#message {
  1565. 1563.  -   height: 90px;
  1566. 1564.  - }
  1567. 1565.  - #ads_contacts_form .msg {
  1568. 1566.  -   background-color: #f9f6e7;
  1569. 1567.  -   border-color: #c3b988;
  1570. 1568.  -   font-weight: normal;
  1571. 1569.  - }
  1572. 1570.  -
  1573. 1571.  - .ads_contacts_nonresident_message {
  1574. 1572.  -   padding: 7px 0 20px 0;
  1575. 1573.  - }
  1576. 1574.  -
  1577. 1575.  - .wk_ads_intro #ads_contacts_form .label {
  1578. 1576.  -   width: 140px;
  1579. 1577.  -   padding-top: 9px;
  1580. 1578.  - }
  1581. 1579.  -
  1582. 1580.  - .wk_ads_intro #ads_contacts_form input.txt,
  1583. 1581.  - .wk_ads_intro #ads_contacts_form textarea.txt {
  1584. 1582.  -   width: 254px;
  1585. 1583.  -   height: 17px;
  1586. 1584.  -   line-height: 17px;
  1587. 1585.  -   padding: 5px 6px 6px 10px;
  1588. 1586.  - }
  1589. 1587.  - @-moz-document url-prefix() {
  1590. 1588.  - .wk_ads_intro #ads_contacts_form input.txt,
  1591. 1589.  - .wk_ads_intro #ads_contacts_form textarea.txt {
  1592. 1590.  -   padding-left: 9px;
  1593. 1591.  -   width: 255px;
  1594. 1592.  - }
  1595. 1593.  - }
  1596. 1594.  - .wk_ads_intro #ads_contacts_form textarea.txt {
  1597. 1595.  -   height: 52px;
  1598. 1596.  - }
  1599. 1597.  - .wk_ads_intro #ads_contacts_form textarea.txt#message {
  1600. 1598.  -   height: 90px;
  1601. 1599.  - }
  1602. 1600.  -
  1603. 1601.  - /* Multi dropdown menu - begin */
  1604. 1602.  -
  1605. 1603.  - a.ads_dd_menu_item_checkbox_on,
  1606. 1604.  - a.ads_dd_menu_item_checkbox_off {
  1607. 1605.  -   padding-left: 22px !important;
  1608. 1606.  -   background-image: none !important;
  1609. 1607.  -   background-position: 4px 2px !important;
  1610. 1608.  - }
  1611. 1609.  - a.ads_dd_menu_item_checkbox_on {
  1612. 1610.  -   background-image: url("/images/dropdead_check.gif") !important;
  1613. 1611.  - }
  1614. 1612.  -
  1615. 1613.  - /* Multi dropdown menu - end */
  1616. 1614.  -
  1617. 1615.  - .ads_paginated_table_name {
  1618. 1616.  -   overflow: hidden;
  1619. 1617.  -   white-space: nowrap;
  1620. 1618.  - }
  1621. 1619.  -
  1622. 1620.  - .ad_new_user td.label {
  1623. 1621.  -   text-align: right;
  1624. 1622.  -   padding: 6px 15px 6px 0;
  1625. 1623.  -   width: 120px;
  1626. 1624.  -   color: gray;
  1627. 1625.  - }
  1628. 1626.  - .ad_new_user td.labeled input {
  1629. 1627.  -   width: 160px;
  1630. 1628.  - }
  1631. 1629.  -
  1632. 1630.  - #ads_page_simple .ads_reg_row {
  1633. 1631.  -   height: 30px;
  1634. 1632.  - }
  1635. 1633.  - #ads_page_simple .ads_reg_label {
  1636. 1634.  -   width: 231px;
  1637. 1635.  -   float: left;
  1638. 1636.  -   text-align: right;
  1639. 1637.  -   color: #777777;
  1640. 1638.  -   padding: 4px 10px 0 0;
  1641. 1639.  - }
  1642. 1640.  - #ads_page_simple .ads_reg_labeled {
  1643. 1641.  -   float: left;
  1644. 1642.  - }
  1645. 1643.  - #ads_page_simple .ads_reg_labeled_input {
  1646. 1644.  -   margin: 0;
  1647. 1645.  - }
  1648. 1646.  - #ads_page_simple .ads_reg_labeled input#first_name,
  1649. 1647.  - #ads_page_simple .ads_reg_labeled input#last_name,
  1650. 1648.  - #ads_page_simple .ads_reg_labeled input#regemail,
  1651. 1649.  - #ads_page_simple .ads_reg_labeled input#regpass {
  1652. 1650.  -   width: 217px;
  1653. 1651.  - }
  1654. 1652.  -
  1655. 1653.  - .box_body .ads_disapproved_message {
  1656. 1654.  -   line-height: 150%;
  1657. 1655.  - }
  1658. 1656.  -
  1659. 1657.  - .ads_wiki_wrap {
  1660. 1658.  -   line-height: 160%;
  1661. 1659.  - }
  1662. 1660.  -
  1663. 1661.  - .ads_wiki_bonus {
  1664. 1662.  -   padding-bottom: 10px;
  1665. 1663.  - }
  1666. 1664.  -
  1667. 1665.  - #ads_bonus_activation_form .ads_unions_content_label td {
  1668. 1666.  -   padding: 0 0 4px 0;
  1669. 1667.  - }
  1670. 1668.  -
  1671. 1669.  - #ads_unions_content .payments_systems_container {
  1672. 1670.  -   padding: 7px 102px 0 50px;
  1673. 1671.  - }
  1674. 1672.  -
  1675. 1673.  - #ads_unions_content .payments_systems_container .ps_desc_short {
  1676. 1674.  -   padding-right: 120px;
  1677. 1675.  - }
  1678. 1676.  -
  1679. 1677.  - #ads_unions_content .payments_systems_container .term_info {
  1680. 1678.  -   min-height: 24px;
  1681. 1679.  - }
  1682. 1680.  -
  1683. 1681.  - #ads_unions_content .payments_landing div {
  1684. 1682.  -   margin-bottom: 20px;
  1685. 1683.  - }
  1686. 1684.  -
  1687. 1685.  - #ads_retargeting_groups_table {
  1688. 1686.  -   margin-top: 15px;
  1689. 1687.  - }
  1690. 1688.  - #ads_retargeting_groups_table .column_action_view {
  1691. 1689.  -   width: 100px;
  1692. 1690.  -   white-space: nowrap;
  1693. 1691.  - }
  1694. 1692.  - #ads_retargeting_groups .ads_retargeting_controls {
  1695. 1693.  -
  1696. 1694.  - }
  1697. 1695.  - .ads_retargeting_box {
  1698. 1696.  -   line-height: 160%;
  1699. 1697.  -   padding: 25px 20px;
  1700. 1698.  -   background-color: #F7F7F7;
  1701. 1699.  - }
  1702. 1700.  - .ads_retargeting_box_label {
  1703. 1701.  -   margin-bottom: 10px;
  1704. 1702.  -   color: #45668E;
  1705. 1703.  -   font-size: 1.18em;
  1706. 1704.  -   font-weight: bold;
  1707. 1705.  - }
  1708. 1706.  - .ads_retargeting_box_label_hint {
  1709. 1707.  -   color: #98A9B7;
  1710. 1708.  -   cursor: pointer;
  1711. 1709.  - }
  1712. 1710.  - .ads_retargeting_box_text {
  1713. 1711.  -   margin-top: 10px;
  1714. 1712.  -   color: #777;
  1715. 1713.  - }
  1716. 1714.  - .ads_retargeting_box input {
  1717. 1715.  -   width: 280px;
  1718. 1716.  - }
  1719. 1717.  - #ads_retargeting_box_error {
  1720. 1718.  -   margin-bottom: 10px;
  1721. 1719.  -   display: none;
  1722. 1720.  - }
  1723. 1721.  - .ads_retargeting_box .box_msg {
  1724. 1722.  -   margin-bottom: 10px;
  1725. 1723.  -   font-weight: normal;
  1726. 1724.  - }
  1727. 1725.  - .ads_retargeting_box_notice {
  1728. 1726.  -   font-size: 0.91em;
  1729. 1727.  -   color: #777;
  1730. 1728.  - }
  1731. 1729.  - .ads_retargeting_box_button {
  1732. 1730.  -   margin-top: 20px;
  1733. 1731.  - }
  1734. 1732.  - #ads_reatargeting_upload_notice {
  1735. 1733.  -   margin-top: 20px;
  1736. 1734.  -   text-align: center;
  1737. 1735.  -   color: #777;
  1738. 1736.  - }
  1739. 1737.  - #ads_retargeting_type {
  1740. 1738.  -   margin: 13px 0;
  1741. 1739.  - }
  1742. 1740.  - #ads_retargeting_type .radiobtn {
  1743. 1741.  -   margin-right: 25px;
  1744. 1742.  - }
  1745. 1743.  - #ads_retargeting_upload_doc {
  1746. 1744.  -   padding: 2px 0;
  1747. 1745.  - }
  1748. 1746.  - #ads_retargeting_upload_doc .button_blue button {
  1749. 1747.  -   background: none;
  1750. 1748.  -   background-color: #dfe5ed;
  1751. 1749.  -   color: #627485;
  1752. 1750.  -   border: none;
  1753. 1751.  -   text-shadow: none;
  1754. 1752.  -   padding-bottom: 7px;
  1755. 1753.  - }
  1756. 1754.  - #ads_retargeting_upload_doc .button_blue button:hover {
  1757. 1755.  -   background-color: #d8dfe8;
  1758. 1756.  -   color: #607282;
  1759. 1757.  - }
  1760. 1758.  - #ads_retargeting_upload_doc form {
  1761. 1759.  -   text-align: left!important;
  1762. 1760.  - }
  1763. 1761.  - #retargeting_group_pixel {
  1764. 1762.  -   padding: 5px 8px 6px;
  1765. 1763.  -   background-color: #FFF;
  1766. 1764.  -   height: 80px;
  1767. 1765.  -   width: 390px;
  1768. 1766.  -   line-height: 140%;
  1769. 1767.  - }
  1770. 1768.  - .ads_retargeting_box .input_back_content {
  1771. 1769.  -   padding: 0;
  1772. 1770.  - }
  1773. 1771.  - .ads_retargeting_box input:focus,
  1774. 1772.  - .ads_retargeting_box textarea:focus {
  1775. 1773.  -   outline: 0;
  1776. 1774.  - }
  1777. 1775.  - #ads_retargeting_domain_text {
  1778. 1776.  -   font-weight: bold;
  1779. 1777.  - }
  1780. 1778.  - #ads_retargeting_domain {
  1781. 1779.  -   margin-right: 5px;
  1782. 1780.  -   width: 200px;
  1783. 1781.  - }
  1784. 1782.  - #ads_retargeting_domain_link {
  1785. 1783.  -   padding: 6px 0 7px 0;
  1786. 1784.  - }
  1787. 1785.  - @-moz-document url-prefix() {
  1788. 1786.  - #ads_retargeting_domain_link {
  1789. 1787.  -   padding: 7px 0;
  1790. 1788.  - }
  1791. 1789.  - #ads_retargeting_upload_doc {
  1792. 1790.  -   padding: 3px 0;
  1793. 1791.  - }
  1794. 1792.  - }
  1795. 1793.  - .ads_retargeting_text {
  1796. 1794.  -   line-height: 150%;
  1797. 1795.  - }
  1798. 1796.  - #ads_retargeting_processing_msg {
  1799. 1797.  -   margin-bottom: 10px;
  1800. 1798.  - }
  1801. 1799.  - .ads_retargeting_param_saved {
  1802. 1800.  -   padding-left: 10px;
  1803. 1801.  -   color: #777;
  1804. 1802.  -   opacity: 0;
  1805. 1803.  - }
  1806. 1804.  - .ads_upload_progress_wrap {
  1807. 1805.  -   width: 200px;
  1808. 1806.  -   height: 18px;
  1809. 1807.  -   background: #FFF;
  1810. 1808.  -   border: 1px solid #CCC;
  1811. 1809.  - }
  1812. 1810.  - .ads_upload_progress {
  1813. 1811.  -   height: 18px;
  1814. 1812.  -   background: #597DA3 url(/images/progress_grad.gif) repeat;
  1815. 1813.  -   border: 1px solid #45688E;
  1816. 1814.  -   margin: -1px;
  1817. 1815.  - }
  1818. 1816.  -
  1819. 1817.  - .ads_settings_notifacations {
  1820. 1818.  -   margin: 10px 0 0 10px;
  1821. 1819.  -   border-collapse: collapse;
  1822. 1820.  - }
  1823. 1821.  - .ads_settings_notifacations th,
  1824. 1822.  - .ads_settings_notifacations td {
  1825. 1823.  -   padding: 0 5px;
  1826. 1824.  -   text-align: center;
  1827. 1825.  - }
  1828. 1826.  - td.ads_settings_notifacations_label {
  1829. 1827.  -   padding: 0 30px 0 0;
  1830. 1828.  -   text-align: left;
  1831. 1829.  - }
  1832. 1830.  - .ads_settings_notifacations .checkbox_container {
  1833. 1831.  -   margin: 0 auto;
  1834. 1832.  - }
  1835. 1833.  -
  1836. 1834.  - #ad_preview_top .ads_ad_box.news {
  1837. 1835.  -   padding-bottom: 5px;
  1838. 1836.  - }
  1839. 1837.  -
  1840. 1838.  -
  1841. 1839.  - .ads_alt_table {
  1842. 1840.  -   border-collapse: collapse;
  1843. 1841.  -   width: 100%;
  1844. 1842.  - }
  1845. 1843.  - .ads_alt_table th {
  1846. 1844.  -   padding: 9px 8px 11px 5px;
  1847. 1845.  -   background-color: #e9edf0;
  1848. 1846.  -   color: #587183;
  1849. 1847.  -   font-weight: bold;
  1850. 1848.  -   white-space: nowrap;
  1851. 1849.  -   height: auto;
  1852. 1850.  -   border: none;
  1853. 1851.  -   text-align: left;
  1854. 1852.  -   font-size: 1.09em;
  1855. 1853.  - }
  1856. 1854.  - .ads_alt_table th:first-child {
  1857. 1855.  -   padding-left: 10px;
  1858. 1856.  - }
  1859. 1857.  - .ads_alt_table tr {
  1860. 1858.  -   border-left: 1px solid #e9edf0;
  1861. 1859.  -   border-right: 1px solid #e9edf0;
  1862. 1860.  - }
  1863. 1861.  - .ads_alt_table td.even_row {
  1864. 1862.  -   background-color: #f5f7f7;
  1865. 1863.  - }
  1866. 1864.  - .ads_alt_table tr:first-child {
  1867. 1865.  -   border-top: 1px solid #e9edf0;
  1868. 1866.  - }
  1869. 1867.  - .ads_alt_table tr:last-child {
  1870. 1868.  -   border-bottom: 1px solid #e9edf0;
  1871. 1869.  - }
  1872. 1870.  - .ads_alt_table td {
  1873. 1871.  -   padding: 10px 5px;
  1874. 1872.  -   text-align: left;
  1875. 1873.  -   vertical-align: top;
  1876. 1874.  -   line-height: 160%;
  1877. 1875.  -   height: auto;
  1878. 1876.  - }
  1879. 1877.  - .ads_alt_table td:first-child {
  1880. 1878.  -   padding-left: 10px !important;
  1881. 1879.  - }
  1882. 1880.  - .ads_alt_table td:last-child {
  1883. 1881.  -   padding-right: 10px;
  1884. 1882.  - }
  1885. 1883.  - .ads_alt_table td.not_found {
  1886. 1884.  -   padding: 0px !important;
  1887. 1885.  - }
  1888. 1886.  - .ads_alt_table .grey {
  1889. 1887.  -   color: #666666;
  1890. 1888.  -   display: inline-block;
  1891. 1889.  -   min-width: 40px;
  1892. 1890.  -   margin-right: 5px;
  1893. 1891.  - }
  1894. 1892.  -
  1895. 1893.  - .ads_retargeting_menu a.ads_retargeting_menu_header,
  1896. 1894.  - .ads_retargeting_menu a.ads_retargeting_menu_header:hover {
  1897. 1895.  -   background-color: #EDF1F5;
  1898. 1896.  -   color: #2B587A;
  1899. 1897.  - }
  1900. 1898.  - .ads_retargeting_menu .dd_menu_body {
  1901. 1899.  -   -webkit-border-radius: 2px;
  1902. 1900.  -   -khtml-border-radius: 2px;
  1903. 1901.  -   -moz-border-radius: 2px;
  1904. 1902.  -   border-radius: 2px;
  1905. 1903.  -   -webkit-box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.35);
  1906. 1904.  -   -moz-box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.35);
  1907. 1905.  -   box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.35);
  1908. 1906.  -   border: 1px solid #B2BDCA;
  1909. 1907.  - }
  1910. 1908.  - .ads_retargeting_menu .dd_menu_header {
  1911. 1909.  -   border: none;
  1912. 1910.  - }
  1913. 1911.  - .ads_retargeting_menu .dd_menu_header div {
  1914. 1912.  -   display: none;
  1915. 1913.  - }
  1916. 1914.  - .ads_retargeting_menu .dd_menu_rows {
  1917. 1915.  -   border: none;
  1918. 1916.  - }
  1919. 1917.  - .ads_retargeting_menu .dd_menu_rows a {
  1920. 1918.  -   padding: 7px 8px 2px 8px;
  1921. 1919.  - }
  1922. 1920.  - .ads_retargeting_menu .dd_menu_shad_l,
  1923. 1921.  - .ads_retargeting_menu .dd_menu_shad_r,
  1924. 1922.  - .ads_retargeting_menu .dd_menu_shad_t,
  1925. 1923.  - .ads_retargeting_menu .dd_menu_shad_t2,
  1926. 1924.  - .ads_retargeting_menu .dd_menu_shad_b,
  1927. 1925.  - .ads_retargeting_menu .dd_menu_shad_b2 {
  1928. 1926.  -   display: none;
  1929. 1927.  - }
  1930. 1928.  -
  1931. 1929.  - .ads_retargeting_tt table .tt_text {
  1932. 1930.  -   color: #000;
  1933. 1931.  -   line-height: 150%;
  1934. 1932.  -   padding: 10px;
  1935. 1933.  -   width: 295px;
  1936. 1934.  - }
  1937. 1935.  - .ads_retargeting_tt table.toup1 .bottom_pointer {
  1938. 1936.  -   margin-right: 0px;
  1939. 1937.  -   margin-left: 34px;
  1940. 1938.  -   display: block;
  1941. 1939.  -   background: url(/images/tooltip_arrow_white.gif) no-repeat;
  1942. 1940.  - }
  1943. 1941.  - .ads_retargeting_tt table.toup .top_pointer {
  1944. 1942.  -   margin-right: 0px;
  1945. 1943.  -   margin-left: 34px;
  1946. 1944.  -   display: block;
  1947. 1945.  -   bottom: -2px;
  1948. 1946.  -   background: url(/images/tooltip_arrow_up.gif) no-repeat;
  1949. 1947.  - }
  1950. ------
  1951. Файл - ads.js (Старый размер - 93443 | Новый - 0):
  1952. 0.  - var Ads = {};
  1953. 1.  -
  1954. 2.  - Ads.init = function() {
  1955. 3.  -   showBackLink();
  1956. 4.  -   Ads.processNotices();
  1957. 5.  - }
  1958. 6.  -
  1959. 7.  - Ads.initOfficesMenu = function(event) {
  1960. 8.  -
  1961. 9.  -   if (!window.DropdownMenu || !cur.mainNavigationOfficesItems) {
  1962. 10.  -     return;
  1963. 11.  -   }
  1964. 12.  -
  1965. 13.  -   if (cur.navigationOficesMenu) {
  1966. 14.  -     return;
  1967. 15.  -   }
  1968. 16.  -
  1969. 17.  -   ge('ads_navigation_offices_menu').removeAttribute('onmouseover');
  1970. 18.  -
  1971. 19.  -   function hideMenu() {
  1972. 20.  -     cur.navigationOficesMenu.hide();
  1973. 21.  -   }
  1974. 22.  -
  1975. 23.  -   var realLocation = '';
  1976. 24.  -   if (location.hash.indexOf('#/') != -1 || location.hash.indexOf('#!') != -1) {
  1977. 25.  -     realLocation = location.hash.replace('#/', '').replace('#!', '');
  1978. 26.  -   } else {
  1979. 27.  -     realLocation = location.pathname + location.search;
  1980. 28.  -   }
  1981. 29.  -
  1982. 30.  -   var unionId;
  1983. 31.  -   var unionIdReal;
  1984. 32.  -   var unionIdParam = '';
  1985. 33.  -   var curItems = [];
  1986. 34.  -   for (var i in cur.mainNavigationOfficesItems) {
  1987. 35.  -     curItems[i] = {};
  1988. 36.  -     curItems[i].onClick = hideMenu;
  1989. 37.  -     for (var j in cur.mainNavigationOfficesItems[i]) {
  1990. 38.  -       curItems[i][j] = cur.mainNavigationOfficesItems[i][j];
  1991. 39.  -     }
  1992. 40.  -     if (curItems[i].i == 'all') {
  1993. 41.  -       curItems[i].h = "/ads?act=offices_list";
  1994. 42.  -     } else {
  1995. 43.  -       unionId = '';
  1996. 44.  -       unionIdReal = intval(curItems[i].i);
  1997. 45.  -       unionIdParam = '';
  1998. 46.  -       if (curItems[i].i.indexOf('default') == -1) {
  1999. 47.  -         unionId = unionIdReal;
  2000. 48.  -         unionIdParam = "&union_id=" + unionIdReal;
  2001. 49.  -       }
  2002. 50.  -
  2003. 51.  -       var link = "/ads?act=office" + unionIdParam;
  2004. 52.  -       if (!unionIdReal) {
  2005. 53.  -         link = "/ads?act=no_office";
  2006. 54.  -       } else if (cur.getOfficeLink) {
  2007. 55.  -         link = cur.getOfficeLink(unionId);
  2008. 56.  -       } else if (realLocation.match(/act=budget(&|$)/)) {
  2009. 57.  -         link = "/ads?act=budget" + unionIdParam;
  2010. 58.  -       } else if (realLocation.match(/act=export_stats(&|$)/)) {
  2011. 59.  -         link = "/ads?act=export_stats" + unionIdParam;
  2012. 60.  -       } else if (realLocation.match(/act=settings(&|$)/)) {
  2013. 61.  -         link = "/ads?act=settings" + unionIdParam;
  2014. 62.  -       }
  2015. 63.  -
  2016. 64.  -       curItems[i].h = link;
  2017. 65.  -     }
  2018. 66.  -   }
  2019. 67.  -
  2020. 68.  -   var options = {
  2021. 69.  -     title: '<span id="ads_navigation_dd_menu_header_text">' + ge('ads_navigation_offices_menu_text').innerHTML + '</span>',
  2022. 70.  -     containerClass: 'ads_navigation_dd_menu_header_wrap',
  2023. 71.  -     target: ge('ads_navigation_offices_menu'),
  2024. 72.  -     showHover: false,
  2025. 73.  -     updateTarget: false,
  2026. 74.  -     onSelect: function(e) {
  2027. 75.  -     }
  2028. 76.  -   };
  2029. 77.  -   cur.navigationOficesMenu = new DropdownMenu(curItems, options);
  2030. 78.  -   cur.destroy.push(function(){ cur.navigationOficesMenu.destroy(); });
  2031. 79.  - }
  2032. 80.  -
  2033. 81.  - Ads.lock = function(lockKey, onLock, onUnlock) {
  2034. 82.  -   if (!cur.locks) {
  2035. 83.  -     cur.locks = {};
  2036. 84.  -   }
  2037. 85.  -   if (cur.locks[lockKey]) {
  2038. 86.  -     return false;
  2039. 87.  -   }
  2040. 88.  -   cur.locks[lockKey] = {onLock: onLock, onUnlock: onUnlock};
  2041. 89.  -   if (isFunction(cur.locks[lockKey].onLock)) {
  2042. 90.  -     cur.locks[lockKey].onLock();
  2043. 91.  -   }
  2044. 92.  -   return true;
  2045. 93.  - }
  2046. 94.  -
  2047. 95.  - Ads.unlock = function(lockKey) {
  2048. 96.  -   if (!cur.locks) {
  2049. 97.  -     cur.locks = {};
  2050. 98.  -   }
  2051. 99.  -   if (cur.locks[lockKey] && isFunction(cur.locks[lockKey].onUnlock)) {
  2052. 100.  -     cur.locks[lockKey].onUnlock();
  2053. 101.  -   }
  2054. 102.  -   delete cur.locks[lockKey];
  2055. 103.  - }
  2056. 104.  -
  2057. 105.  - Ads.simpleAjax = function(url, elem) {
  2058. 106.  -   if (elem) {
  2059. 107.  -     var elemRect = elem.getBoundingClientRect();
  2060. 108.  -     var imgTop   = (elemRect.bottom - elemRect.top - 8) / 2;
  2061. 109.  -     var span     = ce('span', {}, {position: 'relative'})
  2062. 110.  -     var img      = ce('img', {src:'/images/upload.gif'}, {position: 'absolute', top: imgTop + 'px'});
  2063. 111.  -     span.appendChild(img);
  2064. 112.  -     elem.appendChild(span);
  2065. 113.  -   }
  2066. 114.  -
  2067. 115.  -   ajax.post(url, {}, {onDone: onComplete, onFail: onComplete});
  2068. 116.  -   function onComplete(response) {
  2069. 117.  -     if (elem) {
  2070. 118.  -       elem.removeChild(span);
  2071. 119.  -     }
  2072. 120.  -     if (response && response.html) {
  2073. 121.  -       var boxOptions = {};
  2074. 122.  -       boxOptions.title  = '���������';
  2075. 123.  -       boxOptions.onHide = nav.reload;
  2076. 124.  -       showFastBox(boxOptions, response.html);
  2077. 125.  -     } else {
  2078. 126.  -       nav.reload();
  2079. 127.  -     }
  2080. 128.  -     return true;
  2081. 129.  -   }
  2082. 130.  - }
  2083. 131.  -
  2084. 132.  - Ads.escapeValue = function(value) {
  2085. 133.  -   return value.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;');
  2086. 134.  - }
  2087. 135.  -
  2088. 136.  - Ads.onInputEvent = function(event, func) {
  2089. 137.  -   if (event.keyCode == KEY.RETURN) {
  2090. 138.  -     func();
  2091. 139.  -     return false;
  2092. 140.  -   }
  2093. 141.  -   return true;
  2094. 142.  - }
  2095. 143.  -
  2096. 144.  - Ads.onSubLinkEvent = function(event) {
  2097. 145.  -   event = normEvent(event);
  2098. 146.  -   var elem = event.target
  2099. 147.  -   var newLink = elem.getAttribute('href_');
  2100. 148.  -   if (!newLink) {
  2101. 149.  -     return;
  2102. 150.  -   }
  2103. 151.  -   var linkElem = elem;
  2104. 152.  -   while (linkElem && linkElem.nodeName !== 'A') {
  2105. 153.  -     linkElem = linkElem.parentNode;
  2106. 154.  -   }
  2107. 155.  -   if (!linkElem) {
  2108. 156.  -     return;
  2109. 157.  -   }
  2110. 158.  -   if (event.type === 'mouseover') {
  2111. 159.  -     elem.setAttribute('href_old', linkElem.href);
  2112. 160.  -     linkElem.href = newLink;
  2113. 161.  -   } else if (event.type === 'mouseout') {
  2114. 162.  -     var oldLink = elem.getAttribute('href_old');
  2115. 163.  -     if (oldLink) {
  2116. 164.  -       linkElem.href = oldLink;
  2117. 165.  -     } else {
  2118. 166.  -       linkElem.removeAttribute('href');
  2119. 167.  -     }
  2120. 168.  -   }
  2121. 169.  - }
  2122. 170.  -
  2123. 171.  - Ads.onBoxFail = function(message) {
  2124. 172.  -   if (!message) {
  2125. 173.  -     message = getLang('global_unknown_error');
  2126. 174.  -   }
  2127. 175.  -   setTimeout(function(){
  2128. 176.  -     showFastBox(getLang('ads_error_box_title'), message);
  2129. 177.  -   }, 1);
  2130. 178.  -   return true;
  2131. 179.  - }
  2132. 180.  -
  2133. 181.  - Ads.setLoginHandlers = function(onLoginDoneNew, onLoginFailedNew) {
  2134. 182.  -   var restoreOnLoginDone = function(handler) {
  2135. 183.  -     if (cur.onLoginDoneWindowOld && window.onLoginDone == handler) {
  2136. 184.  -       window.onLoginDone = cur.onLoginDoneWindowOld;
  2137. 185.  -       delete cur.onLoginDoneWindowOld;
  2138. 186.  -     }
  2139. 187.  -   }
  2140. 188.  -   var restoreOnLoginFailed = function(handler) {
  2141. 189.  -     if (cur.onLoginFailedWindowOld && window.onLoginFailed == handler) {
  2142. 190.  -       window.onLoginFailed = cur.onLoginFailedWindowOld;
  2143. 191.  -       delete cur.onLoginFailedWindowOld;
  2144. 192.  -     }
  2145. 193.  -   }
  2146. 194.  -
  2147. 195.  -   if (onLoginDoneNew) {
  2148. 196.  -     if (window.onLoginDone != onLoginDoneNew) {
  2149. 197.  -       cur.onLoginDoneWindowOld = window.onLoginDone;
  2150. 198.  -       window.onLoginDone = onLoginDoneNew;
  2151. 199.  -       cur.destroy.push(restoreOnLoginDone.pbind(onLoginDoneNew));
  2152. 200.  -     }
  2153. 201.  -   } else {
  2154. 202.  -     restoreOnLoginDone(window.onLoginDone);
  2155. 203.  -   }
  2156. 204.  -
  2157. 205.  -   if (onLoginFailedNew) {
  2158. 206.  -     if (window.onLoginFailed != onLoginFailedNew) {
  2159. 207.  -       cur.onLoginFailedWindowOld = window.onLoginFailed;
  2160. 208.  -       window.onLoginFailed = onLoginFailedNew;
  2161. 209.  -       cur.destroy.push(restoreOnLoginFailed.pbind(onLoginFailedNew));
  2162. 210.  -     }
  2163. 211.  -   } else {
  2164. 212.  -     restoreOnLoginFailed(window.onLoginFailed);
  2165. 213.  -   }
  2166. 214.  - }
  2167. 215.  -
  2168. 216.  - Ads.scrollToError = function(errorElem) {
  2169. 217.  -   errorElem = ge(errorElem);
  2170. 218.  -   var scrollY = scrollGetY();
  2171. 219.  -   var errorY = getXY(errorElem)[1];
  2172. 220.  -   if (errorY < scrollY || errorY > (scrollY + lastWindowHeight / 2)) {
  2173. 221.  -     errorY -= 15;
  2174. 222.  -     scrollToY(errorY);
  2175. 223.  -   }
  2176. 224.  - }
  2177. 225.  -
  2178. 226.  - Ads.onFormEdit = function() {
  2179. 227.  -   if (window.wkcur) {
  2180. 228.  -     wkcur.noClickHide = true;
  2181. 229.  -   }
  2182. 230.  - }
  2183. 231.  -
  2184. 232.  - Ads.processNotices = function() {
  2185. 233.  -   var noticeElems = geByClass('ads_notice_important');
  2186. 234.  -   for (var i in noticeElems) {
  2187. 235.  -     animate(noticeElems[i], {backgroundColor: '#F6F7F9', borderColor: '#D8DFEA'}, 6000);
  2188. 236.  -   }
  2189. 237.  - }
  2190. 238.  -
  2191. 239.  - Ads.initFixed = function(elemWrap) {
  2192. 240.  -   elemWrap = ge(elemWrap);
  2193. 241.  -   if (!elemWrap) return;
  2194. 242.  -   var elemFixed = elemWrap.firstChild;
  2195. 243.  -   if (!elemFixed) return;
  2196. 244.  -
  2197. 245.  -   var inited = elemWrap.getAttribute('fixed_inited');
  2198. 246.  -   var positionTop = 20;
  2199. 247.  -
  2200. 248.  -   if (inited) {
  2201. 249.  -     setStyle(elemWrap, {width: '', height: ''});
  2202. 250.  -     setStyle(elemFixed, {position: 'static', top: 'auto', left: 'auto'});
  2203. 251.  -   }
  2204. 252.  -   var elemWrapSize = getSize(elemWrap);
  2205. 253.  -   if (!elemWrapSize[0] || !elemWrapSize[1]) return;
  2206. 254.  -   setStyle(elemWrap, {width: elemWrapSize[0] + 'px', height: elemWrapSize[1] + 'px'});
  2207. 255.  -
  2208. 256.  -   elemWrap.setAttribute('fixed_inited', 1);
  2209. 257.  -
  2210. 258.  -   if (!inited) {
  2211. 259.  -     var scrolledNode = browser.msie6 ? pageNode : window;
  2212. 260.  -     addEvent(scrolledNode, 'scroll', onScroll);
  2213. 261.  -     cur.destroy.push(function() { removeEvent(scrolledNode, 'scroll', onScroll); });
  2214. 262.  -   }
  2215. 263.  -
  2216. 264.  -   onScroll();
  2217. 265.  -
  2218. 266.  -   function onScroll() {
  2219. 267.  -     var elemWrapXY = getXY(elemWrap);
  2220. 268.  -     var scrollY = scrollGetY();
  2221. 269.  -     if (scrollY + positionTop < elemWrapXY[1]) {
  2222. 270.  -       setStyle(elemFixed, {position: 'static', top: 'auto', left: 'auto'});
  2223. 271.  -     } else {
  2224. 272.  -       setStyle(elemFixed, {position: 'fixed', top: positionTop, left: elemWrapXY[0]});
  2225. 273.  -     }
  2226. 274.  -   }
  2227. 275.  - }
  2228. 276.  -
  2229. 277.  - Ads.initIntroPage = function(widgetParamsMore) {
  2230. 278.  -   var widgetParams = {}
  2231. 279.  -   widgetParams.mode    = 2;
  2232. 280.  -   widgetParams.width   = 212;
  2233. 281.  -   widgetParams.height  = 340;
  2234. 282.  -   widgetParams.no_head = 1;
  2235. 283.  -   extend(widgetParams, widgetParamsMore);
  2236. 284.  -   VK.Widgets.Group('ads_intro_news_widget', widgetParams, 19542789);
  2237. 285.  - }
  2238. 286.  -
  2239. 287.  - //////////////////////////////////////////////////////////////////////
  2240. 288.  - // OLD
  2241. 289.  - //////////////////////////////////////////////////////////////////////
  2242. 290.  -
  2243. 291.  - Ads.updateUnionName = function(unionId, unionName) {
  2244. 292.  -   var elemsTitle = geByClass('title_union_name_' + unionId);
  2245. 293.  -   for (var i in elemsTitle) {
  2246. 294.  -     elemsTitle[i].innerHTML = Ads.escapeValue(unionName);
  2247. 295.  -   }
  2248. 296.  -
  2249. 297.  -   var elemNavigation = ge('ads_navigation_union_' + unionId);
  2250. 298.  -   if (elemNavigation) {
  2251. 299.  -     unionName = replaceEntities(unionName);
  2252. 300.  -     unionName = (unionName.length > 40 ? unionName.substr(0, 40) + '...' : unionName);
  2253. 301.  -     elemNavigation.innerHTML = Ads.escapeValue(unionName);
  2254. 302.  -   }
  2255. 303.  -
  2256. 304.  -   var elemGeneralInfoHeader = ge('general_info_header_name_' + unionId);
  2257. 305.  -   if (elemGeneralInfoHeader) {
  2258. 306.  -     elemGeneralInfoHeader.innerHTML = Ads.escapeValue(unionName);
  2259. 307.  -   }
  2260. 308.  - }
  2261. 309.  -
  2262. 310.  - Ads.openUnionsGeneralInfoBox = function(unionId, params) {
  2263. 311.  -   var ajaxParams = {};
  2264. 312.  -   ajaxParams.union_id = unionId;
  2265. 313.  -   var showOptions = {params: params.options || {}};
  2266. 314.  -   delete params.options;
  2267. 315.  -   ajaxParams = extend({}, ajaxParams, params);
  2268. 316.  -
  2269. 317.  -   showOptions.onFail = Ads.onBoxFail;
  2270. 318.  -   showOptions.params.width = params.from_exchange ? 315: 300;
  2271. 319.  -
  2272. 320.  -   showBox('/ads?act=a_unions_general_info_box', ajaxParams, showOptions);
  2273. 321.  - }
  2274. 322.  -
  2275. 323.  - Ads.openUnionCreateBox = function(unionId) {
  2276. 324.  -   var ajaxParams = {}
  2277. 325.  -   ajaxParams.union_id = unionId;
  2278. 326.  -
  2279. 327.  -   var showOptions = {params: {}};
  2280. 328.  -   showOptions.onFail = Ads.onBoxFail;
  2281. 329.  -   showOptions.params.width = 250;
  2282. 330.  -
  2283. 331.  -   showBox('/ads?act=a_union_create_box', ajaxParams, showOptions);
  2284. 332.  - }
  2285. 333.  -
  2286. 334.  - Ads.openDeleteUnionBox = function(unionType, unionId, hash, lock, unlock, updateStatus, newclass) {
  2287. 335.  -   var boxTitle = '';
  2288. 336.  -   var boxContent = '';
  2289. 337.  -   switch (unionType) {
  2290. 338.  -     case 'ad':
  2291. 339.  -       boxTitle = getLang('ads_archive_box_ad_title');
  2292. 340.  -       boxContent = getLang('ads_archive_box_ad_warning');
  2293. 341.  -       break;
  2294. 342.  -     case 'campaign':
  2295. 343.  -       boxTitle = getLang('ads_archive_box_campaign_title');
  2296. 344.  -       boxContent = getLang('ads_archive_box_campaign_warning');
  2297. 345.  -       break;
  2298. 346.  -     case 'client':
  2299. 347.  -       boxTitle = getLang('ads_archive_box_client_title');
  2300. 348.  -       boxContent = getLang('ads_archive_box_client_warning');
  2301. 349.  -       break;
  2302. 350.  -   }
  2303. 351.  -
  2304. 352.  -   var boxOptions = {};
  2305. 353.  -   boxOptions.title = boxTitle;
  2306. 354.  -   boxOptions.bodyStyle = 'line-height: 160%;';
  2307. 355.  -
  2308. 356.  -   cur.deleteConfirmBox = new MessageBox();
  2309. 357.  -   cur.deleteConfirmBox.setOptions(boxOptions);
  2310. 358.  -   cur.deleteConfirmBox.content(boxContent);
  2311. 359.  -   cur.deleteConfirmBox.removeButtons();
  2312. 360.  -   cur.deleteConfirmBox.addButton(getLang('box_cancel'), false, 'no');
  2313. 361.  -   cur.deleteConfirmBox.addButton(getLang('ads_archive_box_action'), function() { Ads.deleteUnion(unionType, unionId, hash, lock, unlock, updateStatus, newclass); });
  2314. 362.  -   cur.deleteConfirmBox.setControlsText('<img id="delete_union_progress" src="/images/upload.gif" style="top: 1px; display: none;">');
  2315. 363.  -   cur.deleteConfirmBox.show();
  2316. 364.  - }
  2317. 365.  -
  2318. 366.  - Ads.deleteUnion = function(unionType, unionId, hash, lock, unlock, updateStatus, newclass) {
  2319. 367.  -   if (!lockDeletion()) {
  2320. 368.  -     return;
  2321. 369.  -   }
  2322. 370.  -
  2323. 371.  -   var ajaxParams = {};
  2324. 372.  -   ajaxParams.union_id = unionId;
  2325. 373.  -   ajaxParams.hash = hash;
  2326. 374.  -   if (newclass) ajaxParams.newclass = 1;
  2327. 375.  -
  2328. 376.  -   ajax.post('/ads?act=a_union_delete', ajaxParams, {onDone: onRequestComplete, onFail: onRequestComplete});
  2329. 377.  -
  2330. 378.  -   function onRequestComplete(response) {
  2331. 379.  -     unlockDeletion();
  2332. 380.  -     if (!isObject(response) || response.error) {
  2333. 381.  -       if (!isObject(response)) {
  2334. 382.  -         showMessage(getLang('ads_error_unexpected_error_try_later'));
  2335. 383.  -       } else {
  2336. 384.  -         showMessage(response.error);
  2337. 385.  -       }
  2338. 386.  -       return true;
  2339. 387.  -     }
  2340. 388.  -     if (response && (response.ok || newclass == 2)) {
  2341. 389.  -       var completeMessage = '';
  2342. 390.  -       switch (unionType) {
  2343. 391.  -         case 'ad':       completeMessage = getLang('ads_archive_box_ad_complete'); break;
  2344. 392.  -         case 'campaign': completeMessage = getLang('ads_archive_box_campaign_complete'); break;
  2345. 393.  -         case 'client':   completeMessage = getLang('ads_archive_box_client_complete'); break;
  2346. 394.  -       }
  2347. 395.  -       if (updateStatus) {
  2348. 396.  -         if (newclass == 2) {
  2349. 397.  -           updateStatus(response);
  2350. 398.  -         } else {
  2351. 399.  -           updateStatus(response.status, response.status_class, response.status_type, response.status_variants);
  2352. 400.  -         }
  2353. 401.  -       } else {
  2354. 402.  -         showMessage(completeMessage, true, function() { nav.reload(); }, unionType);
  2355. 403.  -       }
  2356. 404.  -     }
  2357. 405.  -     return true;
  2358. 406.  -   }
  2359. 407.  -
  2360. 408.  -   function showMessage(message, isSuccess, onHide, unionType) {
  2361. 409.  -     var boxTitle = '';
  2362. 410.  -     switch (unionType) {
  2363. 411.  -       case 'ad':       boxTitle = getLang('ads_archive_box_ad_title'); break;
  2364. 412.  -       case 'campaign': boxTitle = getLang('ads_archive_box_campaign_title'); break;
  2365. 413.  -       case 'client':   boxTitle = getLang('ads_archive_box_client_title'); break;
  2366. 414.  -     }
  2367. 415.  -
  2368. 416.  -     var boxOptions = {};
  2369. 417.  -     boxOptions.title = (isSuccess ? boxTitle : '������');
  2370. 418.  -     boxOptions.width = 350;
  2371. 419.  -     boxOptions.onHide = onHide;
  2372. 420.  -     showFastBox(boxOptions, message);
  2373. 421.  -   }
  2374. 422.  -
  2375. 423.  -   function lockDeletion() {
  2376. 424.  -     if (lock) {
  2377. 425.  -       if (!lock()) {
  2378. 426.  -         return false;
  2379. 427.  -       }
  2380. 428.  -       cur.deleteConfirmBox.hide();
  2381. 429.  -     } else {
  2382. 430.  -       if (cur.deleteUnionLocked) {
  2383. 431.  -         return false;
  2384. 432.  -       }
  2385. 433.  -       cur.deleteUnionLocked = true;
  2386. 434.  -       show('delete_union_progress');
  2387. 435.  -     }
  2388. 436.  -     return true;
  2389. 437.  -   }
  2390. 438.  -   function unlockDeletion() {
  2391. 439.  -     if (unlock) {
  2392. 440.  -       unlock()
  2393. 441.  -     } else {
  2394. 442.  -       cur.deleteUnionLocked = false;
  2395. 443.  -       hide('delete_union_progress');
  2396. 444.  -     }
  2397. 445.  -   }
  2398. 446.  - }
  2399. 447.  -
  2400. 448.  - Ads.openHelpBox = function(type, unionId) {
  2401. 449.  -   var ajaxParams = {}
  2402. 450.  -   ajaxParams.type = type;
  2403. 451.  -   ajaxParams.union_id = unionId;
  2404. 452.  -
  2405. 453.  -   var showOptions = {params: {}};
  2406. 454.  -   showOptions.onFail = Ads.onBoxFail;
  2407. 455.  -   showOptions.cache = 1;
  2408. 456.  -   showOptions.params.width = 450;
  2409. 457.  -
  2410. 458.  -   showBox('/ads?act=a_help_text', ajaxParams, showOptions);
  2411. 459.  - }
  2412. 460.  -
  2413. 461.  - Ads.openCreateOfficeBox = function() {
  2414. 462.  -   var ajaxParams = {};
  2415. 463.  -
  2416. 464.  -   var showOptions = {params: {}};
  2417. 465.  -   showOptions.onFail = Ads.onBoxFail;
  2418. 466.  -   showOptions.params.width = 350;
  2419. 467.  -
  2420. 468.  -   showBox('/ads?act=a_create_office_box', ajaxParams, showOptions);
  2421. 469.  - }
  2422. 470.  -
  2423. 471.  - Ads.createExportSubmitButton = function(elem, bindingId, topUnionId) {
  2424. 472.  -   var postIframe = ce((browser.msie && browser.version < 9.0) ? '<iframe name="secret_iframe">' : 'iframe', {name: 'secret_iframe', id: 'secret_iframe'});
  2425. 473.  -   postIframe.style.display = 'none';
  2426. 474.  -   document.body.appendChild(postIframe);
  2427. 475.  -   var topUnionIdParam = (topUnionId ? '&union_id=' + topUnionId : '');
  2428. 476.  -   var postForm = ce('form', {method: 'post', action: '/ads?act=get_export_stats' + topUnionIdParam, target: 'secret_iframe'});
  2429. 477.  -   document.body.appendChild(postForm);
  2430. 478.  -   var valueNames = [
  2431. 479.  -     'group_time',
  2432. 480.  -     'group_ads',
  2433. 481.  -     'method',
  2434. 482.  -     'stats_type',
  2435. 483.  -     'from_day',
  2436. 484.  -     'from_month',
  2437. 485.  -     'from_year',
  2438. 486.  -     'to_day',
  2439. 487.  -     'to_month',
  2440. 488.  -     'to_year',
  2441. 489.  -     'Ids'
  2442. 490.  -   ];
  2443. 491.  -   var valueContainers = {};
  2444. 492.  -   for (var i = 0; i < valueNames.length; i++) {
  2445. 493.  -     var curName = valueNames[i];
  2446. 494.  -     valueContainers[curName] = ce('input', {
  2447. 495.  -       type: 'hidden',
  2448. 496.  -       id: curName + '_container_' + bindingId,
  2449. 497.  -       name: curName
  2450. 498.  -     });
  2451. 499.  -     postForm.appendChild(valueContainers[curName]);
  2452. 500.  -   }
  2453. 501.  -
  2454. 502.  -   var errorBox;
  2455. 503.  -   var action = function() {
  2456. 504.  -     var postData = {}, elem, day;
  2457. 505.  -     elem = geByClass('grouping_time_' + bindingId)[0];
  2458. 506.  -     if (!elem) return;
  2459. 507.  -     valueContainers.group_time.value = elem.getIndex();
  2460. 508.  -
  2461. 509.  -     elem = geByClass('grouping_ads_' + bindingId)[0];
  2462. 510.  -     if (!elem) return;
  2463. 511.  -     valueContainers.group_ads.value = elem.getIndex();
  2464. 512.  -
  2465. 513.  -     elem = geByClass('client_choose_' + bindingId);
  2466. 514.  -     if (elem.length > 0) {
  2467. 515.  -       elem = elem[0];
  2468. 516.  -       var curClientId = elem.getIndex();
  2469. 517.  -     }
  2470. 518.  -
  2471. 519.  -     elem = geByClass('export_method_' + bindingId)[0];
  2472. 520.  -     if (!elem) return;
  2473. 521.  -     valueContainers.method.value = elem.getIndex();
  2474. 522.  -     if (valueContainers.method.value == 3/*Web-interface*/) {
  2475. 523.  -       postForm.target = '';
  2476. 524.  -     }
  2477. 525.  -
  2478. 526.  -     elem = geByClass('stats_type_' + bindingId)[0];
  2479. 527.  -     if (!elem) return;
  2480. 528.  -     valueContainers.stats_type.value = elem.getIndex();
  2481. 529.  -
  2482. 530.  -     day = cur.exportParamsData.start_time;
  2483. 531.  -     valueContainers.from_day.value = day.day;
  2484. 532.  -     valueContainers.from_month.value = day.month;
  2485. 533.  -     valueContainers.from_year.value = day.year;
  2486. 534.  -
  2487. 535.  -     day = cur.exportParamsData.stop_time;
  2488. 536.  -     valueContainers.to_day.value = day.day;
  2489. 537.  -     valueContainers.to_month.value = day.month;
  2490. 538.  -     valueContainers.to_year.value = day.year;
  2491. 539.  -
  2492. 540.  -     if ((new Date(valueContainers.to_year.value,   valueContainers.to_month.value,   valueContainers.to_day.value)) <
  2493. 541.  -         (new Date(valueContainers.from_year.value, valueContainers.from_month.value, valueContainers.from_day.value))) {
  2494. 542.  -       showFastBox(getLang('ads_error_box_title'), getLang('ads_error_export_stat_invalid_period'));
  2495. 543.  -       return;
  2496. 544.  -     }
  2497. 545.  -
  2498. 546.  -     var ids = [];
  2499. 547.  -
  2500. 548.  -     elem = ge('paginated_table');
  2501. 549.  -     var pt = elem.tableObj;
  2502. 550.  -     var selection = pt.getSelection(0);
  2503. 551.  -     switch (parseInt(valueContainers.group_ads.value)) {
  2504. 552.  -       case 0:
  2505. 553.  -         ids.push(elem.topId);
  2506. 554.  -         break;
  2507. 555.  -       case 1:
  2508. 556.  -         for (var j = 0; j < selection.length; j++) {
  2509. 557.  -           var clId = pt.content.extra['union_id'][selection[j]];
  2510. 558.  -           ids.push(clId);
  2511. 559.  -         }
  2512. 560.  -         break;
  2513. 561.  -       case 2:
  2514. 562.  -         if (curClientId == 'aca') {
  2515. 563.  -           for (var p in elem.contentDep) {
  2516. 564.  -             if (!isNaN(Number(p))) {
  2517. 565.  -               for (var i in elem.contentDep[p].extra['union_id']) {
  2518. 566.  -                 ids.push(elem.contentDep[p].extra['union_id'][i]);
  2519. 567.  -               }
  2520. 568.  -             }
  2521. 569.  -           }
  2522. 570.  -         } else {
  2523. 571.  -           for (var i = 0; i < selection.length; i++) {
  2524. 572.  -             ids.push(pt.content.extra['union_id'][selection[i]]);
  2525. 573.  -           }
  2526. 574.  -         }
  2527. 575.  -         break;
  2528. 576.  -       case 3:
  2529. 577.  -         for (var i = 0; i < selection.length; i++) {
  2530. 578.  -           ids.push(pt.content.extra['union_id'][selection[i]]);
  2531. 579.  -         }
  2532. 580.  -         break;
  2533. 581.  -       default:
  2534. 582.  -         return;
  2535. 583.  -     }
  2536. 584.  -
  2537. 585.  -     if (ids.length == 0) {
  2538. 586.  -       showFastBox(getLang('ads_error_box_title'), getLang('ads_error_export_stat_no_campaigns_selected'));
  2539. 587.  -       return;
  2540. 588.  -
  2541. 589.  -     }
  2542. 590.  -
  2543. 591.  -     valueContainers.Ids.value = '' + ids.join(',');
  2544. 592.  -
  2545. 593.  -     postForm.submit();
  2546. 594.  -   };
  2547. 595.  -
  2548. 596.  -   createButton(elem, action);
  2549. 597.  - }
  2550. 598.  -
  2551. 599.  - Ads.createStaticDatePicker = function(elem, bindingId, classid, defaultDate) {
  2552. 600.  -   elem = ge(elem);
  2553. 601.  -   if (classid) elem.className = classid + '_' + bindingId;
  2554. 602.  -
  2555. 603.  -   var spanDay   = ce('span', {id: elem.id + '_day'}),
  2556. 604.  -       spanMonth = ce('span', {id: elem.id + '_month'});
  2557. 605.  -
  2558. 606.  -   if (!cur.exportParamsData) {
  2559. 607.  -     cur.exportParamsData = {};
  2560. 608.  -   }
  2561. 609.  -   cur.exportParamsData[classid] = defaultDate;
  2562. 610.  -
  2563. 611.  -   var params = {
  2564. 612.  -     mode: 'd',
  2565. 613.  -     day: defaultDate.day,
  2566. 614.  -     month: defaultDate.month,
  2567. 615.  -     year: defaultDate.year,
  2568. 616.  -     width: 124,
  2569. 617.  -     pastActive: true,
  2570. 618.  -     onUpdate: function(d, m) {
  2571. 619.  -       if (m == 'h') {
  2572. 620.  -         cur.exportParamsData[classid].day = defaultDate.day;
  2573. 621.  -         cur.exportParamsData[classid].month = defaultDate.month;
  2574. 622.  -         cur.exportParamsData[classid].year = defaultDate.year;
  2575. 623.  -         return;
  2576. 624.  -       }
  2577. 625.  -       if (m == 'd') {
  2578. 626.  -         cur.exportParamsData[classid].day = d.d;
  2579. 627.  -       } else if (m == 'm') {
  2580. 628.  -         cur.exportParamsData[classid].day = 1;
  2581. 629.  -       }
  2582. 630.  -       cur.exportParamsData[classid].month = d.m;
  2583. 631.  -       cur.exportParamsData[classid].year = d.y;
  2584. 632.  -     }
  2585. 633.  -   };
  2586. 634.  -
  2587. 635.  -   if (!cur.exportUi) {
  2588. 636.  -     cur.exportUi = {};
  2589. 637.  -   }
  2590. 638.  -   cur.exportUi[classid] = new Datepicker(elem, params);
  2591. 639.  - }
  2592. 640.  -
  2593. 641.  - Ads.openInnerTable = function(id, bindingId) {
  2594. 642.  -   if (!id) id = 'acl';
  2595. 643.  -
  2596. 644.  -   var tab = ge('paginated_table');
  2597. 645.  -
  2598. 646.  -   var newOptions;
  2599. 647.  -   switch (id) {
  2600. 648.  -     case 'cli':
  2601. 649.  -       newOptions = tab.optionsDep['cli'];
  2602. 650.  -       break;
  2603. 651.  -     case 'aca':
  2604. 652.  -     case 'acl':
  2605. 653.  -       newOptions = tab.optionsDep['default'];
  2606. 654.  -       break;
  2607. 655.  -     default:
  2608. 656.  -       newOptions = tab.optionsDep['cam'];
  2609. 657.  -       break;
  2610. 658.  -   }
  2611. 659.  -
  2612. 660.  -   if (id in tab.contentDep && tab.contentDep[id]) {
  2613. 661.  -     var newContent = tab.contentDep[id];
  2614. 662.  -     tab.tableObj.setOptions(newOptions);
  2615. 663.  -     tab.tableObj.setContent(newContent);
  2616. 664.  -     tab.tableObj.applyData();
  2617. 665.  -   } else {
  2618. 666.  -     function onDone(data) {
  2619. 667.  -       var newContent = data;
  2620. 668.  -       tab.contentDep[id] = newContent;
  2621. 669.  -       tab.tableObj.setOptions(newOptions);
  2622. 670.  -       tab.tableObj.setContent(newContent);
  2623. 671.  -       tab.tableObj.applyData();
  2624. 672.  -       hide('getting_campaigns_upload');
  2625. 673.  -     }
  2626. 674.  -     function onFail() {
  2627. 675.  -       hide('getting_campaigns_upload');
  2628. 676.  -       return true;
  2629. 677.  -     };
  2630. 678.  -     show('getting_campaigns_upload');
  2631. 679.  -     ajax.post('/ads?act=a_get_client_children', {client_id: id}, {onDone: onDone, onFail: onFail});
  2632. 680.  -   }
  2633. 681.  - }
  2634. 682.  -
  2635. 683.  - Ads.createStaticDropdownMenuAds = function(elem, bindingId, values, params) {
  2636. 684.  -   elem = ge(elem);
  2637. 685.  -
  2638. 686.  -   if (params.classname) elem.className = params.classname + '_' + bindingId;
  2639. 687.  -   elem.className = elem.className + ' dd_link';
  2640. 688.  -
  2641. 689.  -   elem.valueList = values;
  2642. 690.  -   elem.getValue = function() {return elem.value;}
  2643. 691.  -   elem.getIndex = function() {
  2644. 692.  -     if (elem.index !== undefined) return elem.index;
  2645. 693.  -
  2646. 694.  -     for (var i = 0; i < elem.valueList.length; i++) {
  2647. 695.  -       if (elem.valueList[i][1] == elem.value) {
  2648. 696.  -         return elem.valueList[i][0];
  2649. 697.  -       }
  2650. 698.  -     }
  2651. 699.  -     return -1;
  2652. 700.  -   }
  2653. 701.  -
  2654. 702.  -   if (params.classname == 'client_choose') {
  2655. 703.  -     onDomReady(function() {
  2656. 704.  -       hide(geByClass('client_choose_row_' + bindingId)[0]);
  2657. 705.  -     });
  2658. 706.  -   }
  2659. 707.  -   params.updateHeader = function(i, t) {
  2660. 708.  -     if (!i) i = 'aca';
  2661. 709.  -     Ads.openInnerTable(i, bindingId);
  2662. 710.  -     elem.index = i;
  2663. 711.  -     elem.value = t;
  2664. 712.  -     return t;
  2665. 713.  -   }
  2666. 714.  -   params.onSelect = function(value) {
  2667. 715.  -     if (value === undefined) value = uiDropdown.val();
  2668. 716.  -     elem.value = value;
  2669. 717.  -     elem.innerHTML = value;
  2670. 718.  -   };
  2671. 719.  -   params.target = elem;
  2672. 720.  -   params.showHover = true;
  2673. 721.  -   //params.alwaysMenuToUp = true;
  2674. 722.  -
  2675. 723.  -   params.onSelect(values[0][1]);
  2676. 724.  -
  2677. 725.  -   elem.uiDropdown = new DropdownMenu(values, params);
  2678. 726.  -   Ads.makeDDScrollable(elem.uiDropdown);
  2679. 727.  - }
  2680. 728.  -
  2681. 729.  - // threshold is height of container
  2682. 730.  - Ads.makeDDScrollable = function(dd, threshold) {
  2683. 731.  -   if (!dd) return;
  2684. 732.  -   if (threshold === undefined) {
  2685. 733.  -     threshold = 300;
  2686. 734.  -   }
  2687. 735.  -
  2688. 736.  -   var uiBody = dd.body,
  2689. 737.  -       uiTable = geByClass('dd_menu_rows', uiBody)[0].firstChild,
  2690. 738.  -       uiTableS = getSize(uiBody),
  2691. 739.  -       uiTableW = uiTableS[0],
  2692. 740.  -       uiTableH = uiTableS[1] - 4, // dont understand why
  2693. 741.  -       barW = 6,
  2694. 742.  -       barH = Math.max(20, intval(threshold * threshold / uiTableH)),
  2695. 743.  -       scrollBar = ce('div', {className: 'ads_dropdown_menu_scrollbar'}, {
  2696. 744.  -         top: barH / 10,
  2697. 745.  -         right: 3,
  2698. 746.  -         width: barW,
  2699. 747.  -         height: barH
  2700. 748.  -       });
  2701. 749.  -
  2702. 750.  -   if (uiTableH < threshold) {
  2703. 751.  -     return;
  2704. 752.  -   }
  2705. 753.  -
  2706. 754.  -   setStyle(uiTable.parentNode, {
  2707. 755.  -     overflowY: 'hidden',
  2708. 756.  -     height: threshold
  2709. 757.  -   });
  2710. 758.  -   uiBody.appendChild(scrollBar);
  2711. 759.  -   setStyle(uiTable, 'position', 'relative');
  2712. 760.  -
  2713. 761.  -   var startY = null,
  2714. 762.  -       startTop = 0,
  2715. 763.  -       hoverState = 0,
  2716. 764.  -       hoverTimer = null;
  2717. 765.  -   var onScroll = function(e) {
  2718. 766.  -     var oldTop = parseFloat(getStyle(uiTable, 'top'));
  2719. 767.  -     if (isNaN(oldTop)) {
  2720. 768.  -       oldTop = 0;
  2721. 769.  -     }
  2722. 770.  -
  2723. 771.  -     var delta = e.wheelDelta ? e.wheelDelta / 120 : -e.detail / 3;
  2724. 772.  -     scrollBody(oldTop + delta * 20);
  2725. 773.  -
  2726. 774.  -     if (hoverTimer) {
  2727. 775.  -       clearTimeout(hoverTimer);
  2728. 776.  -     } else {
  2729. 777.  -       doHover(1);
  2730. 778.  -     }
  2731. 779.  -     hoverTimer = setTimeout(function() {
  2732. 780.  -       hoverTimer = null;
  2733. 781.  -       doHover(-1);
  2734. 782.  -       }, 200);
  2735. 783.  -
  2736. 784.  -     cancelEvent(e);
  2737. 785.  -     return false;
  2738. 786.  -   }
  2739. 787.  -   var onMouseMove = function(e) {
  2740. 788.  -     if (startY === null) return;
  2741. 789.  -     var y = e.pageY;
  2742. 790.  -     var localD = startY - y,
  2743. 791.  -         delta = 1.0 * localD * (uiTableH - threshold) / (threshold - barH - 5);
  2744. 792.  -     scrollBody(startTop + delta);
  2745. 793.  -   }
  2746. 794.  -   var scrollBody = function(newTop) {
  2747. 795.  -     newTop = Math.min(0, newTop);
  2748. 796.  -     newTop = Math.max(-uiTableH + threshold, newTop);
  2749. 797.  -
  2750. 798.  -     var barTop = 3 - 1.0 * newTop / (uiTableH - threshold) * (threshold - barH - 5);
  2751. 799.  -     setStyle(uiTable, 'top', newTop);
  2752. 800.  -     setStyle(scrollBar, 'top', barTop);
  2753. 801.  -   }
  2754. 802.  -   var onDown = function(e) {
  2755. 803.  -     startY = e.pageY;
  2756. 804.  -     startTop = parseFloat(getStyle(uiTable, 'top'));
  2757. 805.  -     if (isNaN(startTop)) startTop = 0;
  2758. 806.  -
  2759. 807.  -     doHover(1);
  2760. 808.  -     cancelEvent(e);
  2761. 809.  -   }
  2762. 810.  -   var onUp = function(e) {
  2763. 811.  -     if (startY !== null) {
  2764. 812.  -       doHover(-1);
  2765. 813.  -     }
  2766. 814.  -     startY = null;
  2767. 815.  -   }
  2768. 816.  -   var doHover = function(dh) {
  2769. 817.  -     hoverState += dh;
  2770. 818.  -     if (hoverState == 0) removeClass(scrollBar, 'hovered');
  2771. 819.  -     if (hoverState == 1) addClass(scrollBar, 'hovered');
  2772. 820.  -   }
  2773. 821.  -
  2774. 822.  -   dd.options.onShow = function() {
  2775. 823.  -     scrollBody(100000);
  2776. 824.  -   }
  2777. 825.  -   addEvent(uiBody, 'mousewheel DOMMouseScroll', onScroll);
  2778. 826.  -   addEvent(scrollBar, 'mousedown', onDown);
  2779. 827.  -   addEvent(document.body, 'mouseup dragend', onUp);
  2780. 828.  -   addEvent(uiBody, 'mousemove', onMouseMove);
  2781. 829.  -
  2782. 830.  -   cur.destroy.push(function() {
  2783. 831.  -     removeEvent(uiBody, 'mousewheel DOMMouseScroll', onScroll);
  2784. 832.  -     removeEvent(scrollBar, 'mousedown', onDown);
  2785. 833.  -     removeEvent(document.body, 'mouseup dragend', onUp);
  2786. 834.  -     removeEvent(uiBody, 'mousemove', onMouseMove);
  2787. 835.  -   });
  2788. 836.  - }
  2789. 837.  -
  2790. 838.  - // params must be ready to go to contructor
  2791. 839.  - Ads.createStaticDropdown = function(elem, bindingId, values, params) {
  2792. 840.  -   elem = ge(elem);
  2793. 841.  -   if (params.classname) elem.className = params.classname + '_' + bindingId;
  2794. 842.  -   elem.className = elem.className + ' dd_link';
  2795. 843.  -
  2796. 844.  -   elem.valueList = values;
  2797. 845.  -   elem.getValue = function() {return elem.value;}
  2798. 846.  -   elem.getIndex = function() {
  2799. 847.  -     if (elem.index !== undefined) return elem.index;
  2800. 848.  -
  2801. 849.  -     for (var i = 0; i < elem.valueList.length; i++) {
  2802. 850.  -       if (elem.valueList[i][1] == elem.value) {
  2803. 851.  -         return elem.valueList[i][0];
  2804. 852.  -       }
  2805. 853.  -     }
  2806. 854.  -     return -1;
  2807. 855.  -   }
  2808. 856.  -
  2809. 857.  -   if (params.classname == 'client_choose') {
  2810. 858.  -     onDomReady(function() {
  2811. 859.  -       hide(geByClass('client_choose_row_' + bindingId)[0]);
  2812. 860.  -     });
  2813. 861.  -   }
  2814. 862.  -
  2815. 863.  -   params.updateHeader = function(i, t) {
  2816. 864.  -     if (!i) i = 0;
  2817. 865.  -     //
  2818. 866.  -     // grouping_time
  2819. 867.  -     //
  2820. 868.  -     if (elem.className.substring(0, 'grouping_time'.length) == 'grouping_time') {
  2821. 869.  -       var modes = ['d', 'm', 'h'];
  2822. 870.  -       cur.exportUi['start_time'].setMode(modes[i]);
  2823. 871.  -       cur.exportUi['stop_time'].setMode(modes[i]);
  2824. 872.  -     } else
  2825. 873.  -     //
  2826. 874.  -     // client_choose
  2827. 875.  -     //
  2828. 876.  -     if (elem.className.substring(0, 'client_choose'.length) == 'client_choose') {
  2829. 877.  -       if (!i) i = 'aca';
  2830. 878.  -       Ads.openInnerTable(i, bindingId);
  2831. 879.  -     } else
  2832. 880.  -     //
  2833. 881.  -     // grouping_ads
  2834. 882.  -     //
  2835. 883.  -     if (elem.className.substring(0, 'grouping_ads'.length) == 'grouping_ads') {
  2836. 884.  -       var label_el;
  2837. 885.  -       switch (i) {
  2838. 886.  -         case 0:
  2839. 887.  -           hide(geByClass('client_choose_row_' + bindingId)[0]);
  2840. 888.  -           Ads.openInnerTable('acl', bindingId);
  2841. 889.  -
  2842. 890.  -           label_el = ge('unions_table_label_' + bindingId);
  2843. 891.  -           label_el.innerHTML = getLang('ads_export_stat_data_title_campaigns');
  2844. 892.  -           break;
  2845. 893.  -         case 1:
  2846. 894.  -           hide(geByClass('client_choose_row_' + bindingId)[0]);
  2847. 895.  -           Ads.openInnerTable('cli', bindingId);
  2848. 896.  -
  2849. 897.  -           label_el = ge('unions_table_label_' + bindingId);
  2850. 898.  -           label_el.innerHTML = getLang('ads_export_stat_data_title_clients');
  2851. 899.  -           break;
  2852. 900.  -         case 2:
  2853. 901.  -           var chser = geByClass('client_choose_' + bindingId)[0];
  2854. 902.  -           var dd = chser.uiDropdown;
  2855. 903.  -
  2856. 904.  -           var text = dd.options.updateHeader(0, chser.valueList[0][1]);
  2857. 905.  -           dd.header.innerHTML = '<div>' + text + '</div>';
  2858. 906.  -           if (dd.options.target) dd.options.target.innerHTML = text;
  2859. 907.  -
  2860. 908.  -           show(geByClass('client_choose_row_' + bindingId)[0]);
  2861. 909.  -           Ads.openInnerTable('aca', bindingId);
  2862. 910.  -
  2863. 911.  -           label_el = ge('unions_table_label_' + bindingId);
  2864. 912.  -           label_el.innerHTML = getLang('ads_export_stat_data_title_campaigns');
  2865. 913.  -           break;
  2866. 914.  -         case 3:
  2867. 915.  -           Ads.openInnerTable('cam', bindingId);
  2868. 916.  -         default:
  2869. 917.  -           break;
  2870. 918.  -       }
  2871. 919.  -     }
  2872. 920.  -
  2873. 921.  -     elem.index = i;
  2874. 922.  -     elem.value = t;
  2875. 923.  -     return t;
  2876. 924.  -   }
  2877. 925.  -   params.onSelect = function(value) {
  2878. 926.  -     if (value === undefined) value = uiDropdown.val();
  2879. 927.  -     elem.value = value;
  2880. 928.  -     elem.innerHTML = value;
  2881. 929.  -   };
  2882. 930.  -   params.target = elem;
  2883. 931.  -   params.showHover = true;
  2884. 932.  -   //params.alwaysMenuToUp = true;
  2885. 933.  -
  2886. 934.  -   params.onSelect(values[0][1]);
  2887. 935.  -
  2888. 936.  -   elem.uiDropdown = new DropdownMenu(values, params);
  2889. 937.  - }
  2890. 938.  -
  2891. 939.  - Ads.createInlineStaticEdit = function(editElem, bindingId, params) {
  2892. 940.  -   if (!params) params = {};
  2893. 941.  -   editElem = ge(editElem);
  2894. 942.  -   if (params.classname) editElem.className = params.classname + '_' + bindingId;
  2895. 943.  -
  2896. 944.  -   var uiTimeDay, uiTimeMonth, uiTimeYear, uiAbstractDropdown;
  2897. 945.  -
  2898. 946.  -   if (!params['type'] && !params['values']) return false;
  2899. 947.  -
  2900. 948.  -   var defaultValue;
  2901. 949.  -   if (params['default']) {
  2902. 950.  -     defaultValue = params['default'];
  2903. 951.  -   }
  2904. 952.  -
  2905. 953.  -   var type = params['type'] || 'dropdown';
  2906. 954.  -
  2907. 955.  -   switch (type) {
  2908. 956.  -     case 'dropdown':
  2909. 957.  -       if (params['values'] === undefined) {
  2910. 958.  -         return false;
  2911. 959.  -       }
  2912. 960.  -       if (defaultValue === undefined) {
  2913. 961.  -         defaultValue = 0;
  2914. 962.  -       }
  2915. 963.  -       break;
  2916. 964.  -     case 'time':
  2917. 965.  -       break;
  2918. 966.  -     default:
  2919. 967.  -       break;
  2920. 968.  -   }
  2921. 969.  -
  2922. 970.  -   monthNames = [
  2923. 971.  -     getLang('ads_jan'),
  2924. 972.  -     getLang('ads_feb'),
  2925. 973.  -     getLang('ads_mar'),
  2926. 974.  -     getLang('ads_apr'),
  2927. 975.  -     getLang('ads_may'),
  2928. 976.  -     getLang('ads_jun'),
  2929. 977.  -     getLang('ads_jul'),
  2930. 978.  -     getLang('ads_aug'),
  2931. 979.  -     getLang('ads_sep'),
  2932. 980.  -     getLang('ads_oct'),
  2933. 981.  -     getLang('ads_nov'),
  2934. 982.  -     getLang('ads_dec')
  2935. 983.  -   ];
  2936. 984.  -   saveValue(defaultValue);
  2937. 985.  -
  2938. 986.  -   function saveValue(newValue) {
  2939. 987.  -     editElem.value = newValue;
  2940. 988.  -
  2941. 989.  -     var newText = '';
  2942. 990.  -     switch (type) {
  2943. 991.  -       case 'time':
  2944. 992.  -         if (newValue && newValue.day && newValue.month && newValue.year) {
  2945. 993.  -           newText = newValue.day + ' ' + monthNames[newValue.month - 1] + ' ' + newValue.year;
  2946. 994.  -         }
  2947. 995.  -         break;
  2948. 996.  -       case 'dropdown':
  2949. 997.  -         if (parseInt(newValue) !== undefined) {
  2950. 998.  -           newText = params['values'][parseInt(newValue)];
  2951. 999.  -         } else
  2952. 1000.  -         if (typeof newValue == 'string') {
  2953. 1001.  -           newText = newValue;
  2954. 1002.  -         }  else {
  2955. 1003.  -           for (var index in newValue) {
  2956. 1004.  -             saveValue.call(this, newValue[index]);
  2957. 1005.  -             return;
  2958. 1006.  -           }
  2959. 1007.  -         }
  2960. 1008.  -         break;
  2961. 1009.  -       default:
  2962. 1010.  -         break;
  2963. 1011.  -     }
  2964. 1012.  -
  2965. 1013.  -     applyNewValue.call(this, newValue, newText);
  2966. 1014.  -   }
  2967. 1015.  -   function applyNewValue(newValue, newText) {
  2968. 1016.  -     editElem.value = newValue;
  2969. 1017.  -     editElem.innerHTML = newText;
  2970. 1018.  -   }
  2971. 1019.  -   function checkValue(value) {
  2972. 1020.  -     return true;
  2973. 1021.  -   }
  2974. 1022.  -   function showLongError(error) {
  2975. 1023.  -     showFastBox(getLang('ads_error_box_title'), error);
  2976. 1024.  -   }
  2977. 1025.  -   function updateTimeDays(month) {
  2978. 1026.  -     uiTimeDay.setData(getDays(month));
  2979. 1027.  -   }
  2980. 1028.  -
  2981. 1029.  -   //
  2982. 1030.  -   // Helpers
  2983. 1031.  -   //
  2984. 1032.  -   function getDays(month, year) {
  2985. 1033.  -     var ret = [], days = [0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
  2986. 1034.  -     if (!year) year = (new Date()).getFullYear();
  2987. 1035.  -     if (month == 2 && year % 4 == 0) {
  2988. 1036.  -       days[2] = 29
  2989. 1037.  -     }
  2990. 1038.  -     for (var i = 1, days = days[month]; i <= days; i++) {
  2991. 1039.  -       ret.push(i);
  2992. 1040.  -     }
  2993. 1041.  -     return ret;
  2994. 1042.  -   }
  2995. 1043.  -   function getMonths() {
  2996. 1044.  -     var months = [];
  2997. 1045.  -     for (var i = 1; i <= 12; i++) {
  2998. 1046.  -       months.push([i, monthNames[i - 1]]);
  2999. 1047.  -     }
  3000. 1048.  -     return months;
  3001. 1049.  -   }
  3002. 1050.  -   function getYears() {
  3003. 1051.  -     var ret = [];
  3004. 1052.  -     var curY = (new Date()).getFullYear();
  3005. 1053.  -     for (var i = curY; i >= curY - 10; i--) {
  3006. 1054.  -       ret.push(i);
  3007. 1055.  -     }
  3008. 1056.  -     return ret;
  3009. 1057.  -   }
  3010. 1058.  -   function getAssocFromValues(array) {
  3011. 1059.  -     var res = [];
  3012. 1060.  -     for (var i = 0; i < array.length; i++) {
  3013. 1061.  -       res.push([i, array[i]]);
  3014. 1062.  -     }
  3015. 1063.  -     return res;
  3016. 1064.  -   }
  3017. 1065.  -
  3018. 1066.  -   //
  3019. 1067.  -   // Events
  3020. 1068.  -   //
  3021. 1069.  -   function afterInit() {
  3022. 1070.  -     var self = this;
  3023. 1071.  -
  3024. 1072.  -     switch (type) {
  3025. 1073.  -       case 'time':
  3026. 1074.  -         uiTimeDay = new Dropdown(
  3027. 1075.  -           geByClass('inline_time_day', this.contentTable)[0],
  3028. 1076.  -           getDays(1),
  3029. 1077.  -           {width: 45, height: 150, selectedItem: 1}
  3030. 1078.  -         );
  3031. 1079.  -         uiTimeMonth = new Dropdown(
  3032. 1080.  -           geByClass('inline_time_month', this.contentTable)[0],
  3033. 1081.  -           getMonths(),
  3034. 1082.  -           {width: 80, height: 150, selectedItem: 1, onChange: function(value) { updateTimeDays.call(this, value); }}
  3035. 1083.  -         );
  3036. 1084.  -         uiTimeYear = new Dropdown(
  3037. 1085.  -           geByClass('inline_time_year', this.contentTable)[0],
  3038. 1086.  -           getYears(),
  3039. 1087.  -           {width: 65, height: 150, selectedItem: (new Date()).getFullYear()}
  3040. 1088.  -         );
  3041. 1089.  -         break;
  3042. 1090.  -
  3043. 1091.  -       case 'dropdown':
  3044. 1092.  -         uiAbstractDropdown = new Dropdown(
  3045. 1093.  -           geByClass('ads_inline_dropdown', this.contentTable)[0],
  3046. 1094.  -           getAssocFromValues(params['values']),
  3047. 1095.  -           {height: 150, selectedItem: 0}
  3048. 1096.  -         );
  3049. 1097.  -         break;
  3050. 1098.  -
  3051. 1099.  -       default:
  3052. 1100.  -         break;
  3053. 1101.  -     }
  3054. 1102.  -   }
  3055. 1103.  -   function onBeforeShow() {
  3056. 1104.  -     switch (type) {
  3057. 1105.  -       case 'time':
  3058. 1106.  -         if (defaultValue && defaultValue.day && defaultValue.month && defaultValue.year) {
  3059. 1107.  -           uiTimeDay.val(defaultValue.day);
  3060. 1108.  -           uiTimeMonth.val(defaultValue.month);
  3061. 1109.  -           uiTimeYear.val(defaultValue.year);
  3062. 1110.  -         } else {
  3063. 1111.  -           editElem.innerHTML = "�� ������";
  3064. 1112.  -         }
  3065. 1113.  -         break;
  3066. 1114.  -
  3067. 1115.  -       case 'dropdown':
  3068. 1116.  -         uiAbstractDropdown.val(defaultValue);
  3069. 1117.  -         break;
  3070. 1118.  -
  3071. 1119.  -       default:
  3072. 1120.  -         break;
  3073. 1121.  -     }
  3074. 1122.  -   }
  3075. 1123.  -   function onShow() {
  3076. 1124.  -   }
  3077. 1125.  -   function onConfirm() {
  3078. 1126.  -     var newValue;
  3079. 1127.  -     if (type == 'time') {
  3080. 1128.  -       newValue = {};
  3081. 1129.  -       newValue.day   = uiTimeDay.val();
  3082. 1130.  -       newValue.month = uiTimeMonth.val();
  3083. 1131.  -       newValue.year  = uiTimeYear.val();
  3084. 1132.  -     } else
  3085. 1133.  -     if (type == 'dropdown') {
  3086. 1134.  -       newValue = uiAbstractDropdown.val();
  3087. 1135.  -     }
  3088. 1136.  -
  3089. 1137.  -     saveValue.call(this, newValue);
  3090. 1138.  -     return true;
  3091. 1139.  -   }
  3092. 1140.  -
  3093. 1141.  -   var options = {
  3094. 1142.  -     afterInit: afterInit,
  3095. 1143.  -     onBeforeShow: onBeforeShow,
  3096. 1144.  -     onShow: onShow,
  3097. 1145.  -     onConfirm: onConfirm
  3098. 1146.  -   };
  3099. 1147.  -
  3100. 1148.  -   switch (type) {
  3101. 1149.  -     case 'time':
  3102. 1150.  -       options.contentHTML =
  3103. 1151.  -         '<tr>' +
  3104. 1152.  -         '<td colspan="2">' +
  3105. 1153.  -         '<table class="ads_inline_edit_table">' +
  3106. 1154.  -         '<tr>' +
  3107. 1155.  -           '<td style="white-space: nowrap; width: 200px;">' +
  3108. 1156.  -             '<table class="ads_inline_edit_table">' +
  3109. 1157.  -             '<tr>' +
  3110. 1158.  -               '<td style="padding-right: 5px;"><input type="text" class="inline_time_day text" style="width: 30px;" /></td>' +
  3111. 1159.  -               '<td style="padding-right: 5px;"><input type="text" class="inline_time_month text" style="width: 30px;" /></td>' +
  3112. 1160.  -               '<td style="padding-right: 5px;"><input type="text" class="inline_time_year text" style="width: 30px;" /></td>' +
  3113. 1161.  -             '</tr>' +
  3114. 1162.  -             '</table>' +
  3115. 1163.  -           '</td>' +
  3116. 1164.  -         '</tr>' +
  3117. 1165.  -         '</table>' +
  3118. 1166.  -         '</td>' +
  3119. 1167.  -         '</tr>';
  3120. 1168.  -       break;
  3121. 1169.  -     case 'dropdown':
  3122. 1170.  -       options.contentHTML =
  3123. 1171.  -         '<tr>' +
  3124. 1172.  -         '<td colspan="2">' +
  3125. 1173.  -         '<table class="ads_inline_edit_table" style="width: 100%;">' +
  3126. 1174.  -           '<tr><td><input type="text" class="ads_inline_dropdown text" /></td></tr>' +
  3127. 1175.  -         '</table>' +
  3128. 1176.  -         '</td>' +
  3129. 1177.  -         '</tr>';
  3130. 1178.  -       break;
  3131. 1179.  -     default:
  3132. 1180.  -       break;
  3133. 1181.  -   }
  3134. 1182.  -
  3135. 1183.  -   new InlineEdit(editElem, options);
  3136. 1184.  - }
  3137. 1185.  -
  3138. 1186.  - Ads.onInlineEditClick = function(elem, callback, rown, coln) {
  3139. 1187.  -   var _t = this;
  3140. 1188.  -
  3141. 1189.  -   var editElem = elem,
  3142. 1190.  -       progressElem = _t.content.extra.progress_elem[rown][coln],
  3143. 1191.  -       unionId = _t.content.extra.union_id[rown][coln],
  3144. 1192.  -       unionType = _t.content.extra.union_type[rown][coln],
  3145. 1193.  -       valueType = _t.content.extra.value_type[rown][coln],
  3146. 1194.  -       initValue = _t.content.extra.init_value[rown][coln],
  3147. 1195.  -       hash = _t.content.extra.hash[rown][coln],
  3148. 1196.  -       additionalParams = extend(_t.content.extra.additional_params[rown][coln], {
  3149. 1197.  -         valCallback: function(val) {
  3150. 1198.  -           callback({
  3151. 1199.  -             value: val,
  3152. 1200.  -             extra: {
  3153. 1201.  -               init_value: val
  3154. 1202.  -             }
  3155. 1203.  -           });
  3156. 1204.  -         }
  3157. 1205.  -       });
  3158. 1206.  -
  3159. 1207.  -   var ret = Ads.createInlineEdit(editElem, progressElem, unionType, unionId, valueType, initValue, hash, additionalParams);
  3160. 1208.  -   ret.obj.show();
  3161. 1209.  - }
  3162. 1210.  -
  3163. 1211.  - Ads.createInlineEdit = function(editElem, progressElem, unionType, unionId, valueType, initValue, hash, additionalParams) {
  3164. 1212.  -   editElem     = ge(editElem);
  3165. 1213.  -   progressElem = ge(progressElem);
  3166. 1214.  -   var defaultValue = initValue;
  3167. 1215.  -   var bad_this = this;
  3168. 1216.  -
  3169. 1217.  -   var uiTimeDay, uiTimeMonth, uiTimeHour;
  3170. 1218.  -
  3171. 1219.  -   var valueGeneralType;
  3172. 1220.  -   switch (valueType) {
  3173. 1221.  -     case 'cost_per_click':
  3174. 1222.  -       valueGeneralType = 'cost_per_click';
  3175. 1223.  -       break;
  3176. 1224.  -     case 'day_limit':
  3177. 1225.  -     case 'month_limit':
  3178. 1226.  -     case 'all_limit':
  3179. 1227.  -     case 'contract_limit':
  3180. 1228.  -       valueGeneralType = 'limit';
  3181. 1229.  -       break;
  3182. 1230.  -     case 'start_time':
  3183. 1231.  -     case 'stop_time':
  3184. 1232.  -       valueGeneralType = 'time';
  3185. 1233.  -       break;
  3186. 1234.  -     default:
  3187. 1235.  -       valueGeneralType = 'text';
  3188. 1236.  -       break;
  3189. 1237.  -   }
  3190. 1238.  -
  3191. 1239.  -   function saveValue(newValue, isRemoveValue) {
  3192. 1240.  -
  3193. 1241.  -     if (valueGeneralType == 'limit') {
  3194. 1242.  -       if ((!isRemoveValue && defaultValue == newValue) || (isRemoveValue && defaultValue == 0)) {
  3195. 1243.  -         if (isRemoveValue) {
  3196. 1244.  -           this.hide();
  3197. 1245.  -         }
  3198. 1246.  -         return;
  3199. 1247.  -       }
  3200. 1248.  -     } else {
  3201. 1249.  -       if (defaultValue == newValue) {
  3202. 1250.  -         return;
  3203. 1251.  -       }
  3204. 1252.  -     }
  3205. 1253.  -
  3206. 1254.  -     var unknownError = getLang('ads_error_unexpected_error_try_later');
  3207. 1255.  -
  3208. 1256.  -     var params = {};
  3209. 1257.  -     params.union_id = unionId;
  3210. 1258.  -     params.hash = hash;
  3211. 1259.  -     extend(params, additionalParams);
  3212. 1260.  -
  3213. 1261.  -     if (isRemoveValue) {
  3214. 1262.  -       params[valueType] = 0;
  3215. 1263.  -     } else {
  3216. 1264.  -       if (valueGeneralType == 'time') {
  3217. 1265.  -         params[valueType + '_day'] = newValue.day;
  3218. 1266.  -         params[valueType + '_month'] = newValue.month;
  3219. 1267.  -         params[valueType + '_hour'] = newValue.hour;
  3220. 1268.  -       } else {
  3221. 1269.  -         params[valueType] = newValue;
  3222. 1270.  -       }
  3223. 1271.  -     }
  3224. 1272.  -
  3225. 1273.  -     var self = this;
  3226. 1274.  -
  3227. 1275.  -     function onAjaxComplete(response) {
  3228. 1276.  -       if (isObject(response)) {
  3229. 1277.  -         if (response.error) {
  3230. 1278.  -           showLongError.call(self, response.error);
  3231. 1279.  -         } else if (!response.not_changed) {
  3232. 1280.  -           if ((valueType + '_value') in response) {
  3233. 1281.  -             applyNewValue.call(self, response[valueType + '_value'], response[valueType + '_text']);
  3234. 1282.  -           } else if (response[valueType + '_value_day']) {
  3235. 1283.  -             var newValue = {};
  3236. 1284.  -             newValue.day   = response[valueType + '_value_day'];
  3237. 1285.  -             newValue.month = response[valueType + '_value_month'];
  3238. 1286.  -             newValue.hour  = response[valueType + '_value_hour'];
  3239. 1287.  -             applyNewValue.call(self, newValue, response[valueType + '_text']);
  3240. 1288.  -           } else {
  3241. 1289.  -             showLongError.call(self, unknownError);
  3242. 1290.  -           }
  3243. 1291.  -         }
  3244. 1292.  -       } else {
  3245. 1293.  -         showLongError.call(self, unknownError);
  3246. 1294.  -       }
  3247. 1295.  -
  3248. 1296.  -       hide(progressElem);
  3249. 1297.  -       show(editElem);
  3250. 1298.  -
  3251. 1299.  -       return true;
  3252. 1300.  -     }
  3253. 1301.  -     ajax.post('/ads?act=a_unions_general_info_save', params, {onDone: onAjaxComplete, onFail: onAjaxComplete});
  3254. 1302.  -
  3255. 1303.  -     hide(editElem);
  3256. 1304.  -     show(progressElem);
  3257. 1305.  -     if (isRemoveValue) {
  3258. 1306.  -       this.hide();
  3259. 1307.  -     }
  3260. 1308.  -   }
  3261. 1309.  -   function applyNewValue(newValue, newText) {
  3262. 1310.  -     if (valueType == 'name') {
  3263. 1311.  -       Ads.updateUnionName(unionId, newText);
  3264. 1312.  -     }
  3265. 1313.  -     defaultValue = newValue;
  3266. 1314.  -     if (additionalParams.valCallback) {
  3267. 1315.  -       additionalParams.valCallback(newValue);
  3268. 1316.  -     } else {
  3269. 1317.  -       editElem.innerHTML = newText;
  3270. 1318.  -     }
  3271. 1319.  -   }
  3272. 1320.  -   function checkValue(value) {
  3273. 1321.  -     switch (valueGeneralType) {
  3274. 1322.  -       case 'cost_per_click':
  3275. 1323.  -         if (value == '' || value == '0' || value == 0) {
  3276. 1324.  -           return (additionalParams.is_cost_per_click ? getLang('ads_error_cost_per_click_no_value') : getLang('ads_error_cost_per_views_no_value'));
  3277. 1325.  -         }
  3278. 1326.  -         if (!value.match(/[0-9.,]/)) {
  3279. 1327.  -           return (additionalParams.is_cost_per_click ? getLang('ads_error_cost_per_click_invalid_value') : getLang('ads_error_cost_per_views_invalid_value'));
  3280. 1328.  -         }
  3281. 1329.  -         value = value.replace(',', '.');
  3282. 1330.  -
  3283. 1331.  -         var valueFloat      = parseFloat(value);
  3284. 1332.  -         var suffixesAll     = '';
  3285. 1333.  -         suffixesAll        += (additionalParams.is_cost_per_click ? '_click' : '_views');
  3286. 1334.  -         suffixesAll        += (additionalParams.is_exclusive_ad ? '_exclusive' : '');
  3287. 1335.  -         suffixesAll        += (additionalParams.is_app_admin ? '_app' : '');
  3288. 1336.  -         var minValue        = cur.unionsLimits['cost_per' + suffixesAll + '_min'];
  3289. 1337.  -         var maxValue        = cur.unionsLimits['cost_per' + suffixesAll + '_max'];
  3290. 1338.  -         var minErrorLangKey = (additionalParams.is_cost_per_click ? 'ads_error_cost_per_click_min_value' : 'ads_error_cost_per_views_min_value');
  3291. 1339.  -         var maxErrorLangKey = (additionalParams.is_cost_per_click ? 'ads_error_cost_per_click_max_value' : 'ads_error_cost_per_views_max_value');
  3292. 1340.  -         if (valueFloat < minValue) {
  3293. 1341.  -           return getLang(minErrorLangKey).replace('{money}', getLang('global_money_amount_rub', minValue));
  3294. 1342.  -         }
  3295. 1343.  -         if (valueFloat > maxValue) {
  3296. 1344.  -           return getLang(maxErrorLangKey).replace('{money}', getLang('global_money_amount_rub', maxValue));
  3297. 1345.  -         }
  3298. 1346.  -
  3299. 1347.  -         if (!value.match(cur.unionsLimits.cost_per_click_pattern)) {
  3300. 1348.  -           return (additionalParams.is_cost_per_click ? getLang('ads_error_cost_per_click_invalid_value') : getLang('ads_error_cost_per_views_invalid_value'));
  3301. 1349.  -         }
  3302. 1350.  -         return true;
  3303. 1351.  -       case 'limit':
  3304. 1352.  -         if (value == '' || value == '0' || value == 0) {
  3305. 1353.  -           return getLang('ads_error_limit_no_value');
  3306. 1354.  -         }
  3307. 1355.  -         if (!value.match(/[0-9.,]/)) {
  3308. 1356.  -           return getLang('ads_error_limit_invalid_value');
  3309. 1357.  -         }
  3310. 1358.  -         if (value.indexOf('.') != -1 || value.indexOf(',') != -1) {
  3311. 1359.  -           return getLang('ads_error_limit_integer_value');
  3312. 1360.  -         }
  3313. 1361.  -         if (parseInt(value) < cur.unionsLimits.limit_min) {
  3314. 1362.  -           return getLang('ads_error_limit_min_value').replace('{money}', getLang('global_money_amount_rub', cur.unionsLimits.limit_min));
  3315. 1363.  -         }
  3316. 1364.  -         if (parseInt(value) > cur.unionsLimits.limit_max) {
  3317. 1365.  -           return getLang('ads_error_limit_large_value');
  3318. 1366.  -         }
  3319. 1367.  -         if (!value.match(cur.unionsLimits.limit_pattern)) {
  3320. 1368.  -           return getLang('ads_error_limit_invalid_value');
  3321. 1369.  -         }
  3322. 1370.  -         return true;
  3323. 1371.  -     }
  3324. 1372.  -     switch (valueType) {
  3325. 1373.  -       case 'name':
  3326. 1374.  -         if (value == '') {
  3327. 1375.  -           if (unionType == 4) { // Top union
  3328. 1376.  -             // Nothing
  3329. 1377.  -           } else if (unionType == 2) {
  3330. 1378.  -             return getLang('ads_error_client_name_no_value');
  3331. 1379.  -           } else if (unionType == 1) {
  3332. 1380.  -             return getLang('ads_error_campaign_name_no_value');
  3333. 1381.  -           }
  3334. 1382.  -         }
  3335. 1383.  -         return true;
  3336. 1384.  -     }
  3337. 1385.  -     if (additionalParams.server_check) {
  3338. 1386.  -       return true;
  3339. 1387.  -     } else {
  3340. 1388.  -       return false;
  3341. 1389.  -     }
  3342. 1390.  -   }
  3343. 1391.  -
  3344. 1392.  -   function showFastError(error) {
  3345. 1393.  -     geByClass('ads_inline_fast_error', this.fastErrorRow)[0].innerHTML = error;
  3346. 1394.  -     show(this.fastErrorRow);
  3347. 1395.  -   }
  3348. 1396.  -   function hideFastError() {
  3349. 1397.  -     hide(this.fastErrorRow);
  3350. 1398.  -     geByClass('ads_inline_fast_error', this.fastErrorRow)[0].innerHTML = '';
  3351. 1399.  -   }
  3352. 1400.  -   function showLongError(error) {
  3353. 1401.  -     showFastBox(getLang('ads_error_box_title'), error);
  3354. 1402.  -   }
  3355. 1403.  -   function removeValue() {
  3356. 1404.  -     saveValue.call(this, false, true);
  3357. 1405.  -     return true;
  3358. 1406.  -   }
  3359. 1407.  -   function updateTimeDays(month) {
  3360. 1408.  -     uiTimeDay.setData(getDays(month));
  3361. 1409.  -   }
  3362. 1410.  -
  3363. 1411.  -   //
  3364. 1412.  -   // Helpers
  3365. 1413.  -   //
  3366. 1414.  -   function getDays(month) {
  3367. 1415.  -     var ret = [], days = [0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
  3368. 1416.  -     if (month == 2 && (new Date()).getFullYear() % 4 == 0) {
  3369. 1417.  -       days[2] = 29
  3370. 1418.  -     }
  3371. 1419.  -     for (var i = 1, days = days[month]; i <= days; i++) {
  3372. 1420.  -       ret.push(i);
  3373. 1421.  -     }
  3374. 1422.  -     return ret;
  3375. 1423.  -   }
  3376. 1424.  -   function getMonths() {
  3377. 1425.  -     var months = [];
  3378. 1426.  -     months.push([1,  getLang('ads_jan')]);
  3379. 1427.  -     months.push([2,  getLang('ads_feb')]);
  3380. 1428.  -     months.push([3,  getLang('ads_mar')]);
  3381. 1429.  -     months.push([4,  getLang('ads_apr')]);
  3382. 1430.  -     months.push([5,  getLang('ads_may')]);
  3383. 1431.  -     months.push([6,  getLang('ads_jun')]);
  3384. 1432.  -     months.push([7,  getLang('ads_jul')]);
  3385. 1433.  -     months.push([8,  getLang('ads_aug')]);
  3386. 1434.  -     months.push([9,  getLang('ads_sep')]);
  3387. 1435.  -     months.push([10, getLang('ads_oct')]);
  3388. 1436.  -     months.push([11, getLang('ads_nov')]);
  3389. 1437.  -     months.push([12, getLang('ads_dec')]);
  3390. 1438.  -     return months;
  3391. 1439.  -   }
  3392. 1440.  -   function getHours() {
  3393. 1441.  -     var ret = [];
  3394. 1442.  -     for (var i = 0; i < 24; i++) {
  3395. 1443.  -       ret.push([i, i + ':00']);
  3396. 1444.  -     }
  3397. 1445.  -     return ret;
  3398. 1446.  -   }
  3399. 1447.  -
  3400. 1448.  -   //
  3401. 1449.  -   // Events
  3402. 1450.  -   //
  3403. 1451.  -   function afterInit() {
  3404. 1452.  -     var self = this;
  3405. 1453.  -
  3406. 1454.  -     if (valueGeneralType == 'limit' || valueGeneralType == 'time') {
  3407. 1455.  -       this.removeValueAnchor = geByClass('ads_inline_edit_remove_value', this.contentTable)[0];
  3408. 1456.  -       addEvent(this.removeValueAnchor, 'click', function() { removeValue.call(self); return false; });
  3409. 1457.  -     }
  3410. 1458.  -
  3411. 1459.  -     if (valueGeneralType == 'time') {
  3412. 1460.  -       uiTimeDay = new Dropdown(
  3413. 1461.  -         geByClass('inline_time_day', this.contentTable)[0],
  3414. 1462.  -         getDays(1),
  3415. 1463.  -         {width: 45, height: 150, selectedItem: 1}
  3416. 1464.  -       );
  3417. 1465.  -       uiTimeMonth = new Dropdown(
  3418. 1466.  -         geByClass('inline_time_month', this.contentTable)[0],
  3419. 1467.  -         getMonths(),
  3420. 1468.  -         {width: 80, height: 150, selectedItem: 1, onChange: function(value) { updateTimeDays.call(this, value); }}
  3421. 1469.  -       );
  3422. 1470.  -       uiTimeHour = new Dropdown(
  3423. 1471.  -         geByClass('inline_time_hour', this.contentTable)[0],
  3424. 1472.  -         getHours(),
  3425. 1473.  -         {width: 65, height: 150, selectedItem: 0}
  3426. 1474.  -       );
  3427. 1475.  -     }
  3428. 1476.  -
  3429. 1477.  -     this.fastErrorRow = geByClass('ads_inline_fast_error_row', this.contentTable)[0];
  3430. 1478.  -
  3431. 1479.  -     if (this.input) {
  3432. 1480.  -       this.is_user_action = true;
  3433. 1481.  -       addEvent(this.input, 'keyup', function(event) {
  3434. 1482.  -           if (event.keyCode != 13) {
  3435. 1483.  -             hideFastError.call(self);
  3436. 1484.  -           }
  3437. 1485.  -         }
  3438. 1486.  -       );
  3439. 1487.  -     }
  3440. 1488.  -   }
  3441. 1489.  -   function onBeforeShow() {
  3442. 1490.  -     if (this.input) {
  3443. 1491.  -       this.input.value = defaultValue;
  3444. 1492.  -     }
  3445. 1493.  -
  3446. 1494.  -     if (valueGeneralType == 'time') {
  3447. 1495.  -       uiTimeDay.val(defaultValue.day);
  3448. 1496.  -       uiTimeMonth.val(defaultValue.month);
  3449. 1497.  -       uiTimeHour.val(defaultValue.hour);
  3450. 1498.  -     }
  3451. 1499.  -
  3452. 1500.  -     hideFastError.call(this);
  3453. 1501.  -
  3454. 1502.  -     var self = this;
  3455. 1503.  -     if (valueGeneralType == 'cost_per_click' && !this.recommended_cost_loaded) {
  3456. 1504.  -       var recommendedCostProgress = geByClass('inline_recommended_cost_progress', this.contentTable)[0];
  3457. 1505.  -       var recommendedCostText     = geByClass('ads_inline_recommended_cost_text',     this.contentTable)[0];
  3458. 1506.  -
  3459. 1507.  -       function onDone(response) {
  3460. 1508.  -         if (response && response.recommended_costs && response.recommended_costs.cost_text) {
  3461. 1509.  -           recommendedCostText.innerHTML = response.recommended_costs.cost_text;
  3462. 1510.  -           hide(recommendedCostProgress);
  3463. 1511.  -           show(recommendedCostText);
  3464. 1512.  -           if (!this.is_user_action && self.input.value == '0') {
  3465. 1513.  -             self.input.value = response.recommended_costs.cost_value;
  3466. 1514.  -           }
  3467. 1515.  -           self.recommended_cost_loaded = true;
  3468. 1516.  -         }
  3469. 1517.  -       };
  3470. 1518.  -       var ajaxParams = {ad_id: unionId};
  3471. 1519.  -       ajax.post('/ads?act=a_get_recommended_cost', ajaxParams, {onDone: onDone});
  3472. 1520.  -     }
  3473. 1521.  -   }
  3474. 1522.  -   function onShow() {
  3475. 1523.  -     if (this.input) {
  3476. 1524.  -       elfocus(this.input);
  3477. 1525.  -     }
  3478. 1526.  -   }
  3479. 1527.  -   function onConfirm() {
  3480. 1528.  -     var newValue;
  3481. 1529.  -     if (valueGeneralType == 'time') {
  3482. 1530.  -       newValue = {};
  3483. 1531.  -       newValue.day   = uiTimeDay.val();
  3484. 1532.  -       newValue.month = uiTimeMonth.val();
  3485. 1533.  -       newValue.hour  = uiTimeHour.val();
  3486. 1534.  -     } else {
  3487. 1535.  -       newValue = this.input.value;
  3488. 1536.  -
  3489. 1537.  -       var checkResult = checkValue.call(this, newValue, valueType);
  3490. 1538.  -       if (typeof(checkResult) == 'string') {
  3491. 1539.  -         showFastError.call(this, checkResult);
  3492. 1540.  -         return false;
  3493. 1541.  -       }
  3494. 1542.  -       if (checkResult !== true) {
  3495. 1543.  -         showFastError.call(this, getLang('ads_error_unknown_error'));
  3496. 1544.  -         return false;
  3497. 1545.  -       }
  3498. 1546.  -     }
  3499. 1547.  -
  3500. 1548.  -     saveValue.call(this, newValue, false);
  3501. 1549.  -     return true;
  3502. 1550.  -   }
  3503. 1551.  -
  3504. 1552.  -   var options = {
  3505. 1553.  -     afterInit: afterInit,
  3506. 1554.  -     onBeforeShow: onBeforeShow,
  3507. 1555.  -     onShow: onShow,
  3508. 1556.  -     onConfirm: onConfirm
  3509. 1557.  -   };
  3510. 1558.  -
  3511. 1559.  -   switch (valueGeneralType) {
  3512. 1560.  -     case 'cost_per_click':
  3513. 1561.  -       options.contentHTML =
  3514. 1562.  -         '<tr>' +
  3515. 1563.  -         '<td colspan="2">' +
  3516. 1564.  -         '<table class="ads_inline_edit_table" style="width: 100%;">' +
  3517. 1565.  -         '<tr><td><input class="inlInput text" type="text" /></td></tr>' +
  3518. 1566.  -         '<tr><td style="padding-top: 7px; height: 22px;">' +
  3519. 1567.  -           '<img class="inline_recommended_cost_progress" src="/images/upload.gif" />' +
  3520. 1568.  -           '<span class="ads_inline_recommended_cost_text"></span>' +
  3521. 1569.  -           '<div style="width: 275px; height: 1px;"></div>' +
  3522. 1570.  -           '</td></tr>' +
  3523. 1571.  -         '<tr class="ads_inline_fast_error_row"><td><div class="ads_inline_fast_error"></div></td></tr>' +
  3524. 1572.  -         '</table>' +
  3525. 1573.  -         '</td>' +
  3526. 1574.  -         '</tr>';
  3527. 1575.  -       break;
  3528. 1576.  -     case 'limit':
  3529. 1577.  -       options.contentHTML =
  3530. 1578.  -         '<tr>' +
  3531. 1579.  -         '<td colspan="2">' +
  3532. 1580.  -         '<table class="ads_inline_edit_table">' +
  3533. 1581.  -         '<tr>' +
  3534. 1582.  -         '<td><input class="inlInput text" type="text" /></td>' +
  3535. 1583.  -         '<td><a class="ads_inline_edit_remove_value" href="#">' + getLang('ads_inline_edit_remove_limit') + '</a></td>' +
  3536. 1584.  -         '</tr>' +
  3537. 1585.  -         '<tr class="ads_inline_fast_error_row"><td colspan="2"><div class="ads_inline_fast_error"></div></td></tr>' +
  3538. 1586.  -         '</table>' +
  3539. 1587.  -         '</td>' +
  3540. 1588.  -         '</tr>';
  3541. 1589.  -       break;
  3542. 1590.  -     case 'time':
  3543. 1591.  -       var removeValueText;
  3544. 1592.  -       switch (valueType) {
  3545. 1593.  -         case 'start_time': removeValueText = getLang('ads_inline_edit_remove_start_time'); break;
  3546. 1594.  -         case 'stop_time': removeValueText = getLang('ads_inline_edit_remove_stop_time'); break;
  3547. 1595.  -       }
  3548. 1596.  -       options.contentHTML =
  3549. 1597.  -         '<tr>' +
  3550. 1598.  -         '<td colspan="2">' +
  3551. 1599.  -         '<table class="ads_inline_edit_table">' +
  3552. 1600.  -         '<tr>' +
  3553. 1601.  -           '<td style="white-space: nowrap; width: 200px;">' +
  3554. 1602.  -             '<table class="ads_inline_edit_table">' +
  3555. 1603.  -             '<tr>' +
  3556. 1604.  -               '<td style="padding-right: 5px;"><input type="text" class="inline_time_day text" style="width: 30px;" /></td>' +
  3557. 1605.  -               '<td style="padding-right: 5px;"><input type="text" class="inline_time_month text" style="width: 30px;" /></td>' +
  3558. 1606.  -               '<td style="padding-right: 5px;"><input type="text" class="inline_time_hour text" style="width: 30px;" /></td>' +
  3559. 1607.  -             '</tr>' +
  3560. 1608.  -             '</table>' +
  3561. 1609.  -           '</td>' +
  3562. 1610.  -         '</tr>' +
  3563. 1611.  -         '<tr><td style="padding-top: 7px;"><a class="ads_inline_edit_remove_value" style="padding-left: 0;" href="#">' + removeValueText + '</a></td></tr>' +
  3564. 1612.  -         '<tr class="ads_inline_fast_error_row"><td colspan="2"><div class="ads_inline_fast_error"></div></td></tr>' +
  3565. 1613.  -         '</table>' +
  3566. 1614.  -         '</td>' +
  3567. 1615.  -         '</tr>';
  3568. 1616.  -       break;
  3569. 1617.  -     case 'text':
  3570. 1618.  -       options.contentHTML =
  3571. 1619.  -         '<tr>' +
  3572. 1620.  -         '<td colspan="2">' +
  3573. 1621.  -         '<table class="ads_inline_edit_table" style="width: 100%;">' +
  3574. 1622.  -         '<tr><td><input class="inlInput text" type="text" /></td></tr>' +
  3575. 1623.  -         '<tr class="ads_inline_fast_error_row"><td><div class="ads_inline_fast_error"></div></td></tr>' +
  3576. 1624.  -         '</table>' +
  3577. 1625.  -         '</td>' +
  3578. 1626.  -         '</tr>';
  3579. 1627.  -       break;
  3580. 1628.  -   }
  3581. 1629.  -
  3582. 1630.  -   var ret = {
  3583. 1631.  -     target: editElem,
  3584. 1632.  -     options: options
  3585. 1633.  -   };
  3586. 1634.  -   if (this.getOptionsOnly) { // dirty hack.
  3587. 1635.  -     return ret;
  3588. 1636.  -   }
  3589. 1637.  -   ret.obj = new InlineEdit(editElem, options);
  3590. 1638.  -
  3591. 1639.  -   var accessFunctions = {
  3592. 1640.  -     applyNewValue: applyNewValue
  3593. 1641.  -   }
  3594. 1642.  -
  3595. 1643.  -   if (!cur.inlineEditControls) {
  3596. 1644.  -     cur.inlineEditControls = {};
  3597. 1645.  -   }
  3598. 1646.  -   cur.inlineEditControls[valueType + '_' + unionId] = accessFunctions;
  3599. 1647.  -
  3600. 1648.  -   return ret;
  3601. 1649.  - }
  3602. 1650.  -
  3603. 1651.  - Ads.createInlineDropdownMenu = function(menuElem, boxElem, progressElem, unionId, valueType, items, initValue, hash, additionalParams) {
  3604. 1652.  -   menuElem     = ge(menuElem);
  3605. 1653.  -   boxElem      = ge(boxElem);
  3606. 1654.  -   progressElem = ge(progressElem);
  3607. 1655.  -   var defaultValue = initValue;
  3608. 1656.  -
  3609. 1657.  -   var self;
  3610. 1658.  -
  3611. 1659.  -   function saveValue(newValue) {
  3612. 1660.  -
  3613. 1661.  -     if (newValue == defaultValue) {
  3614. 1662.  -       return;
  3615. 1663.  -     }
  3616. 1664.  -
  3617. 1665.  -     var unknownError = getLang('ads_error_unexpected_error_try_later');
  3618. 1666.  -
  3619. 1667.  -     var params = {};
  3620. 1668.  -     params.union_id = unionId;
  3621. 1669.  -     params.hash = hash;
  3622. 1670.  -     extend(params, additionalParams);
  3623. 1671.  -     params[valueType] = newValue;
  3624. 1672.  -
  3625. 1673.  -     function onAjaxComplete(response) {
  3626. 1674.  -       if (isObject(response)) {
  3627. 1675.  -         if (response.error) {
  3628. 1676.  -           showLongError.call(self, response.error);
  3629. 1677.  -         } else if (!response.not_changed) {
  3630. 1678.  -           if (response[valueType + '_value'] !== undefined) {
  3631. 1679.  -             applyNewValue(response[valueType + '_value'], response[valueType + '_text']);
  3632. 1680.  -             if (additionalParams.reload) {
  3633. 1681.  -               nav.reload();
  3634. 1682.  -             }
  3635. 1683.  -           } else {
  3636. 1684.  -             showLongError.call(self, unknownError);
  3637. 1685.  -           }
  3638. 1686.  -         }
  3639. 1687.  -       } else {
  3640. 1688.  -         showLongError.call(self, unknownError);
  3641. 1689.  -       }
  3642. 1690.  -
  3643. 1691.  -       hide(progressElem);
  3644. 1692.  -       show(boxElem);
  3645. 1693.  -
  3646. 1694.  -       return true;
  3647. 1695.  -     }
  3648. 1696.  -     ajax.post('/ads?act=a_unions_general_info_save', params, {onDone: onAjaxComplete, onFail: onAjaxComplete});
  3649. 1697.  -
  3650. 1698.  -     hide(boxElem);
  3651. 1699.  -     show(progressElem);
  3652. 1700.  -   }
  3653. 1701.  -
  3654. 1702.  -   function applyNewValue(newValue, newText) {
  3655. 1703.  -     defaultValue = newValue;
  3656. 1704.  -     self.setOptions({title: newText});
  3657. 1705.  -     menuElem.innerHTML = newText;
  3658. 1706.  -   }
  3659. 1707.  -   function showLongError(error) {
  3660. 1708.  -     showFastBox(getLang('ads_error_box_title'), error);
  3661. 1709.  -   }
  3662. 1710.  -
  3663. 1711.  -   function onMenuChange(event) {
  3664. 1712.  -     var newValue = event.target.index;
  3665. 1713.  -     saveValue(newValue);
  3666. 1714.  -   }
  3667. 1715.  -
  3668. 1716.  -   var options = {};
  3669. 1717.  -   options.target = menuElem;
  3670. 1718.  -   options.onSelect = onMenuChange;
  3671. 1719.  -   options.showHover = false;
  3672. 1720.  -   options.updateTarget = false;
  3673. 1721.  -   self = new DropdownMenu(items, options);
  3674. 1722.  - }
  3675. 1723.  -
  3676. 1724.  - Ads.MultiDropdownMenu = function(items, options) {
  3677. 1725.  -   var dropdownMenu;
  3678. 1726.  -   var selectedItems = {};
  3679. 1727.  -   var curItems = [];
  3680. 1728.  -
  3681. 1729.  -   function onItemClick(e) {
  3682. 1730.  -     if (e.target.className == 'ads_dd_menu_item_checkbox_on') {
  3683. 1731.  -       selectedItems[e.target.index] = false;
  3684. 1732.  -       e.target.className = 'ads_dd_menu_item_checkbox_off';
  3685. 1733.  -     } else {
  3686. 1734.  -       selectedItems[e.target.index] = true;
  3687. 1735.  -       e.target.className = 'ads_dd_menu_item_checkbox_on';
  3688. 1736.  -     }
  3689. 1737.  -     return false;
  3690. 1738.  -   }
  3691. 1739.  -
  3692. 1740.  -   for (var i in items) {
  3693. 1741.  -     curItems[i] = {};
  3694. 1742.  -     for (var j in items[i]) {
  3695. 1743.  -       curItems[i][j] = items[i][j];
  3696. 1744.  -     }
  3697. 1745.  -     curItems[i].onClick = onItemClick;
  3698. 1746.  -     curItems[i].c = 'ads_dd_menu_item_checkbox_off';
  3699. 1747.  -     selectedItems[curItems[i].i] = false;
  3700. 1748.  -   }
  3701. 1749.  -
  3702. 1750.  -   dropdownMenu = new DropdownMenu(curItems, options);
  3703. 1751.  -   dropdownMenu.getSelectedItems = function() {
  3704. 1752.  -     var selectedItemsResult = [];
  3705. 1753.  -     for (var i in selectedItems) {
  3706. 1754.  -       if (selectedItems[i]) {
  3707. 1755.  -         selectedItemsResult.push(i);
  3708. 1756.  -       }
  3709. 1757.  -     }
  3710. 1758.  -     return selectedItemsResult;
  3711. 1759.  -   }
  3712. 1760.  -
  3713. 1761.  -   return dropdownMenu;
  3714. 1762.  - }
  3715. 1763.  -
  3716. 1764.  - Ads.getCampaignsTotalLabel = function(total) {
  3717. 1765.  -   var type = this._curFilter;
  3718. 1766.  -   if (typeof type == 'object') type = type[0];
  3719. 1767.  -   if (!this._curSearchString || this._curSearchString == '') {
  3720. 1768.  -     switch (type) {
  3721. 1769.  -       case 0: return getLang('ads_stopped_campaigns_total', total);
  3722. 1770.  -       case 1: return getLang('ads_running_campaigns_total', total);
  3723. 1771.  -       case 3: return getLang('ads_planned_campaigns_total', total);
  3724. 1772.  -       case 4: return getLang('ads_archived_campaigns_total', total);
  3725. 1773.  -       default: return getLang('ads_active_campaigns_total', total);
  3726. 1774.  -     }
  3727. 1775.  -   } else {
  3728. 1776.  -     switch (type) {
  3729. 1777.  -       case 0: return getLang('ads_stopped_campaigns_found', total);
  3730. 1778.  -       case 1: return getLang('ads_running_campaigns_found', total);
  3731. 1779.  -       case 3: return getLang('ads_planned_campaigns_found', total);
  3732. 1780.  -       case 4: return getLang('ads_archived_campaigns_found', total);
  3733. 1781.  -       default: return getLang('ads_active_campaigns_found', total);
  3734. 1782.  -     }
  3735. 1783.  -   }
  3736. 1784.  - }
  3737. 1785.  -
  3738. 1786.  - Ads.getNoCampaignsLabel = function() {
  3739. 1787.  -   var type = this._curFilter;
  3740. 1788.  -   if (typeof type == 'object') type = type[0];
  3741. 1789.  -   if (!this._curSearchString || this._curSearchString == '') {
  3742. 1790.  -     switch (type) {
  3743. 1791.  -       case 0: return getLang('ads_no_stopped_campaigns');
  3744. 1792.  -       case 1: return getLang('ads_no_running_campaigns');
  3745. 1793.  -       case 3: return getLang('ads_no_planned_campaigns');
  3746. 1794.  -       case 4: return getLang('ads_no_archived_campaigns');
  3747. 1795.  -       default: return getLang('ads_no_active_campaigns');
  3748. 1796.  -     }
  3749. 1797.  -   } else {
  3750. 1798.  -     switch (type) {
  3751. 1799.  -       case 0: return getLang('ads_no_stopped_campaigns_found');
  3752. 1800.  -       case 1: return getLang('ads_no_running_campaigns_found');
  3753. 1801.  -       case 3: return getLang('ads_no_planned_campaigns_found');
  3754. 1802.  -       case 4: return getLang('ads_no_archived_campaigns_found');
  3755. 1803.  -       default: return getLang('ads_no_active_campaigns_found');
  3756. 1804.  -     }
  3757. 1805.  -   }
  3758. 1806.  - }
  3759. 1807.  -
  3760. 1808.  - Ads.getAdsTotalLabel = function(total) {
  3761. 1809.  -   var type = this._curFilter;
  3762. 1810.  -   if (typeof type == 'object') type = type[0];
  3763. 1811.  -   if (!this._curSearchString || this._curSearchString == '') {
  3764. 1812.  -     switch (type) {
  3765. 1813.  -       case 0: return getLang('ads_stopped_ads_total', total);
  3766. 1814.  -       case 1: return getLang('ads_running_ads_total', total);
  3767. 1815.  -       case 3: return getLang('ads_planned_ads_total', total);
  3768. 1816.  -       case 4: return getLang('ads_archived_ads_total', total);
  3769. 1817.  -       default: return getLang('ads_active_ads_total', total);
  3770. 1818.  -     }
  3771. 1819.  -   } else {
  3772. 1820.  -     switch (type) {
  3773. 1821.  -       case 0: return getLang('ads_stopped_ads_found', total);
  3774. 1822.  -       case 1: return getLang('ads_running_ads_found', total);
  3775. 1823.  -       case 3: return getLang('ads_planned_ads_found', total);
  3776. 1824.  -       case 4: return getLang('ads_archived_ads_found', total);
  3777. 1825.  -       default: return getLang('ads_active_ads_found', total);
  3778. 1826.  -     }
  3779. 1827.  -   }
  3780. 1828.  - }
  3781. 1829.  -
  3782. 1830.  - Ads.getNoAdsLabel = function() {
  3783. 1831.  -   var type = this._curFilter;
  3784. 1832.  -   if (typeof type == 'object') type = type[0];
  3785. 1833.  -   if (!this._curSearchString || this._curSearchString == '') {
  3786. 1834.  -     switch (type) {
  3787. 1835.  -       case 0: return getLang('ads_no_stopped_ads');
  3788. 1836.  -       case 1: return getLang('ads_no_running_ads');
  3789. 1837.  -       case 3: return getLang('ads_no_planned_ads');
  3790. 1838.  -       case 4: return getLang('ads_no_archived_ads');
  3791. 1839.  -       default: return getLang('ads_no_active_ads');
  3792. 1840.  -     }
  3793. 1841.  -   } else {
  3794. 1842.  -     switch (type) {
  3795. 1843.  -       case 0: return getLang('ads_no_stopped_ads_found');
  3796. 1844.  -       case 1: return getLang('ads_no_running_ads_found');
  3797. 1845.  -       case 3: return getLang('ads_no_planned_ads_found');
  3798. 1846.  -       case 4: return getLang('ads_no_archived_ads_found');
  3799. 1847.  -       default: return getLang('ads_no_active_ads_found');
  3800. 1848.  -     }
  3801. 1849.  -   }
  3802. 1850.  - }
  3803. 1851.  -
  3804. 1852.  - Ads.getClientsTotalLabel = function(total) {
  3805. 1853.  -   var type = this._curFilter;
  3806. 1854.  -   if (typeof type == 'object') type = type[0];
  3807. 1855.  -   if (!this._curSearchString || this._curSearchString == '') {
  3808. 1856.  -     switch (type) {
  3809. 1857.  -       case 4: return getLang('ads_archived_clients_total', total);
  3810. 1858.  -       default: return getLang('ads_active_clients_total', total);
  3811. 1859.  -     }
  3812. 1860.  -   } else {
  3813. 1861.  -     switch (type) {
  3814. 1862.  -       case 4: return getLang('ads_archived_clients_found', total);
  3815. 1863.  -       default: return getLang('ads_active_clients_found', total);
  3816. 1864.  -     }
  3817. 1865.  -   }
  3818. 1866.  - }
  3819. 1867.  -
  3820. 1868.  - Ads.getNoClientsLabel = function() {
  3821. 1869.  -   var type = this._curFilter;
  3822. 1870.  -   if (typeof type == 'object') type = type[0];
  3823. 1871.  -   if (!this._curSearchString || this._curSearchString == '') {
  3824. 1872.  -     switch (type) {
  3825. 1873.  -       case 4: return getLang('ads_no_archived_clients');
  3826. 1874.  -       default: return getLang('ads_no_active_clients');
  3827. 1875.  -     }
  3828. 1876.  -   } else {
  3829. 1877.  -     switch (type) {
  3830. 1878.  -       case 4: return getLang('ads_no_archived_clients_found');
  3831. 1879.  -       default: return getLang('ads_no_active_clients_found');
  3832. 1880.  -     }
  3833. 1881.  -   }
  3834. 1882.  - }
  3835. 1883.  -
  3836. 1884.  - Ads.addOfficeFormatFunctions = function(options) {
  3837. 1885.  -   var arrFind = function(arr, val) {
  3838. 1886.  -     var i = 0;
  3839. 1887.  -     for (; i < arr.length; i++) {
  3840. 1888.  -       if (arr[i] === val) {
  3841. 1889.  -         return i;
  3842. 1890.  -       }
  3843. 1891.  -     }
  3844. 1892.  -     return -1;
  3845. 1893.  -   }
  3846. 1894.  -
  3847. 1895.  -   var ind = arrFind(options.columnClasses, 'column_name_view');
  3848. 1896.  -   options.columnFormatting[ind] = function(data, rown) {
  3849. 1897.  -     if (rown == -1) return data;
  3850. 1898.  -     var unionId = this.content.extra.unionId[rown];
  3851. 1899.  -     return '<div class="ads_paginated_table_name"><a href="/ads?act=office&union_id=' + unionId + '">' + data + '</a></div>';
  3852. 1900.  -   }
  3853. 1901.  -
  3854. 1902.  -   var limitFormat = function(data, rown, coln) {
  3855. 1903.  -     if (rown == -1) return data;
  3856. 1904.  -     var wrap;
  3857. 1905.  -     try {
  3858. 1906.  -       var uid = this.content.extra.uid[rown][coln];
  3859. 1907.  -       if (uid) {
  3860. 1908.  -         wrap = "<img id=\"inline_edit_progress" + uid + "\" src=\"/images/upload.gif\" style=\"display: none;\" /><a id=\"inline_edit_value" + uid + "\" >{value}</a>";
  3861. 1909.  -       }
  3862. 1910.  -     } catch (e) {
  3863. 1911.  -       // Nothing
  3864. 1912.  -     }
  3865. 1913.  -     if (!wrap) {
  3866. 1914.  -       wrap = '{value}';
  3867. 1915.  -     }
  3868. 1916.  -     var value = data;
  3869. 1917.  -     if (data == 0) {
  3870. 1918.  -       value = getLang('ads_no_money_limit');
  3871. 1919.  -     } else {
  3872. 1920.  -       value = this._formatData(data, 'currency_int');
  3873. 1921.  -     }
  3874. 1922.  -     return wrap.replace('{value}', value);
  3875. 1923.  -   }
  3876. 1924.  -   ind = arrFind(options.columnClasses, 'column_day_limit_view');
  3877. 1925.  -   if (ind != -1) options.columnFormatting[ind] = limitFormat;
  3878. 1926.  -   ind = arrFind(options.columnClasses, 'column_month_limit_view');
  3879. 1927.  -   if (ind != -1) options.columnFormatting[ind] = limitFormat;
  3880. 1928.  -   ind = arrFind(options.columnClasses, 'column_all_limit_view');
  3881. 1929.  -   if (ind != -1) options.columnFormatting[ind] = limitFormat;
  3882. 1930.  -
  3883. 1931.  -   return options;
  3884. 1932.  - }
  3885. 1933.  -
  3886. 1934.  - Ads.createOfficePaginatedTable = function(container, options, content) {
  3887. 1935.  -   var getButton = function(label, callback) {
  3888. 1936.  -     var div = ce('div', {className: 'button_blue'});
  3889. 1937.  -     var butt = ce('button', {innerHTML: label, onclick: callback});
  3890. 1938.  -     div.appendChild(butt);
  3891. 1939.  -     return div;
  3892. 1940.  -   }
  3893. 1941.  -
  3894. 1942.  -   var statusCol = 1;
  3895. 1943.  -
  3896. 1944.  -   var selected;
  3897. 1945.  -
  3898. 1946.  -   var buttons = [],
  3899. 1947.  -       labels = [getLang('ads_status_do_disable'),
  3900. 1948.  -                 getLang('ads_status_do_enable'),
  3901. 1949.  -                 getLang('ads_status_do_archive')];
  3902. 1950.  -
  3903. 1951.  -
  3904. 1952.  -   var changeStatus = function(val) {
  3905. 1953.  -     return function() {
  3906. 1954.  -       var unionIds = [],
  3907. 1955.  -           hashes = [],
  3908. 1956.  -           hashesDel = [],
  3909. 1957.  -           enable = val; // 1 - on, 0 - off, 2 - delete
  3910. 1958.  -       var i;
  3911. 1959.  -       for (i in selected) {
  3912. 1960.  -         unionIds.push(pt.content.extra.union_id[selected[i]][statusCol]);
  3913. 1961.  -         hashes.push(pt.content.extra.hash[selected[i]][statusCol]);
  3914. 1962.  -         hashesDel.push(pt.content.extra.hash_delete[selected[i]][statusCol]);
  3915. 1963.  -       }
  3916. 1964.  -
  3917. 1965.  -       unionIds = unionIds.join(',');
  3918. 1966.  -       hashes = hashes.join(',');
  3919. 1967.  -       hashesDel = hashesDel.join(',');
  3920. 1968.  -
  3921. 1969.  -       if (val == 2) { // delete
  3922. 1970.  -         Ads.openDeleteUnionBox(cur.tableUnionTypeForDelete, unionIds, hashesDel, lockChangeStatus, unlockChangeStatus, updateStatusInTable, 2);
  3923. 1971.  -         return;
  3924. 1972.  -       }
  3925. 1973.  -
  3926. 1974.  -       var params = {
  3927. 1975.  -         union_id: unionIds,
  3928. 1976.  -         hash: hashes,
  3929. 1977.  -         newclass: 1,
  3930. 1978.  -         enable: val
  3931. 1979.  -       };
  3932. 1980.  -
  3933. 1981.  -       lockChangeStatus();
  3934. 1982.  -
  3935. 1983.  -       function lockChangeStatus() {
  3936. 1984.  -         lockButton(buttons[val]);
  3937. 1985.  -         return true;
  3938. 1986.  -       };
  3939. 1987.  -       function unlockChangeStatus() {
  3940. 1988.  -         unlockButton(buttons[val]);
  3941. 1989.  -       }
  3942. 1990.  -       function updateStatusInTable(ans) {
  3943. 1991.  -         if (ans['status_class']) ans = [ans];
  3944. 1992.  -
  3945. 1993.  -         var errored = 0;
  3946. 1994.  -         for (var i in selected) {
  3947. 1995.  -           if (!ans[i]) continue;
  3948. 1996.  -           if (!ans[i]['status_class']) {
  3949. 1997.  -             if (ans[i]['error'] && !errored) {
  3950. 1998.  -               errored = 1;
  3951. 1999.  -               showFastBox(getLang('ads_cant_start_ad_box_title'), ans[i]['error']);
  3952. 2000.  -             }
  3953. 2001.  -             continue;
  3954. 2002.  -           }
  3955. 2003.  -           pt.content.types[selected[i]] = ans[i]['status_type'];
  3956. 2004.  -           pt.content.extra.status_text[selected[i]][statusCol] = ans[i]['status'];
  3957. 2005.  -           pt.content.extra.status_variants[selected[i]][statusCol] = ans[i]['status_variants'];
  3958. 2006.  -           pt._updateValue(selected[i], statusCol, ans[i]['status_class']);
  3959. 2007.  -         }
  3960. 2008.  -         updateButtons.apply(pt);
  3961. 2009.  -       }
  3962. 2010.  -
  3963. 2011.  -       function onRequestComplete(response) {
  3964. 2012.  -         // response may be object or array
  3965. 2013.  -
  3966. 2014.  -         unlockChangeStatus();
  3967. 2015.  -
  3968. 2016.  -         if (!response || response.error) { // no isObject or isArray check here
  3969. 2017.  -           debugLog('onFail change status');
  3970. 2018.  -           var errorMessage = ((response && response.error) ? response.error : getLang('ads_error_unexpected_error_try_later'));
  3971. 2019.  -           showFastBox(getLang('ads_cant_start_ad_box_title'), errorMessage);
  3972. 2020.  -           return true;
  3973. 2021.  -         }
  3974. 2022.  -
  3975. 2023.  -         var info = '';
  3976. 2024.  -         if (response && response.info) {
  3977. 2025.  -           info = response.info;
  3978. 2026.  -         }
  3979. 2027.  -         debugLog('onDone change status, ' + info);
  3980. 2028.  -
  3981. 2029.  -         updateStatusInTable(response);
  3982. 2030.  -         return true;
  3983. 2031.  -       }
  3984. 2032.  -
  3985. 2033.  -       ajax.post('/ads?act=a_union_change_status', params, {onDone: onRequestComplete, onFail: onRequestComplete});
  3986. 2034.  -     };
  3987. 2035.  -   }
  3988. 2036.  -
  3989. 2037.  -   var updateButtons = function() {
  3990. 2038.  -     selected = this.getSelection(0, 1);
  3991. 2039.  -     var i;
  3992. 2040.  -     for (i in buttons) {
  3993. 2041.  -       hide(buttons[i]);
  3994. 2042.  -     }
  3995. 2043.  -     if (selected.length == 0) {
  3996. 2044.  -     } else {
  3997. 2045.  -       var was = [false, false];
  3998. 2046.  -       var on = {on: 1, pending: 1},
  3999. 2047.  -           off = {off: 1, off_red: 1, cross: 1};
  4000. 2048.  -       for (i in selected) {
  4001. 2049.  -         var stat = this.content.data[selected[i]][statusCol];
  4002. 2050.  -         if (on[stat]) was[0] = 1;
  4003. 2051.  -         if (off[stat]) was[1] = 1;
  4004. 2052.  -       }
  4005. 2053.  -       if (was[0]) show(buttons[0]);
  4006. 2054.  -       if (was[1]) show(buttons[1]);
  4007. 2055.  -       show(buttons[2]);
  4008. 2056.  -     }
  4009. 2057.  -   }
  4010. 2058.  -
  4011. 2059.  -   options.onCheckboxPick = updateButtons;
  4012. 2060.  -   options.onRefresh = updateButtons;
  4013. 2061.  -
  4014. 2062.  -   options = Ads.addOfficeFormatFunctions(options);
  4015. 2063.  -
  4016. 2064.  -   var i;
  4017. 2065.  -   for (i = 0; i < 3; i++) {
  4018. 2066.  -     buttons[i] = getButton(labels[i], changeStatus(i));
  4019. 2067.  -   }
  4020. 2068.  -
  4021. 2069.  -   var pt = new PaginatedTable(container, options, content);
  4022. 2070.  - //  pt.getData('/ads?act=a_unions_table&union_id=1000157403&period_key=20111018&sort_key=default_r&offset={offset}&limit={limit}');
  4023. 2071.  -
  4024. 2072.  -   // mass actions
  4025. 2073.  -   var container = ge('pt_' + pt.globalNum + '_mass_act_default_container');
  4026. 2074.  -   if (container) {
  4027. 2075.  -     addClass(container, 'ads_mass_act_container');
  4028. 2076.  -     container.appendChild(buttons[1]);
  4029. 2077.  -     container.appendChild(buttons[0]);
  4030. 2078.  -     container.appendChild(buttons[2]);
  4031. 2079.  -     for (i in buttons) {
  4032. 2080.  -       hide(buttons[i]);
  4033. 2081.  -     }
  4034. 2082.  -     show(container);
  4035. 2083.  -   }
  4036. 2084.  -
  4037. 2085.  -   // selecting subclasses
  4038. 2086.  -   var selectSubclass = function(classes) {
  4039. 2087.  -     return function() {
  4040. 2088.  -       var corr = 1;
  4041. 2089.  -       for (i = 0; i < pt.tableSize; i++) {
  4042. 2090.  -         if (i < pt.curFrom || i > pt.curTo) continue;
  4043. 2091.  -         var j = pt.permutation[i];
  4044. 2092.  -         var curClass = pt.content.data[j][statusCol];
  4045. 2093.  -         corr &= ((pt.selection[j] == 1) == (classes[curClass] == 1));
  4046. 2094.  -       }
  4047. 2095.  -       var checked = 1 ^ corr;
  4048. 2096.  -       for (i = 0; i < pt.tableSize; i++) {
  4049. 2097.  -         if (i < pt.curFrom || i > pt.curTo) continue;
  4050. 2098.  -         var j = pt.permutation[i];
  4051. 2099.  -         var curClass = pt.content.data[j][statusCol];
  4052. 2100.  -         var curToggle = classes[curClass] ? checked : 0;
  4053. 2101.  -         var el = ge('cb_row_' + j + '_' + pt.globalNum);
  4054. 2102.  -         if (el) {
  4055. 2103.  -           window[curToggle ? 'addClass' : 'removeClass'](el, 'on');
  4056. 2104.  -         }
  4057. 2105.  -         pt.toggleCheckbox(false, j, curToggle);
  4058. 2106.  -       }
  4059. 2107.  -     };
  4060. 2108.  -   }
  4061. 2109.  -   container = ge('select_all_link');
  4062. 2110.  -   if (container) {
  4063. 2111.  -     container.onclick = selectSubclass({on: 1, off: 1, off_red: 1, cross: 1, pending: 1});
  4064. 2112.  -   }
  4065. 2113.  -   container = ge('select_running_link');
  4066. 2114.  -   if (container) {
  4067. 2115.  -     container.onclick = selectSubclass({on: 1});
  4068. 2116.  -   }
  4069. 2117.  -   container = ge('select_stopped_link');
  4070. 2118.  -   if (container) {
  4071. 2119.  -     container.onclick = selectSubclass({off: 1, off_red: 1, cross: 1});
  4072. 2120.  -   }
  4073. 2121.  - }
  4074. 2122.  -
  4075. 2123.  - Ads.onStatusHover = function(elem, callback, rown, coln) {
  4076. 2124.  -   var _t = this;
  4077. 2125.  -   var options = {
  4078. 2126.  -     status: {type: this.content.data[rown][coln], title: this.content.extra.status_text[rown][coln]},
  4079. 2127.  -     items: this.content.extra.status_variants[rown][coln],
  4080. 2128.  -     popupTime: -1,
  4081. 2129.  -     onSelect: function(event) { // copypasted
  4082. 2130.  -       var index = event.target.index,
  4083. 2131.  -           unionId = _t.content.extra.union_id[rown][coln],
  4084. 2132.  -           hash = _t.content.extra.hash[rown][coln],
  4085. 2133.  -           hashDelete = _t.content.extra.hash_delete[rown][coln];
  4086. 2134.  -
  4087. 2135.  -       if (index == 'archived') {
  4088. 2136.  -         setTimeout(function(){
  4089. 2137.  -           Ads.openDeleteUnionBox(cur.tableUnionTypeForDelete, unionId, hashDelete, lockChangeStatus, unlockChangeStatus, updateStatusInTable, 1);
  4090. 2138.  -         }, 1);
  4091. 2139.  -         return;
  4092. 2140.  -       }
  4093. 2141.  -
  4094. 2142.  -       var params = {};
  4095. 2143.  -       params.union_id = unionId;
  4096. 2144.  -       params.hash = hash;
  4097. 2145.  -       params.newclass = 1;
  4098. 2146.  -
  4099. 2147.  -       params.enable = ((index == 'on') ? 1 : 0);
  4100. 2148.  -
  4101. 2149.  -       lockChangeStatus();
  4102. 2150.  -
  4103. 2151.  -       function lockChangeStatus() {
  4104. 2152.  -         var selectorBox   = ge('union_' + unionId + '_status_selector_box');
  4105. 2153.  -         var progress      = ge('union_' + unionId + '_status_progress');
  4106. 2154.  -         hide(selectorBox);
  4107. 2155.  -         show(progress);
  4108. 2156.  -         return true;
  4109. 2157.  -       };
  4110. 2158.  -       function unlockChangeStatus() {
  4111. 2159.  -         var selectorBox   = ge('union_' + unionId + '_status_selector_box');
  4112. 2160.  -         var progress      = ge('union_' + unionId + '_status_progress');
  4113. 2161.  -         hide(progress)
  4114. 2162.  -         show(selectorBox);
  4115. 2163.  -       }
  4116. 2164.  -       function updateStatusInTable(status, status_class, status_type, status_variants) {
  4117. 2165.  -         if (!status && !status_class) return;
  4118. 2166.  -
  4119. 2167.  -         var ret = {
  4120. 2168.  -           value: status_class,
  4121. 2169.  -           extra: {
  4122. 2170.  -             status_text: status,
  4123. 2171.  -             status_variants: status_variants
  4124. 2172.  -           },
  4125. 2173.  -           type: status_type
  4126. 2174.  -         };
  4127. 2175.  -
  4128. 2176.  -         if (status_class == 'deleted') {
  4129. 2177.  -           ret.listeners = false;
  4130. 2178.  -           ret.extra.link_class = '';
  4131. 2179.  -         }
  4132. 2180.  -         callback(ret);
  4133. 2181.  -       }
  4134. 2182.  -
  4135. 2183.  -       function onRequestComplete(response) {
  4136. 2184.  -         unlockChangeStatus();
  4137. 2185.  -
  4138. 2186.  -         if (!isObject(response) || response.error) {
  4139. 2187.  -           debugLog('onFail change status');
  4140. 2188.  -           var errorMessage = (isObject(response) ? response.error : getLang('ads_error_unexpected_error_try_later'));
  4141. 2189.  -           showFastBox(getLang('ads_cant_start_ad_box_title'), errorMessage);
  4142. 2190.  -           return true;
  4143. 2191.  -         }
  4144. 2192.  -
  4145. 2193.  -         var info = '';
  4146. 2194.  -         if (response && response.info) {
  4147. 2195.  -           info = response.info;
  4148. 2196.  -         }
  4149. 2197.  -         debugLog('onDone change status, ' + info);
  4150. 2198.  -
  4151. 2199.  -         updateStatusInTable(response.status, response.status_class, response.status_type, response.status_variants);
  4152. 2200.  -         return true;
  4153. 2201.  -       }
  4154. 2202.  -
  4155. 2203.  -       ajax.post('/ads?act=a_union_change_status', params, {onDone: onRequestComplete, onFail: onRequestComplete});
  4156. 2204.  -     }
  4157. 2205.  -   };
  4158. 2206.  -
  4159. 2207.  -   var sdd;
  4160. 2208.  -   if (!cur._statusDropdown) {
  4161. 2209.  -     var handler = elem.getAttribute('onclick');
  4162. 2210.  -     sdd = cur._statusDropdown = Ads.statusDropdown(elem, options);
  4163. 2211.  -     elem.setAttribute('onclick', handler);
  4164. 2212.  -     elem.onclick = function(){eval(handler);};
  4165. 2213.  -   } else {
  4166. 2214.  -     sdd = cur._statusDropdown;
  4167. 2215.  -     sdd.hideHeader();
  4168. 2216.  -     clearTimeout(sdd.timer);
  4169. 2217.  -     sdd.setContainer(elem);
  4170. 2218.  -     sdd.setStatus(options.status);
  4171. 2219.  -     sdd.setItems(options.items);
  4172. 2220.  -     sdd.setHandler(options.onSelect);
  4173. 2221.  -   }
  4174. 2222.  -
  4175. 2223.  -   sdd.onOver();
  4176. 2224.  - }
  4177. 2225.  -
  4178. 2226.  - Ads.statusDropdown = function(container, options) {
  4179. 2227.  -   container = ge(container);
  4180. 2228.  -   if (!container) return false;
  4181. 2229.  -
  4182. 2230.  -   options = extend({
  4183. 2231.  -     popupTime: 200,   // -1 means 'always show entire body'
  4184. 2232.  -     status: {type: 'off', title: 'Disabled'},
  4185. 2233.  -     onSelect: function() {}
  4186. 2234.  -   }, options);
  4187. 2235.  -
  4188. 2236.  -   var compareTypes = function(type1, type2) {
  4189. 2237.  -     var same = {
  4190. 2238.  -       on: {
  4191. 2239.  -         on: 1,
  4192. 2240.  -         pending: 1
  4193. 2241.  -       },
  4194. 2242.  -       off: {
  4195. 2243.  -         off: 1,
  4196. 2244.  -         off_red: 1,
  4197. 2245.  -         cross: 1
  4198. 2246.  -       },
  4199. 2247.  -       archived: {
  4200. 2248.  -         deleted: 1
  4201. 2249.  -       }
  4202. 2250.  -     };
  4203. 2251.  -     if (!same[type1]) return 0;
  4204. 2252.  -     return same[type1][type2] || 0;
  4205. 2253.  -   }
  4206. 2254.  -
  4207. 2255.  -   var items = clone(options.items);
  4208. 2256.  -   for (var i in items) {
  4209. 2257.  -     if (compareTypes(items[i]['i'], options.status.type)) {
  4210. 2258.  -       delete items[i];
  4211. 2259.  -     }
  4212. 2260.  -   }
  4213. 2261.  -
  4214. 2262.  -   var imgSpanFake = {className: geByClass('ads_status_image_span', container)[0].className};
  4215. 2263.  -   var imgSpanHTML = '<span class="' + imgSpanFake.className + '"></span>';
  4216. 2264.  -
  4217. 2265.  -   var deltaTop = 0, deltaLeft = 0;
  4218. 2266.  -   if (browser.opera) deltaTop += -1;
  4219. 2267.  -   if (browser.mozilla) deltaTop += -1;
  4220. 2268.  -   if (browser.msie) { deltaTop += -1; deltaLeft += 1; }
  4221. 2269.  -
  4222. 2270.  -   var dd = new DropdownMenu(items, {
  4223. 2271.  -     title: imgSpanHTML + options.status.title,
  4224. 2272.  -     target: container,
  4225. 2273.  -     onSelect: options.onSelect,
  4226. 2274.  -     showHover: false,
  4227. 2275.  -     updateTarget: false,
  4228. 2276.  -     offsetTop: -2 + deltaTop,
  4229. 2277.  -     offsetLeft: -1 + deltaLeft
  4230. 2278.  -   });
  4231. 2279.  -   dd.hide();
  4232. 2280.  -   addClass(dd.header, 'ads_dd_wide');
  4233. 2281.  -   addClass(dd.body, 'ads_dd_wide');
  4234. 2282.  -
  4235. 2283.  -   var showTimer, hideTimer;
  4236. 2284.  -   var overListener = function() {
  4237. 2285.  -     if (hideTimer) {
  4238. 2286.  -       clearTimeout(hideTimer);
  4239. 2287.  -       hideTimer = false;
  4240. 2288.  -     }
  4241. 2289.  -     if (options.popupTime == -1) {
  4242. 2290.  -       dd.show();
  4243. 2291.  -       return true;
  4244. 2292.  -     }
  4245. 2293.  -     showTimer = setTimeout(function() {
  4246. 2294.  -       showTimer = false;
  4247. 2295.  -       ret.showHeader();
  4248. 2296.  -     }, options.popupTime);
  4249. 2297.  -   };
  4250. 2298.  -   var outListenerSoft = function() {
  4251. 2299.  -     if (showTimer) {
  4252. 2300.  -       clearTimeout(showTimer);
  4253. 2301.  -       showTimer = false;
  4254. 2302.  -     } else {
  4255. 2303.  -       hideTimer = setTimeout(function() {
  4256. 2304.  -         hideTimer = false;
  4257. 2305.  -         ret.hideHeader();
  4258. 2306.  -       }, 500);
  4259. 2307.  -     }
  4260. 2308.  -   };
  4261. 2309.  -   var outListenerHard = function() {
  4262. 2310.  -     hideTimer = setTimeout(function() {
  4263. 2311.  -       hideTimer = false;
  4264. 2312.  -       ret.hideHeader();
  4265. 2313.  -     }, 500);
  4266. 2314.  -   };
  4267. 2315.  -
  4268. 2316.  -   if (options.popupTime != -1) {
  4269. 2317.  -     addEvent(dd.header, 'click', function() {removeClass(dd.header, 'ads_dd_header_popup');});
  4270. 2318.  -     addEvent(container, 'click', function() {ret.showBody();});
  4271. 2319.  -
  4272. 2320.  -     addEvent(container, 'mouseover', overListener);
  4273. 2321.  -     addEvent(container, 'mouseout', outListenerSoft);
  4274. 2322.  -     addEvent(dd.header, 'mouseover', overListener);
  4275. 2323.  -     addEvent(dd.header, 'mouseout', outListenerHard);
  4276. 2324.  -     addEvent(dd.body, 'mouseover', overListener);
  4277. 2325.  -     addEvent(dd.body, 'mouseout', outListenerHard);
  4278. 2326.  -   }
  4279. 2327.  -
  4280. 2328.  -   var clearTimers = function() {
  4281. 2329.  -     if (showTimer) {
  4282. 2330.  -       clearTimeout(showTimer);
  4283. 2331.  -       showTimer = false;
  4284. 2332.  -     }
  4285. 2333.  -     if (hideTimer) {
  4286. 2334.  -       clearTimeout(hideTimer);
  4287. 2335.  -       hideTimer = false;
  4288. 2336.  -     }
  4289. 2337.  -   }
  4290. 2338.  -
  4291. 2339.  -   var ret = {
  4292. 2340.  -     getStatus: function() {
  4293. 2341.  -       return options.status;
  4294. 2342.  -     },
  4295. 2343.  -     setStatus: function(status) {
  4296. 2344.  -       removeClass(imgSpanFake, 'status_' + options.status.type);
  4297. 2345.  -       options.status = status;
  4298. 2346.  -       addClass(imgSpanFake, 'status_' + options.status.type);
  4299. 2347.  -       dd.setOptions({title: '<span class="' + imgSpanFake.className + '"></span>' + options.status.title});
  4300. 2348.  -     },
  4301. 2349.  -     setContainer: function(newContainer) {
  4302. 2350.  -       if (!newContainer) return false;
  4303. 2351.  -       clearTimers();
  4304. 2352.  -       if (options.popupTime != -1) {
  4305. 2353.  -         removeEvent(container, 'mouseover', overListener);
  4306. 2354.  -         removeEvent(container, 'mouseout', outListenerSoft);
  4307. 2355.  -         removeEvent(dd.header, 'mouseover', overListener);
  4308. 2356.  -         removeEvent(dd.header, 'mouseout', outListenerHard);
  4309. 2357.  -         removeEvent(dd.body, 'mouseover', overListener);
  4310. 2358.  -         removeEvent(dd.body, 'mouseout', outListenerHard);
  4311. 2359.  -       }
  4312. 2360.  -       container = newContainer;
  4313. 2361.  -       dd.setOptions({target: container});
  4314. 2362.  -       dd.moveToTarget();
  4315. 2363.  -       if (options.popupTime != -1) {
  4316. 2364.  -         addEvent(container, 'mouseover', overListener);
  4317. 2365.  -         addEvent(container, 'mouseout', outListenerSoft);
  4318. 2366.  -         addEvent(dd.header, 'mouseover', overListener);
  4319. 2367.  -         addEvent(dd.header, 'mouseout', outListenerHard);
  4320. 2368.  -         addEvent(dd.body, 'mouseover', overListener);
  4321. 2369.  -         addEvent(dd.body, 'mouseout', outListenerHard);
  4322. 2370.  -       }
  4323. 2371.  -     },
  4324. 2372.  -     setItems: function(newItems) {
  4325. 2373.  -       var items = clone(newItems);
  4326. 2374.  -       for (var i in items) {
  4327. 2375.  -         if (compareTypes(items[i]['i'], options.status.type)) {
  4328. 2376.  -           delete items[i];
  4329. 2377.  -         }
  4330. 2378.  -       }
  4331. 2379.  -       dd.setData(items);
  4332. 2380.  -     },
  4333. 2381.  -     setHandler: function(handler) {
  4334. 2382.  -       dd.setOptions({onSelect: handler});
  4335. 2383.  -     },
  4336. 2384.  -     showHeader: function() {
  4337. 2385.  -       if (!dd.visible) {
  4338. 2386.  -         addClass(dd.header, 'ads_dd_header_popup');
  4339. 2387.  -       }
  4340. 2388.  -       dd.moveToTarget();
  4341. 2389.  -       show(dd.header);
  4342. 2390.  -     },
  4343. 2391.  -     hideHeader: function() {
  4344. 2392.  -       dd.hide();
  4345. 2393.  -       hide(dd.header);
  4346. 2394.  -       removeClass(dd.header, 'ads_dd_header_popup');
  4347. 2395.  -     },
  4348. 2396.  -     showBody: function() {
  4349. 2397.  -       removeClass(dd.header, 'ads_dd_header_popup');
  4350. 2398.  -       dd.show();
  4351. 2399.  -     },
  4352. 2400.  -     hideBody: function() {
  4353. 2401.  -       dd.hide();
  4354. 2402.  -     },
  4355. 2403.  -     onOver: overListener,
  4356. 2404.  -     onOut: outListenerHard
  4357. 2405.  -   };
  4358. 2406.  -
  4359. 2407.  -   return ret;
  4360. 2408.  - }
  4361. 2409.  -
  4362. 2410.  - Ads.changeDemographyView = function(name, unionId, updateOnly) {
  4363. 2411.  -
  4364. 2412.  -   // Change navigation
  4365. 2413.  -   var navCur = ge('ads_demography_navigation_tab_' + name);
  4366. 2414.  -   if (!navCur) {
  4367. 2415.  -     return;
  4368. 2416.  -   }
  4369. 2417.  -   navCur = navCur.parentNode;
  4370. 2418.  -   var navCurSelected = hasClass(navCur, 'summary_tab_sel');
  4371. 2419.  -   if (navCurSelected && !updateOnly || !navCurSelected && updateOnly) {
  4372. 2420.  -     return;
  4373. 2421.  -   }
  4374. 2422.  -   var navElems = [
  4375. 2423.  -     ge('ads_demography_navigation_tab_bars_all').parentNode,
  4376. 2424.  -     ge('ads_demography_navigation_tab_graphs').parentNode
  4377. 2425.  -   ];
  4378. 2426.  -   for (var i in navElems) {
  4379. 2427.  -     var navElem = navElems[i];
  4380. 2428.  -     addClass(navElem, 'summary_tab');
  4381. 2429.  -     removeClass(navElem, 'summary_tab_sel');
  4382. 2430.  -   }
  4383. 2431.  -   addClass(navCur, 'summary_tab_sel');
  4384. 2432.  -   removeClass(navCur, 'summary_tab');
  4385. 2433.  -
  4386. 2434.  -   // Change graph
  4387. 2435.  -   var bars1   = ge('ads_demography_bars_all_wrap1');
  4388. 2436.  -   var bars2   = ge('ads_demography_bars_all_wrap2');
  4389. 2437.  -   var graphs1 = ge('ads_demography_graphs_wrap1');
  4390. 2438.  -   var graphs2 = ge('ads_demography_graphs_wrap2');
  4391. 2439.  -
  4392. 2440.  -   if (name === 'bars_all') {
  4393. 2441.  -     setStyle(bars1,   {visibility: 'visible', height: getSize(bars2)[1] + 'px'})
  4394. 2442.  -     setStyle(bars2,   {top: '0'})
  4395. 2443.  -     setStyle(graphs1, {visibility: 'hidden', height: '0'});
  4396. 2444.  -   } else if (name === 'graphs') {
  4397. 2445.  -     if (!Ads.loadDemography(unionId)) {
  4398. 2446.  -       return;
  4399. 2447.  -     }
  4400. 2448.  -
  4401. 2449.  -     !cur.graphUsersStatsSexEmpty && cur.pageGraphs['ads_graph_users_stats_day_sex'].loadGraph(intval(cur.lastDemographySourceOffset));
  4402. 2450.  -     !cur.graphUsersStatsAgeEmpty && cur.pageGraphs['ads_graph_users_stats_day_age'].loadGraph(intval(cur.lastDemographySourceOffset) * 3 + intval(cur.lastDemographyAgeOffset));
  4403. 2451.  -     !cur.graphUsersStatsCitiesEmpty && cur.pageGraphs['ads_graph_users_stats_day_cities'].loadGraph(intval(cur.lastDemographySourceOffset));
  4404. 2452.  -
  4405. 2453.  -     setStyle(graphs2, {width: getSize(graphs1)[0] + 'px'});
  4406. 2454.  -     setStyle(graphs1, {visibility: 'visible', height: getSize(graphs2)[1] + 'px'});
  4407. 2455.  -     setStyle(bars1,   {visibility: 'hidden', height: '0'});
  4408. 2456.  -     setStyle(bars2,   {position: 'absolute', top: '-100000px'});
  4409. 2457.  -   }
  4410. 2458.  - }
  4411. 2459.  -
  4412. 2460.  - Ads.changeDemographySource = function(name) {
  4413. 2461.  -
  4414. 2462.  -   // Change navigation
  4415. 2463.  -   var clicksSideNav = ge('ads_demography_navigation_clicks');
  4416. 2464.  -   var viewsSideNav  = ge('ads_demography_navigation_views');
  4417. 2465.  -   var clicksTabNav = ge('ads_demography_navigation_tab_clicks');
  4418. 2466.  -   var viewsTabNav  = ge('ads_demography_navigation_tab_views');
  4419. 2467.  -   if (clicksTabNav) {
  4420. 2468.  -     clicksTabNav = clicksTabNav.parentNode;
  4421. 2469.  -     viewsTabNav  = viewsTabNav.parentNode;
  4422. 2470.  -   }
  4423. 2471.  -   if (name == 'clicks') {
  4424. 2472.  -     if (clicksSideNav) {
  4425. 2473.  -       if (hasClass(clicksSideNav, 'nav_selected')) {
  4426. 2474.  -         return;
  4427. 2475.  -       }
  4428. 2476.  -       addClass(clicksSideNav, 'nav_selected');
  4429. 2477.  -       removeClass(viewsSideNav, 'nav_selected');
  4430. 2478.  -     }
  4431. 2479.  -     if (clicksTabNav) {
  4432. 2480.  -       if (hasClass(clicksTabNav, 'summary_tab_sel')) {
  4433. 2481.  -         return;
  4434. 2482.  -       }
  4435. 2483.  -       addClass(clicksTabNav, 'summary_tab_sel');
  4436. 2484.  -       addClass(viewsTabNav, 'summary_tab');
  4437. 2485.  -       removeClass(clicksTabNav, 'summary_tab');
  4438. 2486.  -       removeClass(viewsTabNav, 'summary_tab_sel');
  4439. 2487.  -     }
  4440. 2488.  -   } else {
  4441. 2489.  -     if (clicksSideNav) {
  4442. 2490.  -       if (hasClass(viewsSideNav, 'nav_selected')) {
  4443. 2491.  -         return;
  4444. 2492.  -       }
  4445. 2493.  -       addClass(viewsSideNav, 'nav_selected');
  4446. 2494.  -       removeClass(clicksSideNav, 'nav_selected');
  4447. 2495.  -     }
  4448. 2496.  -     if (clicksTabNav) {
  4449. 2497.  -       if (hasClass(viewsTabNav, 'summary_tab_sel')) {
  4450. 2498.  -         return;
  4451. 2499.  -       }
  4452. 2500.  -       addClass(viewsTabNav, 'summary_tab_sel');
  4453. 2501.  -       addClass(clicksTabNav, 'summary_tab');
  4454. 2502.  -       removeClass(viewsTabNav, 'summary_tab');
  4455. 2503.  -       removeClass(clicksTabNav, 'summary_tab_sel');
  4456. 2504.  -     }
  4457. 2505.  -   }
  4458. 2506.  -
  4459. 2507.  -   // Change graph
  4460. 2508.  -   if (name == 'clicks') {
  4461. 2509.  -     cur.lastDemographySourceOffset = 0;
  4462. 2510.  -     if (cur.isDemographySvg) {
  4463. 2511.  -       each(geByClass('ads_demography_bars_clicks'), function(i, el) { el.style.visibility = 'visible'; el.style.position = 'relative'; });
  4464. 2512.  -       each(geByClass('ads_demography_bars_views'),  function(i, el) { el.style.visibility = 'hidden';  el.style.position = 'absolute'; });
  4465. 2513.  -     } else {
  4466. 2514.  -       each(geByClass('ads_demography_bars_clicks'), show);
  4467. 2515.  -       each(geByClass('ads_demography_bars_views'),  hide);
  4468. 2516.  -     }
  4469. 2517.  -     try { cur.pageGraphs['ads_graph_users_stats_day_sex'].loadGraph(intval(cur.lastDemographySourceOffset)); } catch(e) {}
  4470. 2518.  -     try { cur.pageGraphs['ads_graph_users_stats_day_age'].loadGraph(intval(cur.lastDemographySourceOffset) * 3 + intval(cur.lastDemographyAgeOffset)); } catch(e) {}
  4471. 2519.  -     try { cur.pageGraphs['ads_graph_users_stats_day_cities'].loadGraph(intval(cur.lastDemographySourceOffset)); } catch(e) {}
  4472. 2520.  -   } else {
  4473. 2521.  -     cur.lastDemographySourceOffset = 1;
  4474. 2522.  -     if (cur.isDemographySvg) {
  4475. 2523.  -       each(geByClass('ads_demography_bars_views'),  function(i, el) { el.style.visibility = 'visible'; el.style.position = 'relative'; });
  4476. 2524.  -       each(geByClass('ads_demography_bars_clicks'), function(i, el) { el.style.visibility = 'hidden';  el.style.position = 'absolute'; });
  4477. 2525.  -     } else {
  4478. 2526.  -       each(geByClass('ads_demography_bars_views'),  show);
  4479. 2527.  -       each(geByClass('ads_demography_bars_clicks'), hide);
  4480. 2528.  -     }
  4481. 2529.  -     try { cur.pageGraphs['ads_graph_users_stats_day_sex'].loadGraph(intval(cur.lastDemographySourceOffset)); } catch(e) {}
  4482. 2530.  -     try { cur.pageGraphs['ads_graph_users_stats_day_age'].loadGraph(intval(cur.lastDemographySourceOffset) * 3 + intval(cur.lastDemographyAgeOffset)); } catch(e) {}
  4483. 2531.  -     try { cur.pageGraphs['ads_graph_users_stats_day_cities'].loadGraph(intval(cur.lastDemographySourceOffset)); } catch(e) {}
  4484. 2532.  -   }
  4485. 2533.  - }
  4486. 2534.  -
  4487. 2535.  - Ads.changeDemographyAge = function(name) {
  4488. 2536.  -   // Change navigation
  4489. 2537.  -   var allNav    = ge('ads_demography_navigation_tab_age_all').parentNode;
  4490. 2538.  -   var femaleNav = ge('ads_demography_navigation_tab_age_female').parentNode;
  4491. 2539.  -   var maleNav   = ge('ads_demography_navigation_tab_age_male').parentNode;
  4492. 2540.  -   switch (name) {
  4493. 2541.  -     case 'all':
  4494. 2542.  -       if (hasClass(allNav, 'summary_tab_sel')) {
  4495. 2543.  -         return;
  4496. 2544.  -       }
  4497. 2545.  -       addClass(allNav,       'summary_tab_sel');
  4498. 2546.  -       addClass(femaleNav,    'summary_tab');
  4499. 2547.  -       addClass(maleNav,      'summary_tab');
  4500. 2548.  -       removeClass(allNav,    'summary_tab');
  4501. 2549.  -       removeClass(femaleNav, 'summary_tab_sel');
  4502. 2550.  -       removeClass(maleNav,   'summary_tab_sel');
  4503. 2551.  -       break;
  4504. 2552.  -     case 'female':
  4505. 2553.  -       if (hasClass(femaleNav, 'summary_tab_sel')) {
  4506. 2554.  -         return;
  4507. 2555.  -       }
  4508. 2556.  -       addClass(femaleNav,    'summary_tab_sel');
  4509. 2557.  -       addClass(allNav,       'summary_tab');
  4510. 2558.  -       addClass(maleNav,      'summary_tab');
  4511. 2559.  -       removeClass(femaleNav, 'summary_tab');
  4512. 2560.  -       removeClass(allNav,    'summary_tab_sel');
  4513. 2561.  -       removeClass(maleNav,   'summary_tab_sel');
  4514. 2562.  -       break;
  4515. 2563.  -     case 'male':
  4516. 2564.  -       if (hasClass(maleNav, 'summary_tab_sel')) {
  4517. 2565.  -         return;
  4518. 2566.  -       }
  4519. 2567.  -       addClass(maleNav,      'summary_tab_sel');
  4520. 2568.  -       addClass(allNav,       'summary_tab');
  4521. 2569.  -       addClass(femaleNav,    'summary_tab');
  4522. 2570.  -       removeClass(maleNav,   'summary_tab');
  4523. 2571.  -       removeClass(allNav,    'summary_tab_sel');
  4524. 2572.  -       removeClass(femaleNav, 'summary_tab_sel');
  4525. 2573.  -       break;
  4526. 2574.  -     default:
  4527. 2575.  -       return;
  4528. 2576.  -   }
  4529. 2577.  -
  4530. 2578.  -   // Change graph
  4531. 2579.  -   switch (name) {
  4532. 2580.  -     case 'all':    cur.lastDemographyAgeOffset = 0; break;
  4533. 2581.  -     case 'female': cur.lastDemographyAgeOffset = 1; break;
  4534. 2582.  -     case 'male':   cur.lastDemographyAgeOffset = 2; break;
  4535. 2583.  -     default:       return;
  4536. 2584.  -   }
  4537. 2585.  -   try { cur.pageGraphs['ads_graph_users_stats_day_age'].loadGraph(intval(cur.lastDemographySourceOffset) * 3 + intval(cur.lastDemographyAgeOffset)); } catch(e) {}
  4538. 2586.  - }
  4539. 2587.  -
  4540. 2588.  - Ads.loadDemography = function(unionId) {
  4541. 2589.  -   if (!cur.demographyDelayed) {
  4542. 2590.  -     return true;
  4543. 2591.  -   }
  4544. 2592.  -   if (!Ads.lock('load_demography', lock, unlock)) {
  4545. 2593.  -     return false;
  4546. 2594.  -   }
  4547. 2595.  -
  4548. 2596.  -   var ajaxParams = {};
  4549. 2597.  -   ajaxParams.union_id = unionId;
  4550. 2598.  -
  4551. 2599.  -   ajax.post('/ads?act=a_users_stats', ajaxParams, {onDone: onComplete, onFail: onComplete});
  4552. 2600.  -
  4553. 2601.  -   function lock() {
  4554. 2602.  -     setStyle('ads_demography_navigation_tab_progress', {visibility: 'visible'});
  4555. 2603.  -   }
  4556. 2604.  -   function unlock() {
  4557. 2605.  -     setStyle('ads_demography_navigation_tab_progress', {visibility: 'hidden'});
  4558. 2606.  -   }
  4559. 2607.  -   function onComplete(response) {
  4560. 2608.  -     Ads.unlock('load_demography');
  4561. 2609.  -     if (response && response.graphs_html && response.graphs_js) {
  4562. 2610.  -       cur.demographyDelayed = false;
  4563. 2611.  -       ge('ads_demography_graphs_wrap2').innerHTML = response.graphs_html;
  4564. 2612.  -       eval(response.graphs_js);
  4565. 2613.  -       Ads.changeDemographyView('graphs', unionId, true);
  4566. 2614.  -     }
  4567. 2615.  -     return true;
  4568. 2616.  -   }
  4569. 2617.  -
  4570. 2618.  -   return false;
  4571. 2619.  - }
  4572. 2620.  -
  4573. 2621.  - Ads.showEditAdminBox = function(event, unionId, userId, userEmail, isRemove) {
  4574. 2622.  -   if (event && (event.which > 1 || event.button > 1 || event.ctrlKey)) {
  4575. 2623.  -     return;
  4576. 2624.  -   }
  4577. 2625.  -
  4578. 2626.  -   userId = intval(userId);
  4579. 2627.  -
  4580. 2628.  -   if (!userId && !userEmail) {
  4581. 2629.  -     var userLink = ge('ads_user_link').getValue();
  4582. 2630.  -     if (!userLink) {
  4583. 2631.  -       showFastBox(getLang('ads_error_box_title'), getLang('ads_edit_admin_no_user_link'));
  4584. 2632.  -       return;
  4585. 2633.  -     }
  4586. 2634.  -   }
  4587. 2635.  -
  4588. 2636.  -   if (isRemove) {
  4589. 2637.  -     cur.editAdminBoxTitle = getLang('ads_edit_admin_box_title_remove');
  4590. 2638.  -   } else {
  4591. 2639.  -     if (userId || userEmail) {
  4592. 2640.  -       cur.editAdminBoxTitle = getLang('ads_edit_admin_box_title_edit');
  4593. 2641.  -     } else {
  4594. 2642.  -       cur.editAdminBoxTitle = getLang('ads_edit_admin_box_title_add');
  4595. 2643.  -     }
  4596. 2644.  -   }
  4597. 2645.  -
  4598. 2646.  -   var ajaxParams = {};
  4599. 2647.  -   ajaxParams.union_id = unionId;
  4600. 2648.  -   if (isRemove) {
  4601. 2649.  -     ajaxParams.action = 'remove';
  4602. 2650.  -   } else {
  4603. 2651.  -     ajaxParams.action = 'edit';
  4604. 2652.  -   }
  4605. 2653.  -   if (userId) {
  4606. 2654.  -     ajaxParams.user_link = userId;
  4607. 2655.  -   } else if (userEmail) {
  4608. 2656.  -     ajaxParams.user_link = userEmail;
  4609. 2657.  -   } else {
  4610. 2658.  -     ajaxParams.user_link = userLink;
  4611. 2659.  -   }
  4612. 2660.  -
  4613. 2661.  -   var showOptions = {params: {}};
  4614. 2662.  -   showOptions.onFail = Ads.onBoxFail;
  4615. 2663.  -   showOptions.params.width = 440;
  4616. 2664.  -
  4617. 2665.  -   showBox('/ads?act=a_edit_admin_box', ajaxParams, showOptions);
  4618. 2666.  -
  4619. 2667.  -   return false;
  4620. 2668.  - }
  4621. 2669.  -
  4622. 2670.  - Ads.showRetargetingGroupActions = function(el, groupId) {
  4623. 2671.  -   cur.options.groupId = groupId;
  4624. 2672.  -   cur.uiRetargetingActions.setOptions({target: el});
  4625. 2673.  -   cur.uiRetargetingActions.show();
  4626. 2674.  - }
  4627. 2675.  -
  4628. 2676.  - Ads.showRetargetingGroupBox = function(act, addParams) {
  4629. 2677.  -   var ajaxParams = {};
  4630. 2678.  -   ajaxParams.union_id = cur.options.unionId;
  4631. 2679.  -   if (cur.options.groupId) {
  4632. 2680.  -     ajaxParams.group_id = cur.options.groupId;
  4633. 2681.  -   }
  4634. 2682.  -   if (addParams) {
  4635. 2683.  -     ajaxParams = extend(ajaxParams, addParams);
  4636. 2684.  -   }
  4637. 2685.  -
  4638. 2686.  -   var showOptions = {params: {}};
  4639. 2687.  -   showOptions.onFail = Ads.onBoxFail;
  4640. 2688.  -   showOptions.params = {width: 450, dark: true, hideButtons: true, bodyStyle: 'padding: 0;'};
  4641. 2689.  -
  4642. 2690.  -   showBox('/ads?act=a_retargeting_group_'+act+'_box', ajaxParams, showOptions);
  4643. 2691.  -
  4644. 2692.  -   return true;
  4645. 2693.  - }
  4646. 2694.  -
  4647. 2695.  - Ads.saveRetargetingGroupParam = function(id, v) {
  4648. 2696.  -   var el = ge('ads_retargeting_'+id);
  4649. 2697.  -   if (el) {
  4650. 2698.  -     v = trim(val(el));
  4651. 2699.  -   } else if (!el && v === undefined) {
  4652. 2700.  -     return;
  4653. 2701.  -   }
  4654. 2702.  -   hide(ads_retargeting_box_error);
  4655. 2703.  -
  4656. 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}, {
  4657. 2705.  -     onDone: function(value) {
  4658. 2706.  -       val('union_' + cur.options.groupId + '_' + id, value);
  4659. 2707.  -       cur.paramsTOs = cur.paramsTOs || {};
  4660. 2708.  -       var labelEl = ge('ads_retargeting_'+id+'_saved');
  4661. 2709.  -       if (labelEl) {
  4662. 2710.  -         Ads.toggleRetargetingInput(id, false);
  4663. 2711.  -
  4664. 2712.  -         setStyle(labelEl, 'opacity', 1);
  4665. 2713.  -         clearTimeout(cur.paramsTOs[id]);
  4666. 2714.  -         cur.paramsTOs[id] = setTimeout(function () {
  4667. 2715.  -           animate(labelEl, {opacity: 0}, 1000);
  4668. 2716.  -         }, 3000);
  4669. 2717.  -       } else {
  4670. 2718.  -         curBox().hide();
  4671. 2719.  -       }
  4672. 2720.  -     },
  4673. 2721.  -     onFail: function(msg) {
  4674. 2722.  -       ge('ads_retargeting_box_error').innerHTML = msg;
  4675. 2723.  -       show(ads_retargeting_box_error);
  4676. 2724.  -       return true;
  4677. 2725.  -     },
  4678. 2726.  -     showProgress: function() {
  4679. 2727.  -       var el = ge('ads_retargeting_save_'+id);
  4680. 2728.  -       if (el && el.tagName == 'BUTTON') {
  4681. 2729.  -         lockButton(el);
  4682. 2730.  -       }
  4683. 2731.  -     },
  4684. 2732.  -     hideProgress: function() {
  4685. 2733.  -       var el = ge('ads_retargeting_save_'+id);
  4686. 2734.  -       if (el && el.tagName == 'BUTTON') {
  4687. 2735.  -         unlockButton(el);
  4688. 2736.  -       }
  4689. 2737.  -     }
  4690. 2738.  -   });
  4691. 2739.  -
  4692. 2740.  -   return true;
  4693. 2741.  - }
  4694. 2742.  -
  4695. 2743.  - Ads.deleteRetargetingGroup = function() {
  4696. 2744.  -   if (!cur.options.unionId || !cur.options.groupId) {
  4697. 2745.  -     return false;
  4698. 2746.  -   }
  4699. 2747.  -
  4700. 2748.  -   cur.uiRetargetingActions.hide();
  4701. 2749.  -   var box = showFastBox(getLang('ads_retargeting_del_confirm_title'), getLang('ads_retargeting_del_confirm_message'), getLang('box_yes'), function() {
  4702. 2750.  -     ajax.post('/ads', {act: 'a_del_retargeting_group', union_id: cur.options.unionId, group_id: cur.options.groupId, hash: cur.options.del_hash}, {
  4703. 2751.  -       onDone: function(html) {
  4704. 2752.  -         ge('ads_retargeting_groups_table').innerHTML = html;
  4705. 2753.  -         curBox().hide();
  4706. 2754.  -       },
  4707. 2755.  -       showProgress: box.showProgress,
  4708. 2756.  -       hideProgress: box.hideProgress
  4709. 2757.  -     });
  4710. 2758.  -   }, getLang('box_no'));
  4711. 2759.  -
  4712. 2760.  -   return false;
  4713. 2761.  - }
  4714. 2762.  -
  4715. 2763.  - Ads.toggleRetargetingInput = function(id, show) {
  4716. 2764.  -   var link = ge('ads_retargeting_'+id+'_link'), input = ge('ads_retargeting_'+id);
  4717. 2765.  -   if (!link || !input) return false;
  4718. 2766.  -   if (!show && isVisible(link)) return false;
  4719. 2767.  -   toggle(link, !show);
  4720. 2768.  -   toggle(ge('ads_retargeting_'+id+'_input'), show);
  4721. 2769.  -   if (show) {
  4722. 2770.  -     input.select();
  4723. 2771.  -     if (!cur.values) cur.values = {};
  4724. 2772.  -     cur.values[id] = input.value;
  4725. 2773.  -   }
  4726. 2774.  -   return false;
  4727. 2775.  - },
  4728. 2776.  - Ads.retargetingInputChanged = function(id) {
  4729. 2777.  -   var new_val = trim(ge('ads_retargeting_'+id).value);
  4730. 2778.  -   var new_val_s = new_val;
  4731. 2779.  -   if (id == 'domain' && !new_val) {
  4732. 2780.  -     new_val_s = getLang('ads_retargeting_domain_not_set');
  4733. 2781.  -   } else if (!new_val) {
  4734. 2782.  -     return;
  4735. 2783.  -   }
  4736. 2784.  -   ge('ads_retargeting_'+id+'_text').innerHTML = new_val_s;
  4737. 2785.  -   ge('ads_retargeting_'+id).value = new_val;
  4738. 2786.  -   if (cur.values[id] != new_val) {
  4739. 2787.  -     Ads.saveRetargetingGroupParam(id);
  4740. 2788.  -     cur.values[id] = new_val;
  4741. 2789.  -   } else {
  4742. 2790.  -     Ads.toggleRetargetingInput(id, false);
  4743. 2791.  -   }
  4744. 2792.  - },
  4745. 2793.  -
  4746. 2794.  - Ads.initContacts = function(selectData, ajaxParams, isBig) {
  4747. 2795.  -
  4748. 2796.  -   if (cur.contacts && cur.contacts.destroy) {
  4749. 2797.  -     cur.contacts.destroy();
  4750. 2798.  -   }
  4751. 2799.  -
  4752. 2800.  -   var destroy = [];
  4753. 2801.  -
  4754. 2802.  -   cur.contacts = {};
  4755. 2803.  -   cur.contacts.ajaxParams = ajaxParams;
  4756. 2804.  -
  4757. 2805.  -   cur.contacts.destroy = function() {
  4758. 2806.  -     for (var i in destroy) {
  4759. 2807.  -       destroy[i]();
  4760. 2808.  -     }
  4761. 2809.  -     destroy = [];
  4762. 2810.  -   }
  4763. 2811.  -   cur.destroy.push(function() { cur.contacts.destroy(); });
  4764. 2812.  -
  4765. 2813.  -   var interestingEvents = 'keydown keyup keypress change paste cut drop input blur';
  4766. 2814.  -
  4767. 2815.  -   var uiWidth = 250 + (isBig ? 22 : 0);
  4768. 2816.  -
  4769. 2817.  -   var uiCountry = null;
  4770. 2818.  -   var uiCity = null;
  4771. 2819.  -
  4772. 2820.  -   ge('country').removeAttribute('autocomplete');
  4773. 2821.  -   uiCountry = new Dropdown(ge('country'), selectData.countries, {
  4774. 2822.  -     selectedItem: [selectData.country_val],
  4775. 2823.  -
  4776. 2824.  -     big: isBig,
  4777. 2825.  -     width: uiWidth,
  4778. 2826.  -     multiselect: false,
  4779. 2827.  -
  4780. 2828.  -     onChange: function(value) {
  4781. 2829.  -       Ads.onFormEdit();
  4782. 2830.  -       if (value == 1) {
  4783. 2831.  -         hide('ads_contacts_form_nonresident', 'cis_msg');
  4784. 2832.  -         show('ads_contacts_form_rus');
  4785. 2833.  -       } else if (value > 1) {
  4786. 2834.  -         hide('ads_contacts_form_rus');
  4787. 2835.  -         show('ads_contacts_form_nonresident');
  4788. 2836.  -         if (value < 4) show('cis_msg');
  4789. 2837.  -         else hide('cis_msg');
  4790. 2838.  -       }
  4791. 2839.  -       if (value == -1) {
  4792. 2840.  -         getAllCountries();
  4793. 2841.  -         return;
  4794. 2842.  -       } else if (value > 3) {
  4795. 2843.  -         hide('city_row');
  4796. 2844.  -         return;
  4797. 2845.  -       }
  4798. 2846.  -       uiCity.clear();
  4799. 2847.  -       uiCity.setURL('/select_ajax.php?act=a_get_cities&country=' + value);
  4800. 2848.  -       selectsData.getCountryInfo(value, 1, function(response) {
  4801. 2849.  -         var new_options = {
  4802. 2850.  -           defaultItems: response.cities,
  4803. 2851.  -           dropdown: true
  4804. 2852.  -         };
  4805. 2853.  -         uiCity.setOptions(new_options);
  4806. 2854.  -         if (selectData.country == value) {
  4807. 2855.  -           uiCity.selectItem(selectData.city_val);
  4808. 2856.  -         }
  4809. 2857.  -       });
  4810. 2858.  -       show(ge('city_row'));
  4811. 2859.  -     }
  4812. 2860.  -   });
  4813. 2861.  -   destroy.push(function(){ uiCountry.destroy(); });
  4814. 2862.  -
  4815. 2863.  -   ge('city').removeAttribute('autocomplete');
  4816. 2864.  -   uiCity = new Selector(ge('city'), '/select_ajax.php?act=a_get_cities&country='+selectData.country, {
  4817. 2865.  -     defaultItems: selectData.cities,
  4818. 2866.  -     selectedItems: [selectData.city_val],
  4819. 2867.  -
  4820. 2868.  -     big: isBig,
  4821. 2869.  -     width: uiWidth,
  4822. 2870.  -     multiselect: false,
  4823. 2871.  -     dropdown: true,
  4824. 2872.  -
  4825. 2873.  -     placeholder: getLang('select_city_not_selected'),
  4826. 2874.  -     introText: getLang('select_city_select'),
  4827. 2875.  -     noResult: getLang('select_city_not_found'),
  4828. 2876.  -     otherCity: getLang('select_city_other_city'),
  4829. 2877.  -
  4830. 2878.  -     onChange: function(value) {
  4831. 2879.  -       Ads.onFormEdit();
  4832. 2880.  -     }
  4833. 2881.  -   });
  4834. 2882.  -   destroy.push(function(){ uiCity.destroy(); });
  4835. 2883.  -
  4836. 2884.  -   var uiAgency = new Checkbox(ge('agency'), {
  4837. 2885.  -     checked: 1,
  4838. 2886.  -     width: uiWidth,
  4839. 2887.  -     label: getLang('ads_help_contacts_agency'),
  4840. 2888.  -
  4841. 2889.  -     onChange: function(value) {
  4842. 2890.  -       Ads.onFormEdit();
  4843. 2891.  -       if (value == 1) {
  4844. 2892.  -         slideDown(ge("agency_fields"), 200);
  4845. 2893.  -       } else {
  4846. 2894.  -         if (isVisible('agency_fields')) {
  4847. 2895.  -           slideUp(ge("agency_fields"), 200);
  4848. 2896.  -         }
  4849. 2897.  -       }
  4850. 2898.  -     }
  4851. 2899.  -   });
  4852. 2900.  -   destroy.push(function(){ uiAgency.destroy(); });
  4853. 2901.  -
  4854. 2902.  -   var uiDating = new Checkbox(ge('dating'), {
  4855. 2903.  -     checked: 0,
  4856. 2904.  -     width: uiWidth,
  4857. 2905.  -     label: getLang('ads_help_contacts_dating'),
  4858. 2906.  -
  4859. 2907.  -     onChange: function(value) {
  4860. 2908.  -       Ads.onFormEdit();
  4861. 2909.  -     }
  4862. 2910.  -   });
  4863. 2911.  -   destroy.push(function(){ uiDating.destroy(); });
  4864. 2912.  -
  4865. 2913.  -   var uiMedicine = new Checkbox(ge('medicine'), {
  4866. 2914.  -     checked: 0,
  4867. 2915.  -     width: uiWidth,
  4868. 2916.  -     label: getLang('ads_help_contacts_medicine'),
  4869. 2917.  -
  4870. 2918.  -     onChange: function(value) {
  4871. 2919.  -       Ads.onFormEdit();
  4872. 2920.  -     }
  4873. 2921.  -   });
  4874. 2922.  -   destroy.push(function(){ uiMedicine.destroy(); });
  4875. 2923.  -
  4876. 2924.  -   ge('budget').removeAttribute('autocomplete');
  4877. 2925.  -   var uiBudget = new Dropdown(ge('budget'), selectData.budget, {
  4878. 2926.  -     selectedItems: '0',
  4879. 2927.  -     big: isBig,
  4880. 2928.  -     width: uiWidth,
  4881. 2929.  -     zeroPlaceholder: true,
  4882. 2930.  -     multiselect: false,
  4883. 2931.  -
  4884. 2932.  -     onChange: function(value) {
  4885. 2933.  -       Ads.onFormEdit();
  4886. 2934.  -     }
  4887. 2935.  -   });
  4888. 2936.  -   destroy.push(function(){ uiBudget.destroy(); });
  4889. 2937.  -
  4890. 2938.  -   ge('budget_nr').removeAttribute('autocomplete');
  4891. 2939.  -   var uiBudgetNr = new Dropdown(ge('budget_nr'), selectData.budget, {
  4892. 2940.  -     selectedItems: '0',
  4893. 2941.  -     big: isBig,
  4894. 2942.  -     width: uiWidth,
  4895. 2943.  -     zeroPlaceholder: true,
  4896. 2944.  -     multiselect: false,
  4897. 2945.  -
  4898. 2946.  -     onChange: function(value) {
  4899. 2947.  -       Ads.onFormEdit();
  4900. 2948.  -     }
  4901. 2949.  -   });
  4902. 2950.  -   destroy.push(function(){ uiBudgetNr.destroy(); });
  4903. 2951.  -
  4904. 2952.  -   if (selectData.offices) {
  4905. 2953.  -     ge('office').removeAttribute('autocomplete');
  4906. 2954.  -     var uiOffice = new Dropdown(ge('office'), selectData.offices, {
  4907. 2955.  -       selectedItems: selectData.office,
  4908. 2956.  -       big: isBig,
  4909. 2957.  -       width: uiWidth,
  4910. 2958.  -       multiselect: false,
  4911. 2959.  -
  4912. 2960.  -       onChange: function(value) {
  4913. 2961.  -         Ads.onFormEdit();
  4914. 2962.  -       }
  4915. 2963.  -     });
  4916. 2964.  -     destroy.push(function(){ uiOffice.destroy(); });
  4917. 2965.  -   }
  4918. 2966.  -
  4919. 2967.  -   addEvent(ge('organisation'), interestingEvents, Ads.onFormEdit);
  4920. 2968.  -   destroy.push(function(){ cleanElems(ge('organisation')); });
  4921. 2969.  -   addEvent(ge('contact'), interestingEvents, Ads.onFormEdit);
  4922. 2970.  -   destroy.push(function(){ cleanElems(ge('contact')); });
  4923. 2971.  -   addEvent(ge('email'), interestingEvents, Ads.onFormEdit);
  4924. 2972.  -   destroy.push(function(){ cleanElems(ge('email')); });
  4925. 2973.  -   addEvent(ge('phone'), interestingEvents, Ads.onFormEdit);
  4926. 2974.  -   destroy.push(function(){ cleanElems(ge('phone')); });
  4927. 2975.  -   addEvent(ge('message'), interestingEvents, Ads.onFormEdit);
  4928. 2976.  -   destroy.push(function(){ cleanElems(ge('message')); });
  4929. 2977.  -   addEvent(ge('organisation_nr'), interestingEvents, Ads.onFormEdit);
  4930. 2978.  -   destroy.push(function(){ cleanElems(ge('organisation_nr')); });
  4931. 2979.  -   addEvent(ge('contact_nr'), interestingEvents, Ads.onFormEdit);
  4932. 2980.  -   destroy.push(function(){ cleanElems(ge('contact_nr')); });
  4933. 2981.  -   addEvent(ge('requisites_nr'), interestingEvents, Ads.onFormEdit);
  4934. 2982.  -   destroy.push(function(){ cleanElems(ge('requisites_nr')); });
  4935. 2983.  -   addEvent(ge('email_nr'), interestingEvents, Ads.onFormEdit);
  4936. 2984.  -   destroy.push(function(){ cleanElems(ge('email_nr')); });
  4937. 2985.  -   addEvent(ge('phone_nr'), interestingEvents, Ads.onFormEdit);
  4938. 2986.  -   destroy.push(function(){ cleanElems(ge('phone_nr')); });
  4939. 2987.  -   addEvent(ge('clients_nr'), interestingEvents, Ads.onFormEdit);
  4940. 2988.  -   destroy.push(function(){ cleanElems(ge('clients_nr')); });
  4941. 2989.  -   addEvent(ge('message_nr'), interestingEvents, Ads.onFormEdit);
  4942. 2990.  -   destroy.push(function(){ cleanElems(ge('message_nr')); });
  4943. 2991.  -
  4944. 2992.  -   function getAllCountries() {
  4945. 2993.  -     function onDone(response) {
  4946. 2994.  -       if (response && isArray(response.countries)) {
  4947. 2995.  -         response.countries.splice(0, 1);
  4948. 2996.  -         uiCountry.setData(response.countries);
  4949. 2997.  -         uiCountry.val('');
  4950. 2998.  -         uiCity.clear();
  4951. 2999.  -         uiCity.setOptions({defaultItems: []});
  4952. 3000.  -       }
  4953. 3001.  -     }
  4954. 3002.  -     ajax.post('/ads?act=a_get_countries', {}, {onDone: onDone});
  4955. 3003.  -   }
  4956. 3004.  - }
  4957. 3005.  -
  4958. 3006.  - Ads.sendContactsForm = function(button) {
  4959. 3007.  -   if (!Ads.lock('sendContactsForm', onLock, onUnlock)) {
  4960. 3008.  -     return false;
  4961. 3009.  -   }
  4962. 3010.  -
  4963. 3011.  -   var ajaxParams = extend({}, cur.contacts.ajaxParams);
  4964. 3012.  -   ajaxParams.country  = ge('country').value;
  4965. 3013.  -   ajaxParams.city     = ge('city').value;
  4966. 3014.  -   ajaxParams.agency   = ge('agency').value;
  4967. 3015.  -   ajaxParams.dating   = ge('dating').value;
  4968. 3016.  -   ajaxParams.medicine = ge('medicine').value;
  4969. 3017.  -   ajaxParams = extend(ajaxParams, serializeForm(ge(ajaxParams.country == 1 ? 'ads_contacts_form_rus' : 'ads_contacts_form_nonresident')));
  4970. 3018.  -
  4971. 3019.  -   ajax.post('/ads?act=a_send_contacts', ajaxParams, {onDone: onDone, onFail: onDone});
  4972. 3020.  -
  4973. 3021.  -   function onDone(response) {
  4974. 3022.  -     Ads.unlock('sendContactsForm');
  4975. 3023.  -     if (!response || !response.result) {
  4976. 3024.  -       if (!response || !response.msg) {
  4977. 3025.  -         tryErrorBox(getLang('ads_error_unexpected_error_try_later'));
  4978. 3026.  -       } else {
  4979. 3027.  -         tryErrorBox(response.msg);
  4980. 3028.  -       }
  4981. 3029.  -       return true;
  4982. 3030.  -     }
  4983. 3031.  -     ge('ads_contacts_form').innerHTML = response.msg;
  4984. 3032.  -   }
  4985. 3033.  -   function tryErrorBox(message) {
  4986. 3034.  -     showFastBox(getLang('global_error'), message);
  4987. 3035.  -   }
  4988. 3036.  -   function onLock() {
  4989. 3037.  -     lockButton(button);
  4990. 3038.  -   }
  4991. 3039.  -   function onUnlock() {
  4992. 3040.  -     unlockButton(button);
  4993. 3041.  -   }
  4994. 3042.  - }
  4995. 3043.  -
  4996. 3044.  - try{stManager.done('ads.js');}catch(e){}
  4997. ------
  4998. Файл - ads_edit.css (Старый размер - 13463 | Новый - 0):
  4999. 0.  - #ads_edit_css { display: none; }
  5000. 1.  -
  5001. 2.  - /* -------------- */
  5002. 3.  - /* Edit ad - main */
  5003. 4.  - /* -------------- */
  5004. 5.  -
  5005. 6.  - .ads_edit_page_wrap1 {
  5006. 7.  - }
  5007. 8.  - .ads_edit_page_wrap2 {
  5008. 9.  - }
  5009. 10.  - .ads_edit_page_wrap3 {
  5010. 11.  -   background-color: #F9F9F9;
  5011. 12.  -   padding: 20px;
  5012. 13.  - }
  5013. 14.  -
  5014. 15.  - #ads_page .error {
  5015. 16.  -   margin-bottom: 20px;
  5016. 17.  - }
  5017. 18.  -
  5018. 19.  - .ads_edit_panel_edit {
  5019. 20.  -   width: 540px;
  5020. 21.  - }
  5021. 22.  -
  5022. 23.  - .ads_edit_panel_link_object_wrap {
  5023. 24.  -   padding-top: 20px;
  5024. 25.  -   padding-bottom: 5px;
  5025. 26.  - }
  5026. 27.  -
  5027. 28.  - .ads_edit_table {
  5028. 29.  -   border: 0px;
  5029. 30.  -   border-collapse: collapse;
  5030. 31.  - }
  5031. 32.  -
  5032. 33.  - .ads_edit_label,
  5033. 34.  - .ads_edit_value {
  5034. 35.  -   padding: 0 0 10px 0;
  5035. 36.  -   vertical-align: top;
  5036. 37.  - }
  5037. 38.  -
  5038. 39.  - .ads_edit_label {
  5039. 40.  -   width: 190px;
  5040. 41.  -   text-align: right;
  5041. 42.  -   padding-right: 10px;
  5042. 43.  -   color: #666666;
  5043. 44.  - }
  5044. 45.  -
  5045. 46.  - .ads_edit_label_input_ui {
  5046. 47.  -   padding-top: 8px;
  5047. 48.  - }
  5048. 49.  - @-moz-document url-prefix() {
  5049. 50.  - .ads_edit_label_input_ui {
  5050. 51.  -   padding-top: 7px;
  5051. 52.  - }
  5052. 53.  - }
  5053. 54.  -
  5054. 55.  - .ads_edit_label_input {
  5055. 56.  -   padding-top: 8px;
  5056. 57.  - }
  5057. 58.  - @-moz-document url-prefix() {
  5058. 59.  - .ads_edit_label_input {
  5059. 60.  -   padding-top: 7px;
  5060. 61.  - }
  5061. 62.  - }
  5062. 63.  -
  5063. 64.  - .ads_edit_label_checkbox {
  5064. 65.  -   padding-top: 3px;
  5065. 66.  - }
  5066. 67.  - @-moz-document url-prefix() {
  5067. 68.  - .ads_edit_label_checkbox {
  5068. 69.  -   padding-top: 2px;
  5069. 70.  - }
  5070. 71.  - }
  5071. 72.  -
  5072. 73.  - .ads_edit_label_radiobutton {
  5073. 74.  -   padding-top: 6px;
  5074. 75.  - }
  5075. 76.  -
  5076. 77.  - .ads_edit_label_textarea {
  5077. 78.  -   padding-top: 8px;
  5078. 79.  - }
  5079. 80.  - @-moz-document url-prefix() {
  5080. 81.  - .ads_edit_label_textarea {
  5081. 82.  - }
  5082. 83.  -   padding-top: 7px;
  5083. 84.  - }
  5084. 85.  -
  5085. 86.  - .ads_edit_value .text {
  5086. 87.  -   width: 310px;
  5087. 88.  -   height: 17px;
  5088. 89.  -   line-height: 17px;
  5089. 90.  -   padding: 5px 6px 6px 10px;
  5090. 91.  - }
  5091. 92.  - @-moz-document url-prefix() {
  5092. 93.  - .ads_edit_value .text {
  5093. 94.  -   padding-left: 9px;
  5094. 95.  -   width: 311px;
  5095. 96.  - }
  5096. 97.  - }
  5097. 98.  - .ads_edit_value .ads_edit_value_range .text {
  5098. 99.  -   width: 142px;
  5099. 100.  - }
  5100. 101.  -
  5101. 102.  - .listing.ads_edit_help_listing {
  5102. 103.  -   margin-bottom: 0;
  5103. 104.  - }
  5104. 105.  -
  5105. 106.  - .ads_edit_value_range_from,
  5106. 107.  - .ads_edit_value_range_sep,
  5107. 108.  - .ads_edit_value_range_to {
  5108. 109.  - }
  5109. 110.  -
  5110. 111.  - .ads_edit_value_range_sep {
  5111. 112.  -   width: 10px;
  5112. 113.  - }
  5113. 114.  -
  5114. 115.  - .ads_edit_value_checkbox_wrap {
  5115. 116.  -   height: 20px
  5116. 117.  - }
  5117. 118.  - .ads_edit_value_checkbox_wrap2 {
  5118. 119.  -   padding: 1px 0;
  5119. 120.  - }
  5120. 121.  - .ads_edit_value_checkbox_wrap3 {
  5121. 122.  -   margin: -6px 0;
  5122. 123.  - }
  5123. 124.  -
  5124. 125.  - .ads_edit_value_tip {
  5125. 126.  -   font-size: 0.9em;
  5126. 127.  -   color: #777777;
  5127. 128.  -   width: 250px;
  5128. 129.  -   padding-top: 5px;
  5129. 130.  - }
  5130. 131.  -
  5131. 132.  - .ads_edit_separator_big {
  5132. 133.  -   border-bottom: 1px solid #DAE2E8;
  5133. 134.  -   height: 1px;
  5134. 135.  -   margin: 10px 0 20px 0;
  5135. 136.  - }
  5136. 137.  -
  5137. 138.  - .ads_edit_value_header {
  5138. 139.  -   color: #45688E;
  5139. 140.  -   font-size: 1.18em;
  5140. 141.  -   font-weight: bold;
  5141. 142.  -   padding-bottom: 5px;
  5142. 143.  - }
  5143. 144.  -
  5144. 145.  - /* ---------------- */
  5145. 146.  - /* Edit ad - common */
  5146. 147.  - /* ---------------- */
  5147. 148.  -
  5148. 149.  - .ads_edit_ad_row_header_radiobutton td {
  5149. 150.  -   padding-bottom: 4px;
  5150. 151.  - }
  5151. 152.  - #ads_edit_ad_row_targeting_header td,
  5152. 153.  - #ads_edit_ad_row_targeting_header .ads_edit_value_header {
  5153. 154.  -   padding-bottom: 0;
  5154. 155.  - }
  5155. 156.  -
  5156. 157.  - .ads_param_title_remain_wrap,
  5157. 158.  - .ads_param_description_remain_wrap,
  5158. 159.  - #ads_targeting_criterion_tags_remain {
  5159. 160.  -   font-size: 0.9em;
  5160. 161.  -   color: #777777;
  5161. 162.  -   padding-top: 6px;
  5162. 163.  - }
  5163. 164.  -
  5164. 165.  - #ads_param_category_more {
  5165. 166.  -   font-size: 0.9em;
  5166. 167.  -   padding-top: 6px;
  5167. 168.  - }
  5168. 169.  -
  5169. 170.  - /* ------------ */
  5170. 171.  - /* Edit ad - ad */
  5171. 172.  - /* ------------ */
  5172. 173.  -
  5173. 174.  - .ads_edit_ad_view_wrap {
  5174. 175.  -   text-align: center;
  5175. 176.  -   padding-right: 50px;
  5176. 177.  - }
  5177. 178.  - .ads_edit_ad_view_wrap.news {
  5178. 179.  -   padding-right: 0;
  5179. 180.  - }
  5180. 181.  -
  5181. 182.  - .ads_edit_panel_preview .ads_ad_box.news {
  5182. 183.  -   padding: 10px;
  5183. 184.  - }
  5184. 185.  -
  5185. 186.  - .ads_edit_panel_preview .ads_ad_box_border {
  5186. 187.  -   border-width: 1px;
  5187. 188.  -   background-color: white;
  5188. 189.  - }
  5189. 190.  -
  5190. 191.  - .ads_ad_play.empty {
  5191. 192.  -   background-image: url(/images/ad_video_empty.png);
  5192. 193.  - }
  5193. 194.  - .is_2x .ads_ad_play.empty {
  5194. 195.  -   background-image: url(/images/ad_video_empty_2x.png);
  5195. 196.  - }
  5196. 197.  -
  5197. 198.  - .ads_edit_ad_view_controls {
  5198. 199.  -   padding-top: 5px;
  5199. 200.  - }
  5200. 201.  -
  5201. 202.  - /* ------------------ */
  5202. 203.  - /* Edit ad - audience */
  5203. 204.  - /* ------------------ */
  5204. 205.  -
  5205. 206.  - #ads_edit_audience {
  5206. 207.  -   padding: 20px;
  5207. 208.  -   background-color: #EDF0F2;
  5208. 209.  -   width: 160px;
  5209. 210.  - }
  5210. 211.  - #ads_edit_audience_title,
  5211. 212.  - #ads_edit_recommended_cost_title {
  5212. 213.  -   color: #36638E;
  5213. 214.  -   font-size: 1.09em;
  5214. 215.  -   font-weight: bold;
  5215. 216.  -   padding-bottom: 5px;
  5216. 217.  - }
  5217. 218.  - #ads_edit_recommended_cost_title {
  5218. 219.  -   padding-top: 15px;
  5219. 220.  - }
  5220. 221.  -
  5221. 222.  - #ads_edit_audience_title,
  5222. 223.  - #ads_edit_audience_title_text {
  5223. 224.  -   position: relative;
  5224. 225.  - }
  5225. 226.  - #ads_edit_audience_progress {
  5226. 227.  -   display: none;
  5227. 228.  -   position: absolute;
  5228. 229.  -   top: 4px;
  5229. 230.  -   right: 0;
  5230. 231.  - }
  5231. 232.  -
  5232. 233.  - /* -------------- */
  5233. 234.  - /* Edit ad - link */
  5234. 235.  - /* -------------- */
  5235. 236.  -
  5236. 237.  - .ads_edit_link_type_item {
  5237. 238.  -   height: 60px;
  5238. 239.  -   width: 328px;
  5239. 240.  -   position: relative;
  5240. 241.  - }
  5241. 242.  - .ads_edit_link_type_item:hover {
  5242. 243.  -   background-color: #E6E9ED;
  5243. 244.  - }
  5244. 245.  - .ads_edit_link_type_item.selected,
  5245. 246.  - .ads_edit_link_type_item.selected.disabled,
  5246. 247.  - .ads_edit_link_type_item.selected.disabled:hover {
  5247. 248.  -   background-color: #6186AD;
  5248. 249.  -   opacity: 1;
  5249. 250.  - }
  5250. 251.  - .ads_edit_link_type_item:hover {
  5251. 252.  -   cursor: pointer;
  5252. 253.  - }
  5253. 254.  - .ads_edit_link_type_item.disabled,
  5254. 255.  - .ads_edit_link_type_item.disabled:hover {
  5255. 256.  -   background-color: transparent;
  5256. 257.  -   cursor: auto;
  5257. 258.  -   opacity: 0.5;
  5258. 259.  - }
  5259. 260.  -
  5260. 261.  - .ads_edit_link_type_item_title,
  5261. 262.  - .ads_edit_link_type_item_description {
  5262. 263.  -   padding-left: 66px;
  5263. 264.  - }
  5264. 265.  - .ads_edit_link_type_item_title {
  5265. 266.  -   font-size: 1.09em;
  5266. 267.  -   font-weight: bold;
  5267. 268.  -   padding-top: 14px;
  5268. 269.  - }
  5269. 270.  - .ads_edit_link_type_item_description {
  5270. 271.  -   padding-top: 4px;
  5271. 272.  - }
  5272. 273.  - .ads_edit_link_type_item .ads_edit_link_type_item_title,
  5273. 274.  - .ads_edit_link_type_item.disabled .ads_edit_link_type_item_title,
  5274. 275.  - .ads_edit_link_type_item.disabled:hover .ads_edit_link_type_item_title {
  5275. 276.  -   color: #4E6E90;
  5276. 277.  - }
  5277. 278.  - .ads_edit_link_type_item .ads_edit_link_type_item_description,
  5278. 279.  - .ads_edit_link_type_item.disabled .ads_edit_link_type_item_description,
  5279. 280.  - .ads_edit_link_type_item.disabled:hover .ads_edit_link_type_item_description {
  5280. 281.  -   color: #798087;
  5281. 282.  - }
  5282. 283.  - .ads_edit_link_type_item:hover .ads_edit_link_type_item_description {
  5283. 284.  -   color: #79828C;
  5284. 285.  - }
  5285. 286.  - .ads_edit_link_type_item.selected .ads_edit_link_type_item_title,
  5286. 287.  - .ads_edit_link_type_item.selected.disabled .ads_edit_link_type_item_title,
  5287. 288.  - .ads_edit_link_type_item.selected.disabled:hover .ads_edit_link_type_item_title {
  5288. 289.  -   color: white;
  5289. 290.  - }
  5290. 291.  - .ads_edit_link_type_item.selected .ads_edit_link_type_item_description,
  5291. 292.  - .ads_edit_link_type_item.selected.disabled .ads_edit_link_type_item_description,
  5292. 293.  - .ads_edit_link_type_item.selected.disabled:hover .ads_edit_link_type_item_description {
  5293. 294.  -   color: #D3E0EE;
  5294. 295.  - }
  5295. 296.  -
  5296. 297.  - .ads_edit_link_type_item_image {
  5297. 298.  -   position: absolute;
  5298. 299.  -   top: 11px;
  5299. 300.  -   left: 16px;
  5300. 301.  -   width: 38px;
  5301. 302.  -   height: 38px;
  5302. 303.  -   background-size: 38px auto;
  5303. 304.  - }
  5304. 305.  - .ads_edit_link_type_item .ads_edit_link_type_item_image {
  5305. 306.  -   background-image: url(/images/ads_link_type_icons.png);
  5306. 307.  - }
  5307. 308.  - .is_2x .ads_edit_link_type_item .ads_edit_link_type_item_image {
  5308. 309.  -   background-image: url(/images/ads_link_type_icons_2x.png);
  5309. 310.  - }
  5310. 311.  - .ads_edit_link_type_item.selected .ads_edit_link_type_item_image {
  5311. 312.  -   background-image: url(/images/ads_link_type_inv_icons.png);
  5312. 313.  - }
  5313. 314.  - .is_2x .ads_edit_link_type_item.selected .ads_edit_link_type_item_image {
  5314. 315.  -   background-image: url(/images/ads_link_type_inv_icons_2x.png);
  5315. 316.  - }
  5316. 317.  - #ads_param_link_type_community .ads_edit_link_type_item_image {
  5317. 318.  -   background-position: 0 0;
  5318. 319.  - }
  5319. 320.  - #ads_param_link_type_app_vk .ads_edit_link_type_item_image {
  5320. 321.  -   background-position: 0 -38px;
  5321. 322.  - }
  5322. 323.  - #ads_param_link_type_market .ads_edit_link_type_item_image {
  5323. 324.  -   background: none;
  5324. 325.  - }
  5325. 326.  - #ads_param_link_type_video .ads_edit_link_type_item_image {
  5326. 327.  -   background-position: 0 -76px;
  5327. 328.  - }
  5328. 329.  - #ads_param_link_type_app_mobile .ads_edit_link_type_item_image {
  5329. 330.  -   background-position: 0 -114px;
  5330. 331.  - }
  5331. 332.  - #ads_param_link_type_link .ads_edit_link_type_item_image {
  5332. 333.  -   background-position: 0 -152px;
  5333. 334.  - }
  5334. 335.  -
  5335. 336.  - #ads_param_upload_video_wrap {
  5336. 337.  -   padding-top: 10px;
  5337. 338.  - }
  5338. 339.  - .ads_edit_value_header_video {
  5339. 340.  -   padding-bottom: 15px;
  5340. 341.  - }
  5341. 342.  -
  5342. 343.  - a.ads_edit_link_go {
  5343. 344.  -   border-bottom: 1px dashed #A7B7C9;
  5344. 345.  -   padding-right: 8px;
  5345. 346.  -   background: url(/images/wikiextarr.gif) no-repeat right 4px;
  5346. 347.  - }
  5347. 348.  - a.ads_edit_link_go:hover {
  5348. 349.  -   text-decoration: none;
  5349. 350.  -   border-bottom: 1px solid #A7B7C9;
  5350. 351.  - }
  5351. 352.  -
  5352. 353.  - #ads_param_link_id_go_wrap,
  5353. 354.  - #ads_param_link_url_go_wrap,
  5354. 355.  - #ads_param_link_video_go_wrap {
  5355. 356.  -   width: 1px;
  5356. 357.  -   padding: 7px 0 0 10px;
  5357. 358.  - }
  5358. 359.  - #ads_param_link_video_go_wrap {
  5359. 360.  -   padding-top: 5px;
  5360. 361.  - }
  5361. 362.  -
  5362. 363.  - #ads_param_link_domain_progress_wrap {
  5363. 364.  -   width: 1px;
  5364. 365.  - }
  5365. 366.  - #ads_param_link_domain_progress {
  5366. 367.  -   padding: 11px 0 0 5px;
  5367. 368.  - }
  5368. 369.  -
  5369. 370.  - /* -------------- */
  5370. 371.  - /* Edit ad - view */
  5371. 372.  - /* -------------- */
  5372. 373.  -
  5373. 374.  - .ads_edit_ad_format_type_new {
  5374. 375.  -   font-size: 0.91em;
  5375. 376.  -   font-weight: bold;
  5376. 377.  -   position: relative;
  5377. 378.  -   top: -5px;
  5378. 379.  - }
  5379. 380.  -
  5380. 381.  - #ads_param_title {
  5381. 382.  -   height: 34px;
  5382. 383.  - }
  5383. 384.  - #ads_param_description {
  5384. 385.  -   height: 68px;
  5385. 386.  - }
  5386. 387.  - #ads_param_title,
  5387. 388.  - #ads_param_description {
  5388. 389.  -   overflow: hidden;
  5389. 390.  -   resize: none;
  5390. 391.  - }
  5391. 392.  -
  5392. 393.  - #ads_edit_ad_row_additional .ads_edit_value_checkbox_wrap {
  5393. 394.  -   height: 26px;
  5394. 395.  - }
  5395. 396.  -
  5396. 397.  - #ads_edit_ad_row_upload_photo .ads_edit_value {
  5397. 398.  -   padding-bottom: 13px;
  5398. 399.  - }
  5399. 400.  -
  5400. 401.  - /* ------------------ */
  5401. 402.  - /* Edit ad - behavior */
  5402. 403.  - /* ------------------ */
  5403. 404.  -
  5404. 405.  - .ads_edit_value_cost_type_wrap {
  5405. 406.  -   height: 54px;
  5406. 407.  - }
  5407. 408.  -
  5408. 409.  - .ads_param_cost_per_click_currency_wrap {
  5409. 410.  -   padding: 8px 0 0 10px;
  5410. 411.  - }
  5411. 412.  - @-moz-document url-prefix() {
  5412. 413.  - .ads_param_cost_per_click_currency_wrap {
  5413. 414.  -   padding-top: 7px;
  5414. 415.  - }
  5415. 416.  - }
  5416. 417.  -
  5417. 418.  - .text#ads_param_cost_per_click {
  5418. 419.  -   width: 50px;
  5419. 420.  - }
  5420. 421.  -
  5421. 422.  - #ads_param_cost_per_click_recommended {
  5422. 423.  -   color: #777777;
  5423. 424.  -   font-size: 0.9em;
  5424. 425.  -   padding-top: 8px;
  5425. 426.  - }
  5426. 427.  -
  5427. 428.  - .ads_edit_value_campaign_type_wrap {
  5428. 429.  -   padding-bottom: 10px;
  5429. 430.  - }
  5430. 431.  -
  5431. 432.  - #ads_param_campaign_name_wrap {
  5432. 433.  -   min-height: 22px;
  5433. 434.  - }
  5434. 435.  -
  5435. 436.  - /* ------------------ */
  5436. 437.  - /* Edit ad - controls */
  5437. 438.  - /* ------------------ */
  5438. 439.  -
  5439. 440.  - .ads_edit_value_terms {
  5440. 441.  -   line-height: 160%;
  5441. 442.  - }
  5442. 443.  -
  5443. 444.  - #ads_edit_controls_buttons_row .button_blue,
  5444. 445.  - #ads_edit_link_object_buttons_row .button_blue {
  5445. 446.  -   margin-right: 10px;
  5446. 447.  - }
  5447. 448.  -
  5448. 449.  - /* ------------------- */
  5449. 450.  - /* Edit ad - targeting */
  5450. 451.  - /* ------------------- */
  5451. 452.  -
  5452. 453.  - .ads_edit_targeting_group_hider_title {
  5453. 454.  -   color: #555555;
  5454. 455.  -   font-size: 1.09em;
  5455. 456.  -   cursor: pointer;
  5456. 457.  -   font-weight: bold;
  5457. 458.  -   padding: 5px 0 5px 20px;
  5458. 459.  -   margin-left: -21px;
  5459. 460.  - }
  5460. 461.  - .ads_edit_targeting_group_hider_title.on {
  5461. 462.  -   background: url(/images/filterset_on.gif) no-repeat 1px 9px;
  5462. 463.  -   background-size: 9px 7px;
  5463. 464.  - }
  5464. 465.  - .is_2x .ads_edit_targeting_group_hider_title.on {
  5465. 466.  -   background-image: url(/images/filterset_on_2x.png);
  5466. 467.  - }
  5467. 468.  - .ads_edit_targeting_group_hider_title.off {
  5468. 469.  -   background: url(/images/filterset_off.gif) no-repeat 2px 8px;
  5469. 470.  -   background-size: 7px 9px;
  5470. 471.  - }
  5471. 472.  - .is_2x .ads_edit_targeting_group_hider_title.off {
  5472. 473.  -   background-image: url(/images/filterset_off_2x.png);
  5473. 474.  - }
  5474. 475.  - .ads_edit_targeting_group_hider_info {
  5475. 476.  -   color: #909090;
  5476. 477.  -   cursor: pointer;
  5477. 478.  - }
  5478. 479.  - .ads_edit_value.ads_edit_targeting_group_hider {
  5479. 480.  -   padding-top: 7px;
  5480. 481.  -   padding-bottom: 12px;
  5481. 482.  - }
  5482. 483.  - #ads_edit_targeting_group_demography_hider.ads_edit_value.ads_edit_targeting_group_hider,
  5483. 484.  - #ads_edit_targeting_group_graduation_hider.ads_edit_value.ads_edit_targeting_group_hider {
  5484. 485.  -   padding-bottom: 6px;
  5485. 486.  - }
  5486. 487.  - #ads_edit_targeting_group_interests_hider.ads_edit_value.ads_edit_targeting_group_hider,
  5487. 488.  - #ads_edit_targeting_group_additional_hider.ads_edit_value.ads_edit_targeting_group_hider {
  5488. 489.  -   padding-top: 13px;
  5489. 490.  - }
  5490. 491.  - .ads_edit_targeting_group {
  5491. 492.  - }
  5492. 493.  -
  5493. 494.  - .ads_edit_value_birthday_today {
  5494. 495.  -   padding-right: 5px;
  5495. 496.  - }
  5496. 497.  -
  5497. 498.  - #ads_edit_criterion_row_birthday .ads_edit_label,
  5498. 499.  - #ads_edit_criterion_row_birthday .ads_edit_value {
  5499. 500.  -   padding-bottom: 8px;
  5500. 501.  - }
  5501. 502.  -
  5502. 503.  - #ads_targeting_criterion_tags {
  5503. 504.  -   height: 52px;
  5504. 505.  -   min-height: 52px;
  5505. 506.  -   resize: vertical;
  5506. 507.  - }
  5507. 508.  -
  5508. 509.  - /* -------- */
  5509. 510.  - /* Tooltips */
  5510. 511.  - /* -------- */
  5511. 512.  -
  5512. 513.  - .ads_edit_tt.tt .tt_text {
  5513. 514.  -   padding: 0;
  5514. 515.  - }
  5515. 516.  -
  5516. 517.  - .ads_edit_tt_text {
  5517. 518.  -   padding: 10px;
  5518. 519.  -   width: 281px;
  5519. 520.  -   color: black;
  5520. 521.  -   line-height: 150%;
  5521. 522.  - }
  5522. 523.  -
  5523. 524.  - .ads_edit_tt_pointer {
  5524. 525.  -   background: url(/images/ddtooltip.png) no-repeat 0 0;
  5525. 526.  -   background-size: 16px 11px;
  5526. 527.  -   width: 8px;
  5527. 528.  -   height: 11px;
  5528. 529.  -   position: absolute;
  5529. 530.  -   left: -7px;
  5530. 531.  -   top: 38px;
  5531. 532.  -   overflow: hidden;
  5532. 533.  -   z-index: 10;
  5533. 534.  - }
  5534. 535.  - .is_2x .ads_edit_tt_pointer {
  5535. 536.  -   background-image: url(/images/ddtooltip_2x.png);
  5536. 537.  - }
  5537. 538.  -
  5538. 539.  - .ads_edit_tt_pointer.ads_edit_tt_pointer_category1_id {
  5539. 540.  -   top: 24px;
  5540. 541.  - }
  5541. 542.  -
  5542. 543.  - .ads_edit_tt_pointer.ads_edit_tt_pointer_views_limit_flag {
  5543. 544.  -   top: 19px;
  5544. 545.  - }
  5545. 546.  -
  5546. 547.  - .ads_edit_tt_pointer.ads_edit_tt_pointer_travellers {
  5547. 548.  -   top: 36px;
  5548. 549.  - }
  5549. 550.  -
  5550. 551.  - .ads_edit_tt_pointer.ads_edit_tt_pointer_positions {
  5551. 552.  -   top: 24px;
  5552. 553.  - }
  5553. 554.  -
  5554. 555.  - .ads_edit_tt_pointer.ads_edit_tt_pointer_pays_money {
  5555. 556.  -   top: 24px;
  5556. 557.  - }
  5557. 558.  -
  5558. 559.  - .ads_edit_tt_pointer.ads_edit_tt_pointer_tags {
  5559. 560.  -   top: 57px;
  5560. 561.  - }
  5561. 562.  -
  5562. 563.  - .ads_edit_tt_pointer.ads_edit_tt_pointer_domain {
  5563. 564.  -   top: 38px;
  5564. 565.  - }
  5565. 566.  -
  5566. 567.  - .ads_edit_tt_pointer.ads_edit_tt_pointer_expiration {
  5567. 568.  -   top: 32px;
  5568. 569.  - }
  5569. 570.  -
  5570. 571.  - /* -------- */
  5571. 572.  - /* Last ads */
  5572. 573.  - /* -------- */
  5573. 574.  -
  5574. 575.  - #ads_edit_last_ads_search {
  5575. 576.  -   background: url(/images/magglass.png) no-repeat 5px 6px #FFFFFF;
  5576. 577.  -   background-size: 11px 11px;
  5577. 578.  -   padding: 5px 0 5px 21px;
  5578. 579.  -   width: 100%;
  5579. 580.  - }
  5580. 581.  - .is_2x #ads_edit_last_ads_search {
  5581. 582.  -   background-image: url(/images/magglass_2x.png);
  5582. 583.  - }
  5583. 584.  -
  5584. 585.  - .ads_edit_last_ads_search_wrap1 {
  5585. 586.  -   padding: 10px;
  5586. 587.  -   border-bottom: solid 1px #CAD0D6;
  5587. 588.  -   background-color: #F7F7F7;
  5588. 589.  - }
  5589. 590.  -
  5590. 591.  - .ads_edit_last_ads_search_wrap2 {
  5591. 592.  -   margin-right: 22px;
  5592. 593.  - }
  5593. 594.  -
  5594. 595.  - #ads_edit_last_ads_content {
  5595. 596.  -   height: 400px;
  5596. 597.  -   padding: 20px 0 0 20px;
  5597. 598.  -   overflow-y: scroll;
  5598. 599.  - }
  5599. 600.  -
  5600. 601.  - #ads_edit_last_ads_no_result {
  5601. 602.  -   display: none;
  5602. 603.  -   padding-top: 150px;
  5603. 604.  -   font-size: 1.09em;
  5604. 605.  -   text-align: center;
  5605. 606.  -   color: #777777;
  5606. 607.  - }
  5607. 608.  -
  5608. 609.  - .ads_edit_last_ads_ad_wrap {
  5609. 610.  -   padding-right: 20px;
  5610. 611.  - }
  5611. 612.  -
  5612. 613.  - /* ------ */
  5613. 614.  - /* Upload */
  5614. 615.  - /* ------ */
  5615. 616.  -
  5616. 617.  - .ads_edit_upload_uploader {
  5617. 618.  -   text-align: center;
  5618. 619.  - }
  5619. 620.  -
  5620. 621.  - .ads_edit_upload_progress_wrap1 {
  5621. 622.  -   width: 250px;
  5622. 623.  - }
  5623. 624.  -
  5624. 625.  - /* -------------- */
  5625. 626.  - /* Upload - photo */
  5626. 627.  - /* -------------- */
  5627. 628.  -
  5628. 629.  - .ads_edit_upload_photo_box .error {
  5629. 630.  -   margin-bottom: 8px;
  5630. 631.  - }
  5631. 632.  -
  5632. 633.  - /* ------------------- */
  5633. 634.  - /* Upload - crop photo */
  5634. 635.  - /* ------------------- */
  5635. 636.  -
  5636. 637.  - .ads_edit_crop_photo_box .error {
  5637. 638.  -   margin-bottom: 8px;
  5638. 639.  - }
  5639. 640.  -
  5640. 641.  - .ads_edit_crop_photo_box .info_msg {
  5641. 642.  -   margin-bottom: 15px;
  5642. 643.  - }
  5643. 644.  -
  5644. 645.  - .ads_edit_crop_photo_ad.fl_l {
  5645. 646.  -   padding-top: 15px;
  5646. 647.  - }
  5647. 648.  -
  5648. 649.  - .ads_edit_crop_photo_ad .ads_ad_box_border.repeat_ver.news {
  5649. 650.  -   border-width: 0;
  5650. 651.  - }
  5651. 652.  -
  5652. 653.  - .ads_edit_crop_photo_ad .ads_ad_play {
  5653. 654.  -   cursor: move;
  5654. 655.  - }
  5655. 656.  -
  5656. 657.  - #ads_edit_crop_photo_big {
  5657. 658.  -   vertical-align: top;
  5658. 659.  - }
  5659. 660.  -
  5660. 661.  - #ads_edit_crop_photo_small_wrap {
  5661. 662.  -   margin: 0 auto;
  5662. 663.  - }
  5663. 664.  -
  5664. 665.  - /* -------------- */
  5665. 666.  - /* Upload - video */
  5666. 667.  - /* -------------- */
  5667. 668.  -
  5668. 669.  - .ads_edit_upload_video_box .error {
  5669. 670.  -   margin-bottom: 10px;
  5670. 671.  - }
  5671. 672.  -
  5672. 673.  - #ads_edit_upload_video_info {
  5673. 674.  -   margin-top: 15px;
  5674. 675.  - }
  5675. 676.  -
  5676. 677.  - #ads_edit_upload_video_external_wrap {
  5677. 678.  -   padding: 0 30px;
  5678. 679.  - }
  5679. 680.  -
  5680. 681.  - #ads_edit_upload_video_external_link_wrap {
  5681. 682.  -   margin-right: 12px;
  5682. 683.  - }
  5683. 684.  -
  5684. 685.  - #ads_edit_upload_video_external_link {
  5685. 686.  -   padding: 5px;
  5686. 687.  -   width: 100%;
  5687. 688.  - }
  5688. 689.  -
  5689. 690.  - #ads_edit_upload_video_external_error {
  5690. 691.  -   padding-top: 5px;
  5691. 692.  -   color: #777777;
  5692. 693.  - }
  5693. ------
Advertisement
Add Comment
Please, Sign In to add comment