6
6
this.popup_off_callbacks = new Array();
7
7
this.current_height = new Array();
8
8
this.popups = new Array();
9
this.modules = new Array();
10
this.controls = new Array();
9
11
this.popups_width = 300;
10
12
this.num_opened = 0;
16
18
if (typeof cb != "undefined") this.RegisterCallback(cb,cbattr);
21
POPUP.prototype.RegisterPopup = function(module) {
22
this.popups.push(module);
23
this.controls[module] = new Array();
24
this.popup_states[module] = 0;
27
POPUP.prototype.RegisterControlsModule = function(module, cmod) {
28
if (typeof this.controls[module] == "undefined") {
29
this.RegisterPopup(module);
32
this.modules[module] = cmod;
35
POPUP.prototype.RegisterControl = function(module, control) {
36
if (typeof this.controls[module] == "undefined") {
37
this.RegisterPopup(module);
40
this.controls[module].push(control);
43
POPUP.prototype.FindControl = function(control) {
44
for (var i = 0; i < this.popups.length; i++) {
45
var popup = this.popups[i];
46
if (typeof this.controls[popup] != "undefind") {
47
for (var j = 0; j < this.controls[popup].length; j++) {
48
if (this.controls[popup][j] == control) {
57
POPUP.prototype.OpenControl = function(control) {
58
var popup = this.FindControl(control);
59
var module = this.modules[popup];
61
if ((popup)&&(module)) {
20
68
POPUP.prototype.TryFixedSizeMode = function(sidebar, popup, geometry_node) {
21
69
this.super_popup = false;
205
POPUP.prototype.Open = function (module) {
206
if (!this.popup_states[module]) {
211
POPUP.prototype.Close = function (module) {
212
if (this.popup_states[module]) {
158
217
POPUP.prototype.Switch = function (module) {
160
219
if (typeof this.popup_states[module] == "undefined") {
220
this.RegisterPopup(module);
223
if (this.popup_states[module]) {
224
domHide("popup_" + module);
161
225
this.popup_states[module] = 0;
162
this.popups.push(module);
165
if (popup_states[module]) {
166
domHide("popup_" + module);
167
popup_states[module] = 0;
169
227
if (typeof this.popup_off_callbacks[module] != "undefined") {
170
228
for (var i = 0; i < this.popup_off_callbacks[module].length; i++) {