Skip to content

Commit aeb9b3d

Browse files
committed
issue #20 download all rows fixed 2
1 parent 7744630 commit aeb9b3d

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

static/js/common.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -2522,7 +2522,7 @@ function model_to_table(model, numrows){
25222522

25232523
var rdf_array = model_to_array(model);
25242524

2525-
numrows = typeof numrows === "undefined" ? rdf_array.length : (numrows*model['columns'].length)
2525+
numrows = typeof numrows !== "undefined" ? Math.min(rdf_array.length, numrows*model['columns'].length) : numrows*model['columns'].length
25262526

25272527
//create table content
25282528
for(var i = 0; i < numrows; i++){

templates/transformation/csv_object.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -341,14 +341,14 @@ <h3 style="display: inline">RDF VIEW</h3><span>(10 row example)</span>
341341
function adapt_RDF_preview(column) {
342342
column = typeof column !== 'undefined' ? column : "";
343343

344-
345344
//TODO this is done each time anything is clicked, bad performance
346345
$("td[id^='id_table_field_"+column+"']").each(function(i){
347346

348347
var id_as_array = $(this).attr("id").split("_");
349348
var row = id_as_array[id_as_array.length-1];
350349
var col = id_as_array[id_as_array.length-2];
351350

351+
352352
var recon_result = $(this).find(".bb_select_selection").text();
353353

354354
if($(this).find(".bb_select").length>0) { // has reconsiliation result (dropbox)

templatetags/modelview_tags.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ def model_content_as_table(model, numrows=-1):
5959
for col in model['columns']:
6060
if col['col_num_new'] > -1: #show column
6161
row = []
62-
if(numrows != -1):
62+
if numrows != -1:
6363
fields = col['fields'][:numrows]
6464
else:
6565
fields = col['fields']

0 commit comments

Comments
 (0)