summaryrefslogtreecommitdiff
path: root/protected/components/Html.php
diff options
context:
space:
mode:
Diffstat (limited to 'protected/components/Html.php')
-rw-r--r--protected/components/Html.php8
1 files changed, 6 insertions, 2 deletions
diff --git a/protected/components/Html.php b/protected/components/Html.php
index 38128d5..5d1e3e5 100644
--- a/protected/components/Html.php
+++ b/protected/components/Html.php
@@ -15,8 +15,12 @@ class Html extends CHtml {
/**
* Makes the given URL relative to the /js directory
*/
- public static function jsUrl($url) {
- return Yii::app()->baseUrl.'/js/'.$url;
+ public static function jsUrl($filename) {
+ return Yii::app()->baseUrl.'/js/'.$filename;
+ }
+
+ public static function registerJavascript($filename) {
+ Yii::app()->getClientScript()->registerScriptFile(self::jsUrl($filename));
}
public static function enumItem($model, $attribute) {