You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

36 lines
1.4 KiB

  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta http-equiv="X-UA-Compatible" content="IE=Edge"/>
  5. <meta http-equiv="Pragma" content="no-cache">
  6. <meta http-equiv="Expires" content="-1">
  7. <meta content="text/html;charset=utf-8" http-equiv="Content-Type">
  8. <meta content="utf-8" http-equiv="encoding">
  9. <title>jQuery.sheet - The Ajax Spreadsheet DTS Lazy Loading</title>
  10. <script src="/bower_components/jquery-legacy/dist/jquery.js"></script>
  11. <script src="/bower_components/jquery.sheet/parser/formula/formula.js"></script>
  12. <script src="/bower_components/jquery.sheet/jquery.sheet.js"></script>
  13. <script>
  14. var numColumns = 10;
  15. var numRows = 20;
  16. var spreadsheetJson = [ { "title": "", "rows": [ ] } ];
  17. for (var i = 0; i < numRows; i++) {
  18. var columns = [];
  19. spreadsheetJson[0].rows.push({ columns: columns });
  20. for (var j = 0; j < numColumns; j++) { columns[j] = { "value": "" }; }
  21. }
  22. $.sheet.preLoad('/bower_components/jquery.sheet/');
  23. $(function () {
  24. window.sheetLdr = new Sheet.JSONLoader( spreadsheetJson );
  25. window.sh = $('#sheet-json').height($(window).height()).width($(window).width()).sheet({
  26. loader: window.sheetLdr,
  27. minSize: { rows:numRows, cols:numColumns }
  28. });
  29. });
  30. </script>
  31. </head>
  32. <body>
  33. <div id="sheet-json" title="CryptSheet"></div>
  34. </body>
  35. </html>