1;(function($,_,undefined){"use strict";ips.controller.register('forums.front.topic.answers',{ajaxObj:null,initialize:function(){this.on('click','a.cAnswerRate',this.rate);},rate:function(e){e.preventDefault();var self=this;var clicked=$(e.currentTarget);if(this.scope.find('.cAnswerRate_up').is('.ipsType_positive')){var currentVote='positive';} 2else if(this.scope.find('.cAnswerRate_down').is('.ipsType_negative')){var currentVote='negative';} 3else{var currentVote=false;} 4var positive=clicked.hasClass('cAnswerRate_up');var voteCount=this.scope.find('[data-role="voteCount"]');var currentVotes=parseInt(voteCount.attr('data-voteCount'));var newVoteCount=0;var setPositive=false;var setNegative=false;if(currentVote!==false){if(positive&¤tVote=='positive'){newVoteCount=currentVotes-1;} 5else if(!positive&¤tVote=='negative'){newVoteCount=currentVotes+1;} 6else if(!positive&¤tVote=='positive'){newVoteCount=currentVotes-2;setNegative=true;} 7else if(positive&¤tVote=='negative'){newVoteCount=currentVotes+2;setPositive=true;}} 8else if(positive){newVoteCount=currentVotes+1;setPositive=true;} 9else{newVoteCount=currentVotes-1;setNegative=true;} 10this.setStyles(setPositive,setNegative);voteCount.toggleClass('ipsType_positive',setPositive).toggleClass('ipsType_negative',setNegative).text(newVoteCount).attr('data-voteCount',newVoteCount);if(this.ajaxObj&&_.isFunction(this.ajaxObj.abort)){this.ajaxObj.abort();} 11this.ajaxObj=ips.getAjax()(clicked.attr('href')).done(function(response){Debug.log(response);voteCount.text(response.votes);self.scope.find('.ipsType_light').text(ips.pluralize(ips.getString('votes_no_number'),response.votes));});},setStyles:function(setPositive,setNegative){this.scope.find('.cAnswerRate_up').toggleClass('ipsType_positive',setPositive);this.scope.find('.cAnswerRate_down').toggleClass('ipsType_negative',setNegative);this.scope.toggleClass('cRatingColumn_up',setPositive).toggleClass('cRatingColumn_down',setNegative);this.scope.find('a.cAnswerRate_up').removeAttr('_title');this.scope.find('a.cAnswerRate_down').removeAttr('_title');if(setPositive){this.scope.find('a.cAnswerRate_up').attr('title',ips.getString('js_remove_your_vote'));} 12else{this.scope.find('a.cAnswerRate_up').attr('title',ips.getString('js_vote_answer_up'));} 13if(setNegative){this.scope.find('a.cAnswerRate_down').attr('title',ips.getString('js_remove_your_vote'));} 14else{this.scope.find('a.cAnswerRate_down').attr('title',ips.getString('js_vote_answer_down'));}}});}(jQuery,_));; 15;(function($,_,undefined){"use strict";ips.controller.register('forums.front.topic.reply',{initialize:function(){this.on('click','[data-action="replyToTopic"]',this.replyToTopic);},replyToTopic:function(e){$(document).trigger('replyToTopic');}});}(jQuery,_));; 16;(function($,_,undefined){"use strict";ips.controller.register('forums.front.topic.view',{initialize:function(){$(document).on('replyToTopic',_.bind(this.replyToTopic,this));},replyToTopic:function(e){ips.ui.editor.getObjWithInit(this.scope.find('[data-role="replyArea"] [data-ipsEditor]'),function(editor){editor.unminimize(function(){editor.focus();});});}});}(jQuery,_));;
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.