PageSourceSearch

https://www.dvd-premiery.cz/engine/js/MooTools/_ui/_ui.js

js dvd-premiery.cz collected 2026-10-02 12:40:34 UTC 2,275 bytes, 121 lines download raw bytes

1/**
2 * Class _ui
3 * 
4 * Base class for all ui controls
5 * 
6 * @authors Michal Schejbal
7 */
8var _ui = new Class(
9{
10	eBody: null,
11	
12	eThis: null,				// Main element handle
13	hThis: null,				// Handle this
14	eParent: null,				// Parent element handle	
15	
16	hLoading: null,				// _ui.Loading instance
17	hImagePreloader: null,		// _ui.ImagesPreloader instance
18	
19	debug: false,
20
21	uiPackage:	/*PK - nesmi byt package, to je vyhrazene klicove slovo v javascriptu, dela pak paseku*/
22	{
23		name: '_ui',
24		scope: '_ui',
25		file: '_ui.js',
26		version: '1.0'
27	},
28
29	options:
30	{
31		debug: false,
32
33		loadingOptions: {enabled: false},
34		imgpreloader: false
35	},
36
37	initialize: function(opts)
38	{
39		Object.append(this.options, opts);
40		this.eThis = this.options.element;
41		this.eBody = window.body ? window.body : document.body;
42		window.addEvent('domready', function()
43		{
44			if(this.eBody) this.eBody.setStyle('position', 'relative');			
45		}.bind(this));
46		
47		this.debug = this.options.debug;
48		
49		if(!this.options.loadingOptions.container)
50			this.options.loadingOptions.container = this.eThis;
51	},
52	
53	iniPackage: function(info)
54	{
55		var tmp = this.uiPackage.scope;
56		Object.append(this.uiPackage, info);		
57		this.uiPackage.scope = tmp+'.'+info.scope;
58		
59		if(this.eThis) this.eThis.addClass('ui-'+this.uiPackage.name.toLowerCase());
60	},	
61	
62
63	// USE this methods to extend their functionality
64	ini: function()
65	{
66
67	},
68	
69	iniLayout: function()
70	{
71		if(this.eThis!=null && this.eThis.getStyle('position')=='static')
72			this.eThis.setStyle('position', 'relative');
73	},	
74	
75	iniData: function()
76	{
77		
78	},	
79	// ---
80	
81	
82	getStringSize: function(styleclass)
83	{
84		var tmp = null;
85		this.eThis.adopt(tmp = new Element('div',
86		{
87			text: 'M',
88			'class': styleclass,
89			styles:
90			{
91				position: 'absolute',
92				//top: -50000,
93				width: 'auto',
94				height: 'auto',
95				background: 'silver'
96			}
97		}));
98		
99		var size = tmp.getCoordinates();
100		size.x = size.width;
101		size.y = size.height;
102
103		console.log('fontdiv',size);
104		tmp.dispose();
105
106				
107
108		return size;	
109	},	
110
111	
112	dbgLog: function(str)
113	{
114		if(this.options.debug)
115		{
116			console.log('file:',this.uiPackage.file, ' ',str);
117		}
118	}
119
120});
121

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.