SlideShare a Scribd company logo
Poetry in the age of hip-hop
function removeEdit(oid)
if (oid)
var cont = jQuery("#Comments-comment-"+oid).closest(".brandNewComment");
cont.find(".newCommentOptions").fadeOut("fast", function()
jQuery(this).remove();
);
function getComment(oid, commentLimit)
var url = "/chicago/breakbeat-poets-hip-hop-poetry-kevin-coval-quraysh-ali-lansana-na-
e-marshall-krs-one-go-go-9-elements/Content?oid=17545593";
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)
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("#Comments .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("#Comments .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();
);
$("#Comments").on('click', ".bottomOptionBar a#doSubscribe", activateSubscribe);
$("#Comments").on('click', ".bottomOptionBar a.togglePanelClose",
function()$(this).parent().fadeOut("fast"); return false;);
$("#Comments").on('click', ".brandNewComment a.commentDeleteLink", deleteComment);
$("#Comments").on('click', ".brandNewComment a.commentEditLink", editComment);
$("#Comments").on('click', ".brandNewComment a.doneEditLink", editCommentSave);
$("#Comments").on('click', ".brandNewComment a.cancelEditLink", editCommentCancel);
)(jQuery);
jQuery(document).ready(function($)
$("#Comments").on('click', '#showMoreComments,#showAllComments', getMoreComments);
$("#Comments #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 = $("#Comments_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 = $("#Comments_postCommentToFacebook");
shareFacebookBox.prop("checked", getCookie("shareOnFacebook") === "true" ? true : false);
shareFacebookBox.change(function (e)
var shareOnFacebook = $(this).prop("checked");
setCookie("shareOnFacebook", shareOnFacebook ? "true" : "false", 30);
);
$("#Comments").on('click', 'a.likeLink', doLikeComment);
$("#Comments").on('click', 'a.reportCommentLink', reportComment);
);
http://www.chicagoreader.com/chicago/breakbeat-poets-hip-hop-poetry-kevin-coval-quraysh-ali-lansa
na-nate-marshall-krs-one-go-go-9-elements/Content?oid=17545593

More Related Content

What's hot

2015 Key Ingredient Cook-Off
2015 Key Ingredient Cook-Off2015 Key Ingredient Cook-Off
2015 Key Ingredient Cook-Off
irwinvifxcfesre
 
George McCaskey's handling of the Ray McDonald affair offers a lesson to the ...
George McCaskey's handling of the Ray McDonald affair offers a lesson to the ...George McCaskey's handling of the Ray McDonald affair offers a lesson to the ...
George McCaskey's handling of the Ray McDonald affair offers a lesson to the ...
irwinvifxcfesre
 
Get more votes!
Get more votes!Get more votes!
Get more votes!
chicagonewsonlineradio
 
A slew of AACM 50th anniversary celebrations this weekend
A slew of AACM 50th anniversary celebrations this weekendA slew of AACM 50th anniversary celebrations this weekend
A slew of AACM 50th anniversary celebrations this weekend
chicagonewsyesterday
 
Here's the Downtown Sound lineup for 2015
Here's the Downtown Sound lineup for 2015Here's the Downtown Sound lineup for 2015
Here's the Downtown Sound lineup for 2015
chicagonewsyesterday
 
Skaters and BMXers from all over the U.S. descend on Grant Park
Skaters and BMXers from all over the U.S. descend on Grant ParkSkaters and BMXers from all over the U.S. descend on Grant Park
Skaters and BMXers from all over the U.S. descend on Grant Park
chicagonewsyesterday
 
FrontInterior 2014: 10 dicas de desempenho para apps mobile hibridas
FrontInterior 2014: 10 dicas de desempenho para apps mobile hibridasFrontInterior 2014: 10 dicas de desempenho para apps mobile hibridas
FrontInterior 2014: 10 dicas de desempenho para apps mobile hibridas
Loiane Groner
 
QCON SP 2014: 10 dicas de desempenho para apps mobile hibridas
QCON SP 2014: 10 dicas de desempenho para apps mobile hibridasQCON SP 2014: 10 dicas de desempenho para apps mobile hibridas
QCON SP 2014: 10 dicas de desempenho para apps mobile hibridas
Loiane Groner
 
Javascript技巧参考大全
Javascript技巧参考大全Javascript技巧参考大全
Javascript技巧参考大全
fgghyyfk
 
Pimp your site with jQuery!
Pimp your site with jQuery!Pimp your site with jQuery!
Pimp your site with jQuery!
Elliott Kember
 
Back To The Front - Javascript Test Driven Development is between us (workshop)
Back To The Front - Javascript Test Driven Development is between us (workshop)Back To The Front - Javascript Test Driven Development is between us (workshop)
Back To The Front - Javascript Test Driven Development is between us (workshop)
Marco Cedaro
 
jQueryでつくる、動きのあるWebページ - 多摩美 メディアリテラシー
jQueryでつくる、動きのあるWebページ - 多摩美 メディアリテラシーjQueryでつくる、動きのあるWebページ - 多摩美 メディアリテラシー
jQueryでつくる、動きのあるWebページ - 多摩美 メディアリテラシーAtsushi Tadokoro
 
Dennis zapana perez
Dennis zapana perezDennis zapana perez
Dennis zapana perezdennis_elvis
 
Php & mysql
Php & mysqlPhp & mysql
Php & mysql
ola98z
 
Php codigos interfaces fredy guzman cusihunca
Php codigos interfaces   fredy guzman cusihuncaPhp codigos interfaces   fredy guzman cusihunca
Php codigos interfaces fredy guzman cusihuncaTigger_Fred
 
Introducción a Bolt
Introducción a BoltIntroducción a Bolt
Introducción a Bolt
Asier Marqués
 
Intro to jQuery UI
Intro to jQuery UIIntro to jQuery UI
Intro to jQuery UI
appendTo
 

What's hot (20)

2015 Key Ingredient Cook-Off
2015 Key Ingredient Cook-Off2015 Key Ingredient Cook-Off
2015 Key Ingredient Cook-Off
 
George McCaskey's handling of the Ray McDonald affair offers a lesson to the ...
George McCaskey's handling of the Ray McDonald affair offers a lesson to the ...George McCaskey's handling of the Ray McDonald affair offers a lesson to the ...
George McCaskey's handling of the Ray McDonald affair offers a lesson to the ...
 
Get more votes!
Get more votes!Get more votes!
Get more votes!
 
A slew of AACM 50th anniversary celebrations this weekend
A slew of AACM 50th anniversary celebrations this weekendA slew of AACM 50th anniversary celebrations this weekend
A slew of AACM 50th anniversary celebrations this weekend
 
Here's the Downtown Sound lineup for 2015
Here's the Downtown Sound lineup for 2015Here's the Downtown Sound lineup for 2015
Here's the Downtown Sound lineup for 2015
 
Skaters and BMXers from all over the U.S. descend on Grant Park
Skaters and BMXers from all over the U.S. descend on Grant ParkSkaters and BMXers from all over the U.S. descend on Grant Park
Skaters and BMXers from all over the U.S. descend on Grant Park
 
Jquery ui, ajax
Jquery ui, ajaxJquery ui, ajax
Jquery ui, ajax
 
FrontInterior 2014: 10 dicas de desempenho para apps mobile hibridas
FrontInterior 2014: 10 dicas de desempenho para apps mobile hibridasFrontInterior 2014: 10 dicas de desempenho para apps mobile hibridas
FrontInterior 2014: 10 dicas de desempenho para apps mobile hibridas
 
QCON SP 2014: 10 dicas de desempenho para apps mobile hibridas
QCON SP 2014: 10 dicas de desempenho para apps mobile hibridasQCON SP 2014: 10 dicas de desempenho para apps mobile hibridas
QCON SP 2014: 10 dicas de desempenho para apps mobile hibridas
 
Javascript技巧参考大全
Javascript技巧参考大全Javascript技巧参考大全
Javascript技巧参考大全
 
Pimp your site with jQuery!
Pimp your site with jQuery!Pimp your site with jQuery!
Pimp your site with jQuery!
 
Back To The Front - Javascript Test Driven Development is between us (workshop)
Back To The Front - Javascript Test Driven Development is between us (workshop)Back To The Front - Javascript Test Driven Development is between us (workshop)
Back To The Front - Javascript Test Driven Development is between us (workshop)
 
jQueryでつくる、動きのあるWebページ - 多摩美 メディアリテラシー
jQueryでつくる、動きのあるWebページ - 多摩美 メディアリテラシーjQueryでつくる、動きのあるWebページ - 多摩美 メディアリテラシー
jQueryでつくる、動きのあるWebページ - 多摩美 メディアリテラシー
 
Dennis zapana perez
Dennis zapana perezDennis zapana perez
Dennis zapana perez
 
J query
J queryJ query
J query
 
Php & mysql
Php & mysqlPhp & mysql
Php & mysql
 
Php codigos interfaces fredy guzman cusihunca
Php codigos interfaces   fredy guzman cusihuncaPhp codigos interfaces   fredy guzman cusihunca
Php codigos interfaces fredy guzman cusihunca
 
Introducción a Bolt
Introducción a BoltIntroducción a Bolt
Introducción a Bolt
 
Index1
Index1Index1
Index1
 
Intro to jQuery UI
Intro to jQuery UIIntro to jQuery UI
Intro to jQuery UI
 

Viewers also liked

Before there was Hoop Dreams, there was McDonald's: Strange and Beautiful
Before there was Hoop Dreams, there was McDonald's: Strange and BeautifulBefore there was Hoop Dreams, there was McDonald's: Strange and Beautiful
Before there was Hoop Dreams, there was McDonald's: Strange and Beautiful
chicagonewsonlineradio
 
Delos_WELL_ProjectProfile_Tianjiao_110416_english-Final
Delos_WELL_ProjectProfile_Tianjiao_110416_english-FinalDelos_WELL_ProjectProfile_Tianjiao_110416_english-Final
Delos_WELL_ProjectProfile_Tianjiao_110416_english-Final
Stephen Brown
 
Health Wellbeing and Productivity in Offices - The next chapter for green bui...
Health Wellbeing and Productivity in Offices - The next chapter for green bui...Health Wellbeing and Productivity in Offices - The next chapter for green bui...
Health Wellbeing and Productivity in Offices - The next chapter for green bui...
Stephen Brown
 
Promoting-Back-Health
Promoting-Back-HealthPromoting-Back-Health
Promoting-Back-Health
Stephen Brown
 
workplace-design-for-well-being
workplace-design-for-well-beingworkplace-design-for-well-being
workplace-design-for-well-being
Stephen Brown
 
WELL Living Lab story
WELL Living Lab storyWELL Living Lab story
WELL Living Lab story
Stephen Brown
 
John Greenwood CV (Telco Tech-Rigger)
John Greenwood CV (Telco Tech-Rigger)John Greenwood CV (Telco Tech-Rigger)
John Greenwood CV (Telco Tech-Rigger)
John Greenwood
 
Dsp p islam tingkatan 1
Dsp p islam tingkatan 1  Dsp p islam tingkatan 1
Dsp p islam tingkatan 1
cahaya2012
 
GSM Mobile Phone Based LCD Message Display System
GSM Mobile Phone Based LCD Message Display SystemGSM Mobile Phone Based LCD Message Display System
GSM Mobile Phone Based LCD Message Display System
Manish Kumar
 
GSM Mobile Phone Based LCD Message Display System
GSM Mobile Phone Based LCD Message Display SystemGSM Mobile Phone Based LCD Message Display System
GSM Mobile Phone Based LCD Message Display System
Manish Kumar
 
Haworth Kerry Center-WELL- Jan 2016
Haworth Kerry Center-WELL- Jan 2016Haworth Kerry Center-WELL- Jan 2016
Haworth Kerry Center-WELL- Jan 2016
Stephen Brown
 
Optical Coherence Tomography: Technology and applications for neuroimaging
Optical Coherence Tomography: Technology and applications for neuroimagingOptical Coherence Tomography: Technology and applications for neuroimaging
Optical Coherence Tomography: Technology and applications for neuroimaging
Manish Kumar
 

Viewers also liked (12)

Before there was Hoop Dreams, there was McDonald's: Strange and Beautiful
Before there was Hoop Dreams, there was McDonald's: Strange and BeautifulBefore there was Hoop Dreams, there was McDonald's: Strange and Beautiful
Before there was Hoop Dreams, there was McDonald's: Strange and Beautiful
 
Delos_WELL_ProjectProfile_Tianjiao_110416_english-Final
Delos_WELL_ProjectProfile_Tianjiao_110416_english-FinalDelos_WELL_ProjectProfile_Tianjiao_110416_english-Final
Delos_WELL_ProjectProfile_Tianjiao_110416_english-Final
 
Health Wellbeing and Productivity in Offices - The next chapter for green bui...
Health Wellbeing and Productivity in Offices - The next chapter for green bui...Health Wellbeing and Productivity in Offices - The next chapter for green bui...
Health Wellbeing and Productivity in Offices - The next chapter for green bui...
 
Promoting-Back-Health
Promoting-Back-HealthPromoting-Back-Health
Promoting-Back-Health
 
workplace-design-for-well-being
workplace-design-for-well-beingworkplace-design-for-well-being
workplace-design-for-well-being
 
WELL Living Lab story
WELL Living Lab storyWELL Living Lab story
WELL Living Lab story
 
John Greenwood CV (Telco Tech-Rigger)
John Greenwood CV (Telco Tech-Rigger)John Greenwood CV (Telco Tech-Rigger)
John Greenwood CV (Telco Tech-Rigger)
 
Dsp p islam tingkatan 1
Dsp p islam tingkatan 1  Dsp p islam tingkatan 1
Dsp p islam tingkatan 1
 
GSM Mobile Phone Based LCD Message Display System
GSM Mobile Phone Based LCD Message Display SystemGSM Mobile Phone Based LCD Message Display System
GSM Mobile Phone Based LCD Message Display System
 
GSM Mobile Phone Based LCD Message Display System
GSM Mobile Phone Based LCD Message Display SystemGSM Mobile Phone Based LCD Message Display System
GSM Mobile Phone Based LCD Message Display System
 
Haworth Kerry Center-WELL- Jan 2016
Haworth Kerry Center-WELL- Jan 2016Haworth Kerry Center-WELL- Jan 2016
Haworth Kerry Center-WELL- Jan 2016
 
Optical Coherence Tomography: Technology and applications for neuroimaging
Optical Coherence Tomography: Technology and applications for neuroimagingOptical Coherence Tomography: Technology and applications for neuroimaging
Optical Coherence Tomography: Technology and applications for neuroimaging
 

More from chicagonewsonlineradio

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?
chicagonewsonlineradio
 
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 ...
chicagonewsonlineradio
 
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
chicagonewsonlineradio
 
Mad Max is back, plus the rest of our new reviews and notable screenings
Mad Max is back, plus the rest of our new reviews and notable screeningsMad Max is back, plus the rest of our new reviews and notable screenings
Mad Max is back, plus the rest of our new reviews and notable screenings
chicagonewsonlineradio
 
Discontinuing Reader Matches
Discontinuing Reader MatchesDiscontinuing Reader Matches
Discontinuing Reader Matches
chicagonewsonlineradio
 

More from chicagonewsonlineradio (6)

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
 
Mad Max is back, plus the rest of our new reviews and notable screenings
Mad Max is back, plus the rest of our new reviews and notable screeningsMad Max is back, plus the rest of our new reviews and notable screenings
Mad Max is back, plus the rest of our new reviews and notable screenings
 
Test
TestTest
Test
 
Discontinuing Reader Matches
Discontinuing Reader MatchesDiscontinuing Reader Matches
Discontinuing Reader Matches
 

Poetry in the age of hip-hop

  • 1. Poetry in the age of hip-hop function removeEdit(oid) if (oid) var cont = jQuery("#Comments-comment-"+oid).closest(".brandNewComment"); cont.find(".newCommentOptions").fadeOut("fast", function() jQuery(this).remove(); ); function getComment(oid, commentLimit) var url = "/chicago/breakbeat-poets-hip-hop-poetry-kevin-coval-quraysh-ali-lansana-na- e-marshall-krs-one-go-go-9-elements/Content?oid=17545593"; 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) 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("#Comments .reportCommentContainer").hide(); if (elem.is(":empty")) var params = oid: oid, ajaxComponent: "ReportComment" ; jQuery.ajax( url: "/gyrobase/Tools/ReportComment", data: (params),
  • 3. 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("#Comments .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)
  • 4. 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 ;
  • 5. $.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();
  • 6. 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",
  • 7. 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(); );
  • 8. ); 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");
  • 9. 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(); ); $("#Comments").on('click', ".bottomOptionBar a#doSubscribe", activateSubscribe); $("#Comments").on('click', ".bottomOptionBar a.togglePanelClose", function()$(this).parent().fadeOut("fast"); return false;); $("#Comments").on('click', ".brandNewComment a.commentDeleteLink", deleteComment); $("#Comments").on('click', ".brandNewComment a.commentEditLink", editComment); $("#Comments").on('click', ".brandNewComment a.doneEditLink", editCommentSave); $("#Comments").on('click', ".brandNewComment a.cancelEditLink", editCommentCancel);
  • 10. )(jQuery); jQuery(document).ready(function($) $("#Comments").on('click', '#showMoreComments,#showAllComments', getMoreComments); $("#Comments #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 = $("#Comments_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 = $("#Comments_postCommentToFacebook"); shareFacebookBox.prop("checked", getCookie("shareOnFacebook") === "true" ? true : false); shareFacebookBox.change(function (e) var shareOnFacebook = $(this).prop("checked"); setCookie("shareOnFacebook", shareOnFacebook ? "true" : "false", 30);