[ad_1]
The longest total lunar eclipse of the 21st century will make our satellite blush on Friday, while the planet Mars, almost as close to Earth as possible, will be full of brilliance: a conjunction of phenomena that should delight amateur astronomers.
The show can be seen with the naked eye, without any danger contrary to solar eclipses. Binoculars, glbades and telescopes will allow you to enjoy even more. The eclipse, which corresponds to the moment when the Moon plunges into the shadow of the Earth, will be visible, partially or totally, in one half of the world. It can be observed from Africa, Europe, Asia, Australia. But it is East and South Africa, the Middle East and India that will be the best to enjoy the show. Europe will see the end of the eclipse
This Friday, the lunar eclipse, the longest of the century, will be observable from Europe, Asia, Africa and South America. In France, if the sky is clear, it promises a beautiful show of March aligned with the moon. ???????????? #Eclipse Of Moon #EclipseLunar pic.twitter.com/pSz051b4Ia
– REAL TV NEWS (@NewsTVreal) July 24, 2018
"The Moon should take on a reddish hue, a little coppery and Mars, nicknamed the red planet, will be next, very bright, with a slightly orange tint, "said Pascal Descamps, astronomer at the Observatory of Paris-PSL.
For a lunar eclipse to occur there must be an almost perfect alignment of the Sun, the Earth and the Moon. Our planet, lying between our star and the Moon, then projects its shadow on its natural satellite. The moon, full, will gradually return to the shadows, then in the shadows to be totally in the shade, before gradually emerging.
The complete phenomenon will begin at 19:14 and end at 1:28. The show will begin at 8:24 pm, the Moon giving the impression of being nibbled by the shadow. The most interesting moment of the eclipse, when the Moon will be completely in the shadow cone projected by the Earth, will start at 21:30 French time and will end at 23:13. This phase of "totality" will last 1 hour 43 minutes (103 minutes), making it the longest lunar eclipse of the 21st century.
"Sacred Trouble"
It s' is the second total lunar eclipse of 2018, the first one taking place on January 31 (it was not visible in Europe). Deprived of the rays of the Sun, the Moon will darken and take on a brick tint because the Earth's atmosphere deflects the red rays of sunlight into the shadow cone. The Moon can then send them back.
It is possible that the brightness of the moon is attenuated because "it will go through the center of the shadow of the Earth, where there is the least refracted light", warns Olivier Sanguy, of the Cité de l'Espace in Toulouse. The other heroine of the night will be Mars, which will be only 57.6 million kilometers from Earth. It will be necessary to wait until 2035 to see the red planet again so closely.
With the naked eye, we will see a brilliant point but with a telescope or a telescope, it will be possible to observe it in the details. The evening will give the opportunity to twist a rumor relayed on social networks that Mars would appear as big as the Moon this Friday. "If it were true, we would be in a lot of trouble, given the gravitational force," NASA quipped on its website.
Animations will take place everywhere in the countries concerned by the eclipse. In France, the French Association of Astronomy (AFA) organizes animations in 150 places. The Paris City Hall invites fans to visit the forecourt of the Sacred Heart to look at the sky. The Cité de l'Espace in Toulouse awaits a thousand people. In Madrid, the mayor proposes to watch the eclipse in the vast park of Pradolongo, against the backdrop of electronic music. (afp / nxp)
Created: 27.07.2018, 04:23
var commentNotSent = true; ////////////////////////////////////////////////// / // object FBcomments, can be reused for FB authentication var FBcomments = { fbAppId: '188734271214193', version: 'v2.0', fbChannel_path: '/facebook_xd_receiver.html', isLoggedIn: false, ////////////////////////////////////////////////// / initFb: function () { window.fbAsyncInit = function () { FB.init ({appId: FBcomments.fbAppId, version: FBcomments.version}); if (typeof FB === 'undefined') { alert ($ ( "# tr_fbConnectError") html ().); } };
(function (d, s, id) { var js, fjs = d.getElementsByTagName (s) [0]; if (d.getElementById (id)) return; js = d.createElement (s); js.id = id; js.src = "http://connect.facebook.net/en_US/sdk.js"; fjs.parentNode.insertBefore (js, fjs); } (document, 'script', 'facebook-jssdk')); } ////////////////////////////////////////////////// / fbLogin: function () { var populateFbData_ = this.populateFbData; var fbDisplay_ = this.fbDisplay; var promptFanBox_ = this.promptFanBox;
FB.init ({appId: FBcomments.fbAppId, version: FBcomments.version}); if (typeof FB === 'undefined') { alert ($ ( "# tr_fbConnectError") html ().); } FB.login (function (response) { if (response.authResponse) { // granted some permissions this.isLoggedIn = true; populateFbData_ (response.authResponse.accessToken, response.authResponse.userID); fbDisplay_ (); promptFanBox_ (response.authResponse.userID); } else { // user is not logged this.isLoggedIn = false; fbDisplay_ (); } }, {scope: 'publish_actions'}); } ////////////////////////////////////////////////// / fbLogout: function () { var fbDisplay_ = this.fbDisplay; $ .cookie ('fbsNN', '', {path: '/', expires: -1}); isLoggedIn = false; fbDisplay_ (); }
////////////////////////////////////////////////// / populateFbData: function (accessToken, userID) { fbAccessToken = accessToken; fbUserID = userID; FB.api ( '/me', { fields: 'name' } function (response) { var fbUserName = ''; if (response) { if (response.name) { fbUserName = response.name; } } // store a fb-independent cookie for future login $ .cookie ('fbsNN', "access_token =" + escape (fbAccessToken) + "" + "& uid =" + fbUserID + "& realname =" + escape (fbUserName), {path: '/', expires: 30}); fbDomInsert (fbUserName, fbUserID, fbAccessToken); } ); }
////////////////////////////////////////////////// / promptFanBox: function (userId) { FB.api ({ method: 'fql.query', query: 'SELECT uid FROM page_fan WHERE uid =' + userId + 'AND page_id =' + 107915992569379 } function (response) { if (typeof response [0] === 'undefined') { // user has not liked the page $ (Document) .ready (function () { var txt = $ ("# tr_fanBoxPromptTitle"). html (); tb_show (txt, '/ facebook_iframe.html & height = 250 & width = 645?'); }); } } ); } ////////////////////////////////////////////////// / fbDisplay: function () { fbLoginDisplay (this.isLoggedIn); loginDrop (); } ////////////////////////////////////////////////// / } // end object
////////////////////////////////////////////////// / // cookie based user registration by DB in future function fetch_nnCookie () { var nnRegex = /access_token=([^&]+)&uid=([0-9]+)&realname=(.+)/; nnRegex.exec ($ cookie ( 'fbsNN').); fbAccessToken = unescape (RegExp $ 1); fbUserID = RegExp $ 2; fbUserName = unescape (RegExp $ 3); } ////////////////////////////////////////////////// / function check_nnCookie () { if ($ .cookie ('fbsNN') == null) { return false; } else { fetch_nnCookie (); // check for valid data, delete cookie otherwise if (fbAccessToken! = null && fbAccessToken.length> 0 && fbUserID! = null && fbUserID.length> 0 && fbUserName! = null && fbUserName.length> 0 && fbUserName! = 'undefined') { fbDomInsert (fbUserName, fbUserID, fbAccessToken); return true; } else { $ .cookie ('fbsNN', '', {expires: -1}); return false; } } } ////////////////////////////////////////////////// / // form handler function commentsForm_send () { var fbForm_message = $ .trim ($ ("# fbForm_message"). val ()); var fbForm_msgID = $ .trim ($ ("# fbForm_msgID"). val ()); // if this value is> 0, it's a reply-to-another-comment message var fbForm_uri = $ .trim ($ ("# fbForm_uri"). val ()); var fbForm_storyId = $ .trim ($ ("# fbForm_storyId"). val ()); var fbForm_ip = $ .trim ($ ("# fbForm_ip"). val ()); var fbForm_realName = $ .trim ($ ("# fbForm_realName"). val ()); var fbForm_userId = $ .trim ($ ("# fbForm_userId"). val ()); var fbForm_userToken = $ ("# fbForm_userToken"). val (); var fbForm_publishOnFB = $ ("# fbForm_publishOnFB: checked"). val (); if (typeof fbForm_publishOnFB === 'undefined') { fbForm_publishOnFB = 0; } var fbFormN_gotcha = $ .trim ($ ("# fbFormN_gotcha"). val ()); var hasErrors = false; var messageReg = fbForm_message.length> 1;
if (messageReg == false) { $ ( "# CommentError_message") show (). hasErrors = true; } if (fbFormN_gotcha.length> 1) { hasErrors = true; }
if (! ($ ('# disclaimerConfirmBtn'). is (': checked'))) { $ ( "# CommentError_disclaimer") show (). hasErrors = true; } if (! hasErrors) { $ ("# commentsForm_send"). attr ("disabled", "true"); $ ("# commentsForm_send_noFb"). attr ("disabled", "true");
$ ( "# CommentSendLoading") show (). $ .ajax ({type: "POST", dataType: "text", cache: false, url: "/community/talkback_ajax.html", async: true, data: "action = sendComment & fbForm_realName =" + encodeURIComponent (fbForm_realName) + "& fbForm_userId =" + fbForm_userId + "& fbForm_userToken =" + encodeURIComponent (fbForm_userToken) + "& fbForm_publishOnFB =" + fbForm_publishOnFB + "& fbForm_uri =" + encodeURIComponent (fbForm_uri) + "& fbForm_storyId =" fbForm_storyId + + "& fbForm_ip =" + fbForm_ip + "& fbForm_message =" + encodeURIComponent (fbForm_message) + "& fbForm_msgID =" + fbForm_msgID, error: function () { alert ($ ( "# tr_commentSendError") html ().); } complete: function (reqCode) { $ ( "# CommentLogin") hide (). $ ( "# FbForm_message") hide (). $ ( "# FbForm_message_count_clbad") hide (). $ ( "# CommentError_message") hide (). $ ( "# CommentError_name") hide (). $ ( "# CommentError_location") hide (). $ ( "# CommentError_email") hide (). $ ( "# CommentError_disclaimer") hide (). $ Hide () ( "disclaimerText.."); $ ( "# CommentInfo_noFb") hide (). $ ( "# CommentsForm_send") hide (). $ ( "# FbCommentPublishCheckbox") hide (). $ ( "# CommentsForm_send_noFb") hide (). $ ( "# CommentInfo_Fb") show (). $ ( "# CommentSendLoading") hide (). } }); } // hasErrors }
////////////////////////////////////////////////// function delete_cookie (cookie) { $ .cookie (cookie, null, {path: '/'}); }
////////////////////////////////////////////////// function save_form_to_cookie (clbad_name) { var form = new Array (); $ ("." + clbad_name) .each (function (index) { form [index] = {}; form [index]['id'] = $ (this) .attr ("id"); form [index]['val'] = $ (this) .val (); }); $ .cookie (clbad_name, JSON.stringify (form), {json: true}); }
////////////////////////////////////////////////// function save_object_to_cookie (data) { var form = new Array (); form [0]['id'] = 'fbFormN_firstName'; form [0]['val'] = ''; form [1]['id'] = 'fbFormN_surname'; form [1]['val'] = ''; form [2]['id'] = 'fbFormN_zip'; form [2]['val'] = ''; form [3]['id'] = 'fbFormN_location'; form [3]['val'] = ''; form [4]['id'] = 'fbFormN_email'; form [4]['val'] = ''; $ ("." + clbad_name) .each (function (index) { form [index] = {}; form [index]['id'] = $ (this) .attr ("id"); form [index]['val'] = $ (this) .val (); }); $ .cookie (clbad_name, JSON.stringify (form), {json: true}); }
////////////////////////////////////////////////// function set_logged_in_cookie (data) { $ .cookie ('comment_login_details_email', JSON.stringify (data), {json: true, expires: 14, path: '/'}); }
////////////////////////////////////////////////// function read_logged_in_cookie () { var cookie_form_data_json = $ .cookie ('comment_login_details_email'); if (cookie_form_data_json! = null) { var form_data = JSON.parse (cookie_form_data_json); if (typeof form_data! = 'undefined') { if (form_data.user.customer_id == 53) { if (typeof form_data.pcr! = 'undefined' && form_data.pcr! = null && form_data.pcr.length> 0) { if (typeof form_data.uid! = 'undefined' && form_data.uid! = null && form_data.uid! = 0) { auto_login_email (form_data); return; } } } else { auto_login_email (form_data); } } }
}
////////////////////////////////////////////////// function read_form_from_cookie (clbad_name) { var cookie_form_data_json = $ .cookie (clbad_name); var form_data = JSON.parse (cookie_form_data_json); $ .each (form_data, function (index, value) { $ ("#" + value.id) .val (value.val); }); }
////////////////////////////////////////////////// / function commentsForm_create_account () { var fbFormN_firstName = $ .trim ($ ("# fbFormN_firstName"). val ()); var fbFormN_surname = $ .trim ($ ("# fbFormN_surname"). val ()); var fbFormN_zip = $ .trim ($ ("# fbFormN_zip"). val ()); var fbFormN_location = $ .trim ($ ("# fbFormN_location"). val ()); var fbFormN_telephone = $ .trim ($ ("# fbFormN_telephone"). val ()); var fbFormN_email = $ .trim ($ ("# fbFormN_email"). val ()); var fbForm_customerId = $ .trim ($ ("# fbForm_customerId"). val ()); var fbForm_storyId = $ .trim ($ ("# fbForm_storyId"). val ()); if ($ ("# fbFormN_pbadword"). length) { var fbFormN_pbadword = $ .trim ($ ("# fbFormN_pbadword"). val ()); } if ($ ("# fbFormN_pbadword_confirm"). length) { var fbFormN_pbadword_confirm = $ .trim ($ ("# fbFormN_pbadword_confirm"). val ()); }
var fbFormN_gotcha = $ .trim ($ ("# fbFormN_gotcha"). val ());
var hasErrors = false;
var nameReg =! (fbFormN_firstName.match (/ [*] /)) &&! (fbFormN_surname.match (/ [*] /)) && fbFormN_firstName.length> 1 && fbFormN_surname.length> 1; var locReg =! (fbFormN_location.match (/ [*] /)) && fbFormN_location.length> 1; if (fbFormN_telephone.length> 1) {
var telephoneReg = (fbFormN_telephone.match (/ ^ d {10} $ /));
} var emailRegObj = / ^([a-zA-Z0-9_.-])+@([a-zA-Z0-9_.-])+.([a-zA-Z])+([a-zA-Z])+/; // / [(19459076)).
var pbadword_params = '';
$ ( "# CommentError_name") hide (). $ ( "# CommentError_location") hide (). $ ( "# CommentError_telephone") hide (). $ ( "# CommentError_email") hide (). $ ( "# CommentError_pbadword") hide (). $ Hide () ( "disclaimerText..");
if (nameReg == false) { $ ( "# CommentError_name") show (). hasErrors = true; }
if (locReg == false) { $ ( "# CommentError_location") show (). hasErrors = true; }
if (telephoneReg == null) { $ ( "# CommentError_telephone") show (). hasErrors = true; }
if (emailRegObj.test (fbFormN_email) == false) { $ ( "# CommentError_email") show (). hasErrors = true; }
if (fbFormN_gotcha.length> 1) { hasErrors = true; }
if ($ ("# fbFormN_pbadword"). length && $ ("# fbFormN_pbadword_confirm"). length) { if (fbFormN_pbadword! = fbFormN_pbadword_confirm) { $ ( "# CommentError_pbadword") show (). hasErrors = true; } else { pbadword_params + = "& fbFormN_pbadword =" + encodeURIComponent (fbFormN_pbadword); pbadword_params + = "& fbFormN_pbadword_confirm =" + encodeURIComponent (fbFormN_pbadword_confirm); } }
if (! hasErrors) { $ ("# commentsForm_send"). attr ("disabled", "true"); $ ("# commentsForm_send_noFb"). attr ("disabled", "true"); save_form_to_cookie ( 'comment_form_input'); jQuery.ajax ({type: "POST", dataType: "json", cache: false, url: "/community/talkback_ajax.html", async: true, data: "action = talkback_create_account & fbFormN_firstName =" + encodeURIComponent (fbFormN_firstName) + "& fbFormN_surname =" + encodeURIComponent (fbFormN_surname) + "& fbFormN_zip =" + encodeURIComponent (fbFormN_zip) + "& fbFormN_location =" + encodeURIComponent (fbFormN_location) + "& fbFormN_telephone =" + encodeURIComponent (fbFormN_telephone) + "& fbFormN_email =" + encodeURIComponent (fbFormN_email) + "& customer_id =" + fbForm_customerId + "& story_id =" + encodeURIComponent (fbForm_storyId) + pbadword_params, error: function () {}, success: function (data) { if (data.code == 0) { setMessageBox (data.message, data.addclbad); } else {
$ ( "# DisclaimerConfirm") hide (). $ ( "# FbForm_message") hide (). $ ( "# FbForm_message_count_clbad") hide (). $ ( "# CommentError_message") hide (). $ ( "# CommentInfo_Fb") hide (). $ ( "# CommentsForm_send") hide (). $ ( "# FbCommentPublishCheckbox") hide (). $ ( "# CommentsForm_send_noFb") hide ().
$ ( "# Comment_signup_form") hide ().
$ ( "# Sms_verify") show (). $ ( "# FbFormN_smsVer") show (). $ ( "# CommentsForm_sms_veryfy") show ().
setMessageBox (data.message, data.addclbad); } } }); } }
///////////////////////////////////////////////// function confirm_delete_account () { var customer_id = $ .trim ($ ("# fbForm_customerId"). val ()); var login_email_email = $ .trim ($ ("# login_email_email"). val ()); var login_email_token = $ .trim ($ ("# login_email_token"). val ());
jQuery.ajax ({type: "POST", dataType: "json", cache: false, url: "/community/talkback_ajax.html", async: true, data: "action = confirm_delete_account & customer_id =" + customer_id + "& email =" + encodeURIComponent (login_email_email) + "& token =" + login_email_token, error: function () {}, success: function (data) { if (data.code == 0) { setMessageBox (data.message, data.addclbad); } else if (data.code == 1) { $ ( '# DeleteAccount') html (data.message). $ ( '# DeleteAccount') fadeIn (800). $ ( '# CommentFormSubContainer') slideUp (1000). $ ( 'Body, html'). Stop (). Animate ({ 'scrollTop': $ ("# deleteAccount"). offset (). top-200 }, 1000) } } }); }
///////////////////////////////////////////////// function cancel_delete_account () { . $ ( '# DeleteAccount') html ( ''); $ ( '# DeleteAccount') hide (). $ ( '# CommentFormSubContainer') slideDown (1000). }
///////////////////////////////////////////////// function delete_account () { var customer_id = $ .trim ($ ("# fbForm_customerId"). val ()); var login_email_email = $ .trim ($ ("# login_email_email"). val ()); var login_email_token = $ .trim ($ ("# login_email_token"). val ());
jQuery.ajax ({type: "POST", dataType: "json", cache: false, url: "/community/talkback_ajax.html", async: true, data: "action = delete_account & customer_id =" + customer_id + "& email =" + encodeURIComponent (login_email_email) + "& token =" + login_email_token, error: function () {}, success: function (data) { if (data.code == 0) { setMessageBox (data.message, data.addclbad); } else if (data.code == 1) { . $ ( '# DeleteAccount') html ( ''); $ ( '# DeleteAccount') hide (). $ ( '# CommentFormSubContainer') slideDown (1000). setMessageBox (data.message, data.addclbad); delete_cookie ( 'comment_login_details_email'); } else if (data.code == 2) { . $ ( '# DeleteAccount') html ( ''); $ ( '# DeleteAccount') hide (). $ ( '# CommentFormSubContainer') slideDown (1000). setMessageBox (data.message, data.addclbad); } } }); }
////////////////////////////////////////////////// function commentsForm_update_account_close () { . $ ( "# ManageAccount") html ( ''); }
////////////////////////////////////////////////// / function commentsForm_update_account () { var fbFormN_firstName = $ .trim ($ ("# update_firstName"). val ()); var fbFormN_surname = $ .trim ($ ("# update_surname"). val ()); var fbFormN_zip = $ .trim ($ ("# update_zip"). val ()); var fbFormN_location = $ .trim ($ ("# update_location"). val ()); var fbFormN_telephone = $ .trim ($ ("# update_telephone"). val ()); var fbFormN_email = $ .trim ($ ("# update_email"). val ()); var fbFormN_email_hidden = $ .trim ($ ("# update_email_hidden"). val ()); var fbForm_customerId = $ .trim ($ ("# fbForm_customerId"). val ()); var login_email_token = $ .trim ($ ("# login_email_token"). val ()); var fbForm_storyId = $ .trim ($ ("# fbForm_storyId"). val ()); if ($ ("# update_pbadword"). length) { var fbFormN_pbadword = $ .trim ($ ("# update_pbadword"). val ()); } if ($ ("# update_pbadword_confirm"). length) { var fbFormN_pbadword_confirm = $ .trim ($ ("# update_pbadword_confirm"). val ()); } var fbFormN_gotcha = $ .trim ($ ("# fbFormN_gotcha"). val ()); var hasErrors = false;
var nameReg =! (fbFormN_firstName.match (/ [*] /)) &&! (fbFormN_surname.match (/ [*] /)) && fbFormN_firstName.length> 1 && fbFormN_surname.length> 1; var locReg =! (fbFormN_location.match (/ [*] /)) && fbFormN_location.length> 1;
var telephoneReg = (fbFormN_telephone.match (/ ^ d {10} $ /));
var emailRegObj = / ^([a-zA-Z0-9_.-])+@([a-zA-Z0-9_.-])+.([a-zA-Z])+([a-zA-Z])+/; // / [(19459076)).
var pbadword_params = '';
$ ( "# CommentErrorUpdate_name") hide (). $ ( "# CommentErrorUpdate_location") hide (). $ ( "# CommentErrorUpdate_telephone") hide (). $ ( "# CommentErrorUpdate_email") hide (). $ ( "# CommentErrorUpdate_pbadword") hide (). $ Hide () ( "disclaimerText..");
if (nameReg == false) { $ ( "# CommentErrorUpdate_name") show (). hasErrors = true; }
if (locReg == false) { $ ( "# CommentErrorUpdate_location") show (). hasErrors = true; }
if (telephoneReg == null) { $ ( "# CommentErrorUpdate_telephone") show (). hasErrors = true; }
if (emailRegObj.test (fbFormN_email) == false) { $ ( "# CommentErrorUpdate_email") show (). hasErrors = true; }
if (fbFormN_gotcha.length> 1) { hasErrors = true; }
if ($ ("# fbFormN_pbadword"). length && $ ("# fbFormN_pbadword_confirm"). length) { if (fbFormN_pbadword! = fbFormN_pbadword_confirm) { if ((fbFormN_pbadword! = 'pbadword' || fbFormN_pbadword_confirm! = 'confirm pbadword') && (fbFormN_pbadword! = 'pbadword' || fbFormN_pbadword_confirm! = 'confirm pbadword')) { $ ( "# CommentErrorUpdate_pbadword") show (). hasErrors = true; } } else { pbadword_params + = "& fbFormN_pbadword =" + encodeURIComponent (fbFormN_pbadword); pbadword_params + = "& fbFormN_pbadword_confirm =" + encodeURIComponent (fbFormN_pbadword_confirm); } }
if (! hasErrors) { $ ("# commentsForm_send"). attr ("disabled", "true"); $ ("# commentsForm_send_noFb"). attr ("disabled", "true"); save_form_to_cookie ( 'comment_form_input'); jQuery.ajax ({type: "POST", dataType: "json", cache: false, url: "/community/talkback_ajax.html", async: true, data: "action = talkback_update_account & fbFormN_firstName =" + encodeURIComponent (fbFormN_firstName) + "& fbFormN_surname =" + encodeURIComponent (fbFormN_surname) + "& fbFormN_zip =" + encodeURIComponent (fbFormN_zip) + "& fbFormN_location =" + encodeURIComponent (fbFormN_location) + "& fbFormN_telephone =" + encodeURIComponent (fbFormN_telephone) + "& fbFormN_email =" + encodeURIComponent (fbFormN_email) + "& fbFormN_email_hidden =" + encodeURIComponent (fbFormN_email_hidden) + "& customer_id =" + fbForm_customerId + pbadword_params + "& token =" + login_email_token + "& story_id =" + encodeURIComponent (fbForm_storyId) error: function () {}, success: function (data) { if (data.code == 1) { $ ( "# DisclaimerConfirm") hide (). $ ( "# CommentLogin") hide (). $ ( "# FbForm_message") hide (). $ ( "# FbForm_message_count_clbad") hide (). $ ( "# CommentErrorUpdate_message") hide (). $ ( "# CommentInfo_Fb") hide (). $ ( "# CommentsForm_send") hide (). $ ( "# FbCommentPublishCheckbox") hide (). $ ( "# CommentsForm_send_noFb") hide (). $ ( "# CommentInfo_noFb") show (). $ ( "# ManageAccount") toggle (). $ ( "# CommentInfo_noFb") text (data.message). setMessageBox (data.message, data.addclbad); delete_cookie ( 'comment_login_details_email'); } else if (data.code == 2) { $ ( "# CommentLogin") show (). $ ( "# FbForm_message") show (). $ ( "# FbForm_message_count_clbad") show (). $ ( "# CommentErrorUpdate_message") hide (). $ ( "# CommentInfo_Fb") hide (). $ ( "# CommentsForm_send") hide (). $ ( "# FbCommentPublishCheckbox") hide (). $ ( "# CommentsForm_send_noFb") hide (). $ ( "# CommentInfo_noFb") hide (). $ ( "# ManageAccount") toggle (). setMessageBox (data.message, data.addclbad); if (data.user.customer_id == 53) { auto_login_email (data); } } else if (data.code == 3) { setMessageBox (data.message, data.addclbad); } } }); } }
// Handle to reset the timer on each notification var timeoutHandle; function setMessageBox (message, boxclbad) { $ ( "# MessageBox") hide (). $ ( "# MessageBox") html (message). $ ("# messageBox"). removeClbad ("warning error success"). addClbad (boxclbad); $ ( "# MessageBox") fadeIn (1500).
clearTimeout (timeoutHandle);
timeoutHandle = setTimeout (function () { $ ("# messageBox"). fadeOut (2000, function () { }); }, 12000); }
function forgot_pbadword_send () { var email = $ .trim ($ ('# pbadword_forgot_email'). val ()); var fbForm_customerId = $ .trim ($ ("# fbForm_customerId"). val ());
var hasErrors = false;
var emailRegObj = / ^([a-zA-Z0-9_.-])+@([a-zA-Z0-9_.-])+.([a-zA-Z])+([a-zA-Z])+/;
if (emailRegObj.test (email) == false) { $ ( "# CommentError_pbadword_forgot_email") show (). hasErrors = true; } if (! hasErrors) {
jQuery.ajax ({type: "POST", dataType: "json", cache: false, url: "/community/talkback_ajax.html", async: true, data: "action = reset_pbadword & customer_id =" + fbForm_customerId + "& email =" + encodeURIComponent (email), error: function () {}, success: function (data) { if (data.code = 0) { setMessageBox (data.message, data.addclbad); } else if (data.code = 1) { . $ ( '# Comment_pbadword_reset_form') toggle ( 'slow'); . $ ( '# Comment_login_form') toggle ( 'slow'); setMessageBox (data.message, data.addclbad); } } });
} }
////////////////////////////////////////////////// / function commentsForm_login_noFb () { var fbFormN_email = $ .trim ($ ("# fbFormN_email_login"). val ()); var fbFormN_pbadword = $ .trim ($ ("# fbFormN_pbadword_login"). val ()); var fbForm_customerId = $ .trim ($ ("# fbForm_customerId"). val ());
var hasErrors = false;
var emailRegObj = / ^([a-zA-Z0-9_.-])+@([a-zA-Z0-9_.-])+.([a-zA-Z])+([a-zA-Z])+/;
$ ( "# CommentError_email") hide (). $ ( "# CommentError_pbadword") hide ().
if (emailRegObj.test (fbFormN_email) == false) { $ ( "# CommentError_email") show (). hasErrors = true; }
if (! hasErrors) {
//$("#commentsForm_send").attr("disabled "," true "); //$("#commentsForm_send_noFb").attr("disabled "," true "); // save_form_to_cookie ( 'comment_form_input');
jQuery.ajax ({type: "POST", dataType: "json", cache: false, url: "/community/talkback_ajax.html", async: true, data: "action = talkback_login_email & email =" + encodeURIComponent (fbFormN_email) + "& customer_id =" + fbForm_customerId + "& pbadword =" + encodeURIComponent (fbFormN_pbadword), error: function () {
} success: function (data) { // $ ( "# commentLogin") hide (). // $ ( "# fbForm_message") hide (). // $ ( "# fbForm_message_count_clbad") hide (). // $ ( "# commentError_message") hide (). // $ ( "# commentInfo_Fb") hide (). // $ ( "# commentsForm_send") hide (). // $ ( "# fbCommentPublishCheckbox") hide (). // $ ( "# commentsForm_send_noFb") hide ().
if (data.code == 2) { $ Hide () ( 'commentFBlogin..'); $ ( '# Comment_login_form') hide (). $ ( "# Change_phonenumber") show (). setMessageBox (data.message, data.addclbad); } else { $ ( "# Change_phonenumber") hide (). // $ ( "# commentInfo_noFb") show (). //$("#commentLoggedInEmail").text(data.message); setMessageBox (data.message, data.addclbad); $ ( "# CommentLoggedInEmail") show (). if ('user' in data) { auto_login_email (data); } } } }); } }
////////////////////////////////////////////////// / function commentsForm_phone_change () { var fbFormN_email_phone_chnage = $ .trim ($ ("# fbFormN_email_phone_chnage"). val ()); var fbFormN_telephone_change = $ .trim ($ ("# fbFormN_telephone_change"). val ()); var fbFormN_pbadword_phone_chnage = $ .trim ($ ("# fbFormN_pbadword_phone_chnage"). val ()); var fbForm_customerId = $ .trim ($ ("# fbForm_customerId"). val ());
jQuery.ajax ({type: "POST", dataType: "json", cache: false, url: "/community/talkback_ajax.html", async: true, data: "action = talkback_phone_change & email =" + encodeURIComponent (fbFormN_email_phone_chnage) + "& customer_id =" + fbForm_customerId + "& pbadword =" + encodeURIComponent (fbFormN_pbadword_phone_chnage) + "& telephone =" + encodeURIComponent (fbFormN_telephone_change), error: function () { } success: function (data) { if (data.code == 1) { $ ( "# CommentError_email_phone_chnage") hide (). $ ( "# FbFormN_email_phone_chnage") hide (). $ ( "# CommentError_telephone_change") hide (). $ ( "# FbFormN_telephone_change") hide (). $ ( "# CommentError_pbadword_phone_chnage") hide (). $ ( "# FbFormN_pbadword_phone_chnage") hide (). $ ( "# CommentsForm_sms_change_veryfy") hide ().
$ ( "# FbFormN_sms_change_Ver") show (). $ ( "# CommentsForm_sms_send_change_veryfy") show ().
setMessageBox (data.message, data.addclbad); } else { setMessageBox (data.message, data.addclbad); } } }); }
////////////////////////////////////////////////// /
function comments_modifyForm_phone_change () {
var fbFormN_email_phone_chnage = $ .trim ($ ("# fbFormN_email_phone_chnage"). val ()); var fbFormN_telephone_change = $ .trim ($ ("# fbFormN_telephone_change"). val ()); var fbFormN_pbadword_phone_chnage = $ .trim ($ ("# fbFormN_pbadword_phone_chnage"). val ()); var fbForm_customerId = $ .trim ($ ("# fbForm_customerId"). val ());
jQuery.ajax ({type: "POST", dataType: "json", cache: false, url: "/community/talkback_ajax.html", async: true, data: "action = talkback_phone_change & email =" + encodeURIComponent (fbFormN_email_phone_chnage) + "& customer_id =" + fbForm_customerId + "& pbadword =" + encodeURIComponent (fbFormN_pbadword_phone_chnage) + "& telephone =" + encodeURIComponent (fbFormN_telephone_change), error: function () { } success: function (data) { if (data.code == 1) { $ ( "# CommentError_email_phone_chnage") hide (). $ ( "# FbFormN_email_phone_chnage") hide (). $ ( "# CommentError_telephone_change") hide (). $ ( "# FbFormN_telephone_change") hide (). $ ( "# CommentError_pbadword_phone_chnage") hide (). $ ( "# FbFormN_pbadword_phone_chnage") hide (). $ ( "# CommentsForm_sms_change_veryfy") hide ().
$ ( "# FbFormN_sms_change_Ver") show (). $ ( "# CommentsForm_sms_send_change_veryfy") show ().
setMessageBox (data.message, data.addclbad); } else { setMessageBox (data.message, data.addclbad); } } }); }
////////////////////////////////////////////////// / function commentsForm_phone_change_sms_verify () { var fbFormN_email_phone_chnage = $ .trim ($ ("# fbFormN_email_phone_chnage"). val ()); var fbFormN_telephone_change = $ .trim ($ ("# fbFormN_telephone_change"). val ()); var fbFormN_pbadword_phone_chnage = $ .trim ($ ("# fbFormN_pbadword_phone_chnage"). val ()); var fbFormN_sms_change_Ver = $ .trim ($ ("# fbFormN_sms_change_Ver"). val ()); var fbForm_customerId = $ .trim ($ ("# fbForm_customerId"). val ());
jQuery.ajax ({type: "POST", dataType: "json", cache: false, url: "/community/talkback_ajax.html", async: true, data: "action = talkback_phone_change_sms_verify & email =" + encodeURIComponent (fbFormN_email_phone_chnage) + "& customer_id =" + fbForm_customerId + "& pbadword =" + encodeURIComponent (fbFormN_pbadword_phone_chnage) + "& phone =" + encodeURIComponent (fbFormN_telephone_change) + "& code =" + encodeURIComponent (fbFormN_sms_change_Ver) error: function () { } success: function (data) { if (data.code == 1) { $ ( "# CommentError_sms_change_ver") hide (). $ ( "# FbFormN_sms_change_Ver") hide (). $ ( "# CommentsForm_sms_send_change_veryfy") hide (). $ ( "# Change_phonenumber") hide ().
$ ( '# Comment_login_form') show ().
setMessageBox (data.message, data.addclbad); } else { setMessageBox (data.message, data.addclbad); } } }); } ////////////////////////////////////////////////// / function commentsForm_sms_verify () { var fbFormN_firstName = $ .trim ($ ("# fbFormN_firstName"). val ()); var fbFormN_surname = $ .trim ($ ("# fbFormN_surname"). val ()); var fbFormN_telephone = $ .trim ($ ("# fbFormN_telephone"). val ()); var fbFormN_email = $ .trim ($ ("# fbFormN_email"). val ()); var fbForm_customerId = $ .trim ($ ("# fbForm_customerId"). val ()); var fbForm_storyId = $ .trim ($ ("# fbForm_storyId"). val ()); var fbFormN_smsVer = $ .trim ($ ("# fbFormN_smsVer"). val ());
var hasErrors = false;
if (! hasErrors) {
jQuery.ajax ({type: "POST", dataType: "json", cache: false, url: "/community/talkback_ajax.html", async: true, data: "action = talkback_sms_verify & fbFormN_firstName =" + encodeURIComponent (fbFormN_firstName) + "& fbFormN_surname =" + encodeURIComponent (fbFormN_surname) + "& email =" + encodeURIComponent (fbFormN_email) + "& telefone =" + encodeURIComponent (fbFormN_telephone) + "& code =" + fbFormN_smsVer + "& customer_id =" + fbForm_customerId + "& story_id =" + encodeURIComponent (fbForm_storyId) error: function () { } success: function (data) { if (data.code == 0) { setMessageBox (data.message, data.addclbad); } else { $ ( "# CommentLogin") hide (). $ ( "# Sms_verify") hide (). $ ( "# FbFormN_smsVer") hide (). $ ( "# CommentsForm_sms_veryfy") hide ().
setMessageBox (data.message, data.addclbad); } } }); } }
////////////////////////////////////////// // swissnoise quiva function auto_login_quiva (data) { console.log ("quiva login start"); var user = { "remoteId": data.uid, "username": data.user.email, "pbadword": data.pcr, "email": data.user.email, "firstName": data.user.first_name, "lastName": data.user.last_name, "zipCode": data.user.post_code, "locality": data.user.city, "phoneNumber": data.user.mobile_number }; whatif.login (user) .always (function () {
}); console.log ("quiva login done"); } // Swissish END quiva
function auto_login_email (data) {
$ Hide () ( "commentFBlogin..");
$ Hide () ( "commentOhnelogin..");
var html = '';
var name = data.user.first_name + '' + data.user.last_name;
html + = ' Welcome, ' + name + '
';
html + = ' Submit Comment ';
html + = 'Disconnect
';
html + = 'Manage profile';
html + = '';
html + = '';
$ ( "# CommentLoggedInEmail") html (html).
set_logged_in_cookie (data);
$ ( "# CommentLoggedInEmail") show ().
}
////////////////////////////////////////////////// / function commentsForm_send_noFb () { var fbForm_message = $ .trim ($ ("# fbForm_message"). val ()); fbForm_message = fbForm_message.replace (/ & / g, "+"); var fbForm_uri = $ .trim ($ ("# fbForm_uri"). val ()); var fbForm_storyId = $ .trim ($ ("# fbForm_storyId"). val ()); var fbForm_ip = $ .trim ($ ("# fbForm_ip"). val ()); var is_logged_in = false; if ($("#is_logged_in").length) { is_logged_in = true; }
var fbFormN_firstName = $.trim($("#fbFormN_firstName").val()); var fbFormN_surname = $.trim($("#fbFormN_surname").val()); var fbFormN_zip = $.trim($("#fbFormN_zip").val()); var fbFormN_location = $.trim($("#fbFormN_location").val()); var fbFormN_email = $.trim($("#fbFormN_email").val()); var fbForm_msgID = $.trim($("#fbForm_msgID").val()); // if this value is > 0, its a reply-to-another-comment message if ($("#fbFormN_pbadword").length) { var fbFormN_pbadword = $.trim($("#fbFormN_pbadword").val()); } if ($("#fbFormN_pbadword_confirm").length) { var fbFormN_pbadword_confirm = $.trim($("#fbFormN_pbadword_confirm").val()); } var fbFormN_gotcha = $.trim($("#fbFormN_gotcha").val()); var hasErrors = false;
var messageReg = fbForm_message.length > 1; var nameReg = !(fbFormN_firstName.match(/[*]/)) && !(fbFormN_surname.match(/[*]/)) && fbFormN_firstName.length > 1 && fbFormN_surname.length > 1; // dont check for ZIP, cause of foreign countries //var locReg = !(fbFormN_zip.match(/[*]/)) && !(fbFormN_location.match(/[*]/)) && fbFormN_zip.length > 1 && fbFormN_location.length > 1; var locReg = !(fbFormN_location.match(/[*]/))&& fbFormN_location.length > 1; var emailRegObj = /^([a-zA-Z0-9_.-])+@([a-zA-Z0-9_.-])+.([a-zA-Z])+([a-zA-Z])+/; // /^([a-zA-Z0-9_.-+])+@(([a-zA-Z0-9-])+.)+([a-zA-Z0-9]{2,4})+$/; var pbadword_params = '';
$("#commentError_name").hide(); $("#commentError_location").hide(); $("#commentError_email").hide(); $("#commentError_pbadword").hide(); $("#commentError_message").hide(); $("#commentError_disclaimer").hide(); $(".disclaimerText").hide();
if (messageReg == false) { $("#commentError_message").show(); hasErrors = true; }
if (nameReg == false) { $("#commentError_name").show(); hasErrors = true; }
if (locReg == false) { $("#commentError_location").show(); hasErrors = true; }
if(emailRegObj.test(fbFormN_email) == false){ $("#commentError_email").show(); hasErrors = true; }
if (fbFormN_gotcha.length > 1) { hasErrors = true; }
if (!($('#disclaimerConfirmBtn').is(':checked'))) { $("#commentError_disclaimer").show(); $(".disclaimerText").show(); hasErrors = true; }
if (!hasErrors) {
$("#commentsForm_send").attr("disabled", "true"); $("#commentsForm_send_noFb").attr("disabled", "true"); save_form_to_cookie('comment_form_input');
jQuery.ajax({ type: "POST", dataType: "html", cache: false, url: "/community/talkback_ajax.html", async: true, data: "action=sendComment&fbFormN_firstName="+encodeURIComponent(fbFormN_firstName)+"&fbFormN_surname="+encodeURIComponent(fbFormN_surname)+"&fbFormN_zip="+encodeURIComponent(fbFormN_zip)+"&fbFormN_location="+encodeURIComponent(fbFormN_location)+"&fbFormN_email="+encodeURIComponent(fbFormN_email)+"&fbForm_uri="+encodeURIComponent(fbForm_uri)+"&fbForm_storyId="+fbForm_storyId+"&fbForm_ip="+fbForm_ip+"&fbForm_message="+encodeURIComponent(fbForm_message)+"&fbForm_msgID="+fbForm_msgID, error: function(){ }, success: function(){ $("#commentLogin").hide(); $("#fbForm_message").hide(); $("#fbForm_message_count_clbad").hide(); $("#commentError_message").hide(); $("#commentInfo_Fb").hide(); $("#commentsForm_send").hide(); $("#fbCommentPublishCheckbox").hide(); $("#commentsForm_send_noFb").hide(); $("#disclaimerConfirm").hide(); $("#commentInfo_noFb").show(); } }); } }
/////////////////////////////////////////////////// function commentsForm_send_email() { var fbForm_message = $.trim($("#fbForm_message").val()); fbForm_message = fbForm_message.replace(/&/g, "+"); var fbForm_uri = $.trim($("#fbForm_uri").val()); var fbForm_storyId = $.trim($("#fbForm_storyId").val()); var fbForm_customerId = $.trim($("#fbForm_customerId").val()); var fbForm_ip = $.trim($("#fbForm_ip").val()); var login_email_token = $.trim($("#login_email_token").val());
var is_logged_in = false; if ($("#is_logged_in").length) { is_logged_in = true; } var fbFormN_email = $.trim($("#login_email_email").val()); var fbForm_msgID = $.trim($("#fbForm_msgID").val()); // if this value is > 0, its a reply-to-another-comment message
var fbFormN_gotcha = $.trim($("#fbFormN_gotcha").val()); var hasErrors = false;
var messageReg = fbForm_message.length > 1;
$("#commentError_name").hide(); $("#commentError_location").hide(); $("#commentError_email").hide(); $("#commentError_pbadword").hide(); $("#commentError_message").hide(); $("#commentError_disclaimer").hide(); $(".disclaimerText").hide();
if (messageReg == false) { $("#commentError_message").show(); hasErrors = true; }
if (fbFormN_gotcha.length > 1) { hasErrors = true; }
if (!($('#disclaimerConfirmBtn').is(':checked'))) { $("#commentError_disclaimer").show(); hasErrors = true; }
if (!hasErrors) { $("#commentsForm_send").attr("disabled", "true"); $("#commentsForm_send_noFb").attr("disabled", "true"); commentNotSent = false;
jQuery.ajax({ type: "POST", dataType: "json", cache: false, url: "/community/talkback_ajax.html", async: true, data: "action=send_comment_email&fbForm_uri="+encodeURIComponent(fbForm_uri)+"&fbForm_storyId="+fbForm_storyId+"&customer_id="+fbForm_customerId+"&fbForm_ip="+fbForm_ip+"&fbForm_message="+encodeURIComponent(fbForm_message)+"&fbForm_msgID="+fbForm_msgID+"&email="+encodeURIComponent(fbFormN_email)+"&token="+login_email_token, error: function(){ }, success: function(data){ if (data.code == 1) { $("#commentLogin").hide(); $("#fbForm_message").hide(); $("#fbForm_message_count_clbad").hide(); $("#commentError_message").hide(); $("#commentError_name").hide(); $("#commentError_location").hide(); $("#commentError_email").hide(); $("#commentError_disclaimer").hide(); $(".disclaimerText").hide(); $("#commentInfo_noFb").hide(); $("#commentsForm_send").hide(); $("#fbCommentPublishCheckbox").hide(); $("#disclaimerConfirm").hide(); $("#commentsForm_send_noFb").hide(); $("#commentInfo_noFb").show(); $("#commentSendLoading").hide(); $("#commentInfo_Notice").hide(); $("#manageAccount").hide(); } else if (data.code == 2) { setMessageBox(data.message, data.addclbad); } } }); } }
/////////////////////////////////////////////////// /////////////////////////////////////////////////// // some jquery UI functions function fbLoginDisplay(loginState) { $ (Document) .ready (function () { if (loginState == true) { $(".notloggedToFacebook").hide(); $(".loggedToFacebook").show(); $('#commentsForm_send_noFb').hide(); $('#commentsForm_send').show(); $("#fbCommentPublishCheckbox").show(); $(".recommendCommentFacebook").show(); } else { $(".loggedToFacebook").hide(); $(".notloggedToFacebook").show(); $('#commentsForm_send').hide(); $('#commentsForm_send_noFb').show(); $("#fbCommentPublishCheckbox").hide(); $(".recommendCommentFacebook").hide(); if ($("#commentLoggedInEmail").length) { $("#commentLoggedInEmail").show(); } }}); }
/////////////////////////////////////////////////// function fbDomInsert(username, uid, token) { $ (Document) .ready (function () { $("#fbUserRealName").html(username); var imgHtml= ""; $("#fbUserProfilePicture").html(imgHtml);
$("#fbForm_realName").val(username); $("#fbForm_userId").val(uid); $("#fbForm_userToken").val(token); }); } /////////////////////////////////////////////////// function loginDrop() { $ (Document) .ready (function () { $('#commentLogin').slideDown(); $("textarea#fbForm_message").attr("rows", 6); $("#commentsForm_send").removeAttr("disabled"); $("#commentsForm_send_noFb").attr("disabled", ""); $("#commentsForm_send_email").removeAttr("disabled"); $("#fbForm_message").val(""); $('#fbForm_message').removeAttr("onclick"); }); } /////////////////////////////////////////////////// function doOnFbConnect() { $(".recommendCommentFacebook").show(); // for comments below: display checkbox to choose if recommended comments get published on facebook }
/////////////////////////////////////////////////// function log(msg){ if (typeof console === 'undefined') { return false; } else { return true; } }
///////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////// // main // fb auth var fbAccessToken = ''; var fbUserID = ''; var fbUserName = ''; FBcomments.initFb(); var nnFBloggedIn = check_nnCookie(); if (nnFBloggedIn == true) { fbLoginDisplay(true);
} else { fbLoginDisplay(false); }
function inputFocus(thisFor, thisClbad) { $('#'+ thisFor).focus(function() { $('.'+ thisClbad).animate({ opacity: "0" }, "fast"); }).blur(function() { if($(this).val() == "") { $('.'+ thisClbad).animate({ opacity: "1" }, "fast"); } }); }
//// some more jquery stuff $ (Document) .ready (function () { read_logged_in_cookie();
// hide 'populär auf facebook' widget in sideline //$("#fb_activityFeed").hide();
$("#fbCommentPublishCheckbox").hide();
$('#fbFormN_pbadword_login').keypress(function(e){ if (e.which == 13){ e.preventDefault (); $(this).blur(); $('#commentsForm_post_confirmed').focus().click(); return false; } });
$('#fbFormN_smsVer').keypress(function(e){ if (e.which == 13){ e.preventDefault (); $(this).blur(); $('#commentsForm_sms_veryfy').focus().click(); return false; } });
// Bind to set the fadeout of form labels when clicked or focused $('.sbsLabel label').each(function () { var thisFor = $(this).attr('for'); var thisClbad = $(this).attr('clbad'); inputFocus(thisFor, thisClbad); });
// some form display handling $('#disclaimerButtonShow').bind('click', function(){ $('.disclaimerText').show(); $('#disclaimerButtonShow').css('display','none'); $('#disclaimerButtonHide').css('display','inline'); }); $('#disclaimerButtonHide').bind('click', function(){ $('.disclaimerText').hide(); $('#disclaimerButtonHide').css('display','none'); $('#disclaimerButtonShow').css('display','inline'); });
// display login data on start if ($("#fbUserRealName").html()) { if ($("#fbUserRealName").html().length >= 2){ // && $("textarea#fbForm_message").attr("rows") > 2 $("#fbCommentPublishCheckbox").show(); } }
// clear textarea $("#fbForm_message").val('');
// submit buttons , disable on on reload $("#commentsForm_send").attr("disabled", "true"); $("#commentsForm_send_noFb").attr("disabled", "true");
// set checkboxes $('#fbForm_publishOnFB').attr('checked', true); $('.recommendCommentPublishOnFb').attr('checked', true); $('#disclaimerConfirmBtn').attr('checked', false);
// fixes a tiny bug: if values are prefilled on reload they should not be grey var myFbFormIds = ['fbFormN_firstName', 'fbFormN_surname', 'fbFormN_zip', 'fbFormN_location', 'fbFormN_email', 'fbFormN_pbadword', 'fbFormN_pbadword_confirm']; for (var ii=0;ii < myFbFormIds.length; ii++) { if ($("#"+myFbFormIds[ii]).length) { if (!($("#"+myFbFormIds[ii]).val().match(/[*]/))) { $("#"+myFbFormIds[ii]).css('color','#000000'); }; } }
$('.comment_signup_form_toggle').live('click', function(){ $('#comment_signup_form').toggle('slow'); $('#comment_login_form').toggle('slow'); return false; });
$('.comment_form_forgot_pbadword').live('click', function(){ $('#comment_pbadword_reset_form').toggle('slow'); $('#comment_login_form').toggle('slow'); return false; });
$('.emailLogoutButton').live('click', function() { delete_cookie('comment_login_details_email'); $("#commentLoggedInEmail").html(''); $("#manageAccount").html(''); $("#commentLoggedInEmail").hide(); $(".commentFBlogin").show(); $(".commentOhnelogin").show(); });
$('#show_update_phone').live('click', function() { $("#commentLoggedInEmail").html(''); $("#manageAccount").html(''); $("#commentLoggedInEmail").hide(); $("#comment_login_form").hide();
$("#change_phonenumber").show(); $(".commentOhnelogin").show(); });
$('#commentsForm_send_email').live('click', function() { if (commentNotSent) { commentsForm_send_email(); } });
$('#emailManageAccount').live('click', function () { var customer_id = $.trim($("#fbForm_customerId").val()); var login_email_email = $.trim($("#login_email_email").val()); var login_email_token = $.trim($("#login_email_token").val());
jQuery.ajax({ type: "POST", dataType: "json", cache: false, url: "/community/talkback_ajax.html", async: true, data: "action=login_manage_account&customer_id="+customer_id+"&email="+encodeURIComponent(login_email_email)+"&token="+login_email_token, error: function(){ }, success: function(data){ if (data.code == 0) { setMessageBox(data.message, data.addclbad); } else if (data.code == 1) { $('#manageAccount').html(data.message); $('#manageAccount').show(); } } }); });
});
[ad_2]
Source link