Hormold

VK Change (#1393017304)

Feb 21st, 2014
203
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 51.70 KB | None | 0 0
  1. Файл - ads_moder.css (Старый размер - 12570 | Новый - 0):
  2. 0.  - #ads_moder_css { display: none; }
  3. 1.  -
  4. 2.  - /* ------- */
  5. 3.  - /* General */
  6. 4.  - /* ------- */
  7. 5.  -
  8. 6.  - .ads_overflow_hidden_wrap1 {
  9. 7.  -   overflow: hidden;
  10. 8.  - }
  11. 9.  - .ads_overflow_hidden_wrap2 {
  12. 10.  -   overflow: visible;
  13. 11.  -   white-space: nowrap;
  14. 12.  -   width: 1px;
  15. 13.  - }
  16. 14.  -
  17. 15.  - .ads_moder_tabs {
  18. 16.  -   padding-top: 0;
  19. 17.  - }
  20. 18.  - .ads_moder_tabs ul.t0 {
  21. 19.  -   width: auto;
  22. 20.  - }
  23. 21.  -
  24. 22.  - /* -- */
  25. 23.  - /* Ad */
  26. 24.  - /* -- */
  27. 25.  -
  28. 26.  - .ads_ad_char_hint {
  29. 27.  -   position: relative;
  30. 28.  - }
  31. 29.  - .ads_ad_char_hint_color {
  32. 30.  -   visibility: hidden;
  33. 31.  -   position: absolute;
  34. 32.  -   height: 1px;
  35. 33.  -   bottom: 0;
  36. 34.  -   left: 0;
  37. 35.  -   border-bottom: 1px solid red;
  38. 36.  -   overflow: hidden;
  39. 37.  - }
  40. 38.  - .ads_ad_box a:hover .ads_ad_char_hint_color {
  41. 39.  -   visibility: visible;
  42. 40.  - }
  43. 41.  -
  44. 42.  - /* ------- */
  45. 43.  - /* Markers */
  46. 44.  - /* ------- */
  47. 45.  -
  48. 46.  - .ads_marker_wrap_ad {
  49. 47.  -   position: relative;
  50. 48.  - }
  51. 49.  - .ads_marker_wrap {
  52. 50.  -   position: absolute;
  53. 51.  -   top: 1px;
  54. 52.  -   left: 1px;
  55. 53.  -   z-index: 10;
  56. 54.  - }
  57. 55.  - .ads_marker {
  58. 56.  -   float: left;
  59. 57.  -   width: 5px;
  60. 58.  -   height: 5px;
  61. 59.  -   margin-right: 2px;
  62. 60.  -   border-radius: 1px;
  63. 61.  - }
  64. 62.  - .ads_marker_wrap_ad:hover .ads_marker {
  65. 63.  -   width: 7px;
  66. 64.  -   height: 7px;
  67. 65.  -   border-radius: 2px;
  68. 66.  - }
  69. 67.  -
  70. 68.  - .ads_marker_target {
  71. 69.  -   background-color: #ff8000;
  72. 70.  - }
  73. 71.  - .ads_marker_clicked {
  74. 72.  -   background-color: #9966cc;
  75. 73.  - }
  76. 74.  - .ads_marker_closed {
  77. 75.  -   background-color: #00b2cc;
  78. 76.  - }
  79. 77.  - .ads_marker_viewed {
  80. 78.  -   background-color: #ff55aa;
  81. 79.  - }
  82. 80.  -
  83. 81.  - .ads_marker_offensive {
  84. 82.  -   background-color: #5090ff;
  85. 83.  - }
  86. 84.  - .ads_marker_porno {
  87. 85.  -   background-color: #ff2213;
  88. 86.  - }
  89. 87.  - .ads_marker_cheaters {
  90. 88.  -   background-color: #a0522d;
  91. 89.  - }
  92. 90.  - .ads_marker_against {
  93. 91.  -   background-color: #008000;
  94. 92.  - }
  95. 93.  -
  96. 94.  - .ads_marker_enabled {
  97. 95.  -   background-color: #00aa00;
  98. 96.  - }
  99. 97.  - .ads_marker_enabling {
  100. 98.  -   background-color: #CFB53B;
  101. 99.  - }
  102. 100.  - .ads_marker_approved {
  103. 101.  -   background-color: #0000dd;
  104. 102.  - }
  105. 103.  - .ads_marker_disapproved {
  106. 104.  -   background-color: #aa0000;
  107. 105.  - }
  108. 106.  - .ads_marker_archived {
  109. 107.  -   background-color: #333333;
  110. 108.  - }
  111. 109.  -
  112. 110.  - .ads_marker_request_manual {
  113. 111.  -   background-color: #e0b080;
  114. 112.  - }
  115. 113.  - .ads_marker_request_wrong {
  116. 114.  -   background-color: #00d07f;
  117. 115.  - }
  118. 116.  -
  119. 117.  - .ads_marker_target_tip {
  120. 118.  -   color: #ff8000;
  121. 119.  - }
  122. 120.  - .ads_marker_clicked_tip {
  123. 121.  -   color: #9966cc;
  124. 122.  - }
  125. 123.  - .ads_marker_closed_tip {
  126. 124.  -   color: #00b2cc;
  127. 125.  - }
  128. 126.  - .ads_marker_viewed_tip {
  129. 127.  -   color: #ff55aa;
  130. 128.  - }
  131. 129.  -
  132. 130.  - .ads_marker_offensive_tip {
  133. 131.  -   color: #5090ff;
  134. 132.  - }
  135. 133.  - .ads_marker_porno_tip {
  136. 134.  -   color: #ff2213;
  137. 135.  - }
  138. 136.  - .ads_marker_cheaters_tip {
  139. 137.  -   color: #a0522d;
  140. 138.  - }
  141. 139.  - .ads_marker_against_tip {
  142. 140.  -   color: #008000;
  143. 141.  - }
  144. 142.  -
  145. 143.  - .ads_marker_enabled_tip {
  146. 144.  -   color: #00aa00;
  147. 145.  - }
  148. 146.  - .ads_marker_enabling_tip {
  149. 147.  -   color: #CFB53B;
  150. 148.  - }
  151. 149.  - .ads_marker_approved_tip {
  152. 150.  -   color: #0000dd;
  153. 151.  - }
  154. 152.  - .ads_marker_disapproved_tip {
  155. 153.  -   color: #aa0000;
  156. 154.  - }
  157. 155.  - .ads_marker_archived_tip {
  158. 156.  -   color: #333333;
  159. 157.  - }
  160. 158.  -
  161. 159.  - .ads_marker_request_manual_tip {
  162. 160.  -   color: #e0b080;
  163. 161.  - }
  164. 162.  - .ads_marker_request_wrong_tip {
  165. 163.  -   color: #00d07f;
  166. 164.  - }
  167. 165.  -
  168. 166.  - .ads_marker_other_tip {
  169. 167.  -   color: #2b587a;
  170. 168.  - }
  171. 169.  - .ads_marker_grey_tip {
  172. 170.  -   color: grey;
  173. 171.  - }
  174. 172.  - /* #8B00ff */
  175. 173.  - /* 009090 */
  176. 174.  -
  177. 175.  - .ads_info_marker {
  178. 176.  -   position: absolute;
  179. 177.  -   z-index: 20;
  180. 178.  -   top: 2px;
  181. 179.  -   right: 2px;
  182. 180.  -
  183. 181.  -   background-color: #D5DDE5;
  184. 182.  -   border-radius: 3px;
  185. 183.  -   text-align: center;
  186. 184.  -
  187. 185.  -   width: 20px;
  188. 186.  -   height: 20px;
  189. 187.  -   line-height: 20px;
  190. 188.  -   font-size: 1px;
  191. 189.  -   opacity: 0.5;
  192. 190.  -
  193. 191.  -   display: none;
  194. 192.  - }
  195. 193.  - .ads_marker_wrap_ad:hover .ads_info_marker {
  196. 194.  -   display: block;
  197. 195.  -   text-decoration: none;
  198. 196.  - }
  199. 197.  - .ads_marker_wrap_ad .ads_info_marker:hover {
  200. 198.  -   font-size: 11px;
  201. 199.  -   opacity: 1;
  202. 200.  - }
  203. 201.  -
  204. 202.  - /* -------- */
  205. 203.  - /* Category */
  206. 204.  - /* -------- */
  207. 205.  -
  208. 206.  - .ads_category_wrap {
  209. 207.  -   max-width: 118px;
  210. 208.  -   margin-top: 4px;
  211. 209.  -   display: inline-block;
  212. 210.  -   font-size: 0.91em;
  213. 211.  -   position: relative;
  214. 212.  - }
  215. 213.  - .ads_category_wrap .ads_category_parent {
  216. 214.  -   position: absolute;
  217. 215.  -   z-index: 10;
  218. 216.  -   display: none;
  219. 217.  -   white-space: nowrap;
  220. 218.  -   padding-left: 5px;
  221. 219.  - }
  222. 220.  - .ads_category_wrap .ads_subcategory {
  223. 221.  -   font-weight: bold;
  224. 222.  - }
  225. 223.  - .ads_category_wrap:hover .ads_subcategory,
  226. 224.  - .ads_category_wrap:hover .ads_category_parent {
  227. 225.  -   background-color: white;
  228. 226.  - }
  229. 227.  - .ads_category_wrap:hover .ads_category_parent {
  230. 228.  -   display: inline;
  231. 229.  - }
  232. 230.  -
  233. 231.  - /* -------- */
  234. 232.  - /* Ads info */
  235. 233.  - /* -------- */
  236. 234.  -
  237. 235.  - .ads_info_premoderation_request .ads_ad_box.news {
  238. 236.  -   padding: 10px;
  239. 237.  - }
  240. 238.  - .ads_info_premoderation_request .ads_ad_box_border {
  241. 239.  -   border-width: 1px;
  242. 240.  - }
  243. 241.  - .ads_info_premoderation_request .label {
  244. 242.  -   color: grey;
  245. 243.  -   padding-right: 10px;
  246. 244.  - }
  247. 245.  - .ads_info_premoderation_request .info_msg {
  248. 246.  -   margin-top: 15px;
  249. 247.  - }
  250. 248.  - .ads_info_premoderation_request_info {
  251. 249.  -   line-height: 160%;
  252. 250.  - }
  253. 251.  - .ads_info_premoderation_request_info td {
  254. 252.  -   vertical-align: top;
  255. 253.  -   padding-bottom: 3px;
  256. 254.  - }
  257. 255.  - .ads_info_premoderation_request_ad_prev,
  258. 256.  - .ads_info_premoderation_request_ad_cur,
  259. 257.  - .ads_info_premoderation_request_arrow,
  260. 258.  - .ads_info_premoderation_request_info {
  261. 259.  -   padding-right: 15px;
  262. 260.  - }
  263. 261.  - .ads_info_premoderation_request_ad_prev,
  264. 262.  - .ads_info_premoderation_request_ad_cur,
  265. 263.  - .ads_info_premoderation_request_info {
  266. 264.  -   vertical-align: top;
  267. 265.  - }
  268. 266.  - .ads_info_premoderation_request_ad_prev,
  269. 267.  - .ads_info_premoderation_request_ad_cur {
  270. 268.  -   text-align: center;
  271. 269.  - }
  272. 270.  - .ads_info_premoderation_request_arrow {
  273. 271.  -   font-size: 30px;
  274. 272.  - }
  275. 273.  -
  276. 274.  - /* ------- */
  277. 275.  - /* All ads */
  278. 276.  - /* ------- */
  279. 277.  -
  280. 278.  - .ads_all_navigation_page {
  281. 279.  -   display: block;
  282. 280.  -   float: left;
  283. 281.  -   text-decoration: none !important;
  284. 282.  -   padding: 5px;
  285. 283.  -   margin: 0 3px 3px 0;
  286. 284.  -   border: 1px solid #DAE1E8;
  287. 285.  -   min-width: 45px;
  288. 286.  - }
  289. 287.  - .ads_all_navigation_page.current {
  290. 288.  -   font-weight: bold;
  291. 289.  - }
  292. 290.  -
  293. 291.  - .ads_all_ads_box {
  294. 292.  -   float: left;
  295. 293.  -   height: 300px;
  296. 294.  -   margin: 0 5px;
  297. 295.  - }
  298. 296.  -
  299. 297.  - .ads_all_ads_box .ads_ad_box_border {
  300. 298.  -   border-width: 1px;
  301. 299.  - }
  302. 300.  -
  303. 301.  - /* ------------- */
  304. 302.  - /* Premoderation */
  305. 303.  - /* ------------- */
  306. 304.  -
  307. 305.  - .ads_premoderation_requests {
  308. 306.  -   margin-right: -30px;
  309. 307.  - }
  310. 308.  - .ads_premoderation_request_wrap {
  311. 309.  -   float: left;
  312. 310.  -   height: 480px;
  313. 311.  -   margin: 10px 30px 0 0;
  314. 312.  - }
  315. 313.  - .ads_premoderation_request_wrap.first_of_3 {
  316. 314.  -   margin-right: 31px;
  317. 315.  - }
  318. 316.  -
  319. 317.  - .ads_premoderation_requests .ads_ad_box.news {
  320. 318.  -   padding: 10px;
  321. 319.  - }
  322. 320.  - .ads_premoderation_requests .ads_ad_box_border {
  323. 321.  -   border-width: 1px;
  324. 322.  - }
  325. 323.  -
  326. 324.  - .ads_premoderation_requests_office .label {
  327. 325.  -   padding-right: 10px;
  328. 326.  -   vertical-align: top;
  329. 327.  - }
  330. 328.  - .ads_premoderation_requests_office_columns {
  331. 329.  -   width: 100%;
  332. 330.  - }
  333. 331.  - .ads_premoderation_requests_office_column {
  334. 332.  -   vertical-align: top;
  335. 333.  - }
  336. 334.  - .ads_premoderation_requests_office_column_domains {
  337. 335.  -   text-align: right;
  338. 336.  - }
  339. 337.  - .ads_premoderation_requests_office_domains {
  340. 338.  -   display: inline-block;
  341. 339.  - }
  342. 340.  - .ads_premoderation_requests_office_domains .labeled {
  343. 341.  -   text-align: left;
  344. 342.  - }
  345. 343.  - .ads_premoderation_requests_office_domain_similar {
  346. 344.  -   color: #aa0000;
  347. 345.  - }
  348. 346.  -
  349. 347.  - .ads_premoderation_request {
  350. 348.  -   border: 1px solid #D3DBE1;
  351. 349.  -   padding: 3px;
  352. 350.  -   width: 283px;
  353. 351.  - }
  354. 352.  - .ads_premoderation_request.news {
  355. 353.  -   width: 440px;
  356. 354.  - }
  357. 355.  - .ads_premoderation_request_ad_wrap {
  358. 356.  -   vertical-align: top;
  359. 357.  -   text-align: center;
  360. 358.  -   padding-top: 5px;
  361. 359.  - }
  362. 360.  - .ads_premoderation_request_ad_wrap2 {
  363. 361.  -   display: inline-block;
  364. 362.  - }
  365. 363.  - .ads_premoderation_request_ad_page_link_wrap {
  366. 364.  -   font-size: 30px;
  367. 365.  -   text-align: center;
  368. 366.  -   line-height: 20px;
  369. 367.  -   overflow: hidden;
  370. 368.  - }
  371. 369.  - a.ads_premoderation_request_ad_page_link {
  372. 370.  -   text-decoration: none;
  373. 371.  - }
  374. 372.  - .ads_premoderation_request_ad_link_url_wrap {
  375. 373.  -   padding: 5px 3px 0 3px;
  376. 374.  - }
  377. 375.  - .ads_premoderation_request_notes_wrap {
  378. 376.  -   padding: 5px 3px 0 3px;
  379. 377.  - }
  380. 378.  - .ads_premoderation_request_comment_wrap {
  381. 379.  -   padding-top: 3px;
  382. 380.  - }
  383. 381.  - .ads_premoderation_request_comment_wrap2 {
  384. 382.  -   margin-right: 8px;
  385. 383.  - }
  386. 384.  - .ads_premoderation_request_comment {
  387. 385.  -   width: 100%;
  388. 386.  -   margin: 0;
  389. 387.  - }
  390. 388.  - .ads_premoderation_request_actions_wrap {
  391. 389.  -   padding-top: 8px;
  392. 390.  - }
  393. 391.  - .ads_premoderation_request_actions_wrap2 {
  394. 392.  -   width: 100%;
  395. 393.  -   border-collapse: collapse;
  396. 394.  - }
  397. 395.  - .ads_premoderation_request_reasons_wrap2 {
  398. 396.  -   position: relative;
  399. 397.  - }
  400. 398.  - .ads_premoderation_request_result_wrap {
  401. 399.  -   height: 20px;
  402. 400.  -   padding: 5px 3px 3px 3px;
  403. 401.  - }
  404. 402.  - .ads_premoderation_request_result {
  405. 403.  -   color: grey;
  406. 404.  - }
  407. 405.  -
  408. 406.  - .ads_premoderation_categories_edit_box .info_msg {
  409. 407.  -   margin-bottom: 15px;
  410. 408.  - }
  411. 409.  - .ads_premoderation_categories_edit_box .label {
  412. 410.  -   padding-top: 4px;
  413. 411.  -   color: grey;
  414. 412.  -   width: 150px;
  415. 413.  -   text-align: right;
  416. 414.  - }
  417. 415.  - .ads_premoderation_categories_edit_box .labeled {
  418. 416.  -   padding-bottom: 10px;
  419. 417.  - }
  420. 418.  -
  421. 419.  - .ads_premoderation_mass_progress_wrap2,
  422. 420.  - .ads_premoderation_mass_result {
  423. 421.  -   padding-top: 10px;
  424. 422.  - }
  425. 423.  - .ads_premoderation_mass_progress_wrap1 {
  426. 424.  -   width: 250px;
  427. 425.  - }
  428. 426.  -
  429. 427.  - .ads_premoderation_stat_moder_name_wrap {
  430. 428.  -   visibility: hidden;
  431. 429.  -   position: relative;
  432. 430.  - }
  433. 431.  - .ads_premoderation_stat_moder_name {
  434. 432.  -   visibility: visible;
  435. 433.  -   position: absolute;
  436. 434.  -   left: 0;
  437. 435.  -   top: 0;
  438. 436.  -   white-space: nowrap;
  439. 437.  - }
  440. 438.  - .ads_premoderation_stat_value_hint,
  441. 439.  - .ads_premoderation_stat_value_hint a {
  442. 440.  -  color: gray;
  443. 441.  - }
  444. 442.  -
  445. 443.  - /* ---- */
  446. 444.  - /* Logs */
  447. 445.  - /* ---- */
  448. 446.  -
  449. 447.  - table.ads_logs_users {
  450. 448.  -   border-collapse: collapse;
  451. 449.  - }
  452. 450.  - table.ads_logs_users td,
  453. 451.  - table.ads_logs_users th {
  454. 452.  -   padding: 2px 5px;
  455. 453.  - }
  456. 454.  -
  457. 455.  - table.ads_logs_info {
  458. 456.  -   border-collapse: collapse;
  459. 457.  - }
  460. 458.  - table.ads_logs_info td,
  461. 459.  - table.ads_logs_info th {
  462. 460.  -   padding: 1px 10px;
  463. 461.  - }
  464. 462.  -
  465. 463.  - /* ----------- */
  466. 464.  - /* Mobile apps */
  467. 465.  - /* ----------- */
  468. 466.  -
  469. 467.  - .ads_mobile_apps_filter {
  470. 468.  -   float: left;
  471. 469.  -   padding: 5px;
  472. 470.  -   margin: 0 5px 5px 5px;
  473. 471.  - }
  474. 472.  -
  475. 473.  - .ads_mobile_apps_type_icon {
  476. 474.  -   display: block;
  477. 475.  -   width: 11px;
  478. 476.  -   height: 11px;
  479. 477.  -   background-image: url(/images/profile_icons.gif);
  480. 478.  -   background-position: 0 -198px;
  481. 479.  - }
  482. 480.  - .ads_mobile_apps_type_icon.android {
  483. 481.  -   background-position: 0 -174px;
  484. 482.  - }
  485. 483.  - .ads_mobile_apps_type_icon.iphone {
  486. 484.  -   background-position: 0 -186px;
  487. 485.  - }
  488. 486.  - .ads_mobile_apps_type_icon.wphone {
  489. 487.  -   background-position: 0 -220px;
  490. 488.  - }
  491. 489.  -
  492. 490.  - .ads_mobile_apps_rating_icon {
  493. 491.  -   display: block;
  494. 492.  -   width: 20px;
  495. 493.  -   height: 20px;
  496. 494.  -   background-image: url(/images/icons/im_actions_iconset2.png);
  497. 495.  -   background-position: 0 -239px;
  498. 496.  - }
  499. 497.  -
  500. 498.  - .ads_mobile_apps_photo_icon {
  501. 499.  -   display: block;
  502. 500.  -   width: 11px;
  503. 501.  -   height: 11px;
  504. 502.  -   background-image: url(/images/profile_icons.gif);
  505. 503.  -   margin: 4px 0 0 10px;
  506. 504.  - }
  507. 505.  - .ads_mobile_apps_photo_icon.no_center {
  508. 506.  -   margin-left: 0;
  509. 507.  - }
  510. 508.  -
  511. 509.  - .ads_mobile_apps_photo_wrap {
  512. 510.  -   display: block;
  513. 511.  -   position: relative;
  514. 512.  -   height: 32px;
  515. 513.  -   width: 32px;
  516. 514.  - }
  517. 515.  - .ads_mobile_apps_photo_wrap .ads_mobile_apps_photo {
  518. 516.  -   position: absolute;
  519. 517.  -   height: 32px;
  520. 518.  -   left: 0;
  521. 519.  -   top: 0;
  522. 520.  - }
  523. 521.  - .ads_mobile_apps_photo_wrap:hover .ads_mobile_apps_photo {
  524. 522.  -   height: auto;
  525. 523.  -   left: 32px;
  526. 524.  - }
  527. 525.  -
  528. 526.  - /* ------------ */
  529. 527.  - /* Stat summary */
  530. 528.  - /* ------------ */
  531. 529.  -
  532. 530.  - .ads_moder_stat_summary_range_wrap {
  533. 531.  -   margin-top: -2px;
  534. 532.  - }
  535. 533.  - @-moz-document url-prefix() {
  536. 534.  - .ads_moder_stat_summary_range_wrap {
  537. 535.  -   margin-top: -1px;
  538. 536.  - }
  539. 537.  - }
  540. 538.  - .ads_moder_stat_summary_range_part {
  541. 539.  -   padding-left: 8px;
  542. 540.  - }
  543. 541.  - .ads_moder_stat_summary_range_label {
  544. 542.  -   padding-top: 5px;
  545. 543.  - }
  546. 544.  - @-moz-document url-prefix() {
  547. 545.  - .ads_moder_stat_summary_range_label {
  548. 546.  -   padding-top: 4px;
  549. 547.  - }
  550. 548.  - }
  551. 549.  - #ads_moder_stat_summary_range_link {
  552. 550.  -   opacity: 0.5;
  553. 551.  -   display: block;
  554. 552.  -   padding: 1px;
  555. 553.  - }
  556. 554.  - #ads_moder_stat_summary_range_link:hover {
  557. 555.  -   opacity: 1;
  558. 556.  - }
  559. 557.  - #ads_moder_stat_summary_range_link img {
  560. 558.  -   display: block;
  561. 559.  - }
  562. 560.  -
  563. 561.  - #ads_moder_stat_summary_filter_properties_shower {
  564. 562.  -   display: block;
  565. 563.  -   padding: 3px 8px 8px 8px;
  566. 564.  - }
  567. 565.  -
  568. 566.  - .ads_stat_summary_graph_link {
  569. 567.  -   height: 11px;
  570. 568.  -   overflow: visible;
  571. 569.  - }
  572. 570.  - .ads_stat_summary_graph_image {
  573. 571.  -   display: block;
  574. 572.  -   margin-top: -1px;
  575. 573.  - }
  576. 574.  -
  577. 575.  - /* ----- */
  578. 576.  - /* Other */
  579. 577.  - /* ----- */
  580. 578.  -
  581. 579.  - .ads_navigation_link.current {
  582. 580.  -   font-weight: bold;
  583. 581.  - }
  584. 582.  -
  585. 583.  - .ads_note {
  586. 584.  -   padding-bottom: 5px;
  587. 585.  - }
  588. 586.  - .ads_note_object {
  589. 587.  -   font-weight: bold;
  590. 588.  - }
  591. 589.  - .ads_note_info {
  592. 590.  -   color: #999999;
  593. 591.  -   font-size: 0.91em;
  594. 592.  - }
  595. 593.  - .ads_note_info_user,
  596. 594.  - .ads_note_info_edit_link {
  597. 595.  -   color: #999999;
  598. 596.  - }
  599. 597.  - .ads_note_edit_link {
  600. 598.  -   display: block;
  601. 599.  - }
  602. 600.  - .ads_note_edit_wrap {
  603. 601.  -   margin-right: 8px;
  604. 602.  - }
  605. 603.  - #ads_note_edit {
  606. 604.  -   width: 100%;
  607. 605.  -   height: 100px;
  608. 606.  - }
  609. 607.  -
  610. 608.  - /* --- */
  611. 609.  - /* OLD */
  612. 610.  - /* --- */
  613. 611.  -
  614. 612.  - #ads_unions_bonuses * {
  615. 613.  -   text-align: left;
  616. 614.  - }
  617. 615.  -
  618. 616.  - #ads_unions_queue .ads_unions_list td,
  619. 617.  - #ads_unions_queue .ads_unions_list th {
  620. 618.  -   text-align: left;
  621. 619.  - }
  622. 620.  -
  623. 621.  - #ads_premoderation_stat .ads_unions_list th.column_moder *,
  624. 622.  - #ads_premoderation_stat .ads_unions_list td.column_moder,
  625. 623.  - #ads_premoderation_stat .ads_unions_list th.column_period *,
  626. 624.  - #ads_premoderation_stat .ads_unions_list td.column_period {
  627. 625.  -   text-align: left;
  628. 626.  - }
  629. 627.  -
  630. 628.  - /* Distribution chart */
  631. 629.  - .ads_moder_chart_table_wrap {
  632. 630.  -   position: relative;
  633. 631.  - }
  634. 632.  - .ads_moder_chart_table {
  635. 633.  -   background-color: #F3F5F7;
  636. 634.  -   border: 0 none;
  637. 635.  -   margin-bottom: 10px;
  638. 636.  -   vertical-align: bottom;
  639. 637.  -   margin: 0 auto;
  640. 638.  - }
  641. 639.  - .ads_moder_chart_table td.ads_moder_total_chart_row {
  642. 640.  -   background-color: #FFFFFF;
  643. 641.  -   color:#45688E;
  644. 642.  -   border: 0 none;
  645. 643.  -   padding-top: 10px;
  646. 644.  -   padding-bottom: 30px;
  647. 645.  -   vertical-align: bottom;
  648. 646.  - }
  649. 647.  - .ads_moder_chart_column {
  650. 648.  -   background-color: #B0C1CF;
  651. 649.  -   vertical-align: bottom;
  652. 650.  -   cursor: pointer;
  653. 651.  - }
  654. 652.  - .ads_moder_chart_column.even {
  655. 653.  -   background-color: #C7D3DD;
  656. 654.  - }
  657. 655.  - .ads_moder_chart_table td {
  658. 656.  -   vertical-align: bottom;
  659. 657.  - }
  660. 658.  - .ads_moder_chart_table td.ads_moder_chart_under_num {
  661. 659.  -   background-color: #EAEEF2;
  662. 660.  -   height: 15px;
  663. 661.  -   padding-bottom: 3px;
  664. 662.  - }
  665. 663.  - .ads_moder_chart_table td.ads_moder_chart_under_num.even {
  666. 664.  -   background-color: #FFFFFF;
  667. 665.  - }
  668. 666.  - .ads_moder_chart_date {
  669. 667.  -   font-size: 9px;
  670. 668.  -   height: 10px;
  671. 669.  -   padding-top: 4px;
  672. 670.  -   text-align: center;
  673. 671.  - }
  674. 672.  - .ads_moder_chart_max_label {
  675. 673.  -   background-color: #FFFFFF;
  676. 674.  -   color: #000000;
  677. 675.  -   display: none;
  678. 676.  -   font-size: 9px;
  679. 677.  -   padding: 2px 4px;
  680. 678.  -   position: absolute;
  681. 679.  -   z-index: 100;
  682. 680.  - }
  683. 681.  - .ads_moder_chart_max_label_out {
  684. 682.  -   background-color: #2B587A;
  685. 683.  -   display: none;
  686. 684.  -   opacity: 0.2;
  687. 685.  -   position: absolute;
  688. 686.  -   z-index: 90;
  689. 687.  - }
  690. 688.  - .ads_moder_chart_max_label_out2 {
  691. 689.  -   background-color: #2B587A;
  692. 690.  -   display: none;
  693. 691.  -   opacity: 0.1;
  694. 692.  -   position: absolute;
  695. 693.  -   z-index: 90;
  696. 694.  - }
  697. ------
  698. Файл - ads_moder.js (Старый размер - 27910 | Новый - 0):
  699. 0.  - var AdsModer = {};
  700. 1.  -
  701. 2.  - AdsModer.init = function() {
  702. 3.  -   AdsModer.initDelayedImages();
  703. 4.  - }
  704. 5.  -
  705. 6.  - AdsModer.initDelayedImages = function() {
  706. 7.  -   var imagesIndex;
  707. 8.  -   var indexStep = 500;
  708. 9.  -   var lastImage;
  709. 10.  -   var lastImageY;
  710. 11.  -
  711. 12.  -   buildIndex();
  712. 13.  -   if (isEmpty(imagesIndex)) {
  713. 14.  -     return;
  714. 15.  -   }
  715. 16.  -
  716. 17.  -   var scrolledNode = (browser.msie6 ? pageNode : window);
  717. 18.  -   var handler = checkImages.pbind(false);
  718. 19.  -   function deinit() {
  719. 20.  -     removeEvent(scrolledNode, 'scroll', handler);
  720. 21.  -   }
  721. 22.  -   cur.destroy.push(deinit);
  722. 23.  -   addEvent(scrolledNode, 'scroll', handler);
  723. 24.  -   handler();
  724. 25.  -
  725. 26.  -   function buildIndex() {
  726. 27.  -     if (lastImage && lastImage.hasAttribute('src_') && lastImageY == getXY(lastImage)[1]) {
  727. 28.  -       return;
  728. 29.  -     }
  729. 30.  -
  730. 31.  -     var imagesAll = geByTag('img');
  731. 32.  -     var image;
  732. 33.  -     var indexKey;
  733. 34.  -
  734. 35.  -     imagesIndex = {};
  735. 36.  -
  736. 37.  -     if (!imagesAll.length) {
  737. 38.  -       return;
  738. 39.  -     }
  739. 40.  -
  740. 41.  -     for (var i = 0, image; image = imagesAll[i]; i++) {
  741. 42.  -       if (!image.hasAttribute('src_')) {
  742. 43.  -         continue;
  743. 44.  -       }
  744. 45.  -       indexKey = intval(getXY(image)[1] / indexStep);
  745. 46.  -       if (!(indexKey in imagesIndex)) {
  746. 47.  -         imagesIndex[indexKey] = [];
  747. 48.  -       }
  748. 49.  -       imagesIndex[indexKey].push(image);
  749. 50.  -       lastImage = image;
  750. 51.  -     }
  751. 52.  -
  752. 53.  -     lastImageY = getXY(lastImage)[1];
  753. 54.  -   }
  754. 55.  -
  755. 56.  -   function checkIndex() {
  756. 57.  -     buildIndex();
  757. 58.  -     if (isEmpty(imagesIndex)) {
  758. 59.  -       deinit();
  759. 60.  -     }
  760. 61.  -   }
  761. 62.  -
  762. 63.  -   function checkImages(delayed) {
  763. 64.  -     var yTop        = scrollGetY()
  764. 65.  -     var yBottom     = yTop + lastWindowHeight;
  765. 66.  -     var indexTop    = intval(yTop / indexStep);
  766. 67.  -     var indexBottom = intval(yBottom / indexStep);
  767. 68.  -     var image;
  768. 69.  -     for (var i = indexTop; i <= indexBottom; i++) {
  769. 70.  -       if (!(i in imagesIndex)) {
  770. 71.  -         continue;
  771. 72.  -       }
  772. 73.  -       for (var j = 0, len = imagesIndex[i].length; j < len; j++) {
  773. 74.  -         image = imagesIndex[i][j];
  774. 75.  -         image.src = image.getAttribute('src_');
  775. 76.  -         image.removeAttribute('src_')
  776. 77.  -       }
  777. 78.  -       delete imagesIndex[i];
  778. 79.  -     }
  779. 80.  -     checkIndex();
  780. 81.  -     setTimeout(checkIndex, 1000);
  781. 82.  -   }
  782. 83.  - }
  783. 84.  -
  784. 85.  - AdsModer.showObjectInfo = function(objectType, objectId) {
  785. 86.  -   var ajaxParams = {};
  786. 87.  -   ajaxParams.object_type = objectType;
  787. 88.  -   ajaxParams.object_id   = objectId;
  788. 89.  -
  789. 90.  -   var showOptions = {params: {}};
  790. 91.  -
  791. 92.  -   showBox('/adsmoder?act=object_info', ajaxParams, showOptions);
  792. 93.  - }
  793. 94.  -
  794. 95.  - AdsModer.openFeaturesEditBox = function(unionId, hash, featuresInfo, featuresEditHtml) {
  795. 96.  -   var editBox = showFastBox({title: '�����������', width: 550}, featuresEditHtml);
  796. 97.  -   var saveFeaturesHandler = AdsModer.saveFeatures.pbind(unionId, hash, featuresInfo, editBox);
  797. 98.  -   editBox.removeButtons();
  798. 99.  -   editBox.addButton(getLang('box_cancel'), false, 'no');
  799. 100.  -   editBox.addButton('��������', saveFeaturesHandler, 'yes');
  800. 101.  -
  801. 102.  -   for (var i in featuresInfo) {
  802. 103.  -     var featureInfo = featuresInfo[i];
  803. 104.  -     new Checkbox(ge('ads_moder_feature_' + featureInfo.key), {
  804. 105.  -       label: featureInfo.name,
  805. 106.  -       checked: intval(featureInfo.value),
  806. 107.  -       width: 500
  807. 108.  -     });
  808. 109.  -   }
  809. 110.  - }
  810. 111.  -
  811. 112.  - AdsModer.saveFeatures = function(unionId, hash, featuresInfo, editBox) {
  812. 113.  -   if (!Ads.lock('saveFeatures', onLock, onUnlock)) {
  813. 114.  -     return;
  814. 115.  -   }
  815. 116.  -
  816. 117.  -   var ajaxParams = {};
  817. 118.  -   ajaxParams.union_id = unionId;
  818. 119.  -   ajaxParams.hash = hash;
  819. 120.  -   ajaxParams.features = [];
  820. 121.  -   for (var i in featuresInfo) {
  821. 122.  -     var featureInfo = featuresInfo[i];
  822. 123.  -     ajaxParams.features.push(featureInfo.key + ':' + intval(ge('ads_moder_feature_' + featureInfo.key).value));
  823. 124.  -   }
  824. 125.  -   ajaxParams.features = ajaxParams.features.join(',');
  825. 126.  -
  826. 127.  -   ajax.post('/adsmoder?act=a_edit_features', ajaxParams, {onDone: onComplete, onFail: onComplete});
  827. 128.  -
  828. 129.  -   function onComplete(response) {
  829. 130.  -     Ads.unlock('saveFeatures');
  830. 131.  -     if (response && response.ok) {
  831. 132.  -       nav.reload();
  832. 133.  -     } else {
  833. 134.  -       showFastBox('������', '������');
  834. 135.  -     }
  835. 136.  -     return true;
  836. 137.  -   }
  837. 138.  -   function onLock() {
  838. 139.  -     editBox.showProgress();
  839. 140.  -   }
  840. 141.  -   function onUnlock() {
  841. 142.  -     editBox.hide();
  842. 143.  -   }
  843. 144.  - }
  844. 145.  -
  845. 146.  - AdsModer.openNoteEditBox = function(ajaxParams, noteText, noteTextParams, boxTitle, editActionText, isEdit, isOtherUser) {
  846. 147.  -   function onBoxHide() {
  847. 148.  -     delete cur.noteEditBox;
  848. 149.  -     delete cur.noteEditAjaxParams;
  849. 150.  -   }
  850. 151.  -
  851. 152.  -   cur.noteEditAjaxParams = ajaxParams;
  852. 153.  -
  853. 154.  -   var boxHtml = '<div class="ads_note_edit_wrap"><div><textarea id="ads_note_edit" ' + noteTextParams + '>' + noteText + '</textarea></div></div>';
  854. 155.  -
  855. 156.  -   cur.noteEditBox = showFastBox({title: boxTitle, width: 400, onHide: onBoxHide}, boxHtml);
  856. 157.  -   cur.noteEditBox.removeButtons();
  857. 158.  -   if (isOtherUser) {
  858. 159.  -     cur.noteEditBox.addButton(getLang('box_cancel'), false, 'yes');
  859. 160.  -   } else {
  860. 161.  -     cur.noteEditBox.addButton(getLang('box_cancel'), false, 'no');
  861. 162.  -     cur.noteEditBox.addButton(editActionText, AdsModer.saveNote.pbind(false), 'yes');
  862. 163.  -   }
  863. 164.  -   if (isEdit) {
  864. 165.  -     cur.noteEditBox.setControlsText('<a href="#" onclick="AdsModer.saveNote(true); return false;">�������</a>');
  865. 166.  -   }
  866. 167.  - }
  867. 168.  -
  868. 169.  - AdsModer.saveNote = function(isDelete) {
  869. 170.  -   if (!Ads.lock('save_note', onLock, onUnlock)) {
  870. 171.  -     return;
  871. 172.  -   }
  872. 173.  -
  873. 174.  -   var ajaxParams = {};
  874. 175.  -   ajaxParams = extend({}, ajaxParams, cur.noteEditAjaxParams);
  875. 176.  -   ajaxParams.note_text = (isDelete ? '' : ge('ads_note_edit').value);
  876. 177.  -   ajax.post('/adsmoder?act=a_edit_notes', ajaxParams, {onDone: onComplete, onFail: onComplete});
  877. 178.  -
  878. 179.  -   function onComplete(response) {
  879. 180.  -     Ads.unlock('save_note');
  880. 181.  -     if (response && response.ok) {
  881. 182.  -       nav.reload();
  882. 183.  -     } else {
  883. 184.  -       showFastBox({title: '������', onHide: function() { nav.reload(); }}, '������');
  884. 185.  -     }
  885. 186.  -     return true;
  886. 187.  -   }
  887. 188.  -   function onLock() {
  888. 189.  -     cur.noteEditBox.showProgress();
  889. 190.  -   }
  890. 191.  -   function onUnlock() {
  891. 192.  -     cur.noteEditBox.hide();
  892. 193.  -   }
  893. 194.  - }
  894. 195.  -
  895. 196.  - AdsModer.openCategoriesEditBox = function(requestKey, linkElem) {
  896. 197.  -   var editBox = showFastBox({title: '��������� �������� ����������', width: 440}, cur.categoriesEditBoxHtml);
  897. 198.  -   editBox.removeButtons();
  898. 199.  -   editBox.addButton(getLang('box_cancel'), false, 'no');
  899. 200.  -   editBox.addButton('��������', applyChanges, 'yes');
  900. 201.  -
  901. 202.  -   var requestParams = cur.requestsParams[requestKey];
  902. 203.  -
  903. 204.  -   var category1_id    = requestParams.ui_category1_id;
  904. 205.  -   var category2_id    = requestParams.ui_category2_id;
  905. 206.  -   var subcategory1_id = requestParams.ui_subcategory1_id;
  906. 207.  -   var subcategory2_id = requestParams.ui_subcategory2_id;
  907. 208.  -
  908. 209.  -   var uiCategory1 = new Dropdown(ge('ads_moder_category1'), cur.categoriesData, {
  909. 210.  -     selectedItems: category1_id,
  910. 211.  -     width:         250,
  911. 212.  -     height:        400,
  912. 213.  -     onChange:      onChangeCategory1
  913. 214.  -   });
  914. 215.  -   var uiCategory2 = new Dropdown(ge('ads_moder_category2'), cur.categoriesData, {
  915. 216.  -     selectedItems: category2_id,
  916. 217.  -     width:         250,
  917. 218.  -     height:        400,
  918. 219.  -     onChange:      onChangeCategory2
  919. 220.  -   });
  920. 221.  -   var uiSubcategory1 = new Dropdown(ge('ads_moder_subcategory1'), [], {
  921. 222.  -     width:    250,
  922. 223.  -     height:   400,
  923. 224.  -     onChange: function(value) {
  924. 225.  -       subcategory1_id = intval(value);
  925. 226.  -     }
  926. 227.  -   });
  927. 228.  -   var uiSubcategory2 = new Dropdown(ge('ads_moder_subcategory2'), [], {
  928. 229.  -     width:    250,
  929. 230.  -     height:   400,
  930. 231.  -     onChange: function(value) {
  931. 232.  -       subcategory2_id = intval(value);
  932. 233.  -     }
  933. 234.  -   });
  934. 235.  -
  935. 236.  -   onChangeCategory1(category1_id);
  936. 237.  -   onChangeCategory2(category2_id);
  937. 238.  -
  938. 239.  -   var boxOptions = {};
  939. 240.  -   boxOptions.onClean = function() {
  940. 241.  -     uiCategory1.destroy();
  941. 242.  -     uiCategory2.destroy();
  942. 243.  -     uiSubcategory1.destroy();
  943. 244.  -     uiSubcategory2.destroy();
  944. 245.  -   };
  945. 246.  -   editBox.setOptions(boxOptions);
  946. 247.  -
  947. 248.  -   function onChangeCategory1(value) {
  948. 249.  -     value = intval(value);
  949. 250.  -     if (value != category1_id) {
  950. 251.  -       subcategory1_id = 0;
  951. 252.  -     }
  952. 253.  -     category1_id = value;
  953. 254.  -     var data = cur.subcategoriesData[value] || [];
  954. 255.  -     var disabledText = (value ? getLang('ads_no_subcategories') : getLang('ads_first_select_category1'));
  955. 256.  -     uiSubcategory1.setOptions({disabledText: disabledText});
  956. 257.  -     uiSubcategory1.setData(data);
  957. 258.  -     if (subcategory1_id) {
  958. 259.  -       uiSubcategory1.val(subcategory1_id);
  959. 260.  -     } else {
  960. 261.  -       uiSubcategory1.clear();
  961. 262.  -     }
  962. 263.  -     uiSubcategory1.disable(data.length == 0);
  963. 264.  -   }
  964. 265.  -   function onChangeCategory2(value) {
  965. 266.  -     value = intval(value);
  966. 267.  -     if (value != category2_id) {
  967. 268.  -       subcategory2_id = 0;
  968. 269.  -     }
  969. 270.  -     category2_id = value;
  970. 271.  -     var data = cur.subcategoriesData[value] || [];
  971. 272.  -     var disabledText = (value ? getLang('ads_no_subcategories') : getLang('ads_first_select_category2'));
  972. 273.  -     uiSubcategory2.setOptions({disabledText: disabledText});
  973. 274.  -     uiSubcategory2.setData(data);
  974. 275.  -     if (subcategory2_id) {
  975. 276.  -       uiSubcategory2.val(subcategory2_id);
  976. 277.  -     } else {
  977. 278.  -       uiSubcategory2.clear();
  978. 279.  -     }
  979. 280.  -     uiSubcategory2.disable(data.length == 0);
  980. 281.  -   }
  981. 282.  -   function applyChanges() {
  982. 283.  -     if (!category1_id && !category2_id) {
  983. 284.  -       showFastBox('������', '�� ������ ��������.');
  984. 285.  -       return;
  985. 286.  -     }
  986. 287.  -
  987. 288.  -     cur.requestsParams[requestKey].category1_id       = (subcategory1_id || category1_id);
  988. 289.  -     cur.requestsParams[requestKey].category2_id       = (subcategory2_id || category2_id);
  989. 290.  -     cur.requestsParams[requestKey].ui_category1_id    = category1_id;
  990. 291.  -     cur.requestsParams[requestKey].ui_category2_id    = category2_id;
  991. 292.  -     cur.requestsParams[requestKey].ui_subcategory1_id = subcategory1_id;
  992. 293.  -     cur.requestsParams[requestKey].ui_subcategory2_id = subcategory2_id;
  993. 294.  -     cur.requestsParams[requestKey].categories_changed = true;
  994. 295.  -
  995. 296.  -     var category1Elem       = geByClass1('ads_category1', linkElem);
  996. 297.  -     var category1ParentElem = geByClass1('ads_category1_parent', linkElem);
  997. 298.  -     if (subcategory1_id) {
  998. 299.  -       replaceClass(category1Elem, 'ads_category', 'ads_subcategory');
  999. 300.  -       category1Elem.innerHTML = uiSubcategory1.val_full()[1];
  1000. 301.  -       category1ParentElem.innerHTML = ' (' + uiCategory1.val_full()[1] + ')';
  1001. 302.  -     } else {
  1002. 303.  -       replaceClass(category1Elem, 'ads_subcategory', 'ads_category');
  1003. 304.  -       category1Elem.innerHTML = (category1_id ? uiCategory1.val_full()[1] : '');
  1004. 305.  -       category1ParentElem.innerHTML = '';
  1005. 306.  -     }
  1006. 307.  -
  1007. 308.  -     var category2Elem       = geByClass1('ads_category2', linkElem);
  1008. 309.  -     var category2ParentElem = geByClass1('ads_category2_parent', linkElem);
  1009. 310.  -     if (subcategory2_id) {
  1010. 311.  -       replaceClass(category2Elem, 'ads_category', 'ads_subcategory');
  1011. 312.  -       category2Elem.innerHTML = uiSubcategory2.val_full()[1];
  1012. 313.  -       category2ParentElem.innerHTML = ' (' + uiCategory2.val_full()[1] + ')';
  1013. 314.  -     } else {
  1014. 315.  -       replaceClass(category2Elem, 'ads_subcategory', 'ads_category');
  1015. 316.  -       category2Elem.innerHTML = (category2_id ? uiCategory2.val_full()[1] : '');
  1016. 317.  -       category2ParentElem.innerHTML = '';
  1017. 318.  -     }
  1018. 319.  -
  1019. 320.  -     editBox.hide();
  1020. 321.  -   }
  1021. 322.  - }
  1022. 323.  -
  1023. 324.  - AdsModer.premoderationProcessRequest = function(action, requestKey, requestKeyModer, onCompleteExternal) {
  1024. 325.  -
  1025. 326.  -   var requestParams      = cur.requestsParams[requestKey];
  1026. 327.  -   var requestParamsModer = cur.requestsParams[requestKeyModer];
  1027. 328.  -
  1028. 329.  -   if (!requestKey || !requestKeyModer || !requestParams || !requestParamsModer) {
  1029. 330.  -     return;
  1030. 331.  -   }
  1031. 332.  -
  1032. 333.  -   var result = AdsModer.premoderationProcessRequestsMassCheck(action, requestKey);
  1033. 334.  -   if (result) {
  1034. 335.  -     return;
  1035. 336.  -   }
  1036. 337.  -
  1037. 338.  -   var moderComment = ge('moder_comment_' + requestKeyModer);
  1038. 339.  -   var resultArea   = ge('request_result_area_' + requestKey);
  1039. 340.  -
  1040. 341.  -   var ajaxParams = {};
  1041. 342.  -   ajaxParams.action       = action;
  1042. 343.  -   ajaxParams.request_id   = requestParams.request_id;
  1043. 344.  -   ajaxParams.ad_id        = requestParams.ad_id;
  1044. 345.  -   ajaxParams.hash         = requestParams.hash;
  1045. 346.  -   ajaxParams.checksum     = requestParams.checksum_all;
  1046. 347.  -
  1047. 348.  -   if (action === 'approve') {
  1048. 349.  -     if (requestParamsModer.categories_changed) {
  1049. 350.  -       ajaxParams.category1_id = requestParamsModer.category1_id;
  1050. 351.  -       ajaxParams.category2_id = requestParamsModer.category2_id;
  1051. 352.  -     } else {
  1052. 353.  -       ajaxParams.category1_id = requestParams.category1_id;
  1053. 354.  -       ajaxParams.category2_id = requestParams.category2_id;
  1054. 355.  -     }
  1055. 356.  -   }
  1056. 357.  -
  1057. 358.  -   ajaxParams.moder_comment = moderComment.getValue();
  1058. 359.  -   if (action === 'disapprove') {
  1059. 360.  -     ajaxParams.moder_rules = cur.uiReasonsControls[requestKeyModer].getSelectedItems().join(',');
  1060. 361.  -   }
  1061. 362.  -
  1062. 363.  -   resultArea.innerHTML = '<img src="/images/upload.gif" />';
  1063. 364.  -
  1064. 365.  -   ajax.post('/adsmoder?act=a_premoderation_process', ajaxParams, {onDone: onComplete, onFail: onComplete});
  1065. 366.  -
  1066. 367.  -   function onComplete(response) {
  1067. 368.  -     var responseText = ((response && response.text) ? response.text : '������!');
  1068. 369.  -     resultArea.innerHTML = responseText;
  1069. 370.  -     if (isFunction(onCompleteExternal)) {
  1070. 371.  -       onCompleteExternal(response, requestKey, responseText);
  1071. 372.  -     }
  1072. 373.  -     return true;
  1073. 374.  -   };
  1074. 375.  - }
  1075. 376.  -
  1076. 377.  - AdsModer.premoderationProcessRequestsMassCheck = function(action, requestKey) {
  1077. 378.  -
  1078. 379.  -   var requestParams = cur.requestsParams[requestKey];
  1079. 380.  -
  1080. 381.  -   var requestsKeys = [];
  1081. 382.  -
  1082. 383.  -   if (action === 'approve') {
  1083. 384.  -     if (requestParams.categories_changed) {
  1084. 385.  -       if (cur.requestsChecksumsApproveWithoutCategories[requestParams.checksum_approve_without_categories].length < 5) {
  1085. 386.  -         return false;
  1086. 387.  -       }
  1087. 388.  -       requestsKeys = cur.requestsChecksumsApproveWithoutCategories[requestParams.checksum_approve_without_categories];
  1088. 389.  -     } else {
  1089. 390.  -       if (cur.requestsChecksumsApproveWithCategories[requestParams.checksum_approve_with_categories].length < 5) {
  1090. 391.  -         return false;
  1091. 392.  -       }
  1092. 393.  -       requestsKeys = cur.requestsChecksumsApproveWithCategories[requestParams.checksum_approve_with_categories];
  1093. 394.  -     }
  1094. 395.  -   } else if (action === 'disapprove') {
  1095. 396.  -     if (cur.requestsChecksumsDisapprove[requestParams.checksum_disapprove].length < 5) {
  1096. 397.  -       return false;
  1097. 398.  -     }
  1098. 399.  -     requestsKeys = cur.requestsChecksumsDisapprove[requestParams.checksum_disapprove];
  1099. 400.  -   }
  1100. 401.  -
  1101. 402.  -   var confirmTitle   = ((action === 'approve') ? '�������� ���������' : '�������� ����������');
  1102. 403.  -   var confirmText    = '������� ���������� �� ������� ��������: '+requestsKeys.length;
  1103. 404.  -   var processAllText = ((action === 'approve') ? '�������� ���' : '��������� ���');
  1104. 405.  -   var processOneText = ((action === 'approve') ? '�������� ����' : '��������� ����');
  1105. 406.  -
  1106. 407.  -   var box = showFastBox(confirmTitle, cur.massBoxHtml, processAllText, processAll, processOneText, processOne);
  1107. 408.  -   geByClass1('ads_premoderation_mass_confirm_text', box.bodyNode).innerHTML = confirmText;
  1108. 409.  -
  1109. 410.  -   return true;
  1110. 411.  -
  1111. 412.  -   function processAll() {
  1112. 413.  -     cleanChecksums();
  1113. 414.  -     AdsModer.premoderationProcessRequestsMass(action, requestKey, requestsKeys, box);
  1114. 415.  -   }
  1115. 416.  -   function processOne() {
  1116. 417.  -     cleanChecksums();
  1117. 418.  -     box.hide();
  1118. 419.  -     AdsModer.premoderationProcessRequest(action, requestKey, requestKey);
  1119. 420.  -   }
  1120. 421.  -   function cleanChecksums() {
  1121. 422.  -     cur.requestsChecksumsApproveWithCategories[requestParams.checksum_approve_with_categories] = [];
  1122. 423.  -     cur.requestsChecksumsApproveWithoutCategories[requestParams.checksum_approve_without_categories] = [];
  1123. 424.  -     cur.requestsChecksumsDisapprove[requestParams.checksum_disapprove] = [];
  1124. 425.  -   }
  1125. 426.  - }
  1126. 427.  -
  1127. 428.  - AdsModer.premoderationProcessRequestsMass = function(action, requestKeyModer, requestsKeys, box) {
  1128. 429.  -   var requestParams = cur.requestsParams[requestKeyModer];
  1129. 430.  -
  1130. 431.  -   var totalCount       = requestsKeys.length;
  1131. 432.  -   var completeCount    = 0;
  1132. 433.  -   var approvedCount    = 0;
  1133. 434.  -   var disapprovedCount = 0;
  1134. 435.  -   var errorCount       = 0;
  1135. 436.  -   var responseInfos    = [];
  1136. 437.  -
  1137. 438.  -   box.removeButtons();
  1138. 439.  -   box.addButton(getLang('box_close'), false, 'yes');
  1139. 440.  -
  1140. 441.  -   var progressWrapElem = geByClass1('ads_premoderation_mass_progress_wrap2', box.bodyNode);
  1141. 442.  -   var progressElem     = geByClass1('ads_gradient_progress', box.bodyNode);
  1142. 443.  -   var resultElem       = geByClass1('ads_premoderation_mass_result', box.bodyNode);
  1143. 444.  -   var resultTextElem   = geByClass1('ads_premoderation_mass_result_text', box.bodyNode);
  1144. 445.  -   var resultMoreElem   = geByClass1('ads_premoderation_mass_result_more', box.bodyNode);
  1145. 446.  -   drawProgress();
  1146. 447.  -   show(progressWrapElem);
  1147. 448.  -
  1148. 449.  -   for (var i = 0; requestKey = requestsKeys[i]; i++) {
  1149. 450.  -     setTimeout(AdsModer.premoderationProcessRequest.pbind(action, requestKey, requestKeyModer, onComplete), 200 * i);
  1150. 451.  -   }
  1151. 452.  -
  1152. 453.  -   function onComplete(response, responseRequestKey, responseText) {
  1153. 454.  -     var responseAdId = cur.requestsParams[responseRequestKey].ad_id;
  1154. 455.  -     responseInfos.push('<a href="/ads?act=office&union_id='+responseAdId+'" target="_blank">'+responseAdId+' - '+responseText+'</a>');
  1155. 456.  -
  1156. 457.  -     if (response && (response.approved || response.disapproved)) {
  1157. 458.  -       if (response.approved) {
  1158. 459.  -         approvedCount++;
  1159. 460.  -       }
  1160. 461.  -       if (response.disapproved) {
  1161. 462.  -         disapprovedCount++;
  1162. 463.  -       }
  1163. 464.  -     } else {
  1164. 465.  -       errorCount++;
  1165. 466.  -     }
  1166. 467.  -     completeCount++;
  1167. 468.  -
  1168. 469.  -     drawProgress();
  1169. 470.  -     if (completeCount == totalCount) {
  1170. 471.  -       setTimeout(drawResults, 1000);
  1171. 472.  -     }
  1172. 473.  -   }
  1173. 474.  -   function drawProgress() {
  1174. 475.  -     var percent = intval(completeCount / totalCount * 100);
  1175. 476.  -     setStyle(progressElem, {width: percent + '%'});
  1176. 477.  -   }
  1177. 478.  -   function drawResults() {
  1178. 479.  -     hide(progressWrapElem);
  1179. 480.  -
  1180. 481.  -     var resultText = '';
  1181. 482.  -     if (approvedCount) {
  1182. 483.  -       resultText += '��������: '+approvedCount+'<br>';
  1183. 484.  -     }
  1184. 485.  -     if (disapprovedCount) {
  1185. 486.  -       resultText += '���������: '+disapprovedCount+'<br>';
  1186. 487.  -     }
  1187. 488.  -     resultText += '������: '+errorCount+'<br>';
  1188. 489.  -
  1189. 490.  -     resultTextElem.innerHTML = resultText;
  1190. 491.  -     resultMoreElem.innerHTML = responseInfos.join('<br>');
  1191. 492.  -     show(resultElem);
  1192. 493.  -   }
  1193. 494.  - }
  1194. 495.  -
  1195. 496.  - AdsModer.premoderationTakeUnion = function(unionId, hash) {
  1196. 497.  -   var ajaxParams = {};
  1197. 498.  -   ajaxParams.hash     = hash;
  1198. 499.  -   ajaxParams.union_id = unionId;
  1199. 500.  -   ajaxParams.action   = 'take_union';
  1200. 501.  -   ajax.post('/adsmoder?act=a_premoderation_manage_work', ajaxParams, {onDone: onComplete, onFail: onComplete});
  1201. 502.  -
  1202. 503.  -   function onComplete(response) {
  1203. 504.  -     if (response && response.ok) {
  1204. 505.  -       if (response.redirect) {
  1205. 506.  -         nav.go(response.redirect);
  1206. 507.  -       }
  1207. 508.  -     } else {
  1208. 509.  -       var message = ((response && response.error) ? response.error : '������');
  1209. 510.  -       showFastBox({title: '������', onHide: function() { nav.reload(); }}, message);
  1210. 511.  -     }
  1211. 512.  -     return true;
  1212. 513.  -   }
  1213. 514.  - }
  1214. 515.  -
  1215. 516.  - AdsModer.premoderationTakeBackUnion = function(unionId, hash) {
  1216. 517.  -   var ajaxParams = {};
  1217. 518.  -   ajaxParams.hash     = hash;
  1218. 519.  -   ajaxParams.union_id = unionId;
  1219. 520.  -   ajaxParams.action   = 'take_back_union';
  1220. 521.  -   ajax.post('/adsmoder?act=a_premoderation_manage_work', ajaxParams, {onDone: onComplete, onFail: onComplete});
  1221. 522.  -
  1222. 523.  -   function onComplete(response) {
  1223. 524.  -     if (response && response.ok) {
  1224. 525.  -       nav.reload();
  1225. 526.  -     } else {
  1226. 527.  -       var message = ((response && response.error) ? response.error : '������');
  1227. 528.  -       showFastBox({title: '������', onHide: function() { nav.reload(); }}, message);
  1228. 529.  -     }
  1229. 530.  -     return true;
  1230. 531.  -   }
  1231. 532.  - }
  1232. 533.  -
  1233. 534.  - AdsModer.premoderationStopWork = function(hash) {
  1234. 535.  -   var ajaxParams = {};
  1235. 536.  -   ajaxParams.hash   = hash;
  1236. 537.  -   ajaxParams.action = 'stop_work';
  1237. 538.  -   ajax.post('/adsmoder?act=a_premoderation_manage_work', ajaxParams, {onDone: onComplete, onFail: onComplete});
  1238. 539.  -
  1239. 540.  -   function onComplete(response) {
  1240. 541.  -     if (response && response.ok) {
  1241. 542.  -       nav.reload();
  1242. 543.  -     } else {
  1243. 544.  -       var message = ((response && response.error) ? response.error : '������');
  1244. 545.  -       showFastBox({title: '������', onHide: function() { nav.reload(); }}, message);
  1245. 546.  -     }
  1246. 547.  -     return true;
  1247. 548.  -   }
  1248. 549.  - }
  1249. 550.  -
  1250. 551.  - AdsModer.premoderationFixRequest = function(wrapElemId, requestId, action, hash) {
  1251. 552.  -   if (!Ads.lock(wrapElemId, onLock, onUnlock)) {
  1252. 553.  -     return;
  1253. 554.  -   }
  1254. 555.  -
  1255. 556.  -   var ajaxParams = {}
  1256. 557.  -   ajaxParams.request_id = requestId;
  1257. 558.  -   ajaxParams.action     = action;
  1258. 559.  -   ajaxParams.hash       = hash;
  1259. 560.  -
  1260. 561.  -   ajax.post('/adsmoder?act=premoderation_fix_request', ajaxParams, {onDone: onComplete, onFail: onComplete});
  1261. 562.  -
  1262. 563.  -   function onComplete(response) {
  1263. 564.  -     Ads.unlock(wrapElemId);
  1264. 565.  -     if (response && response.text_new) {
  1265. 566.  -       var wrapElem = ge(wrapElemId);
  1266. 567.  -       if (wrapElem) {
  1267. 568.  -         wrapElem.parentNode.replaceChild(se(response.text_new), wrapElem);
  1268. 569.  -       }
  1269. 570.  -     }
  1270. 571.  -     return true;
  1271. 572.  -   }
  1272. 573.  -   function onLock() {
  1273. 574.  -     show(geByTag1('img', ge(wrapElemId)));
  1274. 575.  -   }
  1275. 576.  -   function onUnlock() {
  1276. 577.  -     var wrapElem = ge(wrapElemId);
  1277. 578.  -     if (wrapElem) {
  1278. 579.  -       hide(geByTag1('img', wrapElem));
  1279. 580.  -     }
  1280. 581.  -   }
  1281. 582.  - }
  1282. 583.  -
  1283. 584.  - AdsModer.switchOfficeBlock = function(actionLocation, confirmTitle, confirmText, actionText) {
  1284. 585.  -   function switchBlocked() {
  1285. 586.  -     Ads.simpleAjax(actionLocation);
  1286. 587.  -   }
  1287. 588.  -   showFastBox(confirmTitle, confirmText, actionText, switchBlocked, getLang('box_cancel'));
  1288. 589.  - }
  1289. 590.  -
  1290. 591.  - AdsModer.openCancelClicksBox = function(ajaxParams) {
  1291. 592.  -   var showOptions = {params: {}};
  1292. 593.  -   showBox('/adsweb?act=log_cancel_box', ajaxParams, showOptions);
  1293. 594.  - }
  1294. 595.  -
  1295. 596.  - AdsModer.initCancelClicksBox = function(box, ajaxParams) {
  1296. 597.  -   var handler = AdsModer.cancelClicks.pbind(box, ajaxParams);
  1297. 598.  -   box.removeButtons();
  1298. 599.  -   box.addButton(getLang('box_cancel'), false, 'no');
  1299. 600.  -   box.addButton('�������� �����', handler, 'yes');
  1300. 601.  - }
  1301. 602.  -
  1302. 603.  - AdsModer.cancelClicks = function(box, ajaxParams) {
  1303. 604.  -   if (!Ads.lock('cancelClicks', onLock, onUnlock)) {
  1304. 605.  -     return;
  1305. 606.  -   }
  1306. 607.  -
  1307. 608.  -   ajax.post('/adsweb?act=log_cancel', ajaxParams, {onDone: onComplete, onFail: onComplete});
  1308. 609.  -
  1309. 610.  -   function onComplete(response) {
  1310. 611.  -     Ads.unlock('cancelClicks');
  1311. 612.  -     if (response && response.ok) {
  1312. 613.  -       nav.reload();
  1313. 614.  -     } else {
  1314. 615.  -       showFastBox('������', '������');
  1315. 616.  -     }
  1316. 617.  -     return true;
  1317. 618.  -   }
  1318. 619.  -   function onLock() {
  1319. 620.  -     box.showProgress();
  1320. 621.  -   }
  1321. 622.  -   function onUnlock() {
  1322. 623.  -     box.hide();
  1323. 624.  -   }
  1324. 625.  - }
  1325. 626.  -
  1326. 627.  - AdsModer.openClickfraudersPrepareBanBox = function(usersIds, day) {
  1327. 628.  -   var ajaxParams = {};
  1328. 629.  -   ajaxParams.users_ids = usersIds;
  1329. 630.  -   ajaxParams.day       = day;
  1330. 631.  -
  1331. 632.  -   var showOptions = {params: {}};
  1332. 633.  -   showOptions.params.width = 650;
  1333. 634.  -
  1334. 635.  -   showBox('/adsweb?act=clickfrauders_prepare_ban_box', ajaxParams, showOptions);
  1335. 636.  - }
  1336. 637.  -
  1337. 638.  - AdsModer.initClickfraudersPrepareBanBox = function(box, hash, usersIds, day) {
  1338. 639.  -   var prepareBanHandler = AdsModer.clickfraudersPrepareBan.pbind(box, hash, usersIds, day);
  1339. 640.  -   box.removeButtons();
  1340. 641.  -   box.addButton(getLang('box_cancel'), false, 'no');
  1341. 642.  -   box.addButton('��������', prepareBanHandler, 'yes');
  1342. 643.  - }
  1343. 644.  -
  1344. 645.  - AdsModer.clickfraudersPrepareBan = function(box, hash, usersIds, day) {
  1345. 646.  -   if (!Ads.lock('clickfraudersPrepareBan', onLock, onUnlock)) {
  1346. 647.  -     return;
  1347. 648.  -   }
  1348. 649.  -
  1349. 650.  -   var ajaxParams = {};
  1350. 651.  -   ajaxParams.hash      = hash;
  1351. 652.  -   ajaxParams.users_ids = usersIds;
  1352. 653.  -   ajaxParams.day       = day;
  1353. 654.  -
  1354. 655.  -   ajax.post('/adsweb?act=clickfrauders_prepare_ban', ajaxParams, {onDone: onComplete, onFail: onComplete});
  1355. 656.  -
  1356. 657.  -   function onComplete(response) {
  1357. 658.  -     Ads.unlock('clickfraudersPrepareBan');
  1358. 659.  -     if (response && response.message) {
  1359. 660.  -       showFastBox('��', response.message);
  1360. 661.  -     } else {
  1361. 662.  -       showFastBox('������', '������');
  1362. 663.  -     }
  1363. 664.  -     return true;
  1364. 665.  -   }
  1365. 666.  -   function onLock() {
  1366. 667.  -     box.showProgress();
  1367. 668.  -   }
  1368. 669.  -   function onUnlock() {
  1369. 670.  -     box.hide();
  1370. 671.  -   }
  1371. 672.  - }
  1372. 673.  -
  1373. 674.  - AdsModer.historyGet = function(elem, notNavigationParam) {
  1374. 675.  -   while (elem && elem.nodeName.toLowerCase() !== 'form') {
  1375. 676.  -     elem = elem.parentNode;
  1376. 677.  -   }
  1377. 678.  -   if (!elem) {
  1378. 679.  -     return;
  1379. 680.  -   }
  1380. 681.  -   var values = serializeForm(elem);
  1381. 682.  -   var params = values.other_params;
  1382. 683.  -   delete values.other_params;
  1383. 684.  -   for (var i in values) {
  1384. 685.  -     if (values[i]) {
  1385. 686.  -       params = '&' + i + '=' + values[i] + params;
  1386. 687.  -     }
  1387. 688.  -   }
  1388. 689.  -   nav.go('/adsmoder?act=history' + params);
  1389. 690.  - }
  1390. 691.  -
  1391. 692.  - AdsModer.historyToggleFilters = function() {
  1392. 693.  -   var filtersContainerElem = ge('ads_moder_history');
  1393. 694.  -   var filtersElems = geByClass('ads_navigation_link', filtersContainerElem);
  1394. 695.  -   for (var i = 0; elem = filtersElems[i]; i++) {
  1395. 696.  -       if (hasClass(elem, 'current')) {
  1396. 697.  -           continue
  1397. 698.  -       }
  1398. 699.  -       elem = elem.parentNode;
  1399. 700.  -       if (elem.nodeName.toLowerCase() !== 'span') {
  1400. 701.  -           continue
  1401. 702.  -       }
  1402. 703.  -       toggleClass(elem, 'unshown');
  1403. 704.  -   }
  1404. 705.  - }
  1405. 706.  -
  1406. 707.  - AdsModer.statSummaryInit = function(periodType, fromYear, fromMonth, fromDay, toYear, toMonth, toDay) {
  1407. 708.  -   var datePickerOptionsFrom = {
  1408. 709.  -     mode: (periodType === 'month') ? 'm' : 'd',
  1409. 710.  -     year:  fromYear,
  1410. 711.  -     month: fromMonth,
  1411. 712.  -     day:   fromDay,
  1412. 713.  -     width: 130,
  1413. 714.  -     pastActive: true,
  1414. 715.  -     onUpdate: function(date, mode) {
  1415. 716.  -       fromYear  = date.y;
  1416. 717.  -       fromMonth = date.m;
  1417. 718.  -       fromDay   = date.d;
  1418. 719.  -       updateLink();
  1419. 720.  -     }
  1420. 721.  -   };
  1421. 722.  -   var datePickerOptionsTo = {
  1422. 723.  -     mode: (periodType === 'month') ? 'm' : 'd',
  1423. 724.  -     year:  toYear,
  1424. 725.  -     month: toMonth,
  1425. 726.  -     day:   toDay,
  1426. 727.  -     width: 130,
  1427. 728.  -     pastActive: true,
  1428. 729.  -     onUpdate: function(date, mode) {
  1429. 730.  -       toYear  = date.y;
  1430. 731.  -       toMonth = date.m;
  1431. 732.  -       toDay   = date.d;
  1432. 733.  -       updateLink();
  1433. 734.  -     }
  1434. 735.  -   };
  1435. 736.  -   new Datepicker(ge('ads_moder_stat_summary_from'), datePickerOptionsFrom);
  1436. 737.  -   new Datepicker(ge('ads_moder_stat_summary_to'), datePickerOptionsTo);
  1437. 738.  -
  1438. 739.  -   function updateLink() {
  1439. 740.  -     var fromPeriod = fromYear * 100 + fromMonth;
  1440. 741.  -     var toPeriod   = toYear   * 100 + toMonth;
  1441. 742.  -     if (periodType !== 'month') {
  1442. 743.  -       fromPeriod = fromPeriod * 100 + fromDay;
  1443. 744.  -       toPeriod   = toPeriod   * 100 + toDay;
  1444. 745.  -     }
  1445. 746.  -     var linkElem = ge('ads_moder_stat_summary_range_link');
  1446. 747.  -     linkElem.href = linkElem.href.replace(/&period=\d+-\d+/, '&period=' + fromPeriod + '-' + toPeriod);
  1447. 748.  -     linkElem.style.opacity = 1;
  1448. 749.  -   }
  1449. 750.  - }
  1450. 751.  -
  1451. 752.  - AdsModer.statSummaryShowAllProperties = function() {
  1452. 753.  -   var propertiesElem = ge('ads_moder_stat_summary_filter_properties');
  1453. 754.  -   var elems = geByClass('ads_moder_stat_summary_filter_property', propertiesElem);
  1454. 755.  -   each(elems, show);
  1455. 756.  -   hide('ads_moder_stat_summary_filter_properties_shower_wrap');
  1456. 757.  - }
  1457. 758.  -
  1458. 759.  - AdsModer.statSummaryDistrShowCountLabel = function(id, i, val) {
  1459. 760.  -   var contXy = getXY(ge(id+'_stats_graph_wrap'));
  1460. 761.  -   var colXy  = getXY(ge(id+'_distr_col_'+i));
  1461. 762.  -
  1462. 763.  -   setStyle(ge(id+'_max_label'), {
  1463. 764.  -     left: colXy[0] - contXy[0] + 14,
  1464. 765.  -     top:  colXy[1] - contXy[1] - 11
  1465. 766.  -   });
  1466. 767.  -   ge(id+'_max_label').innerHTML = val;
  1467. 768.  -   show(id+'_max_label');
  1468. 769.  -   setStyle(ge(id+'_max_label_out'), {
  1469. 770.  -     width:  ge(id+'_max_label').offsetWidth + 2,
  1470. 771.  -     height: ge(id+'_max_label').offsetHeight + 2,
  1471. 772.  -     left:   colXy[0] - contXy[0] + 13,
  1472. 773.  -     top:    colXy[1] - contXy[1] - 12
  1473. 774.  -   });
  1474. 775.  -   show(id+'_max_label_out');
  1475. 776.  -   setStyle(ge(id+'_max_label_out2'), {
  1476. 777.  -     width:  ge(id+'_max_label').offsetWidth + 4,
  1477. 778.  -     height: ge(id+'_max_label').offsetHeight + 4,
  1478. 779.  -     left:   colXy[0] - contXy[0] + 12,
  1479. 780.  -     top:    colXy[1] - contXy[1] - 13
  1480. 781.  -   });
  1481. 782.  -   show(id+'_max_label_out2');
  1482. 783.  - }
  1483. 784.  -
  1484. 785.  - AdsModer.statSummaryDistrHideCountLabel = function(id) {
  1485. 786.  -   hide(id+'_max_label');
  1486. 787.  -   hide(id+'_max_label_out');
  1487. 788.  -   hide(id+'_max_label_out2');
  1488. 789.  - }
  1489. 790.  -
  1490. 791.  - AdsModer.statSummaryShowVotesBox = function(periodType, period) {
  1491. 792.  -   var ajaxParams = {};
  1492. 793.  -   ajaxParams.period_type = periodType;
  1493. 794.  -   ajaxParams.period      = period;
  1494. 795.  -
  1495. 796.  -   var showOptions = {params: {}};
  1496. 797.  -
  1497. 798.  -   showBox('/adsmoder?act=stat_summary_votes', ajaxParams, showOptions);
  1498. 799.  - }
  1499. 800.  -
  1500. 801.  - AdsModer.increaseBudget = function() {
  1501. 802.  -   if (!Ads.lock('increaseBudget', onLock, onUnlock)) {
  1502. 803.  -     return;
  1503. 804.  -   }
  1504. 805.  -
  1505. 806.  -   var ajaxParams = {};
  1506. 807.  -   ajaxParams.union_id     = val('ads_increase_budget_union_id');
  1507. 808.  -   ajaxParams.money_amount = val('ads_increase_budget_amount');
  1508. 809.  -   ajaxParams.hash         = val('ads_increase_budget_hash');
  1509. 810.  -
  1510. 811.  -   ajax.post('/adsmoder?act=increase_budget', ajaxParams, {onDone: onComplete, onFail: onComplete});
  1511. 812.  -
  1512. 813.  -   function onComplete(response) {
  1513. 814.  -     Ads.unlock('increaseBudget');
  1514. 815.  -     if (response && response.redirect) {
  1515. 816.  -       nav.go(response.redirect);
  1516. 817.  -     } else {
  1517. 818.  -       var msg = ((response && response.error) ? response.error : '������');
  1518. 819.  -       showFastBox('������', msg);
  1519. 820.  -     }
  1520. 821.  -     return true;
  1521. 822.  -   }
  1522. 823.  -   function onLock() {
  1523. 824.  -     lockButton('ads_increase_budget_button');
  1524. 825.  -   }
  1525. 826.  -   function onUnlock() {
  1526. 827.  -     unlockButton('ads_increase_budget_button');
  1527. 828.  -   }
  1528. 829.  - }
  1529. 830.  -
  1530. 831.  - AdsModer.openDisableOfficeBox = function(ajaxParams, isCompany) {
  1531. 832.  -   cur.lang.ads_disable_office_box_title               = '�������� ���������� ��������';
  1532. 833.  -   cur.lang.ads_disable_office_box_button              = '������� �������';
  1533. 834.  -   cur.lang.ads_disable_office_confirm_message         = '�� ������� ��� ������ ������� ��������� �������?<br><br>����� �������� �������� ��������� ������ � ����������, �� ����� �������� �������� ����� ����������.';
  1534. 835.  -   cur.lang.ads_disable_office_company_confirm_message = '������ ����� �������� �������� �������� �������� ������ ���������� ����� � ����� ��������.';
  1535. 836.  -   var message = getLang('ads_disable_office_confirm_message');
  1536. 837.  -   if (isCompany) {
  1537. 838.  -     message += '<br><br>' + getLang('ads_disable_office_company_confirm_message');
  1538. 839.  -   }
  1539. 840.  -   var messageBox = showFastBox(getLang('ads_disable_office_box_title'), message, getLang('ads_disable_office_box_button'), function(){ AdsModer.disableOffice(ajaxParams, messageBox); }, getLang('box_cancel'));
  1540. 841.  - }
  1541. 842.  -
  1542. 843.  - AdsModer.disableOffice = function(ajaxParams, box) {
  1543. 844.  -   if (!Ads.lock('disableOffice', onLock, onUnlock)) {
  1544. 845.  -     return;
  1545. 846.  -   }
  1546. 847.  -
  1547. 848.  -   ajax.post('/adsmoder?act=a_disable_office', ajaxParams, {onDone: onComplete, onFail: onComplete});
  1548. 849.  -
  1549. 850.  -   function onComplete(response) {
  1550. 851.  -     Ads.unlock('disableOffice');
  1551. 852.  -     if (response && response.redirect) {
  1552. 853.  -       nav.reload();
  1553. 854.  -     } else {
  1554. 855.  -       box.hide();
  1555. 856.  -       showFastBox(getLang('ads_error_box_title'), getLang('ads_error_text'));
  1556. 857.  -     }
  1557. 858.  -     return true;
  1558. 859.  -   }
  1559. 860.  -   function onLock() {
  1560. 861.  -     box.showProgress();
  1561. 862.  -   }
  1562. 863.  -   function onUnlock() {
  1563. 864.  -     box.hideProgress();
  1564. 865.  -   }
  1565. 866.  - }
  1566. 867.  -
  1567. 868.  - try{stManager.done('ads_moder.js');}catch(e){}
  1568. ------
Advertisement
Add Comment
Please, Sign In to add comment