Skip to content

Commit

Permalink
Update jquery, highcharts and make things work with Google Chrome.
Browse files Browse the repository at this point in the history
  • Loading branch information
desilinguist committed Sep 18, 2015
1 parent fd9ab14 commit b24e7b7
Show file tree
Hide file tree
Showing 5 changed files with 351 additions and 457 deletions.
8 changes: 5 additions & 3 deletions bleu.css
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ table#bleuTable caption {
font-size: 14px;
}

div.hider {
div.hider {
font-size: 12px;
text-align: right;
margin: 4px;
Expand All @@ -65,10 +65,12 @@ td#segDetailHeader {

td#segDetailID, td#segDetailRef0, td#segDetailRef1, td#segDetailRef2, td#segDetailRef3, td#segDetailHyp, td#segDetailSrc, td#segDetailEngineTrans {
font-size: 14px;
font-family: consolas, courier, fixed, monospace;
font-family: consolas, courier, fixed, monospace;
text-align: left;
padding: 5px;
}

a.jslink:visited { color: #0000FF;}
a.jslink:visited {
color: #0000FF;
}

34 changes: 13 additions & 21 deletions bleu.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
<title>iBLEU: Interactive BLEU Scoring</title>
<script src="js/bleu.js" type="text/javascript"></script>
<script src="js/jquery.js" type="text/javascript"></script>
<script src="js/jquery.flot.js" type="text/javascript"></script>
<script src="js/utils.js" type="text/javascript"></script>
<script src="js/lcs.js" type="text/javascript"></script>
<script src="js/highcharts.js" type="text/javascript"></script>
Expand Down Expand Up @@ -77,7 +76,7 @@
<div align="center" id="segDetailContainer"></div>
<br/>
</body>
<script type="application/javascript;version=1.8">
<script type="text/javascript">
var tstSets = [];
var refSets = [];
var srcSets = [];
Expand Down Expand Up @@ -318,7 +317,7 @@

$('html, body').animate({
scrollTop: $("#segDetailContainer").offset().top
}, 1000);
}, 500);
}


Expand Down Expand Up @@ -402,6 +401,7 @@
pointwidth = 2;
clickCallback = { click: showLargerPlot };
showXTicks = false;
showXLabels = false;
YTickInterval = 0.5;
XTickWidth = 0;
pointClickCallback = { legendItemClick : function(event) { return false; }, };
Expand All @@ -413,17 +413,14 @@
showAnimation = true;
pointwidth = null;
clickCallback = { };
showXTicks = true;
showXTicks = false;
showXLabels = true;
YTickInterval = 0.2;
XTickWidth = null;
XTickWidth = 0;
pointClickCallback = { legendItemClick : function(event) { return false; }, click : showSegDetails};
pointCursor = 'pointer';
}

if (yscores.length > 35) {
showXTicks = false;
}

chart = new Highcharts.Chart({
chart: {
renderTo: plotdiv,
Expand All @@ -439,7 +436,7 @@
tickWidth: XTickWidth,
categories: xticks,
labels: {
enabled: showXTicks
enabled: showXLabels
}
},
yAxis: {
Expand All @@ -457,11 +454,6 @@
}
},
legend: {
// align: 'right',
// verticalAlign: 'top',
// x: 0,
// y: 10,
// floating: true,
enabled: showLegend
},
plotOptions: {
Expand Down Expand Up @@ -629,7 +621,7 @@
$('#segDetailContainer').html("");
$('html, body').animate({
scrollTop: $("#bleuSegPlotContainer").offset().top
}, 1000);
}, 500);

}

Expand Down Expand Up @@ -1017,7 +1009,7 @@
else {
showScore(scores[0], precisions[0], brevities[0], sysids[0], srclang, refSets.length);
showTable(bo.individualNgramScores, bo.cumulativeNgramScores);
$('#bleuTable').find('tbody').css('display', 'none');
$('#bleuTable').hide();
$('#bleuDetailContainer').css('border', '1px solid');
}

Expand Down Expand Up @@ -1130,9 +1122,9 @@
$(this).html('Hide Form');
}
});
$('a#tableHider').live('click', function(e) {
$('body').on('click', 'a#tableHider', function(e) {
e.preventDefault();
$('#bleuTable').find('tbody').toggle();
$('#bleuTable').toggle();
if ($(this).html() == 'Show') {
$(this).html('Hide');
}
Expand All @@ -1141,7 +1133,7 @@
}
});

$('a#engineTranslate').live('click', function(e) {
$('body').on('click', 'a#engineTranslate', function(e) {
e.preventDefault();
var engineName = $('input[name=comparisonEngine]:checked').val();
if (engineName == "Google") {
Expand Down Expand Up @@ -1170,7 +1162,7 @@
}
$('html, body').animate({
scrollTop: $("tr#segDetailEngine").offset().top
}, 1000);
}, 500);
});
});
</script>
Expand Down
Loading

0 comments on commit b24e7b7

Please sign in to comment.