PageSourceSearch

https://radiumrecords.de/modules/mod_news_pro_gk4/interface/scripts/engine.js

js radiumrecords.de collected 2026-10-06 16:23:52 UTC 9,517 bytes, 200 lines download raw bytes

1/**
2* Main script file
3* @package News Show Pro GK4
4* @Copyright (C) 2009-2011 Gavick.com
5* @ All rights reserved
6* @ Joomla! is Free Software
7* @ Released under GNU/GPL License : http://www.gnu.org/copyleft/gpl.html
8* @version $Revision: GK4 1.4 $
9**/�
10window.addEvent("load", function(){	
11	$$('.nspMain').each(function(module){	
12		if(!module.hasClass('activated')) {
13			module.addClass('activated');	
14			var $G = $Gavick[module.getProperty('id')];
15			var arts_actual = 0;
16			var list_actual = 0;
17			var arts_block_width = module.getElement('.nspArts') ? module.getElement('.nspArts').getSize().x : null;
18			var links_block_width = module.getElement('.nspList') ? module.getElement('.nspList').getSize().x : null;
19			var arts = module.getElements('.nspArt');
20			var links = (module.getElement('.nspList')) ? module.getElement('.nspList').getElements('li') : [];
21			var arts_per_page = $G['news_column'] * $G['news_rows'];
22			var pages_amount = Math.ceil(arts.length / arts_per_page);
23			var links_pages_amount = Math.ceil(Math.ceil(links.length / $G['links_amount']) / $G['links_columns_amount']);
24			var hover_anim = module.hasClass('hover');
25			var animation = true;
26			
27			var modInterface = { 
28				top: module.getElement('.nspTopInterface'), 
29				bottom: module.getElement('.nspBotInterface')
30			};
31			// arts
32			if(arts.length > 0){
33				for(var i = 0; i < pages_amount; i++){
34					var div = new Element('div');
35					div.setProperty('class', "nspArtPage");
36					div.setStyles({ "width" : arts_block_width+"px", "float" : "left" });
37					div.inject(arts[0], 'before');
38				}	�
39				var j = 0;�
40				for(var i = 0; i < arts.length; i++) {
41					if(i % arts_per_page == 0 && i != 0) { j++; }
42					if(Browser.Engine.trident) arts[i].setStyle('width', (arts[i].getStyle('width').toInt() - 0.2) + "%");
43					arts[i].inject(module.getElements('.nspArtPage')[j], 'bottom');
44					arts[i].removeClass('unvisible');
45				}
46				
47				var main_scroll = new Element('div');
48				main_scroll.setProperty('class', "nspArtScroll1");
49				main_scroll.setStyles({ "width" : arts_block_width + "px", "overflow" : "hidden" });
50				main_scroll.innerHTML = '<div class="nspArtScroll2"></div>';
51				main_scroll.inject(module.getElement('.nspArtPage'), 'before');
52				var long_scroll = module.getElement('.nspArtScroll2');
53				long_scroll.setStyle('width','100000px');
54				module.getElements('.nspArtPage').inject(long_scroll, 'bottom');
55				var art_scroller = new Fx.Scroll(main_scroll, {duration:$G['animation_speed'], wait:false, wheelStops:false, transition: $G['animation_function']});
56			}
57			// links
58			if(links.length > 0){
59				for(var i = 0; i < links_pages_amount * $G['links_columns_amount']; i++){
60					var ul = new Element('ul');
61					ul.setStyles({ "width" : Math.floor(links_block_width / $G['links_columns_amount']) +"px", "float" : "left" });
62					ul.setProperty("class","nspList");
63					ul.inject(module.getElement('.nspLinks'), 'top');
64				}
65				
66				var k = 0;
67				
68				for(var i = 0; i < links.length; i++) {
69					if(i % $G['links_amount'] == 0 && i != 0) { k++; }
70					links[i].inject(module.getElements('ul.nspList')[k], 'bottom');
71					links[i].removeClass('unvisible');
72				}
73				
74				var linkLists = module.getElements('.nspList');
75				linkLists[linkLists.length - 1].dispose();
76				var link_scroll = new Element('div');
77				link_scroll.setProperty("class","nspLinkScroll1");
78				link_scroll.setStyles({ "width" : links_block_width + "px", "overflow" : "hidden" });
79				link_scroll.innerHTML = '<div class="nspLinkScroll2"></div>';
80				link_scroll.inject(module.getElement('.nspLinks'), 'top');
81				var long_link_scroll = module.getElement('.nspLinkScroll2');
82				long_link_scroll.setStyle('width','100000px');
83				module.getElements('.nspList').inject(long_link_scroll, 'bottom');
84				var link_scroller = new Fx.Scroll(link_scroll, {duration:$G['animation_speed'], wait:false, wheelStops:false, transition: $G['animation_function']});
85			}
86			
87			// top interface
88			nsp_art_list(0, module, modInterface.top, pages_amount);
89			nsp_art_list(0, module, modInterface.bottom, links_pages_amount);�
90			if(modInterface.top && modInterface.top.getElement('.nspPagination')){
91				modInterface.top.getElement('.nspPagination').getElements('li').each(function(item,i){
92					item.addEvent(hover_anim ? 'mouseenter' : 'click', function(){
93						art_scroller.start(i*arts_block_width, 0);
94						arts_actual = i;
95						
96						if(Browser.Engine.presto){
97				 			new Fx.Tween(module.getElement('.nspArtScroll2'), {duration:$G['animation_speed'], wait:false, transition: $G['animation_function']}).start('margin-left',-1 * arts_actual * arts_block_width);
98						}
99						
100						nsp_art_list(i, module, modInterface.top, pages_amount);
101						animation = false;
102						(function(){animation = true;}).delay($G['animation_interval'] * 0.8);
103					});	
104				});
105			}�
106			if(modInterface.top && modInterface.top.getElement('.nspPrev')){
107				modInterface.top.getElement('.nspPrev').addEvent("click", function(){
108					if(arts_actual == 0) arts_actual = pages_amount - 1;
109					else arts_actual--;�
110					art_scroller.start(arts_actual * arts_block_width, 0);�
111					if(Browser.Engine.presto){
112				 		new Fx.Tween(module.getElement('.nspArtScroll2'), {duration:$G['animation_speed'], wait:false, transition: $G['animation_function']}).start('margin-left', -1 * arts_actual * arts_block_width);	
113					}�
114					nsp_art_list(arts_actual, module, modInterface.top, pages_amount);
115					animation = false;
116					(function(){animation = true;}).delay($G['animation_interval'] * 0.8);
117				});�
118				modInterface.top.getElement('.nspNext').addEvent("click", function(){
119					if(arts_actual == pages_amount - 1) arts_actual = 0;
120					else arts_actual++;�
121					art_scroller.start(arts_actual * arts_block_width, 0);
122					
123					if(Browser.Engine.presto){
124				 		new Fx.Tween(module.getElement('.nspArtScroll2'), {duration:$G['animation_speed'], wait:false, transition: $G['animation_function']}).start('margin-left', -1 * arts_actual * arts_block_width);	
125					}�
126					nsp_art_list(arts_actual, module, modInterface.top, pages_amount);
127					animation = false;
128					(function(){animation = true;}).delay($G['animation_interval'] * 0.8);
129				});
130			}
131			// bottom interface
132			if(modInterface.bottom && modInterface.bottom.getElement('.nspPagination')){
133				modInterface.bottom.getElement('.nspPagination').getElements('li').each(function(item,i){
134					item.addEvent(hover_anim ? 'mouseenter' : 'click', function(){
135						link_scroller.start(i*links_block_width, 0);
136						list_actual = i;�
137						if(Browser.Engine.presto){
138				 			new Fx.Tween(module.getElement('.nspLinkScroll2'), {duration:$G['animation_speed'], wait:false, transition: $G['animation_function']}).start('margin-left', -1 * list_actual * links_block_width);	
139						}
140						
141						nsp_art_list(i, module, modInterface.bottom, links_pages_amount);
142					});	
143				});
144			}�
145			if(modInterface.bottom && modInterface.bottom.getElement('.nspPrev')){
146				modInterface.bottom.getElement('.nspPrev').addEvent("click", function(){
147					if(list_actual == 0) list_actual = links_pages_amount - 1;
148					else list_actual--;
149					
150					link_scroller.start(list_actual * links_block_width, 0);�
151					if(Browser.Engine.presto){
152			 			new Fx.Tween(module.getElement('.nspLinkScroll2'), {duration:$G['animation_speed'], wait:false, transition: $G['animation_function']}).start('margin-left', -1 * list_actual * links_block_width);	
153					}
154					
155					nsp_art_list(list_actual, module, modInterface.bottom, links_pages_amount);
156				});
157				
158				modInterface.bottom.getElement('.nspNext').addEvent("click", function(){
159					if(list_actual == links_pages_amount - 1) list_actual = 0;
160					else list_actual++;�
161					link_scroller.start(list_actual * links_block_width, 0);
162					
163					if(Browser.Engine.presto){
164	 					new Fx.Tween(module.getElement('.nspLinkScroll2'), {duration:$G['animation_speed'], wait:false, transition: $G['animation_function']}).start('margin-left', -1 * list_actual * links_block_width);	
165					}
166					
167					nsp_art_list(list_actual, module, modInterface.bottom, links_pages_amount);
168				});
169			}�
170			if(module.hasClass('autoanim')){
171				(function(){
172					if(modInterface.top && modInterface.top.getElement('.nspNext')){
173						if(animation) modInterface.top.getElement('.nspNext').fireEvent("click");
174					}else{
175						if(arts_actual == pages_amount - 1) arts_actual = 0;
176						else arts_actual++;
177						
178						art_scroller.start(arts_actual * arts_block_width, 0);
179						
180						if(Browser.Engine.presto){
181					 		new Fx.Tween(module.getElement('.nspArtScroll2'), {duration:$G['animation_speed'], wait:false, transition: $G['animation_function']}).start('margin-left', -1 * arts_actual * arts_block_width);	
182						}
183						
184						nsp_art_list(arts_actual, module, modInterface.top, pages_amount);
185					}
186				}).periodical($G['animation_interval']);
187			}
188		}
189	});�
190	function nsp_art_list(i, module, position, num){
191		if(position && position.getElement('.nspPagination')){
192			var pagination = position.getElement('.nspPagination');
193			pagination.getElements('li').setProperty('class', '');
194			pagination.getElements('li')[i].setProperty('class', 'active');
195		}�
196		if(position && position.getElement('.nspCounter')){
197			position.getElement('.nspCounter').getElement('span').innerHTML =  (i+1) + ' / ' + num;
198		}
199	}
200});

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.