PageSourceSearch

https://fxboss.firstcitizens.com/app/assets/js/layout.js

js firstcitizens.com collected 2026-09-24 21:52:51 UTC 6,967 bytes, 209 lines download raw bytes

1$(document).ready(function() {
2
3    body_sizer();
4
5    $("div[id='#fixed-sidebar']").on('click', function() {
6
7        if ($(this).hasClass("switch-on")) {
8            var windowHeight = $(window).height();
9            var headerHeight = $('#page-header').height();
10            var footerHeight = $('.footer-pane').height()+15;
11            var contentHeight = windowHeight - headerHeight-footerHeight;
12            $('#page-sidebar').css('height', contentHeight);
13            $('.scroll-sidebar').css('height', contentHeight);
14
15            $('.scroll-sidebar').slimscroll({
16                height: '100%',
17                color: 'rgba(155, 164, 169, 0.68)',
18                size: '6px'
19            });
20
21            var headerBg = $('#page-header').attr('class');
22            $('#header-logo').addClass(headerBg);
23
24        } else {
25            var windowHeight = $(document).height();
26            var headerHeight = $('#page-header').height();
27            var footerHeight = $('.footer-pane').height()+15;
28            var contentHeight = windowHeight - headerHeight-footerHeight;
29            $('#page-sidebar').css('height', contentHeight);
30            $('.scroll-sidebar').css('height', contentHeight);
31
32            $(".scroll-sidebar").slimScroll({
33                destroy: true
34            });
35
36            $('#header-logo').removeClass('bg-gradient-9');
37
38        }
39
40    });
41
42});
43
44$(window).on('resize', function() {
45    body_sizer();
46});
47
48function body_sizer() {
49
50    if ($(window).width() < 900) {
51        return;
52    }
53
54    if ($('body').hasClass('fixed-sidebar')) {
55
56        var windowHeight = $(window).height();
57        var headerHeight = $('#page-header').height();
58        var footerHeight = $('.footer-pane').height()+15;
59        var contentHeight = windowHeight - headerHeight-footerHeight;
60        $('#page-sidebar').css('height', contentHeight);
61        $('.scroll-sidebar').css('height', contentHeight);
62        $('#page-content').css('min-height', contentHeight);
63
64    } else {
65
66        var windowHeight = $(document).height();
67        var headerHeight = $('#page-header').height();
68        var footerHeight = $('.footer-pane').height()+15;
69        var contentHeight = windowHeight - headerHeight-footerHeight;
70        $('#page-sidebar').css('height', contentHeight);
71        $('.scroll-sidebar').css('height', contentHeight);
72        $('#page-content').css('min-height', contentHeight);
73
74    }
75
76};
77
78function pageTransitions() {
79
80    var transitions = ['.pt-page-moveFromLeft', 'pt-page-moveFromRight', 'pt-page-moveFromTop', 'pt-page-moveFromBottom', 'pt-page-fade', 'pt-page-moveFromLeftFade', 'pt-page-moveFromRightFade', 'pt-page-moveFromTopFade', 'pt-page-moveFromBottomFade', 'pt-page-scaleUp', 'pt-page-scaleUpCenter', 'pt-page-flipInLeft', 'pt-page-flipInRight', 'pt-page-flipInBottom', 'pt-page-flipInTop', 'pt-page-rotatePullRight', 'pt-page-rotatePullLeft', 'pt-page-rotatePullTop', 'pt-page-rotatePullBottom', 'pt-page-rotateUnfoldLeft', 'pt-page-rotateUnfoldRight', 'pt-page-rotateUnfoldTop', 'pt-page-rotateUnfoldBottom'];
81    for (var i in transitions) {
82        var transition_name = transitions[i];
83        if ($('.add-transition').hasClass(transition_name)) {
84
85            $('.add-transition').addClass(transition_name + '-init page-transition');
86
87            setTimeout(function() {
88                $('.add-transition').removeClass(transition_name + ' ' + transition_name + '-init page-transition');
89            }, 1200);
90            return;
91        }
92    }
93
94};
95
96$(document).ready(function() {
97
98    pageTransitions();
99
100    // Handle dropdown open/close on click event
101    $('.user-account-btn').click(function (e) {
102        var $dropdown = $(this).closest('.dropdown');
103        var $dropdownMenu = $dropdown.find('.dropdown-menu');
104
105        if ($dropdown.hasClass('open')) {
106            $dropdownMenu.stop(true, true).slideUp(400, function () {
107                $dropdown.removeClass('open');
108            });
109        } else {
110            $dropdownMenu.stop(true, true).slideDown(400, function () {
111                $dropdown.addClass('open');
112            });
113        }
114
115         if(e.target.id!="edit-userprofile"){
116            e.preventDefault();
117            e.stopPropagation();
118        }
119    });
120
121    $(document).click(function (e) {
122        if (!$(e.target).closest('.dropdown').length) {
123            var $dropdown = $('.user-account-btn').closest('.dropdown');
124            var $dropdownMenu = $dropdown.find('.dropdown-menu');
125
126            if ($dropdown.hasClass('open')) {
127                $dropdownMenu.stop(true, true).slideUp(400, function () {
128                    $dropdown.removeClass('open');
129                });
130            }
131        }
132    });
133
134    /* Sidebar menu */
135    $(function() {
136
137        $('#sidebar-menu').superclick({
138            animation: {
139                height: 'show'
140            },
141            animationOut: {
142                height: 'hide'
143            }
144        });
145
146        //automatically open the current path
147        var path = window.location.pathname.split('/');
148        path = path[path.length-1];
149        if (path !== undefined) {
150            $("#sidebar-menu").find("a[href$='" + path + "']").addClass('sfActive');
151            $("#sidebar-menu").find("a[href$='" + path + "']").parents().eq(3).superclick('show');
152        }
153
154    });
155
156    /* Colapse sidebar */
157    $(function() {
158
159        $('#close-sidebar').click(function() {
160            $('body').toggleClass('closed-sidebar');
161            $('.glyph-icon', this).toggleClass('fa fa-angle-right').toggleClass('fa fa-angle-left');
162        });
163
164        $("#sidebar-menu").find("li").on("click", "span", function () {
165			$('#page-sidebar.collapse.in').collapse('hide');
166		});
167    });
168
169    /* Sidebar scroll */
170
171    var previousWidth=null;
172	$(window).on('resize', function(){
173		var win = $(this); //this = window
174	      if (previousWidth!=null && previousWidth<=900 && win.width() >= 900) { 
175			  $("body").hide();
176			  location.reload(); 
177		  }
178	      previousWidth=win.width();
179	});
180
181});
182
183// Enable auto complete off for password related fields
184$(function(){
185	$( document ).on('keydown keyup',':input', function(event){
186		if (event.target && (event.target.type == 'text' | event.target.type == 'password')) {
187			autocompleteOff($( this ));
188		}
189	});
190	$( document ).on('mousedown mouseup',':input', function(event){
191		if (event.target && (event.target.type == 'text' | event.target.type == 'password')) {
192			autocompleteOff($( this ));
193		}
194	});
195	$( document ).on('focus',':input', function(event){
196		if (event.target && (event.target.type == 'text' | event.target.type == 'password')) {
197			autocompleteOff($( this ));
198		}
199	});
200    function autocompleteOff(thisObj){
201    	let text = "";
202    	let possible = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
203    	
204    	for (let i = 0; i < 20; i++) {
205    		text += possible.charAt(Math.floor(Math.random() * possible.length));
206    	}
207    	thisObj.attr( 'autocomplete', text );
208    }
209});

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.