mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-04 05:53:43 +00:00 
			
		
		
		
	This commit prepares the frontend code to be consumed by webpack. It is a hack: In theory, modules should be declaring and importing the modules they depend on and the globals they expose directly. However, that requires significant per-module work, which we don't really want to block moving our toolchain to webpack on. So we expose the modules by setting window.varName = varName; as needed in the js files.
		
			
				
	
	
		
			26 lines
		
	
	
		
			602 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			26 lines
		
	
	
		
			602 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
var settings_muting = (function () {
 | 
						|
 | 
						|
var exports = {};
 | 
						|
 | 
						|
exports.set_up = function () {
 | 
						|
    $('body').on('click', '.settings-unmute-topic', function (e) {
 | 
						|
        var $row = $(this).closest("tr");
 | 
						|
        var stream = $row.data("stream");
 | 
						|
        var topic = $row.data("topic");
 | 
						|
 | 
						|
        muting_ui.unmute(stream, topic);
 | 
						|
        $row.remove();
 | 
						|
        e.stopImmediatePropagation();
 | 
						|
    });
 | 
						|
 | 
						|
    muting_ui.set_up_muted_topics_ui(muting.get_muted_topics());
 | 
						|
};
 | 
						|
 | 
						|
return exports;
 | 
						|
}());
 | 
						|
 | 
						|
if (typeof module !== 'undefined') {
 | 
						|
    module.exports = settings_muting;
 | 
						|
}
 | 
						|
window.settings_muting = settings_muting;
 |