function removeEdit(oid)
if (oid)
var cont = jQuery("#BlogComments-comment-"+oid).closest(".brandNewComment" wink ;
cont.find(".newCommentOptions" wink .fadeOut("fast", function()
jQuery(this).remove();
);
function getComment(oid, commentLimit)
var url = "/Bleader/archives/2015/05/01/venerated-avant-garde-filmmaker-saul-levine-makes-a-rare-chicago-appearance-tomorrow";
var limitMsg = commentLimit?'':'';
if (oid)
var params =
ajaxComponent: componentId,
commentOid: oid
;
jQuery.ajax(
url: url,
data: (params),
success: function (data)
if (!jQuery.trim(jQuery("#"+componentId+"_commentContent" wink .html()))
jQuery("#"+componentId+"_commentContent" wink .append(limitMsg+data).find(".brandNewComment" wink .fadeIn("fast" wink ;
else
jQuery("#"+componentId+"_commentContent" wink .children("div.comment, div.brandNewComment, div.limitMsg" wink .filter(":last" wink .after(limitMsg+data).parent().find(".brandNewComment" wink .fadeIn("fast" wink ;
var t=setTimeout(function()removeEdit(oid),300000);
var myTotal = parseInt(jQuery("#comments_total" wink .text(), 10);
myTotal++;
updateCommentTotals(false,myTotal);
);
function doLikeComment(e)
e.preventDefault();
if (!this.clicked)
function reportComment(e)
e.preventDefault();
e.stopPropagation();
var oid = jQuery(this).attr("rel" wink ;
var elem = jQuery("#"+oid+"_report" wink ;
elem.click(function(e)e.stopPropagation() wink
if (!elem.is(":visible" wink )
jQuery("#BlogComments .reportCommentContainer" wink .hide();
if (elem.is(":empty" wink )
var params =
oid: oid,
ajaxComponent: "ReportComment"
;
jQuery.ajax(
url: "/gyrobase/Tools/ReportComment",
data: (params),
success: function (data)
elem.html(data);
elem.fadeIn("fast" wink ;
);
else
elem.fadeIn("fast" wink ;
// attach close event handler to the html
jQuery("html" wink .one("click", function()
jQuery("#BlogComments .reportCommentContainer:visible" wink .hide();
);
function closeReport(obj)
jQuery(obj).closest(".reportCommentContainer" wink .fadeOut("fast" wink ;
function submitReport(e)
var params = jQuery(e).closest("form" wink .serialize()+"ajaxComponent=ReportComment";
jQuery.ajax(
url: "/gyrobase/Tools/ReportComment",
type: "POST",
data: (params),
success: function (data)
jQuery(e).closest(".reportCommentContainer" wink .html(data);
);
(function($)
var subscribed=false;
function showFollowPanel(e)
e.preventDefault();
myPanel = $(this).parent().next(".togglePanel" wink ;
myPanel.fadeIn("fast" wink ;
function doSubscribe(obj)
var myPanel = obj.parent().next(".togglePanel" wink ;
myPanel.fadeIn("fast" wink ;
if (!subscribed)
var myLink = obj.parent();
var myLoader = myPanel.children(".loading" wink ;
var myUpdater = myPanel.children(".ajaxUpdater" wink ;
var params =
object: myPanel.attr("data-toolsoid" wink ,
macro: myPanel.attr("data-toolsajaxmacro" wink ,
url: [removed]
;
$.ajax(
url: "/gyrobase/Macros/ToolsAjax",
data: (params),
type: "POST",
dataType: "html",
success: function (data)
subscribed = true;
if (myUpdater)
myUpdater.html(data);
myLoader.fadeOut("fast", function()
myUpdater.fadeIn("fast", function()
setTimeout(function()
myPanel.fadeOut("fast" wink ;
, 3000);
);
);
else
myPanel.fadeOut("fast" wink ;
);
function activateSubscribe(e)
e.preventDefault();
var myObj = $(this);
var isAuthenticated = Foundation.SessionManager.sharedSessionManager().isAuthenticated();
if (!isAuthenticated)
new Foundation.Login.Dialog(
"feelingShy": false,
"callback": function()doSubscribe(myObj);
);
return false;
else
// Proceed
doSubscribe(myObj);
function deleteComment(e)
e.preventDefault();
var thisComment = $(this);
var params =
macro: "deleteComment",
comment: thisComment.attr("data-comment" wink
;
$.ajax(
url: "/gyrobase/Macros/ToolsAjax",
data: (params),
type: "POST",
dataType: "html",
success: function (data)
thisComment.closest(".brandNewComment" wink .fadeOut("fast", function()
$(this).remove();
var myTotal = parseInt(jQuery("#comments_total" wink .text(), 10);
myTotal--;
updateCommentTotals(false,myTotal);
);
);
function editComment(e)
e.preventDefault();
var thisComment = $(this);
var commentCont = thisComment.closest(".brandNewComment" wink .find(".description" wink ;
var commentTemp = thisComment.closest(".brandNewComment" wink .find(".commentTemp" wink ;
var commentText = commentTemp.html();
var toolbar = thisComment.closest(".brandNewComment" wink .find(".commentToolbar" wink ;
commentCont.next(".commentEditCont" wink .remove();
commentCont.after('');
toolbar.fadeOut("fast" wink ;
commentCont.fadeOut("fast", function()
commentCont.next(".commentEditCont" wink .fadeIn("fast", function()
$(".brandNewComment textarea.expandableBox" wink .autoBoxResize();
$(".brandNewComment textarea.expandableBox" wink .focus();
);
);
function editCommentSave(e)
e.preventDefault();
var thisComment = $(this);
var editCont = thisComment.closest(".commentEditCont" wink ;
var commentTemp = thisComment.closest(".brandNewComment" wink .find(".commentTemp" wink ;
var newText = thisComment.prevAll("textarea" wink .val();
var toolbar = thisComment.closest(".brandNewComment" wink .find(".commentToolbar" wink ;
var params =
macro: "editComment",
comment: thisComment.attr("data-comment" wink ,
commentText: newText
;
$.ajax(
url: "/gyrobase/Macros/ToolsAjax",
data: (params),
type: "POST",
success: function (data)
if (data.error)
$(".editErrorDisplay" wink .html(""+data.error+"" wink .fadeIn("fast" wink ;
else if (data.result)
editCont.fadeOut("fast", function()
$(".editErrorDisplay" wink .hide().html("" wink ;
editCont.prev(".description" wink .html($.trim(data.result));
commentTemp.html(newText);
editCont.prev(".description" wink .fadeIn("fast" wink ;
toolbar.fadeIn("fast" wink ;
);
);
function editCommentCancel(e)
e.preventDefault();
var editCont = $(this).closest(".commentEditCont" wink ;
var toolbar = $(this).closest(".brandNewComment" wink .find(".commentToolbar" wink ;
editCont.fadeOut("fast", function()
$(".editErrorDisplay" wink .hide().html("" wink ;
editCont.prev(".description" wink .fadeIn("fast" wink ;
toolbar.fadeIn("fast" wink ;
editCont.remove();
);
$("#BlogComments" wink .on('click', ".bottomOptionBar a#doSubscribe", activateSubscribe);
$("#BlogComments" wink .on('click', ".bottomOptionBar a.togglePanelClose", function()$(this).parent().fadeOut("fast" wink ; return false wink ;
$("#BlogComments" wink .on('click', ".brandNewComment a.commentDeleteLink", deleteComment);
$("#BlogComments" wink .on('click', ".brandNewComment a.commentEditLink", editComment);
$("#BlogComments" wink .on('click', ".brandNewComment a.doneEditLink", editCommentSave);
$("#BlogComments" wink .on('click', ".brandNewComment a.cancelEditLink", editCommentCancel);
)(jQuery);
jQuery(document).ready(function($)
$("#BlogComments" wink .on('click', '#showMoreComments,#showAllComments', getMoreComments);
$("#BlogComments #sortSelect" wink .change(getMoreComments);
getMoreComments();
new Foundation.PostCommentComponent(componentId);
var nc = Foundation.NotificationCenter.sharedNotificationCenter();
nc.observe("comment:added", function (e)
var comment = e.data;
getComment(comment.get("oid" wink );
// clear rating
if (jQuery(".commentFormRating" wink .length!=0)
jQuery(".commentFormRating input[name='reviewRating']" wink .val("" wink ;
jQuery(".commentFormRating .goldStarContainer" wink .css("left", zeroPos+"px" wink ;
);
var subscribeCheckBox = $("#BlogComments_commentSubscribe" wink ;
subscribeCheckBox.prop("checked", getCookie("subscribeToThread" wink === "true" ? true : false);
subscribeCheckBox.change(function (e)
var subscribeToThread = $(this).prop("checked" wink ;
setCookie("subscribeToThread", subscribeToThread ? "true" : "false", 30);
);
var shareFacebookBox = $("#BlogComments_postCommentToFacebook" wink ;
shareFacebookBox.prop("checked", getCookie("shareOnFacebook" wink === "true" ? true : false);
shareFacebookBox.change(function (e)
var shareOnFacebook = $(this).prop("checked" wink ;
setCookie("shareOnFacebook", shareOnFacebook ? "true" : "false", 30);
);
$("#BlogComments" wink .on('click', 'a.likeLink', doLikeComment);
$("#BlogComments" wink .on('click', 'a.reportCommentLink', reportComment);
);
http://www.chicagoreader.com/Bleader/archives/2015/05/01/venerated-avant-garde-filmmaker-saul-levine-makes-a-rare-chicago-appearance-tomorrow
chicagonewsat11 Community Member |
|