Optimize method names for spaces AdminController

This commit is contained in:
Andy Strobel 2014-07-03 15:50:26 +02:00
parent 0d03f515c6
commit 2794c93302
3 changed files with 5 additions and 6 deletions

View File

@ -265,7 +265,7 @@ class AdminController extends Controller
/**
* Handle the profile image upload
*/
public function actionSpaceImageUpload()
public function actionImageUpload()
{
$space = $this->getSpace();
@ -303,7 +303,7 @@ class AdminController extends Controller
/**
* Crops the profile image of the user
*/
public function actionCropSpaceImage()
public function actionCropImage()
{
$this->adminOnly();

View File

@ -50,7 +50,7 @@
</div>
<div class="modal-footer">
<?php echo HHtml::ajaxButton(Yii::t('SpaceModule.base', 'Save'), Yii::app()->createAbsoluteUrl('//space/admin/cropSpaceImage', array('guid' => $space->guid)), array(
<?php echo HHtml::ajaxButton(Yii::t('SpaceModule.base', 'Save'), Yii::app()->createAbsoluteUrl('//space/admin/cropImage', array('guid' => $space->guid)), array(
'type' => 'POST',
'beforeSend' => 'function(){ $("#invite-loader").removeClass("hidden"); }',
'success' => 'function(html){ $("#globalModal").html(html); }',

View File

@ -41,7 +41,7 @@
class="fa fa-cloud-upload"></i></a>
<a id="profile-image-upload-edit-button"
style="<?php if (!$space->getProfileImage()->hasImage()) { echo 'display: none;'; } ?>"
href="<?php echo Yii::app()->createAbsoluteUrl('//space/admin/cropSpaceImage', array('guid' => $space->guid)); ?>"
href="<?php echo Yii::app()->createAbsoluteUrl('//space/admin/cropImage', array('guid' => $space->guid)); ?>"
class="btn btn-info btn-sm" data-toggle="modal" data-target="#globalModal"><i
class="fa fa-edit"></i></a>
</div>
@ -122,8 +122,7 @@
$(function () {
'use strict';
// Change this to the location of your server-side upload handler:
var profileImageUrl = '<?php echo Yii::app()->createUrl('//space/admin/spaceImageUpload', array('guid' => $space->guid)); ?>';
var bannerImageUrl = '<?php echo Yii::app()->createUrl('//user/profile/bannerImageUpload'); ?>';
var profileImageUrl = '<?php echo Yii::app()->createUrl('//space/admin/imageUpload', array('guid' => $space->guid)); ?>';
$('.fileupload').each(function () {