1 <?php
2 3 4 5 6 7 8 9 10 11 12 13
14
15 class WhModal extends TbModal
16 {
17
18 19 20
21 public function init()
22 {
23 parent::init();
24 $this->attachBehavior('ywplugin', array('class' => 'yiiwheels.behaviors.WhPlugin'));
25 }
26
27 28 29
30 public function run()
31 {
32 parent::run();
33
34 $this->registerPluginFiles();
35 }
36
37 38 39
40 public function registerPluginFiles()
41 {
42
43 $path = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'assets';
44
45 $assetsUrl = $this->getAssetsUrl($path);
46
47
48 $cs = Yii::app()->getClientScript();
49
50 $cs->registerCssFile($assetsUrl . '/css/bootstrap-modal.css');
51 $cs->registerScriptFile($assetsUrl . '/js/bootstrap-modal.js', CClientScript::POS_END);
52 $cs->registerScriptFile($assetsUrl . '/js/bootstrap-modalmanager.js', CClientScript::POS_END);
53 }
54
55 }