From f23e60374f15f469842d8ed1e24eb0a75048c581 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9B=B9=E5=BB=B6=E4=B9=89?= Date: Mon, 26 Sep 2022 14:01:25 +0800 Subject: [PATCH] * Code for task #70490. --- module/product/js/all.js | 18 +++++++++++------- module/product/lang/de.php | 2 ++ module/product/lang/en.php | 2 ++ module/product/lang/fr.php | 2 ++ module/product/lang/zh-cn.php | 2 ++ module/product/view/all.html.php | 7 ++++++- 6 files changed, 25 insertions(+), 8 deletions(-) diff --git a/module/product/js/all.js b/module/product/js/all.js index 13815ef5b6..fd69289343 100644 --- a/module/product/js/all.js +++ b/module/product/js/all.js @@ -1,13 +1,13 @@ $("#" + browseType + "Tab").addClass('btn-active-text'); $(function() { - $('#productListForm .c-checkbox').hide(); + $('#productListForm .c-checkbox, #productListForm .check-all').hide(); $('input[name^="showEdit"]').click(function() { - $('#productListForm .c-checkbox').hide(); + $('#productListForm .c-checkbox, #productListForm .check-all').hide(); var showEdit = $(this).is(':checked') ? 1 : 0; - if(showEdit) $('#productListForm .c-checkbox').show(); + if(showEdit) $('#productListForm .c-checkbox, #productListForm .check-all').show(); }); /* Init table sort. */ @@ -78,17 +78,21 @@ $(function() function addStatistic() { var checkedLength = $(":checkbox[name^='productIDList']:checked").length; - var summary = checkedProducts.replace('%s', checkedLength); - if(cilentLang == "en" && checkedLength < 2) summary = summary.replace('products', 'product'); - var statistic = "
" + summary + "
"; - if(checkedLength > 0) { + var summary = checkedProducts.replace('%s', checkedLength); + if(cilentLang == "en" && checkedLength < 2) summary = summary.replace('products', 'product'); + + var statistic = "
" + summary + "
"; + $('#productsCount').hide(); $('#productsSummary').remove(); $('#editBtn').after(statistic); + $('.table-actions').show(); } else { + $('.table-actions').hide(); + $('#productsCount').show(); $('#productsSummary').addClass('hidden'); } } diff --git a/module/product/lang/de.php b/module/product/lang/de.php index 448a936116..9acbd9b49e 100644 --- a/module/product/lang/de.php +++ b/module/product/lang/de.php @@ -37,6 +37,8 @@ $lang->product->addWhitelist = 'Add Whitelist'; $lang->product->unbindWhitelist = 'Remove Whitelist'; $lang->product->track = 'View Stories Matrix'; $lang->product->checkedProducts = '%s products selected'; +$lang->product->pageProducts = 'Total products: %s.'; +$lang->product->pageLines = 'Total product lines: %s, Total products: %s.'; $lang->product->indexAction = "All {$lang->productCommon}"; $lang->product->closeAction = "Close {$lang->productCommon}"; diff --git a/module/product/lang/en.php b/module/product/lang/en.php index d5c1248166..0af7d531d3 100644 --- a/module/product/lang/en.php +++ b/module/product/lang/en.php @@ -37,6 +37,8 @@ $lang->product->addWhitelist = 'Add Whitelist'; $lang->product->unbindWhitelist = 'Unbind Whitelist'; $lang->product->track = 'View Stories Matrix'; $lang->product->checkedProducts = '%s products selected'; +$lang->product->pageProducts = 'Total products: %s.'; +$lang->product->pageLines = 'Total product lines: %s, Total products: %s.'; $lang->product->indexAction = "All {$lang->productCommon}"; $lang->product->closeAction = "Close {$lang->productCommon}"; diff --git a/module/product/lang/fr.php b/module/product/lang/fr.php index 5dd20995a5..6ba1e4179a 100644 --- a/module/product/lang/fr.php +++ b/module/product/lang/fr.php @@ -37,6 +37,8 @@ $lang->product->addWhitelist = 'Add Whitelist'; $lang->product->unbindWhitelist = 'Remove Whitelist'; $lang->product->track = 'Consulter Stories Matrice'; $lang->product->checkedProducts = '%s produits s électionnés'; +$lang->product->pageProducts = 'Total products: %s.'; +$lang->product->pageLines = 'Total product lines: %s, Total products: %s.'; $lang->product->indexAction = "All {$lang->productCommon}"; $lang->product->closeAction = "Fermer {$lang->productCommon}"; diff --git a/module/product/lang/zh-cn.php b/module/product/lang/zh-cn.php index 9f3bc3955b..336926a768 100644 --- a/module/product/lang/zh-cn.php +++ b/module/product/lang/zh-cn.php @@ -37,6 +37,8 @@ $lang->product->addWhitelist = '添加白名单'; $lang->product->unbindWhitelist = '移除白名单'; $lang->product->track = "查看需求矩阵"; $lang->product->checkedProducts = '已选择%s项产品'; +$lang->product->pageProducts = '本页共%s个产品。'; +$lang->product->pageLines = '本页共%s个产品线,%s个产品。'; $lang->product->indexAction = "所有{$lang->productCommon}仪表盘"; $lang->product->closeAction = "关闭{$lang->productCommon}"; diff --git a/module/product/view/all.html.php b/module/product/view/all.html.php index 450ce3a32e..1d85479802 100644 --- a/module/product/view/all.html.php +++ b/module/product/view/all.html.php @@ -11,6 +11,7 @@ ?> +