mirror of
				https://github.com/firefly-iii/firefly-iii.git
				synced 2025-10-31 10:47:00 +00:00 
			
		
		
		
	Added shiny new loading styles. [skip ci]
This commit is contained in:
		| @@ -244,8 +244,7 @@ function drawAChart(URI, container, chartType, options, colorData) { | ||||
|  | ||||
|  | ||||
|     $.getJSON(URI).done(function (data) { | ||||
|  | ||||
|  | ||||
|         $('#' + container).removeClass('general-chart-error'); | ||||
|         if (data.labels.length === 0) { | ||||
|             // remove the chart container + parent | ||||
|             var holder = $('#' + container).parent().parent(); | ||||
|   | ||||
| @@ -74,7 +74,8 @@ function loadAjaxPartial(holder, uri) { | ||||
| function displayAjaxPartial(data, holder) { | ||||
|     "use strict"; | ||||
|     var obj = $('#' + holder); | ||||
|     obj.removeClass('loading').html(data); | ||||
|     obj.html(data); | ||||
|     obj.parent().find('.overlay').remove(); | ||||
|  | ||||
|     // call some often needed recalculations and what-not: | ||||
|  | ||||
| @@ -98,7 +99,9 @@ function displayAjaxPartial(data, holder) { | ||||
|  | ||||
| function failAjaxPartial(uri, holder) { | ||||
|     "use strict"; | ||||
|     $('#' + holder).removeClass('loading').addClass('general-chart-error'); | ||||
|     var holder = $('#' + holder); | ||||
|     holder.parent().find('.overlay').remove(); | ||||
|     holder.addClass('general-chart-error'); | ||||
|  | ||||
| } | ||||
|  | ||||
|   | ||||
| @@ -60,14 +60,18 @@ $(function () { | ||||
| function getReportOptions() { | ||||
|     "use strict"; | ||||
|     var reportType = $('select[name="report_type"]').val(); | ||||
|     $('#extra-options').empty(); | ||||
|     $('#extra-options').addClass('loading'); | ||||
|     var boxBody = $('#extra-options'); | ||||
|     var box = $('#extra-options-box'); | ||||
|     boxBody.empty(); | ||||
|     box.find('.overlay').show(); | ||||
|  | ||||
|     $.getJSON('reports/options/' + reportType, function (data) { | ||||
|         $('#extra-options').removeClass('loading').html(data.html); | ||||
|         boxBody.html(data.html); | ||||
|         setOptionalFromCookies(); | ||||
|         box.find('.overlay').hide(); | ||||
|     }).fail(function () { | ||||
|         $('#extra-options').removeClass('loading').addClass('error'); | ||||
|         boxBody.addClass('error'); | ||||
|         box.find('.overlay').hide(); | ||||
|     }); | ||||
| } | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user