From 8bf4d280cbbcf7bfce969225942113be3579c0b8 Mon Sep 17 00:00:00 2001 From: tDidierjean Date: Mon, 21 Nov 2011 13:09:00 +0000 Subject: [PATCH] // AdminFeatures list position --- controllers/admin/AdminFeaturesController.php | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/controllers/admin/AdminFeaturesController.php b/controllers/admin/AdminFeaturesController.php index d345da0db..673f9bfbd 100644 --- a/controllers/admin/AdminFeaturesController.php +++ b/controllers/admin/AdminFeaturesController.php @@ -31,6 +31,7 @@ class AdminFeaturesControllerCore extends AdminController $this->table = 'feature'; $this->className = 'Feature'; $this->lang = true; + $this->_defaultOrderBy = 'position'; $this->fieldsDisplay = array( 'id_feature' => array( @@ -39,7 +40,7 @@ class AdminFeaturesControllerCore extends AdminController ), 'name' => array( 'title' => $this->l('Name'), - 'width' => 128, + 'width' => 'auto', 'filter_key' => 'b!name' ), '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 * @see AdminController::initForm()