Files
IPB/static/js/forums/front_front_topic.js
2025-12-19 19:04:57 -08:00

4 lines
2.2 KiB
JavaScript

;(function($,_,undefined){"use strict";ips.controller.register('forums.front.topic.activity',{initialize:function(){this.on('click','[data-action="toggleOverview"]',this.toggleOverview);},toggleOverview:function(e){this.scope.toggleClass('cTopicOverview--expanded');}});}(jQuery,_));;
;(function($,_,undefined){"use strict";ips.controller.register('forums.front.topic.reply',{initialize:function(){this.on('click','[data-action="replyToTopic"]',this.replyToTopic);},replyToTopic:function(e){e.preventDefault();$(document).trigger('replyToTopic');}});}(jQuery,_));;
;(function($,_,undefined){"use strict";ips.controller.register('forums.front.topic.solved',{initialize:function(){this.on('click','[data-action="mailSolvedReminders"]',this.mailSolvedReminders);},mailSolvedReminders:function(e){e.preventDefault();var _self=this;ips.getAjax()(ips.getSetting('baseURL')+'index.php?app=core&module=system&controller=ajax&do=subscribeToSolved').done(function(response){var elem=_self.scope.find('[data-action="mailSolvedReminders"]');ips.utils.anim.go('fadeOutDown',elem);ips.ui.flashMsg.show(response.message,{timeout:5});});}});}(jQuery,_));;
;(function($,_,undefined){"use strict";ips.controller.register('forums.front.topic.view',{initialize:function(){$(document).on('replyToTopic',_.bind(this.replyToTopic,this));this.on('paginationClicked',this.paginationClicked);this.on('click','[data-action="showMoreActivity"]',this.showActivity);this.on('click','[data-action="closeMoreActivity"]',this.hideActivity);},paginationClicked:function(e,data){document.getElementById('ipsTopicView').dataset.ipsTopicFirstPage=(data.pageNo==1);},showActivity:function(e){e.preventDefault();this.scope.find('[data-role="moreActivity"]').show();this.scope.find('[data-action="showMoreActivity"]').hide();this.scope.find('[data-action="closeMoreActivity"]').show();},hideActivity:function(e){e.preventDefault();this.scope.find('[data-role="moreActivity"]').hide();this.scope.find('[data-action="showMoreActivity"]').show();this.scope.find('[data-action="closeMoreActivity"]').hide();},replyToTopic:function(e){ips.ui.editorv5.getObjWithInit(this.scope.find('[data-role="replyArea"] [data-ipsEditorv5]'),function(editor){editor.unminimize(function(){editor.focus();});});}});}(jQuery,_));;