dipla.min.js
2.11 KB
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 AW = AW || {};
AW.onSidebarToggleRequest = function (a) {
a.preventDefault(), $(this).blur(), $(".js-sidebar, .js-content").toggleClass("is-toggled")
}, AW.onSearchModalShowRequest = function (a) {
a.preventDefault(), $(".js-search-modal").fadeIn("slow"), $("body").addClass("aw-no-scroll"), $(".js-search-modal-input").val("").select()
}, AW.onSearchModalCloseRequest = function (a) {
a.preventDefault(), $(".js-search-modal").hide(), $("body").removeClass("aw-no-scroll")
}, AW.showLoadingComponent = function () {
$(".js-loading-overlay").css("display", "table").hide().fadeIn("slow")
}, AW.hideLoadingComponent = function () {
$(".js-loading-component").fadeOut("fast")
}, AW.initStickyTableHeaders = function () {
if ($(window).width() >= 992) {
var a = $(".js-sticky-reference"), b = $(".js-sticky-table");
a && b && b.stickyTableHeaders({fixedOffset: a})
}
}, AW.onMenuGroupClick = function (a) {
var b = $(this).parent().find("ul");
b.length && (a.preventDefault(), $(this).parent().toggleClass("is-expanded"))
}, AW.initMenu = function () {
$(".js-menu > ul > li > a").bind("click", AW.onMenuGroupClick), $(".aw-menu__item .is-active").parents(".aw-menu__item").addClass("is-expanded is-active")
}, $(function () {
AW.init && AW.init(), AW.initMenu(), AW.initStickyTableHeaders(), $(".js-tooltip").tooltip(), $(".js-sidebar-toggle").bind("click", AW.onSidebarToggleRequest), $(".js-search-modal-trigger-show").bind("click", AW.onSearchModalShowRequest), $(".js-search-modal-close").bind("click", AW.onSearchModalCloseRequest)
});
/*
var connect = function () {
var source = new EventSource("/protocolo/stream");
console.log(source);
source.addEventListener('open', function (e) {
console.log('conectado');
});
source.addEventListener('message', function (e) {
console.log('retorno do evento.' + e.data);
$(".container-fluid").html(e.data);
}, false);
source.addEventListener('error', function (e) {
if (e.readyState == EventSource.CLOSED) {
connect();
}
}, false);
}
$(function () {
connect();
});*/