Commit 8492d41b authored by Jérome Perrin's avatar Jérome Perrin

Make spreadsheet handle resize nicely

parent 8d250701
......@@ -62,8 +62,8 @@
</div>
</div>
<div class="twelve columns">
<div id="wip_part_spreadsheet" style="display: none;"></div>
<div id="shift_spreadsheet" style="display: none;"></div>
<div id="wip_part_spreadsheet" style="display: none; overflow: scroll;"></div>
<div id="shift_spreadsheet" style="display: none; overflow: scroll"></div>
</div>
<div class="twelve columns">
<div id="result_zone">
......@@ -74,7 +74,7 @@
<div id="graph"></div>
</div>
<div id="exit_stat"></div>
<div id="job_schedule_spreadsheet"></div>
<div id="job_schedule_spreadsheet" style="display: none; overflow: scroll;"></div>
<div id="job_gantt" style='width:1320px; height:800px;'></div>
<div id="debug_json" style="display: none">
......
......@@ -87,13 +87,11 @@
if (shift_spreadsheet_data !== undefined) {
var spreadsheet = $('#shift_spreadsheet');
spreadsheet.handsontable('populateFromArray', 0, 0, shift_spreadsheet_data);
spreadsheet.find('.htCore').width(spreadsheet.width());
}
var wip_part_spreadsheet_data = data.wip_part_spreadsheet;
if (wip_part_spreadsheet_data !== undefined) {
var spreadsheet = $('#wip_part_spreadsheet');
spreadsheet.handsontable('populateFromArray', 0, 0, wip_part_spreadsheet_data);
spreadsheet.find('.htCore').width(spreadsheet.width());
}
var preference = data.preference !== undefined ?
......
......@@ -129,11 +129,11 @@
wip_part_spreadsheet.handsontable({
data: data,
minSpareRows: 1,
stretchH: 'all',
afterChange: function () {
priv.onDataChange();
}
});
wip_part_spreadsheet.find('.htCore').width(wip_part_spreadsheet.width());
var shift_spreadsheet = $('#shift_spreadsheet');
var data = [
......@@ -147,11 +147,11 @@
shift_spreadsheet.handsontable({
data: data,
minSpareRows: 1,
stretchH: 'all',
afterChange: function () {
priv.onDataChange();
}
});
shift_spreadsheet.find('.htCore').width(shift_spreadsheet.width());
};
......@@ -307,6 +307,13 @@
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