diff --git a/public/assets/js/main.js b/public/assets/js/main.js index 9973f09..06096bb 100644 --- a/public/assets/js/main.js +++ b/public/assets/js/main.js @@ -708,7 +708,7 @@ $('html').addClass('js'); $(function () { - + $('.nojs').hide(); if(Modernizr.touch) @@ -717,7 +717,6 @@ $(function () { }); } - else { $('span.icons i, a, .caption, time').powerTip({ placement: 's', smartPlacement: true }); @@ -838,6 +837,54 @@ $(function () { });*/ }); +// Overwrite the powertip helper function - it's nearly the same +function getTooltipContent(element) { + var tipText = element.data(DATA_POWERTIP), + tipObject = element.data(DATA_POWERTIPJQ), + tipTarget = element.data(DATA_POWERTIPTARGET), + targetElement, + content; + + if (tipText) { + if ($.isFunction(tipText)) { + tipText = tipText.call(element[0]); + } + content = tipText; + } else if (tipObject) { + if ($.isFunction(tipObject)) { + tipObject = tipObject.call(element[0]); + } + if (tipObject.length > 0) { + content = tipObject.clone(true, true); + } + } else if (tipTarget) { + targetElement = $('#' + tipTarget); + if (targetElement.length > 0) { + content = targetElement.html(); + } + } + + // Except we're escaping html + return escapeHTML(content); +} + +// Source: http://stackoverflow.com/questions/24816/escaping-html-strings-with-jquery + +var entityMap = { + "&": "&", + "<": "<", + ">": ">", + '"': '"', + "'": ''', + "/": '/' +}; + +function escapeHTML(string) { + return String(string).replace(/[&<>"'\/]/g, function (s) { + return entityMap[s]; + }); +} + function submitFormAsGet(id, newRoute) { var form = $('#' + id); form.find("input[name=_token]").val(''); diff --git a/public/assets/js/main.js.min.map b/public/assets/js/main.js.min.map index 3de5fd5..e196969 100644 --- a/public/assets/js/main.js.min.map +++ b/public/assets/js/main.js.min.map @@ -1 +1 @@ -{"version":3,"sources":["other.js","cookie.js","spinner.js","modal.js","post.js","poll.js","quote.js"],"names":["submitFormAsGet","id","newRoute","form","$","find","val","attr","submit","window","MyBB","Cookie","cookiePrefix","cookiePath","cookieDomain","init","Settings","this","get","name","cookie","set","value","expires","expire","Date","setTime","getTime","options","path","domain","unset","removeCookie","jQuery","Spinner","inProgresses","add","show","remove","hide","Modals","on","toggleModal","bind","prototype","event","preventDefault","target","nodeName","modalOpener","modalSelector","data","modalFind","modal","class","modalContent","parent","substring","html","appendTo","zIndex","stepper","hideShowPassword","undefined","response","responseObject","Posts","togglePost","hasClass","addClass","removeClass","Polls","optionElement","clone","removeOption","click","proxy","addOption","change","toggleMaxOptionsInput","$addPollButton","toggleAddPoll","length","slideDown","timePicker","datetimepicker","format","lang","minDate","slideUp","num_options","$option","last","after","$parent","$me","$myParent","parents","setTimeout","fixOptionsName","Modernizr","touch","powerTip","placement","smartPlacement","i","each","me","is","isOrContains","node","container","parentNode","elementContainsSelection","el","sel","getSelection","rangeCount","getRangeAt","commonAncestorContainer","document","selection","type","createRange","parentElement","Quotes","multiQuoteButton","showQuoteBar","addQuotes","viewQuotes","removeQuotes","quickQuote","quickAddQuote","quoteAdd","quoteRemove","checkQuickQuote","quoteButtons","$post","$content","addQuote","text","hideQuickQuote","quotes","getQuotes","push","JSON","stringify","pid","trim","toString","showQuickQuote","range","rect","getBoundingClientRect","$elm","css","top","scrollY","outerHeight","left","scrollX","outerWidth","width","myQuotes","parse","key","quote","postId","parseInt","removed","$quoteBar","$textarea","ajax","url","posts","_token","method","done","json","error","substr","message","focus","close","always","postid","content","max-height","height","split","$quoteButton","next","dropit","submenuEl","triggerEl","removeAttr","closest","toggleClass","checked","checked_boxes","prop"],"mappings":"AAqIA,QAAAA,iBAAAC,EAAAC,GACA,GAAAC,GAAAC,EAAA,IAAAH,EAQA,OAPAE,GAAAE,KAAA,sBAAAC,IAAA,IAEA,MAAAJ,GACAC,EAAAI,KAAA,SAAAL,GAGAC,EAAAI,KAAA,SAAA,OAAAC,UACA,GC9IA,SAAAJ,EAAAK,GACAA,EAAAC,KAAAD,EAAAC,SAEAD,EAAAC,KAAAC,QACAC,aAAA,GACAC,WAAA,IACAC,aAAA,GAEAC,KAAA,WACAL,KAAAM,SAAAN,KAAAM,aACA,mBAAAN,MAAAM,SAAAJ,eACAK,KAAAL,aAAAF,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C,GAAAnM,EAAA,cAAA8E,MAEA,IAAAqH,GAEAnM,EAAA,sBAAAiE,SAAA,YAGA,GAAAkI,GAEAnM,EAAA,sBAAAkE,YAAA,YAGAlE,EAAA,uCAAAwI,KAAA,KAAA2D,EAAA,OAGAnM,EAAA,qCAAA0E,OAAA,WACA1E,EAAAa,MAAAmL,QAAA,UAAAC,YAAA,YAAApL,KAAAqL,QAEA,IAAAC,GAAAnM,EAAA,cAAA8E,MAEA,IAAAqH,GAEAnM,EAAA,sBAAAiE,SAAA,YAGA,GAAAkI,GAEAnM,EAAA,sBAAAkE,YAAA,YAGAlE,EAAA,uCAAAwI,KAAA,KAAA2D,EAAA,OAGAnM,EAAA,wCAAAuE,MAAA,WACAvE,EAAAa,MAAAmL,QAAA,WAAA/L,KAAA,wBAAAmM,KAAA,UAAAvL,KAAAqL,SACAlM,EAAAa,MAAAmL,QAAA,WAAA/L,KAAA,oBAAA+L,QAAA,WAAAC,YAAA,YAAApL,KAAAqL,SACAlM,EAAAa,MAAAmL,QAAA,WAAA/L,KAAA,oBAAA+L,QAAA,UAAAC,YAAA,YAAApL,KAAAqL,QAEA,IAAAC,GAAAnM,EAAA,cAAA8E,MAEAqH,IAAA,GAEAnM,EAAA,sBAAAiE,SAAA,YAGA,GAAAkI,GAEAnM,EAAA,sBAAAkE,YAAA,YAGAlE,EAAA,uCAAAwI,KAAA,KAAA2D,EAAA","file":"main.js","sourcesContent":["$('html').addClass('js');\n\n$(function () {\n\t\n\t$('.nojs').hide();\n\n\tif(Modernizr.touch)\n\t{\n\t\t$('.radio-buttons .radio-button, .checkbox-buttons .checkbox-button').click(function() {\n\n\t\t});\n\t}\n\n\telse\n\t{\n\t\t$('span.icons i, a, .caption, time').powerTip({ placement: 's', smartPlacement: true });\n\t}\n\n\t$('.user-navigation__links, #main-menu').dropit({ submenuEl: 'div.dropdown' });\n\t$('.dropdown-menu').dropit({ submenuEl: 'ul.dropdown', triggerEl: 'span.dropdown-button' });\n\t$(\"input[type=number]\").stepper();\n\t$(\".password-toggle\").hideShowPassword(false, true);\n\n\t$('.clear-selection-posts a').click(function(event) {\n\t\tevent.preventDefault();\n\t\t$('.thread').find('input[type=checkbox]:checked').removeAttr('checked').closest(\".post\").removeClass(\"highlight\");\n\t\t$('.inline-moderation').removeClass('floating');\n\t});\n\n\t$('.clear-selection-threads a').click(function(event) {\n\t\tevent.preventDefault();\n\t\t$('.thread-list').find('input[type=checkbox]:checked').removeAttr('checked').closest(\".thread\").removeClass(\"highlight\");\n\t\t$('.checkbox-select.check-all').find('input[type=checkbox]:checked').removeAttr('checked');\n\t\t$('.inline-moderation').removeClass('floating');\n\t});\n\n\t$('.clear-selection-forums a').click(function(event) {\n\t\tevent.preventDefault();\n\t\t$('.forum-list').find('input[type=checkbox]:checked').removeAttr('checked').closest(\".forum\").removeClass(\"highlight\");\n\t\t$('.checkbox-select.check-all').find('input[type=checkbox]:checked').removeAttr('checked');\n\t\t$('.inline-moderation').removeClass('floating');\n\t});\n\n\t$(\"#search .search-button\").click(function(event) {\n\t\tevent.preventDefault();\n\t\t$(\"#search .search-container\").slideDown();\n\t});\n\n\t$(\".post :checkbox\").change(function() {\n\t\t$(this).closest(\".post\").toggleClass(\"highlight\", this.checked);\n\n\t\tvar checked_boxes = $('.highlight').length;\n\n\t\tif(checked_boxes == 1)\n\t\t{\n\t\t\t$('.inline-moderation').addClass('floating');\n\t\t}\n\n\t\tif(checked_boxes == 0)\n\t\t{\n\t\t\t$('.inline-moderation').removeClass('floating');\n\t\t}\n\n\t\t$('.inline-moderation .selection-count').text(' ('+checked_boxes+')')\n\t});\n\n\t$(\".thread .checkbox-select :checkbox\").change(function() {\n\t\t$(this).closest(\".thread\").toggleClass(\"highlight\", this.checked);\n\n\t\tvar checked_boxes = $('.highlight').length;\n\n\t\tif(checked_boxes == 1)\n\t\t{\n\t\t\t$('.inline-moderation').addClass('floating');\n\t\t}\n\n\t\tif(checked_boxes == 0)\n\t\t{\n\t\t\t$('.inline-moderation').removeClass('floating');\n\t\t}\n\n\t\t$('.inline-moderation .selection-count').text(' ('+checked_boxes+')')\n\t});\n\n\t$(\".forum .checkbox-select :checkbox\").change(function() {\n\t\t$(this).closest(\".forum\").toggleClass(\"highlight\", this.checked);\n\n\t\tvar checked_boxes = $('.highlight').length;\n\n\t\tif(checked_boxes == 1)\n\t\t{\n\t\t\t$('.inline-moderation').addClass('floating');\n\t\t}\n\n\t\tif(checked_boxes == 0)\n\t\t{\n\t\t\t$('.inline-moderation').removeClass('floating');\n\t\t}\n\n\t\t$('.inline-moderation .selection-count').text(' ('+checked_boxes+')');\n\t});\n\n\t$(\".checkbox-select.check-all :checkbox\").click(function() {\n\t\t$(this).closest('section').find('input[type=checkbox]').prop('checked', this.checked);\n\t\t$(this).closest('section').find('.checkbox-select').closest('.thread').toggleClass(\"highlight\", this.checked);\n\t\t$(this).closest('section').find('.checkbox-select').closest('.forum').toggleClass(\"highlight\", this.checked);\n\n\t\tvar checked_boxes = $('.highlight').length;\n\n\t\tif(checked_boxes >= 1)\n\t\t{\n\t\t\t$('.inline-moderation').addClass('floating');\n\t\t}\n\n\t\tif(checked_boxes == 0)\n\t\t{\n\t\t\t$('.inline-moderation').removeClass('floating');\n\t\t}\n\n\t\t$('.inline-moderation .selection-count').text(' ('+checked_boxes+')');\n\t});\n\n/*\t$('.post.reply textarea.editor, .form textarea.editor').sceditor({\n\t\tplugins: 'bbcode',\n\t\tstyle: 'js/vendor/sceditor/jquery.sceditor.default.min.css',\n\t\temoticonsRoot: 'assets/images/',\n\t\ttoolbar: 'bold,italic,underline|font,size,color,removeformat|left,center,right|image,link,unlink|emoticon,youtube|bulletlist,orderedlist|quote,code|source',\n\t\tresizeWidth: false,\n\t\tautofocus: false,\n\t\tautofocusEnd: false\n\t});*/\n});\n\nfunction submitFormAsGet(id, newRoute) {\n\tvar form = $('#' + id);\n\tform.find(\"input[name=_token]\").val('');\n\n\tif(newRoute != null) {\n\t\tform.attr('action', newRoute);\n\t}\n\n\tform.attr('method', 'get').submit();\n\treturn false;\n}\n","(function ($, window) {\n\twindow.MyBB = window.MyBB || {};\n\n\twindow.MyBB.Cookie = {\n\t\tcookiePrefix: '',\n\t\tcookiePath: '/',\n\t\tcookieDomain: '',\n\n\t\tinit: function () {\n\t\t\tMyBB.Settings = MyBB.Settings || {};\n\t\t\tif (typeof MyBB.Settings.cookiePrefix != 'undefined') {\n\t\t\t\tthis.cookiePrefix = MyBB.Settings.cookiePrefix;\n\t\t\t}\n\t\t\tif (typeof MyBB.Settings.cookiePath != 'undefined') {\n\t\t\t\tthis.cookiePath = MyBB.Settings.cookiePath;\n\t\t\t}\n\t\t\tif (typeof MyBB.Settings.cookieDomain != 'undefined') {\n\t\t\t\tthis.cookieDomain = MyBB.Settings.cookieDomain;\n\t\t\t}\n\t\t},\n\n\t\tget: function (name) {\n\t\t\tthis.init();\n\n\t\t\tname = this.cookiePrefix + name;\n\t\t\treturn $.cookie(name);\n\t\t},\n\n\t\tset: function (name, value, expires) {\n\t\t\tthis.init();\n\n\t\t\tname = this.cookiePrefix + name;\n\t\t\tif (!expires) {\n\t\t\t\texpires = 157680000; // 5*365*24*60*60 => 5 years\n\t\t\t}\n\n\t\t\texpire = new Date();\n\t\t\texpire.setTime(expire.getTime() + (expires * 1000));\n\n\t\t\toptions = {\n\t\t\t\texpires: expire,\n\t\t\t\tpath: this.cookiePath,\n\t\t\t\tdomain: this.cookieDomain\n\t\t\t};\n\n\t\t\treturn $.cookie(name, value, options);\n\t\t},\n\n\t\tunset: function (name) {\n\t\t\tthis.init();\n\n\t\t\tname = this.cookiePrefix + name;\n\n\t\t\toptions = {\n\t\t\t\tpath: this.cookiePath,\n\t\t\t\tdomain: this.cookieDomain\n\t\t\t};\n\t\t\treturn $.removeCookie(name, options);\n\t\t}\n\t}\n})\n(jQuery, window);","(function ($, window) {\n\twindow.MyBB = window.MyBB || {};\n\n\twindow.MyBB.Spinner = {\n\t\tinProgresses: 0,\n\t\tadd: function () {\n\t\t\tthis.inProgresses++;\n\t\t\tif (this.inProgresses == 1) {\n\t\t\t\t$(\"#spinner\").show();\n\t\t\t}\n\t\t},\n\t\tremove: function () {\n\t\t\tthis.inProgresses--;\n\t\t\tif (this.inProgresses == 0) {\n\t\t\t\t$(\"#spinner\").hide();\n\t\t\t}\n\t\t}\n\t}\n})\n(jQuery, window);","(function($, window) {\n window.MyBB = window.MyBB || {};\n \n\twindow.MyBB.Modals = function Modals()\n\t{\n\t\t$(\"*[data-modal]\").on(\"click\", this.toggleModal).bind(this);\n\t};\n\n\twindow.MyBB.Modals.prototype.toggleModal = function toggleModal(event) {\n\t\tevent.preventDefault();\n\n\t\t// Check to make sure we're clicking the link and not a child of the link\n\t\tif(event.target.nodeName === \"A\")\n\t\t{\n\t\t\t// Woohoo, it's the link!\n\t\t\tvar modalOpener = event.target,\n\t\t\t\tmodalSelector = $(modalOpener).data(\"modal\"),\n\t\t\t\tmodalFind = $(modalOpener).data(\"modal-find\"),\n\t\t\t\tmodal = $('
', {\n\t \t\t\t\"class\": \"modal-dialog\",\n\t\t\t\t}),\n\t\t\t\tmodalContent = \"\";\n\t\t} else {\n\t\t\t// Nope, it's one of those darn children.\n\t\t\tvar modalOpener = event.target,\n\t\t\t\tmodalSelector = $(modalOpener).parent().data(\"modal\"),\n\t\t\t\tmodalFind = $(modalOpener).data(\"modal-find\"),\n\t\t\t\tmodal = $('
', {\n\t \t\t\t\"class\": \"modal-dialog\",\n\t\t\t\t}),\n\t\t\t\tmodalContent = \"\";\n\t\t}\n\n\t\tif (modalSelector.substring(0, 1) === \".\" || modalSelector.substring(0, 1) === \"#\") {\n\t\t\t// Assume using a local, existing HTML element.\n\t\t\tmodalContent = $(modalSelector).html();\n\t\t\tmodal.html(modalContent);\n\t\t\tmodal.appendTo(\"body\").modal({\n\t\t\t\tzIndex: 1000\n\t\t\t});\n\t\t\t$('.modalHide').hide();\n\t\t\t$(\"input[type=number]\").stepper();\n\t\t\t$(\".password-toggle\").hideShowPassword(false, true);\n\t\t} else {\n\t\t\t// Assume modal content is coming from an AJAX request\n\n\t\t\t// data-modal-find is optional, default to \"#content\"\n\t\t\tif (modalFind === undefined) {\n\t\t\t\tmodalFind = \"#content\";\n\t\t\t}\n\n\t\t\t$.get('/'+modalSelector, function(response) {\n\t\t\t\tvar responseObject = $(response);\n\n\t\t\t\tmodalContent = $(modalFind, responseObject).html();\n\t\t\t\tmodal.html(modalContent);\n\t\t\t\tmodal.appendTo(\"body\").modal({\n\t\t\t\t\tzIndex: 1000\n\t\t\t\t});\n\t\t\t\t$('.modalHide').hide();\n\t\t\t\t$(\"input[type=number]\").stepper();\n\t\t\t\t$(\".password-toggle\").hideShowPassword(false, true);\n\t\t\t});\n\t\t}\n\t};\n \n var modals = new window.MyBB.Modals(); // TODO: put this elsewhere :)\n})(jQuery, window);","(function($, window) {\n window.MyBB = window.MyBB || {};\n\n\twindow.MyBB.Posts = function Posts()\n\t{\n\t\t// Show and hide posts\n\t\t$(\".postToggle\").on(\"click\", this.togglePost).bind(this);\n\t};\n\n\t// Show and hide posts\n\twindow.MyBB.Posts.prototype.togglePost = function togglePost(event) {\n\t\tevent.preventDefault();\n\t\t// Are we minimized or not?\n\t\tif($(event.target).hasClass(\"fa-minus\"))\n\t\t{\n\t\t\t// Perhaps instead of hide, apply a CSS class?\n\t\t\t$(event.target).parent().parent().parent().addClass(\"post--hidden\");\n\t\t\t// Make button a plus sign for expanding\n\t\t\t$(event.target).addClass(\"fa-plus\");\n\t\t\t$(event.target).removeClass(\"fa-minus\");\n\n\t\t} else {\n\t\t\t// We like this person again\n\t\t\t$(event.target).parent().parent().parent().removeClass(\"post--hidden\");\n\t\t\t// Just in case we change our mind again, show the hide button\n\t\t\t$(event.target).addClass(\"fa-minus\");\n\t\t\t$(event.target).removeClass(\"fa-show\");\n\t\t}\n\t};\n\n\n\tvar posts = new window.MyBB.Posts();\n\n})(jQuery, window);","(function($, window) {\n window.MyBB = window.MyBB || {};\n \n\twindow.MyBB.Polls = function Polls()\n\t{\n\t\tthis.optionElement = $('#option-simple').clone().attr('id', '').removeClass('hidden').addClass('poll-option').hide();\n\t\t$('#option-simple').remove();\n\n\t\tthis.removeOption($('#add-poll .poll-option'));\n\n\t\t$('#new-option').click($.proxy(this.addOption, this));\n\n\t\t$('#poll-maximum-options').hide();\n\n\t\t$('#poll-is-multiple').change($.proxy(this.toggleMaxOptionsInput, this)).change();\n\n\t\tvar $addPollButton = $(\"#add-poll-button\");\n\t\t$addPollButton.click($.proxy(this.toggleAddPoll, this));\n\t\tif($addPollButton.length) {\n\t\t\tif($('#add-poll-input').val() === '1') {\n\t\t\t\t$('#add-poll').slideDown();\n\t\t\t}\n\t\t}\n\n\t\tthis.timePicker();\n\t};\n\n\twindow.MyBB.Polls.prototype.timePicker = function timePicker() {\n\t\t$('#poll-end-at').datetimepicker({\n\t\t\tformat: 'Y-m-d H:i:s',\n\t\t\tlang: $('html').attr('lang'),// TODO: use our i18n\n\t\t\tminDate: 0\n\t\t});\n\t};\n\n\twindow.MyBB.Polls.prototype.toggleAddPoll = function toggleAddPoll() {\n\t\tif($('#add-poll-input').val() === '1') {\n\t\t\t$('#add-poll-input').val(0);\n\t\t\t$('#add-poll').slideUp();\n\t\t} else {\n\t\t\t$('#add-poll-input').val(1);\n\t\t\t$('#add-poll').slideDown();\n\t\t}\n\t\treturn false;\n\t};\n\n\twindow.MyBB.Polls.prototype.addOption = function addOption(event) {\n\t\tvar num_options = $('#add-poll .poll-option').length;\n\t\tif(num_options >= 10) { // TODO: settings\n\t\t\treturn false;\n\t\t}\n\t\tvar $option = this.optionElement.clone();\n\t\t$option.find('input').attr('name', 'option['+(num_options+1)+']')\n\t\t$('#add-poll .poll-option').last().after($option);\n\t\t$option.slideDown();\n\t\tthis.removeOption($option);\n\t\treturn false;\n\t};\n\n\twindow.MyBB.Polls.prototype.removeOption = function bindRemoveOption($parent) {\n\t\t$parent.find('.remove-option').click($.proxy(function(event) {\n\t\t\tvar $me = $(event.target),\n\t\t\t\t$myParent = $me.parents('.poll-option');\n\t\t\tif($('.poll-option').length <= 2)\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t$myParent.slideUp(500);\n\n\t\t\tsetTimeout($.proxy(function() {\n\t\t\t\t$myParent.remove();\n\t\t\t\tthis.fixOptionsName();\n\t\t\t}, this), 500);\n\t\t}, this));\n\t\tif(!Modernizr.touch) {\n\t\t\t$parent.find('.remove-option').powerTip({ placement: 's', smartPlacement: true });\n\t\t}\n\t};\n\n\twindow.MyBB.Polls.prototype.fixOptionsName = function() {\n\t\tvar i = 0;\n\t\t$('#add-poll .poll-option').each(function() {\n\t\t\ti++;\n\t\t\t$(this).find('input').attr('name', 'option['+i+']');\n\t\t});\n\t};\n\n\twindow.MyBB.Polls.prototype.toggleMaxOptionsInput = function toggleMaxOptionsInput(event) {\n\t\tme = event.target;\n\t\tif($(me).is(':checked')) {\n\t\t\t$('#poll-maximum-options').slideDown();\n\t\t}\n\t\telse {\n\t\t\t$('#poll-maximum-options').slideUp();\n\t\t}\n\t};\n\n\tvar polls = new window.MyBB.Polls();\n\n})(jQuery, window);","(function ($, window) {\n\twindow.MyBB = window.MyBB || {};\n\n\twindow.MyBB.Quotes = function Quotes() {\n\n\t\t// MultiQuote\n\t\t$(\".quoteButton\").on(\"click\", this.multiQuoteButton.bind(this));\n\n\t\tthis.showQuoteBar();\n\n\t\t$(\"#quoteBar__select\").on(\"click\", $.proxy(this.addQuotes, this));\n\t\t$(\"#quoteBar__view\").on(\"click\", $.proxy(this.viewQuotes, this));\n\t\t$(\"#quoteBar__deselect\").on(\"click\", $.proxy(this.removeQuotes, this));\n\n\t\t$('.quickQuote .fast').on('click', $.proxy(this.quickQuote, this));\n\t\t$('.quickQuote .add').on('click', $.proxy(this.quickAddQuote, this));\n\n\t\t$('.quote__select').on(\"click\", $.proxy(this.quoteAdd, this));\n\t\t$('.quote__remove').on(\"click\", $.proxy(this.quoteRemove, this));\n\t\t$(\"body\").on(\"mouseup\", $.proxy(this.checkQuickQuote, this));\n\n\t\tthis.quoteButtons();\n\t};\n\n\twindow.MyBB.Quotes.prototype.quickQuote = function quickQuote(event) {\n\t\tvar $me = $(event.target);\n\t\tif (!$me.hasClass('quickQuote')) {\n\t\t\t$me = $me.parents('.quickQuote');\n\t\t}\n\n\t\tvar $post = $me.parents('.post');\n\n\t\tif ($me.data('content')) {\n\t\t\t$content = $('
');\n\t\t\t$content.html($me.data('content'));\n\t\t\tthis.addQuote($post.data('postid'), $post.data('type'), $content.text());\n\t\t}\n\t\tthis.hideQuickQuote();\n\t}\n\n\twindow.MyBB.Quotes.prototype.quickAddQuote = function quickAddQuote(event) {\n\t\tvar $me = $(event.target),\n\t\t\tquotes = this.getQuotes();\n\t\tif (!$me.hasClass('quickQuote')) {\n\t\t\t$me = $me.parents('.quickQuote');\n\t\t}\n\n\t\tvar $post = $me.parents('.post');\n\n\t\tif ($me.data('content')) {\n\t\t\t$content = $('
');\n\t\t\t$content.html($me.data('content'));\n\t\t\tquotes.push({\n\t\t\t\t'id': $post.data('type') + '_' + $post.data('postid'),\n\t\t\t\t'data': $content.text()\n\t\t\t});\n\t\t\tMyBB.Cookie.set('quotes', JSON.stringify(quotes));\n\n\t\t\tthis.showQuoteBar();\n\t\t}\n\t\tthis.hideQuickQuote();\n\t}\n\n\twindow.MyBB.Quotes.prototype.checkQuickQuote = function checkQuickQuote(event) {\n\t\tvar $me = $(event.target);\n\t\tif ($me.hasClass('quickQuote') || $me.parents('.quickQuote').length) {\n\t\t\treturn false;\n\t\t}\n\t\tif (!$me.hasClass('post')) {\n\t\t\t$me = $me.parents('.post');\n\t\t}\n\n\t\tif ($me && $me.length) {\n\t\t\tvar pid = $me.data('postid');\n\n\t\t\tif ($.trim(window.getSelection().toString())) {\n\t\t\t\tif (elementContainsSelection($me.find('.post__body')[0])) {\n\t\t\t\t\tthis.showQuickQuote(pid);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tthis.hideQuickQuote();\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthis.hideQuickQuote();\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tthis.hideQuickQuote();\n\t\t}\n\t}\n\n\twindow.MyBB.Quotes.prototype.showQuickQuote = function showQuckQuote(pid) {\n\t\tvar selection = window.getSelection(),\n\t\t\trange = selection.getRangeAt(0),\n\t\t\trect = range.getBoundingClientRect();\n\t\t$elm = $(\"#post-\" + pid).find('.quickQuote').show().data('content', $.trim(window.getSelection().toString()));\n\t\t$elm.css({\n\t\t\t'top': (window.scrollY + rect.top - $elm.outerHeight() - 4) + 'px',\n\t\t\t'left': (window.scrollX + rect.left - (($elm.outerWidth() - rect.width) / 2)) + 'px'\n\t\t});\n\t}\n\n\twindow.MyBB.Quotes.prototype.hideQuickQuote = function () {\n\t\t$('.post .quickQuote').hide().data('content', '');\n\t}\n\n\twindow.MyBB.Quotes.prototype.getQuotes = function getQuotes() {\n\t\tvar quotes = MyBB.Cookie.get('quotes'),\n\t\t\tmyQuotes = [];\n\t\tif (!quotes) {\n\t\t\tquotes = [];\n\t\t}\n\t\telse {\n\t\t\tquotes = JSON.parse(quotes);\n\t\t}\n\t\t$.each(quotes, function (key, quote) {\n\t\t\tif (quote != null) {\n\t\t\t\tmyQuotes.push(quote);\n\t\t\t}\n\t\t});\n\n\t\tMyBB.Cookie.set('quotes', JSON.stringify(myQuotes));\n\t\treturn myQuotes;\n\t};\n\n\t// MultiQuote\n\twindow.MyBB.Quotes.prototype.multiQuoteButton = function multiQuoteButton(event) {\n\t\tevent.preventDefault();\n\t\tvar $me = $(event.target);\n\t\tif (!$me.hasClass('quoteButton')) {\n\t\t\t$me = $me.parents('.quoteButton');\n\t\t}\n\t\tvar $post = $me.parents('.post');\n\n\t\tvar postId = parseInt($post.data('postid')),\n\t\t\ttype = $post.data('type'),\n\t\t\tquotes = this.getQuotes();\n\n\t\tif (postId) {\n\t\t\tvar removed = false;\n\t\t\t$.each(quotes, function(key, quote) {\n\t\t\t\tif(typeof quote != 'string') {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif(quote == type + '_' + postId) {\n\t\t\t\t\tdelete quotes[key];\n\t\t\t\t\tremoved = true;\n\t\t\t\t}\n\t\t\t});\n\t\t\tif (!removed) {\n\t\t\t\tquotes.push(type + '_' + postId);\n\t\t\t\t$me.find('.quoteButton__add').hide();\n\t\t\t\t$me.find('.quoteButton__remove').show();\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$me.find('.quoteButton__add').show();\n\t\t\t\t$me.find('.quoteButton__remove').hide();\n\t\t\t}\n\n\t\t\tMyBB.Cookie.set('quotes', JSON.stringify(quotes));\n\n\t\t\tthis.showQuoteBar();\n\t\t\treturn false;\n\t\t}\n\n\t};\n\n\twindow.MyBB.Quotes.prototype.showQuoteBar = function showQuoteBar() {\n\t\tvar quotes = this.getQuotes();\n\n\t\tif (quotes.length) {\n\t\t\t$(\"#quoteBar\").show();\n\t\t}\n\t\telse {\n\t\t\t$(\"#quoteBar\").hide();\n\t\t}\n\t};\n\n\twindow.MyBB.Quotes.prototype.addQuotes = function addQuotes() {\n\t\tvar quotes = this.getQuotes(),\n\t\t\t$quoteBar = $(\"#quoteBar\"),\n\t\t\t$textarea = $($quoteBar.data('textarea'));\n\n\t\tMyBB.Spinner.add();\n\n\t\t$.ajax({\n\t\t\turl: '/post/quotes',\n\t\t\tdata: {\n\t\t\t\t'posts': quotes,\n\t\t\t\t'_token': $quoteBar.parents('form').find('input[name=_token]').val()\n\t\t\t},\n\t\t\tmethod: 'POST'\n\t\t}).done(function (json) {\n\t\t\tif (json.error) {\n\t\t\t\talert(json.error);// TODO: js error\n\t\t\t}\n\t\t\telse {\n\t\t\t\tvar value = $textarea.val();\n\t\t\t\tif (value && value.substr(-2) != \"\\n\\n\") {\n\t\t\t\t\tif (value.substr(-1) != \"\\n\") {\n\t\t\t\t\t\tvalue += \"\\n\";\n\t\t\t\t\t}\n\t\t\t\t\tvalue += \"\\n\";\n\t\t\t\t}\n\t\t\t\t$textarea.val(value + json.message).focus();\n\t\t\t}\n\t\t\t$.modal.close();\n\t\t}).always(function () {\n\t\t\tMyBB.Spinner.remove();\n\t\t});\n\n\t\t$quoteBar.hide();\n\t\tMyBB.Cookie.unset('quotes');\n\t\tthis.quoteButtons();\n\t\treturn false;\n\t};\n\n\twindow.MyBB.Quotes.prototype.addQuote = function addQuote(postid, type, content) {\n\t\tvar $textarea = $(\"#message\");\n\n\t\tMyBB.Spinner.add();\n\n\t\t$.ajax({\n\t\t\turl: '/post/quotes',\n\t\t\tdata: {\n\t\t\t\t'posts': [\n\t\t\t\t\t{\n\t\t\t\t\t\t'id': type + '_' + postid,\n\t\t\t\t\t\t'data': content\n\t\t\t\t\t}\n\t\t\t\t],\n\t\t\t\t'_token': $(\"#quoteBar\").parents('form').find('input[name=_token]').val()\n\t\t\t},\n\t\t\tmethod: 'POST'\n\t\t}).done(function (json) {\n\t\t\tif (json.error) {\n\t\t\t\talert(json.error);// TODO: js error\n\t\t\t}\n\t\t\telse {\n\t\t\t\tvar value = $textarea.val();\n\t\t\t\tif (value && value.substr(-2) != \"\\n\\n\") {\n\t\t\t\t\tif (value.substr(-1) != \"\\n\") {\n\t\t\t\t\t\tvalue += \"\\n\";\n\t\t\t\t\t}\n\t\t\t\t\tvalue += \"\\n\";\n\t\t\t\t}\n\t\t\t\t$textarea.val(value + json.message).focus();\n\t\t\t}\n\t\t}).always(function () {\n\t\t\tMyBB.Spinner.remove();\n\t\t});\n\n\t\tthis.hideQuickQuote();\n\n\t\treturn false;\n\t};\n\n\twindow.MyBB.Quotes.prototype.viewQuotes = function viewQuotes() {\n\t\tMyBB.Spinner.add();\n\n\t\t$.ajax({\n\t\t\turl: '/post/quotes/all',\n\t\t\tdata: {\n\t\t\t\t'posts': this.getQuotes(),\n\t\t\t\t'_token': $(\"#quoteBar\").parents('form').find('input[name=_token]').val()\n\t\t\t},\n\t\t\tmethod: 'POST'\n\t\t}).done($.proxy(function (data) {\n\t\t\tvar modalContent = $(\"#content\", $(data)),\n\t\t\t\tmodal = $('
', {\n\t\t\t\t\t\"class\": \"modal-dialog viewQuotes\"\n\t\t\t\t});\n\t\t\tmodalContent.find('.post-quotes').css({\n\t\t\t\t'max-height': ($(window).height()-100)+'px'\n\t\t\t});\n\t\t\tmodal.html(modalContent.html());\n\t\t\tmodal.appendTo(\"body\").modal({\n\t\t\t\tzIndex: 1000\n\t\t\t});\n\n\t\t\tif(Modernizr.touch)\n\t\t\t{\n\t\t\t\t$('.radio-buttons .radio-button, .checkbox-buttons .checkbox-button').click(function() {\n\n\t\t\t\t});\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$('span.icons i, a, .caption, time').powerTip({ placement: 's', smartPlacement: true });\n\t\t\t}\n\n\t\t\t$('.quote__select').on(\"click\", $.proxy(this.quoteAdd, this));\n\t\t\t$('.quote__remove').on(\"click\", $.proxy(this.quoteRemove, this));\n\t\t\t$(\".selectAllQuotes\").on(\"click\", $.proxy(this.addQuotes, this));\n\t\t\t$('.modalHide').hide();\n\t\t}, this)).always(function () {\n\t\t\tMyBB.Spinner.remove();\n\t\t});\n\n\t\tthis.hideQuickQuote();\n\n\t\treturn false;\n\t};\n\n\twindow.MyBB.Quotes.prototype.removeQuotes = function removeQuotes() {\n\t\t$quoteBar = $(\"#quoteBar\");\n\t\t$quoteBar.hide();\n\t\tMyBB.Cookie.unset('quotes');\n\t\tthis.quoteButtons();\n\t\treturn false;\n\t};\n\n\twindow.MyBB.Quotes.prototype.quoteButtons = function quoteButtons() {\n\t\tvar quotes = this.getQuotes();\n\n\t\t$('.quoteButton__add').show();\n\t\t$('.quoteButton__remove').hide();\n\n\t\t$.each(quotes, function (key, quote) {\n\t\t\tif (typeof quote != 'string') {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tquote = quote.split('_');\n\t\t\ttype = quote[0];\n\t\t\tpostId = parseInt(quote[1]);\n\t\t\tvar $quoteButton = $(\"#post-\" + postId + \"[data-type='\" + type + \"']\").find('.quoteButton');\n\t\t\t$quoteButton.find('.quoteButton__add').hide();\n\t\t\t$quoteButton.find('.quoteButton__remove').show();\n\t\t})\n\t}\n\n\twindow.MyBB.Quotes.prototype.quoteAdd = function quoteAdd(event) {\n\t\tvar $me = $(event.target),\n\t\t\t$post = $me.parents('.content-quote'),\n\t\t\t$textarea = $(\"#message\"),\n\t\t\tquotes = this.getQuotes();\n\n\t\tvar value = $textarea.val();\n\t\tif (value && value.substr(-2) != \"\\n\\n\") {\n\t\t\tif (value.substr(-1) != \"\\n\") {\n\t\t\t\tvalue += \"\\n\";\n\t\t\t}\n\t\t\tvalue += \"\\n\";\n\t\t}\n\t\t$textarea.val(value + $post.data('quote')).focus();\n\n\t\tdelete quotes[$post.data('id')];\n\t\tMyBB.Cookie.set('quotes', JSON.stringify(quotes));\n\t\t$post.slideUp('fast');\n\n\t\tif(this.getQuotes().length == 0) {\n\t\t\t$.modal.close();\n\t\t}\n\n\t\twhile($post.next().length) {\n\t\t\t$post = $post.next();\n\t\t\t$post.data('id', $post.data('id')-1);\n\t\t}\n\n\t\tthis.quoteButtons();\n\t\tthis.showQuoteBar();\n\t}\n\n\twindow.MyBB.Quotes.prototype.quoteRemove = function quoteRemove(event) {\n\t\tvar $me = $(event.target),\n\t\t\t$post = $me.parents('.content-quote'),\n\t\t\tquotes = this.getQuotes();\n\n\t\tdelete quotes[$post.data('id')];\n\t\tMyBB.Cookie.set('quotes', JSON.stringify(quotes));\n\t\t$post.slideUp('fast');\n\n\t\tif(this.getQuotes().length == 0) {\n\t\t\t$.modal.close();\n\t\t}\n\n\t\twhile($post.next().length) {\n\t\t\t$post = $post.next();\n\t\t\t$post.data('id', $post.data('id')-1);\n\t\t}\n\n\t\tthis.quoteButtons();\n\t\tthis.showQuoteBar();\n\t\treturn false;\n\t}\n\n\tvar quotes = new window.MyBB.Quotes();\n\n\n\t// Helper functions\n\t// http://stackoverflow.com/questions/8339857\n\tfunction isOrContains(node, container) {\n\t\twhile (node) {\n\t\t\tif (node === container) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tnode = node.parentNode;\n\t\t}\n\t\treturn false;\n\t}\n\n\tfunction elementContainsSelection(el) {\n\t\tvar sel;\n\t\tif (window.getSelection) {\n\t\t\tsel = window.getSelection();\n\t\t\tif (sel.rangeCount > 0) {\n\t\t\t\tfor (var i = 0; i < sel.rangeCount; ++i) {\n\t\t\t\t\tif (!isOrContains(sel.getRangeAt(i).commonAncestorContainer, el)) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t}\n\t\t} else if ((sel = document.selection) && sel.type != \"Control\") {\n\t\t\treturn isOrContains(sel.createRange().parentElement(), el);\n\t\t}\n\t\treturn false;\n\t}\n\n})\n(jQuery, window);"],"sourceRoot":"/source/"} \ No newline at end of file +{"version":3,"sources":["other.js","cookie.js","spinner.js","modal.js","post.js","poll.js","quote.js"],"names":["getTooltipContent","element","targetElement","content","tipText","data","DATA_POWERTIP","tipObject","DATA_POWERTIPJQ","tipTarget","DATA_POWERTIPTARGET","$","isFunction","call","length","clone","html","escapeHTML","string","String","replace","s","entityMap","submitFormAsGet","id","newRoute","form","find","val","attr","submit","window","MyBB","Cookie","cookiePrefix","cookiePath","cookieDomain","init","Settings","this","get","name","cookie","set","value","expires","expire","Date","setTime","getTime","options","path","domain","unset","removeCookie","jQuery","Spinner","inProgresses","add","show","remove","hide","Modals","on","toggleModal","bind","prototype","event","preventDefault","target","nodeName","modalOpener","modalSelector","modalFind","modal","class","modalContent","parent","substring","appendTo","zIndex","stepper","hideShowPassword","undefined","response","responseObject","Posts","togglePost","hasClass","addClass","removeClass","Polls","optionElement","removeOption","click","proxy","addOption","change","toggleMaxOptionsInput","$addPollButton","toggleAddPoll","slideDown","timePicker","datetimepicker","format","lang","minDate","slideUp","num_options","$option","last","after","$parent","$me","$myParent","parents","setTimeout","fixOptionsName","Modernizr","touch","powerTip","placement","smartPlacement","i","each","me","is","isOrContains","node","container","parentNode","elementContainsSelection","el","sel","getSelection","rangeCount","getRangeAt","commonAncestorContainer","document","selection","type","createRange","parentElement","Quotes","multiQuoteButton","showQuoteBar","addQuotes","viewQuotes","removeQuotes","quickQuote","quickAddQuote","quoteAdd","quoteRemove","checkQuickQuote","quoteButtons","$post","$content","addQuote","text","hideQuickQuote","quotes","getQuotes","push","JSON","stringify","pid","trim","toString","showQuickQuote","range","rect","getBoundingClientRect","$elm","css","top","scrollY","outerHeight","left","scrollX","outerWidth","width","myQuotes","parse","key","quote","postId","parseInt","removed","$quoteBar","$textarea","ajax","url","posts","_token","method","done","json","error","substr","message","focus","close","always","postid","max-height","height","split","$quoteButton","next","dropit","submenuEl","triggerEl","removeAttr","closest","toggleClass","checked","checked_boxes","prop","&","<",">","\"","'","/"],"mappings":"AAqIA,QAAAA,mBAAAC,GACA,GAGAC,GACAC,EAJAC,EAAAH,EAAAI,KAAAC,eACAC,EAAAN,EAAAI,KAAAG,iBACAC,EAAAR,EAAAI,KAAAK,oBAwBA,OApBAN,IACAO,EAAAC,WAAAR,KACAA,EAAAA,EAAAS,KAAAZ,EAAA,KAEAE,EAAAC,GACAG,GACAI,EAAAC,WAAAL,KACAA,EAAAA,EAAAM,KAAAZ,EAAA,KAEAM,EAAAO,OAAA,IACAX,EAAAI,EAAAQ,OAAA,GAAA,KAEAN,IACAP,EAAAS,EAAA,IAAAF,GACAP,EAAAY,OAAA,IACAX,EAAAD,EAAAc,SAKAC,WAAAd,GAcA,QAAAc,YAAAC,GACA,MAAAC,QAAAD,GAAAE,QAAA,aAAA,SAAAC,GACA,MAAAC,WAAAD,KAIA,QAAAE,iBAAAC,EAAAC,GACA,GAAAC,GAAAf,EAAA,IAAAa,EAQA,OAPAE,GAAAC,KAAA,sBAAAC,IAAA,IAEA,MAAAH,GACAC,EAAAG,KAAA,SAAAJ,GAGAC,EAAAG,KAAA,SAAA,OAAAC,UACA,GC7LA,SAAAnB,EAAAoB,GACAA,EAAAC,KAAAD,EAAAC,SAEAD,EAAAC,KAAAC,QACAC,a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\n\n$(function () {\n\n\t$('.nojs').hide();\n\n\tif(Modernizr.touch)\n\t{\n\t\t$('.radio-buttons .radio-button, .checkbox-buttons .checkbox-button').click(function() {\n\n\t\t});\n\t}\n\telse\n\t{\n\t\t$('span.icons i, a, .caption, time').powerTip({ placement: 's', smartPlacement: true });\n\t}\n\n\t$('.user-navigation__links, #main-menu').dropit({ submenuEl: 'div.dropdown' });\n\t$('.dropdown-menu').dropit({ submenuEl: 'ul.dropdown', triggerEl: 'span.dropdown-button' });\n\t$(\"input[type=number]\").stepper();\n\t$(\".password-toggle\").hideShowPassword(false, true);\n\n\t$('.clear-selection-posts a').click(function(event) {\n\t\tevent.preventDefault();\n\t\t$('.thread').find('input[type=checkbox]:checked').removeAttr('checked').closest(\".post\").removeClass(\"highlight\");\n\t\t$('.inline-moderation').removeClass('floating');\n\t});\n\n\t$('.clear-selection-threads a').click(function(event) {\n\t\tevent.preventDefault();\n\t\t$('.thread-list').find('input[type=checkbox]:checked').removeAttr('checked').closest(\".thread\").removeClass(\"highlight\");\n\t\t$('.checkbox-select.check-all').find('input[type=checkbox]:checked').removeAttr('checked');\n\t\t$('.inline-moderation').removeClass('floating');\n\t});\n\n\t$('.clear-selection-forums a').click(function(event) {\n\t\tevent.preventDefault();\n\t\t$('.forum-list').find('input[type=checkbox]:checked').removeAttr('checked').closest(\".forum\").removeClass(\"highlight\");\n\t\t$('.checkbox-select.check-all').find('input[type=checkbox]:checked').removeAttr('checked');\n\t\t$('.inline-moderation').removeClass('floating');\n\t});\n\n\t$(\"#search .search-button\").click(function(event) {\n\t\tevent.preventDefault();\n\t\t$(\"#search .search-container\").slideDown();\n\t});\n\n\t$(\".post :checkbox\").change(function() {\n\t\t$(this).closest(\".post\").toggleClass(\"highlight\", this.checked);\n\n\t\tvar checked_boxes = $('.highlight').length;\n\n\t\tif(checked_boxes == 1)\n\t\t{\n\t\t\t$('.inline-moderation').addClass('floating');\n\t\t}\n\n\t\tif(checked_boxes == 0)\n\t\t{\n\t\t\t$('.inline-moderation').removeClass('floating');\n\t\t}\n\n\t\t$('.inline-moderation .selection-count').text(' ('+checked_boxes+')')\n\t});\n\n\t$(\".thread .checkbox-select :checkbox\").change(function() {\n\t\t$(this).closest(\".thread\").toggleClass(\"highlight\", this.checked);\n\n\t\tvar checked_boxes = $('.highlight').length;\n\n\t\tif(checked_boxes == 1)\n\t\t{\n\t\t\t$('.inline-moderation').addClass('floating');\n\t\t}\n\n\t\tif(checked_boxes == 0)\n\t\t{\n\t\t\t$('.inline-moderation').removeClass('floating');\n\t\t}\n\n\t\t$('.inline-moderation .selection-count').text(' ('+checked_boxes+')')\n\t});\n\n\t$(\".forum .checkbox-select :checkbox\").change(function() {\n\t\t$(this).closest(\".forum\").toggleClass(\"highlight\", this.checked);\n\n\t\tvar checked_boxes = $('.highlight').length;\n\n\t\tif(checked_boxes == 1)\n\t\t{\n\t\t\t$('.inline-moderation').addClass('floating');\n\t\t}\n\n\t\tif(checked_boxes == 0)\n\t\t{\n\t\t\t$('.inline-moderation').removeClass('floating');\n\t\t}\n\n\t\t$('.inline-moderation .selection-count').text(' ('+checked_boxes+')');\n\t});\n\n\t$(\".checkbox-select.check-all :checkbox\").click(function() {\n\t\t$(this).closest('section').find('input[type=checkbox]').prop('checked', this.checked);\n\t\t$(this).closest('section').find('.checkbox-select').closest('.thread').toggleClass(\"highlight\", this.checked);\n\t\t$(this).closest('section').find('.checkbox-select').closest('.forum').toggleClass(\"highlight\", this.checked);\n\n\t\tvar checked_boxes = $('.highlight').length;\n\n\t\tif(checked_boxes >= 1)\n\t\t{\n\t\t\t$('.inline-moderation').addClass('floating');\n\t\t}\n\n\t\tif(checked_boxes == 0)\n\t\t{\n\t\t\t$('.inline-moderation').removeClass('floating');\n\t\t}\n\n\t\t$('.inline-moderation .selection-count').text(' ('+checked_boxes+')');\n\t});\n\n/*\t$('.post.reply textarea.editor, .form textarea.editor').sceditor({\n\t\tplugins: 'bbcode',\n\t\tstyle: 'js/vendor/sceditor/jquery.sceditor.default.min.css',\n\t\temoticonsRoot: 'assets/images/',\n\t\ttoolbar: 'bold,italic,underline|font,size,color,removeformat|left,center,right|image,link,unlink|emoticon,youtube|bulletlist,orderedlist|quote,code|source',\n\t\tresizeWidth: false,\n\t\tautofocus: false,\n\t\tautofocusEnd: false\n\t});*/\n});\n\n// Overwrite the powertip helper function - it's nearly the same\nfunction getTooltipContent(element) {\n\tvar tipText = element.data(DATA_POWERTIP),\n\t\ttipObject = element.data(DATA_POWERTIPJQ),\n\t\ttipTarget = element.data(DATA_POWERTIPTARGET),\n\t\ttargetElement,\n\t\tcontent;\n\n\tif (tipText) {\n\t\tif ($.isFunction(tipText)) {\n\t\t\ttipText = tipText.call(element[0]);\n\t\t}\n\t\tcontent = tipText;\n\t} else if (tipObject) {\n\t\tif ($.isFunction(tipObject)) {\n\t\t\ttipObject = tipObject.call(element[0]);\n\t\t}\n\t\tif (tipObject.length > 0) {\n\t\t\tcontent = tipObject.clone(true, true);\n\t\t}\n\t} else if (tipTarget) {\n\t\ttargetElement = $('#' + tipTarget);\n\t\tif (targetElement.length > 0) {\n\t\t\tcontent = targetElement.html();\n\t\t}\n\t}\n\n\t// Except we're escaping html\n\treturn escapeHTML(content);\n}\n\n// Source: http://stackoverflow.com/questions/24816/escaping-html-strings-with-jquery\n\nvar entityMap = {\n\t\"&\": \"&\",\n\t\"<\": \"<\",\n\t\">\": \">\",\n\t'\"': '"',\n\t\"'\": ''',\n\t\"/\": '/'\n};\n\nfunction escapeHTML(string) {\n\treturn String(string).replace(/[&<>\"'\\/]/g, function (s) {\n\t\treturn entityMap[s];\n\t});\n}\n\nfunction submitFormAsGet(id, newRoute) {\n\tvar form = $('#' + id);\n\tform.find(\"input[name=_token]\").val('');\n\n\tif(newRoute != null) {\n\t\tform.attr('action', newRoute);\n\t}\n\n\tform.attr('method', 'get').submit();\n\treturn false;\n}\n","(function ($, window) {\n\twindow.MyBB = window.MyBB || {};\n\n\twindow.MyBB.Cookie = {\n\t\tcookiePrefix: '',\n\t\tcookiePath: '/',\n\t\tcookieDomain: '',\n\n\t\tinit: function () {\n\t\t\tMyBB.Settings = MyBB.Settings || {};\n\t\t\tif (typeof MyBB.Settings.cookiePrefix != 'undefined') {\n\t\t\t\tthis.cookiePrefix = MyBB.Settings.cookiePrefix;\n\t\t\t}\n\t\t\tif (typeof MyBB.Settings.cookiePath != 'undefined') {\n\t\t\t\tthis.cookiePath = MyBB.Settings.cookiePath;\n\t\t\t}\n\t\t\tif (typeof MyBB.Settings.cookieDomain != 'undefined') {\n\t\t\t\tthis.cookieDomain = MyBB.Settings.cookieDomain;\n\t\t\t}\n\t\t},\n\n\t\tget: function (name) {\n\t\t\tthis.init();\n\n\t\t\tname = this.cookiePrefix + name;\n\t\t\treturn $.cookie(name);\n\t\t},\n\n\t\tset: function (name, value, expires) {\n\t\t\tthis.init();\n\n\t\t\tname = this.cookiePrefix + name;\n\t\t\tif (!expires) {\n\t\t\t\texpires = 157680000; // 5*365*24*60*60 => 5 years\n\t\t\t}\n\n\t\t\texpire = new Date();\n\t\t\texpire.setTime(expire.getTime() + (expires * 1000));\n\n\t\t\toptions = {\n\t\t\t\texpires: expire,\n\t\t\t\tpath: this.cookiePath,\n\t\t\t\tdomain: this.cookieDomain\n\t\t\t};\n\n\t\t\treturn $.cookie(name, value, options);\n\t\t},\n\n\t\tunset: function (name) {\n\t\t\tthis.init();\n\n\t\t\tname = this.cookiePrefix + name;\n\n\t\t\toptions = {\n\t\t\t\tpath: this.cookiePath,\n\t\t\t\tdomain: this.cookieDomain\n\t\t\t};\n\t\t\treturn $.removeCookie(name, options);\n\t\t}\n\t}\n})\n(jQuery, window);","(function ($, window) {\n\twindow.MyBB = window.MyBB || {};\n\n\twindow.MyBB.Spinner = {\n\t\tinProgresses: 0,\n\t\tadd: function () {\n\t\t\tthis.inProgresses++;\n\t\t\tif (this.inProgresses == 1) {\n\t\t\t\t$(\"#spinner\").show();\n\t\t\t}\n\t\t},\n\t\tremove: function () {\n\t\t\tthis.inProgresses--;\n\t\t\tif (this.inProgresses == 0) {\n\t\t\t\t$(\"#spinner\").hide();\n\t\t\t}\n\t\t}\n\t}\n})\n(jQuery, window);","(function($, window) {\n window.MyBB = window.MyBB || {};\n \n\twindow.MyBB.Modals = function Modals()\n\t{\n\t\t$(\"*[data-modal]\").on(\"click\", this.toggleModal).bind(this);\n\t};\n\n\twindow.MyBB.Modals.prototype.toggleModal = function toggleModal(event) {\n\t\tevent.preventDefault();\n\n\t\t// Check to make sure we're clicking the link and not a child of the link\n\t\tif(event.target.nodeName === \"A\")\n\t\t{\n\t\t\t// Woohoo, it's the link!\n\t\t\tvar modalOpener = event.target,\n\t\t\t\tmodalSelector = $(modalOpener).data(\"modal\"),\n\t\t\t\tmodalFind = $(modalOpener).data(\"modal-find\"),\n\t\t\t\tmodal = $('
', {\n\t \t\t\t\"class\": \"modal-dialog\",\n\t\t\t\t}),\n\t\t\t\tmodalContent = \"\";\n\t\t} else {\n\t\t\t// Nope, it's one of those darn children.\n\t\t\tvar modalOpener = event.target,\n\t\t\t\tmodalSelector = $(modalOpener).parent().data(\"modal\"),\n\t\t\t\tmodalFind = $(modalOpener).data(\"modal-find\"),\n\t\t\t\tmodal = $('
', {\n\t \t\t\t\"class\": \"modal-dialog\",\n\t\t\t\t}),\n\t\t\t\tmodalContent = \"\";\n\t\t}\n\n\t\tif (modalSelector.substring(0, 1) === \".\" || modalSelector.substring(0, 1) === \"#\") {\n\t\t\t// Assume using a local, existing HTML element.\n\t\t\tmodalContent = $(modalSelector).html();\n\t\t\tmodal.html(modalContent);\n\t\t\tmodal.appendTo(\"body\").modal({\n\t\t\t\tzIndex: 1000\n\t\t\t});\n\t\t\t$('.modalHide').hide();\n\t\t\t$(\"input[type=number]\").stepper();\n\t\t\t$(\".password-toggle\").hideShowPassword(false, true);\n\t\t} else {\n\t\t\t// Assume modal content is coming from an AJAX request\n\n\t\t\t// data-modal-find is optional, default to \"#content\"\n\t\t\tif (modalFind === undefined) {\n\t\t\t\tmodalFind = \"#content\";\n\t\t\t}\n\n\t\t\t$.get('/'+modalSelector, function(response) {\n\t\t\t\tvar responseObject = $(response);\n\n\t\t\t\tmodalContent = $(modalFind, responseObject).html();\n\t\t\t\tmodal.html(modalContent);\n\t\t\t\tmodal.appendTo(\"body\").modal({\n\t\t\t\t\tzIndex: 1000\n\t\t\t\t});\n\t\t\t\t$('.modalHide').hide();\n\t\t\t\t$(\"input[type=number]\").stepper();\n\t\t\t\t$(\".password-toggle\").hideShowPassword(false, true);\n\t\t\t});\n\t\t}\n\t};\n \n var modals = new window.MyBB.Modals(); // TODO: put this elsewhere :)\n})(jQuery, window);","(function($, window) {\n window.MyBB = window.MyBB || {};\n\n\twindow.MyBB.Posts = function Posts()\n\t{\n\t\t// Show and hide posts\n\t\t$(\".postToggle\").on(\"click\", this.togglePost).bind(this);\n\t};\n\n\t// Show and hide posts\n\twindow.MyBB.Posts.prototype.togglePost = function togglePost(event) {\n\t\tevent.preventDefault();\n\t\t// Are we minimized or not?\n\t\tif($(event.target).hasClass(\"fa-minus\"))\n\t\t{\n\t\t\t// Perhaps instead of hide, apply a CSS class?\n\t\t\t$(event.target).parent().parent().parent().addClass(\"post--hidden\");\n\t\t\t// Make button a plus sign for expanding\n\t\t\t$(event.target).addClass(\"fa-plus\");\n\t\t\t$(event.target).removeClass(\"fa-minus\");\n\n\t\t} else {\n\t\t\t// We like this person again\n\t\t\t$(event.target).parent().parent().parent().removeClass(\"post--hidden\");\n\t\t\t// Just in case we change our mind again, show the hide button\n\t\t\t$(event.target).addClass(\"fa-minus\");\n\t\t\t$(event.target).removeClass(\"fa-show\");\n\t\t}\n\t};\n\n\n\tvar posts = new window.MyBB.Posts();\n\n})(jQuery, window);","(function($, window) {\n window.MyBB = window.MyBB || {};\n \n\twindow.MyBB.Polls = function Polls()\n\t{\n\t\tthis.optionElement = $('#option-simple').clone().attr('id', '').removeClass('hidden').addClass('poll-option').hide();\n\t\t$('#option-simple').remove();\n\n\t\tthis.removeOption($('#add-poll .poll-option'));\n\n\t\t$('#new-option').click($.proxy(this.addOption, this));\n\n\t\t$('#poll-maximum-options').hide();\n\n\t\t$('#poll-is-multiple').change($.proxy(this.toggleMaxOptionsInput, this)).change();\n\n\t\tvar $addPollButton = $(\"#add-poll-button\");\n\t\t$addPollButton.click($.proxy(this.toggleAddPoll, this));\n\t\tif($addPollButton.length) {\n\t\t\tif($('#add-poll-input').val() === '1') {\n\t\t\t\t$('#add-poll').slideDown();\n\t\t\t}\n\t\t}\n\n\t\tthis.timePicker();\n\t};\n\n\twindow.MyBB.Polls.prototype.timePicker = function timePicker() {\n\t\t$('#poll-end-at').datetimepicker({\n\t\t\tformat: 'Y-m-d H:i:s',\n\t\t\tlang: $('html').attr('lang'),// TODO: use our i18n\n\t\t\tminDate: 0\n\t\t});\n\t};\n\n\twindow.MyBB.Polls.prototype.toggleAddPoll = function toggleAddPoll() {\n\t\tif($('#add-poll-input').val() === '1') {\n\t\t\t$('#add-poll-input').val(0);\n\t\t\t$('#add-poll').slideUp();\n\t\t} else {\n\t\t\t$('#add-poll-input').val(1);\n\t\t\t$('#add-poll').slideDown();\n\t\t}\n\t\treturn false;\n\t};\n\n\twindow.MyBB.Polls.prototype.addOption = function addOption(event) {\n\t\tvar num_options = $('#add-poll .poll-option').length;\n\t\tif(num_options >= 10) { // TODO: settings\n\t\t\treturn false;\n\t\t}\n\t\tvar $option = this.optionElement.clone();\n\t\t$option.find('input').attr('name', 'option['+(num_options+1)+']')\n\t\t$('#add-poll .poll-option').last().after($option);\n\t\t$option.slideDown();\n\t\tthis.removeOption($option);\n\t\treturn false;\n\t};\n\n\twindow.MyBB.Polls.prototype.removeOption = function bindRemoveOption($parent) {\n\t\t$parent.find('.remove-option').click($.proxy(function(event) {\n\t\t\tvar $me = $(event.target),\n\t\t\t\t$myParent = $me.parents('.poll-option');\n\t\t\tif($('.poll-option').length <= 2)\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t$myParent.slideUp(500);\n\n\t\t\tsetTimeout($.proxy(function() {\n\t\t\t\t$myParent.remove();\n\t\t\t\tthis.fixOptionsName();\n\t\t\t}, this), 500);\n\t\t}, this));\n\t\tif(!Modernizr.touch) {\n\t\t\t$parent.find('.remove-option').powerTip({ placement: 's', smartPlacement: true });\n\t\t}\n\t};\n\n\twindow.MyBB.Polls.prototype.fixOptionsName = function() {\n\t\tvar i = 0;\n\t\t$('#add-poll .poll-option').each(function() {\n\t\t\ti++;\n\t\t\t$(this).find('input').attr('name', 'option['+i+']');\n\t\t});\n\t};\n\n\twindow.MyBB.Polls.prototype.toggleMaxOptionsInput = function toggleMaxOptionsInput(event) {\n\t\tme = event.target;\n\t\tif($(me).is(':checked')) {\n\t\t\t$('#poll-maximum-options').slideDown();\n\t\t}\n\t\telse {\n\t\t\t$('#poll-maximum-options').slideUp();\n\t\t}\n\t};\n\n\tvar polls = new window.MyBB.Polls();\n\n})(jQuery, window);","(function ($, window) {\n\twindow.MyBB = window.MyBB || {};\n\n\twindow.MyBB.Quotes = function Quotes() {\n\n\t\t// MultiQuote\n\t\t$(\".quoteButton\").on(\"click\", this.multiQuoteButton.bind(this));\n\n\t\tthis.showQuoteBar();\n\n\t\t$(\"#quoteBar__select\").on(\"click\", $.proxy(this.addQuotes, this));\n\t\t$(\"#quoteBar__view\").on(\"click\", $.proxy(this.viewQuotes, this));\n\t\t$(\"#quoteBar__deselect\").on(\"click\", $.proxy(this.removeQuotes, this));\n\n\t\t$('.quickQuote .fast').on('click', $.proxy(this.quickQuote, this));\n\t\t$('.quickQuote .add').on('click', $.proxy(this.quickAddQuote, this));\n\n\t\t$('.quote__select').on(\"click\", $.proxy(this.quoteAdd, this));\n\t\t$('.quote__remove').on(\"click\", $.proxy(this.quoteRemove, this));\n\t\t$(\"body\").on(\"mouseup\", $.proxy(this.checkQuickQuote, this));\n\n\t\tthis.quoteButtons();\n\t};\n\n\twindow.MyBB.Quotes.prototype.quickQuote = function quickQuote(event) {\n\t\tvar $me = $(event.target);\n\t\tif (!$me.hasClass('quickQuote')) {\n\t\t\t$me = $me.parents('.quickQuote');\n\t\t}\n\n\t\tvar $post = $me.parents('.post');\n\n\t\tif ($me.data('content')) {\n\t\t\t$content = $('
');\n\t\t\t$content.html($me.data('content'));\n\t\t\tthis.addQuote($post.data('postid'), $post.data('type'), $content.text());\n\t\t}\n\t\tthis.hideQuickQuote();\n\t}\n\n\twindow.MyBB.Quotes.prototype.quickAddQuote = function quickAddQuote(event) {\n\t\tvar $me = $(event.target),\n\t\t\tquotes = this.getQuotes();\n\t\tif (!$me.hasClass('quickQuote')) {\n\t\t\t$me = $me.parents('.quickQuote');\n\t\t}\n\n\t\tvar $post = $me.parents('.post');\n\n\t\tif ($me.data('content')) {\n\t\t\t$content = $('
');\n\t\t\t$content.html($me.data('content'));\n\t\t\tquotes.push({\n\t\t\t\t'id': $post.data('type') + '_' + $post.data('postid'),\n\t\t\t\t'data': $content.text()\n\t\t\t});\n\t\t\tMyBB.Cookie.set('quotes', JSON.stringify(quotes));\n\n\t\t\tthis.showQuoteBar();\n\t\t}\n\t\tthis.hideQuickQuote();\n\t}\n\n\twindow.MyBB.Quotes.prototype.checkQuickQuote = function checkQuickQuote(event) {\n\t\tvar $me = $(event.target);\n\t\tif ($me.hasClass('quickQuote') || $me.parents('.quickQuote').length) {\n\t\t\treturn false;\n\t\t}\n\t\tif (!$me.hasClass('post')) {\n\t\t\t$me = $me.parents('.post');\n\t\t}\n\n\t\tif ($me && $me.length) {\n\t\t\tvar pid = $me.data('postid');\n\n\t\t\tif ($.trim(window.getSelection().toString())) {\n\t\t\t\tif (elementContainsSelection($me.find('.post__body')[0])) {\n\t\t\t\t\tthis.showQuickQuote(pid);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tthis.hideQuickQuote();\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthis.hideQuickQuote();\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tthis.hideQuickQuote();\n\t\t}\n\t}\n\n\twindow.MyBB.Quotes.prototype.showQuickQuote = function showQuckQuote(pid) {\n\t\tvar selection = window.getSelection(),\n\t\t\trange = selection.getRangeAt(0),\n\t\t\trect = range.getBoundingClientRect();\n\t\t$elm = $(\"#post-\" + pid).find('.quickQuote').show().data('content', $.trim(window.getSelection().toString()));\n\t\t$elm.css({\n\t\t\t'top': (window.scrollY + rect.top - $elm.outerHeight() - 4) + 'px',\n\t\t\t'left': (window.scrollX + rect.left - (($elm.outerWidth() - rect.width) / 2)) + 'px'\n\t\t});\n\t}\n\n\twindow.MyBB.Quotes.prototype.hideQuickQuote = function () {\n\t\t$('.post .quickQuote').hide().data('content', '');\n\t}\n\n\twindow.MyBB.Quotes.prototype.getQuotes = function getQuotes() {\n\t\tvar quotes = MyBB.Cookie.get('quotes'),\n\t\t\tmyQuotes = [];\n\t\tif (!quotes) {\n\t\t\tquotes = [];\n\t\t}\n\t\telse {\n\t\t\tquotes = JSON.parse(quotes);\n\t\t}\n\t\t$.each(quotes, function (key, quote) {\n\t\t\tif (quote != null) {\n\t\t\t\tmyQuotes.push(quote);\n\t\t\t}\n\t\t});\n\n\t\tMyBB.Cookie.set('quotes', JSON.stringify(myQuotes));\n\t\treturn myQuotes;\n\t};\n\n\t// MultiQuote\n\twindow.MyBB.Quotes.prototype.multiQuoteButton = function multiQuoteButton(event) {\n\t\tevent.preventDefault();\n\t\tvar $me = $(event.target);\n\t\tif (!$me.hasClass('quoteButton')) {\n\t\t\t$me = $me.parents('.quoteButton');\n\t\t}\n\t\tvar $post = $me.parents('.post');\n\n\t\tvar postId = parseInt($post.data('postid')),\n\t\t\ttype = $post.data('type'),\n\t\t\tquotes = this.getQuotes();\n\n\t\tif (postId) {\n\t\t\tvar removed = false;\n\t\t\t$.each(quotes, function(key, quote) {\n\t\t\t\tif(typeof quote != 'string') {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif(quote == type + '_' + postId) {\n\t\t\t\t\tdelete quotes[key];\n\t\t\t\t\tremoved = true;\n\t\t\t\t}\n\t\t\t});\n\t\t\tif (!removed) {\n\t\t\t\tquotes.push(type + '_' + postId);\n\t\t\t\t$me.find('.quoteButton__add').hide();\n\t\t\t\t$me.find('.quoteButton__remove').show();\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$me.find('.quoteButton__add').show();\n\t\t\t\t$me.find('.quoteButton__remove').hide();\n\t\t\t}\n\n\t\t\tMyBB.Cookie.set('quotes', JSON.stringify(quotes));\n\n\t\t\tthis.showQuoteBar();\n\t\t\treturn false;\n\t\t}\n\n\t};\n\n\twindow.MyBB.Quotes.prototype.showQuoteBar = function showQuoteBar() {\n\t\tvar quotes = this.getQuotes();\n\n\t\tif (quotes.length) {\n\t\t\t$(\"#quoteBar\").show();\n\t\t}\n\t\telse {\n\t\t\t$(\"#quoteBar\").hide();\n\t\t}\n\t};\n\n\twindow.MyBB.Quotes.prototype.addQuotes = function addQuotes() {\n\t\tvar quotes = this.getQuotes(),\n\t\t\t$quoteBar = $(\"#quoteBar\"),\n\t\t\t$textarea = $($quoteBar.data('textarea'));\n\n\t\tMyBB.Spinner.add();\n\n\t\t$.ajax({\n\t\t\turl: '/post/quotes',\n\t\t\tdata: {\n\t\t\t\t'posts': quotes,\n\t\t\t\t'_token': $quoteBar.parents('form').find('input[name=_token]').val()\n\t\t\t},\n\t\t\tmethod: 'POST'\n\t\t}).done(function (json) {\n\t\t\tif (json.error) {\n\t\t\t\talert(json.error);// TODO: js error\n\t\t\t}\n\t\t\telse {\n\t\t\t\tvar value = $textarea.val();\n\t\t\t\tif (value && value.substr(-2) != \"\\n\\n\") {\n\t\t\t\t\tif (value.substr(-1) != \"\\n\") {\n\t\t\t\t\t\tvalue += \"\\n\";\n\t\t\t\t\t}\n\t\t\t\t\tvalue += \"\\n\";\n\t\t\t\t}\n\t\t\t\t$textarea.val(value + json.message).focus();\n\t\t\t}\n\t\t\t$.modal.close();\n\t\t}).always(function () {\n\t\t\tMyBB.Spinner.remove();\n\t\t});\n\n\t\t$quoteBar.hide();\n\t\tMyBB.Cookie.unset('quotes');\n\t\tthis.quoteButtons();\n\t\treturn false;\n\t};\n\n\twindow.MyBB.Quotes.prototype.addQuote = function addQuote(postid, type, content) {\n\t\tvar $textarea = $(\"#message\");\n\n\t\tMyBB.Spinner.add();\n\n\t\t$.ajax({\n\t\t\turl: '/post/quotes',\n\t\t\tdata: {\n\t\t\t\t'posts': [\n\t\t\t\t\t{\n\t\t\t\t\t\t'id': type + '_' + postid,\n\t\t\t\t\t\t'data': content\n\t\t\t\t\t}\n\t\t\t\t],\n\t\t\t\t'_token': $(\"#quoteBar\").parents('form').find('input[name=_token]').val()\n\t\t\t},\n\t\t\tmethod: 'POST'\n\t\t}).done(function (json) {\n\t\t\tif (json.error) {\n\t\t\t\talert(json.error);// TODO: js error\n\t\t\t}\n\t\t\telse {\n\t\t\t\tvar value = $textarea.val();\n\t\t\t\tif (value && value.substr(-2) != \"\\n\\n\") {\n\t\t\t\t\tif (value.substr(-1) != \"\\n\") {\n\t\t\t\t\t\tvalue += \"\\n\";\n\t\t\t\t\t}\n\t\t\t\t\tvalue += \"\\n\";\n\t\t\t\t}\n\t\t\t\t$textarea.val(value + json.message).focus();\n\t\t\t}\n\t\t}).always(function () {\n\t\t\tMyBB.Spinner.remove();\n\t\t});\n\n\t\tthis.hideQuickQuote();\n\n\t\treturn false;\n\t};\n\n\twindow.MyBB.Quotes.prototype.viewQuotes = function viewQuotes() {\n\t\tMyBB.Spinner.add();\n\n\t\t$.ajax({\n\t\t\turl: '/post/quotes/all',\n\t\t\tdata: {\n\t\t\t\t'posts': this.getQuotes(),\n\t\t\t\t'_token': $(\"#quoteBar\").parents('form').find('input[name=_token]').val()\n\t\t\t},\n\t\t\tmethod: 'POST'\n\t\t}).done($.proxy(function (data) {\n\t\t\tvar modalContent = $(\"#content\", $(data)),\n\t\t\t\tmodal = $('
', {\n\t\t\t\t\t\"class\": \"modal-dialog viewQuotes\"\n\t\t\t\t});\n\t\t\tmodalContent.find('.post-quotes').css({\n\t\t\t\t'max-height': ($(window).height()-100)+'px'\n\t\t\t});\n\t\t\tmodal.html(modalContent.html());\n\t\t\tmodal.appendTo(\"body\").modal({\n\t\t\t\tzIndex: 1000\n\t\t\t});\n\n\t\t\tif(Modernizr.touch)\n\t\t\t{\n\t\t\t\t$('.radio-buttons .radio-button, .checkbox-buttons .checkbox-button').click(function() {\n\n\t\t\t\t});\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$('span.icons i, a, .caption, time').powerTip({ placement: 's', smartPlacement: true });\n\t\t\t}\n\n\t\t\t$('.quote__select').on(\"click\", $.proxy(this.quoteAdd, this));\n\t\t\t$('.quote__remove').on(\"click\", $.proxy(this.quoteRemove, this));\n\t\t\t$(\".selectAllQuotes\").on(\"click\", $.proxy(this.addQuotes, this));\n\t\t\t$('.modalHide').hide();\n\t\t}, this)).always(function () {\n\t\t\tMyBB.Spinner.remove();\n\t\t});\n\n\t\tthis.hideQuickQuote();\n\n\t\treturn false;\n\t};\n\n\twindow.MyBB.Quotes.prototype.removeQuotes = function removeQuotes() {\n\t\t$quoteBar = $(\"#quoteBar\");\n\t\t$quoteBar.hide();\n\t\tMyBB.Cookie.unset('quotes');\n\t\tthis.quoteButtons();\n\t\treturn false;\n\t};\n\n\twindow.MyBB.Quotes.prototype.quoteButtons = function quoteButtons() {\n\t\tvar quotes = this.getQuotes();\n\n\t\t$('.quoteButton__add').show();\n\t\t$('.quoteButton__remove').hide();\n\n\t\t$.each(quotes, function (key, quote) {\n\t\t\tif (typeof quote != 'string') {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tquote = quote.split('_');\n\t\t\ttype = quote[0];\n\t\t\tpostId = parseInt(quote[1]);\n\t\t\tvar $quoteButton = $(\"#post-\" + postId + \"[data-type='\" + type + \"']\").find('.quoteButton');\n\t\t\t$quoteButton.find('.quoteButton__add').hide();\n\t\t\t$quoteButton.find('.quoteButton__remove').show();\n\t\t})\n\t}\n\n\twindow.MyBB.Quotes.prototype.quoteAdd = function quoteAdd(event) {\n\t\tvar $me = $(event.target),\n\t\t\t$post = $me.parents('.content-quote'),\n\t\t\t$textarea = $(\"#message\"),\n\t\t\tquotes = this.getQuotes();\n\n\t\tvar value = $textarea.val();\n\t\tif (value && value.substr(-2) != \"\\n\\n\") {\n\t\t\tif (value.substr(-1) != \"\\n\") {\n\t\t\t\tvalue += \"\\n\";\n\t\t\t}\n\t\t\tvalue += \"\\n\";\n\t\t}\n\t\t$textarea.val(value + $post.data('quote')).focus();\n\n\t\tdelete quotes[$post.data('id')];\n\t\tMyBB.Cookie.set('quotes', JSON.stringify(quotes));\n\t\t$post.slideUp('fast');\n\n\t\tif(this.getQuotes().length == 0) {\n\t\t\t$.modal.close();\n\t\t}\n\n\t\twhile($post.next().length) {\n\t\t\t$post = $post.next();\n\t\t\t$post.data('id', $post.data('id')-1);\n\t\t}\n\n\t\tthis.quoteButtons();\n\t\tthis.showQuoteBar();\n\t}\n\n\twindow.MyBB.Quotes.prototype.quoteRemove = function quoteRemove(event) {\n\t\tvar $me = $(event.target),\n\t\t\t$post = $me.parents('.content-quote'),\n\t\t\tquotes = this.getQuotes();\n\n\t\tdelete quotes[$post.data('id')];\n\t\tMyBB.Cookie.set('quotes', JSON.stringify(quotes));\n\t\t$post.slideUp('fast');\n\n\t\tif(this.getQuotes().length == 0) {\n\t\t\t$.modal.close();\n\t\t}\n\n\t\twhile($post.next().length) {\n\t\t\t$post = $post.next();\n\t\t\t$post.data('id', $post.data('id')-1);\n\t\t}\n\n\t\tthis.quoteButtons();\n\t\tthis.showQuoteBar();\n\t\treturn false;\n\t}\n\n\tvar quotes = new window.MyBB.Quotes();\n\n\n\t// Helper functions\n\t// http://stackoverflow.com/questions/8339857\n\tfunction isOrContains(node, container) {\n\t\twhile (node) {\n\t\t\tif (node === container) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tnode = node.parentNode;\n\t\t}\n\t\treturn false;\n\t}\n\n\tfunction elementContainsSelection(el) {\n\t\tvar sel;\n\t\tif (window.getSelection) {\n\t\t\tsel = window.getSelection();\n\t\t\tif (sel.rangeCount > 0) {\n\t\t\t\tfor (var i = 0; i < sel.rangeCount; ++i) {\n\t\t\t\t\tif (!isOrContains(sel.getRangeAt(i).commonAncestorContainer, el)) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t}\n\t\t} else if ((sel = document.selection) && sel.type != \"Control\") {\n\t\t\treturn isOrContains(sel.createRange().parentElement(), el);\n\t\t}\n\t\treturn false;\n\t}\n\n})\n(jQuery, window);"],"sourceRoot":"/source/"} \ No newline at end of file diff --git a/public/assets/js/main.min.js b/public/assets/js/main.min.js index dc5014d..5f0de20 100644 --- a/public/assets/js/main.min.js +++ b/public/assets/js/main.min.js @@ -1,2 +1,2 @@ -function submitFormAsGet(t,e){var o=$("#"+t);return o.find("input[name=_token]").val(""),null!=e&&o.attr("action",e),o.attr("method","get").submit(),!1}!function(t,e){e.MyBB=e.MyBB||{},e.MyBB.Cookie={cookiePrefix:"",cookiePath:"/",cookieDomain:"",init:function(){MyBB.Settings=MyBB.Settings||{},"undefined"!=typeof MyBB.Settings.cookiePrefix&&(this.cookiePrefix=MyBB.Settings.cookiePrefix),"undefined"!=typeof MyBB.Settings.cookiePath&&(this.cookiePath=MyBB.Settings.cookiePath),"undefined"!=typeof MyBB.Settings.cookieDomain&&(this.cookieDomain=MyBB.Settings.cookieDomain)},get:function(e){return this.init(),e=this.cookiePrefix+e,t.cookie(e)},set:function(e,o,i){return this.init(),e=this.cookiePrefix+e,i||(i=15768e4),expire=new Date,expire.setTime(expire.getTime()+1e3*i),options={expires:expire,path:this.cookiePath,domain:this.cookieDomain},t.cookie(e,o,options)},unset:function(e){return this.init(),e=this.cookiePrefix+e,options={path:this.cookiePath,domain:this.cookieDomain},t.removeCookie(e,options)}}}(jQuery,window),function(t,e){e.MyBB=e.MyBB||{},e.MyBB.Spinner={inProgresses:0,add:function(){this.inProgresses++,1==this.inProgresses&&t("#spinner").show()},remove:function(){this.inProgresses--,0==this.inProgresses&&t("#spinner").hide()}}}(jQuery,window),function(t,e){e.MyBB=e.MyBB||{},e.MyBB.Modals=function(){t("*[data-modal]").on("click",this.toggleModal).bind(this)},e.MyBB.Modals.prototype.toggleModal=function(e){if(e.preventDefault(),"A"===e.target.nodeName)var o=e.target,i=t(o).data("modal"),n=t(o).data("modal-find"),s=t("
",{"class":"modal-dialog"}),a="";else var o=e.target,i=t(o).parent().data("modal"),n=t(o).data("modal-find"),s=t("
",{"class":"modal-dialog"}),a="";"."===i.substring(0,1)||"#"===i.substring(0,1)?(a=t(i).html(),s.html(a),s.appendTo("body").modal({zIndex:1e3}),t(".modalHide").hide(),t("input[type=number]").stepper(),t(".password-toggle").hideShowPassword(!1,!0)):(void 0===n&&(n="#content"),t.get("/"+i,function(e){var o=t(e);a=t(n,o).html(),s.html(a),s.appendTo("body").modal({zIndex:1e3}),t(".modalHide").hide(),t("input[type=number]").stepper(),t(".password-toggle").hideShowPassword(!1,!0)}))};new e.MyBB.Modals}(jQuery,window),function(t,e){e.MyBB=e.MyBB||{},e.MyBB.Posts=function(){t(".postToggle").on("click",this.togglePost).bind(this)},e.MyBB.Posts.prototype.togglePost=function(e){e.preventDefault(),t(e.target).hasClass("fa-minus")?(t(e.target).parent().parent().parent().addClass("post--hidden"),t(e.target).addClass("fa-plus"),t(e.target).removeClass("fa-minus")):(t(e.target).parent().parent().parent().removeClass("post--hidden"),t(e.target).addClass("fa-minus"),t(e.target).removeClass("fa-show"))};new e.MyBB.Posts}(jQuery,window),function(t,e){e.MyBB=e.MyBB||{},e.MyBB.Polls=function(){this.optionElement=t("#option-simple").clone().attr("id","").removeClass("hidden").addClass("poll-option").hide(),t("#option-simple").remove(),this.removeOption(t("#add-poll .poll-option")),t("#new-option").click(t.proxy(this.addOption,this)),t("#poll-maximum-options").hide(),t("#poll-is-multiple").change(t.proxy(this.toggleMaxOptionsInput,this)).change();var e=t("#add-poll-button");e.click(t.proxy(this.toggleAddPoll,this)),e.length&&"1"===t("#add-poll-input").val()&&t("#add-poll").slideDown(),this.timePicker()},e.MyBB.Polls.prototype.timePicker=function(){t("#poll-end-at").datetimepicker({format:"Y-m-d H:i:s",lang:t("html").attr("lang"),minDate:0})},e.MyBB.Polls.prototype.toggleAddPoll=function(){return"1"===t("#add-poll-input").val()?(t("#add-poll-input").val(0),t("#add-poll").slideUp()):(t("#add-poll-input").val(1),t("#add-poll").slideDown()),!1},e.MyBB.Polls.prototype.addOption=function(){var e=t("#add-poll .poll-option").length;if(e>=10)return!1;var o=this.optionElement.clone();return o.find("input").attr("name","option["+(e+1)+"]"),t("#add-poll .poll-option").last().after(o),o.slideDown(),this.removeOption(o),!1},e.MyBB.Polls.prototype.removeOption=function(e){e.find(".remove-option").click(t.proxy(function(e){var o=t(e.target),i=o.parents(".poll-option");return t(".poll-option").length<=2?!1:(i.slideUp(500),void setTimeout(t.proxy(function(){i.remove(),this.fixOptionsName()},this),500))},this)),Modernizr.touch||e.find(".remove-option").powerTip({placement:"s",smartPlacement:!0})},e.MyBB.Polls.prototype.fixOptionsName=function(){var e=0;t("#add-poll .poll-option").each(function(){e++,t(this).find("input").attr("name","option["+e+"]")})},e.MyBB.Polls.prototype.toggleMaxOptionsInput=function(e){me=e.target,t(me).is(":checked")?t("#poll-maximum-options").slideDown():t("#poll-maximum-options").slideUp()};new e.MyBB.Polls}(jQuery,window),function(t,e){function o(t,e){for(;t;){if(t===e)return!0;t=t.parentNode}return!1}function i(t){var i;if(e.getSelection){if(i=e.getSelection(),i.rangeCount>0){for(var n=0;n"),$content.html(o.data("content")),this.addQuote(i.data("postid"),i.data("type"),$content.text())),this.hideQuickQuote()},e.MyBB.Quotes.prototype.quickAddQuote=function(e){var o=t(e.target),i=this.getQuotes();o.hasClass("quickQuote")||(o=o.parents(".quickQuote"));var n=o.parents(".post");o.data("content")&&($content=t("
"),$content.html(o.data("content")),i.push({id:n.data("type")+"_"+n.data("postid"),data:$content.text()}),MyBB.Cookie.set("quotes",JSON.stringify(i)),this.showQuoteBar()),this.hideQuickQuote()},e.MyBB.Quotes.prototype.checkQuickQuote=function(o){var n=t(o.target);if(n.hasClass("quickQuote")||n.parents(".quickQuote").length)return!1;if(n.hasClass("post")||(n=n.parents(".post")),n&&n.length){var s=n.data("postid");t.trim(e.getSelection().toString())&&i(n.find(".post__body")[0])?this.showQuickQuote(s):this.hideQuickQuote()}else this.hideQuickQuote()},e.MyBB.Quotes.prototype.showQuickQuote=function(o){var i=e.getSelection(),n=i.getRangeAt(0),s=n.getBoundingClientRect();$elm=t("#post-"+o).find(".quickQuote").show().data("content",t.trim(e.getSelection().toString())),$elm.css({top:e.scrollY+s.top-$elm.outerHeight()-4+"px",left:e.scrollX+s.left-($elm.outerWidth()-s.width)/2+"px"})},e.MyBB.Quotes.prototype.hideQuickQuote=function(){t(".post .quickQuote").hide().data("content","")},e.MyBB.Quotes.prototype.getQuotes=function(){var e=MyBB.Cookie.get("quotes"),o=[];return e=e?JSON.parse(e):[],t.each(e,function(t,e){null!=e&&o.push(e)}),MyBB.Cookie.set("quotes",JSON.stringify(o)),o},e.MyBB.Quotes.prototype.multiQuoteButton=function(e){e.preventDefault();var o=t(e.target);o.hasClass("quoteButton")||(o=o.parents(".quoteButton"));var i=o.parents(".post"),n=parseInt(i.data("postid")),s=i.data("type"),a=this.getQuotes();if(n){var r=!1;return t.each(a,function(t,e){"string"==typeof e&&e==s+"_"+n&&(delete a[t],r=!0)}),r?(o.find(".quoteButton__add").show(),o.find(".quoteButton__remove").hide()):(a.push(s+"_"+n),o.find(".quoteButton__add").hide(),o.find(".quoteButton__remove").show()),MyBB.Cookie.set("quotes",JSON.stringify(a)),this.showQuoteBar(),!1}},e.MyBB.Quotes.prototype.showQuoteBar=function(){var e=this.getQuotes();e.length?t("#quoteBar").show():t("#quoteBar").hide()},e.MyBB.Quotes.prototype.addQuotes=function(){var e=this.getQuotes(),o=t("#quoteBar"),i=t(o.data("textarea"));return MyBB.Spinner.add(),t.ajax({url:"/post/quotes",data:{posts:e,_token:o.parents("form").find("input[name=_token]").val()},method:"POST"}).done(function(e){if(e.error);else{var o=i.val();o&&"\n\n"!=o.substr(-2)&&("\n"!=o.substr(-1)&&(o+="\n"),o+="\n"),i.val(o+e.message).focus()}t.modal.close()}).always(function(){MyBB.Spinner.remove()}),o.hide(),MyBB.Cookie.unset("quotes"),this.quoteButtons(),!1},e.MyBB.Quotes.prototype.addQuote=function(e,o,i){var n=t("#message");return MyBB.Spinner.add(),t.ajax({url:"/post/quotes",data:{posts:[{id:o+"_"+e,data:i}],_token:t("#quoteBar").parents("form").find("input[name=_token]").val()},method:"POST"}).done(function(t){if(t.error);else{var e=n.val();e&&"\n\n"!=e.substr(-2)&&("\n"!=e.substr(-1)&&(e+="\n"),e+="\n"),n.val(e+t.message).focus()}}).always(function(){MyBB.Spinner.remove()}),this.hideQuickQuote(),!1},e.MyBB.Quotes.prototype.viewQuotes=function(){return MyBB.Spinner.add(),t.ajax({url:"/post/quotes/all",data:{posts:this.getQuotes(),_token:t("#quoteBar").parents("form").find("input[name=_token]").val()},method:"POST"}).done(t.proxy(function(o){var i=t("#content",t(o)),n=t("
",{"class":"modal-dialog viewQuotes"});i.find(".post-quotes").css({"max-height":t(e).height()-100+"px"}),n.html(i.html()),n.appendTo("body").modal({zIndex:1e3}),Modernizr.touch?t(".radio-buttons .radio-button, .checkbox-buttons .checkbox-button").click(function(){}):t("span.icons i, a, .caption, time").powerTip({placement:"s",smartPlacement:!0}),t(".quote__select").on("click",t.proxy(this.quoteAdd,this)),t(".quote__remove").on("click",t.proxy(this.quoteRemove,this)),t(".selectAllQuotes").on("click",t.proxy(this.addQuotes,this)),t(".modalHide").hide()},this)).always(function(){MyBB.Spinner.remove()}),this.hideQuickQuote(),!1},e.MyBB.Quotes.prototype.removeQuotes=function(){return $quoteBar=t("#quoteBar"),$quoteBar.hide(),MyBB.Cookie.unset("quotes"),this.quoteButtons(),!1},e.MyBB.Quotes.prototype.quoteButtons=function(){var e=this.getQuotes();t(".quoteButton__add").show(),t(".quoteButton__remove").hide(),t.each(e,function(e,o){if("string"==typeof o){o=o.split("_"),type=o[0],postId=parseInt(o[1]);var i=t("#post-"+postId+"[data-type='"+type+"']").find(".quoteButton");i.find(".quoteButton__add").hide(),i.find(".quoteButton__remove").show()}})},e.MyBB.Quotes.prototype.quoteAdd=function(e){var o=t(e.target),i=o.parents(".content-quote"),n=t("#message"),s=this.getQuotes(),a=n.val();for(a&&"\n\n"!=a.substr(-2)&&("\n"!=a.substr(-1)&&(a+="\n"),a+="\n"),n.val(a+i.data("quote")).focus(),delete s[i.data("id")],MyBB.Cookie.set("quotes",JSON.stringify(s)),i.slideUp("fast"),0==this.getQuotes().length&&t.modal.close();i.next().length;)i=i.next(),i.data("id",i.data("id")-1);this.quoteButtons(),this.showQuoteBar()},e.MyBB.Quotes.prototype.quoteRemove=function(e){var o=t(e.target),i=o.parents(".content-quote"),n=this.getQuotes();for(delete n[i.data("id")],MyBB.Cookie.set("quotes",JSON.stringify(n)),i.slideUp("fast"),0==this.getQuotes().length&&t.modal.close();i.next().length;)i=i.next(),i.data("id",i.data("id")-1);return this.quoteButtons(),this.showQuoteBar(),!1};new e.MyBB.Quotes}(jQuery,window),$("html").addClass("js"),$(function(){$(".nojs").hide(),Modernizr.touch?$(".radio-buttons .radio-button, .checkbox-buttons .checkbox-button").click(function(){}):$("span.icons i, a, .caption, time").powerTip({placement:"s",smartPlacement:!0}),$(".user-navigation__links, #main-menu").dropit({submenuEl:"div.dropdown"}),$(".dropdown-menu").dropit({submenuEl:"ul.dropdown",triggerEl:"span.dropdown-button"}),$("input[type=number]").stepper(),$(".password-toggle").hideShowPassword(!1,!0),$(".clear-selection-posts a").click(function(t){t.preventDefault(),$(".thread").find("input[type=checkbox]:checked").removeAttr("checked").closest(".post").removeClass("highlight"),$(".inline-moderation").removeClass("floating")}),$(".clear-selection-threads a").click(function(t){t.preventDefault(),$(".thread-list").find("input[type=checkbox]:checked").removeAttr("checked").closest(".thread").removeClass("highlight"),$(".checkbox-select.check-all").find("input[type=checkbox]:checked").removeAttr("checked"),$(".inline-moderation").removeClass("floating")}),$(".clear-selection-forums a").click(function(t){t.preventDefault(),$(".forum-list").find("input[type=checkbox]:checked").removeAttr("checked").closest(".forum").removeClass("highlight"),$(".checkbox-select.check-all").find("input[type=checkbox]:checked").removeAttr("checked"),$(".inline-moderation").removeClass("floating")}),$("#search .search-button").click(function(t){t.preventDefault(),$("#search .search-container").slideDown()}),$(".post :checkbox").change(function(){$(this).closest(".post").toggleClass("highlight",this.checked);var t=$(".highlight").length;1==t&&$(".inline-moderation").addClass("floating"),0==t&&$(".inline-moderation").removeClass("floating"),$(".inline-moderation .selection-count").text(" ("+t+")")}),$(".thread .checkbox-select :checkbox").change(function(){$(this).closest(".thread").toggleClass("highlight",this.checked);var t=$(".highlight").length;1==t&&$(".inline-moderation").addClass("floating"),0==t&&$(".inline-moderation").removeClass("floating"),$(".inline-moderation .selection-count").text(" ("+t+")")}),$(".forum .checkbox-select :checkbox").change(function(){$(this).closest(".forum").toggleClass("highlight",this.checked);var t=$(".highlight").length;1==t&&$(".inline-moderation").addClass("floating"),0==t&&$(".inline-moderation").removeClass("floating"),$(".inline-moderation .selection-count").text(" ("+t+")")}),$(".checkbox-select.check-all :checkbox").click(function(){$(this).closest("section").find("input[type=checkbox]").prop("checked",this.checked),$(this).closest("section").find(".checkbox-select").closest(".thread").toggleClass("highlight",this.checked),$(this).closest("section").find(".checkbox-select").closest(".forum").toggleClass("highlight",this.checked);var t=$(".highlight").length;t>=1&&$(".inline-moderation").addClass("floating"),0==t&&$(".inline-moderation").removeClass("floating"),$(".inline-moderation .selection-count").text(" ("+t+")")})}); +function getTooltipContent(t){var e,o,i=t.data(DATA_POWERTIP),n=t.data(DATA_POWERTIPJQ),s=t.data(DATA_POWERTIPTARGET);return i?($.isFunction(i)&&(i=i.call(t[0])),o=i):n?($.isFunction(n)&&(n=n.call(t[0])),n.length>0&&(o=n.clone(!0,!0))):s&&(e=$("#"+s),e.length>0&&(o=e.html())),escapeHTML(o)}function escapeHTML(t){return String(t).replace(/[&<>"'\/]/g,function(t){return entityMap[t]})}function submitFormAsGet(t,e){var o=$("#"+t);return o.find("input[name=_token]").val(""),null!=e&&o.attr("action",e),o.attr("method","get").submit(),!1}!function(t,e){e.MyBB=e.MyBB||{},e.MyBB.Cookie={cookiePrefix:"",cookiePath:"/",cookieDomain:"",init:function(){MyBB.Settings=MyBB.Settings||{},"undefined"!=typeof MyBB.Settings.cookiePrefix&&(this.cookiePrefix=MyBB.Settings.cookiePrefix),"undefined"!=typeof MyBB.Settings.cookiePath&&(this.cookiePath=MyBB.Settings.cookiePath),"undefined"!=typeof MyBB.Settings.cookieDomain&&(this.cookieDomain=MyBB.Settings.cookieDomain)},get:function(e){return this.init(),e=this.cookiePrefix+e,t.cookie(e)},set:function(e,o,i){return this.init(),e=this.cookiePrefix+e,i||(i=15768e4),expire=new Date,expire.setTime(expire.getTime()+1e3*i),options={expires:expire,path:this.cookiePath,domain:this.cookieDomain},t.cookie(e,o,options)},unset:function(e){return this.init(),e=this.cookiePrefix+e,options={path:this.cookiePath,domain:this.cookieDomain},t.removeCookie(e,options)}}}(jQuery,window),function(t,e){e.MyBB=e.MyBB||{},e.MyBB.Spinner={inProgresses:0,add:function(){this.inProgresses++,1==this.inProgresses&&t("#spinner").show()},remove:function(){this.inProgresses--,0==this.inProgresses&&t("#spinner").hide()}}}(jQuery,window),function(t,e){e.MyBB=e.MyBB||{},e.MyBB.Modals=function(){t("*[data-modal]").on("click",this.toggleModal).bind(this)},e.MyBB.Modals.prototype.toggleModal=function(e){if(e.preventDefault(),"A"===e.target.nodeName)var o=e.target,i=t(o).data("modal"),n=t(o).data("modal-find"),s=t("
",{"class":"modal-dialog"}),a="";else var o=e.target,i=t(o).parent().data("modal"),n=t(o).data("modal-find"),s=t("
",{"class":"modal-dialog"}),a="";"."===i.substring(0,1)||"#"===i.substring(0,1)?(a=t(i).html(),s.html(a),s.appendTo("body").modal({zIndex:1e3}),t(".modalHide").hide(),t("input[type=number]").stepper(),t(".password-toggle").hideShowPassword(!1,!0)):(void 0===n&&(n="#content"),t.get("/"+i,function(e){var o=t(e);a=t(n,o).html(),s.html(a),s.appendTo("body").modal({zIndex:1e3}),t(".modalHide").hide(),t("input[type=number]").stepper(),t(".password-toggle").hideShowPassword(!1,!0)}))};new e.MyBB.Modals}(jQuery,window),function(t,e){e.MyBB=e.MyBB||{},e.MyBB.Posts=function(){t(".postToggle").on("click",this.togglePost).bind(this)},e.MyBB.Posts.prototype.togglePost=function(e){e.preventDefault(),t(e.target).hasClass("fa-minus")?(t(e.target).parent().parent().parent().addClass("post--hidden"),t(e.target).addClass("fa-plus"),t(e.target).removeClass("fa-minus")):(t(e.target).parent().parent().parent().removeClass("post--hidden"),t(e.target).addClass("fa-minus"),t(e.target).removeClass("fa-show"))};new e.MyBB.Posts}(jQuery,window),function(t,e){e.MyBB=e.MyBB||{},e.MyBB.Polls=function(){this.optionElement=t("#option-simple").clone().attr("id","").removeClass("hidden").addClass("poll-option").hide(),t("#option-simple").remove(),this.removeOption(t("#add-poll .poll-option")),t("#new-option").click(t.proxy(this.addOption,this)),t("#poll-maximum-options").hide(),t("#poll-is-multiple").change(t.proxy(this.toggleMaxOptionsInput,this)).change();var e=t("#add-poll-button");e.click(t.proxy(this.toggleAddPoll,this)),e.length&&"1"===t("#add-poll-input").val()&&t("#add-poll").slideDown(),this.timePicker()},e.MyBB.Polls.prototype.timePicker=function(){t("#poll-end-at").datetimepicker({format:"Y-m-d H:i:s",lang:t("html").attr("lang"),minDate:0})},e.MyBB.Polls.prototype.toggleAddPoll=function(){return"1"===t("#add-poll-input").val()?(t("#add-poll-input").val(0),t("#add-poll").slideUp()):(t("#add-poll-input").val(1),t("#add-poll").slideDown()),!1},e.MyBB.Polls.prototype.addOption=function(){var e=t("#add-poll .poll-option").length;if(e>=10)return!1;var o=this.optionElement.clone();return o.find("input").attr("name","option["+(e+1)+"]"),t("#add-poll .poll-option").last().after(o),o.slideDown(),this.removeOption(o),!1},e.MyBB.Polls.prototype.removeOption=function(e){e.find(".remove-option").click(t.proxy(function(e){var o=t(e.target),i=o.parents(".poll-option");return t(".poll-option").length<=2?!1:(i.slideUp(500),void setTimeout(t.proxy(function(){i.remove(),this.fixOptionsName()},this),500))},this)),Modernizr.touch||e.find(".remove-option").powerTip({placement:"s",smartPlacement:!0})},e.MyBB.Polls.prototype.fixOptionsName=function(){var e=0;t("#add-poll .poll-option").each(function(){e++,t(this).find("input").attr("name","option["+e+"]")})},e.MyBB.Polls.prototype.toggleMaxOptionsInput=function(e){me=e.target,t(me).is(":checked")?t("#poll-maximum-options").slideDown():t("#poll-maximum-options").slideUp()};new e.MyBB.Polls}(jQuery,window),function(t,e){function o(t,e){for(;t;){if(t===e)return!0;t=t.parentNode}return!1}function i(t){var i;if(e.getSelection){if(i=e.getSelection(),i.rangeCount>0){for(var n=0;n"),$content.html(o.data("content")),this.addQuote(i.data("postid"),i.data("type"),$content.text())),this.hideQuickQuote()},e.MyBB.Quotes.prototype.quickAddQuote=function(e){var o=t(e.target),i=this.getQuotes();o.hasClass("quickQuote")||(o=o.parents(".quickQuote"));var n=o.parents(".post");o.data("content")&&($content=t("
"),$content.html(o.data("content")),i.push({id:n.data("type")+"_"+n.data("postid"),data:$content.text()}),MyBB.Cookie.set("quotes",JSON.stringify(i)),this.showQuoteBar()),this.hideQuickQuote()},e.MyBB.Quotes.prototype.checkQuickQuote=function(o){var n=t(o.target);if(n.hasClass("quickQuote")||n.parents(".quickQuote").length)return!1;if(n.hasClass("post")||(n=n.parents(".post")),n&&n.length){var s=n.data("postid");t.trim(e.getSelection().toString())&&i(n.find(".post__body")[0])?this.showQuickQuote(s):this.hideQuickQuote()}else this.hideQuickQuote()},e.MyBB.Quotes.prototype.showQuickQuote=function(o){var i=e.getSelection(),n=i.getRangeAt(0),s=n.getBoundingClientRect();$elm=t("#post-"+o).find(".quickQuote").show().data("content",t.trim(e.getSelection().toString())),$elm.css({top:e.scrollY+s.top-$elm.outerHeight()-4+"px",left:e.scrollX+s.left-($elm.outerWidth()-s.width)/2+"px"})},e.MyBB.Quotes.prototype.hideQuickQuote=function(){t(".post .quickQuote").hide().data("content","")},e.MyBB.Quotes.prototype.getQuotes=function(){var e=MyBB.Cookie.get("quotes"),o=[];return e=e?JSON.parse(e):[],t.each(e,function(t,e){null!=e&&o.push(e)}),MyBB.Cookie.set("quotes",JSON.stringify(o)),o},e.MyBB.Quotes.prototype.multiQuoteButton=function(e){e.preventDefault();var o=t(e.target);o.hasClass("quoteButton")||(o=o.parents(".quoteButton"));var i=o.parents(".post"),n=parseInt(i.data("postid")),s=i.data("type"),a=this.getQuotes();if(n){var r=!1;return t.each(a,function(t,e){"string"==typeof e&&e==s+"_"+n&&(delete a[t],r=!0)}),r?(o.find(".quoteButton__add").show(),o.find(".quoteButton__remove").hide()):(a.push(s+"_"+n),o.find(".quoteButton__add").hide(),o.find(".quoteButton__remove").show()),MyBB.Cookie.set("quotes",JSON.stringify(a)),this.showQuoteBar(),!1}},e.MyBB.Quotes.prototype.showQuoteBar=function(){var e=this.getQuotes();e.length?t("#quoteBar").show():t("#quoteBar").hide()},e.MyBB.Quotes.prototype.addQuotes=function(){var e=this.getQuotes(),o=t("#quoteBar"),i=t(o.data("textarea"));return MyBB.Spinner.add(),t.ajax({url:"/post/quotes",data:{posts:e,_token:o.parents("form").find("input[name=_token]").val()},method:"POST"}).done(function(e){if(e.error);else{var o=i.val();o&&"\n\n"!=o.substr(-2)&&("\n"!=o.substr(-1)&&(o+="\n"),o+="\n"),i.val(o+e.message).focus()}t.modal.close()}).always(function(){MyBB.Spinner.remove()}),o.hide(),MyBB.Cookie.unset("quotes"),this.quoteButtons(),!1},e.MyBB.Quotes.prototype.addQuote=function(e,o,i){var n=t("#message");return MyBB.Spinner.add(),t.ajax({url:"/post/quotes",data:{posts:[{id:o+"_"+e,data:i}],_token:t("#quoteBar").parents("form").find("input[name=_token]").val()},method:"POST"}).done(function(t){if(t.error);else{var e=n.val();e&&"\n\n"!=e.substr(-2)&&("\n"!=e.substr(-1)&&(e+="\n"),e+="\n"),n.val(e+t.message).focus()}}).always(function(){MyBB.Spinner.remove()}),this.hideQuickQuote(),!1},e.MyBB.Quotes.prototype.viewQuotes=function(){return MyBB.Spinner.add(),t.ajax({url:"/post/quotes/all",data:{posts:this.getQuotes(),_token:t("#quoteBar").parents("form").find("input[name=_token]").val()},method:"POST"}).done(t.proxy(function(o){var i=t("#content",t(o)),n=t("
",{"class":"modal-dialog viewQuotes"});i.find(".post-quotes").css({"max-height":t(e).height()-100+"px"}),n.html(i.html()),n.appendTo("body").modal({zIndex:1e3}),Modernizr.touch?t(".radio-buttons .radio-button, .checkbox-buttons .checkbox-button").click(function(){}):t("span.icons i, a, .caption, time").powerTip({placement:"s",smartPlacement:!0}),t(".quote__select").on("click",t.proxy(this.quoteAdd,this)),t(".quote__remove").on("click",t.proxy(this.quoteRemove,this)),t(".selectAllQuotes").on("click",t.proxy(this.addQuotes,this)),t(".modalHide").hide()},this)).always(function(){MyBB.Spinner.remove()}),this.hideQuickQuote(),!1},e.MyBB.Quotes.prototype.removeQuotes=function(){return $quoteBar=t("#quoteBar"),$quoteBar.hide(),MyBB.Cookie.unset("quotes"),this.quoteButtons(),!1},e.MyBB.Quotes.prototype.quoteButtons=function(){var e=this.getQuotes();t(".quoteButton__add").show(),t(".quoteButton__remove").hide(),t.each(e,function(e,o){if("string"==typeof o){o=o.split("_"),type=o[0],postId=parseInt(o[1]);var i=t("#post-"+postId+"[data-type='"+type+"']").find(".quoteButton");i.find(".quoteButton__add").hide(),i.find(".quoteButton__remove").show()}})},e.MyBB.Quotes.prototype.quoteAdd=function(e){var o=t(e.target),i=o.parents(".content-quote"),n=t("#message"),s=this.getQuotes(),a=n.val();for(a&&"\n\n"!=a.substr(-2)&&("\n"!=a.substr(-1)&&(a+="\n"),a+="\n"),n.val(a+i.data("quote")).focus(),delete s[i.data("id")],MyBB.Cookie.set("quotes",JSON.stringify(s)),i.slideUp("fast"),0==this.getQuotes().length&&t.modal.close();i.next().length;)i=i.next(),i.data("id",i.data("id")-1);this.quoteButtons(),this.showQuoteBar()},e.MyBB.Quotes.prototype.quoteRemove=function(e){var o=t(e.target),i=o.parents(".content-quote"),n=this.getQuotes();for(delete n[i.data("id")],MyBB.Cookie.set("quotes",JSON.stringify(n)),i.slideUp("fast"),0==this.getQuotes().length&&t.modal.close();i.next().length;)i=i.next(),i.data("id",i.data("id")-1);return this.quoteButtons(),this.showQuoteBar(),!1};new e.MyBB.Quotes}(jQuery,window),$("html").addClass("js"),$(function(){$(".nojs").hide(),Modernizr.touch?$(".radio-buttons .radio-button, .checkbox-buttons .checkbox-button").click(function(){}):$("span.icons i, a, .caption, time").powerTip({placement:"s",smartPlacement:!0}),$(".user-navigation__links, #main-menu").dropit({submenuEl:"div.dropdown"}),$(".dropdown-menu").dropit({submenuEl:"ul.dropdown",triggerEl:"span.dropdown-button"}),$("input[type=number]").stepper(),$(".password-toggle").hideShowPassword(!1,!0),$(".clear-selection-posts a").click(function(t){t.preventDefault(),$(".thread").find("input[type=checkbox]:checked").removeAttr("checked").closest(".post").removeClass("highlight"),$(".inline-moderation").removeClass("floating")}),$(".clear-selection-threads a").click(function(t){t.preventDefault(),$(".thread-list").find("input[type=checkbox]:checked").removeAttr("checked").closest(".thread").removeClass("highlight"),$(".checkbox-select.check-all").find("input[type=checkbox]:checked").removeAttr("checked"),$(".inline-moderation").removeClass("floating")}),$(".clear-selection-forums a").click(function(t){t.preventDefault(),$(".forum-list").find("input[type=checkbox]:checked").removeAttr("checked").closest(".forum").removeClass("highlight"),$(".checkbox-select.check-all").find("input[type=checkbox]:checked").removeAttr("checked"),$(".inline-moderation").removeClass("floating")}),$("#search .search-button").click(function(t){t.preventDefault(),$("#search .search-container").slideDown()}),$(".post :checkbox").change(function(){$(this).closest(".post").toggleClass("highlight",this.checked);var t=$(".highlight").length;1==t&&$(".inline-moderation").addClass("floating"),0==t&&$(".inline-moderation").removeClass("floating"),$(".inline-moderation .selection-count").text(" ("+t+")")}),$(".thread .checkbox-select :checkbox").change(function(){$(this).closest(".thread").toggleClass("highlight",this.checked);var t=$(".highlight").length;1==t&&$(".inline-moderation").addClass("floating"),0==t&&$(".inline-moderation").removeClass("floating"),$(".inline-moderation .selection-count").text(" ("+t+")")}),$(".forum .checkbox-select :checkbox").change(function(){$(this).closest(".forum").toggleClass("highlight",this.checked);var t=$(".highlight").length;1==t&&$(".inline-moderation").addClass("floating"),0==t&&$(".inline-moderation").removeClass("floating"),$(".inline-moderation .selection-count").text(" ("+t+")")}),$(".checkbox-select.check-all :checkbox").click(function(){$(this).closest("section").find("input[type=checkbox]").prop("checked",this.checked),$(this).closest("section").find(".checkbox-select").closest(".thread").toggleClass("highlight",this.checked),$(this).closest("section").find(".checkbox-select").closest(".forum").toggleClass("highlight",this.checked);var t=$(".highlight").length;t>=1&&$(".inline-moderation").addClass("floating"),0==t&&$(".inline-moderation").removeClass("floating"),$(".inline-moderation .selection-count").text(" ("+t+")")})});var entityMap={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"}; //# sourceMappingURL=main.js.map \ No newline at end of file diff --git a/public/js/other.js b/public/js/other.js index 9282efe..3e3375a 100644 --- a/public/js/other.js +++ b/public/js/other.js @@ -1,7 +1,7 @@ $('html').addClass('js'); $(function () { - + $('.nojs').hide(); if(Modernizr.touch) @@ -10,7 +10,6 @@ $(function () { }); } - else { $('span.icons i, a, .caption, time').powerTip({ placement: 's', smartPlacement: true }); @@ -131,6 +130,54 @@ $(function () { });*/ }); +// Overwrite the powertip helper function - it's nearly the same +function getTooltipContent(element) { + var tipText = element.data(DATA_POWERTIP), + tipObject = element.data(DATA_POWERTIPJQ), + tipTarget = element.data(DATA_POWERTIPTARGET), + targetElement, + content; + + if (tipText) { + if ($.isFunction(tipText)) { + tipText = tipText.call(element[0]); + } + content = tipText; + } else if (tipObject) { + if ($.isFunction(tipObject)) { + tipObject = tipObject.call(element[0]); + } + if (tipObject.length > 0) { + content = tipObject.clone(true, true); + } + } else if (tipTarget) { + targetElement = $('#' + tipTarget); + if (targetElement.length > 0) { + content = targetElement.html(); + } + } + + // Except we're escaping html + return escapeHTML(content); +} + +// Source: http://stackoverflow.com/questions/24816/escaping-html-strings-with-jquery + +var entityMap = { + "&": "&", + "<": "<", + ">": ">", + '"': '"', + "'": ''', + "/": '/' +}; + +function escapeHTML(string) { + return String(string).replace(/[&<>"'\/]/g, function (s) { + return entityMap[s]; + }); +} + function submitFormAsGet(id, newRoute) { var form = $('#' + id); form.find("input[name=_token]").val(''); diff --git a/resources/lang/en/topic.php b/resources/lang/en/topic.php index c1a5406..ecf26b2 100644 --- a/resources/lang/en/topic.php +++ b/resources/lang/en/topic.php @@ -29,7 +29,7 @@ 'restore' => 'Restore', 'softDeleted' => 'Soft Deleted', 'goToXProfile' => "Go to :name's profile", - 'XAvarar' => ":name's avatar", + 'XAvatar' => ":name's avatar", 'like' => 'Like', 'unlike' => 'Unlike', 'quote' => 'Quote', diff --git a/resources/views/topic/show.twig b/resources/views/topic/show.twig index 339e24e..5522444 100644 --- a/resources/views/topic/show.twig +++ b/resources/views/topic/show.twig @@ -29,7 +29,7 @@