// AdminFeatures list position
This commit is contained in:
@@ -31,6 +31,7 @@ class AdminFeaturesControllerCore extends AdminController
|
|||||||
$this->table = 'feature';
|
$this->table = 'feature';
|
||||||
$this->className = 'Feature';
|
$this->className = 'Feature';
|
||||||
$this->lang = true;
|
$this->lang = true;
|
||||||
|
$this->_defaultOrderBy = 'position';
|
||||||
|
|
||||||
$this->fieldsDisplay = array(
|
$this->fieldsDisplay = array(
|
||||||
'id_feature' => array(
|
'id_feature' => array(
|
||||||
@@ -39,7 +40,7 @@ class AdminFeaturesControllerCore extends AdminController
|
|||||||
),
|
),
|
||||||
'name' => array(
|
'name' => array(
|
||||||
'title' => $this->l('Name'),
|
'title' => $this->l('Name'),
|
||||||
'width' => 128,
|
'width' => 'auto',
|
||||||
'filter_key' => 'b!name'
|
'filter_key' => 'b!name'
|
||||||
),
|
),
|
||||||
'value' => array(
|
'value' => array(
|
||||||
@@ -149,21 +150,6 @@ class AdminFeaturesControllerCore extends AdminController
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Modifying initial getList method to display position feature (drag and drop)
|
|
||||||
*/
|
|
||||||
public function getList($id_lang, $order_by = null, $order_way = null, $start = 0, $limit = null, $id_lang_shop = false)
|
|
||||||
{
|
|
||||||
if ($order_by && $this->context->cookie->__get($this->table.'Orderby'))
|
|
||||||
$order_by = $this->context->cookie->__get($this->table.'Orderby');
|
|
||||||
else if (is_null($order_by))
|
|
||||||
$order_by = null;
|
|
||||||
else
|
|
||||||
$order_by = 'position';
|
|
||||||
|
|
||||||
parent::getList($id_lang, $order_by, $order_way, $start, $limit, $id_lang_shop);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* AdminController::initForm() override
|
* AdminController::initForm() override
|
||||||
* @see AdminController::initForm()
|
* @see AdminController::initForm()
|
||||||
|
|||||||
Reference in New Issue
Block a user