Fixes minor bug

This commit is contained in:
Sam Georges 2014-06-24 18:53:05 +10:00
parent 506ee7d136
commit ca30c3cef0
1 changed files with 3 additions and 1 deletions

View File

@ -556,10 +556,12 @@ class RelationController extends ControllerBehavior
$config = $this->makeConfig($this->config->list);
$config->model = $this->relationModel;
$config->alias = $this->alias . 'ViewList';
$config->noRecordsMessage = $this->config->emptyMessage;
$config->recordOnClick = sprintf("$.oc.relationBehavior.clickManageListRecord('%s', :id)", $this->field);
$config->showCheckboxes = true;
if ($emptyMessage = $this->getConfig('emptyMessage'))
$config->noRecordsMessage = $emptyMessage;
$widget = $this->makeWidget('Backend\Widgets\Lists', $config);
$widget->bindEvent('list.extendQueryBefore', function($host, $query) {
$this->relationObject->setQuery($query);