mirror of
https://github.com/inventree/InvenTree.git
synced 2025-07-16 01:36:29 +00:00
Link changes and in-table clipboards (#4697)
* Add clipboard to tables and external link changes * Clipboard icon added to tables for screens >1200px wide. Enables copying of SKU/MPN/IPN from table cells where these otherwise are hyperlinks * External links now open in new tabs with noreferrer * Move external links into separate template * All statically rendered external links have been moved out to a new template.
This commit is contained in:
@@ -1782,7 +1782,7 @@ function loadStockTable(table, options) {
|
||||
formatter: function(value, row) {
|
||||
var ipn = row.part_detail.IPN;
|
||||
if (ipn) {
|
||||
return withTitle(shortenString(ipn), ipn);
|
||||
return renderClipboard(withTitle(shortenString(ipn), ipn));
|
||||
} else {
|
||||
return '-';
|
||||
}
|
||||
@@ -2014,7 +2014,7 @@ function loadStockTable(table, options) {
|
||||
text = `<i>{% trans "Supplier part not specified" %}</i>`;
|
||||
}
|
||||
|
||||
return renderLink(text, link);
|
||||
return renderClipboard(renderLink(text, link));
|
||||
}
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user