fix associations tab in product modification page

This commit is contained in:
Manuel Raynaud
2014-01-21 09:43:55 +01:00
parent 87bc1a83aa
commit 91cf069313
2 changed files with 5 additions and 4 deletions

View File

@@ -123,10 +123,11 @@ class Accessory extends Product
foreach ($results as $loopResultRow) { foreach ($results as $loopResultRow) {
$accessoryProductId = $loopResultRow->get('ID'); $accessoryProductId = $loopResultRow->get('ID');
\Thelia\Log\Tlog::getInstance()->notice($this->accessoryId);
$loopResultRow $loopResultRow
->set("ID" , $this->accessoryId[$accessoryProductId]) ->set("ID" , $this->accessoryId[$accessoryProductId])
->set("POSITION", $this->accessoryPosition[$accessoryProductId]) ->set("POSITION", $this->accessoryPosition[$accessoryProductId])
->set("ACCESSORY_ID", $accessoryProductId)
; ;
} }

View File

@@ -226,7 +226,7 @@
<td class="actions"> <td class="actions">
<div class="btn-group"> <div class="btn-group">
{loop type="auth" name="can_create" role="ADMIN" resources="admin.product" access="UPDATE"} {loop type="auth" name="can_create" role="ADMIN" resources="admin.product" access="UPDATE"}
<a class="btn btn-default btn-xs delete-accessory" title="{intl l='Delete this accessory'}" href="#delete_accessory_dialog" data-id="{$ID}" data-toggle="modal"> <a class="btn btn-default btn-xs delete-accessory" title="{intl l='Delete this accessory'}" href="#delete_accessory_dialog" data-id="{$ACCESSORY_ID}" data-toggle="modal">
<span class="glyphicon glyphicon-trash"></span> <span class="glyphicon glyphicon-trash"></span>
</a> </a>
{/loop} {/loop}
@@ -523,7 +523,7 @@ $(function() {
$('.accessoryPositionChange').editable({ $('.accessoryPositionChange').editable({
type : 'text', type : 'text',
title : '{intl l="Enter new accessory position"}', title : "{intl l="Enter new accessory position"}",
mode : 'popup', mode : 'popup',
inputclass : 'input-mini', inputclass : 'input-mini',
placement : 'left', placement : 'left',
@@ -541,7 +541,7 @@ $(function() {
$('.contentPositionChange').editable({ $('.contentPositionChange').editable({
type : 'text', type : 'text',
title : '{intl l="Enter new content position"}', title : "{intl l="Enter new content position"}",
mode : 'popup', mode : 'popup',
inputclass : 'input-mini', inputclass : 'input-mini',
placement : 'left', placement : 'left',