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

35 lines
661 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
* 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.
*/
// 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;
});
});