-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathks_get_message_select.js
49 lines (49 loc) · 1.42 KB
/
ks_get_message_select.js
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
var email = GetInputConstructorValue('email', loader)
if (email['original'].length == 0) {
Invalid(
tr('The parameter "') + tr('Email address') + tr('" is not specified')
)
return
}
var timeout = GetInputConstructorValue('timeout', loader)
if (timeout['original'].length == 0) {
Invalid(tr('The parameter "') + tr('Timeout') + tr('" is not specified'))
return
}
var interval = GetInputConstructorValue('interval', loader)
if (interval['original'].length == 0) {
Invalid(tr('The parameter "') + tr('Interval') + tr('" is not specified'))
return
}
var maxTime = GetInputConstructorValue('maxTime', loader)
if (maxTime['original'].length == 0) {
Invalid(
tr('The parameter "') + tr('Time threshold') + tr('" is not specified')
)
return
}
var full = $('#full').is(':checked')
var strictMode = $('#strictMode').is(':checked')
var messageFull = this.$el.find('#messageFull').val().toUpperCase()
var Save = this.$el.find('#Save').val().toUpperCase()
try {
var code =
loader.GetAdditionalData() +
_.template($('#ks_get_message_code').html())({
email: email['updated'],
full: full,
strictMode: strictMode,
timeout: timeout['updated'],
maxTime: maxTime['updated'],
interval: interval['updated'],
variable: 'VAR_' + Save,
messageFull: 'VAR_' + messageFull
})
code = Normalize(code, 0)
BrowserAutomationStudio_Append(
'',
BrowserAutomationStudio_SaveControls() + code,
action,
DisableIfAdd
)
} catch (e) {}