PageSourceSearch

https://troikatronix.com/wp-content/themes/troikatronix/js/app.page.getit.js

js troikatronix.com collected 2026-10-02 03:28:46 UTC 3,645 bytes, 198 lines download raw bytes

1$.namespace('App.Page').Getit = {
2	init: function(){
3		
4		var c = this;
5
6		c.arrBoxLeft 	= Array();
7		c.arrBoxRight 	= Array();
8
9		$('.center > .align > .rt .col1', c).find('.b').each(function(i) {	
10
11			c.arrBoxLeft.push(this); 
12
13		});
14
15		$('.center > .align > .rt .col2', c).find('.b').each(function(i) {	
16
17			c.arrBoxRight.push(this); 
18
19		});
20
21		setTimeout(function() { c.resize(); }, 50);
22		
23		$(window).on({
24			resize: function(){
25				
26				c.resize();
27				
28			}
29		});
30
31		//
32
33		$('li.hover', c).on({
34			mouseenter: function(){
35				
36				c.showHideInfo(this, 'show');
37				
38				
39			},
40			mouseleave: function(){
41				
42				c.showHideInfo(this, 'hide');
43			}
44		});
45
46		$('li.hover .info', c).on({
47			mouseenter: function(){
48				
49				c.showHideInfo(this, 'hide');
50				
51				
52			}
53		});
54
55		$('li.click a:not(.send)', c).on({
56			click: function(e){
57				e.preventDefault();
58				
59				if( $(this).next('.info').css('display') == 'none' ) {
60					c.showHideInfo(this, 'show');
61				} else {
62					c.showHideInfo(this, 'hide');
63				}
64				
65				
66				
67			}
68		});
69
70		$('a.main', c).on({
71	        'click': function (e) {
72
73	        	e.preventDefault();
74	        	if($(this).hasClass('new')) {
75	        		window.open( $(this).attr('href') );
76	        	}
77	        },
78	    });
79
80	    $('form a.send', c).on('click', function(e) {
81    		e.preventDefault();
82			e.stopPropagation();
83			c.sendForm();
84		});
85
86	},
87	resize: function(){
88
89		var c = this;
90
91		$('.center > .align > .rt > .col .b', c).height('auto');
92
93		if( $('.center > .align > .rt > .col').css('float') == 'left') {
94			return false;
95		}
96
97		for(i=0; i<c.arrBoxLeft.length; i++) {
98
99			var boxLeft 	= c.arrBoxLeft[i];
100			var boxRight 	= c.arrBoxRight[i];
101
102			console.log( $(boxLeft).height() +'/' + $(boxRight).height() );
103
104			if($(boxLeft).height()<$(boxRight).height()) {
105
106				$(boxLeft).height( $(boxRight).height() );
107
108			} else if($(boxLeft).height()>$(boxRight).height()) {
109
110				$(boxRight).height( $(boxLeft).height() );
111			}
112		}
113
114	},
115	showHideInfo: function(_element, _state){
116
117		var c = this;
118
119		var li = $(_element).closest('li');
120
121		switch(_state) {
122			case 'show':
123
124				$('li .info', c).hide();	
125
126				if($('.info', li).hasClass('full')) {
127					$('.info', li).width( $(li).closest('.rt').width() - 10 );
128				}
129
130				$('.info', li).show().height('auto');
131
132				var height = $('.info', li).height() + 14;
133
134				$('.info', li).height(0);
135
136				TweenLite.killTweensOf( $('.info', li) );
137				TweenLite.to( $('.info', li), 0.5, {
138					ease: Quart.easeOut, 
139					height:height
140				
141				});
142
143				var heightTotal = ($('.info', li).offset().top -  $('#content').offset().top) + height;
144				var heightContent = $('#content').height();
145
146				var paddingBottom = 60
147
148				if(heightTotal>heightContent) {
149					paddingBottom += heightTotal-heightContent;
150				}
151				
152				TweenLite.to( $('#content'), 0.5, {
153					ease: Quart.easeOut, 
154					paddingBottom: paddingBottom
155				
156				});
157				
158				break;
159
160
161			case 'hide':
162
163				$('.info', li).hide();	
164
165				$('#content').css({'paddingBottom': 60});
166
167				break;
168
169		}
170
171	},
172	sendForm: function(){
173
174		var c = this;
175
176		if($('#platform').val() == 'XXX') {
177			return false;
178		}
179
180		var url = 'https://www.troikatronix.com/cgi-bin/';
181
182		switch( $('#platform').val() ) {
183			case 'ISM':
184				url += 'macserial.cgi?'
185				break;
186			case 'ISW':
187				url += 'winserial.cgi?'
188				break;
189		}
190
191		url += $('form', c).serialize();
192
193		var data = $('form', c).serialize();
194
195		app.register.showContent(url);
196
197	}
198}

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.