PageSourceSearch

https://www.thesettlersonline.ru/sites/default/themes/common/js/common/DialogHandler.js

js thesettlersonline.ru collected 2026-10-05 21:38:52 UTC 1,040 bytes, 52 lines download raw bytes

1/**
2 * Class to manage the Dialogs
3 */
4gm_DialogHandler = new Class( {
5	queue: []
6	,inProgress: false
7	,currentDisplay: false
8	
9	,_add: function( dialog ) {
10		
11		this.queue.push( dialog );
12		this.showNext();
13	}
14	
15	,showNext: function() {
16		
17		if( !this.inProgress || this.currentDisplay || this.queue.length === 0 ) {
18			return;
19		}
20		this.currentDisplay = true;
21		var dialog = this.queue.shift();
22		dialog.addEvent( 'close', this._completes.bind( this ) );
23		dialog.init();
24	}
25	
26	,_completes: function() {
27		this.currentDisplay = false;
28		this.showNext();
29	}
30	
31	,_start: function() {
32		this.inProgress = true;
33		this.showNext();
34	}
35	
36} );
37
38gm_DialogHandler._instance = null;
39gm_DialogHandler.getInstance = function() {
40	if( gm_DialogHandler._instance === null ) {
41		gm_DialogHandler._instance = new gm_DialogHandler();
42	};
43	return gm_DialogHandler._instance;
44};
45
46gm_DialogHandler.start = function() {
47	gm_DialogHandler.getInstance()._start();
48}
49
50gm_DialogHandler.add = function( dialog ) {
51	gm_DialogHandler.getInstance()._add( dialog );
52}

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.