Browse Source

PR for issue #60 (#78)

pull/77/head
kopeyev 6 years ago
committed by Mathias Markl
parent
commit
14a815a4d7
  1. 15
      muk_web_preview_msoffice/static/src/js/preview_handler.js

15
muk_web_preview_msoffice/static/src/js/preview_handler.js

@ -117,6 +117,19 @@ var ExcelHandler = PreviewHandler.BaseHandler.extend({
var $pane = $('<div/>');
$pane.addClass('tab-pane table-container');
$pane.attr('id', 'sheet-' + index);
var maximum_arrs = 1;
sheet.forEach(function (arr) {
if(arr.length>maximum_arrs){
maximum_arrs = arr.length;
}
});
sheet.forEach(function (arr) {
if(arr.length<maximum_arrs){
for (var i = arr.length; i < maximum_arrs; i++) {
arr.push("");
}
}
});
$pane.handsontable({
data: sheet,
rowHeaders: true,
@ -149,4 +162,4 @@ return {
PowerPointHandler: PowerPointHandler,
};
});
});
Loading…
Cancel
Save