mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2026-01-09 20:11:22 +00:00
Update javascript code.
This commit is contained in:
@@ -11,12 +11,6 @@
|
||||
var triggerCount = 0;
|
||||
var actionCount = 0;
|
||||
|
||||
$(function () {
|
||||
"use strict";
|
||||
console.log('edit-create');
|
||||
});
|
||||
|
||||
|
||||
function addNewTrigger() {
|
||||
"use strict";
|
||||
triggerCount++;
|
||||
@@ -41,7 +35,6 @@ function addNewAction() {
|
||||
actionCount++;
|
||||
|
||||
$.getJSON('json/action', {count: actionCount}).done(function (data) {
|
||||
//console.log(data.html);
|
||||
$('tbody.rule-action-tbody').append(data.html);
|
||||
|
||||
// add action things.
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
|
||||
$(function () {
|
||||
"use strict";
|
||||
console.log("create");
|
||||
if (triggerCount === 0) {
|
||||
addNewTrigger();
|
||||
}
|
||||
|
||||
@@ -10,8 +10,6 @@
|
||||
|
||||
$(function () {
|
||||
"use strict";
|
||||
console.log("edit");
|
||||
|
||||
if (triggerCount === 0) {
|
||||
addNewTrigger();
|
||||
}
|
||||
|
||||
@@ -48,7 +48,6 @@ function sortStop(event, ui) {
|
||||
var ruleId = current.parent().data('id');
|
||||
var entries = [];
|
||||
// who am i?
|
||||
console.log('Rule: #' + current.parent().data('id'));
|
||||
|
||||
$.each(parent.children(), function (i, v) {
|
||||
var trigger = $(v);
|
||||
@@ -58,11 +57,11 @@ function sortStop(event, ui) {
|
||||
|
||||
});
|
||||
if (parent.hasClass('rule-triggers')) {
|
||||
$.post('rules/trigger/order/' + ruleId, {_token: token, triggers: entries}).fail(function () {
|
||||
$.post('rules/trigger/order/' + ruleId, {triggers: entries}).fail(function () {
|
||||
alert('Could not re-order rule triggers. Please refresh the page.');
|
||||
});
|
||||
} else {
|
||||
$.post('rules/action/order/' + ruleId, {_token: token, actions: entries}).fail(function () {
|
||||
$.post('rules/action/order/' + ruleId, {actions: entries}).fail(function () {
|
||||
alert('Could not re-order rule actions. Please refresh the page.');
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user