mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Some fixes for code climate.
This commit is contained in:
parent
19dc91937e
commit
8743b49a17
@ -3,6 +3,7 @@ languages:
|
|||||||
JavaScript: true
|
JavaScript: true
|
||||||
PHP: true
|
PHP: true
|
||||||
exclude_paths:
|
exclude_paths:
|
||||||
|
- "gulpfile.js"
|
||||||
- "public/packages/maximebf/php-debugbar/debugbar.js"
|
- "public/packages/maximebf/php-debugbar/debugbar.js"
|
||||||
- "public/packages/maximebf/php-debugbar/widgets.js"
|
- "public/packages/maximebf/php-debugbar/widgets.js"
|
||||||
- "public/packages/maximebf/php-debugbar/openhandler.js"
|
- "public/packages/maximebf/php-debugbar/openhandler.js"
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
// Return a helper with preserved width of cells
|
// Return a helper with preserved width of cells
|
||||||
var fixHelper = function(e, tr)
|
var fixHelper = function(e, tr)
|
||||||
{
|
{
|
||||||
|
"use strict";
|
||||||
var $originals = tr.children();
|
var $originals = tr.children();
|
||||||
var $helper = tr.clone();
|
var $helper = tr.clone();
|
||||||
$helper.children().each(function(index)
|
$helper.children().each(function(index)
|
||||||
@ -84,4 +85,4 @@ function sortStop(event, ui) {
|
|||||||
//check if the item above OR under this one have the same date
|
//check if the item above OR under this one have the same date
|
||||||
//if not. return false
|
//if not. return false
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
/* global $, addNewTrigger, addNewAction, actionCount, triggerCount */
|
||||||
/*
|
/*
|
||||||
* edit.js
|
* edit.js
|
||||||
* Copyright (C) 2016 Sander Dorigo
|
* Copyright (C) 2016 Sander Dorigo
|
||||||
@ -11,10 +12,10 @@
|
|||||||
$(function () {
|
$(function () {
|
||||||
"use strict";
|
"use strict";
|
||||||
console.log("edit");
|
console.log("edit");
|
||||||
if (triggerCount == 0) {
|
if (triggerCount === 0) {
|
||||||
addNewTrigger();
|
addNewTrigger();
|
||||||
}
|
}
|
||||||
if (actionCount == 0) {
|
if (actionCount === 0) {
|
||||||
addNewAction();
|
addNewAction();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -9,6 +9,7 @@
|
|||||||
|
|
||||||
// Return a helper with preserved width of cells
|
// Return a helper with preserved width of cells
|
||||||
var fixHelper = function (e, tr) {
|
var fixHelper = function (e, tr) {
|
||||||
|
"use strict";
|
||||||
var $originals = tr.children();
|
var $originals = tr.children();
|
||||||
var $helper = tr.clone();
|
var $helper = tr.clone();
|
||||||
$helper.children().each(function (index) {
|
$helper.children().each(function (index) {
|
||||||
@ -53,18 +54,17 @@ function sortStop(event, ui) {
|
|||||||
var id = trigger.data('id');
|
var id = trigger.data('id');
|
||||||
var order = i + 1;
|
var order = i + 1;
|
||||||
entries.push(id);
|
entries.push(id);
|
||||||
//console.log('Entry #' + id + ' will get order ' + order + ' in rule ' + ruleId + '.');
|
|
||||||
|
|
||||||
});
|
});
|
||||||
if (parent.hasClass('rule-triggers')) {
|
if (parent.hasClass('rule-triggers')) {
|
||||||
$.post('rules/rules/trigger/reorder/' + ruleId, {_token: token, triggers: entries}).fail(function () {
|
$.post('rules/rules/trigger/reorder/' + ruleId, {_token: token, triggers: entries}).fail(function () {
|
||||||
alert('Could not re-order rule triggers. Please refresh the page.')
|
alert('Could not re-order rule triggers. Please refresh the page.');
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
$.post('rules/rules/action/reorder/' + ruleId, {_token: token, actions: entries}).fail(function () {
|
$.post('rules/rules/action/reorder/' + ruleId, {_token: token, actions: entries}).fail(function () {
|
||||||
alert('Could not re-order rule actions. Please refresh the page.')
|
alert('Could not re-order rule actions. Please refresh the page.');
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user