-
Notifications
You must be signed in to change notification settings - Fork 1
/
main.php
73 lines (65 loc) · 1.29 KB
/
main.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
<?php
class ToolsAppJsPackage extends ToolsAppPackage {
public $packages = array('Tools.Jquery', 'Tools.Json');
public $files = array(
'core/core.js' => array(
'version' => '0.1'
),
array(
'callback' => 'config',
'mime' => 'text/javascript'
),
'core/config.js' => array(
'version' => '0.1'
)
);
public $subpackages = array(
'debug' => array(
'packages' => array(
'Tools.Php::htmlspecialchars',
'Tools.Jquery::cookie',
'Tools.Jquery::uiResizable'
),
'files' => array(
'core/debug/debug.js' => array(
'version' => '0.1'
),
'core/debug/debug.css' => array(
'version' => '0.1'
)
)
),
'hash' => array(
'packages' => array(
'Tools.Jquery::livequery'
),
'files' => array(
'plugins/hash.js' => array(
'version' => '0.1'
)
)
),
'sound' => array(
'packages' => array(
'Tools.Soundmanager2'
),
'files' => array(
'plugins/sound.js' => array(
'version' => '0.1'
)
)
)
);
public function config() {
$obj = array(
'debug' => Configure::read('debug'),
'baseurl' => Router::url('/'),
'language' => array(
'iso2' => 'de', //TODO: Insert right language
'iso3' => 'deu'
)
);
$js = 'App.config = '.json_encode($obj).";";
return array('data' => $js);
}
}