Travel alerts issued for Indiana counties


More than one Indiana counties were positioned underneath commute watches and advisories by way of emergency control companies because of inclement climate on Tuesday.

Marshall, Kosciusko and Noble counties has been positioned on a “watch” native commute standing stage. At this stage, county emergency control companies suggest simplest very important commute, similar to to and from paintings, or all the way through emergency eventualities.

It’s also advisable that emergency motion plans for companies, faculties, govt companies, and different organizations will have to be put into position on the “watch” stage.

St. Joseph, Elkhart, Starke, Los angeles Porte and Pulaski counties are a number of the Indiana counties which have been positioned underneath the “advisory” native commute standing stage. That is the bottom stage of visitors standing ranges, however folks will have to use warning and steer clear of hazardous spaces.

For up to the moment commute statuses for Indiana counties, click on right here.


<!–

Are you positive you need to flag this remark?

–>

Are you positive you need to delete this remark?


<!–

Are you positive you need to flag this remark?

–>

Are you positive you need to delete this remark?

<![CDATA[
var WCS = WCS || ;
console.log('WCS: ', WCS)
WCS.SITE_URL = "//www.abc57.com/";
WCS.THREAD_ID = 121871;
WCS.TALKUMS_SITE_ID = 3;
WCS.REPLY_PARENT_ID = -1;
WCS.REPLY_ANCESTOR_ID = -1;
WCS.REPLY_PARENT_ADMIN = -1;
WCS.REPLY_LEVEL = -1;
WCS.FLAG_ID = -1;
WCS.IS_POSTING = false;
WCS.IS_LIKING = false;
WCS.USER_ID = "-1";
WCS.USER = "";
WCS.USER_DISPLAY_NAME = "";
WCS.socket = null;
/*
WCS.socketoptions =
path: '/socketcluster/',
port: 3000,
hostname: '54.175.141.4'
;
*/
WCS.socketoptions =
path: '/socketcluster/',
port: 8000,
hostname: '127.0.0.1'
;
WCS.errorMax = 2;
WCS.errorCount = 0;
WCS.TOTAL_COMMENTS = 0;
WCS.termsAccepted = 0;
WCS.emailConfirmed = 0;
WCS.EMOJI_TARGET = 0;
WCS.YOUTUBE_TARGET = 0;
WCS.UPLOAD_TARGET = 0;
WCS.DROP_FILE_NAME = "";
WCS.DROP_FILE_TYPE = "";
WCS.THREAD_URL = '/news/travel-alerts-issued-for-indiana-counties';
WCS.BASE_THREAD_URL = '/news/travel-alerts-issued-for-indiana-counties';
WCS.THREAD_TITLE = 'Travel alerts issued for Indiana counties';
WCS.SHARE_COMMENT_ID = '';
WCS.FACEBOOK_SHARE = 'https://www.facebook.com/sharer/sharer.php?u=' + WCS.THREAD_URL;
WCS.TWITTER_SHARE = 'https://twitter.com/home?status=' + WCS.THREAD_URL;
WCS.PROFILE_OPEN = false;
WCS.SIDEBAR_PAGE = "";
WCS.POPUP_OPEN = false;
WCS.CAPTCHA_SITE_KEY = '6LfwBUQUAAAAALPuABuclB4DSrMCClNMTn6204M7';
WCS.REPLY_BOX = null;
WCS.FILTER_TYPE = "newest"; //oldest, top
WCS.FILTER_PAGE = 0;
WCS.MODAL_CALLBACK = null;
WCS.MODAL_OPEN = false;
WCS.PROFILE_USER_ID = -1;
WCS.RETURN_USER = false;
WCS.SETTINGS_DATA = null;
WCS.MAX_ID = 0;
WCS.NEW_COMMENT_TOTAL = 0;
WCS.LOADING_NEW_COMMENTS = false;
WCS.PROFILE_COMMENT_PAGE = 0;
WCS.PROFILE_COMMENT_USER = -1;

WCS.OPEN_SIDEBAR = function()
$('#wcs-overlay-sidebar').addClass('wcs-overlay-open');
$('#wcs-slideout-wrapper').addClass('wcs-slideout-open');
$('body').addClass('wcs-no-scroll');

//dont set WCS.PROFILE_OPEN yet…
//sometimes have to wait for events to be done or it will close immediated
;

WCS.CLOSE_SIDEBAR = function()
$('#wcs-overlay-sidebar').removeClass('wcs-overlay-open');
$('#wcs-slideout-wrapper').removeClass('wcs-slideout-open');
$('#wcs-overlay-sidebar').removeClass('wcs-overlay-open');

$('body').removeClass('wcs-no-scroll');
WCS.PROFILE_USER_ID = -1;
WCS.PROFILE_OPEN = false;
;

(function(){
/****** USERNAME – SHOW SIDEBAR ********/
$('body').on("click", function(e)
if(WCS.PROFILE_OPEN)
if ($(e.target).closest('#wcs-slideout-wrapper').length === 0)
//alert("closing because " + $(e.target).closest('#wcs-slideout-wrapper').length);
//console.log(e.target);
WCS.CLOSE_SIDEBAR();

if(WCS.POPUP_OPEN)
if(e.target && $(e.target).closest('.wcs-post-comment-media-btns').length <= 0 &&
$(e.target).closest('.wcs-profile-header-user-avatar').length <= 0 &&
$(e.target).closest('.wcs-popout-wrapper').length 0)
totalText = ” (” + resp[‘total’] + ‘)’;

if(isLike == 1)
$(me).html(‘‘ + ” Not like” + totalText);
$(me).addClass(‘wcs-like-btn-active’);
else
$(me).html(‘‘ + ” Like” + totalText);
$(me).removeClass(‘wcs-like-btn-active’);

,
error: serve as(reaction)

});
});

//assumes respond feedback are expanded
var getLevel = serve as(cid, stage)

if($(‘#comment_’ + cid).hasClass(‘wcs-comment-item-parent’))
go back stage;

var replyInfo = $(‘#comment_’ + cid).records(‘replyinfo’);
console.log(“replyinfo”);
console.log(replyInfo);
if(!replyInfo)
go back stage;

var parentId = replyInfo.break up(‘;

$(‘#wcs-main-wrapper’).on(‘click on’, ‘.wcs-reply-trigger’, serve as(e)’)[1];
var ancestorId = $topComment.records(‘identity’);
var commentId = $parentComment.records(‘identity’);

//var replyHtml = $(‘#template_reply_container’).html();
WCS.REPLY_ANCESTOR_ID = ancestorId;
WCS.REPLY_PARENT_ID = commentId;
WCS.REPLY_PARENT_NAME = parentName;
WCS.REPLY_PARENT_ADMIN = isAdmin;
//can we even desire a stage? almost certainly no longer until we alter the construction once more
WCS.REPLY_LEVEL = getLevel(commentId, 1);
var $replyBox = $topComment.to find(‘.wcs-reply-container’);

$replyBox.addClass(‘wcs-reply-container-open’);

// scroll to respond block
var itemTop = $replyBox.offset().best;
console.log(‘Scroll best: ‘, itemTop);
$(‘html,frame’).prevent().animate(
scrollTop: itemTop-100
, 800, serve as()
$replyBox.kids(‘textarea’).focal point();
);

//$replyBox.kids(‘textarea’).focal point();

$replyBox.to find(‘.wcs-reply-username’).textual content(parentName);
$replyBox.to find(‘.wcs-reply-username’).attr(‘data-userid’, parentUserid);
if(isAdmin == 1)
$replyBox.to find(‘.wcs-reply-username’).addClass(‘wcs-verified-user’);

else
$replyBox.to find(‘.wcs-reply-username’).removeClass(‘wcs-verified-user’);

//WCS.REPLY_BOX = $replyBox;

);

$(‘#wcs-main-wrapper’).on(‘click on’, ‘.wcs-share-trigger’, serve as(e)
e.preventDefault();
$(this).subsequent().addClass(‘wcs-popout-active’);
var $commentObj = $(this).closest(‘.wcs-comment-item’);
var shareId = $commentObj.records(‘identity’);
// WCS.POPUP_OPEN = true;
var textual content = $commentObj.to find(‘.wcs-comment-item-text’).textual content().trim();
var cutString = serve as(s, n)
var minimize= s.indexOf(‘ ‘, n);
if(minimize== -1) go back s;
go back s.substring(0, minimize)

textual content = cutString(textual content, 150)
WCS.FACEBOOK_SHARE = ‘https://www.fb.com/sharer/sharer.php?u=’ + WCS.THREAD_URL + “#comment_” + shareId;
WCS.TWITTER_SHARE = ‘https://twitter.com/house?standing=’ + textual content + “… ” + WCS.THREAD_URL + “#comment_” + shareId;
$(this).subsequent().to find(‘.wcs-popout-share-btn-facebook’).attr(‘href’, WCS.FACEBOOK_SHARE);
$(this).subsequent().to find(‘.wcs-popout-share-btn-twitter’).attr(‘href’, WCS.TWITTER_SHARE);

WCS.THREAD_TITLE = WCS.THREAD_TITLE.replaceAll(‘'’, “‘”);
WCS.THREAD_TITLE = WCS.THREAD_TITLE.replaceAll(‘"’, “‘”);
WCS.THREAD_TITLE = WCS.THREAD_TITLE.replaceAll(‘&’, “&”);

var mailData = “topic=” + encodeURIComponent(“Svengoolie – ” + WCS.THREAD_TITLE) + “&frame=” + encodeURIComponent(textual content);
var mailShare = “mailto:?” + mailData;
$(this).subsequent().to find(‘.wcs-popout-share-btn-email’).attr(‘href’, mailShare);

$(this).subsequent().to find(‘.wcs-popout-share-btn-facebook’).prop(“goal”,”_blank”);
$(this).subsequent().to find(‘.wcs-popout-share-btn-twitter’).prop(“goal”,”_blank”);

WCS.POPUP_OPEN = true;
);
$(‘#wcs-main-wrapper’).on(‘click on’, ‘.wcs-popout-share-btn’, serve as(e)
$(‘.wcs-popout’).removeClass(‘wcs-popout-active’);
WCS.POPUP_OPEN = false;
);

$(‘#wcs-main-wrapper’).on(‘click on’, ‘.wcs-delete-trigger’, serve as(e){
e.preventDefault();
var me = this;
WCS.showModal(“Are you positive you need to delete this remark?”, “Delete”, serve as(doit){
if(!doit)
go back false;

var $commentObj = $(me).closest(‘.wcs-comment-item’);
var deleteId = $commentObj.records(‘identity’);
$.ajax({
url: ‘/ajax_comments/delete_comment’,
records:
comment_id: deleteId
,
kind: ‘POST’,
dataType: ‘json’,
luck: serve as(resp)

if(resp[‘success’] == ‘true’)
if(resp[‘delete_type’] == 2)
var $elem = $(‘#comment_’ + deleteId);
$elem.addClass(‘wcs-comment-item-deleted’);
setTimeout(serve as()
$elem.take away();
, 500);
else
WCS.setDeleted(deleteId);

else
WCS.showModal(resp[‘msg’], “OK”, serve as());

,
error: serve as(reaction)

alert(“Error”);
console.log(reaction.responseText);
console.log(reaction);

});
});
});

/******** Profile Avatar Make a selection Popup ***********/
$(‘#wcs-main-wrapper’).on(‘click on’, ‘.wcs-update-avatar-trigger’, serve as(e)
e.preventDefault();
$(this).subsequent().addClass(‘wcs-popout-active’);
WCS.POPUP_OPEN = true;
);

$(‘#wcs-main-wrapper’).on(‘click on’, ‘.selectmoji’, serve as(e){
e.preventDefault();
var currEmoji = $(this).records(’emoji’);
$.ajax({
url: ‘/ajax_comments/update_emoji’,
records:
emoji_file: currEmoji,
,
kind: ‘POST’,
dataType: ‘json’,
luck: serve as(resp)

console.log(“emokiji arespoinse”);
console.log(resp);
if(resp[‘success’] == ‘false’)
WCS.showModal(resp[‘msg’], “OK”, serve as());
else
$(‘.wcs-popout’).removeClass(‘wcs-popout-active’);
WCS.POPUP_OPEN = false;
//undergo every remark, turn on delete if person suits
$(‘.wcs-comment-item-reply’).every(serve as()
var replyInfo = $(this).records(‘replyinfo’);
var userId = replyInfo.break up(‘);
$(‘.wcs-comment-item-parent’).every(serve as()
var replyInfo = $(this).records(‘replyinfo’);
var userId = replyInfo.break up(‘);
//loggedinDisplay(resp);
loginSuccess(resp, true, true);

,
error: serve as(reaction)

alert(“Error”);
console.log(reaction.responseText);
console.log(reaction);

});
});
/******** emoji, youtube, picture embed **********/

$(‘#wcs-main-wrapper’).on(‘click on’, ‘.wcs-post-comment-media-emoji,.wcs-post-comment-media-video,.wcs-post-comment-media-image’, serve as(e){

//upload wcs-selected-textarea to the realm we wish to insert emoji
var $topComment = $(this).closest(‘.wcs-comment-item-parent’);
$(‘.wcs-selected-textarea’).removeClass(‘wcs-selected-textarea’);
var $textarea = $(‘#topcomment_text’);
if($topComment.period > 0)
$textarea = $topComment.to find(‘.wcs-reply-textarea’);

$textarea.addClass(‘wcs-selected-textarea’);
//show the popup
$(‘.wcs-popout’).removeClass(‘wcs-popout-active’);
$(this).subsequent().addClass(‘wcs-popout-active’);
WCS.POPUP_OPEN = true;
console.log(“that is”);
console.log(this);
var me = this;
//simplest upload those occasions when popup is open
if($(this).hasClass(‘wcs-post-comment-media-image’)){
var holder = $(this).subsequent().to find(‘.wcs-popout-file-upload-dropzone’).get(0);

holder.ondragenter = serve as(e) holder.textContent = ‘Or drag a dossier right here to add’;
e.stopPropagation(); e.preventDefault();;
holder.ondragover = serve as (e) e.stopPropagation(); e.preventDefault(); go back false; ;
holder.ondragend = serve as ()
//this.className = ”;
go back false;
;
holder.ondrop = serve as (e)
//this.className = ”;
e.preventDefault();
e.stopPropagation();
$(this).closest(‘.wcs-post-comment-media-btns’).to find(‘.wcs-popout-file-upload-dropzone’).html(‘‘);

WCS.readfiles(e.dataTransfer.information, serve as(theid, msg)
if(theid === null)
WCS.showModal(msg, “OK”, serve as());
go back;

var imageUrl = ‘https://weigel-comments.s3.us-east-1.amazonaws.com/’ + theid;
$(‘.wcs-selected-textarea’).val($(‘.wcs-selected-textarea’).val() + “[image=” + imageUrl + “]”);
$(me).closest(‘.wcs-post-comment-media-btns’).to find(‘.wcs-popout-file-upload-dropzone’).html(‘Or drag a dossier right here to add’);
$(‘.wcs-popout’).removeClass(‘wcs-popout-active’);
WCS.POPUP_OPEN = false;
);

}

e.preventDefault();
go back false;
});

$(‘#wcs-main-wrapper’).on(‘click on’, ‘.selectemoji’, serve as()
var elem =$(‘#talkums_text’).get(0);
var theEmoji = $(this).records(’emoji’);
$(‘.wcs-selected-textarea’).val($(‘.wcs-selected-textarea’).val() + “:” + theEmoji + “:”);

$(‘.wcs-popout’).removeClass(‘wcs-popout-active’);
WCS.POPUP_OPEN = false;
);

$(‘#wcs-main-wrapper’).on(‘click on’, ‘.youtube-add’, serve as(e)&v=)([^#&?]*).*/;
var youtubeId = “”;
var fit = theUrl.fit(regExp);
if (fit && fit[2].period == 11)
youtubeId = fit[2];
else
WCS.showModal(“Please input a legitimate youtube url”, “OK”, serve as());
go back false;

var myUrl = “https://www.youtube.com/watch?v=” + youtubeId;
$(‘.wcs-selected-textarea’).val($(‘.wcs-selected-textarea’).val() + “[youtube=” + myUrl + “]”);
$(‘.wcs-popout’).removeClass(‘wcs-popout-active’);
WCS.POPUP_OPEN = false;
);

$(‘#wcs-main-wrapper’).on(‘trade’, ‘.image_uploader’, serve as()
var me = this;
$(this).closest(‘.wcs-post-comment-media-btns’).to find(‘.wcs-popout-file-upload-dropzone’).html(‘‘);
WCS.doS3Upload(null, serve as(theid, msg)
if(theid === null)
WCS.showModal(msg, “OK”, serve as());
go back;

var imageUrl = ‘https://weigel-comments.s3.us-east-1.amazonaws.com/’ + theid;
$(‘.wcs-selected-textarea’).val($(‘.wcs-selected-textarea’).val() + “[image=” + imageUrl + “]”);
$(me).closest(‘.wcs-post-comment-media-btns’).to find(‘.wcs-popout-file-upload-dropzone’).html(‘Or drag a dossier right here to add’);
$(‘.wcs-popout’).removeClass(‘wcs-popout-active’);
WCS.resetFormElement($(me));

WCS.POPUP_OPEN = false;
);
);
$(‘#wcs-main-wrapper’).on(‘trade’, ‘#avatar_uploader’, serve as(){
$(this).closest(‘.wcs-popout-avatar’).to find(‘#avatar_upload_notice’).html(‘‘);
var me = this;
WCS.doS3Upload(‘avatar’, serve as(theid, msg){
if(theid === null)
WCS.resetFormElement($(me));
$(me).closest(‘.wcs-popout-avatar’).to find(‘#avatar_upload_notice’).html(”);
WCS.CLOSE_SIDEBAR();
WCS.showModal(msg, “OK”, serve as());
go back;

var imageUrl = ‘https://weigel-comments.s3.us-east-1.amazonaws.com/’ + theid;

console.log(imageUrl);
$.ajax({
url: ‘/ajax_comments/update_avatar’,
records:
user_upload: imageUrl,
,
kind: ‘POST’,
dataType: ‘json’,
luck: serve as(resp)

WCS.resetFormElement($(me));
$(me).closest(‘.wcs-popout-avatar’).to find(‘#avatar_upload_notice’).html(”);
if(resp[‘success’] == ‘true’)
//shut avatar window
//undergo every remark, turn on delete if person suits
$(‘.wcs-comment-item-reply’).every(serve as()’)[0];
//console.log(“remark userid ” + userId + ” vs ” + WCS.USER_ID);
if(WCS.USER_ID == userId)
$(this).to find(‘.wcs-avatar’).attr(‘src’, resp[‘profile_image’] + “?” + new Date().getTime());

);
$(‘.wcs-comment-item-parent’).every(serve as()’)[0];
//console.log(“remark userid ” + userId + ” vs ” + WCS.USER_ID);
if(WCS.USER_ID == userId)
$(this).to find(‘.wcs-avatar’).first().attr(‘src’, resp[‘profile_image’] + “?” + new Date().getTime());

);
//loggedinDisplay(resp);
loginSuccess(resp, true, true);
else
if(resp[‘msg’])
WCS.showModal(resp[‘msg’], “OK”, serve as());

,
error: serve as(reaction)

alert(“Error”);
console.log(reaction.responseText);
console.log(reaction);

});

});

});

$(‘#wcs-main-wrapper’).on(‘click on’, ‘.wcs-post-comment-button’, serve as(e)
var textual content = $(‘#topcomment_text’).val();
var isReply = $(this).closest(‘.wcs-reply-container’).period > 0 ? true : false;
if(isReply)
var $textarea = $(this).closest(‘.wcs-reply-container’).to find(‘.wcs-reply-textarea’);
textual content = $textarea.val();
$textarea.addClass(‘wcs-reply-textarea-submitting’);

WCS.doComment(isReply, textual content);
e.preventDefault();
go back;
);

$(‘#wcs-main-wrapper’).on(‘click on’, ‘.wcs-login-google’, serve as(e)
e.preventDefault();
WCS.doAuthWindow(‘google’);
go back false;

);
$(‘#wcs-main-wrapper’).on(‘click on’, ‘.wcs-login-twitter’, serve as(e)
e.preventDefault();
WCS.doAuthWindow(‘twitter’);
go back false;
);
$(‘#wcs-main-wrapper’).on(‘click on’, ‘.wcs-login-facebook’, serve as(e)
e.preventDefault();
WCS.doAuthWindow(‘fb’);
go back false;
);
$(‘.wcs-login-email’).on(‘click on’, serve as(e)
if(WCS.RETURN_USER)
WCS.loadSidebarTemplate(‘login’)
WCS.setupProfileForm(‘login’);
else
WCS.loadSidebarTemplate(‘sign up’)
WCS.setupProfileForm(‘sign up’);

);

$(‘.wcs-comment-filter-trigger’).on(‘click on’, serve as(e)
e.preventDefault();
$(‘.wcs-comment-filter-trigger’).removeClass(‘wcs-comments-filter-active’);
var newFilterType = this.identity.break up(‘-‘)[2];
if(newFilterType == WCS.FILTER_TYPE)
//do not anything, we are the usage of the similar filter out
$(this).addClass(‘wcs-comments-filter-active’);
go back false;

WCS.FILTER_TYPE = newFilterType;
WCS.FILTER_PAGE = 0;

$(this).addClass(‘wcs-comments-filter-active’);

WCS.refreshAllComments();
);

$(‘#wcs-main-wrapper’).on(‘click on’, ‘.view-more-btn’, serve as(e)
if($(this).hasClass(‘view-more-topcomment’))
WCS.FILTER_PAGE++;
WCS.refreshAllComments();
else if($(this).hasClass(‘view-more-newcomment’))
WCS.LOADING_NEW_COMMENTS = true;
WCS.loadNewComments();
var html = $(‘#template_loadinganimation’).html();
$(‘.view-more-newcomment’).after(html);
$(‘.view-more-newcomment’).conceal();
else if($(this).hasClass(‘view-more-profilecomment’))
WCS.PROFILE_COMMENT_PAGE++;
//WCS.PROFILE_COMMENT_USER = userId;
WCS.loadMoreProfileComments();

);

setInterval(serve as()
WCS.checkNewComments();
, 25000),

$(‘#wcs-main-wrapper’).on(‘click on’, ‘.view-prev-replies’, serve as(e){
var ancestorId = $(this).records(‘ancestorid’);
var $container = $(‘#comment_’ + ancestorId);
var loadingHtml = $(‘#template_loadinganimation’).html();

$container.to find(‘.view-more-subcomment’).prior to(loadingHtml);
$container.to find(‘.view-more-subcomment’).take away();
$.ajax(
url: ‘/ajax_comments/get_all_children_comments’,
records:
ancestor_id: ancestorId,
thread_id: WCS.THREAD_ID,
,
kind: ‘POST’,
dataType: ‘json’,
luck: serve as(records)

if(records.period 0)
totalText = ” (” + resp[‘upvotes’] + ‘)’;

var html = “”;
if(resp[‘upvoted’])
html = ‘‘ + ” Not like” + totalText;
$remark.to find(‘.wcs-like-trigger’).addClass(‘wcs-like-btn-active’);
else
html = ‘‘ + ” Like” + totalText;

$remark.to find(‘.wcs-like-trigger’).html(html);

$remark.attr(‘data-id’, resp[‘id’]);
$remark.attr(‘identity’, “comment_” + resp[‘id’]);
if(WCS.USER_ID != resp[‘user_id’])
$remark.to find(‘.wcs-delete-trigger’).attr(‘taste’, ‘show:none’);

$remark.addClass(‘wcs-comment-item-reply’);
$futureComment.prior to($remark);
);
,
error: serve as(reaction)

alert(“Error”);
console.log(reaction.responseText);
console.log(reaction);

);
});
setTimeout(serve as(){
if(window.location.href.indexOf(‘#’) > 0)
var possibleComment = window.location.href.break up(‘#’)[1];
if(possibleComment.indexOf(‘comment_’) === 0)
var commentId = parseInt(possibleComment.break up(‘_’)[1]);

WCS.loadNewComments(commentId, serve as()
setTimeout(serve as()
//so we will upload the hash right here… in a different way it is going to be similar and no longer transfer to location
var elem = report.getElementById(possibleComment);
elem.scrollIntoView();
//hash does not paintings if you have already got the hash
//window.location.href = origUrl + “#” + possibleComment;
, 2000);
);

}, 500);
})();

WCS.loadSidebarTemplate = serve as(theType, isSocial)
$(‘#wcs-slideout-wrapper’).empty();
if(theType == ‘sign up’)
var $container = $(‘

‘);
var innerHtml = $(‘#template_registration_header_email’).html() + $(‘#template_profile_form’).html();
if(isSocial)
innerHtml = $(‘#template_registration_header_social’).html() + $(‘#template_profile_form’).html();

$container.append(innerHtml);

$(‘#wcs-slideout-wrapper’).append($container);

else if(theType == ‘login’)
var $container = $(‘

‘);
var innerHtml = $(‘#template_login_header’).html() + $(‘#template_login_form’).html();
$container.append(innerHtml);
$(‘#wcs-slideout-wrapper’).append($container);

else if(theType == ‘profile_user’)
var headerHtml = $(‘#template_profile_header’).html();
var formHtml = $(‘#template_profile_form’).html();
var $settingsBody = $($(‘#template_profile_display_wrapper’).html());
$settingsBody.to find(‘.wcs-profile-settings-wrap’).append(formHtml);

$(‘#wcs-slideout-wrapper’).append(headerHtml);

$(‘#wcs-slideout-wrapper’).append($settingsBody);

else if(theType == ‘profile_other’)
var headerHtml = $(‘#template_profile_header’).html();
var wrapper = $(‘#template_profile_display_wrapper’).html();

$(‘#wcs-slideout-wrapper’).append(headerHtml + wrapper);

else if(theType == ‘forgot_password’)
var wrapper = $(‘#template_forgotpass_form’).html();
$(‘#wcs-slideout-wrapper’).append(wrapper);

else if(theType == ‘update_password’)
var wrapper = $(‘#template_update_password’).html();
$(‘#wcs-slideout-wrapper’).append(wrapper);

else if(theType == ‘loading’)
var html = $(‘#template_loadinganimation’).html();
$(‘#wcs-slideout-wrapper’).append(html);

;

WCS.doAuthWindow = serve as(authType)
var windowWidth = 600;
var windowHeight = 360;
if(authType == ‘fb’)
windowWidth = 800;
windowHeight = 480;
else if(authType == ‘twitter’)
windowWidth = 500;
windowHeight = 700;

var authWindow = window.open(WCS.SITE_URL + ‘iframelogin/social_login?provider=’ + authType, ‘_blank’, ‘toolbars=0,width=’ + windowWidth + ‘,top=’ + windowHeight + ‘,left=200,best=200,scrollbars=1,resizable=1,location=no’);
;

WCS.doComment = serve as(isReply, theText){

var parentId = 0;
var parentAdmin = 0;
var ancestorId = 0;
var replyLevel = 0;
if(isReply)
parentId = WCS.REPLY_PARENT_ID;
parentAdmin = WCS.REPLY_PARENT_ADMIN;
ancestorId = WCS.REPLY_ANCESTOR_ID;
replyLevel = parseInt(WCS.REPLY_LEVEL);
replyLevel++;

if(WCS.IS_POSTING)
go back false;

WCS.IS_POSTING = true;
$.ajax({
url: ‘/ajax_comments/post_comment’,
records:
thread_id: WCS.THREAD_ID,
site_id: WCS.TALKUMS_SITE_ID,
ancestor_id : ancestorId,
parent_id : parentId,
parent_admin: parentAdmin,
stage : replyLevel,
post_text: theText
,
kind: ‘POST’,
dataType: ‘json’,
luck: serve as(resp)

console.log(“put up remark records”);
console.log(resp);
if(resp[‘success’] == ‘false’)
if(resp[‘action’])
WCS.force_action(resp[‘action’]);

else if(resp[‘msg’])
WCS.showModal(resp[‘msg’], “OK”, serve as());

WCS.IS_POSTING = false;
go back;

if(parentId > 0)
$(‘.subcomment_text’).val(“”);
else
$(‘#topcomment_text’).val(“”);

//$(‘.wcs-reply-container’).take away();
WCS.IS_POSTING = false;
var $remark = $($(‘#template_acomment’).html());

$remark.to find(‘.wcs-user-trigger img’).attr(‘src’, resp[‘profile_image’]);
$remark.to find(‘.wcs-user-trigger’).attr(‘data-userid’, resp[‘user_id’]);

if(resp[‘parent_userid’])
$remark.to find(‘.wcs-other-user’).attr(‘data-userid’, resp[‘parent_userid’]);
$remark.attr(‘data-replyinfo’, resp[‘user_id’] + “else” + resp[‘display_name’] + ”
$remark.to find(‘.wcs-user-displayname’).html(resp[‘display_name’]);
if(resp[‘is_admin’] == 1)
$remark.to find(‘.wcs-user-displayname’).addClass(‘wcs-verified-user’);
else
$remark.to find(‘.wcs-user-displayname’).removeClass(‘wcs-verified-user’);

$remark.to find(‘.wcs-user-displayname’).attr(‘data-userid’, WCS.USER_ID);
$remark.to find(‘.wcs-user-displayname’).attr(‘data-isadmin’, resp[‘is_admin’]);
$remark.to find(‘.wcs-comment-item-date’).html(‘Simply Now’);
$remark.to find(‘.wcs-comment-item-text’).html(resp[‘post_html’]);
$remark.to find(‘.wcs-like-trigger’).html(‘‘ + ” Like “);
$remark.attr(‘data-id’, resp[‘insert_id’]);
$remark.attr(‘identity’, “comment_” + resp[‘insert_id’]);

if(parentId > 0)
$remark.addClass(‘wcs-comment-item-reply’);
var $container = $(‘#comment_’ + ancestorId);
$container.to find(‘.wcs-reply-container’).prior to($remark);

else
$(‘.wcs-comment-container’).prepend($remark);

// provides/gets rid of elegance to animate front
$remark.addClass(‘wcs-comment-item-added’);
setTimeout(serve as()
$remark.removeClass(‘wcs-comment-item-added’);
, 500);

if($(‘.wcs-comments-no-comments’).period > 0)
$(‘.wcs-comments-no-comments’).take away();

if(WCS.socket !== null)
WCS.socket.post(‘thread’ + WCS.TALKUMS_THREADID, person: ‘person456’,
message: ‘Hello!’);

,
error: serve as(reaction)

alert(“Error”);
console.log(reaction.responseText);
console.log(reaction);

});

};

WCS.setupProfileForm = serve as(formType, isSocial){
WCS.SIDEBAR_PAGE = formType;

//bind evends
if(formType == ‘sign up’ || formType == ‘settings’){
$(‘#zipcode’).on(‘keypress’, serve as(ev) keyCode > 57)
//codes for backspace, delete, input
if (keyCode != 0 && keyCode != 8 && keyCode != 13 && !ev.ctrlKey)
ev.preventDefault();

);
$(‘#zipcode’).trade(serve as()
//load_providers();
);

$(“#zipcode”).keyup(serve as()
//load_providers();
);

$(‘#carrier’).on(‘trade’, serve as()
var aProvider = $(this).val();
if(aProvider == ‘carrier no longer indexed’)
$(‘.wcs-profile-settings-other-provider’).display();

else if(aProvider == ”)

else
$(‘.wcs-profile-settings-other-provider’).conceal();

);
if(formType == ‘sign up’)
$(‘#username’).on(‘keyup’, serve as(ev)
//codes for 0-9
var newVal = $(this).val();
var code, i, len;
var isAlphanumeric = true;
for (i = 0, len = newVal.period; i 47 && code 64 && code 96 && code < 123) && // decrease alpha (a-z)
!(code == 95) ) // underscore
isAlphanumeric = false;

if(!isAlphanumeric)
$('.wcs-settings-form-err-username').html("Username Invalid: areas, hyphens and particular characters are NOT allowed.");
else
$('.wcs-settings-form-err-username').html("");

);

}
if(formType == "sign up")
$('.wcs-profile-settings-form').attr('identity', 'wcs-registration-form');
grecaptcha.render('recaptcha_site',
'sitekey' : WCS.CAPTCHA_SITE_KEY
);
$('.wcs-profile-settings-email-username').conceal();
$('.wcs-profile-signup-username').display();
$('.wcs-profile-signup-password').display();

else if(formType == "settings")
$('.wcs-profile-settings-form').attr('identity', 'wcs-edit-form');
$('enter[name="social_username"]').attr('readonly', 'readonly');
$('enter[name="social_username"]').addClass("wcs-profile-settings-form-readonly");
$('enter[name="username1"]').attr('readonly', 'readonly');
$('enter[name="username1"]').addClass("wcs-profile-settings-form-readonly");
$('enter[name="password"]').attr('readonly', 'readonly');
$('enter[name="password"]').addClass("wcs-profile-settings-form-readonly");
if(isSocial)
$('enter[name="social_username"]').after('Your username can’ +
“‘” + ‘t be edited’);
else
$(‘enter[name=”username1″]’).after(‘Your username can’ +
“‘” + ‘t be edited’);

$(‘.wcs-settings-form-password-container’).take away();
$(‘.wcs-settings-form-password-updater’).display();
//$(‘.wcs-settings-form-password-updater’).conceal();

if(WCS.termsAccepted == 1)
$(‘.wcs-profile-registration-terms’).take away();

else if(formType == “login”)
$(‘.wcs-profile-settings-form’).attr(‘identity’, ‘wcs-login-form’);

else if(formType == “forgot_password”)
$(‘.wcs-profile-settings-form’).attr(‘identity’, ‘wcs-forgotpass-form’);
grecaptcha.render(‘recaptcha_site’,
‘sitekey’ : WCS.CAPTCHA_SITE_KEY
);

else if(formType == ‘update_password’)
$(‘.wcs-profile-settings-form’).attr(‘identity’, ‘wcs-updatepass-form’);
grecaptcha.render(‘recaptcha_site’,
‘sitekey’ : WCS.CAPTCHA_SITE_KEY
);

$(‘.wcs-cancel-btn’).on(‘click on’, serve as()
WCS.CLOSE_SIDEBAR();
);

//unpleasant – prolong to permit dom to replace, so can bind occasions
setTimeout(serve as()
if(formType == “sign up”)
WCS.setupRegistrationForm();
else if (formType == “login”)
WCS.setupLoginForm();
else if(formType == “settings”)
WCS.setupSettingsForm();

else if(formType == “forgot_password”)
WCS.setupForgotPass();

else if(formType == ‘update_password’)
WCS.setupUpdatePass();

if(!$(‘#wcs-overlay-sidebar’).hasClass(‘wcs-overlay-open’))
WCS.OPEN_SIDEBAR();
WCS.PROFILE_OPEN = true;

, 10);
};

WCS.setupRegistrationForm = serve as(){
//WCS.PROFILE_OPEN = true;
$(‘#wcs-signin-link’).on(‘click on’, serve as(e)
e.preventDefault();
WCS.loadSidebarTemplate(‘login’);
WCS.setupProfileForm(‘login’);

go back false;
);

$(‘#wcs-registration-form’).post(serve as(e){
// alert(“filing”);
e.preventDefault();
var html = $(‘#template_loadinganimation’).html();
$(‘#wcs-overlay-sidebar’).append(html);

//shall we take a look at HTML5 formdata object…
var formData = new FormData(report.getElementById(“wcs-registration-form”));

var xhr = new XMLHttpRequest();
xhr.open(‘POST’, ‘/ajax_comments/register_update_site_user/’, true);
xhr.onload = serve as () {
if (xhr.standing === 200)

var end result = JSON.parse(xhr.responseText);
$(‘#wcs-overlay-sidebar’).to find(‘.wcs-loading-animation-overlay’).take away();
if(end result[‘success’] == “true”)
//do modal
// alert(“do modal shut”);
var successHtml = $(‘#template_registration_header_success’).html();
$(‘.wcs-profile-registration-wrap’).empty();
$(‘.wcs-profile-registration-wrap’).html(successHtml);
loginSuccess(end result, true, true);
WCS.termsAccepted = 1;
var defaultComment = $(‘#topcomment_text’).val();
if(defaultComment.trim().period > 0)
$.ajax(
url: ‘/ajax_comments/set_default_comment_text’,
records:
default_comment: defaultComment
,
kind: ‘POST’,
dataType: ‘json’,
luck: serve as(resp)

,
error: serve as(reaction)

);

/*
setTimeout(serve as()
WCS.CLOSE_SIDEBAR();
, 10000);
*/

else
grecaptcha.reset();
//alert(“failure: ” + );
var setError = serve as(errorName)
if(end result[‘errors’][errorName])
$(‘.wcs-settings-form-err-‘ + errorName).html(end result[‘errors’][errorName]);

else
$(‘.wcs-settings-form-err-‘ + errorName).html(“”);

;

setError(‘full-name’);
setError(‘electronic mail’);
setError(‘username’);
setError(‘password’);
setError(‘social-username’);
setError(‘dob’);
setError(‘gender’);
setError(‘zipcode’);
setError(‘carrier’);
setError(‘other-provider’);
//setError(‘terms-of-service’);
setError(‘captcha’);
if(end result[‘msg’])
alert(end result[‘msg’]);

else

alert(‘An error passed off!’);

};

xhr.ship(formData);
});

}
WCS.setupForgotPass = serve as(){
$(‘#wcs-login-link’).on(‘click on’, serve as(e)
e.preventDefault();
WCS.loadSidebarTemplate(‘login’);
WCS.setupProfileForm(‘login’);
go back false;
);

$(‘#wcs-forgotpass-form’).post(serve as(e){
e.preventDefault();
var html = $(‘#template_loadinganimation’).html();
$(‘#wcs-overlay-sidebar’).append(html);
var formData = new FormData(report.getElementById(“wcs-forgotpass-form”));
var xhr = new XMLHttpRequest();
xhr.open(‘POST’, ‘/ajax_comments/reset_password/’, true);
xhr.onload = serve as () {
if (xhr.standing === 200)

var end result = JSON.parse(xhr.responseText);
console.log(“effects”)
console.log(end result);
$(‘#wcs-overlay-sidebar’).to find(‘.wcs-loading-animation-overlay’).take away();
if(end result[‘success’] == “true”)
var successHtml = $(‘#template_forgotpass_success’).html();
$(‘.wcs-profile-settings-wrap’).empty();
$(‘.wcs-profile-settings-wrap’).html(successHtml);

else
grecaptcha.reset();
//alert(“failure: ” + );
var setError = serve as(errorName)
if(end result[‘errors’][errorName])
$(‘.wcs-settings-form-err-‘ + errorName).html(end result[‘errors’][errorName]);

else
$(‘.wcs-settings-form-err-‘ + errorName).html(“”);

;
setError(‘electronic mail’);
setError(‘captcha’);

else

alert(‘An error passed off!’);

};

xhr.ship(formData);

go back false;
});

};

WCS.setupUpdatePass = serve as(){
$(‘.wcs-update-password-settings-link’).on(‘click on’, serve as(e)
e.preventDefault();
//Simply reload with ajax name – in a different way this may get actually messy
WCS.PROFILE_USER_ID = -1;
$(‘.wcs-post-comment-user-settings’).set off(‘click on’);
go back false;
);

$(‘#wcs-updatepass-form’).post(serve as(e){
e.preventDefault();
var html = $(‘#template_loadinganimation’).html();
$(‘#wcs-overlay-sidebar’).append(html);
var formData = new FormData(report.getElementById(“wcs-updatepass-form”));
var xhr = new XMLHttpRequest();
xhr.open(‘POST’, ‘/ajax_comments/update_password/’, true);
xhr.onload = serve as () {
if (xhr.standing === 200)

var end result = JSON.parse(xhr.responseText);
console.log(“effects”)
console.log(end result);
$(‘#wcs-overlay-sidebar’).to find(‘.wcs-loading-animation-overlay’).take away();
if(end result[‘success’] == “true”)
var successHtml = $(‘#template_updatepass_success’).html();
$(‘.wcs-profile-settings-wrap’).empty();
$(‘.wcs-profile-settings-wrap’).html(successHtml);

else
grecaptcha.reset();
//alert(“failure: ” + );
var setError = serve as(errorName)
if(end result[‘errors’][errorName])
$(‘.wcs-settings-form-err-‘ + errorName).html(end result[‘errors’][errorName]);

else
$(‘.wcs-settings-form-err-‘ + errorName).html(“”);

;
setError(‘password’);
setError(‘password1’);
setError(‘captcha’);

else

alert(‘An error passed off!’);

};

xhr.ship(formData);

go back false;
});

};

WCS.setupLoginForm = serve as(){

$(‘#wcs-register-link’).on(‘click on’, serve as(e)
e.preventDefault();
WCS.loadSidebarTemplate(‘sign up’);
WCS.setupProfileForm(‘sign up’);
go back false;
);

$(‘.wcs-login-forgot-un-pw’).on(‘click on’, serve as(e)
e.preventDefault();
WCS.loadSidebarTemplate(‘forgot_password’);
WCS.setupProfileForm(‘forgot_password’);
go back false;
);

$(‘#wcs-login-form’).post(serve as(e){
e.preventDefault();
var html = $(‘#template_loadinganimation’).html();
$(‘#wcs-overlay-sidebar’).append(html);

var formData = new FormData(report.getElementById(“wcs-login-form”));
var xhr = new XMLHttpRequest();
xhr.open(‘POST’, ‘/ajax_comments/login_site_user/’, true);
xhr.onload = serve as () {
if (xhr.standing === 200)

var end result = JSON.parse(xhr.responseText);
console.log(“end result”);
console.log(end result);
$(‘#wcs-overlay-sidebar’).to find(‘.wcs-loading-animation-overlay’).take away();

if(end result[‘success’] == “true”)
//make person do the issues
loginSuccess(end result, true, false);
//do modal
//$(‘#wcs-edit-form’).after(“

Thanks for updating your knowledge!”);

else
//alert(“failure: ” + );
var setError = serve as(errorName)
if(end result[‘errors’][errorName])
$(‘.wcs-settings-form-err-‘ + errorName).html(end result[‘errors’][errorName]);

else
$(‘.wcs-settings-form-err-‘ + errorName).html(“”);

;

setError(‘username’);
setError(‘password’);
setError(‘generic’);
//if(end result[‘msg’])
// WCS.showModal(end result[‘msg’], “OK”, serve as());
//

else

alert(‘An error passed off!’);

};

xhr.ship(formData);

go back false;
});

}

WCS.setupSettingsForm = serve as(){
$(‘.wcs-profile-nav-tab’).on(‘click on’, serve as(e)
e.preventDefault();
$(‘.wcs-profile-nav-tab’).removeClass(‘wcs-profile-nav-active’);
$(this).addClass(‘wcs-profile-nav-active’);
if($(this).textual content() == ‘Settings’)
$(‘.wcs-profile-settings-wrap’).display();
$(‘.wcs-profile-comments-wrap’).conceal();
else
$(‘.wcs-profile-settings-wrap’).conceal();
$(‘.wcs-profile-comments-wrap’).display();

);

$(‘.wcs-view-in-discussion-trigger’).on(‘click on’, serve as(e)
e.preventDefault();
var viewUrl = $(this).records(‘url’);
var vus = viewUrl.break up(‘#’);
var baseUrl = vus[0];
var commentDomId = vus[1];
if(WCS.BASE_THREAD_URL == baseUrl && $(‘#’ + commentDomId).period 0)
//fetch ancestor and it is going to pull in kid
commentId = ancestorId;

WCS.loadNewComments(commentId, serve as()
setTimeout(serve as()
var elem = report.getElementById(commentDomId);
elem.scrollIntoView();
WCS.CLOSE_SIDEBAR();
, 100);
);

else

window.location.href = viewUrl;

setTimeout(serve as()
WCS.CLOSE_SIDEBAR();
, 250);

);

//WCS.PROFILE_OPEN = true;
$(‘#wcs-signin-link’).on(‘click on’, serve as(e)
e.preventDefault();
WCS.loadSidebarTemplate(‘login’);
WCS.setupProfileForm(‘login’);

go back false;
);

$(‘.wcs-profile-settings-update-password’).on(‘click on’, serve as(e)
e.preventDefault();
WCS.loadSidebarTemplate(‘update_password’);
WCS.setupProfileForm(‘update_password’);

go back false;
);

//alert(“putting in settings sort”);
$(‘#wcs-edit-form’).post(serve as(e){
e.preventDefault();
//shall we take a look at HTML5 formdata object…
var formData = new FormData(report.getElementById(“wcs-edit-form”));

var html = $(‘#template_loadinganimation’).html();
$(‘#wcs-overlay-sidebar’).append(html);

var xhr = new XMLHttpRequest();
xhr.open(‘POST’, ‘/ajax_comments/register_update_site_user/’, true);
xhr.onload = serve as () {
if (xhr.standing === 200)

var end result = JSON.parse(xhr.responseText);
$(‘#wcs-overlay-sidebar’).to find(‘.wcs-loading-animation-overlay’).take away();
if(end result[‘success’] == “true”)
//do modal
// alert(“do modal shut”);
//alert(“Some luck message will show in some location”);
$(‘.wcs-profile-settings-edit-message’).html(“

Your settings have up to date effectively!]]>

“);

else
//alert(“failure: ” + );
var setError = serve as(errorName)
if(end result[‘errors’][errorName])
$(‘.wcs-settings-form-err-‘ + errorName).html(end result[‘errors’][errorName]);

else
$(‘.wcs-settings-form-err-‘ + errorName).html(“”);

;

setError(‘full-name’);
setError(‘electronic mail’);
setError(‘username’);
setError(‘password’);
setError(‘social-username’);
setError(‘dob’);
setError(‘gender’);
setError(‘zipcode’);
setError(‘carrier’);
setError(‘other-provider’);
//setError(‘terms-of-service’);
setError(‘captcha’);
if(end result[‘errors’][‘msg’])
alert(end result[‘errors’][‘msg’]);

else

alert(‘An error passed off!’);

};

xhr.ship(formData);
});

};

WCS.force_action = serve as(theAction, skipQuestion){
if(theAction == ‘accept_terms’){
var res = false;
if(!skipQuestion)
WCS.showModal(“You haven’t finished registration. Do you need to finish registration to accomplish this motion?”, “Sure”,
serve as(doit)

if(!doit)
go back false;

WCS.loadSidebarTemplate(‘sign up’, true);
WCS.setupProfileForm(‘sign up’, true);
$.ajax(
url: ‘/ajax_comments/get_user_private_profile’,
records:
personal: ‘true’
,
kind: ‘POST’,
dataType: ‘json’,
luck: serve as(resp)

var person = resp[‘user’];
person[‘newsletter_signup’] = 1;
WCS.fillSettingsData(person);

);
);
else
//it will have to be social registration… as a result of you’ll’t be logged in in a different way
WCS.loadSidebarTemplate(‘sign up’, true);
WCS.setupProfileForm(‘sign up’, true);
$.ajax(
url: ‘/ajax_comments/get_user_private_profile’,
records:
personal: ‘true’
,
kind: ‘POST’,
dataType: ‘json’,
luck: serve as(resp)

var person = resp[‘user’];
person[‘newsletter_signup’] = 1;
WCS.fillSettingsData(person);

);

}
else if(theAction == ‘confirm_email’){
WCS.showModal(“You haven’t showed your electronic mail. Do you need to resend the registration electronic mail?”, “Sure”, serve as(doit)

if(doit)
$.ajax(
url: ‘/ajax_comments/resend_registration_email’,
records:
ship: 1
,
kind: ‘POST’,
dataType: ‘json’,
luck: serve as(resp)

,
error: serve as(reaction)

);

);
}
};

WCS.fillSettingsData = serve as(person) person[‘service’] == ‘fb’ ;

WCS.showModal = serve as(msg, buttonText, callback)

$(‘#wcs-overlay-modal’).addClass(‘wcs-overlay-open’);

$(‘.wcs-modal-innertext’).html(msg);
$(‘.wcs-modal-btns-cancel’).off(‘click on’);
$(‘.wcs-modal-btns-cancel’).on(‘click on’, serve as()
callback(false);
$(‘#wcs-overlay-modal’).removeClass(‘wcs-overlay-open’);
WCS.MODAL_OPEN = false;
);

$(‘.wcs-modal-btns-submit’).html(buttonText);
$(‘.wcs-modal-btns-submit’).off(‘click on’);
$(‘.wcs-modal-btns-submit’).on(‘click on’, serve as()
callback(true);
$(‘#wcs-overlay-modal’).removeClass(‘wcs-overlay-open’);
WCS.MODAL_OPEN = false;
);
WCS.MODAL_CALLBACK = callback;
setTimeout(serve as()
WCS.MODAL_OPEN = true;
, 500);
;

WCS.setDeleted = serve as(commentId)
var $remark = $(‘#comment_’ + commentId);
var dateHtml = $remark.to find(‘.wcs-comment-item-date’).html();
$remark.to find(‘.wcs-comment-flag’).first().take away();
$remark.to find(‘.wcs-comment-item-header’).first().take away();
$remark.to find(‘.wcs-comment-item-text’).first().take away();
$remark.to find(‘.wcs-comment-item-footer’).first().take away();

var $deleteHeader = $($(‘#template_deleted_comment’).html()).to find(‘.wcs-comment-item-header’).unwrap();
var $deleteText = $($(‘#template_deleted_comment’).html()).to find(‘.wcs-comment-item-text-removed’).unwrap();
$remark.prepend($deleteText);
$remark.prepend($deleteHeader);
setTimeout(serve as()
$remark.to find(‘.wcs-comment-item-date’).html(dateHtml);
, 10);
;

WCS.checkNewComments = serve as(){
//console.log(“checking”);
$.ajax(
url: ‘/ajax_comments/get_new_comment_count’,
records:
max_id: WCS.MAX_ID,
thread_id: WCS.THREAD_ID
,
kind: ‘POST’,
dataType: ‘json’,
luck: serve as(records)

var newTotal = parseInt(records[‘new_total’]);
if(newTotal > 0)
//already up to date button
if(WCS.NEW_COMMENT_TOTAL == newTotal)
go back;

WCS.NEW_COMMENT_TOTAL = newTotal;
//alert(“has new feedback”);
$(‘.view-more-newcomment’).html(“Load ” + newTotal + ” new feedback “);
$(‘.view-more-newcomment’).display();

,
error: serve as(reaction)

console.log(reaction.responseText);
console.log(reaction);

);

};

WCS.loadNewComments = serve as(specificId, callback){
var requestUrl = ‘/ajax_comments/get_specific_topcomment’;
if(!specificId)
requestUrl = ‘/ajax_comments/get_new_comments’;

$.ajax({
url: requestUrl,
records:
max_id: WCS.MAX_ID,
thread_id: WCS.THREAD_ID,
comment_id : specificId
,
kind: ‘POST’,
dataType: ‘json’,
luck: serve as(records)
{
var general = parseInt(records[‘new_total’]);
if(general > 0)
if(records[‘new_max’] > 0)
WCS.MAX_ID = parseInt(records[‘new_max’]);
WCS.NEW_COMMENT_TOTAL = 0;

var topComments = records[‘topcomments’];
var subComments = records[‘subcomments’];

$(topComments).every(serve as(i, resp)” + resp[‘display_name’] + ”
);
setTimeout(serve as()

$(subComments).every(serve as(i, resp)
console.log(“including kid “);
console.log(resp);
var $remark = $($(‘#template_acomment’).html());

$remark.to find(‘.wcs-user-trigger img’).attr(‘src’, resp[‘profile_image’]);
$remark.to find(‘.wcs-user-trigger’).attr(‘data-userid’, resp[‘user_id’]);

$remark.to find(‘.wcs-other-user’).attr(‘data-userid’, resp[‘parent_userid’]);
$remark.attr(‘data-replyinfo’, resp[‘parent_id’] + “else
$remark.to find(‘.wcs-comment-item-text’).html(resp[‘generated_comment’]);

if(WCS.USER_ID != resp[‘user_id’])
$remark.to find(‘.wcs-delete-trigger’).attr(‘taste’, ‘show:none’);

if(resp.parent_id == 0)
$remark.to find(‘.wcs-other-user’).take away();
$remark.to find(‘.wcs-comment-item-username i’).take away();
else
$remark.to find(‘.wcs-other-user’).attr(‘data-userid’, resp.parent_userid);
$remark.to find(‘.wcs-other-user’).html(resp.parent_username);

var totalText = “”;
if(resp[‘upvotes’] > 0)
totalText = ” (” + resp[‘upvotes’] + ‘)’;

var html = “”;
if(resp[‘upvoted’])
html = ‘‘ + ” Not like” + totalText;
$remark.to find(‘.wcs-like-trigger’).addClass(‘wcs-like-btn-active’);
else
html = ‘‘ + ” Like” + totalText;

$remark.to find(‘.wcs-like-trigger’).html(html);
$remark.attr(‘data-id’, resp[‘id’]);
$remark.attr(‘identity’, “comment_” + resp[‘id’]);
$(‘.wcs-comment-container’).append($remark);

);
setTimeout(serve as()

$(records).every(serve as(i, parentComment)

if(parentComment[‘has_more’])
var moreHtml = ”;
var $container = $(‘#comment_’ + parentComment[‘id’]);
$container.to find(‘.wcs-reply-container’).prior to(moreHtml);

console.log(“guardian remark ” + parentComment[‘id’]);
console.log(“has kids ” + parentComment[‘children’].period);
$(parentComment[‘children’]).every(serve as(i, resp)” + resp[‘parent_id’]);
$remark.attr(‘data-isadmin’, resp[‘is_admin’]);

$remark.to find(‘.wcs-other-user’).html(resp[‘parent_username’]);
$remark.to find(‘.wcs-user-displayname’).html(resp[‘display_name’]);
$remark.to find(‘.wcs-comment-item-date’).html(resp[‘timeago’]);
$remark.to find(‘.wcs-comment-item-text’).html(resp[‘generated_comment’]);
var totalText = “”;
if(resp[‘upvotes’] > 0)
totalText = ” (” + resp[‘upvotes’] + ‘)’;

var html = “”;
if(resp[‘upvoted’])
html = ‘‘ + ” Not like” + totalText;
$remark.to find(‘.wcs-like-trigger’).addClass(‘wcs-like-btn-active’);
else
html = ‘‘ + ” Like” + totalText;

$remark.to find(‘.wcs-like-trigger’).html(html);

$remark.attr(‘data-id’, resp[‘id’]);
$remark.attr(‘identity’, “comment_” + resp[‘id’]);
if(WCS.USER_ID != resp[‘user_id’])
$remark.to find(‘.wcs-delete-trigger’).attr(‘taste’, ‘show:none’);

$remark.addClass(‘wcs-comment-item-reply’);
var $container = $(‘#comment_’ + resp[‘ancestor_id’]);
//alert(“including kid to ” + ‘#comment_’ + resp[‘parent_id’]);
$container.to find(‘.wcs-reply-container’).prior to($remark);
);
);
, 500);

if(hasMore && commentsLeft > 0)
if(hasExtraMore)
var textual content = “Load extra feedback “; //”Load subsequent 10 out of ” + commentsLeft + ” feedback left “;
$(‘.view-more-topcomment’).html(textual content);
$(‘.view-more-topcomment’).display();
else
var textual content = “Load extra feedback “; //”Load subsequent ” + commentsLeft + ” feedback”;
$(‘.view-more-topcomment’).html(textual content);
$(‘.view-more-topcomment’).display();

else
//conceal button utterly
$(‘.view-more-topcomment’).conceal();

}, error : serve as(records)

});

};

WCS.resetFormElement = serve as(e)
e.wrap(”).closest(‘sort’).get(0).reset();
e.unwrap();

// Save you sort submission
;

String.prototype.replaceAll = serve as(str1, str2, forget about)

go back this.change(new RegExp(str1.change(/([/,!^$[]().*+?;

serve as load_providers(exactText)
{
$(“#carrier”).val(exactText);
//var zipcode = $(“#zipcode”).val(exactText)
/*
var selbox = $(“#carrier”);
//$(‘#dk_container_channel’).take away();

if(zipcode.period > 4){
provider_status(“Looking suppliers…”);

$.ajax({
url:’/ajax_comments/zipsearch/’,
records:zipcode:zipcode,
dataType:’json’,
kind:’POST’,
luck:serve as(records){
var locators = records.channels;
var rely = records.rely;
console.log(locators);
var formData = ”;
var val;
if(rely){
provider_status(“”);
if(” != ‘carrier no longer indexed’)
$(“#provider_input”).fadeOut();

selbox.empty();
selbox.append(‘– Make a selection from this record –‘);
$(“#provider_input_select”).fadeIn();

if(exactText)
exactText = exactText.replaceAll(” “,”_”).replaceAll(‘/’,”).replaceAll(‘/’,”);
exactText = exactText.replaceAll(” “, ”).replaceAll(‘_’, ”);
exactText = exactText.change(/(?:rnelse
exactText = “”;

$.every(locators,serve as(index,channels)
if(index)
var key = index.replaceAll(” “,”_”).replaceAll(‘/’,”);
key = key.change(” “, ”);
key = key.change(/(?:rn
);

if(exactText == ‘carrier no longer indexed’)
selbox.append(‘Supplier no longer indexed’);
else
selbox.append(‘Supplier no longer indexed’);

} else
provider_status(“”);
selbox.empty();
selbox.append(”);
if(exactText == ‘carrier no longer indexed’)
selbox.append(‘Supplier no longer indexed’);
else
selbox.append(‘Supplier no longer indexed’);

//selbox.dropkick(‘refresh’);
},
error:serve as(packet)

});
}
*/
}

serve as provider_status()

serve as loginSuccess(loggeduser, noParse, skipDialogs)

//wish to have
//identity, display_name, profile_image, terms_accepted, email_confirmed

var userData;
if(noParse)
userData = loggeduser;
else
userData = JSON.parse(loggeduser);

//console.log(“person records”);
//console.log(userData);
WCS.USER_ID = userData[‘id’];

//if simply registered mustn’t shut the sidebar
//may well be on login web page…
if(WCS.SIDEBAR_PAGE != ‘sign up’)
WCS.CLOSE_SIDEBAR();

$(‘.wcs-post-comment-header .wcs-user-displayname’).html(userData[‘display_name’]);
$(‘.wcs-post-comment-header .wcs-user-displayname’).records(‘userid’, WCS.USER_ID);
$(‘.wcs-post-comment-user-settings’).records(‘userid’, WCS.USER_ID);
$(‘.wcs-post-comment-header .wcs-avatar’).attr(‘src’, userData[‘profile_image’]);
$(‘.wcs-post-comment-header .wcs-avatar’).records(‘userid’, WCS.USER_ID);
$(‘.wcs-profile-header-user-avatar .wcs-avatar’).attr(‘src’, userData[‘profile_image’]);
$(‘.wcs-post-comment-login’).conceal();
$(‘.wcs-post-comment-header’).display();

//undergo every remark, turn on delete if person suits
$(‘.wcs-comment-item-reply’).every(serve as()’)[0];
//console.log(“remark userid ” + userId + ” vs ” + WCS.USER_ID);
if(WCS.USER_ID == userId)
//console.log(“activating delete for subcomment ” + this.identity);
$(this).to find(‘.wcs-delete-trigger’).display();

);
$(‘.wcs-comment-item-parent’).every(serve as()
var replyInfo = $(this).records(‘replyinfo’);
var userId = replyInfo.break up(‘);

//will have to conceal the opposite one
// $(‘.wcs-post-comment-header’).display();
$(‘.wcs-post-comment-header-loggedout’).conceal();

$(‘.wcs-post-comment-logged-in-btns’).display();

WCS.termsAccepted = userData[‘terms_accepted’];
WCS.emailConfirmed = userData[’email_confirmed’];
if(!skipDialogs)
if(WCS.termsAccepted == 0)
WCS.force_action(‘accept_terms’, true);
go back false;
else if(WCS.emailConfirmed == 0)
WCS.force_action(‘confirm_email’);
go back false;

;


var theAppId = “808704082583441”;
theAppId = “989981024397295”;

(serve as(d, s, identity)
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(identity)) go back;
js = d.createElement(s); js.identity = identity;
js.src = “http://attach.fb.web/en_US/sdk.js#xfbml=1&model=v2.8&appId=” + theAppId;
fjs.parentNode.insertBefore(js, fjs);
(report, ‘script’, ‘facebook-jssdk’));



Supply hyperlink

This site uses Akismet to reduce spam. Learn how your comment data is processed.