-
Notifications
You must be signed in to change notification settings - Fork 0
/
script.js
89 lines (62 loc) · 2.19 KB
/
script.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
$(document).ready(function(){
prettyPrint();
$('[data-toggle="tooltip"]').tooltip()
// Keycloack set up // TODO(agalante) this doesn't work :(
$(".ups-keycloack-custom-input input").click(function() {
if($(this).is(":checked")) {
$(".ups-keycloack-custom-url").show(300);
} else {
$(".ups-keycloack-custom-url").hide(200);
}
});
// Send notification modal, opens and close variables
$(".ups-all-variables input").click(function(){
$(".ups-more-variables").fadeToggle("fast");
});
// Disable send notification btn, Popover message when there are no variables set
$('.ups-send-btn').popover();
$('.ups-renew-master-secret').popover();
// Data tables with sidebar
$('.datatable').dataTable({
"fnDrawCallback": function( oSettings ) {
// if .sidebar-pf exists, call sidebar() after the data table is drawn
if ($('.sidebar-pf').length > 0) {
sidebar();
}
}
});
// Variant list accordion
$(".ups-variant-header").click(function(){
$(this).closest(".ups-variant").find(".ups-variant-body").slideToggle();
});
// Search input on index
// Hide the clear button if the search input is empty
$(".search-pf .has-clear .clear").each(function() {
if (!$(this).prev('.form-control').val()) {
$(this).hide();
}
});
// Show the clear button upon entering text in the search input
$(".search-pf .has-clear .form-control").keyup(function () {
var t = $(this);
t.next('button').toggle(Boolean(t.val()));
});
// Upon clicking the clear button, empty the entered text and hide the clear button
$(".search-pf .has-clear .clear").click(function () {
$(this).prev('.form-control').val('').focus();
$(this).hide();
});
// Login screen modal
$('#keycloackConfigModal').modal('show');
// tool tip on Copy code snippet
$('.ups-snippet a').tooltip();
// makes the boxes of the welcome screen equal
var highestCol = Math.max($('#box1').height(),$('#box2').height(),$('#box3').height(),$('#box3').height());
$('.ups-wizard .well').height(highestCol);
$('.selectpicker').selectpicker({
placeholder: "All",
});
$(".js-example-placeholder-single").select2({
allowClear: true
});
});