/adei/trunk

To get this branch, use:
bzr branch http://darksoft.org/webbzr/adei/trunk
12 by Suren A. Chilingaryan
Layout redesign: search tab, controls, menu
1
<?php
2
$controls_title = _("Controls");
3
4
foreach ($CONTROLS as $module) {
5
    if ($module) {
171 by Suren A. Chilingaryan
KATRIN code by Sebastian and few fixes to integrate it
6
	if (file_exists("setups/$ADEI_SETUP/modules/$module.php")) require("setups/$ADEI_SETUP/modules/$module.php");
7
	else require("modules/" . $module . ".php");
12 by Suren A. Chilingaryan
Layout redesign: search tab, controls, menu
8
    }
9
}
10
11
function controlsJS() {
12
    global $CONTROLS;
13
?>
14
    control_modules = new MODULE("controls");
15
    control_modules.RegisterGeometryCallback(popupUpdateGeometryCallback, { 'popup': adei.popup, 'module': "controls" });
16
    control_modules.DisableHeightAdjustments();
249 by Suren A. Chilingaryan
Open first control in the list, not always Export
17
    control_modules.Open("<?echo $CONTROLS[0];?>");
12 by Suren A. Chilingaryan
Layout redesign: search tab, controls, menu
18
80 by Suren A. Chilingaryan
Few steps on source tree integration in javascript frontend
19
    adei.popup.RegisterControlsModule("controls", control_modules);
12 by Suren A. Chilingaryan
Layout redesign: search tab, controls, menu
20
    adei.popup.RegisterOnCallback("controls", moduleUpdateGeometry, control_modules);
21
    adei.RegisterSuperPopup("controls", "module_controls_all");
22
23
<?
80 by Suren A. Chilingaryan
Few steps on source tree integration in javascript frontend
24
25
    foreach ($CONTROLS as $module) {
26
	if (($module)&&(function_exists($module . "JS"))) 
27
	    call_user_func($module . "JS");
28
?>
29
	adei.popup.RegisterControl("controls", "<?=$module?>");
30
<?
31
    }
12 by Suren A. Chilingaryan
Layout redesign: search tab, controls, menu
32
}
33
34
function controlsPutLink($css, $module) {
35
    echo "<td class=\"$css\" id=\"module_link_controls_$module\"><a href=\"javascript:control_modules.Open('$module')\">";
36
    if (isset($GLOBALS[$module . "_title"])) echo $GLOBALS[$module . "_title"];
37
    else echo $module;
38
    echo "</a></td>";
39
}
40
41
function controlsPage() {
42
    global $CONTROLS;
43
44
    $css = "module_controls_link"; 
45
46
?><table width="100%"><tr><?
47
    $pos = 0;
48
    foreach ($CONTROLS as $module) {
49
	if (!$module) {
50
	    ?></tr></table><table width="100%"><tr><?
51
	    continue;
52
	}
53
	controlsPutLink($css, $module);
54
    }
312 by Suren A. Chilingaryan
Resizing of sidebar popups
55
?></tr></table><div id="module_controls_all" class="controls" style="width: 100%;"><?
12 by Suren A. Chilingaryan
Layout redesign: search tab, controls, menu
56
    foreach ($CONTROLS as $module) {
110 by Suren A. Chilingaryan
Some work on virtual groups, multiple groups in autogen, filtering fixes
57
	if (!$module) {
58
	    continue;
59
	}
60
12 by Suren A. Chilingaryan
Layout redesign: search tab, controls, menu
61
	?><div id="module_controls_<?echo $module;?>" class="module" style="display: none">
62
	    <?if (function_exists($module . "Page")) call_user_func($module . "Page");?>
63
	</div><?
64
    }
65
?></div><?
66
}
67
68
?>