mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-04 05:53:43 +00:00 
			
		
		
		
	ui: Replace set_up_scrollbar with data-simplebar attribute.
With perfectScrollbar, we needed to call a function from JavaScript to enable a scrollbar on a new element, but simplebar has a much simpler default API one can do by using data-simplebar attributes in the HTML. So we can delete all the scrollbar creation/deletion code. Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
This commit is contained in:
		
				
					committed by
					
						
						Tim Abbott
					
				
			
			
				
	
			
			
			
						parent
						
							119948022f
						
					
				
				
					commit
					01613e71fb
				
			@@ -131,12 +131,9 @@ exports.update_attachments = function (event) {
 | 
			
		||||
exports.set_up_attachments = function () {
 | 
			
		||||
    // The settings page must be rendered before this function gets called.
 | 
			
		||||
 | 
			
		||||
    var uploaded_files_table = $("#uploaded_files_table").expectOne();
 | 
			
		||||
    var status = $('#delete-upload-status');
 | 
			
		||||
    loading.make_indicator($('#attachments_loading_indicator'), {text: 'Loading...'});
 | 
			
		||||
 | 
			
		||||
    ui.set_up_scrollbar(uploaded_files_table.closest(".progressive-table-wrapper"));
 | 
			
		||||
 | 
			
		||||
    $('#uploaded_files_table').on('click', '.remove-attachment', function (e) {
 | 
			
		||||
        delete_attachments($(e.target).closest(".uploaded_file_row").attr('data-attachment-id'));
 | 
			
		||||
    });
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user