forked from dojoVader-dev/Diary
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathEvent.php
executable file
·50 lines (43 loc) · 1.64 KB
/
Event.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
<?php
namespace Plugin\Diary;
class Event {
public static function ipBeforeController($e){
//We don't want it to run on every Plugin
if($e['plugin'] === "Diary" && $e['controller'] === "AdminController"){
$submenu=Submenu::getSubmenuItems();
ipAddCss("assets/css/diary.css");
ipResponse()->setLayoutVariable("submenu",$submenu);
$path=ipFileUrl('Plugin/Diary/assets/js');
ipAddJsContent("dojoConfig","var dojoConfig={
async:true,
parseOnLoad:false,
selectorEngine: 'acme',
packages
:[{name:'Diary',location:'$path'}]
}",40);
ipAddJs("assets/js/boot.js",null,90);
ipAddJs("http://localhost/dojo1.9/dojo/dojo.js");
ipAddCss("http://localhost/dojo1.9/dijit/themes/claro/claro.css");
// ipAddJs("http://ajax.googleapis.com/ajax/libs/dojo/1.9.1/dojo/dojo.js",null,50);
// ipAddCss("http://ajax.googleapis.com/ajax/libs/dojo/1.9.1/dijit/themes/claro/claro.css");
}
else if($e['plugin'] === 'Diary' && $e['controller'] === "SiteController"){
$path=ipFileUrl('Plugin/Diary/assets/js');
ipAddJsContent("dojoConfig","var dojoConfig={
async:true,
parseOnLoad:false,
selectorEngine: 'acme',
packages
:[{name:'Diary',location:'$path'}]
}",40);
// ipAddJs("http://ajax.googleapis.com/ajax/libs/dojo/1.9.1/dojo/dojo.js",null,50);
ipAddJs("http://localhost/dojo1.9/dojo/dojo.js");
ipAddCss("http://localhost/dojo1.9/dijit/themes/claro/claro.css");
ipAddJs("assets/js/boot-front.js",null,90);
// ipAddCss("http://ajax.googleapis.com/ajax/libs/dojo/1.9.1/dijit/themes/claro/claro.css");
//Font Awesome
ipAddCss("http://netdna.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.min.css");
}
}
}
?>