firefly-iii/public/js/ff/rules/create.js

41 lines
788 B
JavaScript
Raw Normal View History

2016-01-22 00:27:49 -06:00
/* global $, addNewTrigger, addNewAction, actionCount, triggerCount */
2016-01-14 09:41:15 -06:00
/*
* edit.js
2016-04-01 09:46:11 -05:00
* Copyright (C) 2016 thegrumpydictator@gmail.com
2016-01-14 09:41:15 -06:00
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/
// make a line.
$(function () {
"use strict";
2016-02-10 08:04:06 -06:00
console.log("create");
2016-01-22 00:27:49 -06:00
if (triggerCount === 0) {
2016-01-14 11:57:52 -06:00
addNewTrigger();
}
2016-01-22 00:27:49 -06:00
if (actionCount === 0) {
addNewAction();
}
2016-01-14 11:57:52 -06:00
2016-01-14 09:41:15 -06:00
$('.add_rule_trigger').click(function () {
addNewTrigger();
return false;
});
$('.add_rule_action').click(function () {
addNewAction();
return false;
});
$('.test_rule_triggers').click(function () {
testRuleTriggers();
return false;
});
2016-01-14 09:41:15 -06:00
});