forked from jenkinsci/github-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwarning.js
More file actions
32 lines (29 loc) · 736 Bytes
/
warning.js
File metadata and controls
32 lines (29 loc) · 736 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
var InlineWarning = (function () {
'use strict';
var exports = {};
var options = {
id: '', // id of element to bind
url: '', // url of check method
input: '' // checkbox to test for checked
};
exports.setup = function (opts) {
options = opts;
return exports;
};
exports.start = function () {
// Ignore when GH trigger unchecked
if (!$$(options.input).first().checked) {
return;
}
new Ajax.PeriodicalUpdater(
options.id,
options.url,
{
method: 'get',
frequency: 10,
decay: 2
}
);
};
return exports;
})();