mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-20 03:08:11 +00:00
Fixes #173
This commit is contained in:
45
public/js/rules/edit.js
Normal file
45
public/js/rules/edit.js
Normal file
@@ -0,0 +1,45 @@
|
||||
/*
|
||||
* edit.js
|
||||
* Copyright (C) 2016 Sander Dorigo
|
||||
*
|
||||
* This software may be modified and distributed under the terms
|
||||
* of the MIT license. See the LICENSE file for details.
|
||||
*/
|
||||
|
||||
$(function () {
|
||||
"use strict";
|
||||
console.log("edit");
|
||||
|
||||
if (triggerCount === 0) {
|
||||
addNewTrigger();
|
||||
}
|
||||
if (actionCount === 0) {
|
||||
addNewAction();
|
||||
}
|
||||
|
||||
|
||||
$('.add_rule_trigger').click(function () {
|
||||
addNewTrigger();
|
||||
|
||||
return false;
|
||||
});
|
||||
|
||||
$('.add_rule_action').click(function () {
|
||||
addNewAction();
|
||||
|
||||
return false;
|
||||
});
|
||||
|
||||
$('.remove-trigger').unbind('click').click(function (e) {
|
||||
removeTrigger(e);
|
||||
|
||||
return false;
|
||||
});
|
||||
|
||||
// add action things.
|
||||
$('.remove-action').unbind('click').click(function (e) {
|
||||
removeAction(e);
|
||||
|
||||
return false;
|
||||
});
|
||||
});
|
Reference in New Issue
Block a user