diff --git a/admin-dev/themes/template/products/images.tpl b/admin-dev/themes/template/products/images.tpl index e4cb152f4..7c2c5e571 100644 --- a/admin-dev/themes/template/products/images.tpl +++ b/admin-dev/themes/template/products/images.tpl @@ -178,10 +178,10 @@ {$image->position} - position}style="display: none;"{/if} href="{$currentIndex}&id_image={$image->id_image}&imgPosition={$image->position -1}&imgDirection=0&token={$token}"> + position == 1}style="display: none;"{/if} href="{$currentIndex}&id_image={$image->id_image}&imgPosition={$image->position -1}&imgDirection=0&token={$token}"> - position} == $imagesTotal} style="display: none;"{/if} href="{$currentIndex}&id_image={$image->id_image}&imgPosition={$image->position+1}&imgDirection=1&token={$token}"> + position == count($images)} style="display: none;"{/if} href="{$currentIndex}&id_image={$image->id_image}&imgPosition={$image->position+1}&imgDirection=1&token={$token}"> diff --git a/controllers/admin/AdminAttributesGroupsController.php b/controllers/admin/AdminAttributesGroupsController.php index 2f663360b..72aa28c09 100644 --- a/controllers/admin/AdminAttributesGroupsController.php +++ b/controllers/admin/AdminAttributesGroupsController.php @@ -33,6 +33,7 @@ class AdminAttributesGroupsControllerCore extends AdminController $this->table = 'attribute_group'; $this->className = 'AttributeGroup'; $this->lang = true; + $this->_defaultOrderBy = 'position'; $this->fieldsDisplay = array( 'id_attribute_group' => array( @@ -41,7 +42,7 @@ class AdminAttributesGroupsControllerCore extends AdminController ), 'name' => array( 'title' => $this->l('Name'), - 'width' => 140, + 'width' => 'auto', 'filter_key' => 'b!name' ), 'position' => array( @@ -530,17 +531,4 @@ class AdminAttributesGroupsControllerCore extends AdminController parent::postProcess(); } } - - /** - * 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 - $order_by = 'position'; - - parent::getList($id_lang, $order_by, $order_way, $start, $limit, $id_lang_shop); - } } diff --git a/controllers/admin/AdminCarriersController.php b/controllers/admin/AdminCarriersController.php index 8e26ba06e..f906d878a 100644 --- a/controllers/admin/AdminCarriersController.php +++ b/controllers/admin/AdminCarriersController.php @@ -37,6 +37,7 @@ class AdminCarriersControllerCore extends AdminController $this->addRowAction('edit'); $this->addRowAction('delete'); + $this->_defaultOrderBy = 'position'; $this->requiredDatabase = true; $this->context = Context::getContext(); @@ -630,11 +631,6 @@ class AdminCarriersControllerCore extends AdminController */ 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 - $order_by = 'position'; - parent::getList($id_lang, $order_by, $order_way, $start, $limit, $id_lang_shop); foreach ($this->_list as $key => $list) diff --git a/controllers/admin/AdminProductsController.php b/controllers/admin/AdminProductsController.php index 49a67840d..99c828c5a 100644 --- a/controllers/admin/AdminProductsController.php +++ b/controllers/admin/AdminProductsController.php @@ -58,7 +58,8 @@ class AdminProductsController extends AdminController $this->duplicate = true; $this->imageType = 'jpg'; $this->context = Context::getContext(); - + $this->_defaultOrderBy = 'position'; + $this->fieldsDisplay = array( 'id_product' => array('title' => $this->l('ID'), 'align' => 'center', 'width' => 20), 'image' => array('title' => $this->l('Photo'), 'align' => 'center', 'image' => 'p', diff --git a/controllers/admin/AdminTaxRulesGroupController.php b/controllers/admin/AdminTaxRulesGroupController.php index c553f5279..d386a8d17 100644 --- a/controllers/admin/AdminTaxRulesGroupController.php +++ b/controllers/admin/AdminTaxRulesGroupController.php @@ -47,14 +47,15 @@ class AdminTaxRulesGroupControllerCore extends AdminController ), 'name' => array( 'title' => $this->l('Name'), - 'width' => 140 + 'width' => 'auto' ), 'active' => array( 'title' => $this->l('Enabled'), 'width' => 25, 'active' => 'status', 'type' => 'bool', - 'orderby' => false + 'orderby' => false, + 'align' => 'center' ) );