// small changes on orders view

This commit is contained in:
Rémi Gaillard
2013-10-23 11:59:28 +02:00
parent 5ee716ff9e
commit 8662ef12b4
2 changed files with 13 additions and 13 deletions
@@ -48,6 +48,7 @@
var txt_add_product_no_product_price = "{l s='Error: Product price must be set' js=1}";
var txt_confirm = "{l s='Are you sure?' js=1}";
var statesShipped = new Array();
var has_voucher = {if count($discounts)}1{else}0{/if};
{foreach from=$states item=state}
{if (!$currentState->shipped && $state['shipped'])}
statesShipped.push({$state['id_order_state']});
@@ -927,7 +928,7 @@
</table>
{if $can_edit}
<div class="row-margin-bottom">
<div class="row-margin-bottom order_action">
{if !$order->hasBeenDelivered()}
<button type="button" id="add_product" class="btn btn-default">
<i class="icon-plus-sign"></i>
@@ -952,8 +953,7 @@
</div>
</div>
<div class="col-lg-6">
<div class="panel">
<div class="panel panel-vouchers" style="{if !sizeof($discounts)}display:none;{/if}">
{if (sizeof($discounts) || $can_edit)}
<table class="table">
<thead>
+10 -10
View File
@@ -324,20 +324,17 @@ function init()
$('#add_product').click(function() {
$('.cancel_product_change_link:visible').trigger('click');
$('.add_product_fields').show();
$('.edit_product_fields').hide();
$('.standard_refund_fields').hide();
$('.partial_refund_fields').hide();
$('.edit_product_fields, .standard_refund_fields, .partial_refund_fields, .order_action').hide();
$('tr#new_product').slideDown('fast', function () {
$('tr#new_product td').fadeIn('fast');
});
$(this).hide();
$.scrollTo('tr#new_product', 1200, {offset: -100});
return false;
});
$('#cancelAddProduct').unbind('click');
$('#cancelAddProduct').click(function() {
$('#add_product').show();
$('.order_action').show();
$('tr#new_product td').fadeOut('fast');
});
@@ -517,7 +514,7 @@ function init()
$('.standard_refund_fields').hide();
$('.partial_refund_fields').hide();
$('#add_product').show();
$('.order_action').show();
}
else
jAlert(data.error);
@@ -801,15 +798,17 @@ function init()
$('#add_voucher').unbind('click');
$('#add_voucher').click(function() {
$(this).hide();
$('#voucher_form').show();
$('.order_action').hide();
$('.panel-vouchers,#voucher_form').show();
return false;
});
$('#cancel_add_voucher').unbind('click');
$('#cancel_add_voucher').click(function() {
$('#voucher_form').hide();
$('#add_voucher').show();
if (!has_voucher)
$('.panel-vouchers').hide();
$('.order_action').show();
return false;
});
@@ -900,7 +899,8 @@ $(document).ready(function() {
else
{
flagRefund = 'partial';
$('.standard_refund_fields').hide();
$('.standard_refund_fields, .product_action, .order_action').hide();
$('.product_action').hide();
$('.partial_refund_fields').fadeIn();
}
return false;