PageSourceSearch

https://www.gmc.edu/wp-content/plugins/cgframework/global/container_js/container_bfa_openclose.js?v=2.23

js gmc.edu collected 2026-10-02 05:10:44 UTC 8,200 bytes, 204 lines download raw bytes

1;(function($, document, document, undefined) {
2    window.container_bfa_openclose = {
3        
4        execute_actions : function (data,no) {
5            if(typeof no == 'undefined') {
6                no = '';
7            }
8            var _this = window.container_bfa_openclose;
9            _this.container = window.container;
10            _this.goon = 1;
11            switch (data.type) {
12                case 'status' :
13                    return _this.openclose_status(data,no);
14                    break;
15                case 'multi' :
16                    return _this.openclose_multi(data,no);
17                    break;
18            }
19            
20            return _this.goon;
21        },
22        
23        openclose_status : function (data,no) {
24            var _this = window.container_bfa_openclose;
25            
26            if (!_this.container.exists(data,'valuetarget')) {
27                alert ('setting: this_id not found or is incorrect');
28                return false;
29            }
30            if (!_this.container.exists(data,'status')) {
31                alert ('setting: bfa_openclose_status not found');
32                return false;
33            }
34            if (!_this.container.exists(data,'target')) {
35                alert ('setting: bfa_openclose_target not found  or is incorrect');
36                return false;
37            }
38            if (!_this.container.exists(data,'speed')) {
39                alert ('setting: bfa_openclose_speed not found');
40                return false;
41            }
42            
43            if (typeof data.setclass != 'undefined') {
44                if (!_this.container.exists(data.setclass,'target')) {
45                    alert ('setting: openClose_setClass_target not found');
46                    return false;
47                }
48                
49            }
50            if (_this.container.isNumeric(no)) {
51                var status_id = 'bfa_' + no + '_openclose_status';
52            } else {
53                var status_id = 'bfa_openclose_status';
54            }
55            var status = $(data.valuetarget).data(status_id);
56            if (status == 'closed') {
57                $(data.valuetarget).data(status_id,'open');
58                $(data.target).show(data.speed);
59                if (typeof data.setclass.open != 'undefined') {
60                    $(data.setclass.target).addClass(data.setclass.open);
61                }
62                if (typeof data.setclass.closed != 'undefined') {
63                    $(data.setclass.target).removeClass(data.setclass.closed);
64                }
65            } else {
66                $(data.valuetarget).data(status_id,'closed');
67                $(data.target).hide(data.speed);
68                if (typeof data.setclass.open != 'undefined') {
69                    $(data.setclass.target).removeClass(data.setclass.open);
70                }
71                if (typeof data.setclass.closed != 'undefined') {
72                    $(data.setclass.target).addClass(data.setclass.closed);
73                }
74            }
75            if (_this.container.exists(data,'runfunction')) {
76                var list = data.runfunction.split('|');
77                if (list.length == 2) {
78                    if (data.status == 'closed') {
79                        data.status = 'open';
80                    } else {
81                        data.status = 'closed';
82                    }
83                    var f_obj = list[0];
84                    var f_fn = list[1];
85                    window[f_obj][f_fn](data);
86                }
87            }
88            
89        },
90        
91        
92        openclose_multi : function (data,no) {
93            var _this = window.container_bfa_openclose;
94            
95            if (!_this.container.exists(data,'valuetarget')) {
96                alert ('setting: this_id not found or is incorrect');
97                return false;
98            }
99            if (!_this.container.exists(data,'status')) {
100                alert ('setting: bfa_openclose_status not found');
101                return false;
102            }
103            if (!_this.container.exists(data,'target')) {
104                alert ('setting: bfa_openclose_target not found  or is incorrect');
105                return false;
106            }
107            if (!_this.container.exists(data,'grouplinkitems')) {
108                alert ('setting: grouplinkitems not found  or is incorrect');
109                return false;
110            }
111            if (!_this.container.exists(data,'groupitems')) {
112                alert ('setting: groupitems not found  or is incorrect');
113                return false;
114            }
115            if (!_this.container.exists(data,'speed')) {
116                alert ('setting: bfa_openclose_speed not found');
117                return false;
118            }
119            
120            if (typeof data.setclass != 'undefined') {
121                if (!_this.container.exists(data.setclass,'target')) {
122                    alert ('setting: openClose_setClass_target not found');
123                    return false;
124                }
125                
126            }
127            if (_this.container.isNumeric(no)) {
128                var status_id = 'bfa_' + no + '_openclose_status';
129                var target_id = 'bfa_' + no + '_openclose_target';
130                
131            } else {
132                var status_id = 'bfa_openclose_status';
133                var target_id = 'bfa_openclose_target';
134            }
135            _this.data = data;
136            _this.status_id = status_id;
137            _this.target_id = target_id;
138            $(data.grouplinkitems).each (function(){
139                var _this = window.container_bfa_openclose;
140                var data = _this.data;
141                var this_data = $(this).data();
142                if (this_data[_this.target_id] == data.target) {
143                    if (data.status == 'closed') {
144                        $(this).data(_this.status_id,'open');
145                        
146                        $(this).removeClass(data.setclass.closed);
147                        $(this).addClass(data.setclass.open);
148                    } else {
149                        $(this).data(_this.status_id,'closed');
150                        $(this).addClass(data.setclass.closed);
151                        $(this).removeClass(data.setclass.open);
152                    }
153                } else {
154                    $(this).data(_this.status_id,'closed');
155                    $(this).addClass(data.setclass.closed);
156                    $(this).removeClass(data.setclass.open);
157                }
158            });
159            
160            $(data.groupitems).each (function(){
161                var _this = window.container_bfa_openclose;
162                var data = _this.data;
163                var this_id = '#' + $(this).attr('id');
164                var this_data = $(this).data();
165                
166                if (this_id == data.target) {
167                    if (data.status == 'closed') {
168                        $(this).show(data.speed);
169                    } else {
170                        $(this).hide(data.speed);
171                    }
172                } else {
173                    $(this).hide(data.speed);
174                }
175            });
176            if (_this.container.exists(data,'runfunction')) {
177                var list = data.runfunction.split('|');
178                if (list.length == 2) {
179                    if (data.status == 'closed') {
180                        data.status = 'open';
181                    } else {
182                        data.status = 'closed';
183                    }
184                    
185                    var f_obj = list[0];
186                    var f_fn = list[1];
187                    window[f_obj][f_fn](data);
188                }
189            }
190            
191           
192//            $(data.valuetarget).data(status_id,'open');
193//            $(data.target).show(data.speed);
194//            if (typeof data.setclass.open != 'undefined') {
195//                $(data.setclass.target).addClass(data.setclass.open);
196//            }
197//            if (typeof data.setclass.closed != 'undefined') {
198//                $(data.setclass.target).removeClass(data.setclass.closed);
199//            }
200            
201        }
202    }
203    
204})(jQuery, window, document);

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.