Commit 01530c07 authored by Jérome Perrin's avatar Jérome Perrin

fix the way to make spreadsheet full width

parent 2e81b973
......@@ -67,7 +67,7 @@
</div>
<div class="twelve columns">
<div id="result_zone">
<div>Result List</div>
<h1>Results</h1>
<ul id="result_list"></ul></div>
<div id="graph_zone">
<div>Stations Utilization</div>
......
......@@ -596,6 +596,11 @@
job_schedule_spreadsheet.show();
job_schedule_spreadsheet.handsontable({
data: spreadsheet_header.concat(spreadsheet_data),
width: function () {
return $(window).width() -
job_schedule_spreadsheet.offset().left +
$(window).scrollLeft();
},
readOnly: true
});
job_schedule_spreadsheet.find('.htCore').width(job_schedule_spreadsheet.width());
......
......@@ -130,9 +130,14 @@
data: data,
minSpareRows: 1,
stretchH: 'all',
width: function () {
return $(window).width() -
wip_part_spreadsheet.offset().left +
$(window).scrollLeft();
},
afterChange: function () {
priv.onDataChange();
}
},
});
var shift_spreadsheet = $('#shift_spreadsheet');
......@@ -148,6 +153,11 @@
data: data,
minSpareRows: 1,
stretchH: 'all',
width: function () {
return $(window).width() -
shift_spreadsheet.offset().left +
$(window).scrollLeft();
},
afterChange: function () {
priv.onDataChange();
}
......@@ -307,13 +317,6 @@
element.css('left', absolute_position[0]);
jsPlumb.repaint(element);
});
// redraw spreadsheets
var wip_part_spreadsheet = $("#wip_part_spreadsheet");
wip_part_spreadsheet.find('.htCore').width(wip_part_spreadsheet.width());
var shift_spreadsheet = $("#shift_spreadsheet");
shift_spreadsheet.find('.htCore').width(shift_spreadsheet.width());
var job_schedule_spreadsheet = $("#job_schedule_spreadsheet");
job_schedule_spreadsheet.find('.htCore').width(job_schedule_spreadsheet.width());
};
priv.getData = function () {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment