mirror of
				https://github.com/NodeBB/NodeBB.git
				synced 2025-11-03 20:45:58 +01:00 
			
		
		
		
	closes #3693
This commit is contained in:
		@@ -135,6 +135,10 @@ define('forum/topic/postTools', ['share', 'navigator', 'components', 'translator
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	function onReplyClicked(button, tid, topicName) {
 | 
			
		||||
		if (ajaxify.data.lastposttime < (Date.now() - (1000*60*60*24*config.topicStaleDays))) {
 | 
			
		||||
			return showStaleWarning();
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		var selectionText = '',
 | 
			
		||||
			selection = window.getSelection ? window.getSelection() : document.selection.createRange();
 | 
			
		||||
 | 
			
		||||
@@ -170,6 +174,10 @@ define('forum/topic/postTools', ['share', 'navigator', 'components', 'translator
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	function onQuoteClicked(button, tid, topicName) {
 | 
			
		||||
		if (ajaxify.data.lastposttime < (Date.now() - (1000*60*60*24*config.topicStaleDays))) {
 | 
			
		||||
			return showStaleWarning();
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		var username = getUserName(button),
 | 
			
		||||
			pid = getData(button, 'data-pid');
 | 
			
		||||
 | 
			
		||||
@@ -379,5 +387,17 @@ define('forum/topic/postTools', ['share', 'navigator', 'components', 'translator
 | 
			
		||||
		return false;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	function showStaleWarning() {
 | 
			
		||||
		translator.translate('[[topic:stale_topic_warning]]', function(translated) {
 | 
			
		||||
			bootbox.confirm(translated, function(create) {
 | 
			
		||||
				if (create) {
 | 
			
		||||
					$(window).trigger('action:composer.topic.new', {
 | 
			
		||||
						cid: ajaxify.data.cid
 | 
			
		||||
					});
 | 
			
		||||
				}
 | 
			
		||||
			});
 | 
			
		||||
		});
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	return PostTools;
 | 
			
		||||
});
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user