// fix position in list for products, product images. still need to fix display after change position product images
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10302 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
@@ -178,10 +178,10 @@
|
||||
</td>
|
||||
<td class="center positionImage">{$image->position}</td>
|
||||
<td id="td_{$image->id}" class="pointer dragHandle center">
|
||||
<a {if $image->position}style="display: none;"{/if} href="{$currentIndex}&id_image={$image->id_image}&imgPosition={$image->position -1}&imgDirection=0&token={$token}">
|
||||
<a {if $image->position == 1}style="display: none;"{/if} href="{$currentIndex}&id_image={$image->id_image}&imgPosition={$image->position -1}&imgDirection=0&token={$token}">
|
||||
<img src="../img/admin/up.gif" alt="" border="0">
|
||||
</a>
|
||||
<a {if $image->position} == $imagesTotal} style="display: none;"{/if} href="{$currentIndex}&id_image={$image->id_image}&imgPosition={$image->position+1}&imgDirection=1&token={$token}">
|
||||
<a {if $image->position == count($images)} style="display: none;"{/if} href="{$currentIndex}&id_image={$image->id_image}&imgPosition={$image->position+1}&imgDirection=1&token={$token}">
|
||||
<img src="../img/admin/down.gif" alt="" border="0">
|
||||
</a>
|
||||
</td>
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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',
|
||||
|
||||
@@ -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'
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user