Mad Max is back, plus the rest of our new reviews and notable screenings
1. Mad Max is back, plus the rest of our new reviews and
notable screenings
function removeEdit(oid)
if (oid)
var cont = jQuery("#BlogComments-comment-"+oid).closest(".brandNewComment");
cont.find(".newCommentOptions").fadeOut("fast", function()
jQuery(this).remove();
);
function getComment(oid, commentLimit)
var url = "/Bleader/archives/2015/05/22/mad-max-is-back-plus-the-rest-of-our-new--
eviews-and-notable-screenings";
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").html()))
jQuery("#"+componentId+"_commentContent").append(limitMsg+data).find(".brandNewComment")
.fadeIn("fast");
else
jQuery("#"+componentId+"_commentContent").children("div.comment, div.brandNewComment,
div.limitMsg").filter(":last").after(limitMsg+data).parent().find(".brandNewComment").fadeIn("fast");
2. var t=setTimeout(function()removeEdit(oid),300000);
var myTotal = parseInt(jQuery("#comments_total").text(), 10);
myTotal++;
updateCommentTotals(false,myTotal);
);
function doLikeComment(e)
e.preventDefault();
if (!this.clicked) 0;
var thisRating = jQuery(this).attr("rel");
if (thisRating == "Like")
myCurrentLikes = parseFloat(myCurrentLikes)+1;
else
myCurrentDislikes = parseFloat(myCurrentDislikes)+1;
var myNewLine = '' + myCurrentLikes + ' like';
if (myCurrentLikes != 1)
myNewLine += 's';
myNewLine += ', ' + '' + myCurrentDislikes + ' dislike';
if (myCurrentDislikes != 1)
myNewLine += "s";
jQuery("#"+oid+"_rating_sub").html(myNewLine);
jQuery("#"+oid+"_rating_sub").show();
var params =
oid: oid,
3. rating: thisRating
;
jQuery.ajax(
url: "/gyrobase/Tools/AjaxLike",
type: "POST",
data: (params),
success: function (data)
jQuery("#"+oid+"_rating_sub").html(data);
if (thisRating == "Like")
jQuery("#BlogComments #"+oid+"_likeLinks
a.dislike").removeClass("dimmed").css("opacity","1").each(function()this.clicked = false;);
else
jQuery("#BlogComments #"+oid+"_likeLinks
a.like").removeClass("dimmed").css("opacity","1").each(function()this.clicked = false;);
);
function reportComment(e)
e.preventDefault();
e.stopPropagation();
var oid = jQuery(this).attr("rel");
var elem = jQuery("#"+oid+"_report");
elem.click(function(e)e.stopPropagation();)
if (!elem.is(":visible"))
4. jQuery("#BlogComments .reportCommentContainer").hide();
if (elem.is(":empty"))
var params =
oid: oid,
ajaxComponent: "ReportComment"
;
jQuery.ajax(
url: "/gyrobase/Tools/ReportComment",
data: (params),
success: function (data)
elem.html(data);
elem.fadeIn("fast");
);
else
elem.fadeIn("fast");
// attach close event handler to the html
jQuery("html").one("click", function()
jQuery("#BlogComments .reportCommentContainer:visible").hide();
);
function closeReport(obj)
jQuery(obj).closest(".reportCommentContainer").fadeOut("fast");
5. function submitReport(e)
var params = jQuery(e).closest("form").serialize()+"ajaxComponent=ReportComment";
jQuery.ajax(
url: "/gyrobase/Tools/ReportComment",
type: "POST",
data: (params),
success: function (data)
jQuery(e).closest(".reportCommentContainer").html(data);
);
(function($)
var subscribed=false;
function showFollowPanel(e)
e.preventDefault();
myPanel = $(this).parent().next(".togglePanel");
myPanel.fadeIn("fast");
function doSubscribe(obj)
var myPanel = obj.parent().next(".togglePanel");
myPanel.fadeIn("fast");
if (!subscribed)
var myLink = obj.parent();
6. var myLoader = myPanel.children(".loading");
var myUpdater = myPanel.children(".ajaxUpdater");
var params =
object: myPanel.attr("data-toolsoid"),
macro: myPanel.attr("data-toolsajaxmacro"),
url: window.location
;
$.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");
, 3000);
);
);
else
myPanel.fadeOut("fast");
7. );
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")
8. ;
$.ajax(
url: "/gyrobase/Macros/ToolsAjax",
data: (params),
type: "POST",
dataType: "html",
success: function (data)
thisComment.closest(".brandNewComment").fadeOut("fast", function()
$(this).remove();
var myTotal = parseInt(jQuery("#comments_total").text(), 10);
myTotal--;
updateCommentTotals(false,myTotal);
);
);
function editComment(e)
e.preventDefault();
var thisComment = $(this);
var commentCont = thisComment.closest(".brandNewComment").find(".description");
var commentTemp = thisComment.closest(".brandNewComment").find(".commentTemp");
var commentText = commentTemp.html();
var toolbar = thisComment.closest(".brandNewComment").find(".commentToolbar");
commentCont.next(".commentEditCont").remove();
commentCont.after('');
9. toolbar.fadeOut("fast");
commentCont.fadeOut("fast", function()
commentCont.next(".commentEditCont").fadeIn("fast", function()
$(".brandNewComment textarea.expandableBox").autoBoxResize();
$(".brandNewComment textarea.expandableBox").focus();
);
);
function editCommentSave(e)
e.preventDefault();
var thisComment = $(this);
var editCont = thisComment.closest(".commentEditCont");
var commentTemp = thisComment.closest(".brandNewComment").find(".commentTemp");
var newText = thisComment.prevAll("textarea").val();
var toolbar = thisComment.closest(".brandNewComment").find(".commentToolbar");
var params =
macro: "editComment",
comment: thisComment.attr("data-comment"),
commentText: newText
;
$.ajax(
url: "/gyrobase/Macros/ToolsAjax",
data: (params),
type: "POST",
success: function (data)
if (data.error)
$(".editErrorDisplay").html(""+data.error+"").fadeIn("fast");