restrict similar features to 12 in display

This commit is contained in:
Sanj 2011-09-01 05:07:57 +05:30
parent b7042e1fcc
commit d952544b8a

View File

@ -2,7 +2,12 @@ $(function() {
$.getJSON("/feature/" + FEATURE_ID + "/similar.json", { $.getJSON("/feature/" + FEATURE_ID + "/similar.json", {
}, function(data) { }, function(data) {
for (var i=0; i<data.length;i++) { if (data.length > 12) {
var counter = 12;
} else {
var counter = data.length;
}
for (var i=0; i<counter; i++) {
var $row = getRow(data[i]); var $row = getRow(data[i]);
$('#similarTable tbody').append($row); $('#similarTable tbody').append($row);
} }