mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-30 02:26:58 +00:00
Merge branch 'develop' into issues/509
# Conflicts: # public/js/ff/transactions/list.js
This commit is contained in:
1
public/js/ff/accounts/reconcile.js
vendored
1
public/js/ff/accounts/reconcile.js
vendored
@@ -92,7 +92,6 @@ function storeReconcile() {
|
||||
transactions: ids,
|
||||
cleared: cleared,
|
||||
};
|
||||
console.log
|
||||
var uri = overviewUri.replace('%start%', $('input[name="start_date"]').val()).replace('%end%', $('input[name="end_date"]').val());
|
||||
|
||||
|
||||
|
2
public/js/ff/accounts/show.js
vendored
2
public/js/ff/accounts/show.js
vendored
@@ -18,7 +18,7 @@
|
||||
* along with Firefly III. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/** global: chartUri, incomeCategoryUri, expenseCategoryUri, expenseBudgetUri */
|
||||
/** global: chartUri, incomeCategoryUri, expenseCategoryUri, expenseBudgetUri, token */
|
||||
|
||||
var fixHelper = function (e, tr) {
|
||||
"use strict";
|
||||
|
4
public/js/ff/admin/update/index.js
vendored
4
public/js/ff/admin/update/index.js
vendored
@@ -18,6 +18,8 @@
|
||||
* along with Firefly III. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/** global: updateCheckUri */
|
||||
|
||||
$(function () {
|
||||
"use strict";
|
||||
|
||||
@@ -31,7 +33,7 @@ function checkUpdate() {
|
||||
// do post update check:
|
||||
$.post(updateCheckUri).done(function (data) {
|
||||
alert(data.result);
|
||||
}).fail(function() {
|
||||
}).fail(function () {
|
||||
alert('Error while checking.');
|
||||
});
|
||||
|
||||
|
6
public/js/ff/budgets/index.js
vendored
6
public/js/ff/budgets/index.js
vendored
@@ -18,7 +18,7 @@
|
||||
* along with Firefly III. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/** global: infoIncomeUri, spent, budgeted, available, currencySymbol, budgetIndexUri, updateIncomeUri, periodStart, periodEnd, budgetAmountUri, accounting */
|
||||
/** global: infoIncomeUri, token, spent, budgeted, available, currencySymbol, budgetIndexUri, updateIncomeUri, periodStart, periodEnd, budgetAmountUri, accounting */
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@@ -104,7 +104,7 @@ function updateBudgetedAmounts(e) {
|
||||
var target = $(e.target);
|
||||
var id = target.data('id');
|
||||
var leftCell = $('td[class$="left"][data-id="' + id + '"]');
|
||||
var link = $('a[data-id="'+id+'"][class="budget-link"]');
|
||||
var link = $('a[data-id="' + id + '"][class="budget-link"]');
|
||||
var value = target.val();
|
||||
var original = target.data('original');
|
||||
|
||||
@@ -112,7 +112,7 @@ function updateBudgetedAmounts(e) {
|
||||
target.prop('disabled', true);
|
||||
|
||||
// replace link (for now)
|
||||
link.attr('href','#');
|
||||
link.attr('href', '#');
|
||||
|
||||
// replace "left" with spinner.
|
||||
leftCell.empty().html('<i class="fa fa-fw fa-spin fa-spinner"></i>');
|
||||
|
21
public/js/ff/charts.defaults.js
vendored
21
public/js/ff/charts.defaults.js
vendored
@@ -29,40 +29,37 @@
|
||||
* @param maxwidth
|
||||
* @returns {Array}
|
||||
*/
|
||||
function formatLabel(str, maxwidth){
|
||||
function formatLabel(str, maxwidth) {
|
||||
var sections = [];
|
||||
var words = str.split(" ");
|
||||
var temp = "";
|
||||
|
||||
words.forEach(function(item, index){
|
||||
if(temp.length > 0)
|
||||
{
|
||||
words.forEach(function (item, index) {
|
||||
if (temp.length > 0) {
|
||||
var concat = temp + ' ' + item;
|
||||
|
||||
if(concat.length > maxwidth){
|
||||
if (concat.length > maxwidth) {
|
||||
sections.push(temp);
|
||||
temp = "";
|
||||
}
|
||||
else{
|
||||
if(index === (words.length-1))
|
||||
{
|
||||
else {
|
||||
if (index === (words.length - 1)) {
|
||||
sections.push(concat);
|
||||
return;
|
||||
}
|
||||
else{
|
||||
else {
|
||||
temp = concat;
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(index === (words.length-1))
|
||||
{
|
||||
if (index === (words.length - 1)) {
|
||||
sections.push(item);
|
||||
return;
|
||||
}
|
||||
|
||||
if(item.length < maxwidth) {
|
||||
if (item.length < maxwidth) {
|
||||
temp = item;
|
||||
}
|
||||
else {
|
||||
|
2
public/js/ff/help.js
vendored
2
public/js/ff/help.js
vendored
@@ -17,7 +17,7 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with Firefly III. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/** global: token */
|
||||
$(function () {
|
||||
"use strict";
|
||||
$('#help').click(showHelp);
|
||||
|
17
public/js/ff/import/status.js
vendored
17
public/js/ff/import/status.js
vendored
@@ -18,7 +18,7 @@
|
||||
* along with Firefly III. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/** global: langImportSingleError, langImportMultiError, jobStartUrl, langImportTimeOutError, langImportFinished, langImportFatalError */
|
||||
/** global: job, langImportSingleError, langImportMultiError, jobStartUrl, langImportTimeOutError, langImportFinished, langImportFatalError */
|
||||
|
||||
var timeOutId;
|
||||
var startInterval = 1000;
|
||||
@@ -34,10 +34,12 @@ var knownErrors = 0;
|
||||
|
||||
$(function () {
|
||||
"use strict";
|
||||
console.log('in start');
|
||||
timeOutId = setTimeout(checkJobStatus, startInterval);
|
||||
|
||||
$('.start-job').click(startJob);
|
||||
if (job.configuration['auto-start']) {
|
||||
console.log('Called startJob()!');
|
||||
startJob();
|
||||
}
|
||||
});
|
||||
@@ -46,6 +48,7 @@ $(function () {
|
||||
* Downloads some JSON and responds to its content to see what the status is of the current import.
|
||||
*/
|
||||
function checkJobStatus() {
|
||||
console.log('in checkJobStatus');
|
||||
$.getJSON(jobStatusUri).done(reportOnJobStatus).fail(reportFailedJob);
|
||||
}
|
||||
|
||||
@@ -53,6 +56,7 @@ function checkJobStatus() {
|
||||
* This method is called when the JSON query returns an error. If possible, this error is relayed to the user.
|
||||
*/
|
||||
function reportFailedJob(jqxhr, textStatus, error) {
|
||||
console.log('in reportFailedJob');
|
||||
// hide all possible boxes:
|
||||
$('.statusbox').hide();
|
||||
|
||||
@@ -72,6 +76,7 @@ function reportFailedJob(jqxhr, textStatus, error) {
|
||||
* @param data
|
||||
*/
|
||||
function reportOnJobStatus(data) {
|
||||
console.log('in reportOnJobStatus: ' + data.status);
|
||||
|
||||
switch (data.status) {
|
||||
case "configured":
|
||||
@@ -80,6 +85,10 @@ function reportOnJobStatus(data) {
|
||||
$('.statusbox').hide();
|
||||
$('.status_configured').show();
|
||||
}
|
||||
if (job.configuration['auto-start']) {
|
||||
console.log('Job is auto start. Check status again in 500ms.');
|
||||
timeOutId = setTimeout(checkJobStatus, interval);
|
||||
}
|
||||
break;
|
||||
case "running":
|
||||
// job is running! Show the running box:
|
||||
@@ -122,7 +131,13 @@ function reportOnJobStatus(data) {
|
||||
// show the fatal error box:
|
||||
$('.fatal_error').show();
|
||||
break;
|
||||
case "configuring":
|
||||
// redirect back to configure screen.
|
||||
console.log('Will now redirect to ' + jobConfigureUri);
|
||||
window.location = jobConfigureUri;
|
||||
break;
|
||||
default:
|
||||
console.error('Cannot handle job status ' + data.status);
|
||||
break;
|
||||
|
||||
}
|
||||
|
2
public/js/ff/piggy-banks/index.js
vendored
2
public/js/ff/piggy-banks/index.js
vendored
@@ -17,7 +17,7 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with Firefly III. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/** global: token */
|
||||
var fixHelper = function (e, tr) {
|
||||
"use strict";
|
||||
var $originals = tr.children();
|
||||
|
11
public/js/ff/reports/account/month.js
vendored
11
public/js/ff/reports/account/month.js
vendored
@@ -1,4 +1,3 @@
|
||||
|
||||
/*
|
||||
* month.js
|
||||
* Copyright (c) 2017 thegrumpydictator@gmail.com
|
||||
@@ -18,10 +17,10 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with Firefly III. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/** global: spentUri, categoryUri, budgetUri, expenseUri, incomeUri, mainUri */
|
||||
$(function () {
|
||||
"use strict";
|
||||
drawChart();
|
||||
doubleYChart(mainUri, 'in-out-chart');
|
||||
|
||||
loadAjaxPartial('inOutAccounts', spentUri);
|
||||
loadAjaxPartial('inOutCategory', categoryUri);
|
||||
@@ -31,9 +30,3 @@ $(function () {
|
||||
|
||||
});
|
||||
|
||||
function drawChart() {
|
||||
"use strict";
|
||||
|
||||
// month view:
|
||||
doubleYChart(mainUri, 'in-out-chart');
|
||||
}
|
2
public/js/ff/reports/all.js
vendored
2
public/js/ff/reports/all.js
vendored
@@ -17,7 +17,7 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with Firefly III. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/** global: startDate, endDate, accountIds */
|
||||
function loadAjaxPartial(holder, uri) {
|
||||
"use strict";
|
||||
$.get(uri).done(function (data) {
|
||||
|
3
public/js/ff/reports/index.js
vendored
3
public/js/ff/reports/index.js
vendored
@@ -139,7 +139,6 @@ function setOptionalFromCookies() {
|
||||
$('#inputExpRevAccounts').multiselect(defaultMultiSelect);
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
function catchSubmit() {
|
||||
@@ -161,7 +160,7 @@ function catchSubmit() {
|
||||
createCookie('report-categories', categories, 365);
|
||||
createCookie('report-budgets', budgets, 365);
|
||||
createCookie('report-tags', tags, 365);
|
||||
createCookie('report-exp-rev', expRev , 365);
|
||||
createCookie('report-exp-rev', expRev, 365);
|
||||
createCookie('report-start', moment(picker.startDate).format("YYYYMMDD"), 365);
|
||||
createCookie('report-end', moment(picker.endDate).format("YYYYMMDD"), 365);
|
||||
|
||||
|
2
public/js/ff/rules/index.js
vendored
2
public/js/ff/rules/index.js
vendored
@@ -17,7 +17,7 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with Firefly III. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/** global: token */
|
||||
var fixHelper = function (e, tr) {
|
||||
"use strict";
|
||||
var $originals = tr.children();
|
||||
|
2
public/js/ff/search/index.js
vendored
2
public/js/ff/search/index.js
vendored
@@ -18,7 +18,7 @@
|
||||
* along with Firefly III. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/** global: searchQuery,searchUri */
|
||||
/** global: searchQuery,searchUri,token */
|
||||
|
||||
|
||||
|
||||
|
2
public/js/ff/tags/show.js
vendored
2
public/js/ff/tags/show.js
vendored
@@ -48,7 +48,7 @@ $(function () {
|
||||
}).addTo(mymap);
|
||||
|
||||
if (doPlaceMarker) {
|
||||
var marker = L.marker([latitude, longitude]).addTo(mymap);
|
||||
L.marker([latitude, longitude]).addTo(mymap);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
2
public/js/ff/transactions/list.js
vendored
2
public/js/ff/transactions/list.js
vendored
@@ -18,7 +18,7 @@
|
||||
* along with Firefly III. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/** global: edit_selected_txt, edit_bulk_selected_txt, delete_selected_txt */
|
||||
/** global: edit_selected_txt, edit_bulk_selected_txt, delete_selected_txt, token */
|
||||
|
||||
/**
|
||||
*
|
||||
|
Reference in New Issue
Block a user