From 444c7944809544928e05bd71479f6551acc98fc4 Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Thu, 5 Feb 2009 16:34:38 -0500 Subject: [PATCH] Don't show stretchy-box on avatar if not cropping --- actions/avatarsettings.php | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/actions/avatarsettings.php b/actions/avatarsettings.php index 5c702ecc0a..3f50ca24cd 100644 --- a/actions/avatarsettings.php +++ b/actions/avatarsettings.php @@ -373,12 +373,14 @@ class AvatarsettingsAction extends AccountSettingsAction { parent::showScripts(); - $jcropPack = common_path('js/jcrop/jquery.Jcrop.pack.js'); - $jcropGo = common_path('js/jcrop/jquery.Jcrop.go.js'); + 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->element('script', array('type' => 'text/javascript', + 'src' => $jcropPack)); + $this->element('script', array('type' => 'text/javascript', + 'src' => $jcropGo)); + } } }