// Fix Combinations ajax problem
This commit is contained in:
@@ -77,7 +77,7 @@
|
||||
|
||||
<div class="panel-heading">{l s='Add or modify combinations for this product.'}</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-lg-3" for="attribute_group">{l s='Attribute:'}</label>
|
||||
<div class="col-lg-5">
|
||||
<select name="attribute_group" id="attribute_group" onchange="populate_attrs();">
|
||||
@@ -90,7 +90,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-lg-3" for="attribute">{l s='Value:'}</label>
|
||||
<div class="col-lg-9">
|
||||
<div class="row">
|
||||
@@ -116,7 +116,7 @@
|
||||
|
||||
<hr/>
|
||||
|
||||
<div class="row">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-lg-3" for="attribute_reference">
|
||||
<span class="label-tooltip" data-toggle="tooltip"
|
||||
title="{l s='Special characters allowed:'} .-_#">
|
||||
@@ -128,7 +128,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-lg-3" for="attribute_ean13">
|
||||
{l s='EAN13:'}
|
||||
</label>
|
||||
@@ -137,7 +137,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-lg-3" for="attribute_upc">
|
||||
{l s='UPC:'}
|
||||
</label>
|
||||
@@ -148,7 +148,7 @@
|
||||
|
||||
<hr/>
|
||||
|
||||
<div class="row">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-lg-3" for="attribute_wholesale_price">
|
||||
{include file="controllers/products/multishop/checkbox.tpl" field="attribute_wholesale_price" type="default"}
|
||||
<span class="label-tooltip" data-toggle="tooltip"
|
||||
@@ -166,7 +166,7 @@
|
||||
<span style="display:none;" id="attribute_wholesale_price_full">({l s='Overrides wholesale price on "Information" tab'})</span>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-lg-3" for="attribute_price_impact">
|
||||
{include file="controllers/products/multishop/checkbox.tpl" field="attribute_price_impact" type="attribute_price_impact"}
|
||||
{l s='Impact on price:'}
|
||||
@@ -225,7 +225,7 @@
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-lg-3" for="attribute_weight_impact">
|
||||
{include file="controllers/products/multishop/checkbox.tpl" field="attribute_weight_impact" type="attribute_weight_impact"}
|
||||
{l s='Impact on weight:'}
|
||||
@@ -286,7 +286,7 @@
|
||||
</div>
|
||||
|
||||
{if $ps_use_ecotax}
|
||||
<div class="row">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-lg-3" for="attribute_ecotax">
|
||||
{include file="controllers/products/multishop/checkbox.tpl" field="attribute_ecotax" type="default"}
|
||||
<span class="label-tooltip" data-toggle="tooltip"
|
||||
@@ -304,7 +304,7 @@
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
<div class="row">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-lg-3" for="attribute_minimal_quantity">
|
||||
{include file="controllers/products/multishop/checkbox.tpl" field="attribute_minimal_quantity" type="default"}
|
||||
<span class="label-tooltip" data-toggle="tooltip"
|
||||
@@ -318,7 +318,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-lg-3" for="available_date_attribute">
|
||||
{include file="controllers/products/multishop/checkbox.tpl" field="available_date_attribute" type="default"}
|
||||
<span class="label-tooltip" data-toggle="tooltip"
|
||||
@@ -336,7 +336,7 @@
|
||||
|
||||
<hr/>
|
||||
|
||||
<div class="row">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-lg-3">{l s='Image:'}</label>
|
||||
<div class="col-lg-9">
|
||||
<ul id="id_image_attr" class="list-inline">
|
||||
@@ -352,7 +352,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-lg-3" for="attribute_default">
|
||||
{include file="controllers/products/multishop/checkbox.tpl" field="attribute_default" type="attribute_default"}
|
||||
{l s='Default:'}
|
||||
|
||||
@@ -22,6 +22,6 @@
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
<a href="{$href}" title="{$action}" {if isset($name)}name="{$name}"{/if}>
|
||||
<a href="{$href}" title="{$action}" {if isset($name)}name="{$name}"{/if} class="default">
|
||||
<i class="icon-asterisk"></i> {$action}
|
||||
</a>
|
||||
@@ -22,6 +22,6 @@
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
<a href="{$href}" {if isset($confirm)}onclick="if (confirm('{$confirm}')){ return true; }else{ event.stopPropagation(); event.preventDefault();};"{/if} title="{$action}">
|
||||
<a href="{$href}" {if isset($confirm)}onclick="if (confirm('{$confirm}')){ return true; }else{ event.stopPropagation(); event.preventDefault();};"{/if} title="{$action}" class="delete">
|
||||
<i class="icon-trash"></i> {$action}
|
||||
</a>
|
||||
@@ -3852,12 +3852,10 @@ class AdminProductsControllerCore extends AdminController
|
||||
$comb_array[$id_product_attribute]['image'] = $product_attribute['id_image'] ? new Image($product_attribute['id_image']) : false;
|
||||
$comb_array[$id_product_attribute]['available_date'] = $product_attribute['available_date'] != 0 ? date('Y-m-d', strtotime($product_attribute['available_date'])) : '0000-00-00';
|
||||
$comb_array[$id_product_attribute]['attributes'] = $list;
|
||||
$comb_array[$id_product_attribute]['name'] = $list;
|
||||
|
||||
if ($product_attribute['default_on'])
|
||||
{
|
||||
$comb_array[$id_product_attribute]['name'] = 'is_default';
|
||||
$comb_array[$id_product_attribute]['class'] = $default_class;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+3
-12
@@ -133,17 +133,8 @@ product_tabs['Combinations'] = new function(){
|
||||
if (data.status == 'ok')
|
||||
{
|
||||
showSuccessMessage(data.message);
|
||||
|
||||
// Reset previous default attribute display
|
||||
var previous = $('a[name=is_default]');
|
||||
previous.closest('tr').attr('style', '');
|
||||
previous.show();
|
||||
previous.attr('name', '');
|
||||
|
||||
// Update new default attribute display
|
||||
$(item).closest('tr').css('background','#BDE5F8');
|
||||
$(item).hide();
|
||||
$(item).attr('name', 'is_default');
|
||||
$('.highlighted').removeClass('highlighted');
|
||||
$(item).closest('tr').addClass('highlighted');
|
||||
}
|
||||
else
|
||||
showErrorMessage(data.message);
|
||||
@@ -152,9 +143,9 @@ product_tabs['Combinations'] = new function(){
|
||||
};
|
||||
|
||||
this.bindDefault = function(){
|
||||
$('a[name=is_default]').hide();
|
||||
$('table[name=list_table]').delegate('a.default', 'click', function(e){
|
||||
e.preventDefault();
|
||||
console.log('ok');
|
||||
self.defaultProductAttribute(this.href, this);
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user