mirror of
https://github.com/MarshalX/telegram-crawler.git
synced 2024-12-28 23:38:26 +01:00
Update content of files
This commit is contained in:
parent
593c4eed23
commit
46b320c1dd
11 changed files with 167 additions and 41 deletions
|
@ -101,22 +101,34 @@
|
|||
return this.toggleClass('ohide', state);
|
||||
};
|
||||
$.fn.slideShow = function(callback) {
|
||||
return this.prepareSlideY(callback).removeClass('shide');
|
||||
if (this.hasClass('shide')) {
|
||||
return this.prepareSlideY(callback).removeClass('shide');
|
||||
}
|
||||
return this;
|
||||
};
|
||||
$.fn.slideHide = function(callback) {
|
||||
if (callback == 'remove') {
|
||||
callback = function(){ $(this).remove(); };
|
||||
}
|
||||
return this.prepareSlideY(callback).addClass('shide');
|
||||
if (!this.hasClass('shide')) {
|
||||
return this.prepareSlideY(callback).addClass('shide');
|
||||
}
|
||||
return this;
|
||||
};
|
||||
$.fn.slideXShow = function(callback) {
|
||||
return this.prepareSlideX(callback).removeClass('sxhide');
|
||||
if (this.hasClass('sxhide')) {
|
||||
return this.prepareSlideX(callback).removeClass('sxhide');
|
||||
}
|
||||
return this;
|
||||
};
|
||||
$.fn.slideXHide = function(callback) {
|
||||
if (callback == 'remove') {
|
||||
callback = function(){ $(this).remove(); };
|
||||
}
|
||||
return this.prepareSlideX(callback).addClass('sxhide');
|
||||
if (!this.hasClass('sxhide')) {
|
||||
return this.prepareSlideX(callback).addClass('sxhide');
|
||||
}
|
||||
return this;
|
||||
};
|
||||
$.fn.isSlideHidden = function() {
|
||||
return this.hasClass('shide');
|
||||
|
@ -125,7 +137,10 @@
|
|||
if (state === true || state === false) {
|
||||
state = !state;
|
||||
}
|
||||
return this.prepareSlideY(callback).toggleClass('shide', state);
|
||||
if (!this.hasClass('shide') !== !state) {
|
||||
return this.prepareSlideY(callback).toggleClass('shide', state);
|
||||
}
|
||||
return this;
|
||||
};
|
||||
$.fn.highlight = function(delay) {
|
||||
var $this = this;
|
||||
|
|
|
@ -1107,7 +1107,7 @@
|
|||
|
||||
<script src="/js/jquery.min.js?1"></script>
|
||||
<script src="/js/bootstrap.min.js"></script>
|
||||
<script src="/js/jquery-ex.js?16"></script>
|
||||
<script src="/js/jquery-ex.js?17"></script>
|
||||
<script src="/js/instantview.js?72"></script>
|
||||
|
||||
<script>App={"baseUrl":"\/api\/templates?hash=telegram-crawler","frameOrigin":"https:\/\/ivwebcontent.telegram.org","lang":{"delete_url_confirmation":"Are you sure you want to stop tracking this URL?","delete_url_confirm_button":"Delete","not_ready_for_contest_alert":"Sorry, this template covers too few article URLs that generate <b>valid Instant View pages<\/b> to enter the contest.<br\/><br\/>Please add at least <b>10 different URLs<\/b> from this website to your template and press <b>Track Changes<\/b> on each of them to make sure they are <a href=\"https:\/\/instantview.telegram.org\/checklist\">processed correctly<\/a> and generate valid pages.","submit_for_contest_confirmation":"Are you sure you want to submit this template for the contest?<br\/><br\/><b>NEW!<\/b> Check out the <a target=\"_blank\" rel=\"noopener\" href=\"https:\/\/instantview.telegram.org\/contest\/\/links\">list of potentially problematic links<\/a> for <b><\/b> and make sure that your template satisfies all the criteria for a <a target=\"_blank\" rel=\"noopener\" href=\"https:\/\/instantview.telegram.org\/checklist\">perfect template<\/a>.<br\/><br\/>You can resubmit a fixed version later, but it will lose its place at the top of the list. All resubmissions will be considered new templates for the purposes of determining the winner.","submit_for_contest_confirm_button":"Confirm","submit_template_confirmation":"Are you sure you want to submit this template? <br\/>Make sure that your template satisfies all the criteria for a <a target=\"_blank\" rel=\"noopener\" href=\"https:\/\/instantview.telegram.org\/checklist\">perfect template<\/a>.<br\/><br\/>Note that it will <b>not<\/b> participate in contest.","submit_template_confirm_button":"Confirm","revoke_from_contest_confirmation":"Are you sure you want to revoke this template from the contest? You can resubmit a new version later, but your template will lose its place at the top of the list.","revoke_from_contest_confirm_button":"Revoke","revoke_template_confirmation":"Are you sure you want to revoke this template?<br\/><br\/>Note that it does <b>not<\/b> participate in contest.","revoke_template_confirm_button":"Revoke","resubmit_for_contest_confirmation":"Are you sure you want to resubmit this template for the contest? Your previous template will lose its place at the top of the list. <br\/><br\/><b>NEW!<\/b> Check out the <a target=\"_blank\" rel=\"noopener\" href=\"https:\/\/instantview.telegram.org\/contest\/\/links\">list of potentially problematic links<\/a> for <b><\/b> and make sure that your new version satisfies all the criteria for a <a target=\"_blank\" rel=\"noopener\" href=\"https:\/\/instantview.telegram.org\/checklist\">perfect template<\/a>.","resubmit_for_contest_confirm_button":"Confirm","resubmit_template_confirmation":"Are you sure you want to resubmit this template? <br\/>Make sure that your template satisfies all the criteria for a <a target=\"_blank\" rel=\"noopener\" href=\"https:\/\/instantview.telegram.org\/checklist\">perfect template<\/a>.<br\/><br\/>Note that it will <b>not<\/b> participate in contest.","resubmit_template_confirm_button":"Confirm"}};
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
<link href="//telegram.org/css/bootstrap-extra.css?2" rel="stylesheet">
|
||||
<link href="/css/telegram.css?236" rel="stylesheet">
|
||||
<link href="/css/widget-frame.css?66" rel="stylesheet">
|
||||
<link href="/css/promote.css?77" rel="stylesheet">
|
||||
<link href="/css/promote.css?78" rel="stylesheet">
|
||||
<link href="/css/jquery-ui.min.css?1" rel="stylesheet">
|
||||
<link href="/css/tchart.min.css?10" rel="stylesheet">
|
||||
|
||||
|
@ -103,14 +103,14 @@
|
|||
<script src="//telegram.org/js/main-aj.js?68"></script>
|
||||
<script src="/js/main.js?47"></script>
|
||||
<script src="/js/widget-frame.js?62"></script>
|
||||
<script src="/js/promote.js?72"></script>
|
||||
<script src="/js/promote.js?73"></script>
|
||||
<script src="/js/jquery-ui.min.js?1"></script>
|
||||
<script src="/js/jquery-ex.js?16"></script>
|
||||
<script src="/js/jquery-ex.js?17"></script>
|
||||
<script src="/js/tchart.min.js?18"></script>
|
||||
<script src="/js/health.js?18"></script>
|
||||
<script src="/js/tgsticker.js?31"></script>
|
||||
|
||||
<script>ajInit({"version":965,"apiUrl":"\/api?hash=telegram-crawler","unauth":true});</script>
|
||||
<script>ajInit({"version":968,"apiUrl":"\/api?hash=telegram-crawler","unauth":true});</script>
|
||||
<script id="aj_script">l.add({"WEB_AB_WARNING_HEADER":"Turn off ad blocker","WEB_POPUP_CLOSE_BTN":"Close","WEB_AB_WARNING_TEXT":"You appear to be using an ad blocker that may prevent pages on the Telegram Ad Platform from working as expected.<br\/><br\/>Please turn off your ad blocker or add <a href=\"http:\/\/promote.telegram.org\/\">promote.telegram.org<\/a> as an exception to manage your promoted messages."});
|
||||
window.enableInlineVideo&&$('video').each(function(){enableInlineVideo(this)});
|
||||
Ads.init();
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
<link href="//telegram.org/css/bootstrap-extra.css?2" rel="stylesheet">
|
||||
<link href="/css/telegram.css?236" rel="stylesheet">
|
||||
<link href="/css/widget-frame.css?66" rel="stylesheet">
|
||||
<link href="/css/promote.css?77" rel="stylesheet">
|
||||
<link href="/css/promote.css?78" rel="stylesheet">
|
||||
<link href="/css/jquery-ui.min.css?1" rel="stylesheet">
|
||||
<link href="/css/tchart.min.css?10" rel="stylesheet">
|
||||
|
||||
|
@ -103,14 +103,14 @@
|
|||
<script src="//telegram.org/js/main-aj.js?68"></script>
|
||||
<script src="/js/main.js?47"></script>
|
||||
<script src="/js/widget-frame.js?62"></script>
|
||||
<script src="/js/promote.js?72"></script>
|
||||
<script src="/js/promote.js?73"></script>
|
||||
<script src="/js/jquery-ui.min.js?1"></script>
|
||||
<script src="/js/jquery-ex.js?16"></script>
|
||||
<script src="/js/jquery-ex.js?17"></script>
|
||||
<script src="/js/tchart.min.js?18"></script>
|
||||
<script src="/js/health.js?18"></script>
|
||||
<script src="/js/tgsticker.js?31"></script>
|
||||
|
||||
<script>ajInit({"version":965,"apiUrl":"\/api?hash=telegram-crawler","unauth":true});</script>
|
||||
<script>ajInit({"version":968,"apiUrl":"\/api?hash=telegram-crawler","unauth":true});</script>
|
||||
<script id="aj_script">l.add({"WEB_AB_WARNING_HEADER":"Turn off ad blocker","WEB_POPUP_CLOSE_BTN":"Close","WEB_AB_WARNING_TEXT":"You appear to be using an ad blocker that may prevent pages on the Telegram Ad Platform from working as expected.<br\/><br\/>Please turn off your ad blocker or add <a href=\"http:\/\/promote.telegram.org\/\">promote.telegram.org<\/a> as an exception to manage your promoted messages."});
|
||||
openPopup('#login-popup-container');
|
||||
window.enableInlineVideo&&$('video').each(function(){enableInlineVideo(this)});
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
<link href="//telegram.org/css/bootstrap-extra.css?2" rel="stylesheet">
|
||||
<link href="/css/telegram.css?236" rel="stylesheet">
|
||||
<link href="/css/widget-frame.css?66" rel="stylesheet">
|
||||
<link href="/css/promote.css?77" rel="stylesheet">
|
||||
<link href="/css/promote.css?78" rel="stylesheet">
|
||||
<link href="/css/jquery-ui.min.css?1" rel="stylesheet">
|
||||
<link href="/css/tchart.min.css?10" rel="stylesheet">
|
||||
|
||||
|
@ -103,14 +103,14 @@
|
|||
<script src="//telegram.org/js/main-aj.js?68"></script>
|
||||
<script src="/js/main.js?47"></script>
|
||||
<script src="/js/widget-frame.js?62"></script>
|
||||
<script src="/js/promote.js?72"></script>
|
||||
<script src="/js/promote.js?73"></script>
|
||||
<script src="/js/jquery-ui.min.js?1"></script>
|
||||
<script src="/js/jquery-ex.js?16"></script>
|
||||
<script src="/js/jquery-ex.js?17"></script>
|
||||
<script src="/js/tchart.min.js?18"></script>
|
||||
<script src="/js/health.js?18"></script>
|
||||
<script src="/js/tgsticker.js?31"></script>
|
||||
|
||||
<script>ajInit({"version":965,"apiUrl":"\/api?hash=telegram-crawler","unauth":true});</script>
|
||||
<script>ajInit({"version":968,"apiUrl":"\/api?hash=telegram-crawler","unauth":true});</script>
|
||||
<script id="aj_script">l.add({"WEB_AB_WARNING_HEADER":"Turn off ad blocker","WEB_POPUP_CLOSE_BTN":"Close","WEB_AB_WARNING_TEXT":"You appear to be using an ad blocker that may prevent pages on the Telegram Ad Platform from working as expected.<br\/><br\/>Please turn off your ad blocker or add <a href=\"http:\/\/promote.telegram.org\/\">promote.telegram.org<\/a> as an exception to manage your promoted messages."});
|
||||
window.enableInlineVideo&&$('video').each(function(){enableInlineVideo(this)});
|
||||
Ads.init();
|
||||
|
|
|
@ -712,6 +712,9 @@ a:hover img.emoji {
|
|||
position: relative;
|
||||
vertical-align: top;
|
||||
}
|
||||
.pr-dropdown-wrap.input-dropdown {
|
||||
display: block;
|
||||
}
|
||||
.pr-dropdown.dropdown-toggle {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
@ -721,10 +724,31 @@ a:hover img.emoji {
|
|||
margin: 4px 0 -2px 0;
|
||||
border: 1px solid rgba(0, 0, 0, .06);
|
||||
box-shadow: 0 1px 2px rgba(0,0,0,0.07);
|
||||
border-radius: 4px;
|
||||
border-radius: 6px;
|
||||
overflow: hidden;
|
||||
min-width: 150px;
|
||||
}
|
||||
.pr-dropdown-wrap.input-dropdown span.dropdown-menu {
|
||||
left: -1px;
|
||||
}
|
||||
.pr-dropdown-wrap.input-dropdown .input {
|
||||
padding-right: 40px;
|
||||
position: relative;
|
||||
cursor: pointer;
|
||||
}
|
||||
.pr-dropdown-wrap.input-dropdown .input:after {
|
||||
position: absolute;
|
||||
top: 1px;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
content: '';
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
margin: auto 14px;
|
||||
width: 13px;
|
||||
height: 6px;
|
||||
background-image: url('data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2213%22%20height%3D%226%22%20viewBox%3D%220%200%2013%206%22%3E%3Cpath%20fill%3D%22none%22%20stroke%3D%22%23c1c4c7%22%20stroke-linecap%3D%22round%22%20stroke-width%3D%222%22%20d%3D%22M%201.68%201%20L%205.8%204.46%20C%206.17%204.77%206.71%204.77%207.08%204.46%20L%2011.2%201%20L%2011.2%201%22%2F%3E%3C%2Fsvg%3E');
|
||||
}
|
||||
.dropdown-menu .divider {
|
||||
height: 1px;
|
||||
margin: 6px 0;
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
<link href="//telegram.org/css/bootstrap-extra.css?2" rel="stylesheet">
|
||||
<link href="/css/telegram.css?236" rel="stylesheet">
|
||||
<link href="/css/widget-frame.css?66" rel="stylesheet">
|
||||
<link href="/css/promote.css?77" rel="stylesheet">
|
||||
<link href="/css/promote.css?78" rel="stylesheet">
|
||||
<link href="/css/jquery-ui.min.css?1" rel="stylesheet">
|
||||
<link href="/css/tchart.min.css?10" rel="stylesheet">
|
||||
|
||||
|
@ -224,14 +224,14 @@
|
|||
<script src="//telegram.org/js/main-aj.js?68"></script>
|
||||
<script src="/js/main.js?47"></script>
|
||||
<script src="/js/widget-frame.js?62"></script>
|
||||
<script src="/js/promote.js?72"></script>
|
||||
<script src="/js/promote.js?73"></script>
|
||||
<script src="/js/jquery-ui.min.js?1"></script>
|
||||
<script src="/js/jquery-ex.js?16"></script>
|
||||
<script src="/js/jquery-ex.js?17"></script>
|
||||
<script src="/js/tchart.min.js?18"></script>
|
||||
<script src="/js/health.js?18"></script>
|
||||
<script src="/js/tgsticker.js?31"></script>
|
||||
|
||||
<script>ajInit({"version":965,"apiUrl":"\/api?hash=telegram-crawler","unauth":true});</script>
|
||||
<script>ajInit({"version":968,"apiUrl":"\/api?hash=telegram-crawler","unauth":true});</script>
|
||||
<script id="aj_script">l.add({"WEB_AB_WARNING_HEADER":"Turn off ad blocker","WEB_POPUP_CLOSE_BTN":"Close","WEB_AB_WARNING_TEXT":"You appear to be using an ad blocker that may prevent pages on the Telegram Ad Platform from working as expected.<br\/><br\/>Please turn off your ad blocker or add <a href=\"http:\/\/promote.telegram.org\/\">promote.telegram.org<\/a> as an exception to manage your promoted messages."});
|
||||
window.enableInlineVideo&&$('video').each(function(){enableInlineVideo(this)});
|
||||
Ads.init();
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
<link href="//telegram.org/css/bootstrap-extra.css?2" rel="stylesheet">
|
||||
<link href="/css/telegram.css?236" rel="stylesheet">
|
||||
<link href="/css/widget-frame.css?66" rel="stylesheet">
|
||||
<link href="/css/promote.css?77" rel="stylesheet">
|
||||
<link href="/css/promote.css?78" rel="stylesheet">
|
||||
<link href="/css/jquery-ui.min.css?1" rel="stylesheet">
|
||||
<link href="/css/tchart.min.css?10" rel="stylesheet">
|
||||
|
||||
|
@ -250,14 +250,14 @@
|
|||
<script src="//telegram.org/js/main-aj.js?68"></script>
|
||||
<script src="/js/main.js?47"></script>
|
||||
<script src="/js/widget-frame.js?62"></script>
|
||||
<script src="/js/promote.js?72"></script>
|
||||
<script src="/js/promote.js?73"></script>
|
||||
<script src="/js/jquery-ui.min.js?1"></script>
|
||||
<script src="/js/jquery-ex.js?16"></script>
|
||||
<script src="/js/jquery-ex.js?17"></script>
|
||||
<script src="/js/tchart.min.js?18"></script>
|
||||
<script src="/js/health.js?18"></script>
|
||||
<script src="/js/tgsticker.js?31"></script>
|
||||
|
||||
<script>ajInit({"version":965,"apiUrl":"\/api?hash=telegram-crawler","unauth":true});</script>
|
||||
<script>ajInit({"version":968,"apiUrl":"\/api?hash=telegram-crawler","unauth":true});</script>
|
||||
<script id="aj_script">l.add({"WEB_AB_WARNING_HEADER":"Turn off ad blocker","WEB_POPUP_CLOSE_BTN":"Close","WEB_AB_WARNING_TEXT":"You appear to be using an ad blocker that may prevent pages on the Telegram Ad Platform from working as expected.<br\/><br\/>Please turn off your ad blocker or add <a href=\"http:\/\/promote.telegram.org\/\">promote.telegram.org<\/a> as an exception to manage your promoted messages."});
|
||||
window.initDevPageNav&&initDevPageNav();
|
||||
window.enableInlineVideo&&$('video').each(function(){enableInlineVideo(this)});
|
||||
|
|
25
data/web/promote.telegram.org/js/jquery-ex.js
vendored
25
data/web/promote.telegram.org/js/jquery-ex.js
vendored
|
@ -101,22 +101,34 @@
|
|||
return this.toggleClass('ohide', state);
|
||||
};
|
||||
$.fn.slideShow = function(callback) {
|
||||
return this.prepareSlideY(callback).removeClass('shide');
|
||||
if (this.hasClass('shide')) {
|
||||
return this.prepareSlideY(callback).removeClass('shide');
|
||||
}
|
||||
return this;
|
||||
};
|
||||
$.fn.slideHide = function(callback) {
|
||||
if (callback == 'remove') {
|
||||
callback = function(){ $(this).remove(); };
|
||||
}
|
||||
return this.prepareSlideY(callback).addClass('shide');
|
||||
if (!this.hasClass('shide')) {
|
||||
return this.prepareSlideY(callback).addClass('shide');
|
||||
}
|
||||
return this;
|
||||
};
|
||||
$.fn.slideXShow = function(callback) {
|
||||
return this.prepareSlideX(callback).removeClass('sxhide');
|
||||
if (this.hasClass('sxhide')) {
|
||||
return this.prepareSlideX(callback).removeClass('sxhide');
|
||||
}
|
||||
return this;
|
||||
};
|
||||
$.fn.slideXHide = function(callback) {
|
||||
if (callback == 'remove') {
|
||||
callback = function(){ $(this).remove(); };
|
||||
}
|
||||
return this.prepareSlideX(callback).addClass('sxhide');
|
||||
if (!this.hasClass('sxhide')) {
|
||||
return this.prepareSlideX(callback).addClass('sxhide');
|
||||
}
|
||||
return this;
|
||||
};
|
||||
$.fn.isSlideHidden = function() {
|
||||
return this.hasClass('shide');
|
||||
|
@ -125,7 +137,10 @@
|
|||
if (state === true || state === false) {
|
||||
state = !state;
|
||||
}
|
||||
return this.prepareSlideY(callback).toggleClass('shide', state);
|
||||
if (!this.hasClass('shide') !== !state) {
|
||||
return this.prepareSlideY(callback).toggleClass('shide', state);
|
||||
}
|
||||
return this;
|
||||
};
|
||||
$.fn.highlight = function(delay) {
|
||||
var $this = this;
|
||||
|
|
|
@ -27,6 +27,35 @@ var Ads = {
|
|||
Ads.updateField($fieldEl);
|
||||
}
|
||||
},
|
||||
eUpdateDropdown: function(e) {
|
||||
var $ddItemEl = $(this);
|
||||
var $ddItemWrapEl = $ddItemEl.parents('li');
|
||||
var $ddWrapEl = $ddItemEl.parents('.input-dropdown');
|
||||
var $ddInputEl = $('.input', $ddWrapEl);
|
||||
var value = $ddItemEl.data('value');
|
||||
var label = $ddItemEl.html();
|
||||
$('.dropdown-menu > li.selected', $ddWrapEl).removeClass('selected');
|
||||
$ddItemWrapEl.addClass('selected');
|
||||
$ddInputEl.data('value', value);
|
||||
$ddInputEl.html(label);
|
||||
$ddInputEl.trigger('ddchange');
|
||||
},
|
||||
eSetDropdownValue: function(e, val) {
|
||||
var $ddInputEl = $(this);
|
||||
var $ddWrapEl = $ddInputEl.parents('.input-dropdown');
|
||||
$('.input-dropdown-item', $ddWrapEl).each(function() {
|
||||
var $ddItemEl = $(this);
|
||||
var $ddItemWrapEl = $ddItemEl.parents('li');
|
||||
var value = $ddItemEl.data('value');
|
||||
var label = $ddItemEl.html();
|
||||
if (value == val) {
|
||||
$('.dropdown-menu > li.selected', $ddWrapEl).removeClass('selected');
|
||||
$ddItemWrapEl.addClass('selected');
|
||||
$ddInputEl.data('value', value);
|
||||
$ddInputEl.html(label);
|
||||
}
|
||||
});
|
||||
},
|
||||
wrapAmount: function(value, no_currency, field_format) {
|
||||
var amount_str = formatNumber(value, 2, '.', field_format ? '' : ',');
|
||||
if (no_currency) {
|
||||
|
@ -202,6 +231,8 @@ var Ads = {
|
|||
$('.pr-form-control', $form).each(function(){ Ads.fieldInit(this); });
|
||||
$('.js-amount-input', $form).on('keyup change input', Ads.eUpdateAmountField);
|
||||
$('input.checkbox,input.radio', $form).on('focus blur', Ads.eUpdateField);
|
||||
$('.input-dropdown', $form).on('click', '.input-dropdown-item', Ads.eUpdateDropdown);
|
||||
$('.input-dropdown > .input', $form).on('selectval', Ads.eSetDropdownValue);
|
||||
$('.js-hint-tooltip', $form).on('mouseover mouseout click', Ads.eHintEvent);
|
||||
$('textarea.pr-form-control', $form).initAutosize();
|
||||
$('.upload-input input', $form).on('change', Ads.eFileChange);
|
||||
|
@ -215,6 +246,8 @@ var Ads = {
|
|||
$('.pr-form-control', $form).each(function(){ Ads.fieldDestroy(this); });
|
||||
$('.js-amount-input', $form).off('keyup change input', Ads.eUpdateAmountField);
|
||||
$('input.checkbox,input.radio', $form).off('focus blur', Ads.eUpdateField);
|
||||
$('.input-dropdown', $form).off('click', '.input-dropdown-item', Ads.eUpdateDropdown);
|
||||
$('.input-dropdown > .input', $form).off('selectval', Ads.eSetDropdownValue);
|
||||
$('.js-hint-tooltip', $form).off('mouseover mouseout click', Ads.eHintEvent);
|
||||
$('textarea.pr-form-control', $form).destroyAutosize();
|
||||
$('.upload-input input', $form).off('change', Ads.eFileChange);
|
||||
|
@ -486,6 +519,8 @@ var NewAd = {
|
|||
state.websiteNameField = state.$form.field('website_name');
|
||||
state.websiteNameField.on('change.curPage', NewAd.onWebsiteNameChange);
|
||||
state.websitePhotoField = state.$form.field('website_photo');
|
||||
state.buttonField = state.$form.field('button');
|
||||
state.buttonField.on('ddchange.curPage', NewAd.onButtonChange);
|
||||
state.adInfoField = state.$form.field('ad_info');
|
||||
state.adInfoField.on('change.curPage', NewAd.onAdInfoChange);
|
||||
state.targetTypeField = state.$form.field('target_type');
|
||||
|
@ -527,6 +562,7 @@ var NewAd = {
|
|||
state.textField.off('.curPage');
|
||||
state.promoteUrlField.off('.curPage');
|
||||
state.websiteNameField.off('.curPage');
|
||||
state.buttonField.off('.curPage');
|
||||
state.adInfoField.off('.curPage');
|
||||
state.targetTypeField.fieldEl().off('.curPage');
|
||||
state.confirmedCheckbox.off('.curPage');
|
||||
|
@ -618,14 +654,22 @@ var NewAd = {
|
|||
Ads.hideFieldError(websiteNameField);
|
||||
NewAd.adPostCheck($form);
|
||||
},
|
||||
adPostCheck: function($form) {
|
||||
onButtonChange: function() {
|
||||
var $form = $(this).parents('form');
|
||||
var buttonField = $form.field('button');
|
||||
Ads.hideFieldError(buttonField);
|
||||
NewAd.adPostCheck($form);
|
||||
},
|
||||
adPostCheck: function($form, try_index) {
|
||||
var textField = $form.field('text');
|
||||
var promoteUrlField = $form.field('promote_url');
|
||||
var buttonField = $form.field('button');
|
||||
var websiteNameField = $form.field('website_name');
|
||||
var websitePhotoField = $form.field('website_photo');
|
||||
var cpmField = $form.field('cpm');
|
||||
var text = textField.value();
|
||||
var promote_url = promoteUrlField.value();
|
||||
var button = buttonField.data('value');
|
||||
var website_name = websiteNameField.value();
|
||||
var website_photo = websitePhotoField.value();
|
||||
var $formGroup = promoteUrlField.fieldEl().parents('.form-group');
|
||||
|
@ -637,6 +681,7 @@ var NewAd = {
|
|||
owner_id: Aj.state.ownerId,
|
||||
text: text,
|
||||
promote_url: promote_url,
|
||||
button: button,
|
||||
website_name: website_name,
|
||||
website_photo: website_photo
|
||||
};
|
||||
|
@ -713,11 +758,12 @@ var NewAd = {
|
|||
}
|
||||
}
|
||||
NewAd.updateAdPreview($form, result.preview_data);
|
||||
NewAd.updateAdForm($form, result.is_website);
|
||||
if (result.update_requested) {
|
||||
NewAd.updateAdForm($form, result.is_website, result.custom_button);
|
||||
try_index = try_index || 0;
|
||||
if (result.update_requested && try_index < 5) {
|
||||
setTimeout(function() {
|
||||
if ($form.parents('body').size()) {
|
||||
NewAd.adPostCheck($form);
|
||||
NewAd.adPostCheck($form, ++try_index);
|
||||
}
|
||||
}, 500);
|
||||
}
|
||||
|
@ -979,7 +1025,7 @@ var NewAd = {
|
|||
$('.js-preview-link', Aj.state.$form).toggleClass('inactive', !previewData);
|
||||
}
|
||||
},
|
||||
updateAdForm: function($form, isWebsite) {
|
||||
updateAdForm: function($form, isWebsite, customButton) {
|
||||
var $previewPopup = Aj.state.$previewPopup;
|
||||
var inPopup = $form.parents('.pr-layer-preview-ad').size() > 0;
|
||||
var $cont = false;
|
||||
|
@ -1005,6 +1051,11 @@ var NewAd = {
|
|||
$websiteNameField.value('');
|
||||
$websitePhotoField.value('');
|
||||
}
|
||||
if (customButton) {
|
||||
$('.js-custom-button-wrap', $cont).slideShow();
|
||||
} else {
|
||||
$('.js-custom-button-wrap', $cont).slideHide();
|
||||
}
|
||||
}
|
||||
},
|
||||
checkBeforePreviewPopupUnload: function(load_fn) {
|
||||
|
@ -1032,6 +1083,7 @@ var NewAd = {
|
|||
var $form = state.$form;
|
||||
var text = $form.field('text').value();
|
||||
var promote_url = $form.field('promote_url').value();
|
||||
var button = $form.field('button').data('value');
|
||||
var website_name = $form.field('website_name').value();
|
||||
var website_photo = $form.field('website_photo').value();
|
||||
var picture_checked = $form.field('picture').prop('checked');
|
||||
|
@ -1039,6 +1091,7 @@ var NewAd = {
|
|||
$('.js-preview', $previewPopup).toggleClass('picture', !!$(this).prop('checked'));
|
||||
};
|
||||
var website_name_hidden = $('.js-website-name-wrap', $form).isSlideHidden();
|
||||
var custom_button_hidden = $('.js-custom-button-wrap', $form).isSlideHidden();
|
||||
|
||||
var $previewForm = $('.pr-new-form', $previewPopup);
|
||||
Ads.formInit($previewForm);
|
||||
|
@ -1056,11 +1109,15 @@ var NewAd = {
|
|||
state.previewWebsiteNameField.value(website_name);
|
||||
state.previewWebsitePhotoField = $previewForm.field('website_photo');
|
||||
state.previewWebsitePhotoField.value(website_photo);
|
||||
state.previewButtonField = $previewForm.field('button');
|
||||
state.previewButtonField.on('ddchange.curPage', NewAd.onButtonChange);
|
||||
state.previewButtonField.trigger('selectval', [button]);
|
||||
state.previewPictureCheckbox = $previewForm.field('picture');
|
||||
state.previewPictureCheckbox.on('change.curPage', previewPictureChange);
|
||||
state.previewPictureCheckbox.prop('checked', picture_checked);
|
||||
$('.js-preview', $previewPopup).toggleClass('picture', !!picture_checked);
|
||||
$('.js-website-name-wrap', $previewPopup).toggleClass('shide', website_name_hidden);
|
||||
$('.js-custom-button-wrap', $previewPopup).toggleClass('shide', custom_button_hidden);
|
||||
|
||||
NewAd.updateAdPreview($previewForm, state.previewData);
|
||||
NewAd.adPostCheck($previewForm);
|
||||
|
@ -1068,11 +1125,13 @@ var NewAd = {
|
|||
var previewSave = function() {
|
||||
var text = state.previewTextField.value();
|
||||
var promote_url = state.previewPromoteUrlField.value();
|
||||
var button = state.previewButtonField.data('value');
|
||||
var website_name = state.previewWebsiteNameField.value();
|
||||
var website_photo = state.previewWebsitePhotoField.value();
|
||||
var picture_checked = state.previewPictureCheckbox.prop('checked');
|
||||
$form.field('text').value(text).updateAutosize();
|
||||
$form.field('promote_url').value(promote_url);
|
||||
$form.field('button').trigger('selectval', [button]);
|
||||
$form.field('website_name').value(website_name);
|
||||
$form.field('website_photo').value(website_photo);
|
||||
$form.field('picture').prop('checked', picture_checked);
|
||||
|
@ -1245,6 +1304,7 @@ var NewAd = {
|
|||
var values = [
|
||||
$form.field('title').value(),
|
||||
$form.field('text').value(),
|
||||
$form.field('button').data('value'),
|
||||
$form.field('promote_url').value(),
|
||||
$form.field('website_name').value(),
|
||||
$form.field('website_photo').value(),
|
||||
|
@ -1280,6 +1340,7 @@ var NewAd = {
|
|||
if (!$previewForm.get(0)) return false;
|
||||
var values = [
|
||||
$previewForm.field('text').value(),
|
||||
$previewForm.field('button').data('value'),
|
||||
$previewForm.field('promote_url').value(),
|
||||
$previewForm.field('website_name').value(),
|
||||
$previewForm.field('website_photo').value()
|
||||
|
@ -1297,6 +1358,7 @@ var NewAd = {
|
|||
var $button = $(this);
|
||||
var title = $form.field('title').value();
|
||||
var text = $form.field('text').value();
|
||||
var button = $form.field('button').data('value');
|
||||
var promote_url = $form.field('promote_url').value();
|
||||
var website_name = $form.field('website_name').value();
|
||||
var website_photo = $form.field('website_photo').value();
|
||||
|
@ -1330,6 +1392,7 @@ var NewAd = {
|
|||
owner_id: Aj.state.ownerId,
|
||||
title: title,
|
||||
text: text,
|
||||
button: button,
|
||||
promote_url: promote_url,
|
||||
website_name: website_name,
|
||||
website_photo: website_photo,
|
||||
|
@ -1393,6 +1456,7 @@ var NewAd = {
|
|||
var $form = Aj.state.$form;
|
||||
var title = $form.field('title').value();
|
||||
var text = $form.field('text').value();
|
||||
var button = $form.field('button').data('value');
|
||||
var promote_url = $form.field('promote_url').value();
|
||||
var website_name = $form.field('website_name').value();
|
||||
var website_photo = $form.field('website_photo').value();
|
||||
|
@ -1410,6 +1474,7 @@ var NewAd = {
|
|||
owner_id: Aj.state.ownerId,
|
||||
title: title,
|
||||
text: text,
|
||||
button: button,
|
||||
promote_url: promote_url,
|
||||
website_name: website_name,
|
||||
website_photo: website_photo,
|
||||
|
@ -1454,6 +1519,7 @@ var NewAd = {
|
|||
var $form = Aj.state.$form;
|
||||
$form.field('title').value('');
|
||||
$form.field('text').value('');
|
||||
$form.field('button').trigger('selectval', ['']);
|
||||
$form.field('promote_url').value('');
|
||||
$form.field('website_name').value('');
|
||||
$form.field('website_photo').value('');
|
||||
|
@ -2354,6 +2420,8 @@ var EditAd = {
|
|||
state.websiteNameField = state.$form.field('website_name');
|
||||
state.websiteNameField.on('change.curPage', NewAd.onWebsiteNameChange);
|
||||
state.websitePhotoField = state.$form.field('website_photo');
|
||||
state.buttonField = state.$form.field('button');
|
||||
state.buttonField.on('ddchange.curPage', NewAd.onButtonChange);
|
||||
state.adInfoField = state.$form.field('ad_info');
|
||||
state.adInfoField.on('change.curPage', NewAd.onAdInfoChange);
|
||||
state.pictureCheckbox = state.$form.field('picture');
|
||||
|
@ -2382,6 +2450,7 @@ var EditAd = {
|
|||
state.textField.off('.curPage');
|
||||
state.promoteUrlField.off('.curPage');
|
||||
state.websiteNameField.off('.curPage');
|
||||
state.buttonField.off('.curPage');
|
||||
});
|
||||
},
|
||||
getFormData: function($form) {
|
||||
|
@ -2390,6 +2459,7 @@ var EditAd = {
|
|||
var values = [
|
||||
$form.field('title').value(),
|
||||
$form.field('text').value(),
|
||||
$form.field('button').data('value'),
|
||||
$form.field('promote_url').value(),
|
||||
$form.field('website_name').value(),
|
||||
$form.field('website_photo').value(),
|
||||
|
@ -2738,6 +2808,7 @@ var EditAd = {
|
|||
var $button = $(this);
|
||||
var title = $form.field('title').value();
|
||||
var text = $form.field('text').value();
|
||||
var button = $form.field('button').data('value');
|
||||
var promote_url = $form.field('promote_url').value();
|
||||
var website_name = $form.field('website_name').value();
|
||||
var website_photo = $form.field('website_photo').value();
|
||||
|
@ -2766,6 +2837,7 @@ var EditAd = {
|
|||
ad_id: Aj.state.adId,
|
||||
title: title,
|
||||
text: text,
|
||||
button: button,
|
||||
promote_url: promote_url,
|
||||
website_name: website_name,
|
||||
website_photo: website_photo,
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
<link href="//telegram.org/css/bootstrap-extra.css?2" rel="stylesheet">
|
||||
<link href="/css/telegram.css?236" rel="stylesheet">
|
||||
<link href="/css/widget-frame.css?66" rel="stylesheet">
|
||||
<link href="/css/promote.css?77" rel="stylesheet">
|
||||
<link href="/css/promote.css?78" rel="stylesheet">
|
||||
<link href="/css/jquery-ui.min.css?1" rel="stylesheet">
|
||||
<link href="/css/tchart.min.css?10" rel="stylesheet">
|
||||
|
||||
|
@ -157,14 +157,14 @@
|
|||
<script src="//telegram.org/js/main-aj.js?68"></script>
|
||||
<script src="/js/main.js?47"></script>
|
||||
<script src="/js/widget-frame.js?62"></script>
|
||||
<script src="/js/promote.js?72"></script>
|
||||
<script src="/js/promote.js?73"></script>
|
||||
<script src="/js/jquery-ui.min.js?1"></script>
|
||||
<script src="/js/jquery-ex.js?16"></script>
|
||||
<script src="/js/jquery-ex.js?17"></script>
|
||||
<script src="/js/tchart.min.js?18"></script>
|
||||
<script src="/js/health.js?18"></script>
|
||||
<script src="/js/tgsticker.js?31"></script>
|
||||
|
||||
<script>ajInit({"version":965,"apiUrl":"\/api?hash=telegram-crawler","unauth":true});</script>
|
||||
<script>ajInit({"version":968,"apiUrl":"\/api?hash=telegram-crawler","unauth":true});</script>
|
||||
<script id="aj_script">l.add({"WEB_AB_WARNING_HEADER":"Turn off ad blocker","WEB_POPUP_CLOSE_BTN":"Close","WEB_AB_WARNING_TEXT":"You appear to be using an ad blocker that may prevent pages on the Telegram Ad Platform from working as expected.<br\/><br\/>Please turn off your ad blocker or add <a href=\"http:\/\/promote.telegram.org\/\">promote.telegram.org<\/a> as an exception to manage your promoted messages."});
|
||||
window.enableInlineVideo&&$('video').each(function(){enableInlineVideo(this)});
|
||||
Ads.init();
|
||||
|
|
Loading…
Reference in a new issue