// correct drag and drop for position carriers

This commit is contained in:
vChabot
2011-10-31 11:01:01 +00:00
parent 65fe30c04e
commit 19f1eec6d6
3 changed files with 6 additions and 5 deletions
@@ -23,7 +23,7 @@
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA * International Registered Trademark & Property of PrestaShop SA
*} *}
<tbody>
{foreach $list AS $index => $tr} {foreach $list AS $index => $tr}
<tr <tr
{if $is_dnd_identifier}id="tr_{$id_category}_{$tr.$identifier}_{$tr.position}"{/if} {if $is_dnd_identifier}id="tr_{$id_category}_{$tr.$identifier}_{$tr.position}"{/if}
@@ -111,3 +111,4 @@
{/if} {/if}
</tr> </tr>
{/foreach} {/foreach}
</tbody>
@@ -110,7 +110,7 @@
<td{if $simple_header} style="border:none;"{/if}> <td{if $simple_header} style="border:none;"{/if}>
<table <table
{if $table_id} id={$table_id}{/if} {if $table_id} id={$table_id}{/if}
class="table {if $table_dnd}tableDnd{/if} {$table}" class="table {if $table_dnd}tableDnD{/if} {$table}"
cellpadding="0" cellspacing="0" cellpadding="0" cellspacing="0"
style="width: 100%; margin-bottom:10px;" style="width: 100%; margin-bottom:10px;"
> >
+3 -3
View File
@@ -445,8 +445,8 @@ class HelperListCore extends Helper
isset($this->context->cookie->{$this->table.'_pagination'}) ? $this->context->cookie->{$this->table.'_pagination'} : null isset($this->context->cookie->{$this->table.'_pagination'}) ? $this->context->cookie->{$this->table.'_pagination'} : null
); );
/*$is_dnd_identifier = array_key_exists($this->identifier,$this->identifiersDnd); $this->is_dnd_identifier = array_key_exists($this->identifier,$this->identifiersDnd);
/*
if ($is_dnd_identifier) if ($is_dnd_identifier)
{ {
' id="'. ' id="'.
@@ -465,7 +465,7 @@ class HelperListCore extends Helper
if (array_key_exists($this->identifier, $this->identifiersDnd) && (int)Tools::getValue($this->identifiersDnd[$this->identifier], 1)) if (array_key_exists($this->identifier, $this->identifiersDnd) && (int)Tools::getValue($this->identifiersDnd[$this->identifier], 1))
$table_id = substr($this->identifier, 3, strlen($this->identifier)); $table_id = substr($this->identifier, 3, strlen($this->identifier));
if (array_key_exists($this->identifier, $this->identifiersDnd) && ($this->orderBy != 'position' && $this->orderWay != 'DESC')) if (array_key_exists($this->identifier, $this->identifiersDnd) && ($this->orderBy == 'position' && $this->orderWay != 'DESC'))
$table_dnd = true; $table_dnd = true;
foreach ($this->fieldsDisplay as $key => $params) foreach ($this->fieldsDisplay as $key => $params)