Remove code which was causing issue

This commit is contained in:
Oliver Walters 2021-02-12 19:57:44 +11:00
parent b43d6a2ad4
commit efc2290613
2 changed files with 4 additions and 12 deletions

View File

@ -101,7 +101,7 @@ function loadStockTestResultsTable(table, options) {
}, },
{ {
field: 'test_name', field: 'test_name',
title: "{% trans "Test Name" %}", title: '{% trans "Test Name" %}',
sortable: true, sortable: true,
formatter: function(value, row) { formatter: function(value, row) {
var html = value; var html = value;
@ -925,7 +925,7 @@ function loadStockTrackingTable(table, options) {
} }
else else
{ {
return "{% trans "No user information" %}"; return '{% trans "No user information" %}';
} }
} }
}); });
@ -1206,7 +1206,7 @@ function loadInstalledInTable(table, options) {
columns: [ columns: [
{ {
checkbox: true, checkbox: true,
title: '{% trans 'Select' %}', title: '{% trans "Select" %}',
searchable: false, searchable: false,
switchable: false, switchable: false,
}, },

View File

@ -11,7 +11,7 @@ function deleteButton(url, text='Delete') {
function renderLink(text, url, options={}) { function renderLink(text, url, options={}) {
if (url == null || url === '') { if (url === null || url === undefined || url === '') {
return text; return text;
} }
@ -19,14 +19,6 @@ function renderLink(text, url, options={}) {
var remove_http = options.remove_http || false; var remove_http = options.remove_http || false;
if (remove_http) {
if (text.startsWith('http://')) {
text = text.slice(7);
} else if (text.startsWith('https://')) {
text = text.slice(8);
}
}
// Shorten the displayed length if required // Shorten the displayed length if required
if ((max_length > 0) && (text.length > max_length)) { if ((max_length > 0) && (text.length > max_length)) {
var slice_length = (max_length - 3) / 2; var slice_length = (max_length - 3) / 2;