PageSourceSearch

https://dfe.eprviamineira.com.br/content/js/app/inspinia.js

js eprviamineira.com.br collected 2026-10-02 18:15:28 UTC 8,771 bytes, 310 lines download raw bytes

1/*
2 *
3 *   INSPINIA - Responsive Admin Theme
4 *   version 2.4
5 *
6 */
7
8
9$(document).ready(function () {
10
11    // Add body-small class if window less than 768px
12    if ($(this).width() < 769) {
13        $('body').addClass('body-small')
14    } else {
15        $('body').removeClass('body-small')
16    }
17
18    // MetsiMenu
19    $('#side-menu').metisMenu();
20
21    // Collapse ibox function
22    $('.collapse-link').click(function () {
23        var ibox = $(this).closest('div.ibox');
24        var button = $(this).find('i');
25        var content = ibox.find('div.ibox-content');
26        content.slideToggle(200);
27        button.toggleClass('fa-chevron-up').toggleClass('fa-chevron-down');
28        ibox.toggleClass('').toggleClass('border-bottom');
29        setTimeout(function () {
30            ibox.resize();
31            ibox.find('[id^=map-]').resize();
32        }, 50);
33    });
34
35    // Close ibox function
36    $('.close-link').click(function () {
37        var content = $(this).closest('div.ibox');
38        content.remove();
39    });
40
41    // Fullscreen ibox function
42    $('.fullscreen-link').click(function () {
43        var ibox = $(this).closest('div.ibox');
44        var button = $(this).find('i');
45        $('body').toggleClass('fullscreen-ibox-mode');
46        button.toggleClass('fa-expand').toggleClass('fa-compress');
47        ibox.toggleClass('fullscreen');
48        setTimeout(function () {
49            $(window).trigger('resize');
50        }, 100);
51    });
52
53    // Close menu in canvas mode
54    $('.close-canvas-menu').click(function () {
55        $("body").toggleClass("mini-navbar");
56        SmoothlyMenu();
57    });
58
59    // Run menu of canvas
60    $('body.canvas-menu .sidebar-collapse').slimScroll({
61        height: '100%',
62        railOpacity: 0.9
63    });
64
65    // Open close right sidebar
66    $('.right-sidebar-toggle').click(function () {
67        $('#right-sidebar').toggleClass('sidebar-open');
68    });
69
70    // Initialize slimscroll for right sidebar
71    $('.sidebar-container').slimScroll({
72        height: '100%',
73        railOpacity: 0.4,
74        wheelStep: 10
75    });
76
77    // Open close small chat
78    $('.open-small-chat').click(function () {
79        $(this).children().toggleClass('fa-comments').toggleClass('fa-remove');
80        $('.small-chat-box').toggleClass('active');
81    });
82
83    // Initialize slimscroll for small chat
84    $('.small-chat-box .content').slimScroll({
85        height: '234px',
86        railOpacity: 0.4
87    });
88
89    // Small todo handler
90    $('.check-link').click(function () {
91        var button = $(this).find('i');
92        var label = $(this).next('span');
93        button.toggleClass('fa-check-square').toggleClass('fa-square-o');
94        label.toggleClass('todo-completed');
95        return false;
96    });
97
98    // Minimalize menu
99    $('.navbar-minimalize').click(function () {
100        $("body").toggleClass("mini-navbar");
101        SmoothlyMenu();
102
103    });
104
105    // Tooltips
106    $('body').tooltip({
107        selector: '[data-tooltip], [data-toggle="tooltip"]'
108    });
109
110    // Popover
111    $('body').popover({
112        selector: '[data-popover], [data-toggle="popover"]'
113    });
114
115    // Move modal to body
116    // Fix Bootstrap backdrop issu with animation.css
117    $('.modal').appendTo("body");
118
119    // Full height of sidebar
120    function fix_height() {
121        var heightWithoutNavbar = $("body > #wrapper").height() - 61;
122        $(".sidebard-panel").css("min-height", heightWithoutNavbar + "px");
123
124        var navbarHeigh = $('nav.navbar-default').height();
125        var wrapperHeigh = $('#page-wrapper').height();
126
127        if (navbarHeigh > wrapperHeigh) {
128            $('#page-wrapper').css("min-height", navbarHeigh + "px");
129        }
130
131        if (navbarHeigh < wrapperHeigh) {
132            $('#page-wrapper').css("min-height", $(window).height() + "px");
133        }
134
135        if ($('body').hasClass('fixed-nav')) {
136            $('#page-wrapper').css("min-height", $(window).height() - 60 + "px");
137        }
138
139    }
140
141    fix_height();
142
143    // Fixed Sidebar
144    $(window).bind("load", function () {
145        if ($("body").hasClass('fixed-sidebar')) {
146            $('.sidebar-collapse').slimScroll({
147                height: '100%',
148                railOpacity: 0.9
149            });
150        }
151    });
152
153    // Move right sidebar top after scroll
154    $(window).scroll(function () {
155        if ($(window).scrollTop() > 0 && !$('body').hasClass('fixed-nav')) {
156            $('#right-sidebar').addClass('sidebar-top');
157        } else {
158            $('#right-sidebar').removeClass('sidebar-top');
159        }
160    });
161
162    $(window).bind("load resize scroll", function () {
163        if (!$("body").hasClass('body-small')) {
164            fix_height();
165        }
166    });
167
168    $("[data-toggle=popover]")
169        .popover();
170
171    // Add slimscroll to element
172    $('.full-height-scroll').slimscroll({
173        height: '100%'
174    })
175
176    // catch ajax error
177    $(document).ajaxError(function (event, jqxhr, settings, thrownError) {
178        if (jqxhr.status == 401) {
179            bootbox.dialog({
180                title: jqxhr.responseJSON.title,
181                message: jqxhr.responseJSON.text,
182                main: {
183                    label: "Fechar",
184                    className: "btn-default"
185                }
186            });
187        }
188    });
189});
190
191
192// Minimalize menu when screen is less than 768px
193$(window).bind("resize", function () {
194    if ($(this).width() < 769) {
195        $('body').addClass('body-small')
196    } else {
197        $('body').removeClass('body-small')
198    }
199});
200
201// Local Storage functions
202// Set proper body class and plugins based on user configuration
203$(document).ready(function () {
204    if (localStorageSupport) {
205
206        var collapse = localStorage.getItem("collapse_menu");
207        var fixedsidebar = localStorage.getItem("fixedsidebar");
208        var fixednavbar = localStorage.getItem("fixednavbar");
209        var boxedlayout = localStorage.getItem("boxedlayout");
210        var fixedfooter = localStorage.getItem("fixedfooter");
211
212        var body = $('body');
213
214        if (fixedsidebar == 'on') {
215            body.addClass('fixed-sidebar');
216            $('.sidebar-collapse').slimScroll({
217                height: '100%',
218                railOpacity: 0.9
219            });
220        }
221
222        if (collapse == 'on') {
223            if (body.hasClass('fixed-sidebar')) {
224                if (!body.hasClass('body-small')) {
225                    body.addClass('mini-navbar');
226                }
227            } else {
228                if (!body.hasClass('body-small')) {
229                    body.addClass('mini-navbar');
230                }
231
232            }
233        }
234
235        if (fixednavbar == 'on') {
236            $(".navbar-static-top").removeClass('navbar-static-top').addClass('navbar-fixed-top');
237            body.addClass('fixed-nav');
238        }
239
240        if (boxedlayout == 'on') {
241            body.addClass('boxed-layout');
242        }
243
244        if (fixedfooter == 'on') {
245            $(".footer").addClass('fixed');
246        }
247    }
248});
249
250// check if browser support HTML5 local storage
251function localStorageSupport() {
252    return (('localStorage' in window) && window['localStorage'] !== null)
253}
254
255// For demo purpose - animation css script
256function animationHover(element, animation) {
257    element = $(element);
258    element.hover(
259        function () {
260            element.addClass('animated ' + animation);
261        },
262        function () {
263            //wait for animation to finish before removing classes
264            window.setTimeout(function () {
265                element.removeClass('animated ' + animation);
266            }, 2000);
267        });
268}
269
270function SmoothlyMenu() {
271    if (!$('body').hasClass('mini-navbar') || $('body').hasClass('body-small')) {
272        // Hide menu in order to smoothly turn on when maximize menu
273        $('#side-menu').hide();
274        $('#lean-logo').removeClass('hide');
275        // For smoothly turn on menu
276        setTimeout(
277            function () {
278                $('#side-menu').fadeIn(400);
279            }, 200);
280    } else if ($('body').hasClass('fixed-sidebar')) {
281        $('#side-menu').hide();
282        setTimeout(
283            function () {
284                $('#side-menu').fadeIn(400);
285            }, 100);
286    } else {
287        // Remove all inline style from jquery fadeIn function to reset menu state
288        $('#side-menu').removeAttr('style');
289        // Remove leanwork logo
290        $('#lean-logo').addClass('hide');
291    }
292}
293
294// Dragable panels
295function WinMove() {
296    var element = "[class*=col]";
297    var handle = ".ibox-title";
298    var connect = "[class*=col]";
299    $(element).sortable(
300        {
301            handle: handle,
302            connectWith: connect,
303            tolerance: 'pointer',
304            forcePlaceholderSize: true,
305            opacity: 0.8
306        })
307        .disableSelection();
308}
309
310

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.