Skip to content

Commit 58a09de

Browse files
authored
Migrate inline handlers (#139)
1 parent 97bb4b2 commit 58a09de

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

OConnor/resources/views/Elispot_Matrix.html

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
window.location = LABKEY.ActionURL.buildURL('project','begin', wbcontainer);
1515
}
1616
});
17+
18+
return false;
1719
}
1820

1921
var trad1 = '';
@@ -44,8 +46,12 @@
4446

4547
if(matrixExps != undefined || tradExps != undefined){
4648
document.getElementById('matches').innerHTML = 'Possible Matches';
47-
document.getElementById('experiments').innerHTML = '&nbsp Trad. 1: ' + '<a href=javascript:toExperiment(trad1)>' + trad1 + '</a>' + '&nbsp Trad. 2: ' + '<a href=javascript:toExperiment(trad2)>' + trad2 + '</a>' + '&nbsp Matrix 1: ' + '<a href=javascript:toExperiment(matrix1)>' + matrix1 + '</a>' + '&nbsp Matrix 2: ' + '<a href=javascript:toExperiment(matrix2)>' + matrix2 + '</a>';
48-
}
49+
document.getElementById('experiments').innerHTML = '&nbsp Trad. 1: ' + '<a id="trad1">' + LABKEY.Utils.encodeHtml(trad1) + '</a>' + '&nbsp Trad. 2: ' + '<a id="trad2">' + LABKEY.Utils.encodeHtml(trad2) + '</a>' + '&nbsp Matrix 1: ' + '<a id="matrix1">' + LABKEY.Utils.encodeHtml(matrix1) + '</a>' + '&nbsp Matrix 2: ' + '<a id="matrix2">' + LABKEY.Utils.encodeHtml(matrix2) + '</a>';
50+
document.getElementById('trad1')['onclick'] = function() { toExperiment(trad1) };
51+
document.getElementById('trad2')['onclick'] = function() { toExperiment(trad2) };
52+
document.getElementById('matrix1')['onclick'] = function() { toExperiment(matrix1) };
53+
document.getElementById('matrix2')['onclick'] = function() { toExperiment(matrix2) };
54+
}
4955

5056
var allexps = matrix1 + ';' + matrix2 + ';' + trad1 + ';' + trad2;
5157

0 commit comments

Comments
 (0)