diff --git a/admin-dev/themes/default/css/admin-theme.css b/admin-dev/themes/default/css/admin-theme.css index 038ed5b3a..94cdaa5a5 100644 --- a/admin-dev/themes/default/css/admin-theme.css +++ b/admin-dev/themes/default/css/admin-theme.css @@ -8392,6 +8392,17 @@ tr.highlight td { -webkit-box-shadow: none; box-shadow: none; } +/* line 737, admin-theme.sass */ +li.sortable-placeholder { + border: 1px dashed #cccccc; + background-color: #bbbbbb; + margin-bottom: 4px; + -webkit-border-radius: 5px; + -moz-border-radius: 5px; + -ms-border-radius: 5px; + -o-border-radius: 5px; + border-radius: 5px; } + /* line 1, _nav.sass */ #nav-sidebar { float: left; diff --git a/admin-dev/themes/default/css/admin-theme.sass b/admin-dev/themes/default/css/admin-theme.sass index f997a23d7..e62465787 100755 --- a/admin-dev/themes/default/css/admin-theme.sass +++ b/admin-dev/themes/default/css/admin-theme.sass @@ -733,6 +733,15 @@ tr.highlight td outline: 0 +box-shadow(none) +//module positions +li.sortable-placeholder + border: 1px dashed #CCC + background-color: #BBB + margin-bottom: 4px + +border-radius(5px) + + + @import "nav" @import "toggle-switch" @import "carrier-wizard" diff --git a/admin-dev/themes/default/template/controllers/orders/_discount_form.tpl b/admin-dev/themes/default/template/controllers/orders/_discount_form.tpl index bd3bae0f2..23ef6ee08 100644 --- a/admin-dev/themes/default/template/controllers/orders/_discount_form.tpl +++ b/admin-dev/themes/default/template/controllers/orders/_discount_form.tpl @@ -23,78 +23,94 @@ * International Registered Trademark & Property of PrestaShop SA *} -
- - -
-
- - -
-
-
-
{/foreach} diff --git a/controllers/admin/AdminStatusesController.php b/controllers/admin/AdminStatusesController.php index 8c6d592e3..7e18b23ae 100644 --- a/controllers/admin/AdminStatusesController.php +++ b/controllers/admin/AdminStatusesController.php @@ -93,8 +93,8 @@ class AdminStatusesControllerCore extends AdminController 'title' => $this->l('Send email to customer'), 'align' => 'center', 'icon' => array( - '1' => 'enabled.gif', - '0' => 'disabled.gif' + '1' => 'icon-ok text-success', + '0' => 'icon-ban-circle text-danger' ), 'type' => 'bool', 'orderby' => false, @@ -104,8 +104,8 @@ class AdminStatusesControllerCore extends AdminController 'title' => $this->l('Delivery'), 'align' => 'center', 'icon' => array( - '1' => 'enabled.gif', - '0' => 'disabled.gif' + '1' => 'icon-ok text-success', + '0' => 'icon-ban-circle text-danger' ), 'type' => 'bool', 'orderby' => false, @@ -116,8 +116,8 @@ class AdminStatusesControllerCore extends AdminController 'title' => $this->l('Invoice'), 'align' => 'center', 'icon' => array( - '1' => 'enabled.gif', - '0' => 'disabled.gif' + '1' => 'icon-ok text-success', + '0' => 'icon-ban-circle text-danger' ), 'type' => 'bool', 'orderby' => false, diff --git a/js/admin_order.js b/js/admin_order.js index 1caa64c76..93154c171 100644 --- a/js/admin_order.js +++ b/js/admin_order.js @@ -350,12 +350,12 @@ function init() { $('tr#new_product input, tr#new_product select').each(function() { if ($(this).attr('id') != 'add_product_product_name') - $('tr#new_product input, tr#new_product select').attr('disabled', true); + $('tr#new_product input, tr#new_product select, tr#new_product button').attr('disabled', true); }); } else { - $('tr#new_product input, tr#new_product select').removeAttr('disabled'); + $('tr#new_product input, tr#new_product select, tr#new_product button').removeAttr('disabled'); // Keep product variable current_product = data; $('#add_product_product_id').val(data.id_product); @@ -576,7 +576,7 @@ function init() ajax: 1, token: token, action: 'loadProductInformation', - id_order_detail: $(this).parent().parent().find('input.edit_product_id_order_detail').val(), + id_order_detail: $(this).closest('tr.product-line-row').find('input.edit_product_id_order_detail').val(), id_address: id_address, id_order: id_order }, @@ -588,13 +588,13 @@ function init() var element_list = $('.customized-' + element.parent().parent().find('.edit_product_id_order_detail').val()); if (!element_list.length) - element_list = element.parent().parent(); + element_list = element.parent().parent().parent(); - element_list.css('background-color', '#E8EDC2'); + //element_list.css('background-color', '#E8EDC2'); element_list.find('td .product_price_show').hide(); element_list.find('td .product_quantity_show').hide(); - element_list.find('td .product_price_edit').parent().attr('align', 'left'); + //element_list.find('td .product_price_edit').parent().attr('align', 'left'); element_list.find('td .product_price_edit').show(); element_list.find('td .product_quantity_edit').show(); @@ -607,10 +607,11 @@ function init() $('th.edit_product_fields').attr('colspan', 2); element_list.find('td.product_action').attr('colspan', 1); - element.parent().children('.delete_product_line').hide(); - element.parent().children('.edit_product_change_link').hide(); - element.parent().children('input[name=submitProductChange]').show(); - element.parent().children('.cancel_product_change_link').show(); + //element.parent().children('.delete_product_line').hide(); + element.parent().children('.edit_product_change_link').parent().hide(); + + element.parent().parent().find('button.submitProductChange').show(); + element.parent().parent().find('.cancel_product_change_link').show(); $('.standard_refund_fields').hide(); $('.partial_refund_fields').hide(); @@ -631,11 +632,10 @@ function init() if (!element_list.length) element_list = $($(this).parent().parent()); - element_list.css('background-color', '#FFF'); - + //element_list.css('background-color', '#FFF'); element_list.find('td .product_price_show').show(); element_list.find('td .product_quantity_show').show(); - element_list.find('td .product_price_edit').parent().attr('align', 'center'); + //element_list.find('td .product_price_edit').parent().attr('align', 'center'); element_list.find('td .product_price_edit').hide(); element_list.find('td .product_quantity_edit').hide(); @@ -643,36 +643,35 @@ function init() element_list.find('td.cancelCheck').show(); element_list.find('td.cancelQuantity').show(); - element_list.find('.delete_product_line').show(); - element_list.find('.edit_product_change_link').show(); - element_list.find('input[name=submitProductChange]').hide(); + //element_list.find('.delete_product_line').show(); + element_list.find('.edit_product_change_link').parent().show(); + element_list.find('button[name=submitProductChange]').hide(); element_list.find('.cancel_product_change_link').hide(); $('.standard_refund_fields').hide(); return false; }); - $('input[name=submitProductChange]').unbind('click'); - $('input[name=submitProductChange]').click(function() { - if ($(this).parent().parent().find('td .edit_product_quantity').val() <= 0) + $('button.submitProductChange').unbind('click'); + $('button.submitProductChange').click(function(e) { + e.preventDefault(); + //console.log($(this).closest('tr.product-line-row').find('td .edit_product_quantity').val()); + //console.log($(this).closest('tr.product-line-row').find('td .edit_product_price').val()); + //return false; + if ($(this).closest('tr.product-line-row').find('td .edit_product_quantity').val() <= 0) { jAlert(txt_add_product_no_product_quantity); return false; } - - if ($(this).parent().parent().find('td .edit_product_price').val() <= 0) + if ($(this).closest('tr.product-line-row').find('td .edit_product_price').val() <= 0) { jAlert(txt_add_product_no_product_price); return false; } - if (confirm(txt_confirm)) { var element = $(this); - var element_list = $('.customized-' + $(this).parent().parent().find('.edit_product_id_order_detail').val()); - query = 'ajax=1&token='+token+'&action=editProductOnOrder&id_order='+id_order+'&'; - if (element_list.length) query += element_list.parent().parent().find('input:visible, select:visible, .edit_product_id_order_detail').serialize(); else @@ -717,10 +716,8 @@ function init() var price_tax_excl = parseFloat($(this).val()); if (price_tax_excl < 0 || isNaN(price_tax_excl)) price_tax_excl = 0; - var tax_rate = current_product.tax_rate / 100 + 1; $('.edit_product_price_tax_incl:visible').val(ps_round(price_tax_excl * tax_rate, 2)); - // Update total product editProductRefreshTotal($(this)); }); @@ -733,7 +730,6 @@ function init() var tax_rate = current_product.tax_rate / 100 + 1; $('.edit_product_price_tax_excl:visible').val(ps_round(price_tax_incl / tax_rate, 2)); - // Update total product editProductRefreshTotal($(this)); }); @@ -743,7 +739,6 @@ function init() var quantity = parseInt($(this).val()); if (quantity < 1 || isNaN(quantity)) quantity = 1; - var stock_available = parseInt($(this).parent().parent().parent().find('td.product_stock').html()); // total update editProductRefreshTotal($(this)); @@ -753,9 +748,8 @@ function init() $('.delete_product_line').click(function() { if (!confirm(txt_confirm)) return false; - - var tr_product = $(this).parent().parent(); - var id_order_detail = $(this).parent().parent().find('td .edit_product_id_order_detail').val(); + var tr_product = $(this).closest('.product-line-row'); + var id_order_detail = $(this).closest('.product-line-row').find('td .edit_product_id_order_detail').val(); var query = 'ajax=1&action=deleteProductLine&token='+token+'&id_order_detail='+id_order_detail+'&id_order='+id_order; $.ajax({ @@ -856,10 +850,6 @@ function init() } - - - - /* Refund system script */ var flagRefund = '';