mirror of
				https://github.com/firefly-iii/firefly-iii.git
				synced 2025-10-22 20:16:22 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			25 lines
		
	
	
		
			697 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			25 lines
		
	
	
		
			697 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
| $(function () {
 | |
|     $('#help').click(showHelp);
 | |
|     $(function () {
 | |
|         $('[data-toggle="tooltip"]').tooltip()
 | |
|     })
 | |
| });
 | |
| 
 | |
| function showHelp(e) {
 | |
|     target = $(e.target);
 | |
|     route = target.data('route');
 | |
|     //
 | |
|     $('#helpBody').html('<i class="fa fa-refresh fa-spin"></i>');
 | |
|     $('#helpTitle').html('Please hold...');
 | |
| 
 | |
|     $('#helpModal').modal('show');
 | |
|     $.getJSON('help/' + encodeURI(route)).success(function (data) {
 | |
|         $('#helpBody').html(data.text);
 | |
|         $('#helpTitle').html(data.title);
 | |
|     }).fail(function () {
 | |
|         $('#helpBody').html('<p class="text-danger">No help text could be found.</p>');
 | |
|         $('#helpTitle').html('Sorry...');
 | |
|     });
 | |
|     return false;
 | |
| }
 |