SlideShare ist ein Scribd-Unternehmen logo
1 von 13
Downloaden Sie, um offline zu lesen
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");
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,
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"))
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");
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();
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");
);
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")
;
$.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('');
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");
else if (data.result)
editCont.fadeOut("fast", function()
$(".editErrorDisplay").hide().html("");
editCont.prev(".description").html($.trim(data.result));
commentTemp.html(newText);
editCont.prev(".description").fadeIn("fast");
toolbar.fadeIn("fast");
);
);
function editCommentCancel(e)
e.preventDefault();
var editCont = $(this).closest(".commentEditCont");
var toolbar = $(this).closest(".brandNewComment").find(".commentToolbar");
editCont.fadeOut("fast", function()
$(".editErrorDisplay").hide().html("");
editCont.prev(".description").fadeIn("fast");
toolbar.fadeIn("fast");
editCont.remove();
);
$("#BlogComments").on('click', ".bottomOptionBar a#doSubscribe", activateSubscribe);
$("#BlogComments").on('click', ".bottomOptionBar a.togglePanelClose",
function()$(this).parent().fadeOut("fast"); return false;);
$("#BlogComments").on('click', ".brandNewComment a.commentDeleteLink", deleteComment);
$("#BlogComments").on('click', ".brandNewComment a.commentEditLink", editComment);
$("#BlogComments").on('click', ".brandNewComment a.doneEditLink", editCommentSave);
$("#BlogComments").on('click', ".brandNewComment a.cancelEditLink", editCommentCancel);
)(jQuery);
jQuery(document).ready(function($)
$("#BlogComments").on('click', '#showMoreComments,#showAllComments', getMoreComments);
$("#BlogComments #sortSelect").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"));
// clear rating
if (jQuery(".commentFormRating").length!=0)
jQuery(".commentFormRating input[name='reviewRating']").val("");
jQuery(".commentFormRating .goldStarContainer").css("left", zeroPos+"px");
);
var subscribeCheckBox = $("#BlogComments_commentSubscribe");
subscribeCheckBox.prop("checked", getCookie("subscribeToThread") === "true" ? true : false);
subscribeCheckBox.change(function (e)
var subscribeToThread = $(this).prop("checked");
setCookie("subscribeToThread", subscribeToThread ? "true" : "false", 30);
);
var shareFacebookBox = $("#BlogComments_postCommentToFacebook");
shareFacebookBox.prop("checked", getCookie("shareOnFacebook") === "true" ? true : false);
shareFacebookBox.change(function (e)
var shareOnFacebook = $(this).prop("checked");
setCookie("shareOnFacebook", shareOnFacebook ? "true" : "false", 30);
);
$("#BlogComments").on('click', 'a.likeLink', doLikeComment);
$("#BlogComments").on('click', 'a.reportCommentLink', reportComment);
);
http://www.chicagoreader.com/Bleader/archives/2015/05/22/mad-max-is-back-plus-the-rest-of-our-ne
w-reviews-and-notable-screenings
Mad Max is back, plus the rest of our new reviews and notable screenings

Weitere ähnliche Inhalte

Was ist angesagt?

Desenvolvimento web com Ruby on Rails (extras)
Desenvolvimento web com Ruby on Rails (extras)Desenvolvimento web com Ruby on Rails (extras)
Desenvolvimento web com Ruby on Rails (extras)
Joao Lucas Santana
 
OpenERP e l'arte della gestione aziendale con Python
OpenERP e l'arte della gestione aziendale con PythonOpenERP e l'arte della gestione aziendale con Python
OpenERP e l'arte della gestione aziendale con Python
PyCon Italia
 
Is HTML5 Ready? (workshop)
Is HTML5 Ready? (workshop)Is HTML5 Ready? (workshop)
Is HTML5 Ready? (workshop)
Remy Sharp
 
Yearning jQuery
Yearning jQueryYearning jQuery
Yearning jQuery
Remy Sharp
 
HTML5 APIs - Where no man has gone before! - Altran
HTML5 APIs - Where no man has gone before! - AltranHTML5 APIs - Where no man has gone before! - Altran
HTML5 APIs - Where no man has gone before! - Altran
Robert Nyman
 
HTML5 & The Open Web - at Nackademin
HTML5 & The Open Web -  at NackademinHTML5 & The Open Web -  at Nackademin
HTML5 & The Open Web - at Nackademin
Robert Nyman
 
Coffeescript - what's good
Coffeescript - what's goodCoffeescript - what's good
Coffeescript - what's good
JeongHun Byeon
 
https://www.facebook.com/valdyna.monna?fref=ts
https://www.facebook.com/valdyna.monna?fref=tshttps://www.facebook.com/valdyna.monna?fref=ts
https://www.facebook.com/valdyna.monna?fref=ts
Arif Alexi
 
Django Class-based views (Slovenian)
Django Class-based views (Slovenian)Django Class-based views (Slovenian)
Django Class-based views (Slovenian)
Luka Zakrajšek
 
Javascript MVC & Backbone Tips & Tricks
Javascript MVC & Backbone Tips & TricksJavascript MVC & Backbone Tips & Tricks
Javascript MVC & Backbone Tips & Tricks
Hjörtur Hilmarsson
 

Was ist angesagt? (20)

Bare-knuckle web development
Bare-knuckle web developmentBare-knuckle web development
Bare-knuckle web development
 
Micro app-framework
Micro app-frameworkMicro app-framework
Micro app-framework
 
Desenvolvimento web com Ruby on Rails (extras)
Desenvolvimento web com Ruby on Rails (extras)Desenvolvimento web com Ruby on Rails (extras)
Desenvolvimento web com Ruby on Rails (extras)
 
Backbone Basics with Examples
Backbone Basics with ExamplesBackbone Basics with Examples
Backbone Basics with Examples
 
jQuery: Events, Animation, Ajax
jQuery: Events, Animation, AjaxjQuery: Events, Animation, Ajax
jQuery: Events, Animation, Ajax
 
Slightly Advanced Android Wear ;)
Slightly Advanced Android Wear ;)Slightly Advanced Android Wear ;)
Slightly Advanced Android Wear ;)
 
OpenERP e l'arte della gestione aziendale con Python
OpenERP e l'arte della gestione aziendale con PythonOpenERP e l'arte della gestione aziendale con Python
OpenERP e l'arte della gestione aziendale con Python
 
Is HTML5 Ready? (workshop)
Is HTML5 Ready? (workshop)Is HTML5 Ready? (workshop)
Is HTML5 Ready? (workshop)
 
Backbone.js — Introduction to client-side JavaScript MVC
Backbone.js — Introduction to client-side JavaScript MVCBackbone.js — Introduction to client-side JavaScript MVC
Backbone.js — Introduction to client-side JavaScript MVC
 
Yearning jQuery
Yearning jQueryYearning jQuery
Yearning jQuery
 
HTML5 APIs - Where no man has gone before! - Altran
HTML5 APIs - Where no man has gone before! - AltranHTML5 APIs - Where no man has gone before! - Altran
HTML5 APIs - Where no man has gone before! - Altran
 
HTML5 & The Open Web - at Nackademin
HTML5 & The Open Web -  at NackademinHTML5 & The Open Web -  at Nackademin
HTML5 & The Open Web - at Nackademin
 
Coffeescript - what's good
Coffeescript - what's goodCoffeescript - what's good
Coffeescript - what's good
 
https://www.facebook.com/valdyna.monna?fref=ts
https://www.facebook.com/valdyna.monna?fref=tshttps://www.facebook.com/valdyna.monna?fref=ts
https://www.facebook.com/valdyna.monna?fref=ts
 
Design Patterns for Tablets and Smartphones
Design Patterns for Tablets and SmartphonesDesign Patterns for Tablets and Smartphones
Design Patterns for Tablets and Smartphones
 
Django Class-based views (Slovenian)
Django Class-based views (Slovenian)Django Class-based views (Slovenian)
Django Class-based views (Slovenian)
 
To Err Is Human
To Err Is HumanTo Err Is Human
To Err Is Human
 
Javascript MVC & Backbone Tips & Tricks
Javascript MVC & Backbone Tips & TricksJavascript MVC & Backbone Tips & Tricks
Javascript MVC & Backbone Tips & Tricks
 
Prototype UI
Prototype UIPrototype UI
Prototype UI
 
Phonegap for Android
Phonegap for AndroidPhonegap for Android
Phonegap for Android
 

Andere mochten auch

Presentazione italiana cuscino
Presentazione italiana cuscinoPresentazione italiana cuscino
Presentazione italiana cuscino
Akosol
 
RIT Certificate_Graduate Symposium_2014001
RIT Certificate_Graduate Symposium_2014001RIT Certificate_Graduate Symposium_2014001
RIT Certificate_Graduate Symposium_2014001
darvis6007
 
Competencia matemática y evaluaciones internacionales
Competencia matemática y evaluaciones internacionalesCompetencia matemática y evaluaciones internacionales
Competencia matemática y evaluaciones internacionales
Universidad Popular Carmen de Michelena
 

Andere mochten auch (12)

Presentazione italiana cuscino
Presentazione italiana cuscinoPresentazione italiana cuscino
Presentazione italiana cuscino
 
RIT Certificate_Graduate Symposium_2014001
RIT Certificate_Graduate Symposium_2014001RIT Certificate_Graduate Symposium_2014001
RIT Certificate_Graduate Symposium_2014001
 
Manual de indentidad. corporativa. eo
Manual de indentidad. corporativa. eoManual de indentidad. corporativa. eo
Manual de indentidad. corporativa. eo
 
Exel lag
Exel lag Exel lag
Exel lag
 
Twitter
TwitterTwitter
Twitter
 
Palais namaskar map
Palais namaskar mapPalais namaskar map
Palais namaskar map
 
Affects of technology
Affects of technologyAffects of technology
Affects of technology
 
Ingenieria biomedica DANIEL ITM
Ingenieria biomedica DANIEL ITMIngenieria biomedica DANIEL ITM
Ingenieria biomedica DANIEL ITM
 
Competencia matemática y evaluaciones internacionales
Competencia matemática y evaluaciones internacionalesCompetencia matemática y evaluaciones internacionales
Competencia matemática y evaluaciones internacionales
 
Baekjoon Online Judge 10986번 풀이
Baekjoon Online Judge 10986번 풀이Baekjoon Online Judge 10986번 풀이
Baekjoon Online Judge 10986번 풀이
 
Lean UX workshop - Part Two
Lean UX workshop - Part TwoLean UX workshop - Part Two
Lean UX workshop - Part Two
 
The truth will set you free 6
The truth will set you free 6The truth will set you free 6
The truth will set you free 6
 

Ähnlich wie Mad Max is back, plus the rest of our new reviews and notable screenings

Taming that client side mess with Backbone.js
Taming that client side mess with Backbone.jsTaming that client side mess with Backbone.js
Taming that client side mess with Backbone.js
Jarod Ferguson
 
jQuery and Rails, Sitting in a Tree
jQuery and Rails, Sitting in a TreejQuery and Rails, Sitting in a Tree
jQuery and Rails, Sitting in a Tree
adamlogic
 
Avinash Kundaliya: Javascript and WordPress
Avinash Kundaliya: Javascript and WordPressAvinash Kundaliya: Javascript and WordPress
Avinash Kundaliya: Javascript and WordPress
wpnepal
 
前端MVC 豆瓣说
前端MVC 豆瓣说前端MVC 豆瓣说
前端MVC 豆瓣说
Ting Lv
 
international PHP2011_Bastian Feder_jQuery's Secrets
international PHP2011_Bastian Feder_jQuery's Secretsinternational PHP2011_Bastian Feder_jQuery's Secrets
international PHP2011_Bastian Feder_jQuery's Secrets
smueller_sandsmedia
 
Big Data for each one of us
Big Data for each one of usBig Data for each one of us
Big Data for each one of us
OSCON Byrum
 

Ähnlich wie Mad Max is back, plus the rest of our new reviews and notable screenings (20)

jQuery secrets
jQuery secretsjQuery secrets
jQuery secrets
 
Clean Javascript
Clean JavascriptClean Javascript
Clean Javascript
 
Taming that client side mess with Backbone.js
Taming that client side mess with Backbone.jsTaming that client side mess with Backbone.js
Taming that client side mess with Backbone.js
 
jQuery & 10,000 Global Functions: Working with Legacy JavaScript
jQuery & 10,000 Global Functions: Working with Legacy JavaScriptjQuery & 10,000 Global Functions: Working with Legacy JavaScript
jQuery & 10,000 Global Functions: Working with Legacy JavaScript
 
Knockoutjs UG meeting presentation
Knockoutjs UG meeting presentationKnockoutjs UG meeting presentation
Knockoutjs UG meeting presentation
 
jQuery and Rails, Sitting in a Tree
jQuery and Rails, Sitting in a TreejQuery and Rails, Sitting in a Tree
jQuery and Rails, Sitting in a Tree
 
Building Large jQuery Applications
Building Large jQuery ApplicationsBuilding Large jQuery Applications
Building Large jQuery Applications
 
Virtual Madness @ Etsy
Virtual Madness @ EtsyVirtual Madness @ Etsy
Virtual Madness @ Etsy
 
jQuery secrets
jQuery secretsjQuery secrets
jQuery secrets
 
Avinash Kundaliya: Javascript and WordPress
Avinash Kundaliya: Javascript and WordPressAvinash Kundaliya: Javascript and WordPress
Avinash Kundaliya: Javascript and WordPress
 
前端MVC 豆瓣说
前端MVC 豆瓣说前端MVC 豆瓣说
前端MVC 豆瓣说
 
international PHP2011_Bastian Feder_jQuery's Secrets
international PHP2011_Bastian Feder_jQuery's Secretsinternational PHP2011_Bastian Feder_jQuery's Secrets
international PHP2011_Bastian Feder_jQuery's Secrets
 
Ten useful JavaScript tips & best practices
Ten useful JavaScript tips & best practicesTen useful JavaScript tips & best practices
Ten useful JavaScript tips & best practices
 
jQuery's Secrets
jQuery's SecretsjQuery's Secrets
jQuery's Secrets
 
Rails is not just Ruby
Rails is not just RubyRails is not just Ruby
Rails is not just Ruby
 
Min-Maxing Software Costs
Min-Maxing Software CostsMin-Maxing Software Costs
Min-Maxing Software Costs
 
Zend framework service
Zend framework serviceZend framework service
Zend framework service
 
Zend framework service
Zend framework serviceZend framework service
Zend framework service
 
Big Data for each one of us
Big Data for each one of usBig Data for each one of us
Big Data for each one of us
 
Mashing up JavaScript
Mashing up JavaScriptMashing up JavaScript
Mashing up JavaScript
 

Mehr von chicagonewsonlineradio (7)

Chief Keef's hologram can't catch a break, and it's a win for Keef
Chief Keef's hologram can't catch a break, and it's a win for KeefChief Keef's hologram can't catch a break, and it's a win for Keef
Chief Keef's hologram can't catch a break, and it's a win for Keef
 
What's happened to Chicago's Haring?
What's happened to Chicago's Haring?What's happened to Chicago's Haring?
What's happened to Chicago's Haring?
 
Singer-songwriter Jennifer Hall celebrates her first studio material in four ...
Singer-songwriter Jennifer Hall celebrates her first studio material in four ...Singer-songwriter Jennifer Hall celebrates her first studio material in four ...
Singer-songwriter Jennifer Hall celebrates her first studio material in four ...
 
Looks like Blake Schwarzenbach of Jawbreaker will be joining Cap'n Jazz
Looks like Blake Schwarzenbach of Jawbreaker will be joining Cap'n JazzLooks like Blake Schwarzenbach of Jawbreaker will be joining Cap'n Jazz
Looks like Blake Schwarzenbach of Jawbreaker will be joining Cap'n Jazz
 
Get more votes!
Get more votes!Get more votes!
Get more votes!
 
Poetry in the age of hip-hop
Poetry in the age of hip-hopPoetry in the age of hip-hop
Poetry in the age of hip-hop
 
Test
TestTest
Test
 

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");
  • 10. else if (data.result) editCont.fadeOut("fast", function() $(".editErrorDisplay").hide().html(""); editCont.prev(".description").html($.trim(data.result)); commentTemp.html(newText); editCont.prev(".description").fadeIn("fast"); toolbar.fadeIn("fast"); ); ); function editCommentCancel(e) e.preventDefault(); var editCont = $(this).closest(".commentEditCont"); var toolbar = $(this).closest(".brandNewComment").find(".commentToolbar"); editCont.fadeOut("fast", function() $(".editErrorDisplay").hide().html(""); editCont.prev(".description").fadeIn("fast"); toolbar.fadeIn("fast"); editCont.remove(); ); $("#BlogComments").on('click', ".bottomOptionBar a#doSubscribe", activateSubscribe); $("#BlogComments").on('click', ".bottomOptionBar a.togglePanelClose", function()$(this).parent().fadeOut("fast"); return false;); $("#BlogComments").on('click', ".brandNewComment a.commentDeleteLink", deleteComment); $("#BlogComments").on('click', ".brandNewComment a.commentEditLink", editComment); $("#BlogComments").on('click', ".brandNewComment a.doneEditLink", editCommentSave); $("#BlogComments").on('click', ".brandNewComment a.cancelEditLink", editCommentCancel);
  • 11. )(jQuery); jQuery(document).ready(function($) $("#BlogComments").on('click', '#showMoreComments,#showAllComments', getMoreComments); $("#BlogComments #sortSelect").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")); // clear rating if (jQuery(".commentFormRating").length!=0) jQuery(".commentFormRating input[name='reviewRating']").val(""); jQuery(".commentFormRating .goldStarContainer").css("left", zeroPos+"px"); ); var subscribeCheckBox = $("#BlogComments_commentSubscribe"); subscribeCheckBox.prop("checked", getCookie("subscribeToThread") === "true" ? true : false); subscribeCheckBox.change(function (e) var subscribeToThread = $(this).prop("checked"); setCookie("subscribeToThread", subscribeToThread ? "true" : "false", 30); ); var shareFacebookBox = $("#BlogComments_postCommentToFacebook"); shareFacebookBox.prop("checked", getCookie("shareOnFacebook") === "true" ? true : false); shareFacebookBox.change(function (e) var shareOnFacebook = $(this).prop("checked"); setCookie("shareOnFacebook", shareOnFacebook ? "true" : "false", 30);
  • 12. ); $("#BlogComments").on('click', 'a.likeLink', doLikeComment); $("#BlogComments").on('click', 'a.reportCommentLink', reportComment); ); http://www.chicagoreader.com/Bleader/archives/2015/05/22/mad-max-is-back-plus-the-rest-of-our-ne w-reviews-and-notable-screenings