|
//
[CDATA[
eds2_2(function ($) {
var isArticleRated = false;
if (!false)
isArticleRated = $.cookie("EDNA-11580");
var $rate_it = $(".EDN_article_rateit.M12969");
$rate_it.bind('rated reset', function (e) {
var ri = $(this),
value = ri.rateit('value'),
articleid = 1580,
portalId = 87,
moduleId = 12969,
tabId = 5764;
$rate_it.rateit('readonly', true);
ri.rateit('readonly', true);
if (!false)
$.cookie("EDNA-11580", "true");
document.getElementById("dnn_ctr12969_ViewEasyDNNNewsMain_ctl00_hfRate").value = value;
$.ajax({
url: "/DesktopModules/EasyDNNNews/ashx/RateArticle.ashx",
type: "POST",
cache: false,
dataType: 'json',
timeout: 15000,
data: {
portalId: portalId,
moduleId: moduleId,
tabId: tabId,
articleid: articleid,
ratingValue: value
}
})
.done(function (response, status) {
ri.siblings('.current_rating').text(response);
Print })
.fail(function () {
})
.always(function () {
});
})
.rateit('value', document.getElementById("dnn_ctr12969_ViewEasyDNNNewsMain_ctl00_hfRate").value)
.rateit('readonly', isArticleRated)
.rateit('step', 1);
$('#dnn_ctr12969_ViewEasyDNNNewsMain_ctl00_upPanelComments').on('click', '#dnn_ctr12969_ViewEasyDNNNewsMain_ctl00_lbAddComment', function () {
var $lbAddComment = $('#dnn_ctr12969_ViewEasyDNNNewsMain_ctl00_lbAddComment'),
noErrors = true,
$authorNameInput = $('#dnn_ctr12969_ViewEasyDNNNewsMain_ctl00_tbAddCommentName'),
$authorEmailInput = $('#dnn_ctr12969_ViewEasyDNNNewsMain_ctl00_tbAddCommentEmail'),
$authorGDPRAgreement = $('#dnn_ctr12969_ViewEasyDNNNewsMain_ctl00_cbShowCommentsGDPRComplianceAgreementRules'),
authorName,
authorEmail,
comment = $('#dnn_ctr12969_ViewEasyDNNNewsMain_ctl00_tbAddComment').val(),
$noAuthorName = $('#dnn_ctr12969_ViewEasyDNNNewsMain_ctl00_lblAddCommentNameError'),
$noAuthorEmail = $('#dnn_ctr12969_ViewEasyDNNNewsMain_ctl00_lblAddCommentEmailError'),
$authorEmailNotValid = $('#dnn_ctr12969_ViewEasyDNNNewsMain_ctl00_lblAddCommentEmailValid'),
$noComment = $('#dnn_ctr12969_ViewEasyDNNNewsMain_ctl00_lblAddCommentError'),
$notValidCaptcha = $('#dnn_ctr12969_ViewEasyDNNNewsMain_ctl00_lblCaptchaError'),
$noauthorGDPRAgreement = $('#dnn_ctr12969_ViewEasyDNNNewsMain_ctl00_lblShowCommentsGDPRComplianceAgreementError'),
emailRegex = /^(([^
< >()[\]\\.,;:\s@\"]+(\.[^
<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
if ($lbAddComment.data('disable'))
return false;
if ($authorNameInput.length > 0) {
authorName = $authorNameInput.val();
$noAuthorName.css('display', 'none');
if (authorName == '') {
$noAuthorName.css('display', 'block');
noErrors = false;
}
}
if ($authorEmailInput.length > 0) {
authorEmail = $authorEmailInput.val();
$noAuthorEmail.css('display', 'none');
$authorEmailNotValid.css('display', 'none');
if (authorEmail == '') {
$noAuthorEmail.css('display', 'block');
noErrors = false;
} else if (!emailRegex.test(authorEmail)) {
$authorEmailNotValid.css('display', 'block');
noErrors = false;
}
}
if ($authorGDPRAgreement.length > 0) {
$noauthorGDPRAgreement.css('display', 'none');
if (!$authorGDPRAgreement[0].checked) {
$noauthor
GDPRAgreement.css('display', 'block');
noErrors = false;
}
}
if ($('#dnn_ctr12969_ViewEasyDNNNewsMain_ctl00_pnlCommentsCaptcha').length > 0) {
var commentsCaptchaResponse = grecaptcha.getResponse(window.eds_commentsform_captchaId);
if (commentsCaptchaResponse.length == 0) {
$('#dnn_ctr12969_ViewEasyDNNNewsMain_ctl00_hfCommentsFormCaptchaResponse').val('');
$notValidCaptcha.css('display', 'block');
noErrors = false;
}
else {
$('#dnn_ctr12969_ViewEasyDNNNewsMain_ctl00_hfCommentsFormCaptchaResponse').val(commentsCaptchaResponse);
$notValidCaptcha.css('display', 'none');
}
}
if (comment == '') {
$noComment.css('display', 'block');
noErrors = false;
} else
$noComment.css('display', 'none');
if (noErrors)
$lbAddComment.data('disable', true);
else
return false;
});
});
//*/ ]]>
400
var addthis_config = addthis_config ||{ };
addthis_config.lang = 'en';
addthis_config.ui_language = 'en';
| |