(window.webpackJsonp=window.webpackJsonp||[]).push([["167a"],{"3v79":function(t,o){!function(t){var o,e;t.fn.litebox=function(){o=this,e=t("
").hide().insertBefore(o).bind("close-litebox",function(){t(this).replaceWith(o)}),t("body").append(''),t("body").append(''),o.appendTo("#litebox"),t("#litebox-overlay").click(function(){t(e).trigger("close-litebox"),t("#litebox-overlay").remove(),t("#litebox").remove()})}}(jQuery)},NleD:function(t,o){angular.module("footyroom").controller("SubscriptionController",["$scope","subscription",function(t,o){t.toggle=function(){o("post",t.postId,t.isSubscribed?"ignore":"follow").then(function(o){t.isSubscribed=!t.isSubscribed})}}])},SEh0:function(t,o,e){"use strict";e.r(o);e("p0NC"),e("NleD"),e("5RJm"),e("DqgX"),e("T8I6"),e("3v79"),e("la2R");angular.module("footyroom").controller("forumCommentController",["$scope","$compile","$element",function(t,o,e){var n,i,r=e.attr("commentID");t.edit=function(){i||(i=!0,n=o('')(t),e.after(n).hide())},t.cancelEdit=function(){n.remove(),e.show(),i=!1}}]).controller("NewPostController",["$scope","$http","$window",function(t,o,e){var n,i=angular.element("#newpost-wizard");t.step=1,t.showCategories=function(){i.litebox()},t.selectCategory=function(o,e){t.categoryId=o,t.categoryTitle=e,t.step=2},t.title=window.localStorage.getItem("postTitle"),t.$watch("title",function(o,e){window.localStorage.setItem("postTitle",t.title||"")}),t.publish=function(){if(!n){n=!0,i.find(".post-title").litelay(),i.find("markdown-editor").litelay({spinner:!0});var r={category:t.categoryId,title:t.title,content:t.content,honeypot:t.nameEmailUrl};o.post("/forum/discussions",$.param(r),{headers:{"Content-Type":"application/x-www-form-urlencoded"}}).then(function(t){window.localStorage.removeItem("postTitle"),window.localStorage.removeItem("markdownContent"),e.location=t.data.url}).catch(function(o){t.errors=o.data.errors||"Something went wrong, but we don't know what. Try again later or report this to us.",n=!1,i.find(".post-title").litelay(),i.find("markdown-editor").litelay()})}}}]),$(function(){var t=$.QueryString.filter;t?$('#posts .filter [data-tab="'+t+'"]').addClass("active"):$('#posts .filter [data-tab="allposts"]').addClass("active")})},p0NC:function(t,o){angular.module("footyroom").service("subscription",["$http",function(t){return function(o,e,n){return t.post("/subscriptions/"+n,{subject_type:o,subject_id:e})}}])},xeH2:function(t,o){t.exports=jQuery}},[["SEh0","d41d","970b","c5ee","1090","0040","91fe","14aa","b76c"]]]);