PageSourceSearch

https://southcentralbaptistnetwork.com/asset/ajax/blog.js?v=2.1

js southcentralbaptistnetwork.com collected 2026-09-30 13:59:46 UTC 41,304 bytes, 145 lines download raw bytes

1/*** Asset: asset/ajax/blog.js ***/
2
3var route;var fbwindow;var twitterwindow;var twitterloggedstatus;$(document).ready(function(){bind_paging();route=$('#route').val();$('.search-icon').click(function(){if($('.search-field').hasClass('active')){$('.search-field').toggleClass('active');$('.search-icon').toggleClass('active');$('.search-field').val('');refresh_list_blog();}else{$('.search-field').toggleClass('active');$('.search-field').focus();$('.search-icon').toggleClass('active');}});let previousSearchValue=$(".search-field").val();$(".search-field").keyup(function(event){const searchValue=$(".search-field").val().trim();if(previousSearchValue!==''&&searchValue===''){search_blog(searchValue);}
4if(event.keyCode===13){if(searchValue!=''){search_blog(searchValue);}}
5previousSearchValue=searchValue});if($('.EventTime').length>0){$('.EventTime').timepicker({minuteStep:5,showInputs:false,disableFocus:true});$('.datepicker').datepicker({autoclose:true,format:'mm/dd/yyyy'})}
6check_twitter_auth();check_facebook_auth_ss();});function refresh_list_blog(){if(typeof activeMenu=='undefined'){activeMenu=$("#menuID").val();}
7$.get('/'+route+'/ajax-load-list-blog/?id=&mnu='+activeMenu+'&searchText=&pseudoParam='+new Date().getTime(),function(data){$("#ContentListBlog").hide().html(data).fadeIn("slow");bind_paging();});}
8function search_blog(searchText){if(typeof activeMenu=='undefined'){activeMenu=$("#menuID").val();}
9$.get('/'+route+'/ajax-load-list-blog/?id=&mnu='+activeMenu+'&searchText='+searchText+'&pseudoParam='+new Date().getTime(),function(data){$("#ContentListBlog").hide().html(data).fadeIn("slow");$('.lazy').lazy({bind:"event"});});}
10function bind_paging(){$(".paginate_click").click(function(e){var clicked_id=$(this).attr("id").split("-");page_num=parseInt(clicked_id[0]);var next=(page_num+1)+'-page';var prev=(page_num-1)+'-page';if((page_num+1)<=$('#totalpage').val()){$('.next').prop('id',next);}
11if((page_num-1)>0){$('.prev').prop('id',prev);}
12$('.paginate_click').removeClass('active');var menuID=$('#menuID').val();$.post("/"+route+"/ajax-load-list-blog-page/?pseudoParam="+new Date().getTime()+"",{page:page_num,display:$('#displaypage').val(),keyword:'',mnuid:menuID},function(data){if(data.result=='success'){$('#ContentListBlog').hide().html(data.content).fadeIn('fast');$('.lazy').lazy({bind:"event"});if(page_num>=(data.ends-1)||page_num<=data.start){$('#pagingShow').html(data.paging);bind_paging();}}},"json");$(this).addClass('active');return false;});$('.lazy').lazy({bind:"event"});}
13async function approve_comment(id){const captchaResult=await verify_google_reCAPTCHA();if(!captchaResult){reCaptchaErrorAlert();return false;}else{console.log("reCAPTCHA Verification Success.");}
14$.post('/'+route+'/ajax-approved-comment/?pseudoParam='+new Date().getTime()+"",{pk:id},function(data){if(data.result=='success'){$('#RowComment'+id).removeClass('awaiting-moderation');$('#btnApprove'+id).remove();}},"json");return false;}
15function show_delete_comment(id){$('#genAsk').html('Are you sure you want to delete this item?');$('#genPK').val(id);$('#genAct').val('RemoveBlogComment');$('#genOk').unbind();$('#genOk').click(function(e){e.preventDefault();delete_comment(id);});$('#generalRemove').modal('show');return false;}
16function delete_comment(id){$.post('/'+route+'/ajax-remove-comment/?pseudoParam='+new Date().getTime()+"",{pk:id},function(data){if(data.result=='success'){$('#RowComment'+id).remove();}},"json");return false;}
17function delete_blog(id){$.post('/'+route+'/ajax-remove-blog/?pseudoParam='+new Date().getTime()+"",{pk:id},function(data){if(data.result=='success'){$('#rowBlog'+id).remove();footerLastBlog('blogDelete');}},"json");return false;}
18function redirecttodetailblog(url){window.location=url;return false;}
19function show_delete_blog(id){$('#genAsk').html('Are you sure you want to delete this item?');$('#genPK').val(id);$('#genAct').val('RemoveBlog');$('#genOk').unbind();$('#genOk').click(function(e){e.preventDefault();delete_blog(id);});$('#generalRemove').modal('show');return false;}
20async function post_comment_form(){if(validate_form_comment()){$('#btnPostComment').attr('disabled',true);$('#btnPostComment').html('Sending...')
21const captchaResult=await verify_google_reCAPTCHA();if(!captchaResult){reCaptchaErrorAlert();return false;}else{console.log("reCAPTCHA Verification Success.");}
22$.post('/'+route+'/ajax-add-new-comment/?pseudoParam='+new Date().getTime()+"",$('#frmaddComment').serialize(),function(data){if(data.result=='success'){$('#btnPostComment').html('Post Comment');$('#btnPostComment').attr('disabled',false);cancel_add_comment_form();
22$('#NotifText').html('Thank you for your comment. Your comment has been received and is awaiting moderation.');$('#NotificationModal').modal('show');}},"json");}
23return false;}
24function validate_form_comment(){pass=true;if($('#BlogComment').val()==''){pass=false;$('#grpBlogComment').addClass('has-error');}else{$('#grpBlogComment').removeClass('has-error');}
25if(pass==false){$('#ModalFormValidation').modal('show');}
26return pass;}
27function cancel_add_comment_form(){$('#CommentName').val('');$('#BlogComment').val('');$('#addComment').collapse('hide');}
28function show_add_comment_form(){$('#addComment').collapse('show');}
29function show_form_blog(id){ActiveObj='frmBlog'+id+' #blogcontent';if(id==''){reset_blog_form(id);}else{$('#frmBlogText'+id).hide();}
30initial_custom_editor_toolbar('frmBlog'+id+' #blogcontent');$('#blogbgimageEdit').css('background','url()');$('#frmBlogShow'+id).collapse('show');}
31function reset_blog_form(id){if(!ActiveEditor[ActiveObj]){$('#frmBlog'+id+' #blogcontent').html('<p><br/></p>');}else{FroalaEditor('#frmBlog'+id+' #blogcontent').html.set('');}
32var _blogAuthor=$('#frmBlog'+id+' #BlogAuthor').data('value');$('#frmBlog'+id+' #BlogTitle').val('');$('#frmBlog'+id+' #BlogAuthor').val(_blogAuthor);$('#frmBlog'+id+' #allowcomment').prop('checked',true);}
33function cancel_show_form_blog(id,cancel){if(id!=''){$('#frmBlogText'+id).show();var _blogTitle=$('#frmBlog'+id+' #BlogTitle').data('value');var _blogAuthor=$('#frmBlog'+id+' #BlogAuthor').data('value');$('#frmBlog'+id+' #BlogTitle').val(_blogTitle);$('#frmBlog'+id+' #BlogAuthor').val(_blogAuthor);}else{$('#social-campaign-box'+id+' #fbformcontent  #mediasrcfb').val('');$('#social-campaign-box'+id+' #twformcontent  #mediasrctw').val('');if($('#social-campaign-box'+id+' .not-posted .post-image').length){$('#social-campaign-box'+id+' .not-posted .post-image').removeAttr("style");$('#frmBlog'+id+' #mediasrc').val('');}}
34if(id==''){$('#social-campaign-box'+id+' #frmsocialschedule').empty();}
35cancel_social_schedule(id);$('#social-campaign-box'+id+' #AddFBProfile').removeClass('selected');$('#social-campaign-box'+id+' #fbtab').addClass('hide');$('#social-campaign-box'+id+' #fbtab').removeClass('active');$('#social-campaign-box'+id+' #AddTWProfile').removeClass('selected');$('#social-campaign-box'+id+' #twtab').addClass('hide');$('#social-campaign-box'+id+' #twtab').removeClass('active');if(id==''){if($('#social-campaign-box'+id+' #NewPost').hasClass('collapse in')){open_social_header(id,'saveform');}else{$('#social-campaign-box'+id+' #NewPost').collapse('toggle');}
36$('#social-campaign-box'+id+' #SocialCampaign').collapse('hide');$('#social-campaign-box'+id+' #initial-campaign').removeClass("initiated-social");$('#social-campaign-box'+id+' text').removeClass("initiated-social");}else{$('#social-campaign-box'+id+' #NewPost').collapse('hide');$('#social-campaign-box'+id+' .btn-plus span').removeClass("ion-minus").addClass("ion-plus");}
37if(cancel){newupdate=CurrentContent['frmBlog'+id+' #blogcontent'];FroalaEditor('#frmBlog'+id+' #blogcontent').html.set(newupdate);}
38$('#frmBlogShow'+id).collapse('hide');$('#frmBlogShow'+id).closest('.editable-field').removeClass('editing');return false;}
39function cancel_show_form_blog_single(id,cancel){if(id!=''){if(FroalaEditor('#frmBlog'+id+' #blogcontent').codeView.isActive()){FroalaEditor('#frmBlog'+id+' #blogcontent').codeView.toggle();}
40var newupdate=FroalaEditor('#frmBlog'+id+' #blogcontent').html.get();if(cancel){newupdate=CurrentContent['frmBlog'+id+' #blogcontent'];FroalaEditor('#frmBlog'+id+' #blogcontent').html.set(newupdate);var _blogTitle=$('#frmBlog'+id+' #BlogTitle').data('value');var _blogAuthor=$('#frmBlog'+id+' #BlogAuthor').data('value');$('#frmBlog'+id+' #BlogTitle').val(_blogTitle);$('#frmBlog'+id+' #BlogAuthor').val(_blogAuthor);}else{CurrentContent['frmBlog'+id+' #blogcontent']=newupdate;$('#frmBlog'+id+' #BlogTitle').data('value',$('#frmBlog'+id+' #BlogTitle').val());$('#frmBlog'+id+' #BlogAuthor').data('value',$('#frmBlog'+id+' #BlogAuthor').val());}
41$('#blogcontenttext'+id).html(newupdate);$('#hdrtitle').html($('#BlogTitle').val());$('#authorby').html($('#BlogAuthor').val());$('#frmBlogText'+id).show();$('#frmBlogShow'+id).closest('.editable-field').removeClass('editing');}
42$('#frmBlogShow'+id).collapse('hide');}
43function validate_form_blog(id,act){if(typeof act!=='undefined'){return true;}
44pass=true;if($('#frmBlog'+id+' #BlogTitle').val()==''){pass=false;$('#frmBlog'+id+' #BlogTitle').addClass('has-error');$('#frmBlog'+id+' #grpBlogTitle').addClass('has-error');}else{$('#frmBlog'+id+' #BlogTitle').removeClass('has-error');$('#frmBlog'+id+' #grpBlogTitle').removeClass('has-error');}
45if(pass==false){$('#ModalFormValidation').modal('show');}
46return pass;}
47function load_list_blog(id){if(typeof activeMenu=='undefined'){activeMenu=$("#menuID").val();}
48$('#rowBlog'+id).load('/'+route+'/ajax-load-list-blog/?id='+id+'&mnu='+activeMenu+'&pseudoParam='+new Date().getTime()+' #rowBlog'+id+' > *',function(){scroll_to('rowBlog'+id);$('#rowBlog'+id).removeClass('editing');initial_js_things();initial_custom_editor_toolbar('frmBlog'+id+' #blogcontent',true);});}
49function add_list_blog(id){if(typeof activeMenu=='undefined'){activeMenu=$("#menuID").val();}
50$.get('/'+route+'/ajax-load-list-blog/?id='+id+'&mnu='+activeMenu+'&pseudoParam='+new Date().getTime(),function(data){$("#ContentListBlog").html(data).fadeIn("slow");initial_js_things();initial_custom_editor_toolbar('frmBlog'+id+' #blogcontent',true);});}
51async function save_form_blog_single(id){if(validate_form_blog(id)){$('#btnSaveBlog'+id).prop('disabled',true);if(FroalaEditor('#frmBlog'+id+' #blogcontent').codeView.isActive()){FroalaEditor('#frmBlog'+id+' #blogcontent').codeView.toggle();}
52var html=FroalaEditor('#frmBlog'+id+' #blogcontent').html.get();var param=$('#frmBlog'+id).serializeArray();param.push({"name":"blogcontent","value":html});const captchaResult=await verify_google_reCAPTCHA();if(!captchaResult){reCaptchaErrorAlert();return false;}else{console.log("reCAPTCHA Verification Success.");}
53$.post('/'+route+'/ajax-update-new-blog/?pseudoParam='+new Date().getTime()+"",param,function(data){if(data.result=='success'){$('#btnSaveBlog'+id).prop('disabled',false);
53if($('#BlogAuthor').val()==''){$('#frmBlog'+id+' #BlogAuthor').data('value',data.author);$('#BlogAuthor').val(data.author);}
54cancel_show_form_blog_single(id,false);window.history.pushState('',$('#frmBlog'+id+' #BlogTitle').val(),data.blogurl);footerLastBlog('blogUpdate');}},"json").fail(function(xhr,status,error){$('#GeneralNotificationModal #NotifText').html("We’re Sorry");$('#GeneralNotificationModal #NotifContent').html("Our system has detected that you are experiencing some connection problems. Your data did not save. Please check your connection and try again later.  If this issue persists, please contact your ISP.");$('#GeneralNotificationModal').modal('show');});}
55return false;}
56async function save_form_blog(id){if(validate_form_blog(id)){$('#btnSaveBlog'+id).prop('disabled',true);if(FroalaEditor('#frmBlog'+id+' #blogcontent').codeView.isActive()){FroalaEditor('#frmBlog'+id+' #blogcontent').codeView.toggle();}
57var html=FroalaEditor('#frmBlog'+id+' #blogcontent').html.get();var param=$("#social-campaign-box"+id+" #frmsocialschedule, #frmBlog"+id).serializeArray();param.push({"name":"route","value":$('#route').val()});param.push({"name":"blogcontent","value":html});const captchaResult=await verify_google_reCAPTCHA();if(!captchaResult){reCaptchaErrorAlert();return false;}else{console.log("reCAPTCHA Verification Success.");}
58$.post('/'+route+'/ajax-update-new-blog/?pseudoParam='+new Date().getTime()+"",param,function(data){if(data.result=='success'){$('#btnSaveBlog'+id).prop('disabled',false);if(id==''){cancel_show_form_blog(id,false);add_list_blog(data.pk);}else{load_list_blog(id);}
59footerLastBlog('blogUpdate');}}
59,"json").fail(function(xhr,status,error){$('#GeneralNotificationModal #NotifText').html("We’re Sorry");$('#GeneralNotificationModal #NotifContent').html("Our system has detected that you are experiencing some connection problems. Your data did not save. Please check your connection and try again later.  If this issue persists, please contact your ISP.");$('#GeneralNotificationModal').modal('show');});}
60return false;}
61function save_blog_image(id){let storageChecked=false;$('#addfileuploadModal').fileupload({url:'/aws/add-new-media/?pseudoParam=',dataType:'json',pasteZone:null,sequentialUploads:false,add:function(e,data){let totalSize=0;$.each(data.originalFiles,function(index,file){totalSize+=file.size;});const totalSizeMB=parseFloat(totalSize/1024/1024);let placeholder=$('.media-image-thumb.page-style.uploading.hide').first().clone().removeAttr('id').removeClass('hide').find('.fileupload').remove().end();if(active_media!=''){let container=$('#'+active_media);let uploadTile=container.find('.upload-tile').first();if(!uploadTile.length){uploadTile=container.find('.media-image-thumb:contains("Upload Image")').first();}
62uploadTile.after(placeholder);}
63data.context=placeholder;if(storageChecked){data.formData={};data.submit();}else{storageChecked=true;check_storage_limit(totalSizeMB,data);}},done:function(e,data){storageChecked=false;if(data.result.result=="failed"){var maxFilesize=(data.result.maxFilesize)?data.result.maxFilesize:5;
63$('#GeneralNotificationModal #NotifText').html("Maximum Filesize");$('#GeneralNotificationModal #NotifContent').html("The image you selected exceeds the maximum limit of "+
64maxFilesize+"MB. Please choose a smaller file size.");$('#GeneralNotificationModal').modal('show');if(data.context){data.context.remove();}
65return;}
66if(data.result.result=="success"){if(data.context){data.context.remove();}
67if(active_media!=''){let container=$('#'+active_media);let uploadTile=container.find('.upload-tile').first();if(!uploadTile.length){uploadTile=container.find('.media-image-thumb:contains("Upload Image")').first();}
68uploadTile.after(data.result.content);}}},progress:function(e,data){var progress=parseInt(data.loaded/data.total*100,10);if(data.context){let bar=data.context.find('.progress-bar');bar.css('width',progress+'%');bar.attr('aria-valuenow',progress);if(progress>=100){bar.removeClass('active progress-striped');}}}});$('#mediapk').val(id);}
69function choice_image(id){$("#media_doc").hide();$('#ImagesMedia #media_video').hide();save_blog_image('blogImg');frmID=id;active_srcPopup='';$('.SelectMedia').show();$('.SelectMediaContent').hide();$('#ImagesMedia').modal('show');return false;}
70function select_media_blog(id,newmedia){$('#blogbgimageEdit'+frmID).css('background','url('+newmedia+')');$('#blogbgimageEdit'+frmID).css('margin-top','0');$('#blogbgimageEdit'+frmID).css('background-size','cover');$('#blogbgimageEdit'+frmID).addClass('blog-item-bg');var mediasrc=newmedia;$('#frmBlog'+frmID+' #mediasrc').val(mediasrc);if($('#social-campaign-box'+frmID+' .not-posted .post-image').length){$('#social-campaign-box'+frmID+' .not-posted .post-image').css('background','url('+newmedia+')');$('#social-campaign-box'+frmID+' .not-posted .post-image').css('margin-top','0');$('#social-campaign-box'+frmID+' .not-posted .post-image').css('background-size','cover');$('#social-campaign-box'+frmID+' .not-posted .mediasrc').val(newmedia);}
71$('#ImagesMedia').modal('hide');}
72function save_event_image(id){let storageChecked=false;$('#addfileuploadModal').fileupload({url:'/aws/add-new-media/?pseudoParam=',dataType:'json',pasteZone:null,sequentialUploads:false,add:function(e,data){let totalSize=0;$.each(data.originalFiles,function(index,file){totalSize+=file.size;});const totalSizeMB=parseFloat(totalSize/1024/1024);let placeholder=$('.media-image-thumb.page-style.uploading.hide').first().clone().removeAttr('id').removeClass('hide').find('.fileupload').remove().end();if(active_media!=''){let container=$('#'+active_media);let uploadTile=container.find('.upload-tile').first();if(!uploadTile.length){uploadTile=container.find('.media-image-thumb:contains("Upload Image")').first();}
73uploadTile.after(placeholder);}
74data.context=placeholder;if(storageChecked){data.formData={};data.submit();}else{storageChecked=true;check_storage_limit(totalSizeMB,data);}},done:function(e,data){storageChecked=false;if(data.result.result=="failed"){var maxFilesize=(data.result.maxFilesize)?data.result.maxFilesize:5;
74$('#GeneralNotificationModal #NotifText').html("Maximum Filesize");$('#GeneralNotificationModal #NotifContent').html("The image you selected exceeds the maximum limit of "+
75maxFilesize+"MB. Please choose a smaller file size.");$('#GeneralNotificationModal').modal('show');if(data.context){data.context.remove();}
76return;}
77if(data.result.result=="success"){if(data.context){data.context.remove();}
78if(active_media!=''){let container=$('#'+active_media);let uploadTile=container.find('.upload-tile').first();if(!uploadTile.length){uploadTile=container.find('.media-image-thumb:contains("Upload Image")').first();}
79uploadTile.after(data.result.content);}}},progress:function(e,data){var progress=parseInt(data.loaded/data.total*100,10);if(data.context){let bar=data.context.find('.progress-bar');bar.css('width',progress+'%');bar.attr('aria-valuenow',progress);if(progress>=100){bar.removeClass('active progress-striped');}}}});$('#mediapk').val(id);}
80function choice_image_socialschedule(id,act,frmedit){$('#ImagesMedia #media_image a').trigger('click');$('#ImagesMedia #media_doc').hide();$('#ImagesMedia #media_video').hide();if(act=='fbsocialschedule'){save_event_image('socialscheduleImgFB');}else{save_event_image('socialscheduleImgTW');}
81if(typeof frmedit!='undefined'){id=id+' #'+frmedit;}
82frmID=id;active_srcPopup='';$('.SelectMedia').show();$('.SelectMediaContent').hide();$('#ImagesMedia').modal('show');return false;}
83function select_media_socialschedule(id,newmedia,act){var mediasrc=newmedia;if(act=='ssfb'){$('#social-campaign-box'+frmID+' #fbformcontent .post-image').css('background','url('+newmedia+')');$('#social-campaign-box'+frmID+' #fbformcontent .post-image').css('margin-top','0');$('#social-campaign-box'+frmID+' #fbformcontent .post-image').css('background-size','cover');$('#social-campaign-box'+frmID+' #fbformcontent #mediasrcfb').val(mediasrc);}else if(act=='sstw'){$('#social-campaign-box'+frmID+' #twformcontent .post-image').css('background','url('+newmedia+')');$('#social-campaign-box'+frmID+' #twformcontent .post-image').css('margin-top','0');$('#social-campaign-box'+frmID+' #twformcontent .post-image').css('background-size','cover');$('#social-campaign-box'+frmID+' #twformcontent #mediasrctw').val(mediasrc);}
84$('#ImagesMedia').modal('hide');}
85function fb_getAuth(frm){if($('#social-campaign-box'+frm+' #AddFBProfile').hasClass('selected')){$('#social-campaign-box'+frm+' #AddFBProfile').removeClass('selected');$('#social-campaign-box'+frm+' #fbtab').addClass('hide');$('#social-campaign-box'+frm+' #fbtab').removeClass('active');if(!$('#social-campaign-box'+frm+' #AddTWProfile').hasClass('selected')){$('#social-campaign-box'+frm+' #NewPostFormDetails').collapse('hide');}else{$('#social-campaign-box'+frm+' #fbtabcontent'+frm).removeClass('active in');$('#social-campaign-box'+frm+' #twittertabcontent'+frm).addClass('active in');$('#social-campaign-box'+frm+' #twittertab').addClass('active');}
86$('#social-campaign-box'+frm+' #fbactive').val('N');return;}
87var left=(screen.width/2)-(1024/2);var top=(screen.height/2)-(800/2);fbwindow=window.open('','facebooklogin',"menubar=no,toolbar=no,status=no,width=1024,height=800,toolbar=no,location=no,modal=1,left="+left+",top="+top);$.post('/ajax/get-fb-auth/?pseudoParam='+new Date().getTime()+"",{frmname:frm},function(data){if(data.result=='successToken'){if(!$('#social-campaign-box'+frm+' #AddFBProfile').hasClass('selected')){$('#social-campaign-box'+frm+' #AddFBProfile').addClass('selected');}
88$('#social-campaign-box'+frm+' #fbtab').removeClass('hide');if(!$('#social-campaign-box'+frm+' #AddTWProfile').hasClass('selected')){$('#social-campaign-box'+frm+' #fbtab').addClass('active');$('#social-campaign-box'+frm+' #fbtabcontent'+frm).addClass('active in');}
89if(!$('#social-campaign-box'+frm+' #AddTWProfile').hasClass('selected')){$('#social-campaign-box'+frm+' #twittertab').addClass('hide');$('#social-campaign-box'+frm+' #twittertabcontent'+frm).removeClass('active');}
90$('#social-campaign-box'+frm+' #NewPostFormDetails').collapse('show');$('#social-campaign-box'+frm+' #fbactive').val('Y');}else if(data.result='successAuth'){$('#social-campaign-box'+frm+' #AddFBProfile').removeClass('selected');fbwindow.location=data.urlauth;if(window.focus){fbwindow.focus()}}},"json");}
91function check_twitter_auth(){$.post('/ajax/check-twitter-auth/?pseudoParam='+new Date().getTime()+"",{},function(data){if(data.result=='successToken'){twitterloggedstatus='successToken';}else if(data.result='successAuth'){twitterloggedstatus='successAuth';}},"json");}
92function twitter_getAuth(frm){if($('#social-campaign-box'+frm+' #AddTWProfile').hasClass('selected')){$('#social-campaign-box'+frm+' #AddTWProfile').removeClass('selected');$('#social-campaign-box'+frm+' #twittertab').addClass('hide');$('#social-campaign-box'+frm+' #twittertab').removeClass('active');if(!$('#social-campaign-box'+frm+' #AddFBProfile').hasClass('selected')){$('#social-campaign-box'+frm+' #NewPostFormDetails').collapse('hide');}else{$('#social-campaign-box'+frm+' #twittertabcontent'+frm).removeClass('active in');$('#social-campaign-box'+frm+' #fbtabcontent'+frm).addClass('active in');$('#social-campaign-box'+frm+' #fbtab').addClass('active');}
93$('#social-campaign-box'+frm+' #twactive').val('N');return;}
94if(twitterloggedstatus=='successToken'){if(!$('#social-campaign-box'+frm+' #AddTWProfile').hasClass('selected')){$('#social-campaign-box'+frm+' #AddTWProfile').addClass('selected');}
95$('#social-campaign-box'+frm+' #twittertab').removeClass('hide');if(!$('#social-campaign-box'+frm+' #AddFBProfile').hasClass('selected')){$('#social-campaign-box'+frm+' #twittertab').addClass('active');$('#social-campaign-box'+frm+' #twittertabcontent'+frm).addClass('active in');}
96if(!$('#social-campaign-box'+frm+' #AddFBProfile').hasClass('selected')){$('#social-campaign-box'+frm+' #fbtab').addClass('hide');$('#social-campaign-box'+frm+' #fbtabcontent'+frm).removeClass('active');}
97$('#social-campaign-box'+frm+' #NewPostFormDetails').collapse('show');$('#social-campaign-box'+frm+' #twactive').val('Y');}else if(twitterloggedstatus=='successAuth'){var left=(screen.width/2)-(1024/2);var top=(screen.height/2)-(800/2);
97twitterwindow=window.open(maindomain+'/ajax/get-twitter-auth/?SID='+xid+'&frmname='+frm+'&from=','twitterlogin',"menubar=no,toolbar=no,status=no,width=1024,height=800,toolbar=no,location=no,left="+left+",top="+top);}}
98function sync_eventText_socialschedule(frmID,obj,act){if($('#social-campaign-box'+frmID+' .not-posted .post-preview-description').length){if(act=='title'){$('#social-campaign-box'+frmID+' .not-posted .post-preview-description h3').html($(obj).val());}else if(act=='desc'){var desc=FroalaEditor('#frmBlog'+frmID+' #blogcontent').html.get();$('#social-campaign-box'+frmID+' .not-posted .post-preview-description .ssdescShow').html(desc);$('#social-campaign-box'+frmID+' .not-posted .post-preview-description .ssdescShow').excerptize({numberOfCharacters:100,cutOffAtWord:true,tags:'',showMoreText:'',showLessText:''});}}}
99function sync_text_content(obj){}
100function cancel_edit_socialschedule(frm,frmedit,act){if(typeof frmedit!='undefined'){frm=frm+' #'+frmedit;}
101if(act=='save'){var monthNames=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];var postdate=$('#social-campaign-box'+frm+' #SocialPostDate').val();postdate=postdate.split("/");var postMonthIndex=postdate[0];postMonthIndex=postMonthIndex.replace("0","");postmonth=monthNames[postMonthIndex-1];$('#social-campaign-box'+frm+' .social-post-date date').html(postdate[1]);$('#social-campaign-box'+frm+' .social-post-date month').html(postmonth);$('#social-campaign-box'+frm+' #fbTextShow').html($('#social-campaign-box'+frm+' #fbText').val());$('#social-campaign-box'+frm+' #twTextShow').html($('#social-campaign-box'+frm+' #twText').val());imgmediafb=$('#social-campaign-box'+frm+' #mediasrcfb').val();imgmediatw=$('#social-campaign-box'+frm+' #mediasrctw').val();$('#social-campaign-box'+frm+' #ScheduledPostFB .post-image').css('background','url('+imgmediafb+')');$('#social-campaign-box'+frm+' #ScheduledPostFB .post-image').css('margin-top','0');$('#social-campaign-box'+frm+' #ScheduledPostFB .post-image').css('background-size','cover');$('#social-campaign-box'+frm+' #ScheduledPostTW .post-image').css('background','url('+imgmediatw+')');$('#social-campaign-box'+frm+' #ScheduledPostTW .post-image').css('margin-top','0');$('#social-campaign-box'+frm+' #ScheduledPostTW .post-image').css('background-size','cover');if($('#social-campaign-box'+frm+' #SocialPostType').length){if($('#social-campaign-box'+frm+' #SocialPostType').val()=='text'){$('#social-campaign-box'+frm+' #ScheduledPostFB .post-image').hide();$('#social-campaign-box'+frm+' #ScheduledPostTW .post-image').hide();$('#social-campaign-box'+frm+' #ScheduledPostFB .post-preview-description').hide();}else{if($('#social-campaign-box'+frm+' #SocialPostType').val()=='link'){$('#social-campaign-box'+frm+' #ScheduledPostFB .post-preview-description').show();}
102$('#social-campaign-box'+frm+' #ScheduledPostFB .post-image').show();$('#social-campaign-box'+frm+' #ScheduledPostTW .post-image').show();}}}else if(act=='cancel'){$('#social-campaign-box'+frm+' #fbText').val($('#social-campaign-box'+frm+' #fbTextShow').html());$('#social-campaign-box'+frm+' #twText').val($('#social-campaign-box'+frm+' #twTextShow').html());var cleanup=/\"|\'|\)/g;var imgmediafb=String($('#social-campaign-box'+frm+' #ScheduledPostFB .post-image').css('background-image'));imgmediafb=imgmediafb.replace('url("','');imgmediafb=imgmediafb.replace('")','');var imgmediatw=String($('#social-campaign-box'+frm+' #ScheduledPostTW .post-image').css('background-image'));imgmediatw=imgmediatw.replace('url("','');imgmediatw=imgmediatw.replace('")','');$('#social-campaign-box'+frm+' #fbformcontent .post-image').css('background',imgmediafb);$('#social-campaign-box'+frm+' #fbformcontent .post-image').css('margin-top','0');$('#social-campaign-box'+frm+' #fbformcontent .post-image').css('background-size','cover');$('#social-campaign-box'+frm+' #fbformcontent #mediasrcfb').val(imgmediafb);$('#social-campaign-box'+frm+' #twformcontent .post-image').css('background',imgmediatw);$('#social-campaign-box'+frm+' #twformcontent .post-image').css('margin-top','0');$('#social-campaign-box'+frm+' #twformcontent .post-image').css('background-size','cover');
102$('#social-campaign-box'+frm+' #twformcontent #mediasrctw').val(imgmediatw);}
103$('#social-campaign-box'+frm+' .EditPost').collapse('hide');$('#social-campaign-box'+frm+' .ScheduledPost').collapse('show');}
104function remove_socialschedule(frm,frmedit){if(typeof frmedit!='undefined'){frm=frm+' #'+frmedit;}
105$('#genAsk').html('Are you sure you want to delete this item?');$('#genPK').val(frm);$('#genAct').val('RemoveEvent');$('#genOk').unbind();$('#genOk').click(function(e){e.preventDefault();if($('#social-campaign-box'+frm+' #SSID').val()!=''){$.post('/'+route+'/ajax-remove-socialschedule/?pseudoParam='+new Date().getTime()+"",{ssid:$('#social-campaign-box'+frm+' #SSID').val()},function(data){$('#social-campaign-box'+frm).remove();},"json");}else{$('#social-campaign-box'+frm).remove();}});$('#generalRemove').modal('show');return false;}
106function edit_socialschedule(frm,frmedit){if(typeof frmedit!='undefined'){frm=frm+' #'+frmedit;}
107$('#social-campaign-box'+frm+' .EditPost').collapse('show');$('#social-campaign-box'+frm+' .ScheduledPost').collapse('hide');}
108function social_post_type(frm,frmedit){var orifrm=frm;if(typeof frmedit!='undefined'){frm=frm+' #'+frmedit;}
109if($('#social-campaign-box'+frm+' #SocialPostType').length){if($('#social-campaign-box'+frm+' #SocialPostType').val()=='text'){$('#social-campaign-box'+frm+'  .post-image').hide();$('#social-campaign-box'+frm+'  .post-image').addClass('hide');$('#social-campaign-box'+frm+'  .post-preview-description').hide();$('#social-campaign-box'+frm+'  .post-image').hide();$('#social-campaign-box'+frm+'  .post-image').addClass('hide');$('#social-campaign-box'+frm+' .post-image-btn').hide();}else if($('#social-campaign-box'+frm+' #SocialPostType').val()=='image'){$('#social-campaign-box'+frm+'  .post-image').show();$('#social-campaign-box'+frm+'  .post-image').removeClass('hide');$('#social-campaign-box'+frm+'  .post-preview-description').hide();$('#social-campaign-box'+frm+'  .post-image').show();$('#social-campaign-box'+frm+'  .post-image').removeClass('hide');$('#social-campaign-box'+frm+' .post-image-btn').show();}else if($('#social-campaign-box'+frm+' #SocialPostType').val()=='link'){$('#social-campaign-box'+frm+'  .post-image').show();$('#social-campaign-box'+frm+'  .post-image').removeClass('hide');$('#social-campaign-box'+frm+'  .post-preview-description').show();$('#social-campaign-box'+frm+'  .post-image').show();$('#social-campaign-box'+frm+'  .post-image').removeClass('hide');$('#social-campaign-box'+frm+' .post-image-btn').hide();if(!$('#frmBlog'+orifrm+' #mediasrc').length){orifrm=orifrm.replace('#frmaddsocialschedule','');}
110newmedia=$('#frmBlog'+orifrm+' #mediasrcSEO').val();if(newmedia!=''){$('#social-campaign-box'+frm+' .post-image').css('background','url('+newmedia+')');$('#social-campaign-box'+frm+' .post-image').css('margin-top','0');$('#social-campaign-box'+frm+' .post-image').css('background-size','cover');$('#social-campaign-box'+frm+' #twformcontent  #mediasrctw').val(newmedia);$('#social-campaign-box'+frm+' #fbformcontent  #mediasrcfb').val(newmedia);}}}}
111function add_social_schedule(frm){if($('#social-campaign-box'+frm+' #NewPost').hasClass('collapse in')){open_social_header(frm);}else{$('#social-campaign-box'+frm+' #NewPost').collapse('toggle');$('#social-campaign-box'+frm+' .btn-plus span').removeClass("ion-plus").addClass("ion-minus");}
112return false;}
113function open_social_header(frm,act){if(validate_form_blog(frm,act)){newmedia=$('#frmBlog'+frm+' #mediasrcSEO').val();if(newmedia!=''){$('#social-campaign-box'+frm+' .post-image').css('background','url('+newmedia+')');$('#social-campaign-box'+frm+' .post-image').css('margin-top','0');$('#social-campaign-box'+frm+' .post-image').css('background-size','cover');$('#social-campaign-box'+frm+' #twformcontent #mediasrctw').val(newmedia);$('#social-campaign-box'+frm+' #fbformcontent #mediasrcfb').val(newmedia);}
114if($('#social-campaign-box'+frm+' #SocialPostType').val()=='link'){titleevent=$('#frmBlog'+frm+' #BlogTitle').val();desc=FroalaEditor('#frmBlog'+frm+' #blogcontent').html.get();$('#social-campaign-box'+frm+' .post-image-btn').hide();$('#social-campaign-box'+frm+' .post-preview-description h3').html(titleevent);$('#social-campaign-box'+frm+' .post-preview-description .ssdescShow').html(desc);$('#social-campaign-box'+frm+' .post-preview-description .ssdescShow p').excerptize({numberOfCharacters:100,cutOffAtWord:true,tags:'',showMoreText:'',showLessText:''});$('#social-campaign-box'+frm+' #sstitle').val(titleevent);$('#social-campaign-box'+frm+' #ssdesc').val($('#social-campaign-box'+frm+' .post-preview-description .ssdescShow').html());}else{$('#social-campaign-box'+frm+' .post-image-btn').show();}
115if($('#social-campaign-box'+frm+' #SocialCampaign').hasClass('collapse in')){$('#social-campaign-box'+frm+' #SocialCampaign').collapse('hide');$('#social-campaign-box'+frm+' #initial-campaign').removeClass("initiated-social");$('#social-campaign-box'+frm+' text').removeClass("initiated-social");$('#social-campaign-box'+frm+' .btn-plus span').removeClass("ion-minus").addClass("ion-plus");}else{$('#social-campaign-box'+frm+' #SocialCampaign').collapse('show');$('#social-campaign-box'+frm+' #initial-campaign').addClass("initiated-social");$('#social-campaign-box'+frm+' text').addClass("initiated-social");$('#social-campaign-box'+frm+' .btn-plus span').removeClass("ion-plus").addClass("ion-minus");}}
116return false;}
117function cancel_social_schedule(frm){$('#social-campaign-box'+frm+' #NewPostFormDetails').collapse('hide');clear_social_schedule_form(frm);return false;}
118function clear_social_schedule_form(frm){$('#social-campaign-box'+frm+' #frmaddsocialschedule #SocialPostDate').val('');$('#social-campaign-box'+frm+' #frmaddsocialschedule #SocialPostTime').val('');$('#social-campaign-box'+frm+' #frmaddsocialschedule #SocialPostType').val('link');$('#social-campaign-box'+frm+' #frmaddsocialschedule #fbText').val('');$('#social-campaign-box'+frm+' #frmaddsocialschedule #twText').val('');}
119function validate_add_form_socialschedule(frm){err=true;imgexist=true;textexist=true;if($('#social-campaign-box'+frm+' #frmaddsocialschedule #SocialPostDate').val()==''){err=false;$('#social-campaign-box'+frm+' #frmaddsocialschedule #groupSocialPostDate').addClass('has-error');}else{$('#social-campaign-box'+frm+' #frmaddsocialschedule #groupSocialPostDate').removeClass('has-error');}
120if($('#social-campaign-box'+frm+' #frmaddsocialschedule #SocialPostTime').val()==''){err=false;$('#social-campaign-box'+frm+' #frmaddsocialschedule #groupSocialPostTime').addClass('has-error');}else{$('#social-campaign-box'+frm+' #frmaddsocialschedule #groupSocialPostTime').removeClass('has-error');}
121if($('#social-campaign-box'+frm+' #AddFBProfile').hasClass('selected')&&$('#social-campaign-box'+frm+' #SocialPostType').val()=='image'&&$('#social-campaign-box'+frm+' #fbformcontent  #mediasr
121cfb').val()==""){err=false;imgexist=false;}else if($('#social-campaign-box'+frm+' #AddTWProfile').hasClass('selected')&&$('#social-campaign-box'+frm+' #SocialPostType').val()=='image'&&$('#social-campaign-box'+frm+' #twformcontent  #mediasrctw').val()==""){err=false;imgexist=false;}
122if($('#social-campaign-box'+frm+' #AddFBProfile').hasClass('selected')&&$('#social-campaign-box'+frm+' #SocialPostType').val()=='text'&&$('#fbtabcontent'+frm+'  #fbText').val()==""){err=false;textexist=false;}else if($('#social-campaign-box'+frm+' #AddTWProfile').hasClass('selected')&&$('#social-campaign-box'+frm+' #SocialPostType').val()=='text'&&$('#twittertabcontent'+frm+'  #twText').val()==""){err=false;textexist=false;}
123if(err==false){if(imgexist==false){$('#GeneralNotificationModal #NotifText').html("Missing Image");$('#GeneralNotificationModal #NotifContent').html("Oops! Please select an image for your social media post!");$('#GeneralNotificationModal #NotifButton').html("OK!")
124$('#GeneralNotificationModal').modal('show');}else if(textexist==false){$('#GeneralN
124otificationModal #NotifText').html("Missing Text");$('#GeneralNotificationModal #NotifContent').html("Oops! Please input the text for your social media post!");$('#GeneralNotificationModal #NotifButton').html("OK!")
125$('#GeneralNotificationModal').modal('show');}else{$('#ModalFormValidation').modal('show');}}
126return err;}
127function initial_js_things(){if($('.EventTime').length>0){$('.EventTime').timepicker({minuteStep:5,showInputs:false,disableFocus:true});}
128$('.datepicker').datepicker({autoclose:true,format:'mm/dd/yyyy'})
129$('.lazy').lazy({bind:"event"});return false;}
130function save_schedule_post(frm){if(validate_add_form_socialschedule(frm)){var param=$('#social-campaign-box'+frm+' #frmaddsocialschedule').serializeArray();param.push({"name":"addtempSS","value":'#social-campaign-box'+frm});activeMenu=$('#social-campaign-box'+frm+' #menuID').val();$.post('/'+route+'/ajax-add-temporary-socialschedule/?pseudoParam='+new Date().getTime()+"",param,function(data){$('#social-campaign-box'+frm+' #frmsocialschedule').append(data);$('#social-campaign-box'+frm+' .ScheduledPost').collapse('show');initial_js_things();});$('#social-campaign-box'+frm+' #NewPost').collapse('hide');clear_social_schedule_form(frm);}}
131function fb_login_ss(frm){if($('#social-campaign-box'+frm+' #AddFBProfile').hasClass('selected')){$('#social-campaign-box'+frm+' #AddFBProfile').removeClass('selected');$('#social-campaign-box'+frm+' #fbtab').addClass('hide');$('#social-campaign-box'+frm+' #fbtab').removeClass('active');if(!$('#social-campaign-box'+frm+' #AddTWProfile').hasClass('selected')){$('#social-campaign-box'+frm+' #NewPostFormDetails').collapse('hide');}else{$('#social-campaign-box'+frm+' #fbtabcontent'+frm).removeClass('active in');$('#social-campaign-box'+frm+' #twittertabcontent'+frm).addClass('active in');$('#social-campaign-box'+frm+' #twittertab').addClass('active');}
132$('#social-campaign-box'+frm+' #fbactive').val('N');return;}
133if(fbloggedStatus==='connected'){if(!$('#social-campaign-box'+frm+' #AddFBProfile').hasClass('selected')){$('#social-campaign-box'+frm+' #AddFBProfile').addClass('selected');}
134$('#social-campaign-box'+frm+' #fbtab').removeClass('hide');$('#social-campaign-box'+frm+' #fbtab').removeClass('active');if(!$('#social-campaign-box'+frm+' #AddTWProfile').hasClass('selected')){$('#social-campaign-box'+frm+' #fbtab').addClass('active');$('#social-campaign-box'+frm+' #fbtabcontent'+frm).addClass('active in');}
135if(!$('#social-campaign-box'+frm+' #AddTWProfile').hasClass('selected')){$('#social-campaign-box'+frm+' #twittertab').addClass('hide');$('#social-campaign-box'+frm+' #twittertabcontent').removeClass('active');}
136$('#social-campaign-box'+frm+' #NewPostFormDetails').collapse('show');$('#social-campaign-box'+frm+' #fbactive').val('Y');}else if(fbloggedStatus=='connectedFBauth'){$('#social-campaign-box'+frm+' #AddFBProfile').removeClass('selected');var left=(screen.width/2)-(1200/2);var top=(screen.height/2)-(800/2);var fbwindow=window.open(maindomain+'/ajax/fb-pop-permission/?SID='+xid+'&frmname='+frm+'&module=general','facebooklogin',"menubar=no,toolbar=no,status=no,width=1024,height=800,toolbar=no,location=no,modal=1,left="+left+",top="+top);}}
137function set_socialschedule_tw(accessToken,secretToken,user_id,screename,img_profile,frm){$.post('/ajax/set-socialschedule-tw-auth/?pseudoParam='+new Date().getTime()+"",{accToken:accessToken,scToken:secretToken,userid:user_id,scrnname:screename,imgprofile:img_profile,frmname:frm},function(data){if(data.result=='success'){frmname=data.frmname;if(!$('#social-campaign-box'+frmname+' #AddTWProfile').hasClass('selected')){$('#social-campaign-box'+frmname+' #AddTWProfile').addClass('selected');}
138$('#social-campaign-box'+frmname+' #twittertab').removeClass('hide');if(!$('#social-campaign-box'+frmname+' #AddFBProfile').hasClass('selected')){$('#social-campaign-box'+frmname+' #twittertab').addClass('active');$('#social-campaign-box'+frmname+' #twittertabcontent'+frmname).addClass('active in');}
139if(!$('#social-campaign-box'+frmname+' #AddFBProfile').hasClass('selected')){$('#social-campaign-box'+frmname+' #fbtab').addClass('hide');$('#social-campaign-box'+frmname+' #fbtab').removeClass('active');}
140$('#social-campaign-box'+frmname+' #NewPostFormDetails').collapse('show');$('.twimgprofile').css('background-image','url('+img_profile+')');$('.twname').html(screename);$('#social-campaign-box'+frmname+' #twactive').val('Y');$('#social-campaign-box'+frmname+' #twname').val(screename);$('#social-campaign-box'+frmname+' #photourltw').val(img_profile);}},"json");}
141function set_socialschedule_auth(accessToken,pid,pemail,pfname,plname,pname,photo,frm,posttype,grpid){$.post('/ajax/set-socialschedule-auth/?pseudoParam='+new Date().getTime()+"",{accToken:accessToken,id:pid,email:pemail,fname:pfname,lname:plname,name:pname,pic:photo,frmname:frm,fbposttype:posttype,groupid:grpid},function(data){if(data.result=='success'){frmname=data.frmname;if(!$('#social-campaign-box'+frmname+' #AddFBProfile').hasClass('selected')){$('#social-campaign-box'+frmname+' #AddFBProfile').addClass('selected');}
142$('#social-campaign-box'+frmname+' #fbtab').removeClass('hide');if(!$('#social-campaign-box'+frmname+' #AddTWProfile').hasClass('selected')){$('#social-campaign-box'+frmname+' #fbtab').addClass('active');$('#social-campaign-box'+frmname+' #fbtabcontent'+frmname).addClass('active in');}
143if(!$('#social-campaign-box'+frmname+' #AddTWProfile').hasClass('selected')){$('#social-campaign-box'+frmname+' #twittertab').addClass('hide');$('#social-campaign-box'+frmname+' #twittertab').removeClass('active');}
144$('#social-campaign-box'+frmname+' #NewPostFormDetails').collapse('show');$('.fbimgprofile').css('background-image','url('+photo+')');$('.fbname').html(pname);$('#social-campaign-box'+frmname+' #fbactive').val('Y');$('#social-campaign-box'+frmname+' #fbname').val(pname);$('#social-campaign-box'+frmname+' #photourlfb').val(photo);}},"json");}
145$('#ImagesMedia').on('hidden.bs.modal',function(){$("#media_doc").show();});

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.