Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Файл - retina.css (Старый размер - 31046 | Новый - 23992):
- 8. - background-image: url(/images/hatf_2x.gif?1);
- 9. + background-image: url(/images/hat_2x.gif);
- 16. - background-image: url(/images/hatf_vk_2x.gif?1);
- 17. + background-image: url(/images/hat_vk_2x.gif);
- 22. - background-image: url(/images/hatf_vk_rtl_2x.gif?1);
- 23. + background-image: url(/images/hat_vk_rtl_2x.gif);
- 34. - }
- 35. - .is_2x .feedback_expand {
- 36. - background-image: url(/images/fbgr_arrow_2x.png);
- 37. - background-size: 11px 12px;
- 62. - .is_2x .tdd_search .tdd_control,
- 63. - .is_2x #search_query,
- 65. - .is_2x .choose_search_cont input,
- 66. - .is_2x #exchange_search_input {
- 67. + .is_2x #search_query {
- 69. - background-size: 11px 11px;
- 70. - }
- 71. - .is_2x .audio_friends_search_btn {
- 72. - background-image: url(/images/magglass_audio_blue_2x.png);
- 73. - background-size: 11px 11px;
- 74. - }
- 75. - .is_2x .audio_friends_search_input.text {
- 76. - background-image: url(/images/magglass_audio_2x.png);
- 83. - .is_2x #search_query_reset,
- 84. - .is_2x #friends_reset_search {
- 85. + .is_2x #search_query_reset {
- 88. - }
- 89. - .is_2x .audio_friends_search_inp_wrap .reset {
- 90. - background-image: url(/images/clear_audio_2x.png);
- 91. - background-size: 9px 9px;
- 104. - .is_2x #audio_tip_arrow,
- 111. - .is_2x .page_gif_add_icon,
- 112. - .is_2x .current_audio .label,
- 113. - .is_2x .current_audio_cnt .label,
- 114. - .is_2x .video_row_icon_add .video_row_icon,
- 115. - .is_2x .docs_add_row {
- 116. - background-image: url(/images/icons/audio_icons_2x.png?5);
- 117. + .is_2x .page_gif_add_icon{
- 118. + background-image: url(/images/icons/audio_icons_2x.png);
- 120. - }
- 121. - .is_2x #head_play_btn {
- 122. - background-image: url(/images/icons/audio_iconsf_2x.png);
- 129. - .is_2x .fw_like_icon,
- 130. - .is_2x .wall_module .post_share_icon {
- 131. - background-image: url(/images/icons/like_2x.png?2);
- 132. - background-size: 10px 32px;
- 133. + .is_2x .fw_like_icon {
- 134. + background-image: url(/images/icons/like_2x.png);
- 135. + background-size: 10px 20px;
- 145. - .is_2x .im_tab_selected .im_tabx_over,
- 146. - .is_2x .summary_tab_x,
- 147. - .is_2x .tdd_x_c {
- 148. + .is_2x .im_tab_selected .im_tabx_over {
- 152. - .is_2x .audio .play_new, .is_2x #audio.new .wall_module .audio.current .play_new {
- 153. + .is_2x .audio .play_new {
- 164. - .is_2x #im_docs_preview .im_media_x,
- 165. - .is_2x #im_sdocs_preview .im_media_x,
- 169. - .is_2x .wall_module .reply_delete_button,
- 170. - .is_2x .fave_delete_link,
- 171. - .is_2x #intr_hide,
- 172. - .is_2x .wall_module .post_delete_button,
- 173. - .is_2x .top_info_wrap .hide_button,
- 174. - .is_2x .docs_delete_row {
- 175. + .is_2x .wall_module .reply_delete_button {
- 178. - }
- 179. - .is_2x .im_to_end {
- 180. - background-image: url(/images/im_toend_2x.gif);
- 181. - background-size: 15px 13px;
- 182. - }
- 183. - .is_2x #im_log_fav_btn i,
- 184. - .is_2x .im_important_toggler,
- 185. - .is_2x .im_important_icon {
- 186. - background-image: url(/images/icons/im_actions_iconset2_2x.png?8);
- 187. - background-size: 20px 300px;
- 189. -
- 200. + .is_2x .current_audio,
- 206. - .is_2x .im_attach_gift,
- 211. - .is_2x .im_attach_link,
- 225. - .is_2x .tickets_media_icon,
- 226. - .is_2x .medadd_h,
- 227. - .is_2x .group_share_club,
- 228. - .is_2x .group_ad_post_stats,
- 229. - .is_2x .group_ad_post_link,
- 230. - .is_2x .exchange_ad_post_stats,
- 231. - .is_2x .exchange_ad_post_link {
- 232. - background-image: url(/images/icons/mono_iconset_2x.png?2);
- 233. - background-size: 11px 360px;
- 234. - }
- 235. - .is_2x .ge_ad_box_fields {
- 236. - background-image: url(/images/join/adspost_2x.png);
- 237. - background-size: 160px 160px;
- 238. - }
- 239. - .is_2x .exchange_new_union_img {
- 240. - background-image: url(/images/join/ads_union_2x.png);
- 241. - background-size: 160px 160px;
- 242. + .is_2x .medadd_h {
- 243. + background-image: url(/images/icons/mono_iconset_2x.png?1);
- 244. + background-size: 11px 346px;
- 247. - background: none;
- 248. - }
- 249. -
- 250. - .is_2x .feed_tab_add_icon,
- 251. - .is_2x .feed_filter_tabs_icon,
- 252. - .is_2x .feed_filter_tabs_check {
- 253. - background-image: url(/images/icons/news_iconset_2x.png?2);
- 254. - background-size: 16px 176px;
- 255. - }
- 256. - .is_2x .feed_filter_lists_row .feed_filter_tabs_icon,
- 257. - .is_2x .feed_icon_newlist {
- 262. - .is_2x .page_verified,
- 263. + .is_2x .profile_verified,
- 267. - .is_2x .search_verified,
- 268. - .is_2x .wall_post_source_icon,
- 269. - .is_2x .page_fronly {
- 270. - background-image: url(/images/profile_icons_2x.png?10);
- 271. - background-size: 13px 241px;
- 272. + .is_2x .search_verified {
- 273. + background-image: url(/images/profile_icons_2x.png);
- 274. + background-size: 13px 98px;
- 308. - .is_2x #search_query_wrap.wide #search_query_progress,
- 309. - .is_2x .docs_search_bar .docs_loading_bar {
- 310. + .is_2x #search_query_wrap.wide #search_query_progress {
- 314. - .is_2x .emoji_smile_icon_on,
- 315. - .is_2x .emoji_smile_icon,
- 316. - .is_2x .mbe_smile_icon_on,
- 317. - .is_2x .mbe_smile_icon {
- 318. + .is_2x .im_smile_icon_on,
- 319. + .is_2x .im_smile_icon {
- 335. - .is_2x .emoji_pointer {
- 336. - background-image: url(/images/icons/like_icons_bl_2x.png?2);
- 337. + .is_2x #im_emoji_pointer {
- 338. + background-image: url(/images/like_icons_bl_2x.png?2);
- 356. - .is_2x #photo_default_check,
- 357. - .is_2x .join_fb_progress {
- 358. + .is_2x #photo_default_check {
- 368. - }
- 369. - .is_2x .wk_post_stats .wk_posts_stats_info_row .like .img,
- 370. - .is_2x .wk_post_stats .wk_posts_stats_info_row .share .img,
- 371. - .is_2x .wk_post_stats .wk_posts_stats_info_row .comment .img {
- 372. - background-image: url(/images/icons/exchange_stats_icons_2x.png);
- 373. - background-size: 22px 66px;
- 375. - .is_2x .post_upload_wrap div.post_upload,
- 376. - .is_2x .im_upload_wrap div.im_upload {
- 377. + .is_2x .post_upload_wrap div.post_upload {
- 385. - .is_2x .mvs_header_text,
- 386. - .is_2x .olist_dd_over {
- 387. + .is_2x .mvs_header_text {
- 439. - .is_2x .page_pics_preview .page_media_x,
- 440. - .is_2x #im_media_preview .im_x,
- 441. - .is_2x #im_media_dpreview .im_x,
- 442. - .is_2x #im_media_mpreview .im_x,
- 443. - .is_2x .owner_photo_bubble_delete,
- 444. - .is_2x .app_delete_el {
- 445. + .is_2x .page_pics_preview .page_media_x {
- 467. - .is_2x .emoji_smile_shadow {
- 468. + .is_2x .im_emoji_smile_cont {
- 504. - .is_2x .video_module .video div.page_video_play_icon,
- 522. + .is_2x .ads_edit_tt_pointer,
- 527. - .is_2x .audio_status_tt .tail,
- 530. - .is_2x .tickets_side_tt.time .tail,
- 531. - .is_2x .apps_edit_side_tt_pointer,
- 532. - .is_2x .ge_ad_hint_tt .tail,
- 533. - .is_2x .exchange_hint_tt .tail {
- 534. + .is_2x .tickets_side_tt.time .tail {
- 571. + .is_2x .notes_checkbox,
- 586. - .is_2x .side_filter.loading,
- 587. - .is_2x .progress_inv_mini {
- 588. + .is_2x .side_filter.loading {
- 606. + }
- 607. + .is_2x .selector_container td.selector_dropdown {
- 608. + background-image: url(/images/darr_dd_out_2x.gif);
- 609. + background-size: 7px 4px;
- 621. - .is_2x .apps_featured_icon {
- 622. - background-image: url(/images/icons/apps_featured_arrow_2x.png);
- 623. - background-size: 26px 21px;
- 624. + .is_2x .apps_featured_slide {
- 625. + background-image: url(/images/pics/apps_slide_2x.png);
- 626. + background-size: 6px 15px;
- 651. - background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAiCAYAAABFlhkzAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAARNJREFUeNrcltsJwjAUhpNapPgkCI7gBLqAuIFz6gRqB7BdQDcQBPVBxEviSWmld5P0L4IHwmlD8n1N2iTlp/NFMgo/3DMpJZvPJn26vVJ5MIMQQpTWO8mFgnMeXbrp+qaRAUnJ4OGwluMnAlXXQck/kOl4FOXFanug5FHpIiQZQEpypNRDSAqd0ZLSjkhJZSeUpLYDQvK1cSJZrgMriVZDJVF7lc1ItJ/EdrqM5tNGYvxV5CRevK1gNztu0NY1hW+CXZTp5BtQulF5wUaQg6tj9a5OS4jABq4t8EM7uNY7sH1yrRE0hdcKEPBKAQpeKkDCCwI0PCNIwYfxCm0Mr3oHIl7+jeH/++vYuuCJmn8VbwEGAGvuiUVvn8vPAAAAAElFTkSuQmCC);
- 652. - background-size: 12px 17px;
- 653. + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAARCAYAAADpPU2iAAAArUlEQVR42pWSTQrCQAyFQ4eh4mz8A6uiKAgeXg8guHbjaeYGbQYivkkTxcK3e9880oRyzv31/uyJKAEBqD8QZsxCmDJRcIUVs2Y6kFqRQiUUbo9XkQ7CTqQEbaESQDozJyVNTAGkC3NkNjLbp0ULqmnPLKUlmg3GTCgEVwDprwY9A32bYQt/KbqCEW6rjRvhzgg33qZLcC6LGp+FuqX3GaTRq44Q4UU7bAjNL2EAU9kEmwVnt3EAAAAASUVORK5CYII%3D);
- 656. - background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAiCAYAAABFlhkzAAAAsUlEQVR42u2XQQ5AMBBFG4kQG0Lc/wZ6Ak7AXXCBmrEQEWGm7UwsNPnb9xqaP60x8VYKKbt+dHaY3LyseyLyTQZp7DA6lIgJEP4L7lYCKSCthADhOaS+wmMIHuGhgld4iIAE9xWQ4T4CFpwrOODYNRQ4R8DeOUfgDacIguAUAXZ85QtnCayQQPwTif9klWN6K8HZG1sgXhUqZadS1yoDR2Vkqgx9lWvLf3X8juB4gJwFG+W12jVqcG4VAAAAAElFTkSuQmCC);
- 657. + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAiCAYAAABFlhkzAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAARNJREFUeNrcltsJwjAUhpNapPgkCI7gBLqAuIFz6gRqB7BdQDcQBPVBxEviSWmld5P0L4IHwmlD8n1N2iTlp/NFMgo/3DMpJZvPJn26vVJ5MIMQQpTWO8mFgnMeXbrp+qaRAUnJ4OGwluMnAlXXQck/kOl4FOXFanug5FHpIiQZQEpypNRDSAqd0ZLSjkhJZSeUpLYDQvK1cSJZrgMriVZDJVF7lc1ItJ/EdrqM5tNGYvxV5CRevK1gNztu0NY1hW+CXZTp5BtQulF5wUaQg6tj9a5OS4jABq4t8EM7uNY7sH1yrRE0hdcKEPBKAQpeKkDCCwI0PCNIwYfxCm0Mr3oHIl7+jeH/++vYuuCJmn8VbwEGAGvuiUVvn8vPAAAAAElFTkSuQmCC);
- 668. - .is_2x .page_album_camera,
- 669. - .is_2x .photos_choose_album_camera,
- 722. + .is_2x #im_media_preview .im_media_x,
- 750. + }
- 751. + .is_2x .token span.x_hover,
- 752. + .is_2x .token span.x,
- 753. + {
- 754. + background-image: url('/images/blob_x.gif');
- 755. + background-size: 9px 10px;
- 767. - .is_2x .button_blue button,
- 768. - .is_2x .button_gray button {
- 769. - background-image: url(/images/button_bgf_2x.png?1);
- 770. - background-size: 1px 96px;
- 771. + .is_2x .button_blue button {
- 772. + background-image: url('/images/button_vk_2x.png');
- 773. + background-size: 1px 84px;
- 774. + }
- 775. + .is_2x .button_blue button:active {
- 776. + background: #5e80a5;
- 793. + }
- 794. + .is_2x .mail_box_content img {
- 795. + max-width: 80px;
- 825. - .is_2x .wall_module .reply_edit_button,
- 826. - .is_2x .wall_module .post_edit_button,
- 827. - .is_2x .docs_edit_row {
- 828. + .is_2x .wall_module .reply_edit_button {
- 835. - }
- 836. - .is_2x .payments_box_wide .payments_getvotes_method_img {
- 837. - background-image: url(/images/icons/payments_w_2x.png);
- 838. - background-size: 41px 164px;
- 839. - }
- 840. - .is_2x .payments_logo_cards {
- 841. - background-image: url(/images/pics/cards_2x.png);
- 842. - background-size: 222px 52px;
- 843. - }
- 844. - .is_2x .payments_logo_webmoney {
- 845. - background-image: url(/images/ps/webmoney_2x.png);
- 846. - background-size: 126px 40px;
- 847. - }
- 848. - .is_2x .payments_logo_kiwipurse {
- 849. - background-image: url(/images/ps/qiwiwallet_2x.png);
- 850. - background-size: 110px 40px;
- 851. - }
- 852. - .is_2x .payments_logo_yandexmoney {
- 853. - background-image: url(/images/ps/yandexmoney_2x.png);
- 854. - background-size: 106px 45px;
- 855. - }
- 856. - .is_2x .payments_logo_checkout {
- 857. - background-image: url(/images/ps/googlewallet_2x.png);
- 858. - background-size: 190px 40px;
- 862. + }
- 863. + .is_2x .dev_sect_icon {
- 864. + background-image: url('/images/icons/dev_icons_2x.png');
- 865. + background-size: 95px 246px;
- 866. + }
- 867. + .is_2x .page_fronly {
- 868. + background-image: url(/images/private_post_2x.png);
- 869. + background-size: 8px 9px;
- 874. - }
- 875. - .is_2x #status_export.checkbox_pic, .is_2x #facebook_export.checkbox_pic, .is_2x #own_status_export.checkbox_pic, .is_2x #own_facebook_export.checkbox_pic, .is_2x .checkbox_status_export, .is_2x .checkbox_facebook_export {
- 876. - background-image: url(/images/icons/wall_export_2x.gif);
- 877. - background-size: 14px 112px;
- 878. - }
- 879. - .is_2x .flist_item_action, .is_2x #flist_sel_list .flist_item_action {
- 880. - background-image: url(/images/icons/lite_acts_12x12_2x.png);
- 881. - background-size: 12px 24px;
- 882. - }
- 883. - .is_2x .wdd_add_plus {
- 884. - background-image: url(/images/pics/im_plus_2x.gif);
- 885. - background-size: 11px 11px;
- 886. - }
- 887. - .is_2x #html5_player .play_button,
- 888. - .is_2x #html5_player .pause_button,
- 889. - .is_2x #html5_player .big_play,
- 890. - .is_2x #html5_player .volume_button,
- 891. - .is_2x #html5_player .quality_button .quality_val,
- 892. - .is_2x #html5_player .quality_button #quality_label,
- 893. - .is_2x #html5_player #video_actions .add,
- 894. - .is_2x #html5_player #video_actions .rotate,
- 895. - .is_2x #html5_player #video_actions .logo,
- 896. - .is_2x #html5_player .vid_like_fg,
- 897. - .is_2x #html5_player .vid_share_fg,
- 898. - .is_2x #html5_player .vid_link_fg {
- 899. - background-image: url(/images/video/iconset_2x.png?2);
- 900. - background-size: 380px 54px;
- 901. - }
- 902. - .is_2x .wall_album_nocover,
- 903. - .is_2x .pva_no_photos,
- 904. - .is_2x #photos_albums_container .photo_row .img_link.no_photo,
- 905. - .is_2x .photos_choose_album_link.no_photo {
- 906. - background-image: url(/images/camera_big_2x.png);
- 907. - background-size: 64px 48px;
- 908. - }
- 909. -
- 910. - .is_2x .dropbox, .is_2x .dropbox.choose {
- 911. - background-image: url(/images/dropbox_arrow_2x.png);
- 912. - background-size: 63px 44px;
- 913. - }
- 914. - .is_2x .owner_photo_bubble_action_in {
- 915. - background-image: url(/images/edit_photo_icons_white_2x.png);
- 916. - background-size: 16px 88px;
- 917. - }
- 918. - .is_2x .owner_photo_bubble_action_in {
- 919. - background-image: url(/images/edit_photo_icons_white_2x.png);
- 920. - background-size: 16px 88px;
- 921. - }
- 922. - .is_2x #privacy_custom_box .minus_friends {
- 923. - background-image: url(/images/minus_2x.png);
- 924. - background-size: 16px 16px;
- 925. - }
- 926. - .is_2x #privacy_custom_box .plus_friends {
- 927. - background-image: url(/images/plus_2x.png);
- 928. - background-size: 15px 19px;
- 929. - }
- 930. - .is_2x .index_fb_logo {
- 931. - background-image: url(/images/icons/facebook_btn_icon_2x.png);
- 932. - background-size: 8px 16px;
- 933. - }
- 934. - .is_2x .index_fb_btn button {
- 935. - background-image: url(/images/fb_buttonf_2x.png);
- 936. - background-size: 1px 44px;
- 937. - }
- 938. - .is_2x .photos_choose_row_add .icon {
- 939. - background-image: url(/images/icons/check_white_2x.png);
- 940. - background-size: 14px 13px;
- 941. - }
- 942. - .is_2x .wdd_arr {
- 943. - background-image: url(/images/wide_dd_2x.png);
- 944. - background-size: 21px 24px;
- 945. - }
- 946. - .is_2x .video_share_icon {
- 947. - background-image: url(/images/icons/videoexporticons_2x.png);
- 948. - }
- 949. - .is_2x .olympics_bar_img {
- 950. - background-image: url(/images/olymp_mono_2x.png);
- 951. - background-size: 59px 28px;
- 952. - }
- 953. - .is_2x .olympics_bar_img.sochi {
- 954. - background-image: url(/images/sochi2014_2x.png);
- 955. - background-size: 50px 33px;
- 956. - }
- 957. - .is_2x .app_new_sticker {
- 958. - background-image: url(/images/icons/new_app_en_2x.png);
- 959. - background-size: 60px 60px;
- 960. - }
- 961. - .is_2x .apps_sticker_ru {
- 962. - background-image: url(/images/icons/new_app_ru_2x.png);
- 963. - }
- 964. - .is_2x .apps_sticker_ua {
- 965. - background-image: url(/images/icons/new_app_ua_2x.png);
- 966. - }
- 967. - .is_2x .audio_new_sticker {
- 968. - background-image: url(/images/icons/new_audio_en_2x.png);
- 969. - background-size: 58px 58px;
- 970. - }
- 971. - .is_2x .audio_sticker_ru {
- 972. - background-image: url(/images/icons/new_audio_ru_2x.png);
- 973. - }
- 974. - .is_2x .audio_sticker_ua {
- 975. - background-image: url(/images/icons/new_audio_ua_2x.png);
- 976. - }
- 977. - .is_2x .pv_filter_font_icon {
- 978. - background-image: url('/images/icons/switch_fonts_2x.png');
- 979. - background-size: 17px 25px;
- 980. - }
- 981. - .is_2x .checkin_big {
- 982. - background-image: url(/images/icons/checkin_big_2x.png);
- 983. - background-size: 17px 22px;
- ------
- Файл - feed.js (Старый размер - 102454 | Новый - 0):
- 0. - var Feed = {
- 1. - update: function (afterPost) {
- 2. - if (cur.feedUpdateLoading) return;
- 3. - if (cur.add_queue && window.Notifier &&
- 4. - Notifier.addKey(cur.add_queue, feed.updated) &&
- 5. - cur.section != 'news') {
- 6. - return;
- 7. - }
- 8. - if (cur.subsection == 'top' || inArray(cur.section, ['search', 'photos_search', 'mentions', 'articles', 'articles_search', 'likes'])) {
- 9. - return;
- 10. - }
- 11. - var rnd = Math.random();
- 12. - if (cur.section != 'news' && cur.section != 'comments' && rnd > 0.3 ||
- 13. - cur.section == 'news' && (afterPost || rnd > 0.05)) {
- 14. - return;
- 15. - }
- 16. - cur.feedUpdateLoading = true;
- 17. - ajax.post('al_feed.php?au_' + cur.section, extend(feed.getSectionParams(cur.section), {timestamp: cur.timestamp, posted: afterPost ? 1 : '', queue: cur.add_queue ? 1 : 0}), {
- 18. - onDone: function (options, rows, updates_timestamp) {
- 19. - cur.feedUpdateLoading = false;
- 20. - if (afterPost == 1 &&
- 21. - (!rows || rows.indexOf(vk.id + '') == -1)) {
- 22. - setTimeout(feed.update.pbind(2), 2000);
- 23. - return;
- 24. - }
- 25. - if (options.section != cur.section ||
- 26. - options.timestamp < cur.timestamp ||
- 27. - updates_timestamp < cur.timestamp) {
- 28. - return;
- 29. - }
- 30. - options.count += cur.count;
- 31. - var feed_rows = cur.rowsCont, au = ce('div'), el, postEl, post_raw, startST, updH = 0;
- 32. - if (cur.section == 'news') {
- 33. - startST = scrollGetY()
- 34. - if (rows) {
- 35. - au.innerHTML = rows;
- 36. - while (au.lastChild) {
- 37. - feed_rows.insertBefore(au.lastChild, feed_rows.firstChild);
- 38. - }
- 39. - each(geByClass('ts' + updates_timestamp, feed_rows), function() {
- 40. - var self = this;
- 41. - updH += this.offsetHeight;
- 42. - self.style.backgroundColor = '#FEFAE4';
- 43. - animate(self, {backgroundColor: '#FFF'}, 6000);
- 44. - cur.feedUnreadCount++;
- 45. - });
- 46. - }
- 47. - if (updH && startST > 100) {
- 48. - scrollToY(startST + updH, 0);
- 49. - }
- 50. - } else {
- 51. - if (rows) {
- 52. - au.innerHTML = rows;
- 53. - while (el = au.lastChild) {
- 54. - if (el.tagName != 'DIV') {
- 55. - au.removeChild(el);
- 56. - continue;
- 57. - }
- 58. - post_raw = el.firstChild.id.substr(4);
- 59. - if (post_raw && cur.wallLayer == post_raw) {
- 60. - continue;
- 61. - }
- 62. - if (!(postEl = ge('post' + post_raw))) {
- 63. - startST = scrollGetY();
- 64. - feed_rows.insertBefore(el, feed_rows.firstChild);
- 65. - el.style.backgroundColor = '#FEFAE4';
- 66. - animate(el, {backgroundColor: '#FFF'}, 6000);
- 67. - updH = el.offsetHeight;
- 68. - if (startST > 100) {
- 69. - scrollToY(startST + updH, 0);
- 70. - }
- 71. - } else {
- 72. - if (!hasClass(postEl.parentNode, 'feed_row')) {
- 73. - debugLog('insert fail', postEl.parentNode);
- 74. - return;
- 75. - }
- 76. - var repliesCont = ge('replies' + post_raw), openEl = repliesCont.nextSibling, cnt = 0;
- 77. - each ([].slice.call(geByClass('reply', el, 'div')), function () {
- 78. - if (ge(this.id)) return;
- 79. - addClass(this, 'new_reply');
- 80. - repliesCont.appendChild(this);
- 81. - cnt++;
- 82. - });
- 83. - if (cnt) {
- 84. - var stDelta = postEl.parentNode.offsetHeight, newCnt = geByClass('new_reply', repliesCont, 'div').length;
- 85. - if (!openEl || openEl.className != 'replies_open') {
- 86. - openEl = ce('div', {className: 'replies_open', onclick: wall.openNewComments.pbind(post_raw)});
- 87. - repliesCont.parentNode.insertBefore(openEl, repliesCont.nextSibling);
- 88. - }
- 89. - openEl.innerHTML = getLang('wall_x_new_replies_more', Math.min(100, newCnt));
- 90. - openEl.newCnt = newCnt;
- 91. -
- 92. - var st = scrollGetY(),
- 93. - ch = window.innerHeight || document.documentElement.clientHeight || bodyNode.clientHeight,
- 94. - btnY = getXY(openEl)[1],
- 95. - h = postEl.parentNode.offsetHeight;
- 96. -
- 97. - stDelta = h - stDelta;
- 98. -
- 99. - if (!inArray(post_raw, cur.feedUnread)) {
- 100. - cur.feedUnread.unshift(post_raw);
- 101. - }
- 102. - if (!cur.idleManager.isIdle && btnY > st + 100 && btnY < st + ch + 100) {
- 103. - debugLog('delaySorting');
- 104. - feed_rows.insertBefore(ge('post_ph' + post_raw) || ce('div', {id: 'post_ph' + post_raw}), feed_rows.firstChild);
- 105. - if (!inArray(post_raw, cur.feedToSort)) {
- 106. - cur.feedToSort.push(post_raw);
- 107. - }
- 108. - } else {
- 109. - debugLog('sort now', btnY, st + 100, st + ch + 100, stDelta);
- 110. - // debugLog(postEl.parentNode, feed_rows);
- 111. - re(postEl.parentNode);
- 112. - // debugLog(postEl.parentNode, feed_rows);
- 113. - feed_rows.insertBefore(postEl.parentNode, feed_rows.firstChild);
- 114. - if (btnY > st + ch + 100) {
- 115. - stDelta = h;
- 116. - }
- 117. - if (stDelta) {
- 118. - debugLog('moving st', stDelta);
- 119. - scrollToY(scrollGetY() + stDelta, 0);
- 120. - }
- 121. - }
- 122. - cur.feedUnreadCount += cnt;
- 123. - }
- 124. - au.removeChild(el);
- 125. - }
- 126. - }
- 127. - }
- 128. - }
- 129. - feed.applyOptions(options);
- 130. - feed.updateTitle();
- 131. - },
- 132. - onFail: function () {
- 133. - cur.feedUpdateLoading = false;
- 134. - return false;
- 135. - },
- 136. - showProgress: function () {
- 137. - cur.feedUpdateLoading = true;
- 138. - },
- 139. - hideProgress: function () {
- 140. - cur.feedUpdateLoading = false;
- 141. - }
- 142. - });
- 143. - },
- 144. - getNewQKey: function (to) {
- 145. - var params = {
- 146. - act: 'a_get_key',
- 147. - only_update: cur.add_queue ? 1 : 0,
- 148. - need_ignore: !isArray(cur.ignore_owners) ? 1 : 0
- 149. - };
- 150. - var options = {onDone: onDone, local: 1};
- 151. - ajax.post('al_feed.php?queue', extend(feed.getSectionParams(cur.section), params), options);
- 152. - function onDone(key, ignore_owners) {
- 153. - if (key) {
- 154. - cur.add_queue = key;
- 155. - setTimeout(feed.update.pbind(0), 0);
- 156. - } else if (!params.only_update) {
- 157. - var ts = ignore_owners;
- 158. - cur.timestamp = (ts || (vkNow() / 1000)) - to;
- 159. - return;
- 160. - }
- 161. - if (isArray(ignore_owners)) {
- 162. - cur.ignore_owners = ignore_owners;
- 163. - }
- 164. - }
- 165. - },
- 166. - updated: function (key, data) {
- 167. - if ((cur.section != 'search' && cur.section != 'news' && cur.section) || !cur.add_queue || cur.add_queue.key != key) {
- 168. - return;
- 169. - }
- 170. - if (data.failed) {
- 171. - cur.add_queue = false;
- 172. - var timeout = curNotifier.error_timeout || 1;
- 173. - clearTimeout(cur.lp_error_to);
- 174. - cur.lp_error_to = setTimeout(feed.getNewQKey.bind(feed).pbind(timeout), timeout * 1000);
- 175. - return;
- 176. - }
- 177. - if (!isArray(data.events) || !data.events.length) {
- 178. - return;
- 179. - }
- 180. - // debugLog('feed updated', data);
- 181. - cur.add_queue.ts = data.ts;
- 182. - if (data.key) {
- 183. - cur.add_queue.key = data.key;
- 184. - }
- 185. - var startST = scrollGetY(),
- 186. - updH = 0;
- 187. -
- 188. - each(data.events, function () {
- 189. - updH += feed.pushEvent(this.split('<!>'), startST);
- 190. - });
- 191. - var endST = scrollGetY();
- 192. - if (updH && startST > 100 && Math.abs(startST - endST) < 100) {
- 193. - scrollToY(endST + updH, 0);
- 194. - }
- 195. - feed.updateTitle();
- 196. - },
- 197. - pushEvent: function (ev, st) {
- 198. - var ev_ver = ev[0],
- 199. - ev_type = ev[1],
- 200. - post_id = ev[2],
- 201. - el = ge('post' + post_id),
- 202. - s = cur.section,
- 203. - flags = s != 'search' ? intval(ev.pop()) : 0,
- 204. - deltaH = 0;
- 205. -
- 206. - if (!cur.options || ev_ver != cur.options.qversion) {
- 207. - // location.reload();
- 208. - return;
- 209. - }
- 210. - // debugLog(ev_type, post_id, el, ev[ev.length - 1]);
- 211. - switch (ev_type) {
- 212. - case 'new_post':
- 213. - if (el) break;
- 214. - var adminLevel = 0;
- 215. - if (intval(ev[11]) && intval(ev[11]) != vk.id) { // own reply owner
- 216. - ajax.post('al_feed.php', {act: 'a_need_own_reply', oid: intval(ev[11])}, {
- 217. - onDone: function(need) {
- 218. - if (need) {
- 219. - ev[11] = 0;
- 220. - feed.pushEvent(ev);
- 221. - }
- 222. - }
- 223. - });
- 224. - return;
- 225. - }
- 226. - if (s != 'search') {
- 227. - var oid = post_id.split('_')[0];
- 228. - ev[8] = (intval(ev[8]) > 0 && (flags & 4) == 4) ? 1 : 0;
- 229. - if (oid < 0) {
- 230. - adminLevel = (flags & 8) ? 2 : ((flags & 2) ? 1 : 0);
- 231. - }
- 232. - // debugLog(oid, flags, adminLevel, ev[8]);
- 233. - }
- 234. - var cont = cur.rowsCont,
- 235. - cnodes = cont.childNodes,
- 236. - postHTML = wall.getNewPostHTML(ev, adminLevel, feed.feedPostRepl),
- 237. - place = ev[12],
- 238. - newEl, grouped, first, others, moreLink, singleOthers;
- 239. -
- 240. - if (place) { // Client-side grouping posts
- 241. - if (cur.ignore_owners.length && inArray(intval(place), cur.ignore_owners)) {
- 242. - break;
- 243. - }
- 244. - if (grouped = geByClass1('feed_reposts_wrap' + place, cont, 'div')) {
- 245. - first = geByClass1('feed_reposts_first', grouped, 'div').firstChild;
- 246. - others = geByClass1('feed_reposts_group', grouped, 'div');
- 247. - moreLink = geByClass1('feed_reposts_more_link', grouped, 'a');
- 248. - if (st > getXY(first)[1]) {
- 249. - deltaH -= first.offsetHeight;
- 250. - }
- 251. - first.parentNode.replaceChild(newEl = se(postHTML), first);
- 252. - others.insertBefore(first, others.firstChild);
- 253. - if (!isVisible(others)) {
- 254. - val(moreLink, getLang('news_show_X_reposts', others.childNodes.length));
- 255. - }
- 256. - grouped = grouped.parentNode;
- 257. - if (cont.firstChild != grouped) {
- 258. - cont.insertBefore(grouped, cont.firstChild);
- 259. - }
- 260. - if (st > getXY(grouped)[1]) {
- 261. - deltaH += grouped.offsetHeight;
- 262. - }
- 263. - grouped.bits = 0;
- 264. - } else if ((singleOthers = geByClass('feed_repost' + place, cont, 'div')) && singleOthers.length) {
- 265. - postHTML = rs(cur.wallTpl.grouped_posts, {
- 266. - place: place,
- 267. - random: irand(100000000, 200000000),
- 268. - first: postHTML,
- 269. - other: '',
- 270. - label: getLang('news_show_X_reposts', singleOthers.length)
- 271. - });
- 272. - var frow = se('<div class="feed_row">' + postHTML + '</div>');
- 273. - cont.insertBefore(frow, cont.firstChild);
- 274. - if (st > getXY(frow)[1]) {
- 275. - deltaH += frow.offsetHeight;
- 276. - }
- 277. - grouped = frow.firstChild;
- 278. - newEl = geByClass1('feed_reposts_first', grouped, 'div');
- 279. - others = geByClass1('feed_reposts_group', grouped, 'div');
- 280. - each(clone(singleOthers), function () {
- 281. - if (st > getXY(this)[1]) {
- 282. - deltaH -= this.offsetHeight;
- 283. - }
- 284. - re(this.parentNode);
- 285. - others.appendChild(this.firstChild);
- 286. - });
- 287. - } else {
- 288. - newEl = se('<div class="feed_row"><div class="feed_repost' + place + '">' + postHTML + '</div></div>');
- 289. - cont.insertBefore(newEl, cont.firstChild);
- 290. - if (st > getXY(newEl)[1]) {
- 291. - deltaH += newEl.offsetHeight;
- 292. - }
- 293. - }
- 294. - } else {
- 295. - newEl = se('<div class="feed_row">' + postHTML + '</div>');
- 296. - cont.insertBefore(newEl, cont.firstChild);
- 297. - if (st > getXY(newEl)[1]) {
- 298. - deltaH += newEl.offsetHeight;
- 299. - }
- 300. - }
- 301. - if (ge('post_poll_id' + post_id)) {
- 302. - wall.updatePoll(post_id);
- 303. - }
- 304. - cur.feedUnreadCount++;
- 305. - if (s != 'search') {
- 306. - setStyle(newEl, {backgroundColor: '#FEFAE4'});
- 307. - animate(newEl, {backgroundColor: '#FFF'}, 6000);
- 308. - }
- 309. - if (cnodes.length > 300) {
- 310. - cont.removeChild(cnodes[300]);
- 311. - } else if (cnodes.length <= 1) {
- 312. - hide('feed_empty');
- 313. - }
- 314. - Wall.updateMentionsIndex();
- 315. - break;
- 316. -
- 317. - case 'new_post_reply':
- 318. - if (el) break;
- 319. - var cont = cur.rowsCont,
- 320. - cnodes = cont.childNodes,
- 321. - postHTML = wall.getNewPostHTML(ev, false, feed.feedPostRepl),
- 322. - newEl = se('<div class="feed_row">' + postHTML + '</div>');
- 323. -
- 324. - cont.insertBefore(newEl, cont.firstChild);
- 325. - if (st > getXY(newEl)[1]) {
- 326. - deltaH += newEl.offsetHeight;
- 327. - }
- 328. - cur.feedUnreadCount++;
- 329. - if (cnodes.length > 300) {
- 330. - cont.removeChild(cnodes[300]);
- 331. - } else if (cnodes.length <= 1) {
- 332. - hide('feed_empty');
- 333. - }
- 334. - break;
- 335. -
- 336. - case 'edit_post':
- 337. - var editEl = ge('wpt' + post_id),
- 338. - stUnder;
- 339. - if (!isVisible(el) || !editEl) break;
- 340. -
- 341. - var wasExpanded = geByClass1('wall_post_more', editEl);
- 342. - if (wasExpanded) wasExpanded = isVisible(domNS(wasExpanded));
- 343. -
- 344. - if (stUnder = (st > getXY(editEl)[1])) {
- 345. - deltaH -= editEl.offsetHeight;
- 346. - }
- 347. - var text = psr(rs(ev[3], {
- 348. - poll_hash: cur.wallTpl.poll_hash
- 349. - }));
- 350. - val(editEl, text);
- 351. - if (wasExpanded) {
- 352. - wasExpanded = geByClass1('wall_post_more', editEl);
- 353. - if (wasExpanded) wasExpanded.onclick();
- 354. - }
- 355. - if (ge('post_poll_id' + post_id)) {
- 356. - wall.updatePoll(post_id);
- 357. - }
- 358. - if (stUnder) {
- 359. - deltaH += editEl.offsetHeight;
- 360. - }
- 361. -
- 362. - setStyle(editEl, {backgroundColor: '#FEFAE4'});
- 363. - animate(editEl, {backgroundColor: '#FFF'}, 6000);
- 364. - break;
- 365. -
- 366. - case 'edit_reply':
- 367. - var reply_id = ev[3],
- 368. - editEl = ge('wpt' + reply_id);
- 369. - if (!isVisible('post' + reply_id) || !editEl) break;
- 370. -
- 371. - var wasExpanded = geByClass1('wall_reply_more', editEl);
- 372. - if (wasExpanded) wasExpanded = isVisible(domNS(wasExpanded));
- 373. -
- 374. - updH = -editEl.offsetHeight;
- 375. - updY = getXY(editEl)[1];
- 376. - val(editEl, psr(ev[4]));
- 377. - if (wasExpanded) {
- 378. - wasExpanded = geByClass1('wall_reply_more', editEl);
- 379. - if (wasExpanded) wasExpanded.onclick();
- 380. - }
- 381. - updH += editEl.offsetHeight;
- 382. - setStyle(editEl, {backgroundColor: '#FEFAE4'});
- 383. - animate(editEl, {backgroundColor: '#FFF'}, 6000);
- 384. - break;
- 385. -
- 386. - case 'post_parsed_link':
- 387. - if (!el) break;
- 388. - var btnWrap = geByClass1('wall_postlink_preview_btn_disabled', el);
- 389. - if (!btnWrap) break;
- 390. - if (intval(ev[3])) {
- 391. - removeClass(btnWrap, 'wall_postlink_preview_btn_disabled');
- 392. - } else {
- 393. - re(btnWrap);
- 394. - }
- 395. - break;
- 396. -
- 397. - case 'del_post':
- 398. - if (el) {
- 399. - if (!cur.wallMyDeleted[post_id]) {
- 400. - if (st > getXY(el)[1]) {
- 401. - deltaH -= el.offsetHeight;
- 402. - }
- 403. - revertLastInlineVideo(el);
- 404. - hide(el);
- 405. - }
- 406. - cur.options.offset--;
- 407. - }
- 408. - break;
- 409. -
- 410. - case 'res_post':
- 411. - el && cur.options.offset++;
- 412. - break;
- 413. -
- 414. - case 'new_reply':
- 415. - if (!el || cur.wallMyReplied[post_id] || ge('post' + ev[3])) break;
- 416. -
- 417. - var repliesEl = ge('replies' + post_id),
- 418. - repliesWrap = ge('replies_wrap' + post_id),
- 419. - startH = el.offsetHeight,
- 420. - oid = post_id.split('_')[0],
- 421. - adminLevel = (oid < 0) ? ((flags & 8) ? 2 : ((flags & 2) ? 1 : 0)) : 0,
- 422. - newEl = se(wall.getNewReplyHTML(ev, adminLevel)),
- 423. - highlight = false;
- 424. -
- 425. - if (!isVisible(repliesEl) || !isVisible(repliesWrap) || isVisible('reply_link' + post_id)) {
- 426. - re('reply_link' + post_id);
- 427. - show(repliesWrap, repliesEl);
- 428. - highlight = true;
- 429. - } else {
- 430. - var openEl = repliesEl.nextSibling,
- 431. - newCnt = geByClass('new_reply', repliesEl, 'div').length + 1;
- 432. -
- 433. - if (!cur.wallMyOpened[post_id]) {
- 434. - addClass(newEl, 'new_reply');
- 435. - if (!openEl || openEl.className != 'replies_open') {
- 436. - openEl = ce('div', {className: 'replies_open', onclick: wall.openNewComments.pbind(post_id)});
- 437. - repliesEl.parentNode.insertBefore(openEl, repliesEl.nextSibling);
- 438. - }
- 439. - openEl.innerHTML = getLang('wall_x_new_replies_more', Math.min(100, newCnt));
- 440. - openEl.newCnt = newCnt;
- 441. - } else {
- 442. - if (openEl && openEl.className == 'replies_open') re(openEl);
- 443. - highlight = true;
- 444. - var headerEl = geByClass1('wr_header', repliesEl, 'a'),
- 445. - shown = geByClass('reply', repliesEl, 'div').length + 1,
- 446. - total = shown;
- 447. - if (headerEl) {
- 448. - total = intval(headerEl.getAttribute('offs').split('/')[1]) + 1;
- 449. - }
- 450. - if (total > 5 || shown < total) {
- 451. - if (!headerEl) {
- 452. - repliesEl.insertBefore(headerEl = ce('a', {className: 'wr_header'}), repliesEl.firstChild);
- 453. - }
- 454. - wall.updateRepliesHeader(post_id, headerEl, shown, total);
- 455. - }
- 456. - }
- 457. - }
- 458. - if (post_id.split('_')[0] == vk.id) {
- 459. - cur.feedUnreadCount++;
- 460. - }
- 461. - repliesEl.appendChild(newEl);
- 462. - if (st > getXY(highlight ? newEl : openEl)[1]) {
- 463. - deltaH += el.offsetHeight - startH;
- 464. - }
- 465. - if (highlight) {
- 466. - setStyle(newEl, {backgroundColor: '#FEFAE4'});
- 467. - animate(newEl, {backgroundColor: '#FFF'}, 6000);
- 468. - }
- 469. - Wall.repliesSideSetup(post_id);
- 470. - Wall.updateMentionsIndex();
- 471. - break;
- 472. -
- 473. - case 'del_reply':
- 474. - if (!cur.wallMyDeleted[post_id] && el) {
- 475. - if (st > getXY(el)[1]) {
- 476. - deltaH -= el.offsetHeight;
- 477. - }
- 478. -
- 479. - var post = el.parentNode.id.match(/replies(-?\d+_\d+)/);
- 480. - revertLastInlineVideo(el);
- 481. - re(el);
- 482. - if (post) {
- 483. - Wall.repliesSideSetup(post[1]);
- 484. - }
- 485. - }
- 486. - break;
- 487. -
- 488. - case 'like_post':
- 489. - case 'like_reply':
- 490. - if (!el) break;
- 491. - var likePost = ev_type == 'like_reply' ? post_id.replace('_', '_wall_reply') : post_id,
- 492. - cntEl = ge('like_count' + likePost),
- 493. - iconEl = ge('like_icon' + likePost),
- 494. - ttEl = iconEl && iconEl.parentNode,
- 495. - cnum = intval(val(cntEl)),
- 496. - num = intval(ev[3]);
- 497. -
- 498. - animateCount(cntEl, num);
- 499. - val('like_real_count_wall' + post_id, num);
- 500. - toggleClass(iconEl, 'no_likes', num <= 0);
- 501. - if (ttEl && ttEl.tt && !isVisible(ttEl.tt.container)) {
- 502. - ttEl && ttEl.tt && ttEl.tt.destroy();
- 503. - }
- 504. - setStyle(iconEl, {opacity: '', visibility: ''});
- 505. - break;
- 506. -
- 507. - case 'vote_poll':
- 508. - if (!el) break;
- 509. - wall.updatePollResults(post_id, ev[3]);
- 510. - break;
- 511. -
- 512. - case 'new_photos_private':
- 513. - break;
- 514. - ajax.post('al_feed.php', {act: 'a_get_private', oid: ev[2], key: ev[3], hash: ev[4], num: ev[5]}, {
- 515. - onDone: function (ev) {
- 516. - if (isArray(ev) && ev.length) {
- 517. - feed.pushEvent(ev);
- 518. - }
- 519. - }
- 520. - });
- 521. - break;
- 522. -
- 523. -
- 524. - case 'new_photos':
- 525. - case 'new_tagged':
- 526. - break;
- 527. - var cont = cur.rowsCont,
- 528. - cnodes = cont.childNodes,
- 529. - thumbs = ev.splice(7, ev.length - 7),
- 530. - place = ev[2].split('_')[1] + '_' + (ev_type == 'new_photos' ? 1 : 3),
- 531. - grouped, newEl;
- 532. -
- 533. - if (grouped = geByClass1('post_photos' + place, cont, 'div')) {
- 534. - if (st > getXY(grouped)[1]) {
- 535. - deltaH -= grouped.offsetHeight;
- 536. - }
- 537. - var numEl = geByClass1('feed_photos_num', grouped, 'small'),
- 538. - thumbsEl = geByClass1('post_media', grouped, 'div'),
- 539. - num = intval(numEl.getAttribute('num')) + thumbs.length / 3,
- 540. - thumbs_html = [], i;
- 541. - val(numEl, getLang('news_x_photos', num) + ', ' + wall.getNowRelTime());
- 542. - numEl.setAttribute('num', num);
- 543. - for (i = 0; i < thumbs.length; i += 3) {
- 544. - thumbs_html.push(cur.wallTpl.photo_thumb.replace(/%photo_id%/g, thumbs[i]).replace(/%thumb%/g, thumbs[i+1]).replace(/%temp%/g, thumbs[i+2].replace(/"/g, '"')).replace('%full_id%', ev[2]));
- 545. - }
- 546. - if (thumbs_html.length >= 8) {
- 547. - thumbs_html.splice(8, thumbs_html.length - 8);
- 548. - val(thumbsEl, thumbs_html.join(' '));
- 549. - } else {
- 550. - var t = ce('div', {innerHTML: thumbs_html});
- 551. - while (t.lastChild) {
- 552. - thumbsEl.insertBefore(t.lastChild, thumbsEl.firstChild);
- 553. - if (thumbsEl.childNodes.length > 8) {
- 554. - re(thumbsEl.lastChild);
- 555. - }
- 556. - }
- 557. - }
- 558. - newEl = grouped.parentNode;
- 559. - if (cont.firstChild != newEl) {
- 560. - cont.insertBefore(newEl, cont.firstChild);
- 561. - }
- 562. - if (st > getXY(newEl)[1]) {
- 563. - deltaH += newEl.offsetHeight;
- 564. - }
- 565. - } else {
- 566. - newEl = se('<div class="feed_row">' + wall.getNewPostHTML(ev, false, feed.feedPhotoRepl.pbind(thumbs)) + '</div>');
- 567. - addClass(newEl.firstChild, 'post_photos post_photos' + place);
- 568. - cont.insertBefore(newEl, cont.firstChild);
- 569. - if (st > getXY(newEl)[1]) {
- 570. - deltaH += newEl.offsetHeight;
- 571. - }
- 572. - }
- 573. - if (s != 'search') {
- 574. - setStyle(newEl, {backgroundColor: '#FEFAE4'});
- 575. - animate(newEl, {backgroundColor: '#FFF'}, 6000);
- 576. - }
- 577. - if (cnodes.length > 300) {
- 578. - cont.removeChild(cnodes[300]);
- 579. - } else if (cnodes.length == 1) {
- 580. - hide('feed_empty');
- 581. - }
- 582. - break;
- 583. - }
- 584. - return deltaH;
- 585. - },
- 586. - feedPostRepl: function (repl, ev) {
- 587. - repl.replies = cur.wallTpl.post_replies;
- 588. - var ext = {
- 589. - full_id: ev[2],
- 590. - item_id: 'wall_' + ev[2],
- 591. - sec_name: stripHTML(ev[3]),
- 592. - date: wall.getNowRelTime(),
- 593. - del: /*ev[9] == vk.id ? cur.wallTpl.del : */cur.wallTpl.spam // always hiding from feed
- 594. - };
- 595. - if (cur.section == 'search' && cur.q) {
- 596. - var text = repl.text || '',
- 597. - q = cur.q, q_words = q.toLowerCase().split(/[\s.,:;!?()]/),
- 598. - links = [];
- 599. - text = text.replace(/<.+?>/g, function (tag) {
- 600. - links.push(tag);
- 601. - return "\x01";
- 602. - });
- 603. - var text_l = text.toLowerCase(), i, pos, word;
- 604. - for (i = q_words.length - 1; i >= 0; i--) {
- 605. - word = q_words[i];
- 606. - if (!trim(word)) continue;
- 607. - pos = 0;
- 608. - while ((pos = text_l.indexOf(word, pos)) != -1) {
- 609. - if (text.charAt(pos - 1) == String.fromCharCode(2)) {
- 610. - pos += 2;
- 611. - continue;
- 612. - }
- 613. - text = text.substr(0, pos) + "\x02" + i + "\x02" + text.substr(pos + word.length);
- 614. - text_l = text_l.substr(0, pos) + "\x02" + i + "\x02" + text_l.substr(pos + word.length);
- 615. - }
- 616. - }
- 617. - text = text.replace(/\x02(\d+)\x02/g, function (a, i) {
- 618. - return '<span class="match">' + q_words[i] + '</span>';
- 619. - });
- 620. - text = text.replace(/\x01/g, function () {
- 621. - return links.shift() || '';
- 622. - });
- 623. - ext.text = text;
- 624. - if (ev[1] == 'new_post_reply') {
- 625. - ext.date_postfix = ev[7];
- 626. - }
- 627. - }
- 628. - return ext;
- 629. - },
- 630. - feedPhotoRepl: function (thumbs, repl, ev) {
- 631. - var thumbs_html = [], i, ext, explain = '', cnt = 1;
- 632. -
- 633. - for (i = 0; i < thumbs.length; i += 3) {
- 634. - thumbs_html.push(cur.wallTpl.photo_thumb.replace(/%photo_id%/g, thumbs[i]).replace(/%thumb%/g, thumbs[i+1]).replace(/%temp%/g, thumbs[i+2].replace(/"/g, '"')));
- 635. - }
- 636. - if (ev[1] == 'new_tagged') {
- 637. - explain = cur.wallTpl.tagged_explain.replace('%explain_text%', langSex(ev[6], cur.lang.wall_user_was_tagged_on_photos));
- 638. - } else {
- 639. - cnt = ev[6];
- 640. - }
- 641. - ext = {
- 642. - text: cur.wallTpl.photos,
- 643. - reply_link: '',
- 644. - reply_box: '',
- 645. - oid: ev[2].split('_')[1],
- 646. - explain: explain,
- 647. - photos: thumbs_html.join(' '),
- 648. - replies: cur.wallTpl.photo_replies.replace('%date%', getLang('news_x_photos', cnt) + ', ' + wall.getNowRelTime()),
- 649. - count: cnt,
- 650. - full_id: ev[2],
- 651. - item_id: ev[2].replace(/^1_/, 'photos_').replace(/^3_/, 'tagged_'),
- 652. - sec_name: stripHTML(ev[3])
- 653. - };
- 654. - return ext;
- 655. - },
- 656. - reSortItems: function () {
- 657. - debugLog('resort', cur.feedToSort);
- 658. - if (!cur.feedToSort || !cur.feedToSort.length) return;
- 659. - each (cur.feedToSort, function (k, v) {
- 660. - var ph = ge('post_ph' + v), el = ge('post' + v).parentNode;
- 661. - if (ph && el) {
- 662. - ph.parentNode.insertBefore(el, ph);
- 663. - re(ph);
- 664. - }
- 665. - });
- 666. - cur.feedToSort = [];
- 667. - scrollToY(0, 0);
- 668. - },
- 669. - updateTitle: function () {
- 670. - if (!cur.idleManager) return;
- 671. - if (!cur.idleManager.isIdle) {
- 672. - cur.feedUnreadCount = 0;
- 673. - }
- 674. - document.title = (cur.feedUnreadCount ? '('+ cur.feedUnreadCount + ') ' : '') + cur.feedInitialTitle;
- 675. - },
- 676. - toggleTabsMenu: function (on) {
- 677. - var feedMenu = ge('feed_tab_add_menu');
- 678. - if (on === undefined) {
- 679. - on = !isVisible(feedMenu);
- 680. - }
- 681. - if (browser.mozilla) {
- 682. - setStyle('page_body', {overflow: on ? 'visible' : ''});
- 683. - }
- 684. - toggle(feedMenu, on);
- 685. - if (on) {
- 686. - addEvent(document, 'mousedown', function (e) {
- 687. - Feed.toggleTabsMenu(0);
- 688. - removeEvent(document, 'mousedown', arguments.callee);
- 689. - });
- 690. - }
- 691. - },
- 692. - toggleMenu: function (on) {
- 693. - var feedMenu = ge('feed_menu');
- 694. - if (on === undefined) {
- 695. - on = !isVisible(feedMenu);
- 696. - }
- 697. - val('feed_menu_toggler', on ? getLang('news_hide_menu') : getLang('news_show_menu'));
- 698. - toggle(feedMenu, on);
- 699. - if (on) {
- 700. - addEvent(document, 'mousedown', function (e) {
- 701. - var target = e.target;
- 702. - while (target) {
- 703. - if (hasClass(target, 'dd_menu_header')) {
- 704. - return true;
- 705. - }
- 706. - target = target.parentNode;
- 707. - }
- 708. - Feed.toggleMenu(0);
- 709. - removeEvent(document, 'mousedown', arguments.callee);
- 710. - });
- 711. - }
- 712. - },
- 713. - getSectionParams: function(section) {
- 714. - var params = {section: section};
- 715. - switch (section) {
- 716. - case 'news':
- 717. - case 'recommended':
- 718. - if ((params.subsection = cur.subsections[section]) === undefined) {
- 719. - delete params.subsection;
- 720. - }
- 721. - break;
- 722. -
- 723. - case 'owner':
- 724. - if (!(params.owner = cur.owner)) {
- 725. - delete params.section;
- 726. - }
- 727. - break;
- 728. -
- 729. - case 'source':
- 730. - if (!(params.source = cur.source)) {
- 731. - delete params.source;
- 732. - }
- 733. - break;
- 734. -
- 735. - case 'list':
- 736. - if (!(params.list = cur.list)) {
- 737. - delete params.list;
- 738. - }
- 739. - break;
- 740. -
- 741. - case 'notifications':
- 742. - if (!(params.source = cur.source)) {
- 743. - delete params.source;
- 744. - }
- 745. - break;
- 746. -
- 747. - case 'articles':
- 748. - params.percent = cur.periodPercent;
- 749. - if ((params.subsection = cur.subsections[section]) === undefined) {
- 750. - delete params.subsection;
- 751. - }
- 752. - break;
- 753. -
- 754. - case 'search':
- 755. - case 'photos_search':
- 756. - if (!(params.q = trim(val('feed_search')))) {
- 757. - delete params.section;
- 758. - }
- 759. - if (!(params.sort = intval(cur.searchSortMenu && cur.searchSortMenu.val()))) {
- 760. - delete params.sort;
- 761. - }
- 762. - break;
- 763. -
- 764. - case 'articles_search':
- 765. - if (!(params.q = trim(val('feed_search')))) {
- 766. - params.section = 'articles';
- 767. - }
- 768. - break;
- 769. -
- 770. - case 'comments':
- 771. - if (cur.reposts) {
- 772. - params.reposts = cur.reposts;
- 773. - }
- 774. - break;
- 775. -
- 776. - case 'mentions':
- 777. - if (cur.mentionObj && cur.mentionObj != vk.id) {
- 778. - params.obj = cur.mentionObj;
- 779. - }
- 780. - break;
- 781. - }
- 782. - debugLog(params, section);
- 783. - return params;
- 784. - },
- 785. - switchSection: function(newSection, e) {
- 786. - if (e && checkEvent(e)) {
- 787. - return true;
- 788. - }
- 789. - if (newSection == 'search' && !trim(val('feed_search'))) {
- 790. - if (cur.section != 'search') return false;
- 791. - newSection = 'news';
- 792. - }
- 793. - if (newSection == 'photos_search' && !trim(val('feed_search'))) {
- 794. - if (cur.section != 'photos_search') return false;
- 795. - newSection = 'photos';
- 796. - }
- 797. - if (newSection == 'comments') {
- 798. - cur.reposts = cur.options.reposts = '';
- 799. - }
- 800. - feed.setSection(newSection, 1);
- 801. - var params = feed.getSectionParams(newSection || 'news');
- 802. - delete cur.feedUpdateLoading;
- 803. - delete cur.isFeedLoading;
- 804. - nav.go(extend(params || {}, {'0': 'feed'}));
- 805. - return false;
- 806. - },
- 807. - setSection: function (newSection, from) {
- 808. - from = from || 0;
- 809. - cur.prevSection = cur.section;
- 810. - if (newSection == cur.section && from < 2 || !newSection) return;
- 811. -
- 812. - var splitt = !!ge('feedtab_updates') || !ge('feedtab_news');
- 813. -
- 814. - hide('feed_progress');
- 815. -
- 816. - var feedBar = ge('feed_bar'),
- 817. - curSection = cur.section,
- 818. - curTopTab = 'news',
- 819. - newTopTab = 'news',
- 820. - curTab, newTab;
- 821. -
- 822. - if (from >= 2 && newSection == cur.section) {
- 823. - curSection = cur.prevSection || cur.section;
- 824. - }
- 825. - if (curSection == 'articles_search') {
- 826. - curTab = 'articles';
- 827. - } else if (curSection == 'photos_search') {
- 828. - curTab = 'photos';
- 829. - } else if (curSection == 'list') {
- 830. - curTab = 'list' + (newSection == 'list' ? cur.prevList : cur.list);
- 831. - } else {
- 832. - curTab = curSection || '';
- 833. - }
- 834. -
- 835. - if (newSection == 'articles_search') {
- 836. - newTab = 'articles';
- 837. - } else if (newSection == 'photos_search') {
- 838. - newTab = 'photos';
- 839. - } else if (newSection == 'list') {
- 840. - newTab = 'list' + cur.list;
- 841. - } else {
- 842. - newTab = newSection || '';
- 843. - }
- 844. -
- 845. - switch (cur.section) {
- 846. - // case 'groups':
- 847. - // case 'mentions':
- 848. - // case 'articles':
- 849. - // case 'articles_search':
- 850. - // curTopTab = 'custom';
- 851. - // break
- 852. - case 'notifications':
- 853. - curTopTab = 'notifications';
- 854. - break;
- 855. -
- 856. - case 'updates':
- 857. - if (splitt) {
- 858. - curTopTab = 'updates';
- 859. - break;
- 860. - }
- 861. - case 'comments':
- 862. - curTopTab = 'comments';
- 863. - break;
- 864. -
- 865. - case 'owner': curTopTab = 'owner'; break;
- 866. - case 'source': curTopTab = 'source'; break;
- 867. - }
- 868. - switch (newSection) {
- 869. - // case 'groups':
- 870. - // case 'mentions':
- 871. - // case 'articles':
- 872. - // case 'articles_search':
- 873. - // newTopTab = 'custom';
- 874. - // break
- 875. -
- 876. - case 'notifications':
- 877. - newTopTab = 'notifications';
- 878. - break;
- 879. -
- 880. - case 'updates':
- 881. - if (splitt) {
- 882. - newTopTab = 'updates';
- 883. - break;
- 884. - }
- 885. - case 'comments':
- 886. - newTopTab = 'comments';
- 887. - break;
- 888. -
- 889. - case 'owner':
- 890. - newTopTab = 'owner';
- 891. - break;
- 892. -
- 893. - case 'source':
- 894. - newTopTab = 'source';
- 895. - break;
- 896. - }
- 897. -
- 898. - var curTabEl = curTab && curTab != newTab && geByClass1('feed_tab_' + curTab, feedBar, 'div');
- 899. - newTabEl = newTab && geByClass1('feed_tab_' + newTab, feedBar, 'div');
- 900. -
- 901. - // debugLog('replace old', curTab, curTabEl, debugEl(curTabEl));
- 902. - curTabEl && replaceClass(curTabEl, 'summary_tab_sel', 'summary_tab');
- 903. -
- 904. - // debugLog('replace new', newTab, newTabEl, debugEl(newTabEl));
- 905. - if (newTabEl) {
- 906. - var tabLink = geByTag1('a', newTabEl),
- 907. - tween = data(tabLink, 'tween');
- 908. -
- 909. - if (tween && tween.isTweening) {
- 910. - tween.stop(false);
- 911. - }
- 912. - tabLink.style.backgroundColor = '';
- 913. - replaceClass(newTabEl, 'summary_tab', 'summary_tab_sel');
- 914. - }
- 915. -
- 916. - // debugLog(curTopTab, newTopTab, from);
- 917. - if (curTopTab != newTopTab || from > 1) {
- 918. - removeClass(ge('feedtab_' + curTopTab), 'active_link');
- 919. - addClass(ge('feedtab_' + newTopTab), 'active_link');
- 920. - if (from < 2) {
- 921. - if (cur.section != 'owner') {
- 922. - hide(feed.getTypesSection() + '_filters');
- 923. - } else {
- 924. - hide('person_filters', 'group_filters');
- 925. - }
- 926. - if (curTopTab == 'news' || cur.section == 'articles') {
- 927. - hide('feed_rate_slider_wrap');
- 928. - }
- 929. - cur.section = newSection;
- 930. - return;
- 931. - }
- 932. -
- 933. - toggle('feed_news_bar', newTopTab == 'news');
- 934. - toggle('feed_comments_bar', newTopTab == 'comments');
- 935. - toggle('feed_search_bar', inArray(newSection, ['articles_search', 'articles', 'notifications', 'search', 'photos_search', 'photos']));
- 936. - if (splitt) {
- 937. - toggle('feed_bar', newTopTab != 'updates' && newTopTab != 'notifications' && newTopTab != 'comments' && newTopTab != 'source');
- 938. - } else {
- 939. - toggle('feed_bar', newTopTab != 'source');
- 940. - }
- 941. -
- 942. - toggleClass('feed_bar', 'feed_bar_extended_search', newSection == 'search');
- 943. - }
- 944. -
- 945. - if (from > 1 && newSection.indexOf('search') == -1 && val('feed_search')) {
- 946. - Feed.searchReset();
- 947. - }
- 948. -
- 949. - var oldFilters = ge(feed.getTypesSection() + '_filters');
- 950. - cur.section = newSection;
- 951. - if (from == 4) {
- 952. - Feed.searchUpdate();
- 953. - return;
- 954. - }
- 955. -
- 956. - if (cur.section != 'owner') {
- 957. - hide(oldFilters);
- 958. - } else {
- 959. - hide('person_filters', 'group_filters');
- 960. - }
- 961. -
- 962. - var newFilters = ge(feed.getTypesSection() + '_filters');
- 963. - if (newFilters) {
- 964. - show(newFilters, 'feed_menu_toggle');
- 965. - } else {
- 966. - hide('feed_menu_toggle');
- 967. - }
- 968. - toggle('feed_edit_hidden', newSection == 'news' || newSection == 'photos');
- 969. - toggle('feed_search_sort', inArray(newSection, ['search'/*, 'photos_search'*/]));
- 970. - toggle('feed_period_select', newSection == 'articles' && cur.subsection == 'top');
- 971. - toggle('feed_rate_slider_wrap', newSection == 'articles' && cur.subsection == 'top');
- 972. -
- 973. - cur.editingHide = newSection == 'notifications' ? feed.notifyCheckHideReply : false;
- 974. -
- 975. - if (inArray(newSection, ['search', 'photos_search']) && !cur.searchSortMenu) {
- 976. - stManager.add(['ui_controls.js', 'ui_controls.css'], feed.initUi);
- 977. - }
- 978. - },
- 979. - applyOptions: function(options, from) {
- 980. - from = from || 0;
- 981. - if (options.owner) {
- 982. - cur.owner = options.owner;
- 983. - }
- 984. - cur.subsection = options.subsection || '';
- 985. - feed.setSection(options.section, from);
- 986. - if (!cur.options) cur.options = {reply_names: {}};
- 987. - extend(cur.options.reply_names, options.reply_names);
- 988. - delete options.reply_names;
- 989. - extend(cur, options);
- 990. -
- 991. - cur.subsections[cur.section] = cur.subsection;
- 992. -
- 993. - if (options.loc && from == 2) {
- 994. - nav.setLoc(options.loc);
- 995. - }
- 996. - if (options.summary) {
- 997. - val('feed_summary', options.summary);
- 998. - }
- 999. - if (options.owner_name) {
- 1000. - val(geByTag1('nobr', ge('feedtab_owner')), options.owner_name);
- 1001. - }
- 1002. - if (options.source_name) {
- 1003. - val(geByTag1('nobr', ge('feedtab_source')), options.source_name);
- 1004. - }
- 1005. - if (options.htitle) {
- 1006. - cur.feedInitialTitle = document.title = replaceEntities(stripHTML(options.htitle));
- 1007. - }
- 1008. - if (options.add_queue !== undefined && options.add_queue !== null) {
- 1009. - if (from) {
- 1010. - if (options.add_queue === true) {
- 1011. - cur.add_queue = options.add_queue = false;
- 1012. - }
- 1013. - feed.getNewQKey(0);
- 1014. - }
- 1015. - if (cur.add_queue = options.add_queue) {
- 1016. - setTimeout(feed.update.pbind(0), 0);
- 1017. - }
- 1018. - } else if (from && cur.section != 'search' && cur.section != 'news' && cur.section) {
- 1019. - cur.add_queue = false;
- 1020. - }
- 1021. - if (options.q) {
- 1022. - val('feed_search', replaceEntities(options.q));
- 1023. - var query = options.q;
- 1024. - if (query.length > 30) {
- 1025. - query = trim(query.substr(0, 30)) + '...';
- 1026. - }
- 1027. - }
- 1028. - Feed.searchUpdate();
- 1029. - if (cur.section == 'comments' && !cur.reposts) {
- 1030. - toggle('comments_filters', !cur.reposts);
- 1031. - }
- 1032. - if (cur.all_shown_text) {
- 1033. - val('all_shown', cur.all_shown_text);
- 1034. - }
- 1035. - if (cur.empty_text) {
- 1036. - val('feed_empty', cur.empty_text);
- 1037. - }
- 1038. - if (cur.percent !== undefined && cur.percent !== null) {
- 1039. - feed.sliderUpdate(cur.percent, true);
- 1040. - delete cur.percent;
- 1041. - }
- 1042. - if (cur.count >= 0) {
- 1043. - re('feed_error_wrap');
- 1044. - }
- 1045. - var hasNews = geByClass1('feed_row', cur.rowsCont, 'div') || false,
- 1046. - isEmpty = !hasNews,
- 1047. - nextRows = ge('feed_rows_next');
- 1048. -
- 1049. - if (isEmpty) {
- 1050. - toggle('feed_empty', !isVisible('feed_error_wrap'));
- 1051. - hide('all_shown');
- 1052. - toggle('show_more_link', cur.count > 0 && !cur.all_shown);
- 1053. - } else if (cur.all_shown && (!nextRows || !nextRows.firstChild)) {
- 1054. - hide('feed_empty', 'show_more_link');
- 1055. - show('all_shown');
- 1056. - re(nextRows);
- 1057. - } else {
- 1058. - hide('feed_empty', 'all_shown');
- 1059. - show('show_more_link');
- 1060. - }
- 1061. -
- 1062. - if (cur.section == 'notifications' && cur.notify) {
- 1063. - var el = ge('feedback_row_' + cur.notify);
- 1064. - if (el) {
- 1065. - setTimeout(function () {el.onclick()}, browser.msie ? 100 : 0);
- 1066. - delete cur.notify;
- 1067. - }
- 1068. - }
- 1069. - Feed.applyUi();
- 1070. - },
- 1071. - showMore: function() {
- 1072. - if (cur.isFeedLoading) return;
- 1073. - cur.disableAutoMore = false;
- 1074. - var nextRows = ge('feed_rows_next');
- 1075. - if (nextRows) {
- 1076. - if (nextRows.firstChild) {
- 1077. - while (nextRows.firstChild) {
- 1078. - cur.rowsCont.insertBefore(nextRows.firstChild, nextRows);
- 1079. - }
- 1080. - }
- 1081. - re(nextRows);
- 1082. - }
- 1083. - if (cur.all_shown) {
- 1084. - hide('show_more_link');
- 1085. - show('all_shown');
- 1086. - }
- 1087. - hide('show_more');
- 1088. - show('show_more_progress');
- 1089. - var escPressed = false;
- 1090. - var tmp = function (e) { if (e.keyCode == KEY.ESC) { escPressed = true; } };
- 1091. - addEvent(document, 'keyup', tmp);
- 1092. - var params = feed.getSectionParams(cur.section || 'news');
- 1093. - extend(params, {offset: cur.offset, from: cur.from, part: 1, more: 1});
- 1094. - ajax.post('al_feed.php?sm_' + cur.section, params, {
- 1095. - onDone: function (options, rows) {
- 1096. - removeEvent(document, 'keyup', tmp);
- 1097. - if (escPressed) {
- 1098. - show('show_more');
- 1099. - hide('show_more_progress');
- 1100. - cur.disableAutoMore = true;
- 1101. - return;
- 1102. - }
- 1103. - if (rows) {
- 1104. - var au = ce('div'), row;
- 1105. - au.innerHTML = rows;
- 1106. - while (row = au.firstChild) {
- 1107. - if (!row.firstChild || !row.firstChild.id || ge(row.firstChild.id)) {
- 1108. - if (row.className != 'feed_row_fb_hider' && row.className != 'feed_row_fb_hidden') {
- 1109. - au.removeChild(row);
- 1110. - continue;
- 1111. - }
- 1112. - }
- 1113. - cur.rowsCont.appendChild(row);
- 1114. - }
- 1115. - }
- 1116. - show('show_more');
- 1117. - hide('show_more_progress');
- 1118. - feed.applyOptions(options);
- 1119. - setTimeout(feed.scrollCheck, 200);
- 1120. - },
- 1121. - showProgress: function () {
- 1122. - cur.isFeedLoading = true;
- 1123. - },
- 1124. - hideProgress: function () {
- 1125. - cur.isFeedLoading = false;
- 1126. - },
- 1127. - cache: 1
- 1128. - });
- 1129. - },
- 1130. - getTypesSection: function () {
- 1131. - switch (cur.section) {
- 1132. - case 'owner':
- 1133. - return (cur.owner > 0 ? 'person' : 'group');
- 1134. -
- 1135. - default:
- 1136. - return cur.section;
- 1137. - }
- 1138. - },
- 1139. - checkTabsFilter: function (option, option_id) {
- 1140. - switch (option) {
- 1141. - case 'news': return false;
- 1142. - case 'newlist': return Feed.addList();
- 1143. - default:
- 1144. - if (listMatches = option.match(/list(\d+)/)) {
- 1145. - return Feed.editList(listMatches[1]);
- 1146. - }
- 1147. - }
- 1148. -
- 1149. - var cont = ge('tabs_type_filter'),
- 1150. - filter_row = ge('filter_' + option_id),
- 1151. - my_types = cur.my_feed_types.tabs,
- 1152. - types = cur.feed_types.tabs,
- 1153. - found, pos, listMatches;
- 1154. -
- 1155. - found = (pos = indexOf(my_types, option)) != -1;
- 1156. - toggleClass(filter_row, 'checked', !found);
- 1157. - if (found) {
- 1158. - my_types.splice(pos, 1);
- 1159. - if (cur.section == option) {
- 1160. - feed.switchSection('news');
- 1161. - }
- 1162. - } else {
- 1163. - my_types.push(option);
- 1164. - }
- 1165. -
- 1166. - // Feed.toggleTabsMenu(0);
- 1167. - cur.my_feed_types.tabs = my_types;
- 1168. - var tabEl = geByClass1('feed_tab_' + option, ge('feed_news_bar'))
- 1169. - tabLink = geByTag1('a', tabEl),
- 1170. - vis = isVisible(tabEl);
- 1171. - toggleClass(tabEl, 'feed_tab_hidden', found);
- 1172. - var onComplete = function () {
- 1173. - debugLog('oncomplete ', tabEl);
- 1174. - tabLink.style.backgroundColor = '';
- 1175. - };
- 1176. - if (!vis && !found) {
- 1177. - setStyle(tabLink, {backgroundColor: '#E1E7ED'});
- 1178. - debugLog('animate ', tabEl);
- 1179. - animate(tabLink, {backgroundColor: '#F7F7F7'}, 1000, onComplete);
- 1180. - tabLink.oncompleteTO = setTimeout(onComplete, 1000);
- 1181. - } else {
- 1182. - onComplete();
- 1183. - }
- 1184. - clearTimeout(cur.saveTabsTO);
- 1185. - cur.saveTabsTO = setTimeout(Feed.saveTabs, 500);
- 1186. - },
- 1187. - checkFilter: function(option, option_id) {
- 1188. - var typesSection = feed.getTypesSection(),
- 1189. - cont = ge(typesSection + '_type_filter'),
- 1190. - filter_row = ge('filter_' + option_id),
- 1191. - my_types = cur.my_feed_types[typesSection],
- 1192. - types = cur.feed_types[typesSection],
- 1193. - found, pos;
- 1194. -
- 1195. - if (my_types === true) {
- 1196. - my_types = clone(cur.feed_types[typesSection]);
- 1197. - }
- 1198. - // debugLog(typesSection, cont, filter_row, my_types, types);
- 1199. - found = (pos = indexOf(my_types, option)) != -1;
- 1200. - if (found) {
- 1201. - my_types.splice(pos, 1);
- 1202. - removeClass(filter_row, 'checked');
- 1203. - } else {
- 1204. - my_types.push(option);
- 1205. - if (my_types.length == types.length) {
- 1206. - my_types = true;
- 1207. - }
- 1208. - addClass(filter_row, 'checked');
- 1209. - }
- 1210. -
- 1211. - cur.my_feed_types[typesSection] = my_types;
- 1212. - feed.updateTypesCookie();
- 1213. - feed.switchSection(cur.section);
- 1214. - },
- 1215. - setFilter: function (option, option_id) {
- 1216. - var typesSection = feed.getTypesSection(),
- 1217. - cont = ge(typesSection + '_type_filter'),
- 1218. - filter_row = ge('filter_' + option_id),
- 1219. - my_types = cur.my_feed_types[typesSection],
- 1220. - types = cur.feed_types[typesSection],
- 1221. - pos,
- 1222. - all_unchecked = true;
- 1223. -
- 1224. - each (geByClass('checked', cont, 'div'), function () {
- 1225. - if (this != filter_row) return (all_unchecked = false);
- 1226. - });
- 1227. - if (all_unchecked) {
- 1228. - cur.my_feed_types[typesSection] = true;
- 1229. - each(geByClass('feed_filter_row', cont, 'div'), function () {
- 1230. - addClass(this, 'checked');
- 1231. - });
- 1232. - } else {
- 1233. - each([].slice.apply(geByClass('checked', cont, 'div')), function () {
- 1234. - removeClass(this, 'checked');
- 1235. - });
- 1236. - cur.my_feed_types[typesSection] = [option];
- 1237. - addClass(filter_row, 'checked');
- 1238. - }
- 1239. -
- 1240. - feed.updateTypesCookie();
- 1241. - feed.switchSection(cur.section);
- 1242. - },
- 1243. - updateTypesCookie: function () {
- 1244. - var new_cookie = [];
- 1245. - each(cur.my_feed_types, function (section, types) {
- 1246. - if (section == 'tabs') return;
- 1247. - new_cookie.push(
- 1248. - types === true ? '*' : types.join(',')
- 1249. - );
- 1250. - });
- 1251. - setCookie('remixfeed', new_cookie.join('.'), 365);
- 1252. - },
- 1253. - flistToggleReposts: function (value, hash) {
- 1254. - ajax.post('al_feed.php', {act: 'a_toggle_reposts', value: value, hash: hash}, {
- 1255. - onDone: function () {
- 1256. - feed.getNewQKey(0);
- 1257. - }
- 1258. - });
- 1259. - },
- 1260. - switchPhotos: function (loc, el, event) {
- 1261. - if (wall.checkPostClick(el, event)) {
- 1262. - return nav.go(loc, event);
- 1263. - }
- 1264. - },
- 1265. - switchOwner: function (owner_id, owner_name, el, event) {
- 1266. - if (el && event && !wall.checkPostClick(el, event)) return;
- 1267. - var ownerLabel = geByTag1('nobr', ge('feedtab_owner')),
- 1268. - loadCb = inArray(cur.section, ['comments', 'photos']) ? false : feed.onLocalTabLoad;
- 1269. - val(ownerLabel, owner_name);
- 1270. - cur.owner = owner_id;
- 1271. - feed.setSection('owner', 1);
- 1272. - feed.go(feed.getSectionParams(cur.section), loadCb);
- 1273. - },
- 1274. - switchSearch: function () {
- 1275. - Feed.setSection('search', 4);
- 1276. - Feed.searchToggleExtended(true);
- 1277. - setTimeout(elfocus.pbind('feed_search'), 10);
- 1278. - },
- 1279. - switchList: function (list_id) {
- 1280. - cur.prevList = cur.list;
- 1281. - cur.list = list_id;
- 1282. - feed.setSection('list', 1);
- 1283. - feed.go(feed.getSectionParams(cur.section));
- 1284. - },
- 1285. - submitSearch: function (query, section) {
- 1286. - if (query === undefined) {
- 1287. - query = trim(val('feed_search'));
- 1288. - } else {
- 1289. - val('feed_search', query);
- 1290. - Feed.searchUpdate();
- 1291. - }
- 1292. - var section = (section === undefined ? cur.section : section) || '',
- 1293. - switchTo = 'search',
- 1294. - switchToBad = 'news';
- 1295. - if (!section.indexOf('articles')) {
- 1296. - switchTo = 'articles_search';
- 1297. - switchToBad = 'articles';
- 1298. - } else if (!section.indexOf('photos')) {
- 1299. - switchTo = 'photos_search';
- 1300. - switchToBad = 'photos';
- 1301. - }
- 1302. - if (!query) {
- 1303. - feed.switchSection(switchToBad);
- 1304. - return;
- 1305. - }
- 1306. - var loadCb = false; // inArray(cur.section, ['comments', 'photos', 'search', 'articles_search']) ? false : feed.onLocalTabLoad;
- 1307. - feed.setSection(switchTo, 1);
- 1308. - feed.go(feed.getSectionParams(cur.section), loadCb);
- 1309. - },
- 1310. - onLocalTabLoad: function (content) {
- 1311. - // debugLog('local tab load', content);
- 1312. - if (window.wall) wall.cancelEdit();
- 1313. - var _back = cur._back, wNode = cur.rowsCont, cur_loc = hab.getLoc();
- 1314. - var newW = ce('div', {id: 'feed_rows', innerHTML: content}), st = scrollGetY();
- 1315. - cur._back_local = {
- 1316. - content: wNode.parentNode.replaceChild(newW, wNode),
- 1317. - section: cur.prevSection || cur.section || 'news',
- 1318. - subsection: cur.subsection,
- 1319. - percent: cur.percent,
- 1320. - owner: cur.owner,
- 1321. - source: cur.source,
- 1322. - q: cur.q,
- 1323. - reposts: cur.reposts,
- 1324. - add_queue: cur.add_queue,
- 1325. - loc: cur_loc,
- 1326. - scrollTop: st,
- 1327. - back: (window._tbLink && _tbLink.loc) ? [_tbLink.loc, val(_tbLink), _tbLink.fast] : false,
- 1328. - count: cur.count,
- 1329. - offset: cur.offset,
- 1330. - from: cur.from,
- 1331. - timestamp: cur.timestamp,
- 1332. - summary: cur.summary,
- 1333. - // options: cur.options,
- 1334. - all_shown: cur.all_shown,
- 1335. - all_shown_text: cur.all_shown_text,
- 1336. - empty_text: cur.empty_text,
- 1337. - htitle: cur.feedInitialTitle
- 1338. - };
- 1339. - cur.rowsCont = newW;
- 1340. - // cur.options = {};
- 1341. - scrollToY(0, 0);
- 1342. - showBackLink(cur._back_local.loc, getLang('news_return_to_news'), true);
- 1343. - },
- 1344. - returnToFeed: function (params, back) {
- 1345. - if (!cur._back_local) {
- 1346. - return true;
- 1347. - }
- 1348. -
- 1349. - var hist = cur._back_local;
- 1350. - if (params !== false) {
- 1351. - var next_section = params.section || 'news';
- 1352. - if (hist.section != next_section) {
- 1353. - return true;
- 1354. - }
- 1355. - } else {
- 1356. - params = {section: hist.section};
- 1357. - }
- 1358. - setTimeout(function() {
- 1359. - cur._back_local = false;
- 1360. - var _back = cur._back, wNode = cur.rowsCont;
- 1361. - cur.rowsCont = wNode.parentNode.replaceChild(hist.content, wNode);
- 1362. - feed.applyOptions({
- 1363. - section: hist.section,
- 1364. - subsection: hist.subsection,
- 1365. - percent: hist.percent,
- 1366. - owner: hist.owner,
- 1367. - source: hist.source,
- 1368. - q: hist.q,
- 1369. - reposts: hist.reposts,
- 1370. - add_queue: hist.add_queue,
- 1371. - count: hist.count,
- 1372. - offset: hist.offset,
- 1373. - from: hist.from,
- 1374. - timestamp: hist.timestamp,
- 1375. - options: hist.options,
- 1376. - all_shown: hist.all_shown,
- 1377. - all_shown_text: hist.all_shown_text,
- 1378. - empty_text: hist.empty_text,
- 1379. - htitle: hist.htitle,
- 1380. - summary: hist.summary
- 1381. - }, 3);
- 1382. - if (hist.back) {
- 1383. - showBackLink(hist.back[0], hist.back[1], hist.back[2]);
- 1384. - } else {
- 1385. - showBackLink(false);
- 1386. - }
- 1387. - nav.setLoc(hist.loc);
- 1388. - if (back) {
- 1389. - scrollToY(hist.scrollTop, 0);
- 1390. - } else {
- 1391. - scrollToY(0, 0);
- 1392. - feed.go(params);
- 1393. - }
- 1394. - }, 10);
- 1395. - return false;
- 1396. - },
- 1397. - notifyShowEditReply: function (item, opts) {
- 1398. - if (cur.editing && cur.notifyReplyData && cur.notifyReplyData[cur.editing].disabled) {
- 1399. - feed.notifyCheckHideReply(cur.editing, (window.event || {}).target);
- 1400. - }
- 1401. - var replyWrap = ge(item + '_reply_wrap');
- 1402. - if (replyWrap) {
- 1403. - if (isVisible(replyWrap)) {
- 1404. - feed.notifyCheckHideReply(item, false);
- 1405. - } else {
- 1406. - show(replyWrap);
- 1407. - removeClass(ge('feedback_row_' + item).parentNode, 'feedback_row_clickable');
- 1408. - if (opts.disabled) {
- 1409. - setTimeout(function() { cur.editing = item; }, 0);
- 1410. - } else {
- 1411. - val(item + '_field', opts.greet);
- 1412. - var ta = ge(item + '_field');
- 1413. - ta && ta.autosize && ta.autosize.update();
- 1414. - setTimeout(elfocus.pbind(item + '_field'), 0);
- 1415. - }
- 1416. - feed.notifyRowOver(item, 0);
- 1417. - }
- 1418. - return;
- 1419. - }
- 1420. -
- 1421. - var itemEl = ge('feedback_row_' + item),
- 1422. - acts = '',
- 1423. - repl = {
- 1424. - hint: opts.hint || '',
- 1425. - bighint: opts.bighint || '',
- 1426. - placeholder: opts.ph,
- 1427. - submit: opts.btn,
- 1428. - greeting: opts.greet,
- 1429. - item: item
- 1430. - };
- 1431. -
- 1432. - removeClass(itemEl.parentNode, 'feedback_row_clickable');
- 1433. -
- 1434. - if (cur.notifyReplyData === undefined) {
- 1435. - cur.notifyReplyData = {};
- 1436. - }
- 1437. - cur.notifyReplyData[item] = opts;
- 1438. - if (opts.disabled) {
- 1439. - itemEl.parentNode.appendChild(se(rs(cur.options.feedback_dis, {item: item, text: opts.disabled})));
- 1440. - setTimeout(function() { cur.editing = item; }, 0);
- 1441. - } else {
- 1442. - itemEl.parentNode.appendChild(se(rs(cur.options.feedback_form, repl)));
- 1443. - var ta = ge(item + '_field');
- 1444. - ta.onfocus = function () {cur.editing = item};
- 1445. - autosizeSetup(ta, {minHeight: 31});
- 1446. - setTimeout(elfocus.pbind(ta), 0);
- 1447. - Wall.initComposer(ta, {
- 1448. - lang: {
- 1449. - introText: getLang('profile_mention_start_typing'),
- 1450. - noResult: getLang('profile_mention_not_found')
- 1451. - }
- 1452. - });
- 1453. - }
- 1454. - feed.notifyRowOver(item, 0);
- 1455. - },
- 1456. - onNotifyReplySubmit: function (item, e) {
- 1457. - var rf = ge(item + '_field');
- 1458. - if (e.keyCode == KEY.RETURN || e.keyCode == 10) {
- 1459. - var composer = data(rf, 'composer'),
- 1460. - isListVisible = composer && composer.wdd && composer.wdd.listWrap && isVisible(composer.wdd.listWrap);
- 1461. -
- 1462. - if (cur.wallTpl.reply_multiline && (e.ctrlKey || browser.mac && e.metaKey) ||
- 1463. - !cur.wallTpl.reply_multiline && !e.shiftKey && !(e.ctrlKey || browser.mac && e.metaKey) && !isListVisible) {
- 1464. - feed.notifySendReply(item);
- 1465. - return cancelEvent(e);
- 1466. - }
- 1467. - }
- 1468. - if (e.ctrlKey && e.keyCode == KEY.RETURN) {
- 1469. - var v = val(rf),
- 1470. - pos = Composer.getCursorPosition(rf);
- 1471. -
- 1472. - val(rf, v.substr(0, pos) + "\n" + v.substr(pos));
- 1473. - elfocus(rf, pos + 1, pos + 1);
- 1474. -
- 1475. - rf.autosize.update();
- 1476. - setTimeout(function () {
- 1477. - rf.autosize.update();
- 1478. - }, 0);
- 1479. - return cancelEvent(e);
- 1480. - }
- 1481. - },
- 1482. - notifySendReply: function (item) {
- 1483. - var opts = cur.notifyReplyData[item];
- 1484. - if (!opts || opts.sending) return;
- 1485. -
- 1486. - var ta = ge(item + '_field'),
- 1487. - btn = ge(item + '_btn'),
- 1488. - params = {
- 1489. - act: 'post',
- 1490. - message: trim(val(ta)),
- 1491. - from: 'feedback',
- 1492. - item: item
- 1493. - };
- 1494. - extend(params, opts.params || {});
- 1495. - if (!params.message || opts.greet && !opts.greet.indexOf(params.message)) {
- 1496. - notaBene(ta);
- 1497. - return;
- 1498. - }
- 1499. - opts.sending = 1;
- 1500. - ajax.post('al_wall.php', params, {
- 1501. - onDone: function (text, answer) {
- 1502. - delete opts.sending;
- 1503. - feed.notifyHideReply(item);
- 1504. - if (answer) {
- 1505. - var answerWrap = ge(item + '_answer_wrap');
- 1506. - val(answerWrap, answer);
- 1507. - show(answerWrap);
- 1508. - } else if (text) {
- 1509. - showDoneBox(text);
- 1510. - }
- 1511. - },
- 1512. - onFail: function () {
- 1513. - delete opts.sending;
- 1514. - },
- 1515. - showProgress: lockButton.pbind(btn),
- 1516. - hideProgress: unlockButton.pbind(btn)
- 1517. - });
- 1518. - },
- 1519. - notifyCheckHideReply: function (item, target) {
- 1520. - var opts = cur.notifyReplyData[item],
- 1521. - toggled = target === false;
- 1522. - if (!opts || opts.sending || !isVisible(item + '_reply_wrap')) return;
- 1523. -
- 1524. - var i = 8, foundGood = false;
- 1525. - do {
- 1526. - if (!target || (foundGood = (target.id == (item + '_reply_wrap') || target.id == ('feedback_row_' + item)))) {
- 1527. - break;
- 1528. - }
- 1529. - } while (i-- && (target = target.parentNode));
- 1530. - if (foundGood) {
- 1531. - return;
- 1532. - }
- 1533. - cur.editing = false;
- 1534. - if (!opts.disabled) {
- 1535. - var ta = ge(item + '_field'), msg = trim(val(ta));
- 1536. - if (msg && !opts.greet || opts.greet.indexOf(msg)) {
- 1537. - return;
- 1538. - }
- 1539. - }
- 1540. - feed.notifyHideReply(item, toggled);
- 1541. - },
- 1542. - notifyHideReply: function (item, toggled) {
- 1543. - if (cur.editing == item) {
- 1544. - cur.editing = false;
- 1545. - }
- 1546. - addClass(ge('feedback_row_' + item).parentNode, 'feedback_row_clickable');
- 1547. - hide(item + '_reply_wrap');
- 1548. - if (toggled) {
- 1549. - feed.notifyRowOver(item, 1);
- 1550. - }
- 1551. - },
- 1552. -
- 1553. - notifyRowOver: function (item, state) {
- 1554. - var el = ge('feedback_row_' + item).parentNode,
- 1555. - prevRow = el.parentNode.previousSibling,
- 1556. - over = 2,
- 1557. - likeEl;
- 1558. -
- 1559. - while (prevRow && prevRow.nodeType == 3) { // skipping text nodes
- 1560. - prevRow = prevRow.previousSibling;
- 1561. - }
- 1562. -
- 1563. - if (state && hasClass(el, 'feedback_row_clickable')) {
- 1564. - if (prevRow && prevRow.className == 'feed_row' && isVisible(geByClass1('feedback_reply_row_wrap', prevRow, 'div'))) {
- 1565. - over = 2;
- 1566. - } else if (!prevRow) {
- 1567. - over = 3;
- 1568. - }
- 1569. - addClass(el, 'feedback_row_clickable_over' + over);
- 1570. - addClass(el, 'feedback_row_clickable_over');
- 1571. - } else {
- 1572. - removeClass(el, 'feedback_row_clickable_over1');
- 1573. - removeClass(el, 'feedback_row_clickable_over2');
- 1574. - removeClass(el, 'feedback_row_clickable_over3');
- 1575. - removeClass(el, 'feedback_row_clickable_over');
- 1576. - if (likeEl = geByTag1('div', geByClass1('like_wrap', ge(el), 'div'))) {
- 1577. - var to = data(likeEl, 'likeoutTO'), tween = data(likeEl, 'tween');
- 1578. - to && clearTimeout(to);
- 1579. - tween && tween.stop(true);
- 1580. - setStyle(likeEl, {display: '', opacity: ''});
- 1581. - }
- 1582. - }
- 1583. - },
- 1584. - expandAppend: function(item, cont, data, right, onlyClient) {
- 1585. - var langs = ['', val('fbgr_' + item + '_1'), val('fbgr_' + item + '_2')];
- 1586. - if (data.date) {
- 1587. - if (ge('feedback_grouped_' + item + '_' + data.mid)) {
- 1588. - val(geByClass1('feedback_row_date', ge('feedback_grouped_' + item + '_' + data.mid)), data.date);
- 1589. - return;
- 1590. - }
- 1591. - if (ge('feedback_grouped_' + item).getAttribute('data-mid') == data.mid) {
- 1592. - return;
- 1593. - }
- 1594. - }
- 1595. - if (onlyClient) return;
- 1596. - cont.appendChild(domFC(ce('div', {innerHTML: '\
- 1597. - <div class="feedback_grouped_row_wrap" id="feedback_grouped_' + item + '_' + data.mid + '" data-mid="' + data.mid + '" data-sex="' + data.sex + '"' + (data.date ? '' : ' data-auto="1"') + '>\
- 1598. - <div class="feedback_grouped_row">\
- 1599. - <table class="feedback_row_t" cellpadding="0" cellspacing="0">\
- 1600. - <tr>\
- 1601. - <td class="feedback_row_photo">\
- 1602. - <div class="feedback_row_photo" onclick="event.cancelBubble = true;">\
- 1603. - <a class="feedback_row_photo_lnk" href="' + data.href + '" onclick="return nav.go(this, event);">\
- 1604. - <img class="feedback_row_photo" src="' + data.img + '" />\
- 1605. - </a>\
- 1606. - </div>\
- 1607. - </td>\
- 1608. - <td class="feedback_row_content">\
- 1609. - <div class="feedback_row_group_names">' + langSex(data.sex, langs).replace('{names}', data.lnk) + '</div>\
- 1610. - <div class="feedback_row_group_photos clear_fix"></div>\
- 1611. - <div class="feedback_row_date">' + (data.date || ' ') + '</div>\
- 1612. - </td>\
- 1613. - ' + right + '\
- 1614. - </tr>\
- 1615. - </table>\
- 1616. - </div>\
- 1617. - </div>'})));
- 1618. - },
- 1619. - expanded: function(item, data, onlyClient) {
- 1620. - var el = ge('feedback_grouped_' + item);
- 1621. - if (!el) return;
- 1622. -
- 1623. - var phs = geByClass1('feedback_row_group_photos', el), tmp = ce('div');
- 1624. - if (domFC(phs)) return;
- 1625. -
- 1626. - var exp = domNS(domPN(el));
- 1627. - if (!hasClass(exp, 'feed_row_fb_expanded')) return;
- 1628. -
- 1629. - var cls = geByClass1('feedback_row_t', el).rows[0].cells,
- 1630. - right = (cls.length > 2) ? '<td class="' + cls[2].className + '">' + val(cls[2]) + '</td>' : '';
- 1631. - for (var i in data) {
- 1632. - feed.expandAppend(item, exp, data[i], right, onlyClient);
- 1633. - }
- 1634. - },
- 1635. - expand: function(ev, item) {
- 1636. - ev = ev || window.event;
- 1637. - if (checkEvent(ev) || ev && ev.target && hasClass(ev.target, 'mem_link')) return;
- 1638. -
- 1639. - var el = ge('feedback_grouped_' + item);
- 1640. - if (!el) return;
- 1641. -
- 1642. - var phs = geByClass1('feedback_row_group_photos', el), tmp = ce('div'), thumbs = !!domFC(phs);
- 1643. - if (thumbs) {
- 1644. - var exp = ce('div', {className: 'feed_row_fb_expanded'}),
- 1645. - langs = ['', val('fbgr_' + item + '_1'), val('fbgr_' + item + '_2')],
- 1646. - cls = geByClass1('feedback_row_t', el).rows[0].cells,
- 1647. - right = (cls.length > 2) ? '<td class="' + cls[2].className + '">' + val(cls[2]) + '</td>' : '';
- 1648. - domPN(domPN(el)).insertBefore(exp, domNS(domPN(el)));
- 1649. - for (var e = domFC(phs); e; e = domFC(phs)) {
- 1650. - if (hasClass(e, 'feedback_group_photo_wrap')) {
- 1651. - var mid = e.getAttribute('data-mid'),
- 1652. - sex = e.getAttribute('data-sex'),
- 1653. - a = geByClass1('feedback_group_photo', e),
- 1654. - name = (a || {}).title || 'DELETED',
- 1655. - href = (a || {}).href || '/',
- 1656. - lnk = '<a href="' + href + '" class="mem_link">' + replaceEntities(name) + '</a>',
- 1657. - img = (domFC(a) || {}).src || '/images/camera_c.gif';
- 1658. - feed.expandAppend(item, exp, {mid: mid, sex: sex, href: href, img: img, lnk: lnk}, right);
- 1659. - }
- 1660. - re(e);
- 1661. - }
- 1662. - ajax.post('al_feed.php', {act: 'expand', item: item}, {onDone: feed.expanded.pbind(item), cache: 1});
- 1663. - } else {
- 1664. - var exp = domNS(domPN(el));
- 1665. - if (!hasClass(exp, 'feed_row_fb_expanded')) return;
- 1666. - for (var e = domFC(exp); e; e = domFC(exp)) {
- 1667. - if (hasClass(e, 'feedback_grouped_row_wrap') && e.getAttribute('data-auto')) {
- 1668. - var name = geByClass1('mem_link', e) || {};
- 1669. - phs.appendChild(domFC(ce('div', {innerHTML: '\
- 1670. - <div class="feedback_group_photo_wrap fl_l" data-mid="' + e.getAttribute('data-mid') + '" data-sex="' + e.getAttribute('data-sex') + '">\
- 1671. - <a href="' + name.href + '" class="feedback_group_photo" title="' + replaceEntities(val(name)) + '"><img src="' + ((domFC(geByClass1('feedback_row_photo_lnk', e)) || {}).src || '/images/camera_c.gif') + '" class="feedback_group_photo" /></a>\
- 1672. - </div>'})));
- 1673. - }
- 1674. - re(e);
- 1675. - }
- 1676. - re(exp);
- 1677. - }
- 1678. - toggleClass(geByClass1('feedback_expand', el), 'feedback_expanded', thumbs);
- 1679. - var names = geByClass1('feedback_row_group_names', el), tmp = val(names),
- 1680. - name = ge('fbgr_' + item + '_this');
- 1681. - val(names, val(name));
- 1682. - val(name, tmp);
- 1683. -
- 1684. - return cancelEvent(ev);
- 1685. - },
- 1686. - ungroup: function(ev, item) {
- 1687. - ev = ev || window.event;
- 1688. - if (checkEvent(ev) || ev && ev.target && hasClass(ev.target, 'mem_link')) return;
- 1689. -
- 1690. - var el = ge('feedback_grouped_' + item + '_wrap');
- 1691. - if (!el) return;
- 1692. -
- 1693. - var hid = domNS(domPN(el)),
- 1694. - names = geByClass1('feedback_row_group_names', el), tmp = val(names),
- 1695. - name = ge('fbgr_' + item + '_that');
- 1696. - toggle(hid);
- 1697. - toggleClass(geByClass1('feedback_expand', el), 'feedback_expanded', isVisible(hid));
- 1698. - val(names, val(name));
- 1699. - val(name, tmp);
- 1700. - },
- 1701. -
- 1702. - notifyPostTooltip: function(el, post, opts) {
- 1703. - var reply = (opts || {}).reply, url = 'al_wall.php';
- 1704. -
- 1705. - if (!post.indexOf('topic_comment')) {
- 1706. - url = 'al_board.php';
- 1707. - post = post.replace('topic_comment', '');
- 1708. - } else {
- 1709. - post = post.replace('wall_reply', '').replace('wall', '');
- 1710. - }
- 1711. -
- 1712. - showTooltip(el, {
- 1713. - url: url,
- 1714. - params: extend({act: 'post_tt', post: post, self: 1, from: 'feedback'}, opts || {}),
- 1715. - slide: 15,
- 1716. - shift: [35, -3, 0],
- 1717. - ajaxdt: 100,
- 1718. - showdt: 400,
- 1719. - hidedt: 200,
- 1720. - className: 'rich wall_tt'
- 1721. - });
- 1722. - },
- 1723. - notifyDeleteOver: function(item, el, label) {
- 1724. - if (label) showTooltip(el, {text: label});
- 1725. - wall && wall._animDelX(1, item);
- 1726. - },
- 1727. - notifyDeleteOut: function (item) {
- 1728. - wall && wall._animDelX(0.6, item);
- 1729. - },
- 1730. - notifyDelete: function (item, types, hash, el, canDel) {
- 1731. - el.tt && el.tt.el && el.tt.hide();
- 1732. - ajax.post('al_feed.php', {act: 'a_feedback_delete', item: item, hash: hash, types: types, candel: canDel}, {
- 1733. - onDone: function (html) {
- 1734. - feed.notifyHideReply(item);
- 1735. - var row = ge('feedback_row_' + item).parentNode;
- 1736. - row.parentNode.replaceChild(se(html), row);
- 1737. - cur.feedEntriesHTML['fb_' + item] = row;
- 1738. - }
- 1739. - })
- 1740. - },
- 1741. - notifyUndelete: function (item, types, hash) {
- 1742. - ajax.post('al_feed.php', {act: 'a_feedback_undelete', item: item, hash: hash, types: types}, {
- 1743. - onDone: function (text) {
- 1744. - var row = ge('feedback_row_' + item);
- 1745. - row.parentNode.replaceChild(cur.feedEntriesHTML['fb_' + item], row);
- 1746. - delete cur.feedEntriesHTML['fb_' + item];
- 1747. - }
- 1748. - })
- 1749. - },
- 1750. - notifyDeleteAll: function (uid, hash, btn, item) {
- 1751. - ajax.post('al_feed.php', {act: 'a_feedback_delete_all', uid: uid, item: item, hash: hash}, {
- 1752. - onDone: function (text) {
- 1753. - showDoneBox(text);
- 1754. - // feed.go(feed.getSectionParams(cur.section), false, true);
- 1755. - var rows = cur.rowsCont, row;
- 1756. - if (rows && (row = rows.firstChild)) {
- 1757. - var startY = false,
- 1758. - st = scrollGetY(),
- 1759. - h, y;
- 1760. - do {
- 1761. - if (row.className &&
- 1762. - hasClass(row, 'feed_row') &&
- 1763. - row.firstChild &&
- 1764. - uid == row.firstChild.getAttribute('author')) {
- 1765. - h = row.offsetHeight;
- 1766. - y = row.offsetTop;
- 1767. - if (startY === false) {
- 1768. - startY = getXY(row.offsetParent)[1]
- 1769. - }
- 1770. - hide(row);
- 1771. - if (y + startY < st) {
- 1772. - st -= h;
- 1773. - scrollToY(st, 0);
- 1774. - }
- 1775. - }
- 1776. - } while (row = row.nextSibling);
- 1777. -
- 1778. - if (cur.wasScroll === 0 || cur.wasScroll > 0) {
- 1779. - cur.wasScroll = st;
- 1780. - }
- 1781. - feed.scrollCheck();
- 1782. - }
- 1783. - },
- 1784. - showProgress: lockButton.pbind(btn),
- 1785. - hideProgress: unlockButton.pbind(btn)
- 1786. - })
- 1787. - },
- 1788. -
- 1789. -
- 1790. - ignoreItem: function (post_raw, feed_raw, hash) {
- 1791. - triggerEvent(ge('post_delete' + post_raw), 'mouseout');
- 1792. - revertLastInlineVideo('post' + post_raw);
- 1793. - cur.feedEntriesHTML[post_raw] = val('post' + post_raw);
- 1794. - ajax.post('/al_feed.php?misc', {act: 'a_ignore_item', post_raw: post_raw, feed_raw: feed_raw, hash: hash}, {
- 1795. - onDone: function (html) {
- 1796. - val('post' + post_raw, html);
- 1797. - }
- 1798. - });
- 1799. - },
- 1800. - unignoreItem: function (post_raw, feed_raw, hash) {
- 1801. - ajax.post('/al_feed.php?misc', {act: 'a_unignore_item', post_raw: post_raw, feed_raw: feed_raw, hash: hash}, {
- 1802. - onDone: function () {
- 1803. - feed.restorePost(post_raw);
- 1804. - }
- 1805. - });
- 1806. - },
- 1807. - reportIgnoredItem: function (post, hash) {
- 1808. - ajax.post('al_wall.php', {act: 'spam', post: post, hash: hash}, {
- 1809. - onDone: function(msg) {
- 1810. - var r = ge('post' + post), label = r && geByClass1('feed_post_report', r, 'div');
- 1811. - val(label, msg);
- 1812. - }
- 1813. - });
- 1814. - },
- 1815. - ignoreOwner: function (post_raw, owner_id, hash, btn) {
- 1816. - if (post_raw) {
- 1817. - cur.feedEntriesHTML[post_raw + '_ignored'] = val('post' + post_raw);
- 1818. - }
- 1819. - ajax.post('/al_feed.php?misc', {act: 'a_ignore_owner', post_raw: post_raw, owner_id: owner_id, hash: hash, list: cur.section == 'list' && cur.list || 0}, {
- 1820. - onDone:function(html) {
- 1821. - val('post' + post_raw, html);
- 1822. - each(geByClass('post', cur.rowsCont), function(i,v) {
- 1823. - var ids = this.id.match(/post((-?\d+)_(-?\d+)(_\d+)?)/);
- 1824. - if (ids[1] != post_raw && (!ids[4] && ids[2] == owner_id || ids[4] && ids[3] == owner_id)) {
- 1825. - revertLastInlineVideo(this);
- 1826. - hide(this.parentNode);
- 1827. - }
- 1828. - });
- 1829. - },
- 1830. - showProgress: btn && lockButton.pbind(btn),
- 1831. - hideProgress: btn && unlockButton.pbind(btn)
- 1832. - });
- 1833. - },
- 1834. - unignoreOwner: function (post_raw, owner_id, hash) {
- 1835. - ajax.post('/al_feed.php?misc', {act: 'a_unignore_owner', post_raw: post_raw || '', owner_id: owner_id, hash: hash, list: cur.section == 'list' && cur.list || 0}, {
- 1836. - onDone:function(html) {
- 1837. - if (post_raw) {
- 1838. - val('post' + post_raw, cur.feedEntriesHTML[post_raw + '_ignored']);
- 1839. - } else {
- 1840. - val('ignore_row' + owner_id, html);
- 1841. - }
- 1842. - each(geByClass('post', cur.rowsCont), function(i,v) {
- 1843. - var ids = this.id.match(/post((-?\d+)_(-?\d+)(_\d+)?)/);
- 1844. - if (!ids[4] && ids[2] == owner_id || ids[4] && ids[3] == owner_id) {
- 1845. - show(this.parentNode);
- 1846. - }
- 1847. - });
- 1848. - }
- 1849. - });
- 1850. - },
- 1851. - unsubscribe: function (post_raw, hash) {
- 1852. - triggerEvent(ge('post_delete' + post_raw), 'mouseout');
- 1853. - cur.feedEntriesHTML[post_raw] = ge('post' + post_raw).innerHTML;
- 1854. - var matches = post_raw.match(/(\-?\d+)_(photo|video|topic|note|)(\d+)/);
- 1855. - if (!matches) return;
- 1856. - ajax.post('al_feed.php', {act: 'unsubscribe', type: {'': 24, photo: 21, video: 22, topic: 20, note: 23}[matches[2]], owner_id: matches[1], place_id: matches[3], hash: hash, feed: 1}, {
- 1857. - onDone: function(html) { ge('post' + post_raw).innerHTML = html.replace('%post_raw%', post_raw); }
- 1858. - });
- 1859. - },
- 1860. - subscribe: function (post_raw, hash) {
- 1861. - var matches = post_raw.match(/(\-?\d+)_(photo|video|topic|note|)(\d+)/);
- 1862. - if (!matches) return;
- 1863. - ajax.post('al_feed.php', {act: 'subscribe', type: {'': 24, photo: 21, video: 22, topic: 20, note: 23}[matches[2]], owner_id: matches[1], place_id: matches[3], hash: hash, feed: 1}, {
- 1864. - onDone: feed.restorePost.pbind(post_raw)
- 1865. - });
- 1866. - },
- 1867. - restorePost: function (post_raw) {
- 1868. - ge('post' + post_raw).innerHTML = cur.feedEntriesHTML[post_raw];
- 1869. - var ph_back = geByClass1('input_back', ge('post' + post_raw), 'div');
- 1870. - var ta = geByTag1('textarea', ge('post' + post_raw));
- 1871. - if (!ta) return;
- 1872. - ta.placeholder = ph_back.innerHTML;
- 1873. - ph_back.parentNode.removeChild(ph_back);
- 1874. - placeholderSetup(ta);
- 1875. - },
- 1876. - toggleReposts: function (place, rand, e) {
- 1877. - if (checkEvent(e)) return true;
- 1878. -
- 1879. - var lnk = ge('feed_reposts_more' + place + '_' + rand),
- 1880. - cont = ge('feed_reposts' + place + '_' + rand),
- 1881. - h = 0,
- 1882. - st = scrollGetY(),
- 1883. - vis = isVisible(cont);
- 1884. - if (!cont) {
- 1885. - lnk && re(lnk.parentNode.parentNode);
- 1886. - return;
- 1887. - }
- 1888. -
- 1889. - if (vis) {
- 1890. - h -= cont.offsetHeight;
- 1891. - } else {
- 1892. - (domPN(domPN(cont)) || {}).bits = 0;
- 1893. - }
- 1894. - toggle(cont, !vis);
- 1895. - val(lnk, !vis ? getLang('news_hide_reposts') : getLang('news_show_X_reposts', cont.childNodes.length));
- 1896. - if (h) {
- 1897. - scrollToY(st + h, 0);
- 1898. - }
- 1899. - return false;
- 1900. - },
- 1901. -
- 1902. - sliderScaleClick: function (e) {
- 1903. - if (checkEvent(e)) return;
- 1904. - var slider = ge('feed_rate_slider'),
- 1905. - scale = slider.parentNode,
- 1906. - maxX = (scale.clientWidth || 100) - slider.offsetWidth,
- 1907. - margin = Math.max(0, Math.min(maxX, (e.offsetX || e.layerX) - slider.offsetWidth / 2)),
- 1908. - percent = margin / maxX * 100;
- 1909. -
- 1910. - setStyle('feed_rate_slider', 'marginLeft', margin);
- 1911. - feed.sliderUpdate(percent);
- 1912. - feed.sliderClick(e);
- 1913. - },
- 1914. - sliderClick: function (e) {
- 1915. - if (checkEvent(e)) return;
- 1916. - e.cancelBubble = true;
- 1917. -
- 1918. - var startX = e.clientX || e.pageX,
- 1919. - slider = ge('feed_rate_slider'),
- 1920. - scale = slider.parentNode,
- 1921. - startMargin = slider.offsetLeft || 0,
- 1922. - maxX = (scale.clientWidth || 100) - slider.offsetWidth,
- 1923. - selectEvent = 'mousedown selectstart',
- 1924. - defPercent = intval(cur.default_percent),
- 1925. - margin, percent;
- 1926. -
- 1927. - var _temp = function (e) {
- 1928. - margin = Math.max(0, Math.min(maxX, startMargin + (e.clientX || e.pageX)- startX));
- 1929. - percent = margin / maxX * 100;
- 1930. -
- 1931. - if (Math.abs(percent - 100) < 8) {
- 1932. - percent = 100;
- 1933. - }
- 1934. - if (defPercent > 0 && Math.abs(percent - defPercent) < 3) {
- 1935. - percent = defPercent;
- 1936. - }
- 1937. - percent = intval(percent);
- 1938. - margin = maxX * percent / 100;
- 1939. - slider.style.marginLeft = margin + 'px';
- 1940. - feed.sliderUpdate(percent);
- 1941. - return cancelEvent(e);
- 1942. - }, _temp2 = function () {
- 1943. - removeEvent(document, 'mousemove', _temp);
- 1944. - removeEvent(document, 'mouseup', _temp2);
- 1945. - removeEvent(document, selectEvent, cancelEvent);
- 1946. - setStyle(bodyNode, 'cursor', '');
- 1947. - setStyle(scale, 'cursor', '');
- 1948. - feed.sliderApply();
- 1949. - };
- 1950. -
- 1951. - addEvent(document, 'mousemove', _temp);
- 1952. - addEvent(document, 'mouseup', _temp2);
- 1953. - addEvent(document, selectEvent, cancelEvent);
- 1954. - setStyle(bodyNode, 'cursor', 'pointer');
- 1955. - setStyle(scale, 'cursor', 'pointer');
- 1956. - return false;
- 1957. - },
- 1958. - sliderSelectChanged: function (e) {
- 1959. - var percent = ge(cur.section == 'articles' ? 'feed_period_select' : 'feed_rate_select').value;
- 1960. - feed.sliderUpdate(percent);
- 1961. - feed.sliderApply();
- 1962. - },
- 1963. - sliderUpdate: function (percent, upd) {
- 1964. - percent = intval(percent);
- 1965. - switch (cur.section) {
- 1966. - case 'articles':
- 1967. - case 'articles_search':
- 1968. - cur.periodPercent = percent;
- 1969. - var label = getLang('news_top_no_articles');
- 1970. - each (cur.top_periods, function (p, key) {
- 1971. - if (percent < p) {
- 1972. - return false;
- 1973. - }
- 1974. - label = key;
- 1975. - });
- 1976. - val('feed_rate_slider_label', label);
- 1977. - break;
- 1978. - }
- 1979. - if (upd) {
- 1980. - if (isVisible('feed_rate_slider_wrap')) {
- 1981. - var slider = ge('feed_rate_slider'),
- 1982. - maxX = (slider.parentNode.clientWidth || 100) - slider.offsetWidth;
- 1983. - setStyle('feed_rate_slider', 'marginLeft', maxX * percent / 100);
- 1984. - }
- 1985. - var wasSelected = false, select = ge('feed_period_select');
- 1986. - each(select && select.childNodes || [], function () {
- 1987. - if (this.tagName != 'OPTION') return;
- 1988. - if (wasSelected === false && this.value >= percent) {
- 1989. - this.setAttribute('selected', 'selected');
- 1990. - select.value = this.value;
- 1991. - wasSelected = true;
- 1992. - } else {
- 1993. - removeAttr(this, 'selected');
- 1994. - }
- 1995. - });
- 1996. - }
- 1997. - },
- 1998. - sliderApply: function () {
- 1999. - if (!cur.section.indexOf('articles')) {
- 2000. - feed.switchSection(cur.section);
- 2001. - return;
- 2002. - }
- 2003. - },
- 2004. - sliderShowProgress: function () {
- 2005. - addClass('feed_rate_slider_wrap', 'feed_rate_wait');
- 2006. - },
- 2007. - sliderHideProgress: function () {
- 2008. - removeClass('feed_rate_slider_wrap', 'feed_rate_wait');
- 2009. - },
- 2010. -
- 2011. - editHidden: function () {
- 2012. - showTabbedBox('al_settings.php', {act: 'a_edit_owners_list', list: 'feed', height: lastWindowHeight}, {stat: ['privacy.js', 'privacy.css', 'ui_controls.js', 'ui_controls.css', 'indexer.js']});
- 2013. - cur.onOListSave = feed.onHiddenSave;
- 2014. - return false;
- 2015. - },
- 2016. - onHiddenSave: function (white, black, list, options) {
- 2017. - var box = curBox(), params = {act: 'a_ignore_olist', hash: options.hash};
- 2018. - if (white.length < black.length) {
- 2019. - params.White = white.join(',');
- 2020. - } else {
- 2021. - params.Black = black.join(',');
- 2022. - }
- 2023. - ajax.post('al_feed.php', params, {
- 2024. - onDone: function(control, rules) {
- 2025. - box.hide();
- 2026. - feed.switchSection(cur.section == 'photos' ? 'photos' : 'news');
- 2027. - },
- 2028. - showProgress: box.showProgress,
- 2029. - hiderogress: box.hideProgress
- 2030. - });
- 2031. - return false;
- 2032. - },
- 2033. -
- 2034. - addList: function () {
- 2035. - Feed.toggleTabsMenu(0);
- 2036. - showTabbedBox('al_settings.php', {act: 'a_edit_owners_list', list: 'feed', list_id: -1, height: lastWindowHeight}, {
- 2037. - stat: ['privacy.js', 'privacy.css', 'ui_controls.js', 'ui_controls.css', 'indexer.js'],
- 2038. - onFail: function (text) {
- 2039. - setTimeout(showFastBox({title: getLang('global_error')}, text, getLang('global_close')).hide, 4500);
- 2040. - return true;
- 2041. - }
- 2042. - });
- 2043. - cur.onOListSave = feed.onListSave.pbind(-1);
- 2044. - return false;
- 2045. - },
- 2046. - editList: function (list_id) {
- 2047. - Feed.toggleTabsMenu(0);
- 2048. - showTabbedBox('al_settings.php', {act: 'a_edit_owners_list', list: 'feed', list_id: list_id, height: lastWindowHeight}, {stat: ['privacy.js', 'privacy.css', 'ui_controls.js', 'ui_controls.css', 'indexer.js']});
- 2049. - cur.onOListSave = feed.onListSave.pbind(list_id);
- 2050. - return false;
- 2051. - },
- 2052. - onListSave: function (list_id, white, black, list, options) {
- 2053. - var listName = val('feed_list_name');
- 2054. - if (!trim(listName)) {
- 2055. - notaBene('feed_list_name');
- 2056. - return false;
- 2057. - }
- 2058. - if (!white.length) {
- 2059. - return false;
- 2060. - }
- 2061. - var box = curBox();
- 2062. - ajax.post('al_feed.php', {
- 2063. - act: 'a_save_list',
- 2064. - hash: cur.tabs_hash,
- 2065. - White: white.join(','),
- 2066. - title: listName,
- 2067. - list_id: list_id,
- 2068. - no_reposts: ge('feed_list_reposts') && !isChecked('feed_list_reposts') ? 1 : 0
- 2069. - }, {
- 2070. - onDone: function(new_list_id) {
- 2071. - var topTab = geByClass1('feed_tab_list' + list_id, ge('feed_news_bar')),
- 2072. - filterTab = ge('filter_t_list' + list_id);
- 2073. - val(geByTag1('nobr', topTab), clean(listName));
- 2074. - val(geByClass1('feed_filter_tabs_title', filterTab), clean(listName));
- 2075. - box.hide();
- 2076. - if (list_id > 0) {
- 2077. - Feed.switchList(list_id);
- 2078. - } else {
- 2079. - nav.go({'0': 'feed', section: 'list', list: new_list_id}, null, {nocur: true});
- 2080. - }
- 2081. - },
- 2082. - showProgress: box.showProgress,
- 2083. - hiderogress: box.hideProgress
- 2084. - });
- 2085. - return false;
- 2086. - },
- 2087. - deleteList: function (list_id, force) {
- 2088. - if (list_id <= 0) {
- 2089. - return false;
- 2090. - }
- 2091. -
- 2092. - if (!force) {
- 2093. - var box = showFastBox(getLang('news_delete_list_confirm_title'), getLang('news_delete_list_confirm'), getLang('box_yes'), function () {
- 2094. - Feed.deleteList(list_id, true);
- 2095. - }, getLang('box_no'), function () {
- 2096. - box.hide();
- 2097. - });
- 2098. - return;
- 2099. - }
- 2100. - var box = curBox();
- 2101. - ajax.post('al_feed.php', extend({act: 'a_delete_list', list_id: list_id, hash: cur.tabs_hash}), {
- 2102. - onDone: function () {
- 2103. - re(geByClass1('feed_tab_list' + list_id, ge('feed_news_bar')));
- 2104. - re('filter_t_list' + list_id);
- 2105. - boxQueue.hideAll();
- 2106. - if (cur.section == 'list' && cur.list == list_id) {
- 2107. - feed.switchSection('news');
- 2108. - }
- 2109. - },
- 2110. - showProgress: box.showProgress,
- 2111. - hideProgress: box.hideProgress
- 2112. - });
- 2113. - },
- 2114. -
- 2115. - saveTabs: function () {
- 2116. - ajax.post('al_feed.php', {act: 'a_save_tabs', hash: cur.tabs_hash, tabs: cur.my_feed_types.tabs.join(',')});
- 2117. - },
- 2118. -
- 2119. - statsShow: function (e, opts) {
- 2120. - return showWiki({w: 'stats' + (cur.source || '')}, false, e);
- 2121. - },
- 2122. -
- 2123. - // scrollTop check
- 2124. - scrollCheck: function() {
- 2125. - if (!cur.idleManager || cur.isFeedLoading || cur.idleManager.isIdle || cur.disableAutoMore) return;
- 2126. - var el = ge('show_more_link');
- 2127. - if (!isVisible(el)) return;
- 2128. -
- 2129. - var ch = window.innerHeight || document.documentElement.clientHeight || bodyNode.clientHeight,
- 2130. - st = scrollGetY(), top, ntop = 0, el, nel, bits, posts = [];
- 2131. -
- 2132. - if (st + ch + 1000 > el.offsetTop) {
- 2133. - feed.showMore();
- 2134. - }
- 2135. -
- 2136. - if (
- 2137. - domPN(cur.topRow) != cur.rowsCont ||
- 2138. - (cur.topRow || {}).id == 'feed_rows_next'
- 2139. - ) {
- 2140. - cur.topRow = domFC(cur.rowsCont);
- 2141. - }
- 2142. - if (
- 2143. - !vk.id ||
- 2144. - !cur.topRow ||
- 2145. - cur.topRow.id == 'feed_rows_next' ||
- 2146. - cur.section != 'news' && cur.section != 'recommended' ||
- 2147. - ((window.curNotifier || {}).idle_manager || {}).is_idle
- 2148. - ) {
- 2149. - return;
- 2150. - }
- 2151. - for (el = domPS(cur.topRow); el && cur.topRow.offsetTop > st; el = domPS(el)) cur.topRow = el;
- 2152. - for (el = cur.topRow; el; el = nel) {
- 2153. - top = ntop ? ntop : el.offsetTop;
- 2154. - if (top >= st + ch) break;
- 2155. -
- 2156. - nel = domNS(el);
- 2157. - if ((nel || {}).id == 'feed_rows_next') nel = null;
- 2158. -
- 2159. - ntop = nel ? nel.offsetTop : top + el.offsetHeight;
- 2160. - if (ntop < st && nel) cur.topRow = nel;
- 2161. -
- 2162. - bits = el.bits || 0;
- 2163. - if (bits >= 3) continue;
- 2164. -
- 2165. - bits |= ((top >= st && top < st + ch) ? 1 : 0) | ((ntop >= st && ntop < st + ch) ? 2 : 0);
- 2166. - if (bits) {
- 2167. - el.bits = bits;
- 2168. - if (bits == 3) {
- 2169. - posts.push(Feed.postsGetRaws(el));
- 2170. - }
- 2171. - }
- 2172. - }
- 2173. - Page.postsSeen(posts);
- 2174. - },
- 2175. -
- 2176. - postsGetRaws: function(el) {
- 2177. - var f = domFC(el), c, m, p, r = /^post(-?\d+_\d+)$/, res = {};
- 2178. - if (m = f.id.match(r)) {
- 2179. - res[m[1]] = 1;
- 2180. - } else {
- 2181. - c = f.className;
- 2182. - if (m = c.match(/feed_reposts_wrap(-?\d+_\d+)/)) {
- 2183. - p = domFC(f);
- 2184. - if (hasClass(domFC(p), 'post_copy')) {
- 2185. - res[m[1]] = -1;
- 2186. - }
- 2187. - if (m = domFC(p).id.match(r)) {
- 2188. - res[m[1]] = 1;
- 2189. - }
- 2190. - if (isVisible(p = domNS(p))) {
- 2191. - for (p = domFC(p); p; p = domNS(p)) {
- 2192. - if (m = p.id.match(r)) {
- 2193. - res[m[1]] = 1;
- 2194. - }
- 2195. - }
- 2196. - }
- 2197. - } else if (m = c.match(/feed_repost(-?\d+_\d+)/)) {
- 2198. - p = domFC(f);
- 2199. - if (hasClass(p, 'post_copy')) {
- 2200. - res[m[1]] = -1;
- 2201. - }
- 2202. - if (m = p.id.match(r)) {
- 2203. - res[m[1]] = 1;
- 2204. - }
- 2205. - }
- 2206. - }
- 2207. - return res;
- 2208. - },
- 2209. - searchPreloadExtended: function () {
- 2210. - if (cur.feedSearchExtendedLoaded || cur.feedSearchExtendedPreloaded) {
- 2211. - return false;
- 2212. - }
- 2213. - cur.feedSearchExtendedPreloaded = true;
- 2214. - ajax.post('al_feed.php', {act: 'a_get_search_extended'}, {cache: 1});
- 2215. - },
- 2216. - searchToggleExtended: function (enabled) {
- 2217. - if (cur.feedSearchExtendedLoaded || !enabled) {
- 2218. - toggle('feed_search_extform', enabled);
- 2219. - return;
- 2220. - }
- 2221. - var visibleBefore = [isVisible('feed_menu_toggle'), isVisible('feed_edit_hidden'), isVisible('feed_search_sort')];
- 2222. - ajax.post('al_feed.php', {act: 'a_get_search_extended'}, {
- 2223. - stat: ['ui_controls.css', 'ui_controls.js'],
- 2224. - showProgress: function () {
- 2225. - show('feed_progress');
- 2226. - hide('feed_menu_toggle', 'feed_edit_hidden', 'feed_search_sort');
- 2227. - },
- 2228. - hideProgress: function () {
- 2229. - hide('feed_progress');
- 2230. - toggle('feed_menu_toggle', visibleBefore[0]);
- 2231. - toggle('feed_edit_hidden', visibleBefore[1]);
- 2232. - toggle('feed_search_sort', visibleBefore[2]);
- 2233. - },
- 2234. - cache: 1,
- 2235. - onDone: function (html, js) {
- 2236. - cur.feedSearchExtendedLoaded = true;
- 2237. - val('feed_search_extform', html);
- 2238. - show('feed_search_extform');
- 2239. - eval(js);
- 2240. - }
- 2241. - });
- 2242. - },
- 2243. - searchAppendTag: function (tag, pattern, nosubmit) {
- 2244. - if (!trim(tag) && !pattern) {
- 2245. - return;
- 2246. - }
- 2247. - var text = val('feed_search');
- 2248. - try {
- 2249. - text = text.replace(pattern || new RegExp('(^|\\s)' + tag + '(\\s|$)', 'i'), ' ');
- 2250. - } catch (e) {};
- 2251. - text += ' ' + tag + ' ';
- 2252. - text = text.replace(/\s{2,}/g, ' ').replace(/^\s+/, '');
- 2253. - val('feed_search', text);
- 2254. - if (trim(text).length && !nosubmit) {
- 2255. - Feed.submitSearch();
- 2256. - }
- 2257. - Feed.searchUpdate();
- 2258. - },
- 2259. - searchUnchooseGeoPoint: function () {
- 2260. - var map = ge('feed_searchext_map'),
- 2261. - x = ge('feed_searchext_map_delete_wrap');
- 2262. -
- 2263. - removeClass(map, 'feed_searchext_map_selected');
- 2264. - setStyle(map, {background: ''});
- 2265. - x && x.tt && x.tt.hide && x.tt.hide();
- 2266. - Feed.searchAppendTag('', /near:[0-9\.,\-\+]+/);
- 2267. - },
- 2268. - searchChooseGeoPoint: function () {
- 2269. - var params = {act: 'a_choose_place_box', search: 1},
- 2270. - text = val('feed_search'),
- 2271. - currentPointMatches = text.match(/near\:(\-?\d{1,3}(?:\.\d+)?)\,(\-?\d{1,3}(?:\.\d+)?)(\+{0,4})/);
- 2272. -
- 2273. - if (currentPointMatches) {
- 2274. - params.lat = floatval(currentPointMatches[1]);
- 2275. - params.lon = floatval(currentPointMatches[2]);
- 2276. - params.zoom = [8, 11, 14, 17, 20][(currentPointMatches[3] || '').length]
- 2277. - }
- 2278. - showBox('al_places.php', params, {dark: 1});
- 2279. - cur.chooseGeoPoint = function (lat, lon, zoom) {
- 2280. - var num = 0;
- 2281. - each([8, 11, 14, 17, 20], function (k, zoomLevel) {
- 2282. - if (zoom <= zoomLevel) {
- 2283. - return false;
- 2284. - }
- 2285. - num = k;
- 2286. - });
- 2287. - boxQueue.hideLast();
- 2288. - var postfix = (new Array(num + 1)).join('+');
- 2289. - var mult = Math.pow(10, 10);
- 2290. - lat = Math.round(lat * mult) / mult;
- 2291. - lon = Math.round(lon * mult) / mult;
- 2292. -
- 2293. - var map = ge('feed_searchext_map');
- 2294. - addClass(map, 'feed_searchext_map_selected');
- 2295. - setStyle(map, {
- 2296. - background: 'url(/maps?lat='+lat+'&lng='+lon+'&z='+zoom+'&'+(window.devicePixelRatio >= 2 ? 'w=260&h=160' : 'w=130&h=80')+')'
- 2297. - });
- 2298. - Feed.searchAppendTag('near:' + lat + ',' + lon + postfix, /near:[0-9\.,\-\+]+/);
- 2299. - };
- 2300. - },
- 2301. - searchChooseFilter: function (filter, item) {
- 2302. - var uiDropdown;
- 2303. - switch (filter) {
- 2304. - case 'type':
- 2305. - uiDropdown = cur.uiSearchPostType; break;
- 2306. - case 'has':
- 2307. - uiDropdown = cur.uiSearchPostAttach; break;
- 2308. - case 'likes':
- 2309. - uiDropdown = cur.uiSearchPostLikes; break;
- 2310. -
- 2311. - default: return false;
- 2312. - }
- 2313. - var sel = (uiDropdown.selectedItems() || [])[0];
- 2314. -
- 2315. - Feed.searchAppendTag(sel && intval(sel[0]) ? (filter + ':' + (sel[3] || sel[0])) : '', new RegExp(filter + ':' + '[\\S]+', 'g'));
- 2316. - },
- 2317. - searchExcludeOnChange: function (input, nosubmit) {
- 2318. - var exclude = trim(val(input));
- 2319. - if (!exclude) {
- 2320. - return false;
- 2321. - }
- 2322. - var words = trim(exclude).split(/[\s\,\.\/\!\@\#\$\%\^\&\*\(\)\-\=\:\~\;\'\"\|\}\{\+]+/),
- 2323. - len = words.length,
- 2324. - newTag = len > 0 && ('-' + words.join(' -')) || '';
- 2325. -
- 2326. - Feed.searchAppendTag(newTag, /(?:\s|^)\-\S+/g, nosubmit);
- 2327. - },
- 2328. - searchUrlOnChange: function (fromTooltip) {
- 2329. - var urlMatches = (val('feed_searchext_link') || '').match(urlInactiveExp),
- 2330. - newTag = '';
- 2331. -
- 2332. - if (urlMatches) {
- 2333. - var url = urlMatches[4] + (urlMatches[5] || ''),
- 2334. - domain = urlMatches[4],
- 2335. - newTag = radioBtns.feed_searchext_domain.val ? ('domain:' + domain) : ('url:' + url);
- 2336. - }
- 2337. - Feed.searchAppendTag(newTag, cur.feedSearchPrevLinkTag);
- 2338. - cur.feedSearchPrevLinkTag = newTag;
- 2339. -
- 2340. - if (fromTooltip) {
- 2341. - elfocus('feed_searchext_link');
- 2342. - }
- 2343. - },
- 2344. - searchContentOnChange: function () {
- 2345. - var urlMatches = (val('feed_searchext_content') || '').match(urlInactiveExp),
- 2346. - domainMatches = urlMatches && urlMatches[4].match(/(^|\.|\/\/)vkontakte\.ru|vk\.com/),
- 2347. - mediaMatches = domainMatches && urlMatches[5].match(/(?:#(photo)|^\/(photo|video|album|page|audio|wall)|z=(album|photo|video)|w=(page|wall))(-?\d+_)?(\d+)(?:\?reply=(\d+))?$/),
- 2348. - newTag = '';
- 2349. -
- 2350. - if (mediaMatches) {
- 2351. - var mediaType = mediaMatches[1] || mediaMatches[2] || mediaMatches[3] || mediaMatches[4],
- 2352. - mediaID = mediaMatches[5] + (mediaMatches[7] || mediaMatches[6]),
- 2353. - newTag = 'copy:' + mediaType + mediaID;
- 2354. - }
- 2355. - Feed.searchAppendTag(newTag, /copy\:\S+/);
- 2356. - },
- 2357. - searchUpdate: function () {
- 2358. - val(cur.searchPh, !cur.section.indexOf('photos') ? getLang('news_photo_search') : getLang('news_search'));
- 2359. -
- 2360. - toggle('feed_query_reset', trim(val('feed_search')));
- 2361. - },
- 2362. - searchClickOutside: function (event) {
- 2363. - if (val('feed_search') || !hasClass('feed_bar', 'feed_bar_extended_search') || isChecked('feed_search_extended_checkbox')) {
- 2364. - return;
- 2365. - }
- 2366. - removeClass('feed_bar', 'feed_bar_extended_search');
- 2367. - },
- 2368. - searchReset: function (fire) {
- 2369. - console.trace();
- 2370. - val('feed_search', '');
- 2371. - // removeClass('feed_bar', 'feed_bar_extended_search');
- 2372. - each ([cur.uiSearchPostType, cur.uiSearchPostAttach, cur.uiSearchPostLikes], function () {
- 2373. - this.val(0);
- 2374. - });
- 2375. - each(['feed_searchext_exclude', 'feed_searchext_link', 'feed_searchext_content'], function (k, input) {
- 2376. - val(input, '');
- 2377. - });
- 2378. - Feed.searchUnchooseGeoPoint();
- 2379. - Feed.searchUpdate();
- 2380. - if (!fire) {
- 2381. - return;
- 2382. - }
- 2383. -
- 2384. - var switchTo = 'news';
- 2385. - switch (cur.section) {
- 2386. - case 'articles':
- 2387. - case 'articles_search':
- 2388. - switchTo = 'articles';
- 2389. - break;
- 2390. -
- 2391. - case 'photos_search':
- 2392. - case 'photos':
- 2393. - switchTo = 'photos';
- 2394. - break;
- 2395. - }
- 2396. - Feed.switchSection(switchTo);
- 2397. - },
- 2398. -
- 2399. - sinceOwnerOver: function (obj, oid, name) {
- 2400. - if (!obj.nophoto) {
- 2401. - Feed.sinceOwnerBigphOver(obj, oid);
- 2402. - }
- 2403. - showTooltip(obj, {
- 2404. - text: name,
- 2405. - showdt: 0,
- 2406. - hidedt: 0,
- 2407. - black: 1,
- 2408. - shift: [12, 3, 3],
- 2409. - forcetoup: true,
- 2410. - // onCreate: function () {removeEvent(obj, 'mouseout');},
- 2411. - className: 'feed_since_owner_tt'
- 2412. - });
- 2413. - },
- 2414. - sinceOwnerBigphOver: function(obj, oid) {
- 2415. - if (!cur.lang || !cur.lang.global_photo_full_size || browser.mobile) return;
- 2416. - var o = obj.firstChild,
- 2417. - ch = cur.phCache[oid];
- 2418. - if (o.tagName != 'A' || o.className != 'feed_since_ownerph') {
- 2419. - o = obj.insertBefore(ce('a', {className: 'feed_since_ownerph', href: ch && ch._id ? ('/photo' + ch._id + '?all=1') : ('/albums' + oid), innerHTML: '<span class="feed_since_ownerph_label">' + cur.lang.global_photo_full_size + '</span>'}), obj.firstChild);
- 2420. - o.onclick = Feed.sinceOwnerBigphClick.pbind(oid, obj);
- 2421. - o._oid = oid;
- 2422. - }
- 2423. -
- 2424. - clearTimeout(o.hideTO);
- 2425. - animate(o, {marginTop: 65}, {duration: 200, transition: Fx.Transitions.easeOutCirc});
- 2426. - cur.phShown[oid] = o;
- 2427. -
- 2428. - if (!obj.onmouseout) obj.onmouseout = Feed.sinceOwnerBigphOut.pbind(obj);
- 2429. - },
- 2430. - sinceOwnerBigphOut: function(obj) {
- 2431. - var o = obj.firstChild;
- 2432. - if (!o || o.tagName != 'A' || o.className != 'feed_since_ownerph') return;
- 2433. -
- 2434. - clearTimeout(o.hideTO);
- 2435. - o.hideTO = setTimeout(function() {
- 2436. - animate(o, {marginTop: 90}, 200);
- 2437. - delete cur.phShown[o._oid];
- 2438. - }, 150);
- 2439. - },
- 2440. - sinceOwnerBigphClick: function(oid, obj, ev) {
- 2441. - if (checkEvent(ev) !== false) return;
- 2442. -
- 2443. - obj && obj.tt && obj.tt.destroy();
- 2444. - var ch = cur.phCache[oid]
- 2445. - o = cur.phShown[oid],
- 2446. - obj = domPN(o);
- 2447. -
- 2448. - if (!o || !obj) return;
- 2449. - if (ch === undefined) {
- 2450. - ch = cur.phCache[oid] = 'show';
- 2451. - ajax.post('al_photos.php', {act: 'fast_get_photo', oid: oid}, {onDone: function(res) {
- 2452. - if (!res) {
- 2453. - obj.onmouseover = function() {};
- 2454. - re(o);
- 2455. - return;
- 2456. - }
- 2457. - var sh = (cur.phCache[oid] == 'show');
- 2458. - cur.phCache[oid] = res;
- 2459. - o.href = '/photo' + res._id + '?all=1';
- 2460. - if (sh) Feed.sinceOwnerBigphClick(oid, obj);
- 2461. - }, onFail: function() {
- 2462. - obj.nophoto = true;
- 2463. - re(o);
- 2464. - return true;
- 2465. - }});
- 2466. - }
- 2467. - if (ch == 'show') {
- 2468. - return cancelEvent(ev);
- 2469. - }
- 2470. - if (!ch) return;
- 2471. - extend(ch, {
- 2472. - jumpTo: {z: 'albums' + oid}
- 2473. - });
- 2474. - return showPhoto(ch._id, 'album' + oid + '_0/rev', ch, ev);
- 2475. - },
- 2476. -
- 2477. - go: function(params, onBeforeReplace, noscroll) {
- 2478. - if (cur._back_local) {
- 2479. - var hist = cur._back_local;
- 2480. - if (hist.back) {
- 2481. - showBackLink(hist.back[0], hist.back[1], hist.back[2]);
- 2482. - } else {
- 2483. - showBackLink(false);
- 2484. - }
- 2485. - cur._back_local = false;
- 2486. - }
- 2487. - if (cur.feedReq) {
- 2488. - try {
- 2489. - cur.feedReq.abort();
- 2490. - } catch (e) {debugLog(e);}
- 2491. - }
- 2492. - var frame = 1, hideProgress = function () {
- 2493. - cur.isFeedLoading = false;
- 2494. - };
- 2495. - if (browser.msie || noscroll) {
- 2496. - frame = false;
- 2497. - hideProgress = cur.onFrameBlocksDone;
- 2498. - }
- 2499. - cur.wasScroll = noscroll ? scrollGetY() : false;
- 2500. - cur.feedReq = ajax.post('al_feed.php', extend(params, {part: 1}), {
- 2501. - onDone: function (options, rows, js) {
- 2502. - // debugLog(onBeforeReplace, options, rows.length, js);
- 2503. - revertLastInlineVideo();
- 2504. - if (window.tooltips) tooltips.destroyAll(ge('feed_rows'));
- 2505. - boxQueue.hideAll();
- 2506. - if (layers.fullhide) layers.fullhide(true);
- 2507. -
- 2508. - if (frame) {
- 2509. - ajax._framenext();
- 2510. - }
- 2511. - if (window.wall) wall.cancelEdit();
- 2512. - boxQueue.hideAll();
- 2513. - if (onBeforeReplace) {
- 2514. - onBeforeReplace(rows || '');
- 2515. - } else {
- 2516. - val(cur.rowsCont, rows || '');
- 2517. - }
- 2518. - feed.applyOptions(options, 2);
- 2519. - js && eval(js);
- 2520. -
- 2521. - if (!params.norecom) {
- 2522. - val('feed_recommends', options.recommends || '');
- 2523. - var str = '/al_feed.php#' + ajx2q({act: 'recom'});
- 2524. - if (ajaxCache[str]) delete(ajaxCache[str]);
- 2525. - cur.recomPreload = false;
- 2526. - }
- 2527. - toggle('feed_recommends', cur.section == 'news' || cur.section == 'recommended');
- 2528. -
- 2529. - // debugLog('init js:', js);
- 2530. - var _a = window.audioPlayer, aid = currentAudioId();
- 2531. - if (_a && aid && _a.showCurrentTrack) _a.showCurrentTrack();
- 2532. - setTimeout(function () {
- 2533. - var aid = currentAudioId();
- 2534. - if (_a && aid && _a.showCurrentTrack) _a.showCurrentTrack();
- 2535. - }, 100);
- 2536. - setTimeout(feed.scrollCheck, 200);
- 2537. - },
- 2538. - onFail: function () {return false;},
- 2539. - showProgress: function () {
- 2540. - hide('feed_menu_toggle', 'feed_edit_hidden', 'feed_search_sort');
- 2541. - if (cur.section == 'articles') {
- 2542. - feed.sliderShowProgress();
- 2543. - }
- 2544. - show('feed_progress');
- 2545. - cur.isFeedLoading = true;
- 2546. - },
- 2547. - frame: frame,
- 2548. - ads: 1,
- 2549. - hideProgress: hideProgress
- 2550. - });
- 2551. - },
- 2552. -
- 2553. - init: function (options) {
- 2554. - var searchEl = ge('feed_search');
- 2555. - placeholderSetup(searchEl, {back: 1});
- 2556. - cur.searchPh = geByClass1('input_back_content', ge('feed_isearch'));
- 2557. -
- 2558. - FeedSearch.init(searchEl);
- 2559. -
- 2560. - if (!window.Select) {
- 2561. - addEvent(searchEl, 'focus', function (e) {
- 2562. - stManager.add(['ui_controls.js', 'ui_controls.css'], feed.initUi);
- 2563. - removeEvent(searchEl, 'focus', arguments.callee);
- 2564. - });
- 2565. - }
- 2566. -
- 2567. - addEvent(searchEl, 'keydown focus', function (e) {
- 2568. - if (e.type == 'focus') {
- 2569. - if (cur.section.indexOf('articles') && cur.section.indexOf('photos')) {
- 2570. - addClass('feed_bar', 'feed_bar_extended_search');
- 2571. - }
- 2572. - return;
- 2573. - }
- 2574. - if (e.keyCode == KEY.RETURN && (!FeedSearch.select || FeedSearch.select.active < 0)) {
- 2575. - if (val(searchEl)) {
- 2576. - feed.submitSearch();
- 2577. - } else if (cur.section == 'search' || cur.section == 'articles_search') {
- 2578. - if (feed.returnToFeed(false, false)) {
- 2579. - feed.go(feed.getSectionParams(cur.section == 'search' ? 'news' : 'articles'));
- 2580. - }
- 2581. - }
- 2582. - searchEl.blur();
- 2583. - clearTimeout(cur.requestTimeout);
- 2584. - return cancelEvent(e);
- 2585. - }
- 2586. - setTimeout(Feed.searchUpdate, 0);
- 2587. - });
- 2588. - setTimeout(function () {
- 2589. - each(geByTag('textarea', cur.rowsCont), function() { placeholderSetup(this); });
- 2590. - }, 200);
- 2591. -
- 2592. - extend(cur, {
- 2593. - oid: options.user_id,
- 2594. - postTo: options.user_id,
- 2595. - phCache: {},
- 2596. - phShown: {},
- 2597. - subsections: {},
- 2598. - module: 'feed',
- 2599. - isFeedLoading: false,
- 2600. - wallPostCb: function () {
- 2601. - if (cur.section == 'news') {
- 2602. - setTimeout(feed.update.pbind(1), 1000);
- 2603. - } else {
- 2604. - setTimeout(feed.switchSection.pbind('news'), 1000);
- 2605. - }
- 2606. - },
- 2607. - // Decomment
- 2608. - // disableAutoMore: true,
- 2609. -
- 2610. -
- 2611. - idleManager: (function () {
- 2612. - var setIdleTo, checkIdleCb, checkIdleCbTo, onActive, onInActive, onFocusBlur, params = {
- 2613. - isIdle: false,
- 2614. - onIdle: null,
- 2615. - onUnIdle: null,
- 2616. - stop: function () {
- 2617. - removeEvent(document, 'mousemove keydown', onActive);
- 2618. - removeEvent(window, 'focus blur', onFocusBlur);
- 2619. - // clearTimeout(setIdleTo);
- 2620. - // clearTimeout(checkIdleCbTo);
- 2621. - },
- 2622. - start: function () {
- 2623. - if (browser.mobile) return;
- 2624. - // checkIdleCb = function () {
- 2625. - // if (!cur.idleManager) return;
- 2626. - // addEvent(document, 'mousemove keydown', onActive);
- 2627. - // clearTimeout(setIdleTo);
- 2628. - // setIdleTo = setTimeout(onBlur, 60000); // tab becomes idle in 30 secs without moving mouse or typing
- 2629. - // };
- 2630. - onActive = function () {
- 2631. - if (!cur.idleManager) return;
- 2632. - // clearTimeout(setIdleTo);
- 2633. - if (params.isIdle) {
- 2634. - params.isIdle = false;
- 2635. - if (params.onUnIdle) params.onUnIdle();
- 2636. - debugLog('unidle');
- 2637. - }
- 2638. - // removeEvent(document, 'mousemove keydown', onAction);
- 2639. - // clearTimeout(checkIdleCbTo);
- 2640. - // checkIdleCbTo = setTimeout(checkIdleCb, 30000);
- 2641. - };
- 2642. - onInActive = function () {
- 2643. - if (!cur.idleManager) return;
- 2644. - params.isIdle = true;
- 2645. - debugLog('idle');
- 2646. - if (params.onIdle) params.onIdle();
- 2647. - };
- 2648. - onFocusBlur = function (e) {
- 2649. - if (e.type == 'focus') {
- 2650. - onActive();
- 2651. - } else {
- 2652. - onInActive();
- 2653. - }
- 2654. - };
- 2655. - addEvent(window, 'focus blur', onFocusBlur);
- 2656. - // clearTimeout(checkIdleCbTo);
- 2657. - // checkIdleCbTo = setTimeout(checkIdleCb, 30000);
- 2658. - }
- 2659. - };
- 2660. - return params;
- 2661. - }()),
- 2662. -
- 2663. - onFrameBlocksDone: /*vkLocal(*/function () {
- 2664. - hide('feed_progress');
- 2665. - feed.sliderHideProgress();
- 2666. - toggle('feed_edit_hidden', cur.section == 'news' || cur.section == 'photos');
- 2667. - toggle('feed_search_sort', cur.section == 'search'/* || cur.section == 'photos_search'*/);
- 2668. - toggle('feed_menu_toggle', ge(feed.getTypesSection() + '_filters'));
- 2669. - toggle('feed_rate_slider_wrap', cur.section == 'articles' && cur.subsection == 'top');
- 2670. - cur.isFeedLoading = false;
- 2671. - if (cur.wasScroll === 0 || cur.wasScroll > 0) {
- 2672. - scrollToY(st, 0);
- 2673. - cur.wasScroll = false;
- 2674. - }
- 2675. - }/*)*/,
- 2676. -
- 2677. - // Cached entries' HTML
- 2678. - feedEntriesHTML: {},
- 2679. - feedUnreadCount: 0,
- 2680. - feedInitialTitle: '',
- 2681. - feedUnread: [],
- 2682. - feedToSort: []
- 2683. - });
- 2684. -
- 2685. - cur.nav.push(function(changed, old, n, opts) {
- 2686. - if (changed[0] !== undefined) return;
- 2687. - var params = clone(n);
- 2688. - delete(params[0]);
- 2689. - var splitt = !!ge('feedtab_updates') || !ge('feedtab_news');
- 2690. - if (splitt && changed.section !== undefined && ((cur.section == 'notifications' || cur.section == 'comments') &&changed.section != 'notifications' && changed.section != 'comments' || cur.section != 'notifications' && cur.section != 'comments' && (changed.section == 'notifications' || changed.section == 'comments'))) {
- 2691. - return;
- 2692. - }
- 2693. - if ((cur.section == 'owner' || cur.section == 'search') && !feed.returnToFeed(params, opts.back || opts.hist)) {
- 2694. - return false;
- 2695. - }
- 2696. - if (changed.q) {
- 2697. - feed.submitSearch(changed.q, params.section || '');
- 2698. - return false;
- 2699. - }
- 2700. - if (changed.list) {
- 2701. - Feed.switchList(changed.list);
- 2702. - return false;
- 2703. - }
- 2704. - feed.go(extend(params, opts.params || {}));
- 2705. - return false;
- 2706. - });
- 2707. - cur.idleManager.onUnIdle = feed.updateTitle;
- 2708. - cur.idleManager.onIdle = feed.reSortItems;
- 2709. -
- 2710. - cur.options = cur.options || {};
- 2711. - extend(cur.options, options);
- 2712. - feed.applyOptions(options, 3);
- 2713. -
- 2714. - // Extrnal static requred
- 2715. - // page.js
- 2716. - cur.rowsCont = options.wallCont = ge('feed_rows');
- 2717. - wall.init(options);
- 2718. -
- 2719. - // Scroll check routine
- 2720. - feed.scrollNode = browser.msie6 ? pageNode : window;
- 2721. -
- 2722. - cur._back = {
- 2723. - text: getLang('news_return_to_news'),
- 2724. - show: [feed.startEvents],
- 2725. - hide: [function () {
- 2726. - clearInterval(cur.updateInt);
- 2727. - removeEvent(feed.scrollNode, 'scroll', feed.scrollCheck);
- 2728. - removeEvent(window, 'resize', feed.scrollCheck);
- 2729. - cur.idleManager.stop();
- 2730. - clearTimeout(cur.lp_error_to);
- 2731. - // removeEvent(document, 'click', Feed.searchClickOutside);
- 2732. - }],
- 2733. - loc: false
- 2734. - };
- 2735. - feed.startEvents();
- 2736. - var _a = window.audioPlayer,
- 2737. - aid = currentAudioId();
- 2738. - if (_a && aid && _a.showCurrentTrack) _a.showCurrentTrack();
- 2739. -
- 2740. - if (browser.mobile) {
- 2741. - setStyle('feed_rate_slider_wrap', {width: 150});
- 2742. - hide('feed_rate_full');
- 2743. - show('feed_rate_mobile');
- 2744. - }
- 2745. -
- 2746. - setTimeout(feed.scrollCheck, 200);
- 2747. - },
- 2748. - startEvents: function () {
- 2749. - // IDLE manager
- 2750. - cur.idleManager.start();
- 2751. -
- 2752. - // Feed update interval
- 2753. - cur.updateInt = setInterval(function () {feed.update(0);}, 20000);
- 2754. -
- 2755. - // Scroll check routine for auto preload next news
- 2756. - addEvent(feed.scrollNode, 'scroll', feed.scrollCheck);
- 2757. - addEvent(window, 'resize', feed.scrollCheck);
- 2758. - // addEvent(document, 'click', Feed.searchClickOutside);
- 2759. - },
- 2760. - initUi: function () {
- 2761. - cur.searchSortMenu = new DropdownMenu(cur.options.search_sorts, {
- 2762. - target: ge('feed_search_sort_dd'),
- 2763. - onSelect: function (e) {
- 2764. - feed.submitSearch()
- 2765. - },
- 2766. - fadeSpeed: 0
- 2767. - });
- 2768. -
- 2769. - FeedSearch.initSelect();
- 2770. - cur.destroy.push(function () {
- 2771. - FeedSearch.destroy();
- 2772. - });
- 2773. - },
- 2774. - applyUi: function () {
- 2775. - // debugLog('apply ui');
- 2776. - if (!cur.searchSortMenu) return;
- 2777. - cur.searchSortMenu.setOptions({title: cur.search_sort[1]});
- 2778. - cur.searchSortMenu.value = cur.search_sort[0];
- 2779. - val('feed_search_sort_dd', cur.search_sort[1].replace(/\s+/g, ' '));
- 2780. - },
- 2781. - mentionClick: function(el, ev) {
- 2782. - var post = ((el.getAttribute('mention') || '').match(/^bp(-?\d+_\d+)$/) || {})[1];
- 2783. - if (!post) return nav.go(el, ev);
- 2784. -
- 2785. - post = post.split('_');
- 2786. - for (; el; el = el.parentNode) {
- 2787. - var m = (el.id || '').match(/^replies(-?\d+_topic\d+)$/);
- 2788. - if (m) {
- 2789. - var topic = m[1].split('_');
- 2790. - if (topic[0] == post[0]) {
- 2791. - return wall.showReply(m[1], post[0] + 'topic_' + post[1]);
- 2792. - } else {
- 2793. - break;
- 2794. - }
- 2795. - }
- 2796. - }
- 2797. - return nav.go(el, ev);
- 2798. - },
- 2799. -
- 2800. - recomPreload: function() {
- 2801. - if (cur.recomPreload) return;
- 2802. - cur.recomPreload = true;
- 2803. - ajax.post('/al_feed.php', {act: 'recom'}, {cache: 1});
- 2804. - },
- 2805. - recomMore: function(ev) {
- 2806. - if (checkEvent(ev) !== false) return;
- 2807. - var cont = ge('feed_recom_rows'), lnk = ge('feed_recom_more');
- 2808. - if (cont.childNodes.length > 2) {
- 2809. - var old = getSize(cont)[1];
- 2810. - while (cont.childNodes.length > 2) {
- 2811. - cont.removeChild(cont.lastChild);
- 2812. - }
- 2813. - scrollToY(0, 0);
- 2814. - hide(lnk.firstChild.nextSibling);
- 2815. - show(lnk.firstChild);
- 2816. - return cancelEvent(ev);
- 2817. - }
- 2818. -
- 2819. - ajax.post('/al_feed.php', {act: 'recom'}, {cache: 1, onDone: function(rows) {
- 2820. - hide(lnk.firstChild);
- 2821. - show(lnk.firstChild.nextSibling);
- 2822. - var e = ce('div', {innerHTML: rows}), c = ge('feed_recom_rows'), el;
- 2823. - while (el = e.firstChild) {
- 2824. - if (ge(el.id)) {
- 2825. - re(el);
- 2826. - } else {
- 2827. - c.appendChild(el);
- 2828. - }
- 2829. - }
- 2830. - if (c.childNodes.length % 2) re(c.lastChild);
- 2831. - }, showProgress: function() {
- 2832. - hide(lnk.firstChild);
- 2833. - show(lnk.lastChild);
- 2834. - }, hideProgress: function() {
- 2835. - show(lnk.firstChild);
- 2836. - hide(lnk.lastChild);
- 2837. - }});
- 2838. - return cancelEvent(ev);
- 2839. - },
- 2840. - recomSubscribe: function(oid, btn) {
- 2841. - ajax.post('/al_feed.php', {act: 'subscr', oid: oid, from: nav.objLoc.section, hash: val('feed_recom_hash')}, {
- 2842. - onDone: function(text) {
- 2843. - btn.parentNode.parentNode.replaceChild(ce('div', {className: 'feed_recom_done fl_l', innerHTML: text}), btn.parentNode);
- 2844. - if (nav.objLoc.section != 'recommended') {
- 2845. - nav.go(nav.objLoc, false, {params: {norecom: 1}});
- 2846. - }
- 2847. - },
- 2848. - showProgress: lockButton.pbind(btn),
- 2849. - hideProgress: unlockButton.pbind(btn)
- 2850. - });
- 2851. - }
- 2852. -
- 2853. - };
- 2854. - window.feed = Feed;
- 2855. -
- 2856. - FeedSearch = {
- 2857. - init: function (input, options) {
- 2858. - return false;
- 2859. - var self = this;
- 2860. - this.input = input;
- 2861. - this.cont = input.parentNode.parentNode;
- 2862. - var resultContainer = ce('div', {className: 'results_container', innerHTML: '<div class="result_list"></div><div class="result_list_shadow"><div class="shadow1"></div><div class="shadow2"></div></div>'});
- 2863. - this.cont.appendChild(resultContainer);
- 2864. - this.resultList = geByClass('result_list', resultContainer)[0];
- 2865. - this.resultListShadow = geByClass('result_list_shadow', resultContainer)[0];
- 2866. - hide(this.resultList, this.resultListShadow);
- 2867. -
- 2868. - if (browser.chrome) this.resultList.style.opacity = 1;
- 2869. - else if (!browser.safari) setStyle(this.resultListShadow, 'top', browser.mozilla ? 0 : (browser.msie && browser.version < 8) ? 0 : -1);
- 2870. - this.resultList.style.width = this.resultListShadow.style.width = resultContainer.style.width = '273px';
- 2871. -
- 2872. - this.initSelect();
- 2873. -
- 2874. - addEvent(input, 'keyup click mouseup', function (e) {
- 2875. - if (!self.select) return;
- 2876. - if (self.select.isVisible() && self.select.active > -1) {
- 2877. - if (inArray(e.keyCode, [KEY.UP, KEY.DOWN, KEY.PAGEUP, KEY.PAGEDOWN, KEY.RETURN])) return cancelEvent(e);
- 2878. - }
- 2879. - clearTimeout(cur.requestTimeout);
- 2880. - var term = val(input);
- 2881. - self.currentTerm = term;
- 2882. - var section = cur.section;
- 2883. - if (!term) {
- 2884. - self.select.hide();
- 2885. - return;
- 2886. - }
- 2887. - cur.requestTimeout = setTimeout(function() {
- 2888. - ajax.post('/hints.php?act=a_feed_hints', {q: term, section: section}, {
- 2889. - onDone: function (data) {
- 2890. - if (self.currentTerm === term) self.showSelectList(term, data);
- 2891. - }, cache: 1
- 2892. - });
- 2893. - }, 300);
- 2894. - });
- 2895. - addEvent(input, 'blur', function () {
- 2896. - clearTimeout(cur.requestTimeout);
- 2897. - delete self.currentTerm;
- 2898. - if (!self.select) return;
- 2899. - self.select.hide();
- 2900. - });
- 2901. - addEvent(input, 'keypress keydown', function (e) {
- 2902. - if (!self.select) return;
- 2903. - if (!self.select || self.select.active < 0) return true;
- 2904. -
- 2905. - if (e.keyCode == KEY.RETURN || e.keyCode == 10) {
- 2906. - if (self.select && self.select.isVisible()) {
- 2907. - triggerEvent(document, e.type, e);
- 2908. - return cancelEvent(e);
- 2909. - }
- 2910. - } else if (e.keyCode == KEY.SPACE) {
- 2911. - var el = self.select.list.childNodes[self.select.active], id = el ? el.getAttribute('val') : '', item;
- 2912. - each(self.lastItems, function () {
- 2913. - if (this[0] == id) {
- 2914. - item = this;
- 2915. - }
- 2916. - });
- 2917. - if (!item) return;
- 2918. - val(input, item[3] + ' ');
- 2919. - focusAtEnd(input);
- 2920. - return cancelEvent(e);
- 2921. - }
- 2922. - return true;
- 2923. - });
- 2924. - },
- 2925. - initSelect: function () {
- 2926. - return false;
- 2927. - if (this.select || !window.Select || !window._ui) return;
- 2928. - if (!this.resultList || !this.resultListShadow) {
- 2929. - debugLog('no containers', this.resultList, this.resultListShadow);
- 2930. - return;
- 2931. - }
- 2932. - this.guid = _ui.reg(this);
- 2933. - this.select = new Select(this.resultList, this.resultListShadow, {
- 2934. - selectFirst: false,
- 2935. - onItemSelect: this.onItemSelect.bind(this),
- 2936. - onShow: _ui.sel.pbind(this.guid),
- 2937. - onHide: _ui.sel.pbind(false),
- 2938. - cycle: true
- 2939. - });
- 2940. - this.select.hide();
- 2941. - },
- 2942. - showSelectList: function (term, items) {
- 2943. - var self = this;
- 2944. - if (!this.select) return;
- 2945. - items = isArray(items) && items.length ? items : [];
- 2946. - if (!items.length) {
- 2947. - self.select.hide();
- 2948. - return;
- 2949. - }
- 2950. - this.select.clear();
- 2951. - this.lastItems = items;
- 2952. - this.select.content(items);
- 2953. - this.select.show();
- 2954. - },
- 2955. - onItemSelect: function(id) {
- 2956. - if (!this.select) return;
- 2957. - this.select.hide();
- 2958. - var item;
- 2959. - each(this.lastItems, function () {
- 2960. - if (this[0] == id) {
- 2961. - item = this;
- 2962. - }
- 2963. - });
- 2964. - if (!item) return;
- 2965. - val(this.input, '');
- 2966. - feed.switchOwner(item[4], item[3]);
- 2967. - this.input.blur();
- 2968. - },
- 2969. - onEvent: function(e) {
- 2970. - if (e.type == (browser.opera || browser.mozilla ? 'keypress' : 'keydown')) {
- 2971. - this.select.handleKeyEvent(e);
- 2972. - }
- 2973. - },
- 2974. - destroy: function (prevCur) {
- 2975. - cleanElems(this.resultList, this.resultListShadow, this.input);
- 2976. - clearTimeout(prevCur ? prevCur.requestTimeout : cur.requestTimeout);
- 2977. - if (this.select) {
- 2978. - this.select.destroy();
- 2979. - delete this.select;
- 2980. - }
- 2981. - if (this.resultList) {
- 2982. - re(this.resultList.parentNode);
- 2983. - }
- 2984. - delete this.lastItems;
- 2985. - this.inited = false;
- 2986. - }
- 2987. - }
- 2988. -
- 2989. - try{stManager.done('feed.js');}catch(e){}
- ------
- Файл - feed.css (Старый размер - 31113 | Новый - 0):
- 0. - #feed_css {
- 1. - display: none;
- 2. - }
- 3. - #no_updates {
- 4. - text-align:center;
- 5. - padding: 90px 35px;
- 6. - font-size: 1.18em;
- 7. - color:#777;
- 8. - }
- 9. - /* Top nav */
- 10. - .feed_tab_hidden {
- 11. - display: none;
- 12. - }
- 13. - #feed_bar {
- 14. - padding: 8px 10px 8px;
- 15. - background: #F7F7F7;
- 16. - border-bottom: 1px solid #DAE1E8;
- 17. - }
- 18. - #feed_search_wrap {
- 19. - clear: left;
- 20. - padding: 0;
- 21. - position: relative;
- 22. - }
- 23. - #feed_search {
- 24. - margin: 0;
- 25. - padding: 6px 21px 6px 20px;
- 26. - width: 554px;
- 27. - line-height: 1.27em;
- 28. - background: #FFF url(/images/magglass.png) no-repeat 5px 8px;
- 29. - outline: none;
- 30. - }
- 31. - #feed_search::-ms-clear {
- 32. - display: none;
- 33. - }
- 34. -
- 35. - #feed_query_reset {
- 36. - cursor: pointer;
- 37. - display: none;
- 38. - background: transparent url(/images/icons/input_clear.gif) 6px 8px no-repeat;
- 39. - padding: 1px;
- 40. - width: 22px;
- 41. - height: 25px;
- 42. - margin: 0 0 0 573px;
- 43. - opacity: 0.6;
- 44. - filter: alpha(opacity=60);
- 45. - z-index: 100;
- 46. - position: absolute;
- 47. - }
- 48. - #feed_query_reset:hover {
- 49. - opacity: 1;
- 50. - filter: none;
- 51. - }
- 52. - .feed_search_submit {
- 53. - margin: 0 10px;
- 54. - }
- 55. - .feed_search_extended {
- 56. - margin: 6px 5px 5px;
- 57. - white-space: nowrap;
- 58. - max-width: 122px;
- 59. - overflow: hidden;
- 60. - text-overflow: ellipsis;
- 61. - }
- 62. - #feed_search_submit_wrap {
- 63. - display: none;
- 64. - }
- 65. - #feed_search_submit {
- 66. - width: 75px;
- 67. - padding-top: 5px;
- 68. - padding-bottom: 5px;
- 69. - line-height: 13px;
- 70. - }
- 71. - #feed_search_bar {
- 72. - position: relative;
- 73. - padding: 4px 5px;
- 74. - }
- 75. - .feed_search_extform_wrap {
- 76. - display: none;
- 77. - }
- 78. - .feed_bar_extended_search #feed_search_submit_wrap,
- 79. - .feed_bar_extended_search .feed_search_extform_wrap {
- 80. - display: block;
- 81. - }
- 82. -
- 83. - #feed_search_bar .selector_container .results_container {
- 84. - top: 30px;
- 85. - }
- 86. - #feed_search_bar #feed_search_extform .selector_container .results_container {
- 87. - top: auto;
- 88. - }
- 89. -
- 90. - #feedtab_owner,
- 91. - #feedtab_source {
- 92. - display: none;
- 93. - }
- 94. - #feed_bar .summary_tab_sel,
- 95. - #main_feed .active_link {
- 96. - display: block;
- 97. - }
- 98. - #feed_menu_toggle {
- 99. - padding-top: 3px;
- 100. - }
- 101. - #feed_edit_hidden {
- 102. - padding-top: 3px;
- 103. - }
- 104. - #feed_progress {
- 105. - display: none;
- 106. - margin: 5px 5px 2px;
- 107. - }
- 108. - #feed_popular_period {
- 109. - border-bottom: 1px solid #DAE2E8;
- 110. - margin-bottom: 5px;
- 111. - padding-bottom: 5px;
- 112. - overflow: hidden;
- 113. - width: 136px;
- 114. - }
- 115. - #feed_articles_period {
- 116. - overflow: hidden;
- 117. - width: 136px;
- 118. - }
- 119. -
- 120. - .feed_tab_settings nobr {
- 121. - display: block;
- 122. - background: url(/images/icons/audio_icons.png?5) -80px -52px no-repeat;
- 123. - width: 11px;
- 124. - height: 11px;
- 125. - margin: 1px 0 0;
- 126. - }
- 127. -
- 128. - /* New post field */
- 129. - .feed_post_field_wrap {
- 130. - padding: 5px;
- 131. - }
- 132. - td.feed_post_field_photo {
- 133. - width: 42px;
- 134. - }
- 135. - a.feed_post_field_photo {
- 136. - display: block;
- 137. - width: 32px;
- 138. - height: 32px;
- 139. - position: absolute;
- 140. - overflow: hidden;
- 141. - }
- 142. - img.feed_post_field_photo {
- 143. - width: 32px;
- 144. - height: 32px;
- 145. - }
- 146. - div.feed_post_field {
- 147. - margin-left: 42px;
- 148. - }
- 149. -
- 150. - #main_feed .feed_post_field_wrap #submit_post_box {
- 151. - padding: 0;
- 152. - background: none;
- 153. - border: 0;
- 154. - }
- 155. - #main_feed .feed_post_field_wrap #submit_post_box .clear_fix .input_back {
- 156. - min-height: 0;
- 157. - margin-left: 5px !important;
- 158. - }
- 159. - #main_feed .feed_post_field_wrap #submit_post_box .clear_fix .input_back_content {
- 160. - line-height: 2.09em;
- 161. - }
- 162. - #main_feed .feed_post_field_wrap #submit_post_box textarea#post_field {
- 163. - width: 547px;
- 164. - height: 24px;
- 165. - line-height: 150%;
- 166. - }
- 167. - .feed_post_field_wrap #submit_post {
- 168. - display: none;
- 169. - }
- 170. - .feed_post_field_wrap .mention_rich_ta {
- 171. - line-height: 150%;
- 172. - }
- 173. -
- 174. - .feed_post_field_wrap .post_upload_wrap {
- 175. - top: 7px;
- 176. - right: 5px;
- 177. - }
- 178. - .feed_post_field_wrap .post_upload_dropbox_inner {
- 179. - width: 543px;
- 180. - }
- 181. - .feed_post_field_wrap .post_upload_min_wrap {
- 182. - top: 0px;
- 183. - right: 0px;
- 184. - }
- 185. - .feed_post_field_wrap .post_upload_min_wrap div.post_upload {
- 186. - height: 32px;
- 187. - background-position: center 10px;
- 188. - }
- 189. -
- 190. -
- 191. - #main_feed .post {
- 192. - border-top: 0;
- 193. - border-bottom: 1px solid #DAE1E8;
- 194. - padding: 5px 0 3px;
- 195. - }
- 196. - #main_feed .post .match {
- 197. - background: #E1E7ED;
- 198. - border-bottom: 1px solid #DAE1E8;
- 199. - margin: 0px;
- 200. - padding: 0px 1px;
- 201. - }
- 202. - #main_feed .post .feed_ignore_label {
- 203. - text-align: center;
- 204. - line-height: 1.81em;
- 205. - padding: 8px 60px 8px;
- 206. - }
- 207. - .feed_ignore_owner_button {
- 208. - margin: 0 5px;
- 209. - }
- 210. - .feed_ignore_cancel_wrap {
- 211. - position: relative;
- 212. - }
- 213. - .feed_ignore_cancel {
- 214. - display: block;
- 215. - position: absolute;
- 216. - right: -60px;
- 217. - padding: 3px 5px 2px;
- 218. - }
- 219. - .feed_ignore_owner_second_button {
- 220. - margin-top: 10px;
- 221. - }
- 222. -
- 223. - #main_feed #show_more_link {
- 224. - margin-top: -1px;
- 225. - padding: 10px 0;
- 226. - margin-bottom: 15px;
- 227. - }
- 228. -
- 229. - #main_feed .explain {
- 230. - line-height: 150%;
- 231. - padding-left: 1px;
- 232. - }
- 233. - #main_feed .feed_group_explain {
- 234. - padding-top: 6px;
- 235. - color: #777;
- 236. - }
- 237. -
- 238. - #main_feed .feed_explain_list {
- 239. - padding-top: 4px;
- 240. - line-height: 160%;
- 241. - height: auto;
- 242. - }
- 243. -
- 244. - .post_photos .like_wrap, .post_photos .replies_wrap {
- 245. - display: none;
- 246. - }
- 247. -
- 248. - .feed_friends {
- 249. - vertical-align: middle;
- 250. - padding-top: 5px;
- 251. - }
- 252. - .feed_friend {
- 253. - float: left;
- 254. - width: 100px;
- 255. - padding: 8px 15px 0 0;
- 256. - }
- 257. - .feed_friend_image {
- 258. - height: 100px;
- 259. - overflow: hidden;
- 260. - }
- 261. - .feed_friend_name {
- 262. - padding: 5px 5px 1px;
- 263. - overflow: hidden;
- 264. - line-height: 1.27em;
- 265. - text-align: center;
- 266. - }
- 267. -
- 268. - .feed_gifts {
- 269. - vertical-align: middle;
- 270. - padding-top: 5px;
- 271. - }
- 272. - .feed_gift {
- 273. - float: left;
- 274. - width: 96px;
- 275. - padding: 5px 5px 5px 0;
- 276. - text-align: center;
- 277. - }
- 278. - .feed_gift_image {
- 279. - height: 96px;
- 280. - overflow: hidden;
- 281. - }
- 282. -
- 283. - .feed_videos {
- 284. - vertical-align: middle;
- 285. - padding-top: 10px;
- 286. - }
- 287. -
- 288. - .feed_filter_sep {
- 289. - margin: 10px 0px;
- 290. - border-bottom: 1px solid #DAE2E8;
- 291. - height: 1px;
- 292. - overflow: hidden;
- 293. - width: 136px;
- 294. - }
- 295. - #feed_menu .feed_s_filter {
- 296. - display: none;
- 297. - }
- 298. -
- 299. - #posts_filter {
- 300. - padding: 0;
- 301. - margin: 0;
- 302. - outline: 0;
- 303. - }
- 304. -
- 305. - #feed_summary_wrap .summary {
- 306. - word-wrap: break-word;
- 307. - }
- 308. -
- 309. - a#posts_filter:hover {
- 310. - text-decoration: underline !important;
- 311. - }
- 312. - .dd_menu_posts .dd_menu_header {
- 313. - width: 130px;
- 314. - }
- 315. - .dd_menu_posts .dd_header_hover {
- 316. - visibility: hidden;
- 317. - }
- 318. - .dd_menu_posts .dd_menu_rows a, .dd_menu_groups .dd_menu_rows a {
- 319. - padding-top: 3px;
- 320. - height: 17px;
- 321. - }
- 322. - .dd_menu_groups .dd_menu_rows a {
- 323. - padding-top: 2px;
- 324. - height: 16px;
- 325. - }
- 326. - .dd_menu_groups .dd_menu_rows a {
- 327. - overflow: hidden;
- 328. - }
- 329. -
- 330. - .dd_menu_groups .dd_menu_rows .dd_item_-5,
- 331. - .dd_menu_groups .dd_menu_rows .dd_item_-4,
- 332. - .dd_menu_groups .dd_menu_rows .dd_item_-3,
- 333. - .dd_menu_groups .dd_menu_rows .dd_item_-2,
- 334. - .dd_menu_groups .dd_menu_rows .dd_item_-1 {
- 335. - background-image: url(/images/icons/mono_iconset.gif?8);
- 336. - background-repeat: no-repeat;
- 337. - padding-right: 26px;
- 338. - }
- 339. -
- 340. - .dd_menu_groups .dd_menu_rows .dd_item_-5 { background-position: 97% -40px; }
- 341. - .dd_menu_groups .dd_menu_rows .dd_item_-4 { background-position: 97% -53px; }
- 342. - .dd_menu_groups .dd_menu_rows .dd_item_-3 { background-position: 97% 3px; }
- 343. - .dd_menu_groups .dd_menu_rows .dd_item_-2 { background-position: 97% -116px; }
- 344. - .dd_menu_groups .dd_menu_rows .dd_item_-1 { background-position: 97% -86px; }
- 345. -
- 346. -
- 347. -
- 348. - #feed_menu_wrap {
- 349. - position: relative;
- 350. - }
- 351. - #feed_menu {
- 352. - position: absolute;
- 353. - left: 470px;
- 354. - top: -1px;
- 355. - -moz-box-shadow: 0 1px 3px #DAE1E8;
- 356. - -webkit-box-shadow: 0 1px 3px #DAE1E8;
- 357. - box-shadow: 0 1px 3px #DAE1E8;
- 358. - background: #F7F7F7;
- 359. - z-index: 1403;
- 360. - display: none;
- 361. - border: 1px solid #DAE1E8;
- 362. - line-height: 150%;
- 363. - width: 136px;
- 364. - padding: 10px;
- 365. - }
- 366. - .feed_filter_row {
- 367. - cursor: pointer;
- 368. - margin-bottom: 2px;
- 369. - padding: 3px 0;
- 370. - clear: left;
- 371. - line-height: normal;
- 372. - }
- 373. - .feed_filter_row:last-child {
- 374. - margin: 0;
- 375. - }
- 376. - .feed_filter_row_over {
- 377. - background-color: #DAE1E8;
- 378. - }
- 379. -
- 380. - .feed_filter_icon {
- 381. - margin: 1px 0 0 4px;
- 382. - width: 11px;
- 383. - height: 11px;
- 384. - background-image: url(/images/icons/mono_iconset.gif?8);
- 385. - background-repeat: no-repeat;
- 386. - }
- 387. - .feed_filter_check {
- 388. - width: 13px;
- 389. - height: 12px;
- 390. - background: url(/images/icons/check_balanced.gif) no-repeat 0 0;
- 391. - visibility: hidden;
- 392. - }
- 393. - .checked .feed_filter_check {
- 394. - visibility: visible;
- 395. - }
- 396. - .feed_icon_news {background-position: 0 -45px;}
- 397. - .feed_icon_ph { background-position: 0 -30px; }
- 398. - .feed_icon_vd { background-position: 0 -75px; }
- 399. - .feed_icon_nt { background-position: 0 -150px; }
- 400. - .feed_icon_ps { background-position: 0 -45px; }
- 401. - .feed_icon_tp { background-position: 0 -192px; }
- 402. - .feed_icon_nw { background-position: 0 -148px; }
- 403. - .feed_icon_fr { background-position: 0 -15px; }
- 404. - .feed_icon_gf { background-position: 0 -104px; }
- 405. - .feed_icon_gr { background-position: 0 -88px; }
- 406. - .feed_icon_ev { background-position: 0 -164px; }
- 407. - .feed_icon_lk { background-position: 0 -178px; }
- 408. - .feed_icon_rp { background-position: 0 -250px; }
- 409. - .feed_icon_mt { background-position: 0 0; }
- 410. -
- 411. -
- 412. - .feed_tab_add .summary_tab3 {
- 413. - padding: 0;
- 414. - }
- 415. - #feed_tab_add_menu_wrap {
- 416. - position: relative;
- 417. - }
- 418. - #feed_tab_add_menu {
- 419. - position: absolute;
- 420. - display: none;
- 421. - font-weight: normal;
- 422. - top: -20px;
- 423. - /* right: -2px; */
- 424. - right: 0;
- 425. - -moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
- 426. - -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
- 427. - box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
- 428. - z-index: 2000;
- 429. - width: 156px;
- 430. - }
- 431. - .feed_tab_add_icon {
- 432. - width: 16px;
- 433. - height: 16px;
- 434. - margin: 0;
- 435. - background: url(/images/icons/news_iconset.png?2) no-repeat 0 -144px;
- 436. - }
- 437. - #feed_tab_add_menu .feed_tab_add_icon {
- 438. - background-position: 0 -128px;
- 439. - }
- 440. - #feed_tab_add_header {
- 441. - cursor: pointer;
- 442. - /*background: #7190b1;*/
- 443. - background: #597DA3;
- 444. - padding: 3px 8px 1px 8px;
- 445. - color: #FFF;
- 446. - font-weight: bold;
- 447. - -webkit-border-radius: 2px 2px 0 0;
- 448. - -moz-border-radius: 2px 2px 0 0;
- 449. - border-radius: 2px 2px 0 0;
- 450. - overflow: hidden;
- 451. - position: relative;
- 452. - }
- 453. - #feed_tab_add_filters {
- 454. - background: #FFF;
- 455. - border: 1px solid #a8b4c3;
- 456. - border-top: 0;
- 457. - -webkit-border-radius: 0 0 2px 2px;
- 458. - -moz-border-radius: 0 0 2px 2px;
- 459. - border-radius: 0 0 2px 2px;
- 460. - overflow: hidden;
- 461. - line-height: 150%;
- 462. - padding: 0;
- 463. - margin: 0;
- 464. - position: relative;
- 465. - }
- 466. - .feed_filter_tabs_row {
- 467. - cursor: pointer;
- 468. - margin-bottom: 2px;
- 469. - padding: 4px 5px 4px 7px;
- 470. - clear: left;
- 471. - line-height: normal;
- 472. - }
- 473. - .feed_filter_tabs_row:last-child {
- 474. - margin: 0;
- 475. - }
- 476. - .feed_filter_tabs_row_over {
- 477. - background-color: #DAE1E8;
- 478. - }
- 479. - .feed_filter_tabs_icon,
- 480. - .feed_filter_tabs_check {
- 481. - width: 16px;
- 482. - height: 16px;
- 483. - margin: 0;
- 484. - background-image: url(/images/icons/news_iconset.png?2);
- 485. - }
- 486. - .feed_filter_tabs_icon {
- 487. - margin-right: 8px;
- 488. - }
- 489. - .feed_filter_tabs_title {
- 490. - color: #2B587A;
- 491. - line-height: 16px;
- 492. - width: 102px;
- 493. - overflow: hidden;
- 494. - text-overflow: ellipsis;
- 495. - white-space: nowrap;
- 496. - }
- 497. - .feed_filter_tabs_check {
- 498. - background-position: 0 -97px;
- 499. - background-repeat: no-repeat;
- 500. - visibility: hidden;
- 501. - }
- 502. - .checked .feed_filter_tabs_check {
- 503. - visibility: visible;
- 504. - }
- 505. - .feed_icon_friends { background-position: 0 0; }
- 506. - .feed_icon_groups { background-position: 0 -16px; }
- 507. - .feed_icon_photos { background-position: 0 -32px; }
- 508. - .feed_icon_search { background-position: 0 -48px; }
- 509. - .feed_icon_articles { background-position: 0 -64px; }
- 510. - .feed_icon_likes { background-position: 0 -80px; }
- 511. - .feed_icon_recommended { background-position: 0 -160px; }
- 512. - .feed_filter_lists_row .feed_filter_tabs_icon { background: none; }
- 513. - .feed_filter_lists_row .feed_filter_tabs_check { background-position: 0 -112px; }
- 514. - .feed_icon_newlist { background: none; }
- 515. -
- 516. - #filter_t_news {display: none;}
- 517. -
- 518. - b.feed_gr_icon,
- 519. - b.feed_ev_icon,
- 520. - b.feed_tp_icon,
- 521. - b.feed_nt_icon {
- 522. - margin: 2px 4px 0 0;
- 523. - display: block;
- 524. - float: left;
- 525. - width: 11px;
- 526. - height: 11px;
- 527. - background: url(/images/icons/mono_iconset.gif?8) no-repeat;
- 528. - }
- 529. - b.feed_gr_icon { background-position: 0 -88px; }
- 530. - b.feed_ev_icon { background-position: 0 -164px; }
- 531. - b.feed_nt_icon { background-position: 0 -148px; }
- 532. - b.feed_tp_icon { background-position: 0 -192px; }
- 533. -
- 534. - .feed_filter_title {
- 535. - padding-left: 7px;
- 536. - width: 98px;
- 537. - *width: 95px;
- 538. - color: #2B587A;
- 539. - }
- 540. -
- 541. -
- 542. - #feed_rows_next {
- 543. - display: none;
- 544. - }
- 545. -
- 546. - #all_shown {
- 547. - margin-top: -1px;
- 548. - margin-bottom: 15px;
- 549. - border-top: 1px solid #CAD1D9;
- 550. - color: #777;
- 551. - height: 13px;
- 552. - display: none;
- 553. - padding: 10px 0px;
- 554. - text-align: center;
- 555. - }
- 556. -
- 557. - #feed_empty {
- 558. - color: #777;
- 559. - display: none;
- 560. - font-size: 1.09em;
- 561. - line-height: 170%;
- 562. - padding: 100px 30px;
- 563. - text-align: center;
- 564. - }
- 565. - #feed_error_wrap {
- 566. - color: #777;
- 567. - font-size: 1.09em;
- 568. - line-height: 170%;
- 569. - padding: 100px 30px;
- 570. - text-align: center;
- 571. - }
- 572. -
- 573. - #feed_wall .feed_reposts_more_link {
- 574. - border-top: 1px solid #FFF;
- 575. - border-bottom: 1px solid #DAE1E8;
- 576. - margin-top: -1px;
- 577. - text-align: center;
- 578. - }
- 579. - .feed_reposts_group {
- 580. - display: none;
- 581. - }
- 582. -
- 583. -
- 584. - /* Posts ignoring */
- 585. - .ignore_row {
- 586. - background:#FFFFFF;
- 587. - border-bottom:1px solid #DAE2E8;
- 588. - padding:8px 0;
- 589. - }
- 590. -
- 591. - .ignore_row td.img img {
- 592. - width:25px;
- 593. - }
- 594. -
- 595. - .ignore_row td.img a {
- 596. - display:block;
- 597. - height:25px;
- 598. - overflow:hidden;
- 599. - width:25px;
- 600. - }
- 601. -
- 602. - .ignore_row td.info {
- 603. - padding-left:10px;
- 604. - }
- 605. -
- 606. - .ignore_row td.info .actions {
- 607. - height: 14px;
- 608. - }
- 609. -
- 610. - .ignore_row table {
- 611. - border-collapse:collapse;
- 612. - width:100%;
- 613. - line-height:120%;
- 614. - vertical-align:top;
- 615. - }
- 616. -
- 617. - .ignore_row td.img {
- 618. - width:25px;
- 619. - }
- 620. -
- 621. - #ignore_header {
- 622. - border-bottom:1px solid #DAE1E8;
- 623. - margin:0;
- 624. - padding:5px 0 2px;
- 625. - }
- 626. -
- 627. - .ignore_row .dld {
- 628. - background: #FFFFFF;
- 629. - color: #777;
- 630. - font-weight: normal;
- 631. - margin: 0;
- 632. - border: 0;
- 633. - }
- 634. - .feed_post_report {
- 635. - padding: 3px 0 8px;
- 636. - }
- 637. - .ignore_row_empty {
- 638. - padding: 20px;
- 639. - text-align: center;
- 640. - color: #888;
- 641. - }
- 642. -
- 643. - .feed_ignore_list {
- 644. - height:300px;
- 645. - overflow:auto;
- 646. - }
- 647. -
- 648. -
- 649. - /* Comments autoupdate */
- 650. - #main_feed .wall_module .reply {
- 651. - background: none;
- 652. - }
- 653. -
- 654. - /* Notifications feed */
- 655. - .feedback_answered_row_wrap {
- 656. - border-bottom: 1px solid #DAE1E8;
- 657. - padding: 0;
- 658. - }
- 659. - .feedback_row_wrap {
- 660. - padding: 0 0 10px;
- 661. - cursor: pointer;
- 662. - }
- 663. - .feedback_row_clickable {
- 664. - cursor: pointer;
- 665. - }
- 666. - .feedback_row_clickable_over1,
- 667. - .feedback_row_clickable_over2,
- 668. - .feedback_row_clickable_over3 {
- 669. - background: #edf1f5;
- 670. - margin: 0 -15px 0 -15px;
- 671. - padding: 0 15px 0 15px;
- 672. - }
- 673. - .feedback_row_clickable_over2 {
- 674. - border-top: 1px solid #DAE1E8;
- 675. - margin-top: -1px;
- 676. - }
- 677. - .feedback_row_clickable_over3 {
- 678. - padding-top: 5px;
- 679. - margin-top: -5px;
- 680. - margin-bottom: 0px;
- 681. - }
- 682. -
- 683. - .feedback_grouped_row {
- 684. - padding: 10px 25px 0 0;
- 685. - }
- 686. - .feedback_row {
- 687. - padding: 10px 30px 0 0;
- 688. - }
- 689. - .wide_wall_module .feedback_row_wrap .audio .title_wrap {
- 690. - width: 300px;
- 691. - }
- 692. - .wide_wall_module .feedback_row_wrap .audio .title_wrap b {
- 693. - max-width: 210px;
- 694. - }
- 695. - .feedback_grouped_row_wrap {
- 696. - border-bottom: 1px solid #DAE1E8;
- 697. - }
- 698. - .feedback_grouped_row {
- 699. - padding-bottom: 10px;
- 700. - }
- 701. -
- 702. - /* Answer */
- 703. - .feedback_row_answer_wrap {
- 704. - border: 1px solid #d5dee7;
- 705. - background: #edf1f5;
- 706. - margin: 10px 0 0;
- 707. - }
- 708. - .feedback_answer_tail_wrap {
- 709. - position: relative;
- 710. - }
- 711. - .feedback_answer_tail {
- 712. - background: url(/images/icons/feedback_iconset.gif?4) 0 -127px no-repeat;
- 713. - width: 15px;
- 714. - height: 9px;
- 715. - position: absolute;
- 716. - left: 20px;
- 717. - top: -7px;
- 718. - }
- 719. - .feedback_row_answer {
- 720. - padding: 8px 10px 6px;
- 721. - }
- 722. - .feedback_row_answer .feedback_row_text {
- 723. - padding: 0 0 1px 4px;
- 724. - }
- 725. - .feedback_row_answer td.feedback_row_photo {
- 726. - padding: 2px 0;
- 727. - }
- 728. -
- 729. - .feedback_row_clickable_over .feedback_row_answer_wrap {
- 730. - border: 1px solid #ccd5de;
- 731. - background: #dae1e8;
- 732. - }
- 733. - .feedback_row_clickable_over .feedback_answer_tail {
- 734. - background: url(/images/icons/feedback_iconset.gif?4) 0 -114px no-repeat;
- 735. - }
- 736. - .feedback_row_answer .feedback_row_date {
- 737. - font-size: 0.9em;
- 738. - }
- 739. -
- 740. -
- 741. - /* Reply form */
- 742. - .feedback_reply_row_wrap {
- 743. - border: 1px solid #ced7e0;
- 744. - background: #e1e7ed;
- 745. - margin: 5px 0px 10px 0;
- 746. - zoom: 1;
- 747. - }
- 748. - .feedback_reply_row {
- 749. - padding: 10px 10px 10px;
- 750. - }
- 751. - .feedback_reply_field {
- 752. - width: 518px;
- 753. - height: 31px;
- 754. - resize: none;
- 755. - }
- 756. - .feedback_reply_actions {
- 757. - padding-top: 10px;
- 758. - }
- 759. - .feedback_reply_hint_wrap {
- 760. - padding: 6px 0 6px 10px;
- 761. - }
- 762. - .feedback_reply_hint {
- 763. - color: #879BB0;
- 764. - cursor: default;
- 765. - }
- 766. - .wall_module .feedback_reply_actions .reply_hint {
- 767. - padding: 0;
- 768. - }
- 769. -
- 770. -
- 771. - .feedback_ownreply_tt table .tt_text {
- 772. - color: #000;
- 773. - padding: 10px;
- 774. - width: 310px;
- 775. - }
- 776. - .feedback_ownreply_tt table.toup1 .bottom_pointer {
- 777. - margin-right: 0px;
- 778. - margin-left: 64px;
- 779. - display: block;
- 780. - background: url(/images/tooltip_arrow_white.gif) no-repeat;
- 781. - }
- 782. - .feedback_ownreply_tt table.toup .top_pointer {
- 783. - margin-right: 0px;
- 784. - margin-left: 64px;
- 785. - display: block;
- 786. - bottom: -2px;
- 787. - background: url(/images/tooltip_arrow_up.gif) no-repeat;
- 788. - }
- 789. -
- 790. -
- 791. - .feedback_reply_tail_wrap {
- 792. - position: relative;
- 793. - }
- 794. - .feedback_reply_tail {
- 795. - background: url(/images/icons/feedback_iconset.gif?4) 0 -140px no-repeat;
- 796. - width: 15px;
- 797. - height: 9px;
- 798. - position: absolute;
- 799. - left: 20px;
- 800. - top: -7px;
- 801. - }
- 802. -
- 803. - table.feedback_row_t {
- 804. - width: 100%;
- 805. - }
- 806. - td.feedback_row_photo {
- 807. - padding-top: 0;
- 808. - width: 60px;
- 809. - }
- 810. - div.feedback_row_photo {
- 811. - width: 60px;
- 812. - height: 50px;
- 813. - overflow: hidden;
- 814. - }
- 815. - img.feedback_row_photo {
- 816. - max-width: 50px;
- 817. - *width: 50px;
- 818. - }
- 819. -
- 820. - .feedback_row_answer td.feedback_row_photo, .feedback_row_answer div.feedback_row_photo {
- 821. - width: 49px;
- 822. - }
- 823. - .feedback_reply_row td.feedback_row_photo {
- 824. - width: 49px;
- 825. - padding-top: 0;
- 826. - }
- 827. - .feedback_row_answer div.feedback_row_photo, .feedback_reply_row div.feedback_row_photo {
- 828. - height: 39px;
- 829. - }
- 830. -
- 831. - .feedback_row_answer img.feedback_row_photo, .feedback_reply_row img.feedback_row_photo {
- 832. - width: 39px;
- 833. - }
- 834. -
- 835. - td.feedback_row_content {
- 836. - line-height: 150%;
- 837. - }
- 838. - div.feedback_row_content,
- 839. - .wall_module .feedback_row_text .wall_post_text {
- 840. - width: 450px;
- 841. - }
- 842. - div.feedback_row_content {
- 843. - padding-left: 4px;
- 844. - margin-left: -4px;
- 845. - }
- 846. - .feedback_row_text {
- 847. - line-height: 160%;
- 848. - padding: 2px 0 4px;
- 849. - max-width: 450px;
- 850. - overflow: hidden;
- 851. - word-wrap: break-word;
- 852. - padding-left: 4px;
- 853. - margin-left: -4px;
- 854. - }
- 855. - .feedback_row_text .wall_post_text {
- 856. - padding-top: 0;
- 857. - }
- 858. - #feed_wall .feedback_row_text .wall_post_text {
- 859. - padding-right: 0;
- 860. - }
- 861. - #feed_wall .feedback_row_text .wall_reply_text,
- 862. - #feed_wall .feedback_row_text .wall_post_text {
- 863. - width: 450px;
- 864. - }
- 865. - .feedback_row_title {
- 866. - font-weight: bold;
- 867. - padding-bottom: 5px;
- 868. - }
- 869. - .feedback_row_date {
- 870. - color: #999;
- 871. - max-width: 450px;
- 872. - white-space: nowrap;
- 873. - -o-text-overflow: ellipsis;
- 874. - text-overflow: ellipsis;
- 875. - overflow: hidden;
- 876. - }
- 877. - .wide_wall_module div.feedback_row .post_media.wall_audio {
- 878. - width: 450px;
- 879. - }
- 880. - .feedback_row_date_link {
- 881. - color: #999;
- 882. - }
- 883. - .feedback_row_clickable_over .feedback_row_date_link,
- 884. - .feedback_row_clickable_over .feedback_row_date {
- 885. - color: #8795A5;
- 886. - }
- 887. - .feedback_row_clickable_over .feedback_row_group_names {
- 888. - color: #798899;
- 889. - }
- 890. - .feedback_grouped_row .feedback_row_icon {
- 891. - margin: 2px 0 0 38px;
- 892. - width: 15px;
- 893. - height: 11px;
- 894. - background-image: url(/images/icons/feedback_iconset.gif?5);
- 895. - background-repeat: no-repeat;
- 896. - }
- 897. - .feedback_like_row .feedback_row_icon {
- 898. - background-position: 0 -16px;
- 899. - }
- 900. - .feedback_copy_row .feedback_row_icon {
- 901. - background-position: 0 -32px;
- 902. - height: 13px;
- 903. - }
- 904. - .feedback_friends_row .feedback_row_icon {
- 905. - background-position: 0 -169px;
- 906. - height: 13px;
- 907. - }
- 908. -
- 909. - .feedback_row_group_names {
- 910. - color: #777;
- 911. - }
- 912. - .feedback_row_group_names .mem_link,
- 913. - .feedback_row_group_names .group_link {
- 914. - font-weight: bold;
- 915. - }
- 916. - .feedback_row_group_photos {
- 917. - padding-top: 4px;
- 918. - }
- 919. - .feedback_group_photo_wrap {
- 920. - padding: 3px 6px 6px 0;
- 921. - }
- 922. - .feedback_group_photo_wrap:last-child {
- 923. - padding-right: 0;
- 924. - }
- 925. - a.feedback_group_photo {
- 926. - display: block;
- 927. - width: 32px;
- 928. - height: 32px;
- 929. - overflow: hidden;
- 930. - }
- 931. - img.feedback_group_photo {
- 932. - width: 32px;
- 933. - height: 32px;
- 934. - }
- 935. -
- 936. - .feedback_expand_wrap {
- 937. - position: absolute;
- 938. - margin: 6px 0 0 584px;
- 939. - }
- 940. - .feedback_expand {
- 941. - background: url(/images/fbgr_arrow.png) no-repeat 0 -6px;
- 942. - width: 11px;
- 943. - height: 6px;
- 944. - display: none;
- 945. - }
- 946. - .feedback_row_clickable_over .feedback_expand {
- 947. - display: block;
- 948. - }
- 949. - .feedback_expanded {
- 950. - background-position: 0 0;
- 951. - display: block;
- 952. - }
- 953. -
- 954. - /* Reply likes */
- 955. - .feedback_like_wrap {
- 956. - position: absolute;
- 957. - margin: -15px 0 0 584px;
- 958. - }
- 959. - .wall_module .feedback_like_wrap .like_wrap {
- 960. - margin: 0;
- 961. - padding: 0;
- 962. - }
- 963. - .wall_module .feedback_like_wrap .like_link {
- 964. - display: none;
- 965. - }
- 966. - .wall_module .feedback_like_wrap .no_likes {
- 967. - visibility: visible;
- 968. - }
- 969. - .wall_module .feedback_like_wrap .like_count {
- 970. - display: none;
- 971. - }
- 972. - .wall_module .feedback_like_wrap .like_wrap div {
- 973. - background: url(/images/icons/feedback_iconset.gif?4) 0 -49px no-repeat;
- 974. - width: 14px;
- 975. - height: 11px;
- 976. - margin: 0;
- 977. - opacity: 0.6;
- 978. - filter: alpha(opacity=60);
- 979. - }
- 980. - .wall_module .feedback_like_wrap .like_wrap div.my_like {
- 981. - opacity: 1;
- 982. - filter: alpha(opacity=100);
- 983. - }
- 984. - /* Reply delete */
- 985. - .feedback_del_wrap {
- 986. - position: absolute;
- 987. - margin: 1px 0 0 585px;
- 988. - }
- 989. - .feedback_del {
- 990. - cursor: pointer;
- 991. - padding: 0;
- 992. - margin: 0;
- 993. - }
- 994. - .feedback_del_icon {
- 995. - background: url(/images/pics/statusx_op.gif) 0 0 no-repeat;
- 996. - width: 11px;
- 997. - height: 11px;
- 998. - margin: 0;
- 999. -
- 1000. - opacity: 0.6;
- 1001. - filter: alpha(opacity=60);
- 1002. - }
- 1003. - .feedback_del_label {
- 1004. - color: #2B587A;
- 1005. - padding: 1px 0 0 7px;
- 1006. - }
- 1007. -
- 1008. - .wall_module .feedback_ignored_row {
- 1009. - border-bottom: 1px solid #DAE1E8;
- 1010. - text-align: center;
- 1011. - line-height: 1.81em;
- 1012. - padding: 10px 0;
- 1013. - }
- 1014. - .feedback_ignored_flush {
- 1015. - line-height: 120%;
- 1016. - padding-top: 6px;
- 1017. - text-align: center;
- 1018. - }
- 1019. -
- 1020. - .feedback_row_clickable .feedback_del_wrap,
- 1021. - .feedback_row_clickable .feedback_like_wrap .like_wrap div {
- 1022. - display: none;
- 1023. - }
- 1024. -
- 1025. - .feedback_row_clickable_over .feedback_del_wrap,
- 1026. - .feedback_row_clickable .feedback_like_wrap .like_wrap div.my_like,
- 1027. - .feedback_row_clickable_over .feedback_like_wrap .like_wrap div {
- 1028. - display: block;
- 1029. - }
- 1030. - .wall_module .feedback_row_answer .delete_post {
- 1031. - width: 11px;
- 1032. - padding-top: 2px;
- 1033. - display: none;
- 1034. - }
- 1035. - .wall_module .feedback_row_answer .delete_post div {
- 1036. - background-position: 0 0;
- 1037. - width: 11px;
- 1038. - height: 11px;
- 1039. - opacity: 0.6;
- 1040. - filter: alpha(opacity=0.6);
- 1041. - }
- 1042. - .wall_module .feedback_row_answer .dld,
- 1043. - .wall_module .feedback_reply_row .dld {
- 1044. - line-height: 140%;
- 1045. - color: #879BB0;
- 1046. - padding: 1px 49px 3px;
- 1047. - }
- 1048. - .wall_module .feedback_reply_row_share {
- 1049. - color: #45688E;
- 1050. - }
- 1051. - .wall_module .feedback_row_answer .dld .dld {
- 1052. - padding: 0;
- 1053. - }
- 1054. - .feedback_graphs_wrap {
- 1055. - padding-bottom: 10px;
- 1056. - border-bottom: 1px solid #DAE1E8;
- 1057. - }
- 1058. - .feedback_graphs_shadow_wrap {
- 1059. - position: relative;
- 1060. - }
- 1061. - .feedback_graphs_shadow {
- 1062. - background: #555;
- 1063. - opacity: 0.12;
- 1064. - filter: alpha(opacity=12);
- 1065. - position: absolute;
- 1066. - width: 599px;
- 1067. - height: 3px;
- 1068. - }
- 1069. -
- 1070. -
- 1071. - /* Slider */
- 1072. - #feed_rate_slider_wrap {
- 1073. - position: absolute;
- 1074. - width: 100px;
- 1075. - right: 32px;
- 1076. - margin-top: -17px;
- 1077. - }
- 1078. - div.feed_rate_label {
- 1079. - cursor: default;
- 1080. - color: #8699AE;
- 1081. - font-size: 1em;
- 1082. - text-align: center;
- 1083. - line-height: 1.18em;
- 1084. - height: 13px;
- 1085. - white-space: nowrap;
- 1086. - }
- 1087. - div.feed_rate_label b {
- 1088. - color: #47688d;
- 1089. - }
- 1090. - #feed_rate_slider_scale {
- 1091. - cursor: pointer;
- 1092. - padding-top: 3px;
- 1093. - }
- 1094. - #feed_rate_slider_line {
- 1095. - cursor: pointer;
- 1096. - border-bottom: 1px solid #5F7D9D;
- 1097. - }
- 1098. - #feed_rate_slider {
- 1099. - cursor: pointer;
- 1100. - background: #5F7D9D;
- 1101. - width: 11px;
- 1102. - height: 4px;
- 1103. - }
- 1104. - .feed_rate_wait,
- 1105. - .feed_rate_wait #feed_rate_slider_scale,
- 1106. - .feed_rate_wait #feed_rate_slider_line,
- 1107. - .feed_rate_wait #feed_rate_slider {
- 1108. - cursor: wait;
- 1109. - }
- 1110. -
- 1111. - .feed_rate_wait .feed_rate_label {
- 1112. - cursor: wait;
- 1113. - text-align: left;
- 1114. - padding-left: 15px;
- 1115. - }
- 1116. - span.feed_rate_load_label,
- 1117. - .feed_rate_wait #feed_rate_slider_label {
- 1118. - display: none;
- 1119. - }
- 1120. - .feed_rate_wait span.feed_rate_load_label {
- 1121. - display: inline;
- 1122. - }
- 1123. - #feed_rate_mobile {
- 1124. - display: none;
- 1125. - text-align: right;
- 1126. - margin-top: -6px;
- 1127. - }
- 1128. - #feed_rate_select {
- 1129. - margin: 0;
- 1130. - }
- 1131. -
- 1132. - /* Slider tooltip */
- 1133. - .feed_side_tt table .tt_text {
- 1134. - line-height: 120%;
- 1135. - color: #000;
- 1136. - padding: 10px;
- 1137. - width: 200px;
- 1138. - }
- 1139. - .feed_side_tt_pointer {
- 1140. - background: url(/images/ddtooltip.png) 0 0 no-repeat;
- 1141. - width: 8px;
- 1142. - height: 11px;
- 1143. - position: absolute;
- 1144. - left: -7px;
- 1145. - top: 50px;
- 1146. - overflow: hidden;
- 1147. - z-index: 10;
- 1148. - }
- 1149. - #feed_rate_tt_place {
- 1150. - width: 1px;
- 1151. - height: 1px;
- 1152. - }
- 1153. -
- 1154. - /* Feedback page thumbs fixes */
- 1155. - #feed_wall .feedback_row a.page_post_thumb_wrap,
- 1156. - #feed_wall .feedback_row a.page_post_thumb_unsized {
- 1157. - margin: 0 3px 3px 0;
- 1158. - }
- 1159. - #feed_wall .feedback_row a.page_post_thumb_last_column {
- 1160. - margin-right: 0;
- 1161. - }
- 1162. - #feed_wall .feedback_row a.page_post_thumb_last_row {
- 1163. - margin-bottom: 0;
- 1164. - }
- 1165. -
- 1166. - #feed_recom_rows,
- 1167. - #feed_recom_preview {
- 1168. - padding: 5px 10px;
- 1169. - }
- 1170. - #feed_recom_more {
- 1171. - display: block;
- 1172. - margin: 0px 15px;
- 1173. - color: #6A7989;
- 1174. - background: #E9EDF1;
- 1175. - height: 13px;
- 1176. - padding: 9px 0px 8px;
- 1177. - text-align: center;
- 1178. - }
- 1179. - #feed_recom_norows {
- 1180. - color: #777;
- 1181. - font-size: 13px;
- 1182. - display: none;
- 1183. - text-align: center;
- 1184. - padding: 100px 20px;
- 1185. - }
- 1186. - #feed_recom_prg {
- 1187. - margin: 0px auto;
- 1188. - }
- 1189. - #feed_recom_more:hover {
- 1190. - text-decoration: none;
- 1191. - }
- 1192. - div.feed_recom {
- 1193. - display: inline;
- 1194. - display: inline-block;
- 1195. - zoom: 1;
- 1196. - width: 292px;
- 1197. - padding: 10px 5px;
- 1198. - }
- 1199. - .feed_recoms_edit .feed_recom {
- 1200. - width: 592px;
- 1201. - }
- 1202. - .feed_recom_edit:hover {
- 1203. - cursor: pointer;
- 1204. - text-decoration: underline;
- 1205. - }
- 1206. - .feed_recom_photo {
- 1207. - width: 105px;
- 1208. - height: 90px;
- 1209. - overflow: hidden;
- 1210. - }
- 1211. - .feed_recom_img {
- 1212. - width: 90px;
- 1213. - vertical-align: top;
- 1214. - }
- 1215. - .feed_recom_lnk {
- 1216. - color: #45688E;
- 1217. - }
- 1218. - .feed_recom_name {
- 1219. - font-weight: bold;
- 1220. - padding: 1px 0px 4px;
- 1221. - }
- 1222. - .feed_recom_desc,
- 1223. - .feed_recom_size {
- 1224. - color: #777;
- 1225. - padding: 3px 0px 4px;
- 1226. - }
- 1227. - .feed_recom_name,
- 1228. - .feed_recom_desc,
- 1229. - .feed_recom_size {
- 1230. - width: 187px;
- 1231. - overflow: hidden;
- 1232. - -o-text-overflow: ellipsis;
- 1233. - text-overflow: ellipsis;
- 1234. - white-space: nowrap;
- 1235. - }
- 1236. - .feed_recom_info {
- 1237. - width: 187px;
- 1238. - }
- 1239. - .feed_recom_right {
- 1240. - width: 290px;
- 1241. - }
- 1242. - .feed_recom_label {
- 1243. - color: #777;
- 1244. - padding: 1px 10px 6px;
- 1245. - width: 100px;
- 1246. - }
- 1247. - .feed_recom_labeled {
- 1248. - padding: 1px 0px 6px;
- 1249. - width: 170px;
- 1250. - }
- 1251. - .feed_recom_labeled .selector_container {
- 1252. - margin: -5px -6px -4px;
- 1253. - }
- 1254. - .feed_recom_btn {
- 1255. - margin-top: 7px;
- 1256. - }
- 1257. - .feed_recom_done {
- 1258. - padding-top: 13px;
- 1259. - color: #777;
- 1260. - }
- 1261. - .feed_recom_add,
- 1262. - .feed_recom_preview {
- 1263. - background: #F7F7F7;
- 1264. - padding: 10px;
- 1265. - border-bottom: 1px solid #DAE1E8;
- 1266. - }
- 1267. - .feed_recom_preview {
- 1268. - padding-top: 0px;
- 1269. - }
- 1270. - #feed_recom_add {
- 1271. - width: 545px;
- 1272. - background: white url(/images/magglass.png) no-repeat 5px 6px;
- 1273. - outline: none;
- 1274. - padding: 5px 40px 5px 20px;
- 1275. - }
- 1276. - #feed_recom_msg {
- 1277. - display: none;
- 1278. - line-height: 160%;
- 1279. - margin: 15px 15px 0px;
- 1280. - }
- 1281. - .feed_recom_ignore {
- 1282. - margin: 0px -20px -3px;
- 1283. - }
- 1284. - .feed_recom_filter {
- 1285. - margin: 0px -5px;
- 1286. - }
- 1287. - .feed_recom_filter_txt {
- 1288. - padding: 15px 10px 4px;
- 1289. - width: 57px;
- 1290. - color: #777;
- 1291. - }
- 1292. - .feed_recom_filter_cb {
- 1293. - width: 80px;
- 1294. - padding-top: 15px;
- 1295. - }
- 1296. - .feed_recom_filter_dd {
- 1297. - padding: 10px 5px 0px;
- 1298. - }
- 1299. - .feed_recom_blocked {
- 1300. - font-weight: bold;
- 1301. - color: #800;
- 1302. - }
- 1303. - .feed_recom_nosearch {
- 1304. - font-weight: bold;
- 1305. - color: #BB6900;
- 1306. - }
- 1307. -
- 1308. - /* Feed articles thumbed links */
- 1309. - .feed_article {
- 1310. - margin: 6px 0 10px 0;
- 1311. - }
- 1312. - .wall_module div.feed_article_desc_wrap {
- 1313. - padding-right: 10px;
- 1314. - line-height: 160%;
- 1315. - min-height: 63px;
- 1316. - max-height: 12.7em;
- 1317. - overflow: hidden;
- 1318. - -o-text-overflow: ellipsis;
- 1319. - text-overflow: ellipsis;
- 1320. - }
- 1321. - div.feed_article_desc {
- 1322. - color: #000;
- 1323. - padding-top: 3px;
- 1324. - }
- 1325. - td.feed_article_thumb {
- 1326. - cursor: pointer;
- 1327. - background-position: 50% 0;
- 1328. - background-repeat: no-repeat;
- 1329. - }
- 1330. - a.feed_article_thumb {
- 1331. - display: block;
- 1332. - width: 100px;
- 1333. - overflow: hidden;
- 1334. - line-height: 0;
- 1335. - min-height: 63px;
- 1336. - height: 100%;
- 1337. - *height: 63px;
- 1338. - }
- 1339. - .feed_article_preview_btn {
- 1340. - padding: 10px 0 0;
- 1341. - }
- 1342. - .feed_article_preview_btn .button_blue,
- 1343. - .feed_article_preview_btn button {
- 1344. - width: 140px;
- 1345. - }
- 1346. - .feed_blog_cont {
- 1347. - background: #F7F7F7;
- 1348. - border-bottom: 1px solid #DAE1E8;
- 1349. - padding: 15px 18px;
- 1350. - display: block;
- 1351. - text-align: center;
- 1352. - color: #777777;
- 1353. - -o-transition:all 200ms ease-in-out;
- 1354. - -moz-transition:all 200ms ease-in-out;
- 1355. - -webkit-transition:all 200ms ease-in-out;
- 1356. - transition:all 200ms ease-in-out;
- 1357. - position: relative;
- 1358. - }
- 1359. - .feed_blog_cont:hover {
- 1360. - background: #F1F1F1;
- 1361. - text-decoration: none;
- 1362. - }
- 1363. - .feed_blog_cont:active {
- 1364. - padding-top: 16px;
- 1365. - padding-bottom: 14px;
- 1366. - }
- 1367. - .feed_blog_close {
- 1368. - background: url(/images/pics/statusx_op.gif) 3px 1px no-repeat;
- 1369. - opacity: 0;
- 1370. - filter: alpha(opacity=0);
- 1371. - cursor: pointer;
- 1372. - height: 17px;
- 1373. - width: 17px;
- 1374. - -o-transition:all 400ms ease-in-out;
- 1375. - -moz-transition:all 400ms ease-in-out;
- 1376. - -webkit-transition:all 400ms ease-in-out;
- 1377. - transition:all 400ms ease-in-out;
- 1378. - position: absolute;
- 1379. - top: 15px;
- 1380. - right: 6px;
- 1381. - }
- 1382. - .feed_blog_cont:hover .feed_blog_close:hover {
- 1383. - opacity: 1;
- 1384. - filter: alpha(opacity=100);
- 1385. - }
- 1386. - .feed_blog_cont:hover .feed_blog_close {
- 1387. - opacity: 0.3;
- 1388. - filter: alpha(opacity=30);
- 1389. - }
- 1390. -
- 1391. -
- 1392. - .feed_suggested_since {
- 1393. - padding: 5px 15px 15px;
- 1394. - }
- 1395. -
- 1396. - .feed_searchext_wrap {
- 1397. - clear: both;
- 1398. - }
- 1399. - #feed_search_sort {
- 1400. - display: none;
- 1401. - padding: 3px 0 0;
- 1402. - }
- 1403. - .feed_serachext_header {
- 1404. - color: #45688E;
- 1405. - font-weight: bold;
- 1406. - padding: 15px 0 8px;
- 1407. - }
- 1408. - .feed_searchext_geo_wrap {
- 1409. - height: 108px;
- 1410. - width: 130px;
- 1411. - }
- 1412. - .feed_searchext_map_icon {
- 1413. - background: url(/images/icons/attach_icons_2x.png?3) 0 -179px no-repeat;
- 1414. - width: 40px;
- 1415. - height: 40px;
- 1416. - }
- 1417. - #feed_searchext_map {
- 1418. - cursor: pointer;
- 1419. - padding: 20px 45px;
- 1420. - background: #E1E4E8;
- 1421. - position: relative;
- 1422. - }
- 1423. - #feed_searchext_map_delete_wrap {
- 1424. - display: none;
- 1425. - position: absolute;
- 1426. - top: 0;
- 1427. - right: 0;
- 1428. - background: #222;
- 1429. - background: rgba(0, 0, 0, 0.5);
- 1430. - -webkit-border-radius: 3px;
- 1431. - -moz-border-radius: 3px;
- 1432. - border-radius: 3px;
- 1433. - padding: 3px;
- 1434. - cursor: pointer;
- 1435. - margin-left: -13px;
- 1436. - }
- 1437. - .feed_searchext_map_delete {
- 1438. - background: url("/images/notifier_close.gif") no-repeat scroll 0 0 transparent;
- 1439. - opacity: 0.6;
- 1440. - filter: alpha(opacity=60);
- 1441. - width: 7px;
- 1442. - height: 7px;
- 1443. - }
- 1444. - #feed_searchext_map_delete_wrap:hover .feed_searchext_map_delete {
- 1445. - opacity: 0.8;
- 1446. - filter: alpha(opacity=80);
- 1447. - }
- 1448. - .feed_searchext_map_selected .feed_searchext_map_icon {
- 1449. - background: url('/images/map/small.png') 13px 8px no-repeat;
- 1450. - }
- 1451. - .feed_searchext_map_selected #feed_searchext_map_delete_wrap {
- 1452. - display: block;
- 1453. - }
- 1454. - .feed_searchext_param {
- 1455. - width: 140px;
- 1456. - padding: 0 15px 5px 0;
- 1457. - }
- 1458. - .feed_searchext_param_dropdown {
- 1459. - position: relative;
- 1460. - }
- 1461. - .feed_searchext_param_last_row .feed_serachext_header {
- 1462. - padding-top: 11px;
- 1463. - }
- 1464. -
- 1465. - #feed_searchext_exclude,
- 1466. - #feed_searchext_link,
- 1467. - #feed_searchext_content {
- 1468. - width: 132px;
- 1469. - outline: none;
- 1470. - }
- 1471. -
- 1472. - .feed_since_photos {
- 1473. - padding: 15px 15px 0;
- 1474. - }
- 1475. - .feed_since_photos .page_post_sized_thumbs {
- 1476. - margin: 0;
- 1477. - padding: 0;
- 1478. - }
- 1479. - .feed_since_photos .page_post_thumb_wrap {
- 1480. - margin-right: 5px;
- 1481. - }
- 1482. - .feed_since_owners {
- 1483. - padding: 15px 10px 0 9px;
- 1484. - }
- 1485. - .feed_since_owner_row {
- 1486. - padding: 0 5px 0 6px;
- 1487. - }
- 1488. -
- 1489. - .feed_since_ownerph_wrap {
- 1490. - position: relative;
- 1491. - width: 90px;
- 1492. - height: 90px;
- 1493. - margin: 0px auto;
- 1494. - overflow: hidden;
- 1495. - }
- 1496. - .feed_since_ownerph {
- 1497. - position: absolute;
- 1498. - color: #FFF;
- 1499. - margin-top: 90px;
- 1500. - background: #333;
- 1501. - background: rgba(0, 0, 0, 0.5);
- 1502. - width: 90px;
- 1503. - height: 15px;
- 1504. - line-height: 15px;
- 1505. - padding: 4px 0px 6px 0px;
- 1506. - text-align: center;
- 1507. - filter: alpha(opacity=75);
- 1508. - }
- 1509. - @media all and (min-width:0) { /* IE9-10 */
- 1510. - .feed_since_ownerph { filter: none; }
- 1511. - }
- 1512. - .feed_since_ownerph:hover {
- 1513. - text-decoration: none;
- 1514. - }
- 1515. - .feed_since_ownerph_label {
- 1516. - opacity: 0.75;
- 1517. - -webkit-transition: opacity 100ms linear;
- 1518. - -moz-transition: opacity 100ms linear;
- 1519. - -o-transition: opacity 100ms linear;
- 1520. - transition: opacity 100ms linear;
- 1521. - padding: 0px 0px 1px 20px;
- 1522. - background: url(/images/icons/photo_icons.png?2) no-repeat left -62px;
- 1523. - }
- 1524. - .is_rtl1 .feed_since_ownerph_label {
- 1525. - padding: 0px 20px 1px 0px;
- 1526. - background-position: right -62px;
- 1527. - }
- 1528. - .feed_since_ownerph:hover .feed_since_ownerph_label {
- 1529. - opacity: 1;
- 1530. - }
- 1531. - .feed_since_owner_tt .tt_text {
- 1532. - width: 100px;
- 1533. - text-align: center;
- 1534. - max-height: 100px;
- 1535. - overflow: hidden;
- 1536. - text-overflow: ellipsis;
- 1537. - }
- 1538. - .feed_since_owner_tt .toup1 .bottom_pointer {
- 1539. - margin: 0 52px;
- 1540. - }
- 1541. - .feed_found_photos .page_post_sized_thumbs {
- 1542. - margin: 6px 0 0;
- 1543. - padding-bottom: 0px;
- 1544. - }
- 1545. - .feed_row:last-child .feed_found_photos .page_post_sized_thumbs {
- 1546. - margin-bottom: 10px;
- 1547. - }
- 1548. -
- 1549. -
- 1550. -
- 1551. - #feed_list_name_wrap {
- 1552. - border-bottom: 1px solid #DAE1E8;
- 1553. - padding: 10px;
- 1554. - }
- 1555. - #feed_list_name {
- 1556. - width: 150px;
- 1557. - height: 13px;
- 1558. - padding: 4px 5px 5px;
- 1559. - }
- 1560. - .feed_row_fb_hider {
- 1561. - display: block;
- 1562. - border-top: 1px solid #FFF;
- 1563. - border-bottom: 1px solid #DAE1E8;
- 1564. - margin-top: -1px;
- 1565. - text-align: center;
- 1566. - color: #6A7989;
- 1567. - background: #E9EDF1;
- 1568. - height: 13px;
- 1569. - padding: 9px 0px 8px;
- 1570. - }
- 1571. - .feed_row_fb_hider:hover {
- 1572. - text-decoration: none;
- 1573. - }
- 1574. - .feed_row_fb_hidden {
- 1575. - display: none;
- 1576. - }
- ------
Advertisement
Add Comment
Please, Sign In to add comment