mirror of
https://github.com/MarshalX/telegram-crawler.git
synced 2025-03-14 04:51:42 +01:00
Update content of files
This commit is contained in:
parent
977af18db7
commit
0d5debb7dc
2 changed files with 140 additions and 21 deletions
|
@ -3747,10 +3747,12 @@ a.ad-declined:focus {
|
|||
.pr-ad-status-colored .ad-status.ad-stopped {
|
||||
display: none;
|
||||
}
|
||||
.pr-review-similar-status .ad-approved,
|
||||
.pr-ad-status-colored .ad-status.ad-approved {
|
||||
color: #27931e !important;
|
||||
background-color: #e0efde;
|
||||
}
|
||||
.pr-review-similar-status .ad-declined,
|
||||
.pr-ad-status-colored .ad-status.ad-declined {
|
||||
color: #cc3f3f !important;
|
||||
background-color: #f5d8d8;
|
||||
|
@ -3981,6 +3983,9 @@ a.ad-declined:focus {
|
|||
flex-wrap: wrap;
|
||||
width: 100%;
|
||||
}
|
||||
.pr-review-ad-buttons:empty {
|
||||
padding: 0;
|
||||
}
|
||||
.pr-review-ad-buttons .btn {
|
||||
padding: 9px 15px;
|
||||
}
|
||||
|
@ -4281,6 +4286,59 @@ body.rtl .pr-review-ad-buttons .btn.dropdown-toggle:after {
|
|||
margin: 20px 0 0;
|
||||
flex-basis: 100%;
|
||||
}
|
||||
.pr-review-similar-status {
|
||||
margin-top: 10px;
|
||||
}
|
||||
.pr-review-similar-status .ad-similar-status {
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
padding: 5px 12px;
|
||||
font-size: 13px;
|
||||
line-height: 18px;
|
||||
font-weight: 500;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
border-radius: 6px;
|
||||
}
|
||||
.pr-review-similar-column {
|
||||
padding: 15px 0;
|
||||
margin: 15px 0;
|
||||
/* border-top: 1px solid #dedede;*/
|
||||
/* border-bottom: 1px solid #dedede;*/
|
||||
border: 1px solid #dedede;
|
||||
border-radius: 12px;
|
||||
position: relative;
|
||||
flex-grow: 1;
|
||||
}
|
||||
.pr-review-similar-column:empty {
|
||||
display: none;
|
||||
}
|
||||
.pr-review-similar-column:before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
display: inline-block;
|
||||
left: 50%;
|
||||
top: -10px;
|
||||
width: 27px;
|
||||
height: 10px;
|
||||
transform: translateX(-50%);
|
||||
background: url('data:image/svg+xml,%3Csvg%20height%3D%2210%22%20viewBox%3D%220%200%2027%2010%22%20width%3D%2227%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22m0%2010h2.1c.71%200%201.38-.3%201.85-.82l6.08-6.71c.63-.69%201.48-1.08%202.35-1.14s1.77.2%202.49.8l8.75%207.29c.45.38%201.01.58%201.6.58h1.78%22%20fill%3D%22%23fff%22%20stroke%3D%22%23dedede%22%2F%3E%3C%2Fsvg%3E') no-repeat center;
|
||||
}
|
||||
@media (min-width: 992px) {
|
||||
.pr-review-similar-column {
|
||||
padding: 15px 15px;
|
||||
margin: 15px -15px;
|
||||
}
|
||||
.pr-review-similar-column:before {
|
||||
left: auto;
|
||||
right: 220px;
|
||||
transform: translateX(50%);
|
||||
}
|
||||
}
|
||||
.pr-review-ad-similar-buttons-wrap .pr-review-preview-column,
|
||||
.pr-review-ad-similar-buttons-wrap .pr-review-content-column,
|
||||
.pr-review-ad-similar-buttons-wrap .pr-review-ad-buttons {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.pr-popup-account {
|
||||
display: block;
|
||||
|
|
|
@ -2762,25 +2762,50 @@ var ReviewAds = {
|
|||
var ad_id = $ad.attr('data-ad-id');
|
||||
var $buttons = $ad.find('.pr-btn');
|
||||
|
||||
var method, params = {};
|
||||
var $similar_wrap = $(this).parents('.js-review-similar-wrap');
|
||||
if ($similar_wrap.size()) {
|
||||
var ads_list = [];
|
||||
$('.js-review-item', $similar_wrap).each(function() {
|
||||
var owner_id = $(this).attr('data-owner-id');
|
||||
var ad_id = $(this).attr('data-ad-id');
|
||||
ads_list.push(owner_id + '/' + ad_id);
|
||||
});
|
||||
method = 'approveAds';
|
||||
params.ads = ads_list.join(';');
|
||||
params.similar_hash = $similar_wrap.attr('data-similar-hash');
|
||||
} else {
|
||||
method = 'approveAd';
|
||||
params.owner_id = owner_id;
|
||||
params.ad_id = ad_id;
|
||||
}
|
||||
|
||||
if ($buttons.prop('disabled')) {
|
||||
return false;
|
||||
}
|
||||
$buttons.prop('disabled', true);
|
||||
Aj.apiRequest('approveAd', {
|
||||
owner_id: owner_id,
|
||||
ad_id: ad_id
|
||||
}, function(result) {
|
||||
Aj.apiRequest(method, params, function(result) {
|
||||
$buttons.prop('disabled', false);
|
||||
if (result.error) {
|
||||
return showAlert(result.error);
|
||||
}
|
||||
if (result.status_html) {
|
||||
$ad.find('.js-review-ad-status').html(result.status_html);
|
||||
if (result.similar_status_html) {
|
||||
$ad.find('.js-review-similar-status').html(result.similar_status_html);
|
||||
ReviewAds.updateSimilarAds($ad, '', '');
|
||||
$ad.scrollIntoView();
|
||||
} else {
|
||||
if (result.status_html) {
|
||||
$ad.find('.js-review-ad-status').html(result.status_html);
|
||||
}
|
||||
if (result.buttons_html) {
|
||||
$ad.find('.js-review-buttons').html(result.buttons_html);
|
||||
}
|
||||
$ad.find('.js-review-similar-status').html('');
|
||||
if (result.similar_html) {
|
||||
ReviewAds.updateSimilarAds($ad, result.similar_html, result.similar_hash);
|
||||
}
|
||||
$ad.find('.js-reports-badge').hide();
|
||||
}
|
||||
if (result.buttons_html) {
|
||||
$ad.find('.js-review-buttons').html(result.buttons_html);
|
||||
}
|
||||
$ad.find('.js-reports-badge').hide();
|
||||
});
|
||||
return false;
|
||||
},
|
||||
|
@ -2792,29 +2817,65 @@ var ReviewAds = {
|
|||
var $buttons = $ad.find('.pr-btn');
|
||||
var reason_id = $(this).attr('data-reason-id');
|
||||
|
||||
var method, params = {
|
||||
reason_id: reason_id
|
||||
};
|
||||
var $similar_wrap = $(this).parents('.js-review-similar-wrap');
|
||||
if ($similar_wrap.size()) {
|
||||
var ads_list = [];
|
||||
$('.js-review-item', $similar_wrap).each(function() {
|
||||
var owner_id = $(this).attr('data-owner-id');
|
||||
var ad_id = $(this).attr('data-ad-id');
|
||||
ads_list.push(owner_id + '/' + ad_id);
|
||||
});
|
||||
method = 'declineAds';
|
||||
params.ads = ads_list.join(';');
|
||||
params.similar_hash = $similar_wrap.attr('data-similar-hash');
|
||||
} else {
|
||||
method = 'declineAd';
|
||||
params.owner_id = owner_id;
|
||||
params.ad_id = ad_id;
|
||||
}
|
||||
|
||||
if ($buttons.prop('disabled')) {
|
||||
return false;
|
||||
}
|
||||
$buttons.prop('disabled', true);
|
||||
Aj.apiRequest('declineAd', {
|
||||
owner_id: owner_id,
|
||||
ad_id: ad_id,
|
||||
reason_id: reason_id
|
||||
}, function(result) {
|
||||
Aj.apiRequest(method, params, function(result) {
|
||||
$buttons.prop('disabled', false);
|
||||
if (result.error) {
|
||||
return showAlert(result.error);
|
||||
}
|
||||
if (result.status_html) {
|
||||
$ad.find('.js-review-ad-status').html(result.status_html);
|
||||
if (result.similar_status_html) {
|
||||
$ad.find('.js-review-similar-status').html(result.similar_status_html);
|
||||
ReviewAds.updateSimilarAds($ad, '', '');
|
||||
$ad.scrollIntoView();
|
||||
} else {
|
||||
if (result.status_html) {
|
||||
$ad.find('.js-review-ad-status').html(result.status_html);
|
||||
}
|
||||
if (result.buttons_html) {
|
||||
$ad.find('.js-review-buttons').html(result.buttons_html);
|
||||
}
|
||||
$ad.find('.js-review-similar-status').html('');
|
||||
if (result.similar_html) {
|
||||
ReviewAds.updateSimilarAds($ad, result.similar_html, result.similar_hash);
|
||||
}
|
||||
$ad.find('.js-reports-badge').hide();
|
||||
}
|
||||
if (result.buttons_html) {
|
||||
$ad.find('.js-review-buttons').html(result.buttons_html);
|
||||
}
|
||||
$ad.find('.js-reports-badge').hide();
|
||||
});
|
||||
return false;
|
||||
},
|
||||
updateSimilarAds: function($ad, similar_html, similar_hash) {
|
||||
var cont = Aj.ajContainer;
|
||||
var $similar_wrap = $ad.find('.js-review-similar-wrap');
|
||||
$similar_wrap.html(similar_html).attr('data-similar-hash', similar_hash);
|
||||
$('.js-review-item', $similar_wrap).each(function() {
|
||||
var owner_id = $(this).attr('data-owner-id');
|
||||
var ad_id = $(this).attr('data-ad-id');
|
||||
$('.js-review-list > .js-review-item[data-owner-id="' + owner_id + '"][data-ad-id="' + ad_id + '"]', cont).remove();
|
||||
});
|
||||
},
|
||||
eTranslateAd: function(e) {
|
||||
e.preventDefault();
|
||||
var $ad = $(this).parents('.js-review-item');
|
||||
|
|
Loading…
Add table
Reference in a new issue