<?php
/**
 * Descriptions
 * @author yzxh24
 * @email yzxh24@gmail.com
 * @created 2011-11-04 14:09:38
 */
class TaskerController extends BackendController
{
    /**
     * 面包屑导航
     * @var array
     */
    public $breadcrumbs = array('任务列表'=>array('/admin/task/list'));
    
    /**
     * action路径前缀
     */
	protected $actionPrefix = 'admin.controllers.Tasker.';

    /**
     * action对应表
     */
    protected $actionMap = array(
        'list' => 'ListAction',
        'create' => 'CreateAction',
        'respone' => 'ResponeAction',
        'reward' => 'RewardAction',
        'cancel' => 'CancelAction',
    );

	/**
	 * Performs the AJAX validation.
	 * @param CModel the model to be validated
	 */
	protected function performAjaxValidation($model)
	{
		if(isset($_POST['ajax']) && $_POST['ajax'] === 'tasker-form')
		{
			echo CActiveForm::validate($model);
			Yii::app()->end();
		}
	}
}