2016-01-14 16:41:15 +01:00
|
|
|
/*
|
2016-12-23 07:02:45 +01:00
|
|
|
* create.js
|
2016-04-01 16:46:11 +02:00
|
|
|
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
2016-01-14 16:41:15 +01:00
|
|
|
*
|
2016-12-23 07:02:45 +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-01-14 16:41:15 +01:00
|
|
|
*/
|
|
|
|
|
|
2017-01-02 10:34:01 +01:00
|
|
|
/** global: triggerCount, actionCount */
|
|
|
|
|
|
|
|
|
|
|
2016-01-14 16:41:15 +01:00
|
|
|
$(function () {
|
|
|
|
|
"use strict";
|
2016-01-22 07:27:49 +01:00
|
|
|
if (triggerCount === 0) {
|
2016-01-14 18:57:52 +01:00
|
|
|
addNewTrigger();
|
|
|
|
|
}
|
2016-01-22 07:27:49 +01:00
|
|
|
if (actionCount === 0) {
|
2016-01-14 19:20:02 +01:00
|
|
|
addNewAction();
|
|
|
|
|
}
|
|
|
|
|
|
2016-01-14 18:57:52 +01:00
|
|
|
|
2016-01-14 16:41:15 +01:00
|
|
|
$('.add_rule_trigger').click(function () {
|
|
|
|
|
addNewTrigger();
|
|
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
$('.add_rule_action').click(function () {
|
|
|
|
|
addNewAction();
|
|
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
});
|
2016-02-17 12:11:00 +01:00
|
|
|
|
|
|
|
|
$('.test_rule_triggers').click(function () {
|
|
|
|
|
testRuleTriggers();
|
|
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
});
|
2016-01-14 16:41:15 +01:00
|
|
|
});
|