Files
firefly-iii/public/js/ff/rules/edit.js

53 lines
1.0 KiB
JavaScript
Raw Normal View History

2016-02-10 15:04:06 +01:00
/*
* edit.js
2016-04-01 16:46:11 +02:00
* Copyright (C) 2016 thegrumpydictator@gmail.com
2016-02-10 15:04:06 +01:00
*
* This software may be modified and distributed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International License.
*
* See the LICENSE file for details.
2016-02-10 15:04:06 +01:00
*/
/** global: triggerCount, actionCount */
2016-02-10 15:04:06 +01:00
$(function () {
"use strict";
if (triggerCount === 0) {
addNewTrigger();
}
if (actionCount === 0) {
addNewAction();
}
$('.add_rule_trigger').click(function () {
addNewTrigger();
return false;
});
$('.test_rule_triggers').click(function () {
testRuleTriggers();
return false;
});
2016-02-10 15:04:06 +01:00
$('.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;
});
});