syntaxe POO (visibilite) et maj indentation
[mw_sourceml] / app / observers / mw_observer_sourceml.php
1 <?php
2
3   class mw_observer_sourceml extends mw_observer{
4
5     public function before_action(){
6       $env = $this->env();
7       $out_config = $env->get_out_config();
8       $out_config["groupe_view_albums"] = array(
9         "type" => "checkbox",
10         "default" => 1,
11         "text" => "Lister les albums sur la page d'un groupe"
12       );
13       $out_config["colonne_logo_groupe"] = array(
14         "type" => "checkbox",
15         "default" => 1,
16         "text" => "Afficher le logo du groupe courant dans la colonne"
17       );
18       $out_config["albums_menu"] = array(
19         "type" => "checkbox",
20         "default" => 0,
21         "text" => "Afficher les albums du groupe courant dans la colonne"
22       );
23       $out_config["nom_groupe"] = array(
24         "type" => "checkbox",
25         "default" => 0,
26         "text" => "Afficher le nom du groupe courant dans la colonne"
27       );
28       $env->set_out_config($out_config);
29     }
30
31     public function after_action(){
32       $env = $this->env();
33       if($env->etat("mod") == "users"){
34         $env->add_js_file($env->path("web").$env->path("mw_path")."libs/tiny_mce/tiny_mce.js");
35         $env->add_js_file($env->path("web").$env->path("mw_path")."libs/tiny_mce/plugins/tinybrowser/tb_tinymce.js.php");
36       }
37       if($env->etat("mod") == "sources"){
38         $env->add_js_file($env->out_url("js/jquery-1.8.3.min.js"));
39         $env->add_js_file($env->out_url("js/jquery.colorbox-min.js"));
40         $env->add_js_file($env->out_url("js/jquery-ui-1.8.12.custom.min.js"));
41         $env->add_css_file($env->out_url("css/colorbox.css"));
42         $env->add_css_file($env->out_url("css/ui-lightness/jquery-ui-1.8.12.custom.css"));
43         $env->add_js_file($env->out_url("js/jaudio-player.1.1.js"));
44         $env->add_css_file($env->out_url("css/jaudio-player.1.1.css"));
45
46       }
47     }
48
49   }