Skip to content

Commit

Permalink
extend the maximum number of columns from 100 to 1000
Browse files Browse the repository at this point in the history
  • Loading branch information
hichamlahlou committed Jan 19, 2024
1 parent 4c7b560 commit b00edfe
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions freppledb/common/static/js/frepple.js
Original file line number Diff line number Diff line change
Expand Up @@ -817,15 +817,15 @@ var grid = {
'</div>' +
'</div>';
for (var j in my_cross_idx) {
val1s += '<li class="list-group-item" id="' + (100 + parseInt(my_cross_idx[j], 10)) + '" style="cursor: move;">' + my_cross[my_cross_idx[j]]['name'] + '</li>';
val1s += '<li class="list-group-item" id="' + (1000 + parseInt(my_cross_idx[j], 10)) + '" style="cursor: move;">' + my_cross[my_cross_idx[j]]['name'] + '</li>';
}
var fieldlist = {};
for (var j in my_cross) {
if (my_cross_idx.indexOf(parseInt(j, 10)) > -1 || my_cross[j]['name'] == "") continue;
fieldlist[my_cross[j]['name']] = parseInt(j, 10);
}
for (var j of Object.keys(fieldlist).sort())
val1a += '<li class="list-group-item" id="' + (100 + fieldlist[j]) + '" style="cursor: move;">' + j + '</li>';
val1a += '<li class="list-group-item" id="' + (1000 + fieldlist[j]) + '" style="cursor: move;">' + j + '</li>';
}
else {
// Add selection of number of frozen columns
Expand Down Expand Up @@ -944,15 +944,15 @@ var grid = {

$('#Rows li').each(function () {
var val = parseInt(this.id, 10);
if (val < 100) {
if (val < 1000) {
$("#grid").jqGrid("showCol", colModel[val].name);
perm.push(val);
}
});

$('#DroppointRows li').each(function () {
var val = parseInt(this.id, 10);
if (val < 100) {
if (val < 1000) {
hiddenrows.push(val);
if (pivot)
$("#grid").jqGrid('setColProp', colModel[val].name, { frozen: false });
Expand All @@ -962,8 +962,8 @@ var grid = {

$('#Crosses li').each(function () {
var val = parseInt(this.id, 10);
if (val >= 100)
cross_idx.push(val - 100);
if (val >= 1000)
cross_idx.push(val - 1000);
});

var numfrozen = 0;
Expand Down

0 comments on commit b00edfe

Please sign in to comment.