// turns off sharing links when editing
function editCurrent(url) {
window.location.href = url;
}
function deleteBlogEntry(blogid, blogentid, msgid) {
var link = '/aspx/blob2/admin/blogs/blogsdeleteBlogEntry.aspx?blogid=' + blogid + '&blogentid=' + blogentid + '&msgid=' + msgid;
location.href = link;
return;
}
function deleteBlog1Entry(blogid, blog1blogid, blogentid, msgid) {
var link = '/aspx/blob2/admin/blogs/blogsdeleteBlogEntry.aspx?provider=blog1&blogid=' + blogid + '&blog1blogid=' + blog1blogid + '&blogentid=' + blogentid + '&msgid=' + msgid;
location.href = link;
return;
}
function deleteBlogComment(blogid, blogcommentid) {
var result = confirm("Are you sure you want to delete this blog entry comment?");
if (result) {
$('#ctl21_ctl02_ctl00_hf_FormAction').attr("value", "DELCOM|" + blogid + "|" + blogcommentid);
doAsyncPostback();
}
return result;
}
function scrollToAnchor(aid) {
var aTag = $(aid);
$('html,body').stop().animate({ scrollTop: aTag.offset().top - 100 }, 2500, 'easeInOutExpo');
}
$(document).ready(function () {
$(window).resize();
var commentid = 0;
var blogentryid = '0';
if (blogentryid.length > 1) {
$('#liEditArticle').fadeIn('fast', function () {
$('#liRemoveArticle').fadeIn('fast');
});
if ('8cb24695-3bf9-42f4-97a2-dffb3ac4423a' != '') {
setTimeout(function () {
getArticleViews();
}, 10);
}
}
else if ('8cb24695-3bf9-42f4-97a2-dffb3ac4423a' != '') {
setTimeout(function () {
getArticleViews();
}, 10);
}
else {
//do nothing
}
setTimeout(function () {
if ($('#disqus_comments_script_wrapper').length > 0) {
$('body').append($('#disqus_comments_script_wrapper'));
}
}, 12);
//var blogEntryDetail = $('#blog-entry-detail').length;
//if (blogEntryDetail == 1) {
// // we are showing an article
// $('.blog-button-wrapper').show();
// //$('.blog-button-wrapper').css('display','block');
// $('a.btn-blog-action[data-target="edit"]').parent().show();
// $('a.btn-blog-action[data-target="remove"]').parent().show();
//}
//else {
// $('.blog-button-wrapper').show();
// //$('.blog-button-wrapper').css('display','block');
// $('a.btn-blog-action[data-target="edit"]').parents().closest('li').hide();
// $('a.btn-blog-action[data-target="remove"]').parents().closest('li').hide();
// alert('noshow');
//}
//var bview = getCurrentView();
//setTimeout(function () {
// switch (bview) {
// case "article": {
// $('.blog-button-wrapper').show();
// //$('.blog-button-wrapper').css('display','block');
// $('a.btn-blog-action[data-target="edit"]').parents().closest('li').show();
// $('a.btn-blog-action[data-target="remove"]').parents().closest('li').show();
// break;
// }
// default: {
// $('.blog-button-wrapper').show();
// //$('.blog-button-wrapper').css('display','block');
// $('a.btn-blog-action[data-target="edit"]').parents().closest('li').hide();
// $('a.btn-blog-action[data-target="remove"]').parents().closest('li').hide();
// }
// }
//}, 1000);
});// end doc.ready
$(window).resize(function () {
//setPageLayout();
setTimeout(function () {
// blog1 snippet...
if ($('body').find('#summary-masonry').length > 0) {
// this was a jquery method thats been lost or deprecated
// from unify that created the masonry view. since we're
// transitioning from Bootstrap3 to Bootrap4 before we update
// unify to b4 version...hide the masonry view.
// no one was using it on live but us.
//gridBoxesOnDemand();
}
}, 200);
});
$('body').on('click', '.blog-action', function (e) {
var target = $(this).attr('data-target')
switch (target) {
case "add": {
disableBackground("body", false, 0, 0, 0, 0)
break;
}
case "edit": {
disableBackground("body", false, 0, 0, 0, 0)
break;
}
}
});
$('body').on('click', 'a.blog1-tag', function (e) {
e.preventDefault();
e.stopPropagation();
doTagLookup($(this).text().trim());
});
$('body').on('click', 'a.blog1-category', function (e) {
e.preventDefault();
e.stopPropagation();
doCatLookup($(this).text().trim());
});
function doCatLookup(inval) {
try {
$.ajax({
type: 'POST',
url: '/aspx/Blob2/Blobs/BlobWebService.aspx/GetCatUrl',
data: '{"originalid":"151812","category":' + JSON.stringify(inval) + '}',
contentType: 'application/json; charset=utf-8',
dataType: 'json',
async: false,
cache: false,
success: function (response) {
if (response.d.length > 0) {
window.location.assign(response.d);
}
else {
window.location.assign("/blog1/category/unknown");
}
},
failure: function (response) {
},
error: function (response) {
}
});
}
catch (err) {
}
}
function doTagLookup(inval) {
try {
$.ajax({
type: 'POST',
url: '/aspx/Blob2/Blobs/BlobWebService.aspx/GetTagUrl',
data: '{"originalid":"151812","tag":' + JSON.stringify(inval) + '}',
contentType: 'application/json; charset=utf-8',
dataType: 'json',
async: false,
cache: false,
success: function (response) {
if (response.d.length > 0) {
window.location.assign(response.d);
}
else {
window.location.assign("/blog1/tag/unknown");
}
},
failure: function (response) {
},
error: function (response) {
}
});
}
catch (err) {
}
}
$(function () {
if ($('#anchor_FBStatus').length >= 1) {
$('#anchor_FBStatus').popover();
$('#anchor_TWStatus').popover();
$('#anchor_FBStatus').click(function (e) {
$('.popover-title').append('
');
$(this).popover();
});
$('#anchor_TWStatus').click(function (e) {
$('.popover-title').append('
');
$(this).popover();
});
$(document).click(function (e) {
if (e.target.id == "popovercloseid1") {
$('#anchor_FBStatus').popover('hide');
}
if (e.target.id == "popovercloseid2") {
$('#anchor_TWStatus').popover('hide');
}
});
}
});
function doAsyncPostback() {
//ff-bug #325 fix
setTimeout(function () {
__doPostBack("ctl21$ctl02$ctl00$lb_Async", "");
}, 1);
}
function getTempKey() {
return 'ee6933ca-806d-41b5-8cbb-40f39cb60c2e';
}
function getTalkspotBlogId() {
return 97341;
}
function doAddArticle() {
//ff-bug #325 fix
setTimeout(function () {
__doPostBack("ctl21$ctl02$ctl00$btnAddArticle", "");
}, 1);
}
function doEditArticle() {
//ff-bug #325 fix
setTimeout(function () {
__doPostBack("ctl21$ctl02$ctl00$btnEditArticle", "");
}, 1);
}
function doRemoveArticle() {
$("#ctl21_ctl02_ctl00_btnDeleteArticle").click();
}
function getCurrentView() {
return $('#ctl21_ctl02_ctl00_hf_FormAction').val();
}
var backgroundPage = '1';
var backgroundList = [['1','/uploads/151812/pagetemplates/DesignCreated201804201345/images/9af33d01-1273-405e-a4c0-957a92d8fb00.jpg'],['2','/uploads/151812/pagetemplates/DesignCreated201804201345/images/ecaa285c-7f48-44df-8c40-098faa7e97bc.jpg'],['3','/uploads/151812/pagetemplates/DesignCreated201804201345/images/531b46d5-5583-4034-b0d5-09b256668dfd.jpg'],['4','/uploads/151812/pagetemplates/DesignCreated201804201345/images/ead218e8-c362-4071-898d-db9838e932cb.jpg'],['5','/uploads/151812/pagetemplates/DesignCreated201804201345/images/7d9f6f3c-5aa6-4098-8658-efce196132e3.jpg'],['6','/uploads/151812/pagetemplates/DesignCreated201804201345/images/006b271e-2777-4924-972c-68713a7a62c9.jpg']];
$(document).ready(function () {
App.init();
for (var i = 0; i < backgroundList.length; i++) {
if (backgroundList[i][0] == backgroundPage) {
$('#ts-background').css('background-image', 'url(' + backgroundList[i][1] + ')');
$('#ts-background').css('background-size', 'cover');
$('#ts-background').css('position', 'fixed');
$('#ts-background').css('height', '100%');
$('#ts-background').css('width', '100%');
$('#ts-background').css('z-index', '-100');
}
}
});