forked from HardMagic/Pedadida
/
index.php
167 lines (138 loc) · 6.24 KB
/
index.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title>OpenGoo Gel SpreadSheet</title>
<style type="text/css" media="screen">
@import url("./themes/opengoo/style.css");
@import url("./themes/opengoo/toolbar.css");
@import url("../../themes/default/extjs/css/ext-all.css");
</style>
<!--[if IE]>
<style type="text/css" media="screen">
@import url("./ie.css");
</style>
<![endif]-->
<!--[if lte IE 7]>
<style type="text/css" media="screen">
@import url("./ie7.css");
</style>
<![endif]-->
<script type="text/javascript" src="./server/?c=Language&m=getLanguages"></script>
<script type="text/javascript" src="../extjs/adapter/ext/ext-base.js"></script>
<script type="text/javascript" src="../extjs/ext-all.js"></script>
<?php
$cnf = array();
$cnf['jspath'] = array();
$includes = "";
$developing = false;
//<!--******************* External Libraries *********************-->
// $cnf['jspath'][] = "../extjs/adapter/ext/ext-base.js";
// $cnf['jspath'][] = "../extjs/ext-all.js";
//<!--******************* Handlers/Managers *********************-->
$cnf['jspath'][] ="./client/dev/handlers/key_handler.js";
$cnf['jspath'][] ="./client/dev/handlers/style_handler.js";
$cnf['jspath'][] ="./client/dev/handlers/names_handler.js";
$cnf['jspath'][] ="./client/dev/handlers/json_handler.js";
$cnf['jspath'][] ="./client/dev/common/style_wrapper.js";
$cnf['jspath'][] ="./client/dev/common/event_wrapper.js";
$cnf['jspath'][] ="./client/dev/common/error.js";
$cnf['jspath'][] ="./client/dev/common/functions.js";
//<!--******************* Comunication Classes *********************-->
$cnf['jspath'][] ="./client/dev/comm/comm_manager.js";
//<!--******************* Interface Classes *********************-->
$cnf['jspath'][] ="./client/dev/toolbar/toolbar_callback.js";
$cnf['jspath'][] ="./client/dev/toolbar/toolbar.js";
$cnf['jspath'][] ="./client/dev/application/colorPalette.js";
$cnf['jspath'][] ="./client/dev/application/environment.js";
$cnf['jspath'][] ="./client/dev/application/application.js";
$cnf['jspath'][] ="./client/dev/application/configs.js";
$cnf['jspath'][] ="./client/dev/application/application_api.js";
$cnf['jspath'][] ="./client/dev/application/application_dialogs.js";
$cnf['jspath'][] ="./client/dev/application/fonts.js";
$cnf['jspath'][] ="./client/dev/grid/grid_selection.js";
$cnf['jspath'][] ="./client/dev/grid/grid_operations.js";
$cnf['jspath'][] ="./client/dev/grid/grid.js";
$cnf['jspath'][] ="./client/dev/grid/grid_gui.js";
$cnf['jspath'][] ="./client/dev/grid/grid_scrollbar.js";
$cnf['jspath'][] ="./client/dev/grid/grid_components.js";
$cnf['jspath'][] ="./client/dev/grid/grid_events.js";
$cnf['jspath'][] ="./client/dev/grid/resize_handler.js";
$cnf['jspath'][] ="./client/dev/grid/vcell.js";
$cnf['jspath'][] ="./client/dev/grid/vrow.js";
$cnf['jspath'][] ="./client/dev/grid/vcolumn.js";
//<!--******************* Medium Layer *************************>
$cnf['jspath'][] ="./client/dev/controllers/command_controller.js";
$cnf['jspath'][] ="./client/dev/controllers/font_style_controller.js";
$cnf['jspath'][] ="./client/dev/model/model.js";
$cnf['jspath'][] ="./client/dev/model/model_style_operations.js";
$cnf['jspath'][] ="./client/dev/model/model_events.js";
$cnf['jspath'][] ="./client/dev/model/model_navigation.js";
$cnf['jspath'][] ="./client/dev/model/model_selection.js";
$cnf['jspath'][] ="./client/dev/model/selection_handler.js";
//<!--******************* Logic Classes *************************-->
$cnf['jspath'][] ="./client/dev/logic/book.js";
$cnf['jspath'][] ="./client/dev/logic/sheet.js";
$cnf['jspath'][] ="./client/dev/logic/sheet_style_operations.js";
$cnf['jspath'][] ="./client/dev/logic/references.js";
$cnf['jspath'][] ="./client/dev/logic/formula_parser.js";
$cnf['jspath'][] ="./client/dev/logic/cell.js";
$cnf['jspath'][] ="./client/dev/logic/row.js";
$cnf['jspath'][] ="./client/dev/logic/column.js";
$cnf['jspath'][] ="./client/dev/logic/range.js";
$cnf['jspath'][] ="./client/dev/logic/store.js";
$cnf['jspath'][] ="./client/dev/logic/functions.js";
$cnf['jspath'][] ="./client/dev/logic/calculator.js";
$fileName = "gelsheet.min.js";
if($developing == false){
//if minified file doesn't exists build it
if(!file_exists($fileName)){
include_once 'jsmin-1.1.1.php';
$includes = "";
foreach ($cnf['jspath'] as $file) {
$includes .= file_get_contents($file) . "\n";
}
$includes = JSMin::minify($includes);
file_put_contents($fileName, $includes);
}
$includes = "\t<script type=\"text/javascript\" src=\"".$fileName."\"></script>\n";
// echo "<script type=\"text/javascript\">\n" .$includes ."\n</script>\n";
echo $includes;
}else{
foreach ($cnf['jspath'] as $file)
$includes .= "\t<script type=\"text/javascript\" src=\"".$file."\"></script>\n";
echo $includes;
}
?>
<script type="text/javascript" >
function load(){
window.ogID = '' ;
window.ogWID = '' ;
<?php if (isset($_GET['id'])) : ?>
window.ogID = <?php echo $_GET['id'] ?>;
<?php endif; ?>
<?php if (isset($_GET['wid'])) : ?>
window.ogWID = <?php echo $_GET['wid'] ?>;
<?php endif; ?>
var application = new Application(document.body);
<?php if (isset($_GET['book'])) : ?>
application.loadBook(<?php echo $_GET['book'] ?>);
<?php endif; ?>
// Display logo..
var logo_div = document.getElementById('logo');
if ( logo_div ) {
logo_div.style.display = "block";
}
}
</script>
</head>
<body id="body" onload="load();" >
<div id="logo" style="z-index: 1001; display: none" ></div>
<div id="west"></div>
<div id="north">
</div>
<div id="dialog-container" style="position: absolute; z-index: 50000 ;"></div>
<div id="center"></div>
<div id="east" style="width:200px;height:200px;overflow:hidden;"></div>
<div id="south"></div>
</body>
</html>