diff --git a/src/VirtoCommerce.OrdersModule.Web/Localizations/en.VirtoCommerce.Orders.json b/src/VirtoCommerce.OrdersModule.Web/Localizations/en.VirtoCommerce.Orders.json index e3729eef..0bc2c699 100644 --- a/src/VirtoCommerce.OrdersModule.Web/Localizations/en.VirtoCommerce.Orders.json +++ b/src/VirtoCommerce.OrdersModule.Web/Localizations/en.VirtoCommerce.Orders.json @@ -61,7 +61,9 @@ "total": "Total", "currency": "Currency", "store": "Store", - "created": "Created" + "created": "Created", + "copy-id": "Copy ID", + "copy-number": "Copy number" }, "placeholders": { "select-filter": "Select filter" diff --git a/src/VirtoCommerce.OrdersModule.Web/Scripts/blades/customerOrder-list.js b/src/VirtoCommerce.OrdersModule.Web/Scripts/blades/customerOrder-list.js index e0672474..cf8a9935 100644 --- a/src/VirtoCommerce.OrdersModule.Web/Scripts/blades/customerOrder-list.js +++ b/src/VirtoCommerce.OrdersModule.Web/Scripts/blades/customerOrder-list.js @@ -101,6 +101,22 @@ function ($rootScope, $scope, $localStorage, customerOrders, bladeUtils, dialogS } }; + $scope.copy = function (text) { + var copyElement = document.createElement("span"); + copyElement.appendChild(document.createTextNode(text)); + copyElement.id = 'tempCopyToClipboard'; + angular.element(document.body.append(copyElement)); + + var range = document.createRange(); + range.selectNode(copyElement); + window.getSelection().removeAllRanges(); + window.getSelection().addRange(range); + + document.execCommand('copy'); + window.getSelection().removeAllRanges(); + copyElement.remove(); + }; + $scope.deleteList = function (list) { var dialog = { id: "confirmDeleteItem", diff --git a/src/VirtoCommerce.OrdersModule.Web/Scripts/blades/customerOrder-list.tpl.html b/src/VirtoCommerce.OrdersModule.Web/Scripts/blades/customerOrder-list.tpl.html index 1423da68..63ccb3cc 100644 --- a/src/VirtoCommerce.OrdersModule.Web/Scripts/blades/customerOrder-list.tpl.html +++ b/src/VirtoCommerce.OrdersModule.Web/Scripts/blades/customerOrder-list.tpl.html @@ -22,12 +22,18 @@