mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2026-01-10 12:24:50 +00:00
Various code clean up.
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
*
|
||||
* See the LICENSE file for details.
|
||||
*/
|
||||
/** global: Chart, defaultChartOptions, accounting, defaultPieOptions, noDataForChart */
|
||||
/** global: Chart, defaultChartOptions, accounting, defaultPieOptions, noDataForChart, noDataForChart */
|
||||
var allCharts = {};
|
||||
|
||||
/*
|
||||
@@ -240,13 +240,14 @@ function pieChart(URI, container) {
|
||||
* @param colorData
|
||||
*/
|
||||
function drawAChart(URI, container, chartType, options, colorData) {
|
||||
if ($('#' + container).length === 0) {
|
||||
var containerObj = $('#' + container);
|
||||
if (containerObj.length === 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
$.getJSON(URI).done(function (data) {
|
||||
$('#' + container).removeClass('general-chart-error');
|
||||
containerObj.removeClass('general-chart-error');
|
||||
if (data.labels.length === 0) {
|
||||
// remove the chart container + parent
|
||||
var holder = $('#' + container).parent().parent();
|
||||
|
||||
@@ -16,7 +16,7 @@ $(function () {
|
||||
configAccounting(currencySymbol);
|
||||
|
||||
// on submit of form, disable any button in form:
|
||||
$('form.form-horizontal').on('submit',function(e) {
|
||||
$('form.form-horizontal').on('submit',function() {
|
||||
$('button[type="submit"]').prop('disabled',true);
|
||||
});
|
||||
|
||||
|
||||
@@ -24,8 +24,6 @@ function showHelp(e) {
|
||||
specialPage = '';
|
||||
}
|
||||
$('#helpBody').html('<i class="fa fa-refresh fa-spin"></i>');
|
||||
$('#helpTitle').html('Please hold...');
|
||||
|
||||
$('#helpModal').modal('show');
|
||||
$('#helpTitle').html('Help for this page');
|
||||
$.getJSON('help/' + encodeURI(route)).done(function (data) {
|
||||
|
||||
@@ -60,6 +60,8 @@ function failedJobImport(jqxhr, textStatus, error) {
|
||||
function reportOnJobImport(data) {
|
||||
|
||||
switch (data.status) {
|
||||
default:
|
||||
break;
|
||||
case "configured":
|
||||
// job is ready. Do not check again, just show the start-box. Hide the rest.
|
||||
$('.statusbox').hide();
|
||||
@@ -173,6 +175,7 @@ function updateBar(data) {
|
||||
bar.removeClass('progress-bar-success').addClass('progress-bar-info');
|
||||
bar.attr('aria-valuenow', 100);
|
||||
bar.css('width', '100%');
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -214,6 +217,4 @@ function reportOnErrors(data) {
|
||||
$('#import-status-error-list').append(item);
|
||||
}
|
||||
}
|
||||
return;
|
||||
|
||||
}
|
||||
@@ -6,7 +6,7 @@
|
||||
* See the LICENSE file for details.
|
||||
*/
|
||||
|
||||
/** global: routeForTour, routeStepsUri, routeForFinishedTour */
|
||||
/** global: routeForTour, routeStepsUri, routeForFinishedTour, forceDemoOff */
|
||||
|
||||
$(function () {
|
||||
"use strict";
|
||||
|
||||
@@ -12,7 +12,6 @@
|
||||
Some vars as prep for the map:
|
||||
*/
|
||||
var map;
|
||||
var markers = [];
|
||||
var setTag = false;
|
||||
|
||||
var mapOptions = {
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
* See the LICENSE file for details.
|
||||
*/
|
||||
|
||||
/** global: currencyInfo, accountInfo, what,Modernizr, title, breadcrumbs, middleCrumbName, button, piggiesLength, txt, middleCrumbUrl,exchangeRateInstructions, convertForeignToNative, convertSourceToDestination, selectsForeignCurrency, accountInfo */
|
||||
/** global: currencyInfo, overruleCurrency,useAccountCurrency, accountInfo, what,Modernizr, title, breadcrumbs, middleCrumbName, button, piggiesLength, txt, middleCrumbUrl,exchangeRateInstructions, convertForeignToNative, convertSourceToDestination, selectsForeignCurrency, accountInfo */
|
||||
|
||||
$(document).ready(function () {
|
||||
"use strict";
|
||||
|
||||
Reference in New Issue
Block a user