summaryrefslogtreecommitdiff
path: root/actions
diff options
context:
space:
mode:
authorCraig Andrews <candrews@integralblue.com>2009-08-05 19:45:12 -0400
committerCraig Andrews <candrews@integralblue.com>2009-08-05 19:45:12 -0400
commit304db1d30b4ad96f8a2ca500d224bb1609588fed (patch)
treed5469aad37b0f8cc0826053f963332f1af96ae14 /actions
parent6a76addbe8bbfafd1a1dd6ed7ffbf8afebff5abe (diff)
Use script() and cssLink() methods everywhere instead of manually writing out javascript and css each time
Diffstat (limited to 'actions')
-rw-r--r--actions/avatarsettings.php17
-rw-r--r--actions/grouplogo.php17
2 files changed, 6 insertions, 28 deletions
diff --git a/actions/avatarsettings.php b/actions/avatarsettings.php
index c2bb35a39..38e3103f4 100644
--- a/actions/avatarsettings.php
+++ b/actions/avatarsettings.php
@@ -382,13 +382,7 @@ class AvatarsettingsAction extends AccountSettingsAction
function showStylesheets()
{
parent::showStylesheets();
- $jcropStyle =
- common_path('theme/base/css/jquery.Jcrop.css?version='.LACONICA_VERSION);
-
- $this->element('link', array('rel' => 'stylesheet',
- 'type' => 'text/css',
- 'href' => $jcropStyle,
- 'media' => 'screen, projection, tv'));
+ $this->cssLink('css/jquery.Jcrop.css','base','screen, projection, tv');
}
/**
@@ -402,13 +396,8 @@ class AvatarsettingsAction extends AccountSettingsAction
parent::showScripts();
if ($this->mode == 'crop') {
- $jcropPack = common_path('js/jcrop/jquery.Jcrop.pack.js');
- $jcropGo = common_path('js/jcrop/jquery.Jcrop.go.js');
-
- $this->element('script', array('type' => 'text/javascript',
- 'src' => $jcropPack));
- $this->element('script', array('type' => 'text/javascript',
- 'src' => $jcropGo));
+ $this->script('js/jcrop/jquery.Jcrop.pack.js');
+ $this->script('js/jcrop/jquery.Jcrop.go.js');
}
}
}
diff --git a/actions/grouplogo.php b/actions/grouplogo.php
index 8f6158dac..5edb10cf8 100644
--- a/actions/grouplogo.php
+++ b/actions/grouplogo.php
@@ -428,13 +428,7 @@ class GrouplogoAction extends GroupDesignAction
function showStylesheets()
{
parent::showStylesheets();
- $jcropStyle =
- common_path('theme/base/css/jquery.Jcrop.css?version='.LACONICA_VERSION);
-
- $this->element('link', array('rel' => 'stylesheet',
- 'type' => 'text/css',
- 'href' => $jcropStyle,
- 'media' => 'screen, projection, tv'));
+ $this->cssLink('css/jquery.Jcrop.css','base','screen, projection, tv');
}
/**
@@ -448,13 +442,8 @@ class GrouplogoAction extends GroupDesignAction
parent::showScripts();
if ($this->mode == 'crop') {
- $jcropPack = common_path('js/jcrop/jquery.Jcrop.pack.js');
- $jcropGo = common_path('js/jcrop/jquery.Jcrop.go.js');
-
- $this->element('script', array('type' => 'text/javascript',
- 'src' => $jcropPack));
- $this->element('script', array('type' => 'text/javascript',
- 'src' => $jcropGo));
+ $this->script('js/jcrop/jquery.Jcrop.pack.js');
+ $this->script('js/jcrop/jquery.Jcrop.go.js');
}
}